Enum ProtoErrorKind
#[non_exhaustive]pub enum ProtoErrorKind {
Show 39 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>,
},
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),
UnknownDigestTypeValue(u8),
UnknownDnsClassStr(String),
UnknownDnsClassValue(u16),
UnknownRecordTypeStr(String),
UnknownRecordTypeValue(u16),
UnrecognizedLabelCode(u8),
UnrecognizedNsec3Flags(u8),
UnrecognizedCsyncFlags(u16),
Io(Arc<Error>),
Poisoned,
RequestRefused,
Timer,
Timeout,
UrlParsing(ParseError),
Utf8(Utf8Error),
FromUtf8(FromUtf8Error),
ParseInt(ParseIntError),
QueryCaseMismatch,
}
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
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
LabelOverlapsWithOther
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
Format error in Message Parsing
Fields
error: Box<ProtoError>
Error that occurred while parsing the Message
IncorrectRDataLengthRead
The length of rdata read was not as expected
LabelBytesTooLong(usize)
Label bytes exceeded the limit of 63
PointerNotPriorToLabel
Label bytes exceeded the limit of 63
Fields
MaxBufferSizeExceeded(usize)
The maximum buffer size was exceeded
MaxRecordLimitExceeded
Maximum record limit was exceeded
Fields
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
NoRecordsFound
No records were found for a query
Fields
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.
Authority records from the query. These are important to preserve for DNSSEC validation.
UnknownAlgorithmTypeValue(u8)
An unknown algorithm type was found
UnknownDigestTypeValue(u8)
An unknown digest 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
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
QueryCaseMismatch
Case randomization is enabled, and a server did not echo a query name back with the same case.
Implementations§
§impl ProtoErrorKind
impl ProtoErrorKind
pub fn is_bad_query_count(&self) -> bool
pub fn is_bad_query_count(&self) -> bool
Returns true if this is a ProtoErrorKind::BadQueryCount
, otherwise false
pub fn as_bad_query_count_mut(&mut self) -> Option<&mut usize>
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
pub fn as_bad_query_count(&self) -> Option<&usize>
pub fn as_bad_query_count(&self) -> Option<&usize>
Optionally returns references to the inner fields if this is a ProtoErrorKind::BadQueryCount
, otherwise None
pub fn into_bad_query_count(self) -> Result<usize, ProtoErrorKind>
pub fn into_bad_query_count(self) -> Result<usize, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::BadQueryCount
, otherwise returns back the enum in the Err
case of the result
pub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
Returns true if this is a ProtoErrorKind::Canceled
, otherwise false
pub fn as_canceled_mut(&mut self) -> Option<&mut Canceled>
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
pub fn as_canceled(&self) -> Option<&Canceled>
pub fn as_canceled(&self) -> Option<&Canceled>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Canceled
, otherwise None
pub fn into_canceled(self) -> Result<Canceled, ProtoErrorKind>
pub fn into_canceled(self) -> Result<Canceled, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::Canceled
, otherwise returns back the enum in the Err
case of the result
pub fn is_character_data_too_long(&self) -> bool
pub fn is_character_data_too_long(&self) -> bool
Returns true if this is a ProtoErrorKind::CharacterDataTooLong
, otherwise false
pub fn as_character_data_too_long_mut(
&mut self,
) -> Option<(&mut usize, &mut usize)>
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
pub fn as_character_data_too_long(&self) -> Option<(&usize, &usize)>
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
pub fn into_character_data_too_long(
self,
) -> Result<(usize, usize), ProtoErrorKind>
pub fn into_character_data_too_long( self, ) -> Result<(usize, usize), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::CharacterDataTooLong
, otherwise returns back the enum in the Err
case of the result
pub fn is_label_overlaps_with_other(&self) -> bool
pub fn is_label_overlaps_with_other(&self) -> bool
Returns true if this is a ProtoErrorKind::LabelOverlapsWithOther
, otherwise false
pub fn as_label_overlaps_with_other_mut(
&mut self,
) -> Option<(&mut usize, &mut usize)>
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
pub fn as_label_overlaps_with_other(&self) -> Option<(&usize, &usize)>
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
pub fn into_label_overlaps_with_other(
self,
) -> Result<(usize, usize), ProtoErrorKind>
pub fn into_label_overlaps_with_other( self, ) -> Result<(usize, usize), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::LabelOverlapsWithOther
, otherwise returns back the enum in the Err
case of the result
pub fn is_dns_key_protocol_not3(&self) -> bool
pub fn is_dns_key_protocol_not3(&self) -> bool
Returns true if this is a ProtoErrorKind::DnsKeyProtocolNot3
, otherwise false
pub fn as_dns_key_protocol_not3_mut(&mut self) -> Option<&mut u8>
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
pub fn as_dns_key_protocol_not3(&self) -> Option<&u8>
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
pub fn into_dns_key_protocol_not3(self) -> Result<u8, ProtoErrorKind>
pub fn into_dns_key_protocol_not3(self) -> Result<u8, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::DnsKeyProtocolNot3
, otherwise returns back the enum in the Err
case of the result
pub fn is_domain_name_too_long(&self) -> bool
pub fn is_domain_name_too_long(&self) -> bool
Returns true if this is a ProtoErrorKind::DomainNameTooLong
, otherwise false
pub fn as_domain_name_too_long_mut(&mut self) -> Option<&mut usize>
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
pub fn as_domain_name_too_long(&self) -> Option<&usize>
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
pub fn into_domain_name_too_long(self) -> Result<usize, ProtoErrorKind>
pub fn into_domain_name_too_long(self) -> Result<usize, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::DomainNameTooLong
, otherwise returns back the enum in the Err
case of the result
pub fn is_edns_name_not_root(&self) -> bool
pub fn is_edns_name_not_root(&self) -> bool
Returns true if this is a ProtoErrorKind::EdnsNameNotRoot
, otherwise false
pub fn as_edns_name_not_root_mut(&mut self) -> Option<&mut Name>
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
pub fn as_edns_name_not_root(&self) -> Option<&Name>
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
pub fn into_edns_name_not_root(self) -> Result<Name, ProtoErrorKind>
pub fn into_edns_name_not_root(self) -> Result<Name, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::EdnsNameNotRoot
, otherwise returns back the enum in the Err
case of the result
pub fn is_form_error(&self) -> bool
pub fn is_form_error(&self) -> bool
Returns true if this is a ProtoErrorKind::FormError
, otherwise false
pub fn as_form_error_mut(
&mut self,
) -> Option<(&mut Header, &mut Box<ProtoError>)>
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
pub fn as_form_error(&self) -> Option<(&Header, &Box<ProtoError>)>
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
pub fn into_form_error(
self,
) -> Result<(Header, Box<ProtoError>), ProtoErrorKind>
pub fn into_form_error( self, ) -> Result<(Header, Box<ProtoError>), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::FormError
, otherwise returns back the enum in the Err
case of the result
pub fn is_incorrect_r_data_length_read(&self) -> bool
pub fn is_incorrect_r_data_length_read(&self) -> bool
Returns true if this is a ProtoErrorKind::IncorrectRDataLengthRead
, otherwise false
pub fn as_incorrect_r_data_length_read_mut(
&mut self,
) -> Option<(&mut usize, &mut usize)>
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
pub fn as_incorrect_r_data_length_read(&self) -> Option<(&usize, &usize)>
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
pub fn into_incorrect_r_data_length_read(
self,
) -> Result<(usize, usize), ProtoErrorKind>
pub fn into_incorrect_r_data_length_read( self, ) -> Result<(usize, usize), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::IncorrectRDataLengthRead
, otherwise returns back the enum in the Err
case of the result
pub fn is_label_bytes_too_long(&self) -> bool
pub fn is_label_bytes_too_long(&self) -> bool
Returns true if this is a ProtoErrorKind::LabelBytesTooLong
, otherwise false
pub fn as_label_bytes_too_long_mut(&mut self) -> Option<&mut usize>
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
pub fn as_label_bytes_too_long(&self) -> Option<&usize>
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
pub fn into_label_bytes_too_long(self) -> Result<usize, ProtoErrorKind>
pub fn into_label_bytes_too_long(self) -> Result<usize, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::LabelBytesTooLong
, otherwise returns back the enum in the Err
case of the result
pub fn is_pointer_not_prior_to_label(&self) -> bool
pub fn is_pointer_not_prior_to_label(&self) -> bool
Returns true if this is a ProtoErrorKind::PointerNotPriorToLabel
, otherwise false
pub fn as_pointer_not_prior_to_label_mut(
&mut self,
) -> Option<(&mut usize, &mut u16)>
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
pub fn as_pointer_not_prior_to_label(&self) -> Option<(&usize, &u16)>
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
pub fn into_pointer_not_prior_to_label(
self,
) -> Result<(usize, u16), ProtoErrorKind>
pub fn into_pointer_not_prior_to_label( self, ) -> Result<(usize, u16), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::PointerNotPriorToLabel
, otherwise returns back the enum in the Err
case of the result
pub fn is_max_buffer_size_exceeded(&self) -> bool
pub fn is_max_buffer_size_exceeded(&self) -> bool
Returns true if this is a ProtoErrorKind::MaxBufferSizeExceeded
, otherwise false
pub fn as_max_buffer_size_exceeded_mut(&mut self) -> Option<&mut usize>
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
pub fn as_max_buffer_size_exceeded(&self) -> Option<&usize>
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
pub fn into_max_buffer_size_exceeded(self) -> Result<usize, ProtoErrorKind>
pub fn into_max_buffer_size_exceeded(self) -> Result<usize, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::MaxBufferSizeExceeded
, otherwise returns back the enum in the Err
case of the result
pub fn is_max_record_limit_exceeded(&self) -> bool
pub fn is_max_record_limit_exceeded(&self) -> bool
Returns true if this is a ProtoErrorKind::MaxRecordLimitExceeded
, otherwise false
pub fn as_max_record_limit_exceeded_mut(
&mut self,
) -> Option<(&mut usize, &mut RecordType)>
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
pub fn as_max_record_limit_exceeded(&self) -> Option<(&usize, &RecordType)>
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
pub fn into_max_record_limit_exceeded(
self,
) -> Result<(usize, RecordType), ProtoErrorKind>
pub fn into_max_record_limit_exceeded( self, ) -> Result<(usize, RecordType), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::MaxRecordLimitExceeded
, otherwise returns back the enum in the Err
case of the result
pub fn is_message(&self) -> bool
pub fn is_message(&self) -> bool
Returns true if this is a ProtoErrorKind::Message
, otherwise false
pub fn as_message_mut(&mut self) -> Option<&mut &'static str>
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
pub fn as_message(&self) -> Option<&&'static str>
pub fn as_message(&self) -> Option<&&'static str>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Message
, otherwise None
pub fn into_message(self) -> Result<&'static str, ProtoErrorKind>
pub fn into_message(self) -> Result<&'static str, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::Message
, otherwise returns back the enum in the Err
case of the result
pub fn as_msg_mut(&mut self) -> Option<&mut String>
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
pub fn as_msg(&self) -> Option<&String>
pub fn as_msg(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Msg
, otherwise None
pub fn into_msg(self) -> Result<String, ProtoErrorKind>
pub fn into_msg(self) -> Result<String, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::Msg
, otherwise returns back the enum in the Err
case of the result
pub fn is_no_connections(&self) -> bool
pub fn is_no_connections(&self) -> bool
Returns true if this is a ProtoErrorKind::NoConnections
, otherwise false
pub fn is_no_error(&self) -> bool
pub fn is_no_error(&self) -> bool
Returns true if this is a ProtoErrorKind::NoError
, otherwise false
pub fn is_not_all_records_written(&self) -> bool
pub fn is_not_all_records_written(&self) -> bool
Returns true if this is a ProtoErrorKind::NotAllRecordsWritten
, otherwise false
pub fn as_not_all_records_written_mut(&mut self) -> Option<&mut usize>
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
pub fn as_not_all_records_written(&self) -> Option<&usize>
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
pub fn into_not_all_records_written(self) -> Result<usize, ProtoErrorKind>
pub fn into_not_all_records_written(self) -> Result<usize, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::NotAllRecordsWritten
, otherwise returns back the enum in the Err
case of the result
pub fn is_no_records_found(&self) -> bool
pub fn is_no_records_found(&self) -> bool
Returns true if this is a ProtoErrorKind::NoRecordsFound
, otherwise false
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]>>)>
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
pub fn as_no_records_found(
&self,
) -> Option<(&Box<Query>, &Option<Box<Record<SOA>>>, &Option<Arc<[ForwardNSData]>>, &Option<u32>, &ResponseCode, &bool, &Option<Arc<[Record]>>)>
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
pub fn into_no_records_found(
self,
) -> Result<(Box<Query>, Option<Box<Record<SOA>>>, Option<Arc<[ForwardNSData]>>, Option<u32>, ResponseCode, bool, Option<Arc<[Record]>>), ProtoErrorKind>
pub fn into_no_records_found( self, ) -> Result<(Box<Query>, Option<Box<Record<SOA>>>, Option<Arc<[ForwardNSData]>>, Option<u32>, ResponseCode, bool, Option<Arc<[Record]>>), ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::NoRecordsFound
, otherwise returns back the enum in the Err
case of the result
pub fn is_unknown_algorithm_type_value(&self) -> bool
pub fn is_unknown_algorithm_type_value(&self) -> bool
Returns true if this is a ProtoErrorKind::UnknownAlgorithmTypeValue
, otherwise false
pub fn as_unknown_algorithm_type_value_mut(&mut self) -> Option<&mut u8>
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
pub fn as_unknown_algorithm_type_value(&self) -> Option<&u8>
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
pub fn into_unknown_algorithm_type_value(self) -> Result<u8, ProtoErrorKind>
pub fn into_unknown_algorithm_type_value(self) -> Result<u8, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnknownAlgorithmTypeValue
, otherwise returns back the enum in the Err
case of the result
pub fn is_unknown_digest_type_value(&self) -> bool
pub fn is_unknown_digest_type_value(&self) -> bool
Returns true if this is a ProtoErrorKind::UnknownDigestTypeValue
, otherwise false
pub fn as_unknown_digest_type_value_mut(&mut self) -> Option<&mut u8>
pub fn as_unknown_digest_type_value_mut(&mut self) -> Option<&mut u8>
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::UnknownDigestTypeValue
, otherwise None
pub fn as_unknown_digest_type_value(&self) -> Option<&u8>
pub fn as_unknown_digest_type_value(&self) -> Option<&u8>
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnknownDigestTypeValue
, otherwise None
pub fn into_unknown_digest_type_value(self) -> Result<u8, ProtoErrorKind>
pub fn into_unknown_digest_type_value(self) -> Result<u8, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnknownDigestTypeValue
, otherwise returns back the enum in the Err
case of the result
pub fn is_unknown_dns_class_str(&self) -> bool
pub fn is_unknown_dns_class_str(&self) -> bool
Returns true if this is a ProtoErrorKind::UnknownDnsClassStr
, otherwise false
pub fn as_unknown_dns_class_str_mut(&mut self) -> Option<&mut String>
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
pub fn as_unknown_dns_class_str(&self) -> Option<&String>
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
pub fn into_unknown_dns_class_str(self) -> Result<String, ProtoErrorKind>
pub fn into_unknown_dns_class_str(self) -> Result<String, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnknownDnsClassStr
, otherwise returns back the enum in the Err
case of the result
pub fn is_unknown_dns_class_value(&self) -> bool
pub fn is_unknown_dns_class_value(&self) -> bool
Returns true if this is a ProtoErrorKind::UnknownDnsClassValue
, otherwise false
pub fn as_unknown_dns_class_value_mut(&mut self) -> Option<&mut u16>
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
pub fn as_unknown_dns_class_value(&self) -> Option<&u16>
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
pub fn into_unknown_dns_class_value(self) -> Result<u16, ProtoErrorKind>
pub fn into_unknown_dns_class_value(self) -> Result<u16, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnknownDnsClassValue
, otherwise returns back the enum in the Err
case of the result
pub fn is_unknown_record_type_str(&self) -> bool
pub fn is_unknown_record_type_str(&self) -> bool
Returns true if this is a ProtoErrorKind::UnknownRecordTypeStr
, otherwise false
pub fn as_unknown_record_type_str_mut(&mut self) -> Option<&mut String>
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
pub fn as_unknown_record_type_str(&self) -> Option<&String>
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
pub fn into_unknown_record_type_str(self) -> Result<String, ProtoErrorKind>
pub fn into_unknown_record_type_str(self) -> Result<String, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnknownRecordTypeStr
, otherwise returns back the enum in the Err
case of the result
pub fn is_unknown_record_type_value(&self) -> bool
pub fn is_unknown_record_type_value(&self) -> bool
Returns true if this is a ProtoErrorKind::UnknownRecordTypeValue
, otherwise false
pub fn as_unknown_record_type_value_mut(&mut self) -> Option<&mut u16>
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
pub fn as_unknown_record_type_value(&self) -> Option<&u16>
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
pub fn into_unknown_record_type_value(self) -> Result<u16, ProtoErrorKind>
pub fn into_unknown_record_type_value(self) -> Result<u16, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnknownRecordTypeValue
, otherwise returns back the enum in the Err
case of the result
pub fn is_unrecognized_label_code(&self) -> bool
pub fn is_unrecognized_label_code(&self) -> bool
Returns true if this is a ProtoErrorKind::UnrecognizedLabelCode
, otherwise false
pub fn as_unrecognized_label_code_mut(&mut self) -> Option<&mut u8>
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
pub fn as_unrecognized_label_code(&self) -> Option<&u8>
pub fn as_unrecognized_label_code(&self) -> Option<&u8>
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnrecognizedLabelCode
, otherwise None
pub fn into_unrecognized_label_code(self) -> Result<u8, ProtoErrorKind>
pub fn into_unrecognized_label_code(self) -> Result<u8, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnrecognizedLabelCode
, otherwise returns back the enum in the Err
case of the result
pub fn is_unrecognized_nsec3_flags(&self) -> bool
pub fn is_unrecognized_nsec3_flags(&self) -> bool
Returns true if this is a ProtoErrorKind::UnrecognizedNsec3Flags
, otherwise false
pub fn as_unrecognized_nsec3_flags_mut(&mut self) -> Option<&mut u8>
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
pub fn as_unrecognized_nsec3_flags(&self) -> Option<&u8>
pub fn as_unrecognized_nsec3_flags(&self) -> Option<&u8>
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnrecognizedNsec3Flags
, otherwise None
pub fn into_unrecognized_nsec3_flags(self) -> Result<u8, ProtoErrorKind>
pub fn into_unrecognized_nsec3_flags(self) -> Result<u8, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnrecognizedNsec3Flags
, otherwise returns back the enum in the Err
case of the result
pub fn is_unrecognized_csync_flags(&self) -> bool
pub fn is_unrecognized_csync_flags(&self) -> bool
Returns true if this is a ProtoErrorKind::UnrecognizedCsyncFlags
, otherwise false
pub fn as_unrecognized_csync_flags_mut(&mut self) -> Option<&mut u16>
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
pub fn as_unrecognized_csync_flags(&self) -> Option<&u16>
pub fn as_unrecognized_csync_flags(&self) -> Option<&u16>
Optionally returns references to the inner fields if this is a ProtoErrorKind::UnrecognizedCsyncFlags
, otherwise None
pub fn into_unrecognized_csync_flags(self) -> Result<u16, ProtoErrorKind>
pub fn into_unrecognized_csync_flags(self) -> Result<u16, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UnrecognizedCsyncFlags
, otherwise returns back the enum in the Err
case of the result
pub fn as_io_mut(&mut self) -> Option<&mut Arc<Error>>
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
pub fn as_io(&self) -> Option<&Arc<Error>>
pub fn as_io(&self) -> Option<&Arc<Error>>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Io
, otherwise None
pub fn into_io(self) -> Result<Arc<Error>, ProtoErrorKind>
pub fn into_io(self) -> Result<Arc<Error>, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::Io
, otherwise returns back the enum in the Err
case of the result
pub fn is_poisoned(&self) -> bool
pub fn is_poisoned(&self) -> bool
Returns true if this is a ProtoErrorKind::Poisoned
, otherwise false
pub fn is_request_refused(&self) -> bool
pub fn is_request_refused(&self) -> bool
Returns true if this is a ProtoErrorKind::RequestRefused
, otherwise false
pub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true if this is a ProtoErrorKind::Timeout
, otherwise false
pub fn is_url_parsing(&self) -> bool
pub fn is_url_parsing(&self) -> bool
Returns true if this is a ProtoErrorKind::UrlParsing
, otherwise false
pub fn as_url_parsing_mut(&mut self) -> Option<&mut ParseError>
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
pub fn as_url_parsing(&self) -> Option<&ParseError>
pub fn as_url_parsing(&self) -> Option<&ParseError>
Optionally returns references to the inner fields if this is a ProtoErrorKind::UrlParsing
, otherwise None
pub fn into_url_parsing(self) -> Result<ParseError, ProtoErrorKind>
pub fn into_url_parsing(self) -> Result<ParseError, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::UrlParsing
, otherwise returns back the enum in the Err
case of the result
pub fn as_utf8_mut(&mut self) -> Option<&mut Utf8Error>
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
pub fn as_utf8(&self) -> Option<&Utf8Error>
pub fn as_utf8(&self) -> Option<&Utf8Error>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Utf8
, otherwise None
pub fn into_utf8(self) -> Result<Utf8Error, ProtoErrorKind>
pub fn into_utf8(self) -> Result<Utf8Error, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::Utf8
, otherwise returns back the enum in the Err
case of the result
pub fn is_from_utf8(&self) -> bool
pub fn is_from_utf8(&self) -> bool
Returns true if this is a ProtoErrorKind::FromUtf8
, otherwise false
pub fn as_from_utf8_mut(&mut self) -> Option<&mut FromUtf8Error>
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
pub fn as_from_utf8(&self) -> Option<&FromUtf8Error>
pub fn as_from_utf8(&self) -> Option<&FromUtf8Error>
Optionally returns references to the inner fields if this is a ProtoErrorKind::FromUtf8
, otherwise None
pub fn into_from_utf8(self) -> Result<FromUtf8Error, ProtoErrorKind>
pub fn into_from_utf8(self) -> Result<FromUtf8Error, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::FromUtf8
, otherwise returns back the enum in the Err
case of the result
pub fn is_parse_int(&self) -> bool
pub fn is_parse_int(&self) -> bool
Returns true if this is a ProtoErrorKind::ParseInt
, otherwise false
pub fn as_parse_int_mut(&mut self) -> Option<&mut ParseIntError>
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
pub fn as_parse_int(&self) -> Option<&ParseIntError>
pub fn as_parse_int(&self) -> Option<&ParseIntError>
Optionally returns references to the inner fields if this is a ProtoErrorKind::ParseInt
, otherwise None
pub fn into_parse_int(self) -> Result<ParseIntError, ProtoErrorKind>
pub fn into_parse_int(self) -> Result<ParseIntError, ProtoErrorKind>
Returns the inner fields if this is a ProtoErrorKind::ParseInt
, otherwise returns back the enum in the Err
case of the result
pub fn is_query_case_mismatch(&self) -> bool
pub fn is_query_case_mismatch(&self) -> bool
Returns true if this is a ProtoErrorKind::QueryCaseMismatch
, otherwise false
Trait Implementations§
§impl Clone for ProtoErrorKind
impl Clone for ProtoErrorKind
§fn clone(&self) -> ProtoErrorKind
fn clone(&self) -> ProtoErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ProtoErrorKind
impl Debug for ProtoErrorKind
§impl Display for ProtoErrorKind
impl Display for ProtoErrorKind
§impl Error for ProtoErrorKind
impl Error for ProtoErrorKind
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
§impl From<Error> for ProtoErrorKind
impl From<Error> for ProtoErrorKind
§fn from(e: Error) -> ProtoErrorKind
fn from(e: Error) -> ProtoErrorKind
§impl From<FromUtf8Error> for ProtoErrorKind
impl From<FromUtf8Error> for ProtoErrorKind
§fn from(source: FromUtf8Error) -> ProtoErrorKind
fn from(source: FromUtf8Error) -> ProtoErrorKind
§impl From<ParseError> for ProtoErrorKind
impl From<ParseError> for ProtoErrorKind
§fn from(source: ParseError) -> ProtoErrorKind
fn from(source: ParseError) -> ProtoErrorKind
§impl From<ParseIntError> for ProtoErrorKind
impl From<ParseIntError> for ProtoErrorKind
§fn from(source: ParseIntError) -> ProtoErrorKind
fn from(source: ParseIntError) -> ProtoErrorKind
§impl From<Utf8Error> for ProtoErrorKind
impl From<Utf8Error> for ProtoErrorKind
§fn from(source: Utf8Error) -> ProtoErrorKind
fn from(source: Utf8Error) -> ProtoErrorKind
§impl TryFrom<ResolveError> for ProtoErrorKind
impl TryFrom<ResolveError> for ProtoErrorKind
§type Error = ResolveError
type Error = ResolveError
§fn try_from(
error: ResolveError,
) -> Result<ProtoErrorKind, <ProtoErrorKind as TryFrom<ResolveError>>::Error>
fn try_from( error: ResolveError, ) -> Result<ProtoErrorKind, <ProtoErrorKind as TryFrom<ResolveError>>::Error>
Auto Trait Implementations§
impl Freeze for ProtoErrorKind
impl !RefUnwindSafe for ProtoErrorKind
impl Send for ProtoErrorKind
impl Sync for ProtoErrorKind
impl Unpin for ProtoErrorKind
impl !UnwindSafe for ProtoErrorKind
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Error> ErrorExt for Error
impl<Error> ErrorExt for Error
§fn context<M>(self, context: M) -> OpaqueError
fn context<M>(self, context: M) -> OpaqueError
§fn with_context<C, F>(self, context: F) -> OpaqueError
fn with_context<C, F>(self, context: F) -> OpaqueError
§fn backtrace(self) -> OpaqueError
fn backtrace(self) -> OpaqueError
§fn into_opaque(self) -> OpaqueError
fn into_opaque(self) -> OpaqueError
OpaqueError
. Read more§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
§impl<T> ToSmolStr for T
impl<T> ToSmolStr for T
fn to_smolstr(&self) -> SmolStr
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.