pub enum IsbnError {
InvalidLength,
InvalidDigit,
InvalidGroup,
UndefinedRange,
InvalidChecksum,
InvalidConversion,
DigitTooLarge,
}Expand description
An error which can be returned when parsing an ISBN.
Variants§
InvalidLength
The given string is too short or too long to be an ISBN.
InvalidDigit
Encountered an invalid digit while parsing.
InvalidGroup
Encountered an invalid ISBN registration group.
UndefinedRange
Encountered a range not defined for use at this time.
InvalidChecksum
Failed to validate checksum.
InvalidConversion
Failed to convert to ISBN10.
DigitTooLarge
One or supplied more digits were too large.
Trait Implementations§
Source§impl From<CapacityError<u8>> for IsbnError
impl From<CapacityError<u8>> for IsbnError
Source§fn from(_: CapacityError<u8>) -> Self
fn from(_: CapacityError<u8>) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for IsbnError
impl From<ParseIntError> for IsbnError
Source§fn from(_: ParseIntError) -> Self
fn from(_: ParseIntError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for IsbnError
Auto Trait Implementations§
impl Freeze for IsbnError
impl RefUnwindSafe for IsbnError
impl Send for IsbnError
impl Sync for IsbnError
impl Unpin for IsbnError
impl UnwindSafe for IsbnError
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