Enum trust_dns_proto::serialize::txt::ParseErrorKind
source · #[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 trust-dns-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)>
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 !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