pub enum Error {
InvalidCrockford32,
InvalidVersion(u8),
EmptyData,
BadByte(u8),
BadChecksum(u32, u32),
InvalidLength(usize),
TooShort(usize),
Other(String),
}
Variants
InvalidCrockford32
InvalidVersion(u8)
EmptyData
BadByte(u8)
Invalid character encountered
BadChecksum(u32, u32)
Checksum was not correct (expected, actual)
InvalidLength(usize)
The length (in bytes) of the object was not correct Note that if the length is excessively long the provided length may be an estimate (and the checksum step may be skipped).
TooShort(usize)
Checked data was less than 4 bytes
Other(String)
Any other error
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more