pub enum DecodeError {
InvalidWord {
position: Option<usize>,
},
InvalidChecksum {
expected: [u8; 4],
calculated: [u8; 4],
},
ChecksumNotPresent,
InvalidLength,
NonAscii,
NotEnoughSpace {
available: usize,
needed: usize,
},
}Expand description
The different errors that can be returned when decoding.
Variants§
InvalidWord
Usually indicates a wrong encoding Style was passed.
InvalidChecksum
The CRC32 checksum doesn’t validate.
Fields
ChecksumNotPresent
The CRC32 checksum is not present.
InvalidLength
Invalid bytewords string length.
NonAscii
The bytewords string contains non-ASCII characters.
NotEnoughSpace
Not enough space to decode the bytewords into.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl Eq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more