hickory_proto

Enum ProtoErrorKind

Source
#[non_exhaustive]
pub enum ProtoErrorKind {
Show 54 variants BadQueryCount(usize), Busy, Canceled(Canceled), CharacterDataTooLong { max: usize, len: usize, }, LabelOverlapsWithOther { label: usize, other: usize, }, Nsec { query: Box<Query>, proof: Proof, }, 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), MaxRecordLimitExceeded { count: usize, record_type: RecordType, }, Message(&'static str), Msg(String), NoConnections, NoError, NotAllRecordsWritten { count: usize, }, NoRecordsFound { query: Box<Query>, soa: Option<Box<Record<SOA>>>, ns: Option<Arc<[ForwardNSData]>>, negative_ttl: Option<u32>, response_code: ResponseCode, trusted: bool, authorities: Option<Arc<[Record]>>, }, UnknownAlgorithmTypeValue(u8), UnknownDnsClassStr(String), UnknownDnsClassValue(u16), UnknownRecordTypeStr(String), UnknownRecordTypeValue(u16), UnrecognizedLabelCode(u8), UnrecognizedNsec3Flags(u8), UnrecognizedCsyncFlags(u16), Io(Arc<Error>), Poisoned, RequestRefused, Ring(Unspecified), SSL(ErrorStack), Timer, Timeout, TsigWrongKey, TsigUnsupportedMacAlgorithm(TsigAlgorithm), UrlParsing(ParseError), Utf8(Utf8Error), FromUtf8(FromUtf8Error), ParseInt(ParseIntError), QuinnConnect(ConnectError), QuinnConnection(ConnectionError), QuinnWriteError(WriteError), QuinnReadError(ReadExactError), QuinnStreamError(ClosedStream), QuinnConfigError(ConfigError), QuinnTlsConfigError(NoInitialCipherSuite), QuinnUnknownStreamError, QuicMessageIdNot0(u16), RustlsError(Error), NativeCerts,
}
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

Character data length exceeded the limit

Fields

§max: usize

Specified maximum

§len: usize

Actual length

§

LabelOverlapsWithOther

Overlapping labels

Fields

§label: usize

Start of the label that is overlaps

§other: usize

Start of the other label

§

Nsec

Available on crate feature dnssec only.

No Records and there is a corresponding DNSSEC Proof for NSEC

Fields

§query: Box<Query>

Query for which the NSEC was returned

§proof: Proof

DNSSEC proof of the record

§

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

Format error in Message Parsing

Fields

§header: Header

Header of the bad Message

§error: Box<ProtoError>

Error that occured while parsing the Message

§

HmacInvalid()

An HMAC failed to verify

§

IncorrectRDataLengthRead

The length of rdata read was not as expected

Fields

§read: usize

The amount of read data

§len: usize

The expected length of the data

§

LabelBytesTooLong(usize)

Label bytes exceeded the limit of 63

§

PointerNotPriorToLabel

Label bytes exceeded the limit of 63

Fields

§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

§

MaxRecordLimitExceeded

Maximum record limit was exceeded

Fields

§count: usize

number of records

§record_type: RecordType

The record type that triggered the error.

§

