pub struct ExtendedErrorCode(/* private fields */);
Expand description
Extended DNS error codes.
A complementary data can be put in EDNS opt, providing additional information about the cause of DNS errors. Defined in RFC 8914. Current registered values can be found in IANA registry.
Implementations§
source§impl ExtendedErrorCode
impl ExtendedErrorCode
sourcepub const OTHER: ExtendedErrorCode = _
pub const OTHER: ExtendedErrorCode = _
The error in question falls into a category that does not match known extended error codes. Implementations SHOULD include an EXTRA-TEXT value to augment this error code with additional information.
sourcepub const UNSUPPORTED_DNSKEY_ALGORITHM: ExtendedErrorCode = _
pub const UNSUPPORTED_DNSKEY_ALGORITHM: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but a DNSKEY RRset contained only unsupported DNSSEC algorithms.
sourcepub const UNSUPPORTED_DS_DIGEST_TYPE: ExtendedErrorCode = _
pub const UNSUPPORTED_DS_DIGEST_TYPE: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but a DS RRset contained only unsupported Digest Types.
sourcepub const STALE_ANSWER: ExtendedErrorCode = _
pub const STALE_ANSWER: ExtendedErrorCode = _
The resolver was unable to resolve the answer within its time limits and decided to answer with previously cached data instead of answering with an error. This is typically caused by problems communicating with an authoritative server, possibly as result of a denial of service (DoS) attack against another network. (See also Code 19.)
sourcepub const FORGED_ANSWER: ExtendedErrorCode = _
pub const FORGED_ANSWER: ExtendedErrorCode = _
For policy reasons (legal obligation or malware filtering, for instance), an answer was forged. Note that this should be used when an answer is still provided, not when failure codes are returned instead. See Blocked (15), Censored (16), and Filtered (17) for use when returning other response codes.
sourcepub const DNSSEC_INDETERMINATE: ExtendedErrorCode = _
pub const DNSSEC_INDETERMINATE: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but validation ended in the Indeterminate state RFC 4035.
sourcepub const DNSSEC_BOGUS: ExtendedErrorCode = _
pub const DNSSEC_BOGUS: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but validation ended in the Bogus state.
sourcepub const SIGNATURE_EXPIRED: ExtendedErrorCode = _
pub const SIGNATURE_EXPIRED: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and some (often all) are expired.
sourcepub const SIGNATURE_NOT_YET_VALID: ExtendedErrorCode = _
pub const SIGNATURE_NOT_YET_VALID: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and at least some are not yet valid.
sourcepub const DNSKEY_MISSING: ExtendedErrorCode = _
pub const DNSKEY_MISSING: ExtendedErrorCode = _
A DS record existed at a parent, but no supported matching DNSKEY record could be found for the child.
sourcepub const RRSIGS_MISSING: ExtendedErrorCode = _
pub const RRSIGS_MISSING: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but no RRSIGs could be found for at least one RRset where RRSIGs were expected.
sourcepub const NO_ZONE_KEY_BIT_SET: ExtendedErrorCode = _
pub const NO_ZONE_KEY_BIT_SET: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but no Zone Key Bit was set in a DNSKEY.
sourcepub const NSEC_MISSING: ExtendedErrorCode = _
pub const NSEC_MISSING: ExtendedErrorCode = _
The resolver attempted to perform DNSSEC validation, but the requested data was missing and a covering NSEC or NSEC3 was not provided.
sourcepub const CACHED_ERROR: ExtendedErrorCode = _
pub const CACHED_ERROR: ExtendedErrorCode = _
The resolver is returning the SERVFAIL RCODE from its cache.
sourcepub const NOT_READY: ExtendedErrorCode = _
pub const NOT_READY: ExtendedErrorCode = _
The server is unable to answer the query, as it was not fully functional when the query was received.
sourcepub const BLOCKED: ExtendedErrorCode = _
pub const BLOCKED: ExtendedErrorCode = _
The server is unable to respond to the request because the domain is on a blocklist due to an internal security policy imposed by the operator of the server resolving or forwarding the query.
sourcepub const CENSORED: ExtendedErrorCode = _
pub const CENSORED: ExtendedErrorCode = _
The server is unable to respond to the request because the domain is on a blocklist due to an external requirement imposed by an entity other than the operator of the server resolving or forwarding the query. Note that how the imposed policy is applied is irrelevant (in-band DNS filtering, court order, etc.).
sourcepub const FILTERED: ExtendedErrorCode = _
pub const FILTERED: ExtendedErrorCode = _
The server is unable to respond to the request because the domain is on a blocklist as requested by the client. Functionally, this amounts to “you requested that we filter domains like this one.”
sourcepub const PROHIBITED: ExtendedErrorCode = _
pub const PROHIBITED: ExtendedErrorCode = _
An authoritative server or recursive resolver that receives a query from an “unauthorized” client can annotate its REFUSED message with this code. Examples of “unauthorized” clients are recursive queries from IP addresses outside the network, blocklisted IP addresses, local policy, etc.
sourcepub const STALE_NXDOMAIN_ANSWER: ExtendedErrorCode = _
pub const STALE_NXDOMAIN_ANSWER: ExtendedErrorCode = _
The resolver was unable to resolve an answer within its configured time limits and decided to answer with a previously cached NXDOMAIN answer instead of answering with an error. This may be caused, for example, by problems communicating with an authoritative server, possibly as result of a denial of service (DoS) attack against another network. (See also Code 3.)
sourcepub const NOT_AUTHORITATIVE: ExtendedErrorCode = _
pub const NOT_AUTHORITATIVE: ExtendedErrorCode = _
An authoritative server that receives a query with the Recursion Desired (RD) bit clear, or when it is not configured for recursion for a domain for which it is not authoritative, SHOULD include this EDE code in the REFUSED response. A resolver that receives a query with the RD bit clear SHOULD include this EDE code in the REFUSED response.
sourcepub const NOT_SUPPORTED: ExtendedErrorCode = _
pub const NOT_SUPPORTED: ExtendedErrorCode = _
The requested operation or query is not supported.
sourcepub const NO_REACHABLE_AUTHORITY: ExtendedErrorCode = _
pub const NO_REACHABLE_AUTHORITY: ExtendedErrorCode = _
The resolver could not reach any of the authoritative name servers (or they potentially refused to reply).
sourcepub const NETWORK_ERROR: ExtendedErrorCode = _
pub const NETWORK_ERROR: ExtendedErrorCode = _
An unrecoverable error occurred while communicating with another server.
sourcepub const INVALID_DATA: ExtendedErrorCode = _
pub const INVALID_DATA: ExtendedErrorCode = _
The authoritative server cannot answer with data for a zone it is otherwise configured to support. Examples of this include its most recent zone being too old or having expired.
sourcepub const INVALID_QUERY_TYPE: ExtendedErrorCode = _
pub const INVALID_QUERY_TYPE: ExtendedErrorCode = _
The requested resource record type should not appear in a query.
source§impl ExtendedErrorCode
impl ExtendedErrorCode
pub const COMPOSE_LEN: u16 = 2u16
sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const fn to_mnemonic(self) -> Option<&'static [u8]>
Returns the mnemonic for this value if there is one.
This will also return a mnemonic if a well-defined variant
is hidden in a Int
variant.
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
source§impl ExtendedErrorCode
impl ExtendedErrorCode
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
source§impl Clone for ExtendedErrorCode
impl Clone for ExtendedErrorCode
source§fn clone(&self) -> ExtendedErrorCode
fn clone(&self) -> ExtendedErrorCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ExtendedErrorCode
impl Debug for ExtendedErrorCode
source§impl Display for ExtendedErrorCode
impl Display for ExtendedErrorCode
source§impl<'a> From<&'a ExtendedErrorCode> for u16
impl<'a> From<&'a ExtendedErrorCode> for u16
source§fn from(value: &'a ExtendedErrorCode) -> Self
fn from(value: &'a ExtendedErrorCode) -> Self
source§impl<Octs> From<ExtendedErrorCode> for ExtendedError<Octs>
impl<Octs> From<ExtendedErrorCode> for ExtendedError<Octs>
source§fn from(code: ExtendedErrorCode) -> Self
fn from(code: ExtendedErrorCode) -> Self
source§impl From<ExtendedErrorCode> for u16
impl From<ExtendedErrorCode> for u16
source§fn from(value: ExtendedErrorCode) -> Self
fn from(value: ExtendedErrorCode) -> Self
source§impl From<u16> for ExtendedErrorCode
impl From<u16> for ExtendedErrorCode
source§impl FromStr for ExtendedErrorCode
impl FromStr for ExtendedErrorCode
source§impl Hash for ExtendedErrorCode
impl Hash for ExtendedErrorCode
source§impl Ord for ExtendedErrorCode
impl Ord for ExtendedErrorCode
source§fn cmp(&self, other: &ExtendedErrorCode) -> Ordering
fn cmp(&self, other: &ExtendedErrorCode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ExtendedErrorCode
impl PartialEq for ExtendedErrorCode
source§impl PartialOrd for ExtendedErrorCode
impl PartialOrd for ExtendedErrorCode
impl Copy for ExtendedErrorCode
impl Eq for ExtendedErrorCode
impl StructuralPartialEq for ExtendedErrorCode
Auto Trait Implementations§
impl Freeze for ExtendedErrorCode
impl RefUnwindSafe for ExtendedErrorCode
impl Send for ExtendedErrorCode
impl Sync for ExtendedErrorCode
impl Unpin for ExtendedErrorCode
impl UnwindSafe for ExtendedErrorCode
Blanket Implementations§
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)