Enum prse::ParseError
source · pub enum ParseError {
Int(ParseIntError),
Bool(ParseBoolError),
Char(ParseCharError),
Float(ParseFloatError),
Addr(AddrParseError),
Dyn(Box<dyn Error>),
Literal {
expected: String,
found: String,
},
Multi {
expected: u8,
found: u8,
},
}Expand description
The error returned when trying to parse a type using try_parse or LendingFromStr.
Variants§
Int(ParseIntError)
The variant returned when an integer cannot be parsed.
Bool(ParseBoolError)
The variant returned when a bool cannot be parsed.
Char(ParseCharError)
The variant returned when a char cannot be parsed.
Float(ParseFloatError)
The variant returned when a float cannot be parsed.
Addr(AddrParseError)
The variant returned when an ip address cannot be parsed.
This variant is only enabled with the std feature.
Dyn(Box<dyn Error>)
The variant returned when you want to return an error that is not defined here.
When not using the std feature, Dyn is a unit variant as the
Error trait is part of std.
Literal
The variant returned when parse! found an unexpected literal.
When not using the alloc feature, Literal is a unit variant.
Multi
Fields
The variant returned when parsing an array and finding more or less elements than what was expected.