pub enum UpcAParseError {
InputTooLarge {
found: u64,
},
ParseIntError(ParseIntError),
ChecksumFailed {
found: u8,
},
}Expand description
Error that can occur during parsing a UPC-A code.
This enum represents all the possible errors that can occur when validating or parsing a UPC-A from various input formats.
Variants§
InputTooLarge
The input is too large to be a valid UPC-A code.
ParseIntError(ParseIntError)
The input string is not a valid integer.
ChecksumFailed
The checksum digit is invalid.
Trait Implementations§
Source§impl Clone for UpcAParseError
impl Clone for UpcAParseError
Source§fn clone(&self) -> UpcAParseError
fn clone(&self) -> UpcAParseError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpcAParseError
impl Debug for UpcAParseError
Source§impl Display for UpcAParseError
impl Display for UpcAParseError
Source§impl Error for UpcAParseError
impl Error for UpcAParseError
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<ParseIntError> for UpcAParseError
impl From<ParseIntError> for UpcAParseError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UpcAParseError
impl PartialEq for UpcAParseError
impl Eq for UpcAParseError
impl StructuralPartialEq for UpcAParseError
Auto Trait Implementations§
impl Freeze for UpcAParseError
impl RefUnwindSafe for UpcAParseError
impl Send for UpcAParseError
impl Sync for UpcAParseError
impl Unpin for UpcAParseError
impl UnwindSafe for UpcAParseError
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