Enum trust_dns_proto::error::ProtoErrorKind [−][src]
#[non_exhaustive]
pub enum ProtoErrorKind {
Show 36 variants
BadQueryCount(usize),
Busy,
Canceled(Canceled),
CharacterDataTooLong {
max: usize,
len: usize,
},
LabelOverlapsWithOther {
label: usize,
other: usize,
},
DnsKeyProtocolNot3(u8),
DomainNameTooLong(usize),
EdnsNameNotRoot(Name),
FormError {
header: Header,
error: Box<ProtoError>,
},
HmacInvalid(),
IncorrectRDataLengthRead {
read: usize,
len: usize,
},
LabelBytesTooLong(usize),
PointerNotPriorToLabel {
idx: usize,
ptr: u16,
},
MaxBufferSizeExceeded(usize),
Message(&'static str),
Msg(String),
NoError,
NotAllRecordsWritten {
count: usize,
},
RrsigsNotPresent {
name: Name,
record_type: RecordType,
},
UnknownAlgorithmTypeValue(u8),
UnknownDnsClassStr(String),
UnknownDnsClassValue(u16),
UnknownRecordTypeStr(String),
UnknownRecordTypeValue(u16),
UnrecognizedLabelCode(u8),
UnrecognizedNsec3Flags(u8),
Io(Error),
Poisoned,
Ring(Unspecified),
SSL(SslErrorStack),
Timer,
Timeout,
UrlParsing(ParseError),
Utf8(Utf8Error),
FromUtf8(FromUtf8Error),
ParseInt(ParseIntError),
}
Expand description
The error kind for errors that get returned in the crate
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
BadQueryCount(usize)
Query count is not one
Tuple Fields of BadQueryCount
0: usize
The underlying resource is too busy
This is a signal that an internal resource is too busy. The intended action should be tried again, ideally after waiting for a little while for the situation to improve. Alternatively, the action could be tried on another resource (for example, in a name server pool).
Canceled(Canceled)
An error caused by a canceled future
Tuple Fields of Canceled
0: Canceled
Character data length exceeded the limit
Overlapping labels
Fields of LabelOverlapsWithOther
DnsKeyProtocolNot3(u8)
DNS protocol version doesn’t have the expected version 3
Tuple Fields of DnsKeyProtocolNot3
0: u8
DomainNameTooLong(usize)
A domain name was too long
Tuple Fields of DomainNameTooLong
0: usize
EdnsNameNotRoot(Name)
EDNS resource record label is not the root label, although required
Tuple Fields of EdnsNameNotRoot
0: Name
Format error in Message Parsing
Fields of FormError
header: Header
Header of the bad Message
error: Box<ProtoError>
Error that occured while parsing the Message
An HMAC failed to verify
Tuple Fields of HmacInvalid
The length of rdata read was not as expected
Fields of IncorrectRDataLengthRead
LabelBytesTooLong(usize)
Label bytes exceeded the limit of 63
Tuple Fields of LabelBytesTooLong
0: usize
Label bytes exceeded the limit of 63
Fields of PointerNotPriorToLabel
MaxBufferSizeExceeded(usize)
The maximum buffer size was exceeded
Tuple Fields of MaxBufferSizeExceeded
0: usize
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
Tuple Fields of Message
0: &'static str
Msg(String)
An error with an arbitrary message, stored as String
Tuple Fields of Msg
0: String
No error was specified
Not all records were able to be written
Fields of NotAllRecordsWritten
count: usize
Number of records that were written before the error
Missing rrsigs
Fields of RrsigsNotPresent
UnknownAlgorithmTypeValue(u8)
An unknown algorithm type was found
Tuple Fields of UnknownAlgorithmTypeValue
0: u8
UnknownDnsClassStr(String)
An unknown dns class was found
Tuple Fields of UnknownDnsClassStr
0: String
UnknownDnsClassValue(u16)
An unknown dns class value was found
Tuple Fields of UnknownDnsClassValue
0: u16
UnknownRecordTypeStr(String)
An unknown record type string was found
Tuple Fields of UnknownRecordTypeStr
0: String
UnknownRecordTypeValue(u16)
An unknown record type value was found
Tuple Fields of UnknownRecordTypeValue
0: u16
UnrecognizedLabelCode(u8)
An unrecognized label code was found
Tuple Fields of UnrecognizedLabelCode
0: u8
UnrecognizedNsec3Flags(u8)
Unrecognized nsec3 flags were found
Tuple Fields of UnrecognizedNsec3Flags
0: u8
Io(Error)
An error got returned from IO
Tuple Fields of Io
0: Error
Any sync poised error
Ring(Unspecified)
A ring error
Tuple Fields of Ring
0: Unspecified
SSL(SslErrorStack)
An ssl error
Tuple Fields of SSL
A tokio timer error
A request timed out
UrlParsing(ParseError)
An url parsing error
Tuple Fields of UrlParsing
0: ParseError
Utf8(Utf8Error)
A utf8 parsing error
Tuple Fields of Utf8
0: Utf8Error
FromUtf8(FromUtf8Error)
A utf8 parsing error
Tuple Fields of FromUtf8
ParseInt(ParseIntError)
An int parsing error
Tuple Fields of ParseInt
Implementations
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::BadQueryCount
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::BadQueryCount
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::BadQueryCount
, otherwise returns back the enum in the Err
case of the result
Optionally returns references to the inner fields if this is a ProtoErrorKind::Busy
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Busy
, otherwise None
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Canceled
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Canceled
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::Canceled
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::CharacterDataTooLong
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::CharacterDataTooLong
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::CharacterDataTooLong
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::LabelOverlapsWithOther
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::LabelOverlapsWithOther
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::LabelOverlapsWithOther
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::DnsKeyProtocolNot3
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::DnsKeyProtocolNot3
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::DnsKeyProtocolNot3
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::DomainNameTooLong
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::DomainNameTooLong
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::DomainNameTooLong
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::EdnsNameNotRoot
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::EdnsNameNotRoot
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::EdnsNameNotRoot
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::FormError
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::FormError
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::FormError
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::HmacInvalid
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::HmacInvalid
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::HmacInvalid
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::IncorrectRDataLengthRead
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::IncorrectRDataLengthRead
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::IncorrectRDataLengthRead
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::LabelBytesTooLong
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::LabelBytesTooLong
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::LabelBytesTooLong
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::PointerNotPriorToLabel
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::PointerNotPriorToLabel
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::PointerNotPriorToLabel
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::MaxBufferSizeExceeded
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::MaxBufferSizeExceeded
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::MaxBufferSizeExceeded
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Message
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Message
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::Message
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Msg
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Msg
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::Msg
, otherwise returns back the enum in the Err
case of the result
Optionally returns references to the inner fields if this is a ProtoErrorKind::NoError
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::NoError
, otherwise None
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::NotAllRecordsWritten
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::NotAllRecordsWritten
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::NotAllRecordsWritten
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::RrsigsNotPresent
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::RrsigsNotPresent
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::RrsigsNotPresent
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnknownAlgorithmTypeValue
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnknownAlgorithmTypeValue
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnknownAlgorithmTypeValue
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnknownDnsClassStr
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnknownDnsClassStr
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnknownDnsClassStr
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnknownDnsClassValue
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnknownDnsClassValue
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnknownDnsClassValue
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnknownRecordTypeStr
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnknownRecordTypeStr
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnknownRecordTypeStr
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnknownRecordTypeValue
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnknownRecordTypeValue
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnknownRecordTypeValue
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnrecognizedLabelCode
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnrecognizedLabelCode
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnrecognizedLabelCode
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnrecognizedNsec3Flags
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnrecognizedNsec3Flags
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UnrecognizedNsec3Flags
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Io
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Io
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::Io
, otherwise returns back the enum in the Err
case of the result
Optionally returns references to the inner fields if this is a ProtoErrorKind::Poisoned
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Poisoned
, otherwise None
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Ring
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Ring
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::Ring
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::SSL
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::SSL
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::SSL
, otherwise returns back the enum in the Err
case of the result
Optionally returns references to the inner fields if this is a ProtoErrorKind::Timer
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Timer
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Timeout
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Timeout
, otherwise None
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UrlParsing
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::UrlParsing
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::UrlParsing
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Utf8
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::Utf8
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::Utf8
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::FromUtf8
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::FromUtf8
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::FromUtf8
, otherwise returns back the enum in the Err
case of the result
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::ParseInt
, otherwise None
Optionally returns references to the inner fields if this is a ProtoErrorKind::ParseInt
, otherwise None
Returns the inner fields if this is a ProtoErrorKind::ParseInt
, otherwise returns back the enum in the Err
case of the result
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for ProtoErrorKind
impl Send for ProtoErrorKind
impl Sync for ProtoErrorKind
impl Unpin for ProtoErrorKind
impl !UnwindSafe for ProtoErrorKind
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more