Enum code128::DecodingError
source · pub enum DecodingError {
Pattern(u16),
InvalidModules,
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.
InvalidModules
A module’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)>
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<DecodingError> for DecodingError
impl PartialEq<DecodingError> for DecodingError
source§fn eq(&self, other: &DecodingError) -> bool
fn eq(&self, other: &DecodingError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.