#[repr(i32)]pub enum Error {
None = 0,
Invalid = 22,
IllegalSequence = 84,
TimedOut = 110,
NoMedium = 123,
InvalidVariant(usize),
InvalidFieldVariant {
field: &'static str,
value: usize,
},
InvalidValue {
value: usize,
min: usize,
max: usize,
},
InvalidFieldValue {
field: &'static str,
value: usize,
min: usize,
max: usize,
},
InvalidCrc7 {
invalid: u8,
calculated: u8,
},
InvalidLength {
len: usize,
expected: usize,
},
Unimplemented,
}
Expand description
Represents MMC error types.
Variants§
None = 0
Invalid = 22
Invalid argument.
IllegalSequence = 84
Illegal byte sequence.
TimedOut = 110
Connection timed out.
NoMedium = 123
No medium found.
InvalidVariant(usize)
Invalid variant.
InvalidFieldVariant
Invalid field enum variant.
InvalidValue
Invalid value.
InvalidFieldValue
Invalid field value.
InvalidCrc7
Invalid CRC-7.
InvalidLength
Invalid length, with expected value.
Unimplemented
Indicates an unimplemented function or feature.
Implementations§
Source§impl Error
impl Error
Sourcepub const fn invalid_field_variant(field: &'static str, value: usize) -> Self
pub const fn invalid_field_variant(field: &'static str, value: usize) -> Self
Creates an InvalidFieldVariant error.
Sourcepub const fn invalid_field_value(
field: &'static str,
value: usize,
min: usize,
max: usize,
) -> Self
pub const fn invalid_field_value( field: &'static str, value: usize, min: usize, max: usize, ) -> Self
Creates an InvalidFieldValue error.
Sourcepub const fn invalid_crc7(invalid: u8, calculated: u8) -> Self
pub const fn invalid_crc7(invalid: u8, calculated: u8) -> Self
Creates an InvalidCrc7 error.
Sourcepub const fn invalid_length(len: usize, expected: usize) -> Self
pub const fn invalid_length(len: usize, expected: usize) -> Self
Creates an InvalidLength error.
Sourcepub const fn unimplemented() -> Self
pub const fn unimplemented() -> Self
Creates an unimplemented Error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§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()
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(err: TryFromSliceError) -> Self
fn from(err: TryFromSliceError) -> Self
Converts to this type from the input type.
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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