Enum trust_dns_proto::error::ProtoErrorKind[][src]

#[non_exhaustive]
pub enum ProtoErrorKind {
Show 34 variants Busy, Canceled(Canceled), CharacterDataTooLong { max: usize, len: usize, }, LabelOverlapsWithOther { label: usize, other: usize, }, DnsKeyProtocolNot3(u8), DomainNameTooLong(usize), EdnsNameNotRoot(Name), 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
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.
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

Tuple Fields of Canceled

0: Canceled
CharacterDataTooLong

Character data length exceeded the limit

Fields of CharacterDataTooLong

max: usize

Specified maximum

len: usize

Actual length

LabelOverlapsWithOther

Overlapping labels

Fields of LabelOverlapsWithOther

label: usize

Start of the label that is overlaps

other: usize

Start of the other label

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
HmacInvalid()

An HMAC failed to verify

Tuple Fields of HmacInvalid

IncorrectRDataLengthRead

The length of rdata read was not as expected

Fields of IncorrectRDataLengthRead

read: usize

The amount of read data

len: usize

The expected length of the data

LabelBytesTooLong(usize)

Label bytes exceeded the limit of 63

Tuple Fields of LabelBytesTooLong

0: usize
PointerNotPriorToLabel

Label bytes exceeded the limit of 63

Fields of PointerNotPriorToLabel

idx: usize

index of the label containing this pointer

ptr: u16

location to which the pointer is directing

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
NoError

No error was specified

NotAllRecordsWritten

Not all records were able to be written

Fields of NotAllRecordsWritten

count: usize

Number of records that were written before the error

RrsigsNotPresent

Missing rrsigs

Fields of RrsigsNotPresent

name: Name

The record set name

record_type: RecordType

The record type

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
Poisoned

Any sync poised error

A ring error

Tuple Fields of Ring

0: Unspecified

An ssl error

Tuple Fields of SSL

0: SslErrorStack
Timer

A tokio timer error

Timeout

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

0: FromUtf8Error
ParseInt(ParseIntError)

An int parsing error

Tuple Fields of ParseInt

0: ParseIntError

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. 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

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.

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