Enum VidHeaderError
#[non_exhaustive]pub enum VidHeaderError {
Show 14 variants
Magic {
found: u32,
},
Crc(CrcError),
Field {
field: VidHeaderField,
source: ValueError,
},
VolumeId(u32),
Compat {
volume_id: u32,
compat: u8,
},
NoUsedEbs,
NoData,
LnumBeyondUsedEbs {
lnum: u32,
used_ebs: u32,
},
DynamicDataSize(u32),
DynamicDataCrc(u32),
DynamicUsedEbs(u32),
DataPadTooLarge {
data_pad: u32,
leb_size: u32,
},
DataSizeTooLarge {
data_size: u32,
leb_size: u32,
},
ShortBlock {
lnum: u32,
data_size: u32,
usable: u32,
},
}Expand description
Volume identifier header that the kernel rejects.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Magic
The header doesn’t start with UBI!.
Crc(CrcError)
The CRC doesn’t match the header.
Field
A field has a value that it can’t have.
VolumeId(u32)
The volume ID is neither a user volume nor an internal volume.
Compat
The compat field doesn’t fit the volume. Only internal volumes have
one.
NoUsedEbs
A block of a static volume has no used blocks.
NoData
A block of a static volume, or a copy, has no data.
LnumBeyondUsedEbs
A logical eraseblock of a static volume is beyond its used blocks.
DynamicDataSize(u32)
A block of a crate::VolumeKind::Dynamic volume that isn’t a copy
has a data size.
DynamicDataCrc(u32)
A block of a crate::VolumeKind::Dynamic volume that isn’t a copy
has a data CRC.
DynamicUsedEbs(u32)
A block of a crate::VolumeKind::Dynamic volume has a number of
used blocks.
DataPadTooLarge
The padding takes half of a logical eraseblock or more.
DataSizeTooLarge
The data doesn’t fit into a logical eraseblock.
ShortBlock
A logical eraseblock of a static volume other than the last isn’t full.
Implementations§
§impl VidHeaderError
impl VidHeaderError
pub(crate) const fn field(field: VidHeaderField) -> impl Fn(ValueError) -> Self
pub(crate) const fn field(field: VidHeaderField) -> impl Fn(ValueError) -> Self
Returns a function that wraps a ValueError of field.
Trait Implementations§
§impl Clone for VidHeaderError
impl Clone for VidHeaderError
§fn clone(&self) -> VidHeaderError
fn clone(&self) -> VidHeaderError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for VidHeaderError
impl Debug for VidHeaderError
§impl Display for VidHeaderError
impl Display for VidHeaderError
impl Eq for VidHeaderError
§impl Error for VidHeaderError
impl Error for VidHeaderError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()