pub enum CodeParseError {
InvalidLength {
type_name: String,
length: usize,
},
InvalidFormat {
type_name: String,
value: String,
},
InvalidCharacter {
type_name: String,
c: char,
},
UnknownValue {
type_name: String,
value: String,
},
CheckDigit(Box<dyn Error>),
}Expand description
Common Error type, mainly used for FromStr failures.
Variants§
InvalidLength
The string to parse was either too short or too long.
InvalidFormat
The value is incorrectly formatted
InvalidCharacter
The value contains an invalid character
UnknownValue
The string value did not represent a known value.
CheckDigit(Box<dyn Error>)
An error in check digit calculation/verification.
Trait Implementations§
Source§impl Debug for CodeParseError
impl Debug for CodeParseError
Source§impl Display for CodeParseError
impl Display for CodeParseError
Source§impl Error for CodeParseError
impl Error for CodeParseError
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()
Auto Trait Implementations§
impl Freeze for CodeParseError
impl !RefUnwindSafe for CodeParseError
impl !Send for CodeParseError
impl !Sync for CodeParseError
impl Unpin for CodeParseError
impl !UnwindSafe for CodeParseError
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