Enum EcHeaderError
#[non_exhaustive]pub enum EcHeaderError {
Magic {
found: u32,
},
Crc(CrcError),
Version(u8),
EraseCounter(u64),
}Expand description
Erase counter header 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.
Magic
The header doesn’t start with UBI#.
Crc(CrcError)
The CRC doesn’t match the header.
Version(u8)
The header has a version this crate doesn’t know.
EraseCounter(u64)
The erase counter is above crate::EcHeader::MAX_ERASE_COUNT.
Trait Implementations§
§impl Clone for EcHeaderError
impl Clone for EcHeaderError
§fn clone(&self) -> EcHeaderError
fn clone(&self) -> EcHeaderError
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 EcHeaderError
impl Debug for EcHeaderError
§impl Display for EcHeaderError
impl Display for EcHeaderError
impl Eq for EcHeaderError
§impl Error for EcHeaderError
impl Error for EcHeaderError
§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 EcHeaderError
impl From<CrcError> for EcHeaderError
§impl PartialEq for EcHeaderError
impl PartialEq for EcHeaderError
impl StructuralPartialEq for EcHeaderError
Auto Trait Implementations§
impl Freeze for EcHeaderError
impl RefUnwindSafe for EcHeaderError
impl Send for EcHeaderError
impl Sync for EcHeaderError
impl Unpin for EcHeaderError
impl UnsafeUnpin for EcHeaderError
impl UnwindSafe for EcHeaderError
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