Enum BarcodeError
pub enum BarcodeError {
Empty,
NotADigit {
index: usize,
found: char,
},
WrongLength(usize),
BadCheckDigit {
expected: u8,
found: u8,
},
}Expand description
Why a barcode string was refused at the boundary.
Variants§
Empty
The string held no digits at all.
NotADigit
A character other than an ASCII digit, at this character index (spaces and hyphens, which cards print as separators, are accepted and skipped).
WrongLength(usize)
Neither 13 (EAN-13 / JAN-13) nor 8 (EAN-8 / JAN-8) digits.
BadCheckDigit
The last digit is not the check digit the others require.
Trait Implementations§
§impl Clone for BarcodeError
impl Clone for BarcodeError
§fn clone(&self) -> BarcodeError
fn clone(&self) -> BarcodeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BarcodeError
§impl Debug for BarcodeError
impl Debug for BarcodeError
§impl Display for BarcodeError
impl Display for BarcodeError
impl Eq for BarcodeError
§impl PartialEq for BarcodeError
impl PartialEq for BarcodeError
impl StructuralPartialEq for BarcodeError
Auto Trait Implementations§
impl Freeze for BarcodeError
impl RefUnwindSafe for BarcodeError
impl Send for BarcodeError
impl Sync for BarcodeError
impl Unpin for BarcodeError
impl UnsafeUnpin for BarcodeError
impl UnwindSafe for BarcodeError
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