Struct domain::base::iana::rcode::TsigRcode

source ·
pub struct TsigRcode(/* private fields */);
Expand description

Response codes for transaction authentication (TSIG).

TSIG and TKEY resource records contain a 16 bit wide error field whose values are an extension of the standard DNS Rcode. While it was intended to also share the same space with the extended response codes used by EDNS (see OptRcode), both used the value 16. To allow distinguish between the two uses of this value, we have two separate types.

The values for all three response code types are defined in the IANA DNS RCODEs registry. This type is complete as of 2019-01-28.

Implementations§

source§

impl TsigRcode

source

pub const NOERROR: TsigRcode = _

No error condition.

(Otherwise known as success.)

Defined in RFC 1035.

source

pub const FORMERR: TsigRcode = _

Format error.

The name server was unable to interpret the query.

Defined in RFC 1035.

source

pub const SERVFAIL: TsigRcode = _

Server failure.

The name server was unable to process this query due to a problem with the name server.

Defined in RFC 1035.

source

pub const NXDOMAIN: TsigRcode = _

Name error.

The domain name given in the query does not exist at the name server.

Defined in RFC 1035.

source

pub const NOTIMP: TsigRcode = _

Not implemented.

The name server does not support the requested kind of query.

Defined in RFC 1035.

source

pub const REFUSED: TsigRcode = _

Query refused.

The name server refused to perform the operation requested by the query for policy reasons.

Defined in RFC 1035.

source

pub const YXDOMAIN: TsigRcode = _

Name exists when it should not.

Returned for an UPDATE query when a domain requested to not exist does in fact exist.

Returned when resolving a DNAME redirection when the resulting name exceeds the length of 255 octets.

Defined in RFC 2136 for the UPDATE query and RFC 6672 for DNAME redirection.

source

pub const YXRRSET: TsigRcode = _

RR set exists when it should not.

Returned for an UPDATE query when an RRset requested to not exist does in fact exist.

Defined in RFC 2136.

source

pub const NXRRSET: TsigRcode = _

RR set that should exist does not.

Returned for an UPDATE query when an RRset requested to exist does not.

Defined in RFC 2136.

source

pub const NOTAUTH: TsigRcode = _

Server not authoritative for zone or client not authorized.

Returned for an UPDATE query when the server is not an authoritative name server for the requested domain.

Returned for queries using TSIG when authorisation failed.

Defined in RFC 2136 for UPDATE and RFC 2845 for TSIG.

source

pub const NOTZONE: TsigRcode = _

Name not contained in zone.

A name used in the prerequisite or update section is not within the zone given in the zone section.

Defined in RFC 2136.

source

pub const BADSIG: TsigRcode = _

TSIG signature failure.

The TSIG signature fails to verify.

Defined in RFC 2845.

source

pub const BADKEY: TsigRcode = _

Key not recognized.

The server did not recognize the key used for generating the signature.

Defined in RFC 2845.

source

pub const BADTIME: TsigRcode = _

Signature out of time window.

The server time was outside the time interval specified by the request.

Defined in RFC 2845.

source

pub const BADMODE: TsigRcode = _

Bad TKEY mode.

The mode field in a TKEY resource record contained a mode not supported by the server.

Defined in RFC 2930.

source

pub const BADNAME: TsigRcode = _

Duplicate key name.

In TKEY records, when establishing a new key, the name used already exists at the server or when deleting a key, a key of this name does not exist.

Defined in RFC 2930.

source

pub const BADALG: TsigRcode = _

Algorithm not supported.

The value is defined in RFC 2930 but never actually explained. Presumably, it will be returned when the algorithm field of a TKEY record contains a value not supported by the server.

source

pub const BADTRUNC: TsigRcode = _

Bad truncation.

A TSIG record was received with a MAC too short for the local policy in force.

Defined in RFC 4635.

source

pub const BADCOOKIE: TsigRcode = _

Bad or missing server cookie.

The request contained a COOKIE option either without a server cookie or with a server cookie that did not validate.

Defined in RFC 7873.

source§

impl TsigRcode

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 const COMPOSE_LEN: u16 = 2u16

source

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

source§

impl TsigRcode

source

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

source§

impl TsigRcode

source

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

Trait Implementations§

source§

impl Clone for TsigRcode

source§

fn clone(&self) -> TsigRcode

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 TsigRcode

source§

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

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

impl Display for TsigRcode

source§

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

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

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

source§

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

Converts to this type from the input type.
source§

impl From<OptRcode> for TsigRcode

source§

fn from(value: OptRcode) -> TsigRcode

Converts to this type from the input type.
source§

impl From<Rcode> for TsigRcode

source§

fn from(value: Rcode) -> TsigRcode

Converts to this type from the input type.
source§

impl From<TsigRcode> for u16

source§

fn from(value: TsigRcode) -> Self

Converts to this type from the input type.
source§

impl From<u16> for TsigRcode

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl FromStr for TsigRcode

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 TsigRcode

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 TsigRcode

source§

fn cmp(&self, other: &TsigRcode) -> 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 + PartialOrd,

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

impl PartialEq for TsigRcode

source§

fn eq(&self, other: &TsigRcode) -> 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 TsigRcode

source§

fn partial_cmp(&self, other: &TsigRcode) -> 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 TsigRcode

source§

impl Eq for TsigRcode

source§

impl StructuralPartialEq for TsigRcode

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