#[non_exhaustive]
pub enum ProtoErrorKind {
Show 37 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), UnrecognizedCsyncFlags(u16), 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
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.
§

BadQueryCount(usize)

Query count is not one

§

Busy

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

§

CharacterDataTooLong

Fields

§max: usize

Specified maximum

§len: usize

Actual length

Character data length exceeded the limit

§

LabelOverlapsWithOther

Fields

§label: usize

Start of the label that is overlaps

§other: usize

Start of the other label

Overlapping labels

§

DnsKeyProtocolNot3(u8)

DNS protocol version doesn’t have the expected version 3

§

DomainNameTooLong(usize)

A domain name was too long

§

EdnsNameNotRoot(Name)

EDNS resource record label is not the root label, although required

§

FormError

Fields

§header: Header

Header of the bad Message

§error: Box<ProtoError>

Error that occured while parsing the Message

Format error in Message Parsing

§

HmacInvalid()

An HMAC failed to verify

§

IncorrectRDataLengthRead

Fields

§read: usize

The amount of read data

§len: usize

The expected length of the data

The length of rdata read was not as expected

§

LabelBytesTooLong(usize)

Label bytes exceeded the limit of 63

§

PointerNotPriorToLabel

Fields

§idx: usize

index of the label containing this pointer

§ptr: u16

location to which the pointer is directing

Label bytes exceeded the limit of 63

§

MaxBufferSizeExceeded(usize)

The maximum buffer size was exceeded

§

Message(&'static str)

An error with an arbitrary message, referenced as &’static str

§

Msg(String)

An error with an arbitrary message, stored as String

§

NoError

No error was specified

§

NotAllRecordsWritten

Fields

§count: usize

Number of records that were written before the error

Not all records were able to be written

§

RrsigsNotPresent

Fields

§name: Name

The record set name

§record_type: RecordType

The record type

Missing rrsigs

§

UnknownAlgorithmTypeValue(u8)

An unknown algorithm type was found

§

UnknownDnsClassStr(String)

An unknown dns class was found

§

UnknownDnsClassValue(u16)

An unknown dns class value was found

§

UnknownRecordTypeStr(String)

An unknown record type string was found

§

UnknownRecordTypeValue(u16)

An unknown record type value was found

§

UnrecognizedLabelCode(u8)

An unrecognized label code was found

§

UnrecognizedNsec3Flags(u8)

Unrecognized nsec3 flags were found

§

UnrecognizedCsyncFlags(u16)

Unrecognized csync flags were found

§

Io(Error)

An error got returned from IO

§

Poisoned

Any sync poised error

§

Ring(Unspecified)

A ring error

§

SSL(SslErrorStack)

An ssl error

§

Timer

A tokio timer error

§

Timeout

A request timed out

§

UrlParsing(ParseError)

An url parsing error

§

Utf8(Utf8Error)

A utf8 parsing error

§

FromUtf8(FromUtf8Error)

A utf8 parsing error

§

ParseInt(ParseIntError)

An int parsing error

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

Returns true if this is a ProtoErrorKind::Busy, otherwise false

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

Returns true if this is a ProtoErrorKind::NoError, otherwise false

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::UnrecognizedCsyncFlags, otherwise None

Optionally returns references to the inner fields if this is a ProtoErrorKind::UnrecognizedCsyncFlags, otherwise None

Returns the inner fields if this is a ProtoErrorKind::UnrecognizedCsyncFlags, 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

Returns true if this is a ProtoErrorKind::Poisoned, otherwise false

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

Returns true if this is a ProtoErrorKind::Timer, otherwise false

Returns true if this is a ProtoErrorKind::Timeout, otherwise false

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.