#[non_exhaustive]pub enum ParseError {
Show 14 variants
CharToInt(char),
Message(&'static str),
MissingToken(String),
Msg(String),
ParseTime(String),
UnexpectedToken(Token),
AddrParse(AddrParseError),
DataEncoding(DecodeError),
Io(Error),
Lexer(LexerError),
ParseInt(ParseIntError),
Proto(ProtoError),
UnknownRecordType(u16),
UnsupportedRecordType(RecordType),
}Expand description
The error kind for parse errors that get returned in the crate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CharToInt(char)
An invalid numerical character was found
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
MissingToken(String)
A token is missing
Msg(String)
An error with an arbitrary message, stored as String
ParseTime(String)
A time string could not be parsed
UnexpectedToken(Token)
Found an unexpected token in a stream
AddrParse(AddrParseError)
An address parse error
DataEncoding(DecodeError)
A data encoding error
Io(Error)
An error got returned from IO
Lexer(LexerError)
An error from the lexer
ParseInt(ParseIntError)
A number parsing error
Proto(ProtoError)
An error got returned by the hickory-proto crate
UnknownRecordType(u16)
Unknown RecordType
UnsupportedRecordType(RecordType)
Unknown RecordType
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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()
Source§impl From<&'static str> for ParseError
impl From<&'static str> for ParseError
Source§impl From<AddrParseError> for ParseError
impl From<AddrParseError> for ParseError
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for ParseError
impl From<DecodeError> for ParseError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for ParseError
impl From<DecodeError> for ParseError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§impl From<Infallible> for ParseError
impl From<Infallible> for ParseError
Source§fn from(_e: Infallible) -> Self
fn from(_e: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<LexerError> for ParseError
impl From<LexerError> for ParseError
Source§fn from(source: LexerError) -> Self
fn from(source: LexerError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
Available on crate feature std only.
impl From<ParseError> for Error
Available on crate feature
std only.Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for ParseError
impl From<ParseIntError> for ParseError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<ProtoError> for ParseError
impl From<ProtoError> for ParseError
Source§fn from(source: ProtoError) -> Self
fn from(source: ProtoError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParseError
impl !RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl !UnwindSafe for ParseError
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