#[non_exhaustive]pub enum DecodeError {
Show 28 variants
EdnsNameNotRoot(Box<Name>),
#[non_exhaustive] IncorrectRDataLengthRead {
read: usize,
len: usize,
},
InsufficientBytes,
InvalidEmptyRecord,
InvalidPreviousIndex,
PointerNotPriorToLabel {
idx: usize,
ptr: u16,
},
LabelBytesTooLong(usize),
UnrecognizedLabelCode(u8),
DomainNameTooLong(usize),
LabelOverlapsWithOther {
label: usize,
other: usize,
},
UnknownDigestAlgorithm(u8),
UnknownDnsClassStr(String),
UnknownDnsClassValue(u16),
UnknownRecordTypeStr(String),
UnknownRecordTypeValue(u16),
UnrecognizedNsec3Flags(u8),
UnrecognizedCsyncFlags(u16),
UnknownNsec3HashAlgorithm(u8),
RecordAfterSig,
RecordNotInAdditionalSection(RecordType),
DuplicateEdns,
SvcParamsOutOfOrder,
SvcParamMissingValue,
NsecBitmapOutOfBounds,
CaaTagInvalid,
NaptrFlagsInvalid,
UnknownAddressFamily(u16),
Utf8(FromUtf8Error),
}Expand description
An error that can occur deep in a decoder This type is kept very small so that function that use it inline often
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EdnsNameNotRoot(Box<Name>)
EDNS resource record label is not the root label, although required
#[non_exhaustive]IncorrectRDataLengthRead
The length of rdata read was not as expected
Fields
This variant is marked as non-exhaustive
InsufficientBytes
Insufficient data in the buffer for a read operation
InvalidEmptyRecord
Invalid record with data length 0 in non-update message
InvalidPreviousIndex
slice_from was called with an invalid index
PointerNotPriorToLabel
Pointer points to an index within or after the current name
Fields
LabelBytesTooLong(usize)
Label bytes exceeded the limit of 63
UnrecognizedLabelCode(u8)
An unrecognized label code was found
DomainNameTooLong(usize)
A domain name was too long
LabelOverlapsWithOther
Overlapping labels
UnknownDigestAlgorithm(u8)
An unknown digest algorithm 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
UnrecognizedNsec3Flags(u8)
Unrecognized nsec3 flags were found
UnrecognizedCsyncFlags(u16)
Unrecognized csync flags were found
UnknownNsec3HashAlgorithm(u8)
An unknown algorithm type was found
RecordAfterSig
A record appeared after TSIG or SIG(0)
RecordNotInAdditionalSection(RecordType)
A record type was found outside the additional section
DuplicateEdns
More than one EDNS record was found
SvcParamsOutOfOrder
SvcParams were not in strictly increasing order
SvcParamMissingValue
An SvcParam was expected to contain at least one value
NsecBitmapOutOfBounds
NSEC or NSEC3 bitmap data was out of bounds
CaaTagInvalid
CAA tag was invalid (length or characters out of bounds)
NaptrFlagsInvalid
NAPTR flags contained characters outside [a-zA-Z0-9]
UnknownAddressFamily(u16)
An unknown address family was found
Utf8(FromUtf8Error)
Invalid UTF-8 data
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
Source§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
use the Display impl or to_string()