Enum VolumeRecordError
#[non_exhaustive]pub enum VolumeRecordError {
Crc(CrcError),
Field {
field: VolumeRecordField,
source: ValueError,
},
UnusedRecord,
Name(VolumeNameError),
NameNotTerminated,
ZeroAlignment,
AlignmentTooLarge {
alignment: u32,
leb_size: u32,
},
DataPadMismatch {
data_pad: u32,
expected: u32,
},
}Expand description
Volume table record that the kernel rejects.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Crc(CrcError)
The CRC doesn’t match the record.
Field
A field has a value that it can’t have.
UnusedRecord
A record without reserved blocks has other fields set.
Name(VolumeNameError)
The volume name is invalid.
NameNotTerminated
The byte after the volume name isn’t NUL.
ZeroAlignment
A used record has an alignment of 0.
AlignmentTooLarge
The alignment of a volume exceeds the size of a logical eraseblock.
DataPadMismatch
The padding doesn’t match the alignment.
Implementations§
§impl VolumeRecordError
impl VolumeRecordError
pub(crate) const fn field(
field: VolumeRecordField,
) -> impl Fn(ValueError) -> Self
pub(crate) const fn field( field: VolumeRecordField, ) -> impl Fn(ValueError) -> Self
Returns a function that wraps a ValueError of field.
Trait Implementations§
§impl Clone for VolumeRecordError
impl Clone for VolumeRecordError
§fn clone(&self) -> VolumeRecordError
fn clone(&self) -> VolumeRecordError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for VolumeRecordError
impl Debug for VolumeRecordError
§impl Display for VolumeRecordError
impl Display for VolumeRecordError
impl Eq for VolumeRecordError
§impl Error for VolumeRecordError
impl Error for VolumeRecordError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl From<CrcError> for VolumeRecordError
impl From<CrcError> for VolumeRecordError
§impl PartialEq for VolumeRecordError
impl PartialEq for VolumeRecordError
impl StructuralPartialEq for VolumeRecordError
Auto Trait Implementations§
impl Freeze for VolumeRecordError
impl RefUnwindSafe for VolumeRecordError
impl Send for VolumeRecordError
impl Sync for VolumeRecordError
impl Unpin for VolumeRecordError
impl UnsafeUnpin for VolumeRecordError
impl UnwindSafe for VolumeRecordError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more