pub enum DecodingError {
Pattern(u16),
InvalidBar,
WrongStop,
Short,
Length,
Checksum,
NoMode,
Unexpected(u8),
Latin1,
}Expand description
Errors that can occur during decoding.
Variants§
Pattern(u16)
A sequence of modules resulted in an unknown pattern.
InvalidBar
A bar’s width or spacing is not valid.
WrongStop
The stop code at the end is wrong.
Short
The input was too short.
Length
The code’s length can not fit an allowed sequence of modules.
Checksum
The checksum did not match.
NoMode
The code did not start with a mode signal.
Unexpected(u8)
A symbol occurred in a mode that did not support it or is not implemented.
Latin1
After decoding the data the conversion from Latin 1 failed.
Trait Implementations§
Source§impl Debug for DecodingError
impl Debug for DecodingError
Source§impl Display for DecodingError
impl Display for DecodingError
Source§impl Error for DecodingError
impl Error for DecodingError
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 PartialEq for DecodingError
impl PartialEq for DecodingError
impl StructuralPartialEq for DecodingError
Auto Trait Implementations§
impl Freeze for DecodingError
impl RefUnwindSafe for DecodingError
impl Send for DecodingError
impl Sync for DecodingError
impl Unpin for DecodingError
impl UnwindSafe for DecodingError
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