Message(&'static str)

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

§

Msg(String)

An error with an arbitrary message, stored as String

§

NoConnections

No resolvers available

§

NoError

No error was specified

§

NotAllRecordsWritten

Not all records were able to be written

Fields

§count: usize

Number of records that were written before the error

§

NoRecordsFound

No records were found for a query

Fields

§query: Box<Query>

The query for which no records were found.

§soa: Option<Box<Record<SOA>>>

If an SOA is present, then this is an authoritative response or a referral to another nameserver, see the negative_type field.

§ns: Option<Arc<[ForwardNSData]>>

Nameservers may be present in addition to or in lieu of an SOA for a referral The tuple struct layout is vec[(Nameserver, [vec of glue records])]

§negative_ttl: Option<u32>

negative ttl, as determined from DnsResponse::negative_ttl this will only be present if the SOA was also present.

§response_code: ResponseCode

ResponseCode, if NXDOMAIN, the domain does not exist (and no other types). If NoError, then the domain exists but there exist either other types at the same label, or subzones of that label.

§trusted: bool

If we trust NXDOMAIN errors from this server

§authorities: Option<Arc<[Record]>>

Authority records from the query. These are important to preserve for DNSSEC validation.

§

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(Arc<Error>)

An error got returned from IO

§

Poisoned

Any sync poised error

§

RequestRefused

A request was Refused due to some access check

§

Ring(Unspecified)

A ring error

§

SSL(ErrorStack)

An ssl error

§

Timer

A tokio timer error

§

Timeout

A request timed out

§

TsigWrongKey

Tsig key verification failed

§

TsigUnsupportedMacAlgorithm(TsigAlgorithm)

Available on crate feature dnssec only.

Tsig unsupported mac algorithm Supported algorithm documented in TsigAlgorithm::supported function.

§

UrlParsing(ParseError)

An url parsing error

§

Utf8(Utf8Error)

A utf8 parsing error

§

FromUtf8(FromUtf8Error)

A utf8 parsing error

§

ParseInt(ParseIntError)

An int parsing error

§

QuinnConnect(ConnectError)

Available on crate feature dns-over-quic only.

A Quinn (Quic) connection error occurred

§

QuinnConnection(ConnectionError)

Available on crate feature dns-over-quic only.

A Quinn (QUIC) connection error occurred

§

QuinnWriteError(WriteError)

Available on crate feature dns-over-quic only.

A Quinn (QUIC) write error occurred

§

QuinnReadError(ReadExactError)

Available on crate feature dns-over-quic only.

A Quinn (QUIC) read error occurred

§

QuinnStreamError(ClosedStream)

Available on crate feature dns-over-quic only.

A Quinn (QUIC) read error occurred

§

QuinnConfigError(ConfigError)

Available on crate feature dns-over-quic only.

A Quinn (QUIC) configuration error occurred

§

QuinnTlsConfigError(NoInitialCipherSuite)

Available on crate feature dns-over-quic only.

QUIC TLS config must include an AES-128-GCM cipher suite

§

QuinnUnknownStreamError

Available on crate feature dns-over-quic only.

Unknown QUIC stream used

§

QuicMessageIdNot0(u16)

Available on crate feature dns-over-quic only.

A quic message id should always be 0

§

RustlsError(Error)

Available on crate feature rustls only.

A Rustls error occurred

§

NativeCerts

Available on crate feature native-certs only.

No valid certificates found in the native root store.

Implementations§

Source§

impl ProtoErrorKind

Source

pub fn is_bad_query_count(&self) -> bool

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

Source

pub fn as_bad_query_count_mut(&mut self) -> Option<&mut usize>

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

Source

pub fn as_bad_query_count(&self) -> Option<&usize>

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

Source

pub fn into_bad_query_count(self) -> Result<usize, Self>

Returns the inner fields if this is a ProtoErrorKind::BadQueryCount, otherwise returns back the enum in the Err case of the result

Source

pub fn is_busy(&self) -> bool

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

Source

pub fn is_canceled(&self) -> bool

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

Source

pub fn as_canceled_mut(&mut self) -> Option<&mut Canceled>

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

Source

pub fn as_canceled(&self) -> Option<&Canceled>

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

Source

pub fn into_canceled(self) -> Result<Canceled, Self>

Returns the inner fields if this is a ProtoErrorKind::Canceled, otherwise returns back the enum in the Err case of the result

Source

pub fn is_character_data_too_long(&self) -> bool

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

Source

pub fn as_character_data_too_long_mut( &mut self, ) -> Option<(&mut usize, &mut usize)>

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

Source

pub fn as_character_data_too_long(&self) -> Option<(&usize, &usize)>

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

Source

pub fn into_character_data_too_long(self) -> Result<(usize, usize), Self>

Returns the inner fields if this is a ProtoErrorKind::CharacterDataTooLong, otherwise returns back the enum in the Err case of the result

Source

pub fn is_label_overlaps_with_other(&self) -> bool

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

Source

pub fn as_label_overlaps_with_other_mut( &mut self, ) -> Option<(&mut usize, &mut usize)>

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

Source

pub fn as_label_overlaps_with_other(&self) -> Option<(&usize, &usize)>

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

Source

pub fn into_label_overlaps_with_other(self) -> Result<(usize, usize), Self>

Returns the inner fields if this is a ProtoErrorKind::LabelOverlapsWithOther, otherwise returns back the enum in the Err case of the result

Source

pub fn is_nsec(&self) -> bool

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

Source

pub fn as_nsec_mut(&mut self) -> Option<(&mut Box<Query>, &mut Proof)>

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

Source

pub fn as_nsec(&self) -> Option<(&Box<Query>, &Proof)>

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

Source

pub fn into_nsec(self) -> Result<(Box<Query>, Proof), Self>

Returns the inner fields if this is a ProtoErrorKind::Nsec, otherwise returns back the enum in the Err case of the result

Source

pub fn is_dns_key_protocol_not3(&self) -> bool

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

Source

pub fn as_dns_key_protocol_not3_mut(&mut self) -> Option<&mut u8>

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

Source

pub fn as_dns_key_protocol_not3(&self) -> Option<&u8>

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

Source

pub fn into_dns_key_protocol_not3(self) -> Result<u8, Self>

Returns the inner fields if this is a ProtoErrorKind::DnsKeyProtocolNot3, otherwise returns back the enum in the Err case of the result

Source

pub fn is_domain_name_too_long(&self) -> bool

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

Source

pub fn as_domain_name_too_long_mut(&mut self) -> Option<&mut usize>

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

Source

pub fn as_domain_name_too_long(&self) -> Option<&usize>

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

Source

pub fn into_domain_name_too_long(self) -> Result<usize, Self>

Returns the inner fields if this is a ProtoErrorKind::DomainNameTooLong, otherwise returns back the enum in the Err case of the result

Source

pub fn is_edns_name_not_root(&self) -> bool

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

Source

pub fn as_edns_name_not_root_mut(&mut self) -> Option<&mut Name>

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

Source

pub fn as_edns_name_not_root(&self) -> Option<&Name>

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

Source

pub fn into_edns_name_not_root(self) -> Result<Name, Self>

Returns the inner fields if this is a ProtoErrorKind::EdnsNameNotRoot, otherwise returns back the enum in the Err case of the result

Source

pub fn is_form_error(&self) -> bool

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

Source

pub fn as_form_error_mut( &mut self, ) -> Option<(&mut Header, &mut Box<ProtoError>)>

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

Source

pub fn as_form_error(&self) -> Option<(&Header, &Box<ProtoError>)>

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

Source

pub fn into_form_error(self) -> Result<(Header, Box<ProtoError>), Self>

Returns the inner fields if this is a ProtoErrorKind::FormError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_hmac_invalid(&self) -> bool

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

Source

pub fn as_hmac_invalid_mut(&mut self) -> Option<()>

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

Source

pub fn as_hmac_invalid(&self) -> Option<()>

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

Source

pub fn into_hmac_invalid(self) -> Result<(), Self>

Returns the inner fields if this is a ProtoErrorKind::HmacInvalid, otherwise returns back the enum in the Err case of the result

Source

pub fn is_incorrect_r_data_length_read(&self) -> bool

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

Source

pub fn as_incorrect_r_data_length_read_mut( &mut self, ) -> Option<(&mut usize, &mut usize)>

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

Source

pub fn as_incorrect_r_data_length_read(&self) -> Option<(&usize, &usize)>

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

Source

pub fn into_incorrect_r_data_length_read(self) -> Result<(usize, usize), Self>

Returns the inner fields if this is a ProtoErrorKind::IncorrectRDataLengthRead, otherwise returns back the enum in the Err case of the result

Source

pub fn is_label_bytes_too_long(&self) -> bool

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

Source

pub fn as_label_bytes_too_long_mut(&mut self) -> Option<&mut usize>

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

Source

pub fn as_label_bytes_too_long(&self) -> Option<&usize>

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

Source

pub fn into_label_bytes_too_long(self) -> Result<usize, Self>

Returns the inner fields if this is a ProtoErrorKind::LabelBytesTooLong, otherwise returns back the enum in the Err case of the result

Source

pub fn is_pointer_not_prior_to_label(&self) -> bool

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

Source

pub fn as_pointer_not_prior_to_label_mut( &mut self, ) -> Option<(&mut usize, &mut u16)>

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

Source

pub fn as_pointer_not_prior_to_label(&self) -> Option<(&usize, &u16)>

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

Source

pub fn into_pointer_not_prior_to_label(self) -> Result<(usize, u16), Self>

Returns the inner fields if this is a ProtoErrorKind::PointerNotPriorToLabel, otherwise returns back the enum in the Err case of the result

Source

pub fn is_max_buffer_size_exceeded(&self) -> bool

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

Source

pub fn as_max_buffer_size_exceeded_mut(&mut self) -> Option<&mut usize>

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

Source

pub fn as_max_buffer_size_exceeded(&self) -> Option<&usize>

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

Source

pub fn into_max_buffer_size_exceeded(self) -> Result<usize, Self>

Returns the inner fields if this is a ProtoErrorKind::MaxBufferSizeExceeded, otherwise returns back the enum in the Err case of the result

Source

pub fn is_max_record_limit_exceeded(&self) -> bool

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

Source

pub fn as_max_record_limit_exceeded_mut( &mut self, ) -> Option<(&mut usize, &mut RecordType)>

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

Source

pub fn as_max_record_limit_exceeded(&self) -> Option<(&usize, &RecordType)>

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

Source

pub fn into_max_record_limit_exceeded(self) -> Result<(usize, RecordType), Self>

Returns the inner fields if this is a ProtoErrorKind::MaxRecordLimitExceeded, otherwise returns back the enum in the Err case of the result

Source

pub fn is_message(&self) -> bool

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

Source

pub fn as_message_mut(&mut self) -> Option<&mut &'static str>

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

Source

pub fn as_message(&self) -> Option<&&'static str>

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

Source

pub fn into_message(self) -> Result<&'static str, Self>

Returns the inner fields if this is a ProtoErrorKind::Message, otherwise returns back the enum in the Err case of the result

Source

pub fn is_msg(&self) -> bool

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

Source

pub fn as_msg_mut(&mut self) -> Option<&mut String>

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

Source

pub fn as_msg(&self) -> Option<&String>

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

Source

pub fn into_msg(self) -> Result<String, Self>

Returns the inner fields if this is a ProtoErrorKind::Msg, otherwise returns back the enum in the Err case of the result

Source

pub fn is_no_connections(&self) -> bool

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

Source

pub fn is_no_error(&self) -> bool

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

Source

pub fn is_not_all_records_written(&self) -> bool

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

Source

pub fn as_not_all_records_written_mut(&mut self) -> Option<&mut usize>

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

Source

pub fn as_not_all_records_written(&self) -> Option<&usize>

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

Source

pub fn into_not_all_records_written(self) -> Result<usize, Self>

Returns the inner fields if this is a ProtoErrorKind::NotAllRecordsWritten, otherwise returns back the enum in the Err case of the result

Source

pub fn is_no_records_found(&self) -> bool

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

Source

pub fn as_no_records_found_mut( &mut self, ) -> Option<(&mut Box<Query>, &mut Option<Box<Record<SOA>>>, &mut Option<Arc<[ForwardNSData]>>, &mut Option<u32>, &mut ResponseCode, &mut bool, &mut Option<Arc<[Record]>>)>

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

Source

pub fn as_no_records_found( &self, ) -> Option<(&Box<Query>, &Option<Box<Record<SOA>>>, &Option<Arc<[ForwardNSData]>>, &Option<u32>, &ResponseCode, &bool, &Option<Arc<[Record]>>)>

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

Source

pub fn into_no_records_found( self, ) -> Result<(Box<Query>, Option<Box<Record<SOA>>>, Option<Arc<[ForwardNSData]>>, Option<u32>, ResponseCode, bool, Option<Arc<[Record]>>), Self>

Returns the inner fields if this is a ProtoErrorKind::NoRecordsFound, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unknown_algorithm_type_value(&self) -> bool

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

Source

pub fn as_unknown_algorithm_type_value_mut(&mut self) -> Option<&mut u8>

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

Source

pub fn as_unknown_algorithm_type_value(&self) -> Option<&u8>

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

Source

pub fn into_unknown_algorithm_type_value(self) -> Result<u8, Self>

Returns the inner fields if this is a ProtoErrorKind::UnknownAlgorithmTypeValue, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unknown_dns_class_str(&self) -> bool

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

Source

pub fn as_unknown_dns_class_str_mut(&mut self) -> Option<&mut String>

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

Source

pub fn as_unknown_dns_class_str(&self) -> Option<&String>

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

Source

pub fn into_unknown_dns_class_str(self) -> Result<String, Self>

Returns the inner fields if this is a ProtoErrorKind::UnknownDnsClassStr, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unknown_dns_class_value(&self) -> bool

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

Source

pub fn as_unknown_dns_class_value_mut(&mut self) -> Option<&mut u16>

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

Source

pub fn as_unknown_dns_class_value(&self) -> Option<&u16>

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

Source

pub fn into_unknown_dns_class_value(self) -> Result<u16, Self>

Returns the inner fields if this is a ProtoErrorKind::UnknownDnsClassValue, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unknown_record_type_str(&self) -> bool

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

Source

pub fn as_unknown_record_type_str_mut(&mut self) -> Option<&mut String>

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

Source

pub fn as_unknown_record_type_str(&self) -> Option<&String>

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

Source

pub fn into_unknown_record_type_str(self) -> Result<String, Self>

Returns the inner fields if this is a ProtoErrorKind::UnknownRecordTypeStr, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unknown_record_type_value(&self) -> bool

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

Source

pub fn as_unknown_record_type_value_mut(&mut self) -> Option<&mut u16>

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

Source

pub fn as_unknown_record_type_value(&self) -> Option<&u16>

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

Source

pub fn into_unknown_record_type_value(self) -> Result<u16, Self>

Returns the inner fields if this is a ProtoErrorKind::UnknownRecordTypeValue, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unrecognized_label_code(&self) -> bool

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

Source

pub fn as_unrecognized_label_code_mut(&mut self) -> Option<&mut u8>

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

Source

pub fn as_unrecognized_label_code(&self) -> Option<&u8>

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

Source

pub fn into_unrecognized_label_code(self) -> Result<u8, Self>

Returns the inner fields if this is a ProtoErrorKind::UnrecognizedLabelCode, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unrecognized_nsec3_flags(&self) -> bool

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

Source

pub fn as_unrecognized_nsec3_flags_mut(&mut self) -> Option<&mut u8>

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

Source

pub fn as_unrecognized_nsec3_flags(&self) -> Option<&u8>

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

Source

pub fn into_unrecognized_nsec3_flags(self) -> Result<u8, Self>

Returns the inner fields if this is a ProtoErrorKind::UnrecognizedNsec3Flags, otherwise returns back the enum in the Err case of the result

Source

pub fn is_unrecognized_csync_flags(&self) -> bool

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

Source

pub fn as_unrecognized_csync_flags_mut(&mut self) -> Option<&mut u16>

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

Source

pub fn as_unrecognized_csync_flags(&self) -> Option<&u16>

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

Source

pub fn into_unrecognized_csync_flags(self) -> Result<u16, Self>

Returns the inner fields if this is a ProtoErrorKind::UnrecognizedCsyncFlags, otherwise returns back the enum in the Err case of the result

Source

pub fn is_io(&self) -> bool

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

Source

pub fn as_io_mut(&mut self) -> Option<&mut Arc<Error>>

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

Source

pub fn as_io(&self) -> Option<&Arc<Error>>

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

Source

pub fn into_io(self) -> Result<Arc<Error>, Self>

Returns the inner fields if this is a ProtoErrorKind::Io, otherwise returns back the enum in the Err case of the result

Source

pub fn is_poisoned(&self) -> bool

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

Source

pub fn is_request_refused(&self) -> bool

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

Source

pub fn is_ring(&self) -> bool

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

Source

pub fn as_ring_mut(&mut self) -> Option<&mut Unspecified>

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

Source

pub fn as_ring(&self) -> Option<&Unspecified>

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

Source

pub fn into_ring(self) -> Result<Unspecified, Self>

Returns the inner fields if this is a ProtoErrorKind::Ring, otherwise returns back the enum in the Err case of the result

Source

pub fn is_ssl(&self) -> bool

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

Source

pub fn as_ssl_mut(&mut self) -> Option<&mut SslErrorStack>

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

Source

pub fn as_ssl(&self) -> Option<&SslErrorStack>

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

Source

pub fn into_ssl(self) -> Result<SslErrorStack, Self>

Returns the inner fields if this is a ProtoErrorKind::SSL, otherwise returns back the enum in the Err case of the result

Source

pub fn is_timer(&self) -> bool

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

Source

pub fn is_timeout(&self) -> bool

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

Source

pub fn is_tsig_wrong_key(&self) -> bool

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

Source

pub fn is_tsig_unsupported_mac_algorithm(&self) -> bool

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

Source

pub fn as_tsig_unsupported_mac_algorithm_mut( &mut self, ) -> Option<&mut TsigAlgorithm>

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

Source

pub fn as_tsig_unsupported_mac_algorithm(&self) -> Option<&TsigAlgorithm>

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

Source

pub fn into_tsig_unsupported_mac_algorithm(self) -> Result<TsigAlgorithm, Self>

Returns the inner fields if this is a ProtoErrorKind::TsigUnsupportedMacAlgorithm, otherwise returns back the enum in the Err case of the result

Source

pub fn is_url_parsing(&self) -> bool

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

Source

pub fn as_url_parsing_mut(&mut self) -> Option<&mut ParseError>

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

Source

pub fn as_url_parsing(&self) -> Option<&ParseError>

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

Source

pub fn into_url_parsing(self) -> Result<ParseError, Self>

Returns the inner fields if this is a ProtoErrorKind::UrlParsing, otherwise returns back the enum in the Err case of the result

Source

pub fn is_utf8(&self) -> bool

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

Source

pub fn as_utf8_mut(&mut self) -> Option<&mut Utf8Error>

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

Source

pub fn as_utf8(&self) -> Option<&Utf8Error>

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

Source

pub fn into_utf8(self) -> Result<Utf8Error, Self>

Returns the inner fields if this is a ProtoErrorKind::Utf8, otherwise returns back the enum in the Err case of the result

Source

pub fn is_from_utf8(&self) -> bool

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

Source

pub fn as_from_utf8_mut(&mut self) -> Option<&mut FromUtf8Error>

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

Source

pub fn as_from_utf8(&self) -> Option<&FromUtf8Error>

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

Source

pub fn into_from_utf8(self) -> Result<FromUtf8Error, Self>

Returns the inner fields if this is a ProtoErrorKind::FromUtf8, otherwise returns back the enum in the Err case of the result

Source

pub fn is_parse_int(&self) -> bool

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

Source

pub fn as_parse_int_mut(&mut self) -> Option<&mut ParseIntError>

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

Source

pub fn as_parse_int(&self) -> Option<&ParseIntError>

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

Source

pub fn into_parse_int(self) -> Result<ParseIntError, Self>

Returns the inner fields if this is a ProtoErrorKind::ParseInt, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_connect(&self) -> bool

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

Source

pub fn as_quinn_connect_mut(&mut self) -> Option<&mut ConnectError>

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

Source

pub fn as_quinn_connect(&self) -> Option<&ConnectError>

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

Source

pub fn into_quinn_connect(self) -> Result<ConnectError, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnConnect, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_connection(&self) -> bool

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

Source

pub fn as_quinn_connection_mut(&mut self) -> Option<&mut ConnectionError>

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

Source

pub fn as_quinn_connection(&self) -> Option<&ConnectionError>

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

Source

pub fn into_quinn_connection(self) -> Result<ConnectionError, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnConnection, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_write_error(&self) -> bool

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

Source

pub fn as_quinn_write_error_mut(&mut self) -> Option<&mut WriteError>

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

Source

pub fn as_quinn_write_error(&self) -> Option<&WriteError>

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

Source

pub fn into_quinn_write_error(self) -> Result<WriteError, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnWriteError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_read_error(&self) -> bool

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

Source

pub fn as_quinn_read_error_mut(&mut self) -> Option<&mut ReadExactError>

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

Source

pub fn as_quinn_read_error(&self) -> Option<&ReadExactError>

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

Source

pub fn into_quinn_read_error(self) -> Result<ReadExactError, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnReadError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_stream_error(&self) -> bool

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

Source

pub fn as_quinn_stream_error_mut(&mut self) -> Option<&mut ClosedStream>

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

Source

pub fn as_quinn_stream_error(&self) -> Option<&ClosedStream>

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

Source

pub fn into_quinn_stream_error(self) -> Result<ClosedStream, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnStreamError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_config_error(&self) -> bool

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

Source

pub fn as_quinn_config_error_mut(&mut self) -> Option<&mut ConfigError>

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

Source

pub fn as_quinn_config_error(&self) -> Option<&ConfigError>

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

Source

pub fn into_quinn_config_error(self) -> Result<ConfigError, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnConfigError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_tls_config_error(&self) -> bool

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

Source

pub fn as_quinn_tls_config_error_mut( &mut self, ) -> Option<&mut NoInitialCipherSuite>

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

Source

pub fn as_quinn_tls_config_error(&self) -> Option<&NoInitialCipherSuite>

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

Source

pub fn into_quinn_tls_config_error(self) -> Result<NoInitialCipherSuite, Self>

Returns the inner fields if this is a ProtoErrorKind::QuinnTlsConfigError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_quinn_unknown_stream_error(&self) -> bool

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

Source

pub fn is_quic_message_id_not0(&self) -> bool

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

Source

pub fn as_quic_message_id_not0_mut(&mut self) -> Option<&mut u16>

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

Source

pub fn as_quic_message_id_not0(&self) -> Option<&u16>

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

Source

pub fn into_quic_message_id_not0(self) -> Result<u16, Self>

Returns the inner fields if this is a ProtoErrorKind::QuicMessageIdNot0, otherwise returns back the enum in the Err case of the result

Source

pub fn is_rustls_error(&self) -> bool

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

Source

pub fn as_rustls_error_mut(&mut self) -> Option<&mut Error>

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

Source

pub fn as_rustls_error(&self) -> Option<&Error>

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

Source

pub fn into_rustls_error(self) -> Result<Error, Self>

Returns the inner fields if this is a ProtoErrorKind::RustlsError, otherwise returns back the enum in the Err case of the result

Source

pub fn is_native_certs(&self) -> bool

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

Trait Implementations§

Source§

impl Clone for ProtoErrorKind

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProtoErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ProtoErrorKind

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ProtoErrorKind

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ClosedStream> for ProtoErrorKind

Source§

fn from(source: ClosedStream) -> Self

Converts to this type from the input type.
Source§

impl From<ConfigError> for ProtoErrorKind

Source§

fn from(source: ConfigError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectError> for ProtoErrorKind

Source§

fn from(source: ConnectError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for ProtoErrorKind

Source§

fn from(source: ConnectionError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ProtoErrorKind

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ProtoErrorKind

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorStack> for ProtoErrorKind

Source§

fn from(source: SslErrorStack) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for ProtoErrorKind

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<NoInitialCipherSuite> for ProtoErrorKind

Source§

fn from(source: NoInitialCipherSuite) -> Self

Converts to this type from the input type.
Source§

impl From<ParseError> for ProtoErrorKind

Source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for ProtoErrorKind

Source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.
Source§

impl From<ReadExactError> for ProtoErrorKind

Source§

fn from(source: ReadExactError) -> Self

Converts to this type from the input type.
Source§

impl From<Unspecified> for ProtoErrorKind

Source§

fn from(source: Unspecified) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for ProtoErrorKind

Source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<WriteError> for ProtoErrorKind

Source§

fn from(source: WriteError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T