Enum codes_common::CodeParseError
source · 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)>
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()