Enum ImageError
#[non_exhaustive]pub enum ImageError<E> {
Size(E),
Read {
block: u32,
source: E,
},
PartialBlock {
block: u32,
len: usize,
},
Header {
block: u32,
source: FormatError,
},
Offsets {
vid_header_offset: u32,
data_offset: u32,
block_size: usize,
},
TooManyBlocks,
BufferLength {
len: usize,
needed: usize,
},
NoVolumeTable,
VolumeTable {
lnum: u32,
source: FormatError,
},
DuplicateBlock {
first: u32,
second: u32,
},
MissingBlock {
lnum: u32,
},
UpdateMarker,
}Expand description
Failure to read a UBI image whose source fails with E.
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.
Size(E)
Reading the size of the image failed.
Read
Reading a block failed.
PartialBlock
The image ends in the middle of a block.
Header
A block of the image has an invalid header.
Offsets
The header offsets don’t fit the block, or no minimum I/O size gives this data offset.
Fields
TooManyBlocks
The image has more blocks than fit into a u32.
BufferLength
A buffer or block map has the wrong length.
NoVolumeTable
The image holds data, but no volume table.
VolumeTable
Neither copy of the volume table is valid.
Fields
§
source: FormatErrorThe error of that copy.
DuplicateBlock
Blocks with the same logical eraseblock have the same sequence number.
MissingBlock
A static volume misses a logical eraseblock.
UpdateMarker
The volume has an update that didn’t finish. The kernel refuses to read it.
Trait Implementations§
§impl<E: Debug> Debug for ImageError<E>
impl<E: Debug> Debug for ImageError<E>
§impl<E> Display for ImageError<E>
impl<E> Display for ImageError<E>
§impl<E> Error for ImageError<E>
impl<E> Error for ImageError<E>
§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()
Auto Trait Implementations§
impl<E> Freeze for ImageError<E>where
E: Freeze,
impl<E> RefUnwindSafe for ImageError<E>where
E: RefUnwindSafe,
impl<E> Send for ImageError<E>where
E: Send,
impl<E> Sync for ImageError<E>where
E: Sync,
impl<E> Unpin for ImageError<E>where
E: Unpin,
impl<E> UnsafeUnpin for ImageError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for ImageError<E>where
E: UnwindSafe,
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