domain::base::iana::exterr

Struct ExtendedErrorCode

source
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

source

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.

source

pub const UNSUPPORTED_DNSKEY_ALGORITHM: ExtendedErrorCode = _

The resolver attempted to perform DNSSEC validation, but a DNSKEY RRset contained only unsupported DNSSEC algorithms.

source

pub const UNSUPPORTED_DS_DIGEST_TYPE: ExtendedErrorCode = _

The resolver attempted to perform DNSSEC validation, but a DS RRset contained only unsupported Digest Types.

source

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.)

source

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.

source

pub const DNSSEC_INDETERMINATE: ExtendedErrorCode = _

The resolver attempted to perform DNSSEC validation, but validation ended in the Indeterminate state RFC 4035.

source

pub const DNSSEC_BOGUS: ExtendedErrorCode = _

The resolver attempted to perform DNSSEC validation, but validation ended in the Bogus state.

source

pub const SIGNATURE_EXPIRED: ExtendedErrorCode = _

The resolver attempted to perform DNSSEC validation, but no signatures are presently valid and some (often all) are expired.

source

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.

source

pub const DNSKEY_MISSING: ExtendedErrorCode = _

A DS record existed at a parent, but no supported matching DNSKEY record could be found for the child.

source

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.

source

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.

source

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.

source

pub const CACHED_ERROR: ExtendedErrorCode = _

The resolver is returning the SERVFAIL RCODE from its cache.

source

pub const NOT_READY: ExtendedErrorCode = _

The server is unable to answer the query, as it was not fully functional when the query was received.

source

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.

source

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.).

source

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.”

source

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.

source

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.)

source

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.

source

pub const NOT_SUPPORTED: ExtendedErrorCode = _

The requested operation or query is not supported.

source

pub const NO_REACHABLE_AUTHORITY: ExtendedErrorCode = _

The resolver could not reach any of the authoritative name servers (or they potentially refused to reply).

source

pub const NETWORK_ERROR: ExtendedErrorCode = _

An unrecoverable error occurred while communicating with another server.

source

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.

source

pub const INVALID_QUERY_TYPE: ExtendedErrorCode = _

The requested resource record type should not appear in a query.

source§

impl ExtendedErrorCode

source

pub const COMPOSE_LEN: u16 = 2u16

source

pub const fn from_int(value: u16) -> Self

Returns a value from its raw integer value.

source

pub const fn to_int(self) -> u16

Returns the raw integer value for a value.

source

pub fn from_mnemonic(m: &[u8]) -> Option<Self>

Returns a value from a well-defined mnemonic.

source

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.

source

pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>

source

pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

source§

impl ExtendedErrorCode

source

pub fn from_bytes(bytes: &[u8]) -> Option<Self>

source§

impl ExtendedErrorCode

source

pub fn scan<S: Scanner>(scanner: &mut S) -> Result<Self, S::Error>

Trait Implementations§

source§

impl Clone for ExtendedErrorCode

source§

fn clone(&self) -> ExtendedErrorCode

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 ExtendedErrorCode

source§

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

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

impl Display for ExtendedErrorCode

source§

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

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

impl<'a> From<&'a ExtendedErrorCode> for u16

source§

fn from(value: &'a ExtendedErrorCode) -> Self

Converts to this type from the input type.
source§

impl<Octs> From<ExtendedErrorCode> for ExtendedError<Octs>

source§

fn from(code: ExtendedErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<ExtendedErrorCode> for u16

source§

fn from(value: ExtendedErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<u16> for ExtendedErrorCode

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl FromStr for ExtendedErrorCode

source§

type Err = FromStrError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for ExtendedErrorCode

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for ExtendedErrorCode

source§

fn cmp(&self, other: &ExtendedErrorCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for ExtendedErrorCode

source§

fn eq(&self, other: &ExtendedErrorCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for ExtendedErrorCode

source§

fn partial_cmp(&self, other: &ExtendedErrorCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for ExtendedErrorCode

source§

impl Eq for ExtendedErrorCode

source§

impl StructuralPartialEq for ExtendedErrorCode

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 T)

🔬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<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

source§

type Error = <Target as OctetsFrom<Source>>::Error

source§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
source§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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