Enum trust_dns_proto::error::ProtoErrorKind
source · [−]#[non_exhaustive]
pub enum ProtoErrorKind {
Show 37 variants
BadQueryCount(usize),
Busy,
Canceled(Canceled),
CharacterDataTooLong {
max: usize,
len: usize,
},
LabelOverlapsWithOther {
label: usize,
other: usize,
},
DnsKeyProtocolNot3(u8),
DomainNameTooLong(usize),
EdnsNameNotRoot(Name),
FormError {
header: Header,
error: Box<ProtoError>,
},
HmacInvalid(),
IncorrectRDataLengthRead {
read: usize,
len: usize,
},
LabelBytesTooLong(usize),
PointerNotPriorToLabel {
idx: usize,
ptr: u16,
},
MaxBufferSizeExceeded(usize),
Message(&'static str),
Msg(String),
NoError,
NotAllRecordsWritten {
count: usize,
},
RrsigsNotPresent {
name: Name,
record_type: RecordType,
},
UnknownAlgorithmTypeValue(u8),
UnknownDnsClassStr(String),
UnknownDnsClassValue(u16),
UnknownRecordTypeStr(String),
UnknownRecordTypeValue(u16),
UnrecognizedLabelCode(u8),
UnrecognizedNsec3Flags(u8),
UnrecognizedCsyncFlags(u16),
Io(Error),
Poisoned,
Ring(Unspecified),
SSL(SslErrorStack),
Timer,
Timeout,
UrlParsing(ParseError),
Utf8(Utf8Error),
FromUtf8(FromUtf8Error),
ParseInt(ParseIntError),
}
Expand description
The error kind for errors that get returned in the crate
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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
Fields
header: Header
Header of the bad Message
error: Box<ProtoError>
Error that occured while parsing the Message
Format error in Message Parsing
HmacInvalid()
An HMAC failed to verify
IncorrectRDataLengthRead
The length of rdata read was not as expected
LabelBytesTooLong(usize)
Label bytes exceeded the limit of 63
PointerNotPriorToLabel
Fields
idx: usize
index of the label containing this pointer
ptr: u16
location to which the pointer is directing
Label bytes exceeded the limit of 63
MaxBufferSizeExceeded(usize)
The maximum buffer size was exceeded
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
Msg(String)
An error with an arbitrary message, stored as String
NoError
No error was specified
NotAllRecordsWritten
Fields
count: usize
Number of records that were written before the error
Not all records were able to be written
RrsigsNotPresent
Missing rrsigs
UnknownAlgorithmTypeValue(u8)
An unknown algorithm type was found
UnknownDnsClassStr(String)
An unknown dns class was found
UnknownDnsClassValue(u16)
An unknown dns class value was found
UnknownRecordTypeStr(String)
An unknown record type string was found
UnknownRecordTypeValue(u16)
An unknown record type value was found
UnrecognizedLabelCode(u8)
An unrecognized label code was found
UnrecognizedNsec3Flags(u8)
Unrecognized nsec3 flags were found
UnrecognizedCsyncFlags(u16)
Unrecognized csync flags were found
Io(Error)
An error got returned from IO
Poisoned
Any sync poised error
Ring(Unspecified)
A ring error
SSL(SslErrorStack)
An ssl error
Timer
A tokio timer error
Timeout
A request timed out
UrlParsing(ParseError)
An url parsing error
Utf8(Utf8Error)
A utf8 parsing error
FromUtf8(FromUtf8Error)
A utf8 parsing error
ParseInt(ParseIntError)
An int parsing error
Implementations
sourceimpl ProtoErrorKind
impl ProtoErrorKind
sourcepub 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
sourcepub 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
sourcepub fn into_bad_query_count(self) -> Result<usize, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_canceled(self) -> Result<Canceled, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_character_data_too_long(self) -> Result<(usize, usize), Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_label_overlaps_with_other(self) -> Result<(usize, usize), Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_dns_key_protocol_not3(self) -> Result<u8, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_domain_name_too_long(self) -> Result<usize, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_edns_name_not_root(self) -> Result<Name, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_form_error(self) -> Result<(Header, Box<ProtoError>), Self>
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
sourcepub fn as_hmac_invalid_mut(&mut self) -> Option<()>
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
sourcepub fn as_hmac_invalid(&self) -> Option<()>
pub fn as_hmac_invalid(&self) -> Option<()>
Optionally returns references to the inner fields if this is a ProtoErrorKind::HmacInvalid
, otherwise None
sourcepub fn into_hmac_invalid(self) -> Result<(), Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_incorrect_r_data_length_read(self) -> Result<(usize, usize), Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_label_bytes_too_long(self) -> Result<usize, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_pointer_not_prior_to_label(self) -> Result<(usize, u16), Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_max_buffer_size_exceeded(self) -> Result<usize, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_message(self) -> Result<&'static str, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_msg(self) -> Result<String, Self>
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
sourcepub fn is_no_error(&self) -> bool
pub fn is_no_error(&self) -> bool
Returns true if this is a ProtoErrorKind::NoError
, otherwise false
sourcepub 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
sourcepub 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
sourcepub fn into_not_all_records_written(self) -> Result<usize, Self>
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
sourcepub fn as_rrsigs_not_present_mut(
&mut self
) -> Option<(&mut Name, &mut RecordType)>
pub fn as_rrsigs_not_present_mut(
&mut self
) -> Option<(&mut Name, &mut RecordType)>
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::RrsigsNotPresent
, otherwise None
sourcepub fn as_rrsigs_not_present(&self) -> Option<(&Name, &RecordType)>
pub fn as_rrsigs_not_present(&self) -> Option<(&Name, &RecordType)>
Optionally returns references to the inner fields if this is a ProtoErrorKind::RrsigsNotPresent
, otherwise None
sourcepub fn into_rrsigs_not_present(self) -> Result<(Name, RecordType), Self>
pub fn into_rrsigs_not_present(self) -> Result<(Name, RecordType), Self>
Returns the inner fields if this is a ProtoErrorKind::RrsigsNotPresent
, otherwise returns back the enum in the Err
case of the result
sourcepub 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
sourcepub 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
sourcepub fn into_unknown_algorithm_type_value(self) -> Result<u8, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unknown_dns_class_str(self) -> Result<String, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unknown_dns_class_value(self) -> Result<u16, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unknown_record_type_str(self) -> Result<String, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unknown_record_type_value(self) -> Result<u16, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unrecognized_label_code(self) -> Result<u8, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unrecognized_nsec3_flags(self) -> Result<u8, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_unrecognized_csync_flags(self) -> Result<u16, Self>
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
sourcepub fn as_io_mut(&mut self) -> Option<&mut Error>
pub fn as_io_mut(&mut self) -> Option<&mut Error>
Optionally returns mutable references to the inner fields if this is a ProtoErrorKind::Io
, otherwise None
sourcepub fn as_io(&self) -> Option<&Error>
pub fn as_io(&self) -> Option<&Error>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Io
, otherwise None
sourcepub fn into_io(self) -> Result<Error, Self>
pub fn into_io(self) -> Result<Error, Self>
Returns the inner fields if this is a ProtoErrorKind::Io
, otherwise returns back the enum in the Err
case of the result
sourcepub fn is_poisoned(&self) -> bool
pub fn is_poisoned(&self) -> bool
Returns true if this is a ProtoErrorKind::Poisoned
, otherwise false
sourcepub fn as_ring_mut(&mut self) -> Option<&mut Unspecified>
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
sourcepub fn as_ring(&self) -> Option<&Unspecified>
pub fn as_ring(&self) -> Option<&Unspecified>
Optionally returns references to the inner fields if this is a ProtoErrorKind::Ring
, otherwise None
sourcepub fn into_ring(self) -> Result<Unspecified, Self>
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
sourcepub fn as_ssl_mut(&mut self) -> Option<&mut SslErrorStack>
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
sourcepub fn as_ssl(&self) -> Option<&SslErrorStack>
pub fn as_ssl(&self) -> Option<&SslErrorStack>
Optionally returns references to the inner fields if this is a ProtoErrorKind::SSL
, otherwise None
sourcepub fn into_ssl(self) -> Result<SslErrorStack, Self>
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
sourcepub fn is_timer(&self) -> bool
pub fn is_timer(&self) -> bool
Returns true if this is a ProtoErrorKind::Timer
, otherwise false
sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true if this is a ProtoErrorKind::Timeout
, otherwise false
sourcepub 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
sourcepub 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
sourcepub fn into_url_parsing(self) -> Result<ParseError, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_utf8(self) -> Result<Utf8Error, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_from_utf8(self) -> Result<FromUtf8Error, Self>
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
sourcepub 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
sourcepub 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
sourcepub fn into_parse_int(self) -> Result<ParseIntError, Self>
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
Trait Implementations
sourceimpl Clone for ProtoErrorKind
impl Clone for ProtoErrorKind
sourceimpl Debug for ProtoErrorKind
impl Debug for ProtoErrorKind
sourceimpl Display for ProtoErrorKind
impl Display for ProtoErrorKind
sourceimpl Error for ProtoErrorKind
impl Error for ProtoErrorKind
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for ProtoErrorKind
impl From<Error> for ProtoErrorKind
sourceimpl From<ErrorStack> for ProtoErrorKind
impl From<ErrorStack> for ProtoErrorKind
sourcefn from(source: SslErrorStack) -> Self
fn from(source: SslErrorStack) -> Self
Converts to this type from the input type.
sourceimpl From<FromUtf8Error> for ProtoErrorKind
impl From<FromUtf8Error> for ProtoErrorKind
sourcefn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
sourceimpl From<ParseError> for ProtoErrorKind
impl From<ParseError> for ProtoErrorKind
sourcefn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseIntError> for ProtoErrorKind
impl From<ParseIntError> for ProtoErrorKind
sourcefn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
sourceimpl From<ProtoErrorKind> for ProtoError
impl From<ProtoErrorKind> for ProtoError
sourcefn from(kind: ProtoErrorKind) -> Self
fn from(kind: ProtoErrorKind) -> Self
Converts to this type from the input type.
sourceimpl From<Unspecified> for ProtoErrorKind
impl From<Unspecified> for ProtoErrorKind
sourcefn from(source: Unspecified) -> Self
fn from(source: Unspecified) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ProtoErrorKind
impl Send for ProtoErrorKind
impl Sync for ProtoErrorKind
impl Unpin for ProtoErrorKind
impl !UnwindSafe for ProtoErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more