#[non_exhaustive]pub enum ParseErrorKind {
Show 15 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),
Timeout,
}
Available on crate feature
text-parsing
only.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
Timeout
A request timed out
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
Source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
Source§impl Error for ParseErrorKind
impl Error for ParseErrorKind
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<AddrParseError> for ParseErrorKind
impl From<AddrParseError> for ParseErrorKind
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for ParseErrorKind
impl From<DecodeError> for ParseErrorKind
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ParseErrorKind
impl From<Error> for ParseErrorKind
Source§impl From<ParseErrorKind> for ParseError
impl From<ParseErrorKind> for ParseError
Source§fn from(kind: ParseErrorKind) -> Self
fn from(kind: ParseErrorKind) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for ParseErrorKind
impl From<ParseIntError> for ParseErrorKind
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<ProtoError> for ParseErrorKind
impl From<ProtoError> for ParseErrorKind
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 ParseErrorKind
impl !RefUnwindSafe for ParseErrorKind
impl Send for ParseErrorKind
impl Sync for ParseErrorKind
impl Unpin for ParseErrorKind
impl !UnwindSafe for ParseErrorKind
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