Skip to main content

DnsRrKey

Enum DnsRrKey 

Source
pub enum DnsRrKey {
Show 58 variants A_ADDR, NS_NSDNAME, CNAME_CNAME, SOA_MNAME, SOA_RNAME, SOA_SERIAL, SOA_REFRESH, SOA_RETRY, SOA_EXPIRE, SOA_MINIMUM, PTR_DNAME, HINFO_CPU, HINFO_OS, MX_PREFERENCE, MX_EXCHANGE, TXT_DATA, SIG_TYPE_COVERED, SIG_ALGORITHM, SIG_LABELS, SIG_ORIGINAL_TTL, SIG_EXPIRATION, SIG_INCEPTION, SIG_KEY_TAG, SIG_SIGNERS_NAME, SIG_SIGNATURE, AAAA_ADDR, SRV_PRIORITY, SRV_WEIGHT, SRV_PORT, SRV_TARGET, NAPTR_ORDER, NAPTR_PREFERENCE, NAPTR_FLAGS, NAPTR_SERVICES, NAPTR_REGEXP, NAPTR_REPLACEMENT, OPT_UDP_SIZE, OPT_VERSION, OPT_FLAGS, OPT_OPTIONS, TLSA_CERT_USAGE, TLSA_SELECTOR, TLSA_MATCH, TLSA_DATA, SVCB_PRIORITY, SVCB_TARGET, SVCB_PARAMS, HTTPS_PRIORITY, HTTPS_TARGET, HTTPS_PARAMS, URI_PRIORITY, URI_WEIGHT, URI_TARGET, CAA_CRITICAL, CAA_TAG, CAA_VALUE, RAW_RR_TYPE, RAW_RR_DATA,
}
Expand description

DNS resource record field keys.

Each variant identifies a specific field within a specific record type. The key determines which getter/setter method is appropriate (e.g. get_addr for INADDR fields, get_str for NAME/STR fields).

Variants§

§

A_ADDR

A record: address (INADDR).

§

NS_NSDNAME

NS record: name server domain name (NAME).

§

CNAME_CNAME

CNAME record: canonical name (NAME).

§

SOA_MNAME

SOA record: primary source of data (NAME).

§

SOA_RNAME

SOA record: responsible mailbox (NAME).

§

SOA_SERIAL

SOA record: serial number (U32).

§

SOA_REFRESH

SOA record: refresh interval (U32).

§

SOA_RETRY

SOA record: retry interval (U32).

§

SOA_EXPIRE

SOA record: expire limit (U32).

§

SOA_MINIMUM

SOA record: minimum TTL (U32).

§

PTR_DNAME

PTR record: pointer domain name (NAME).

§

HINFO_CPU

HINFO record: CPU (STR).

§

HINFO_OS

HINFO record: OS (STR).

§

MX_PREFERENCE

MX record: preference (U16).

§

MX_EXCHANGE

MX record: exchange domain (NAME).

§

TXT_DATA

TXT record: data (ABINP).

§

SIG_TYPE_COVERED

SIG record: type covered (U16).

§

SIG_ALGORITHM

SIG record: algorithm (U8).

§

SIG_LABELS

SIG record: labels (U8).

§

SIG_ORIGINAL_TTL

SIG record: original TTL (U32).

§

SIG_EXPIRATION

SIG record: signature expiration (U32).

§

SIG_INCEPTION

SIG record: signature inception (U32).

§

SIG_KEY_TAG

SIG record: key tag (U16).

§

SIG_SIGNERS_NAME

SIG record: signer’s name (NAME).

§

SIG_SIGNATURE

SIG record: signature data (BIN).

§

AAAA_ADDR

AAAA record: IPv6 address (INADDR6).

§

SRV_PRIORITY

SRV record: priority (U16).

§

SRV_WEIGHT

SRV record: weight (U16).

§

SRV_PORT

SRV record: port (U16).

§

SRV_TARGET

SRV record: target domain (NAME).

§

NAPTR_ORDER

NAPTR record: order (U16).

§

NAPTR_PREFERENCE

NAPTR record: preference (U16).

§

NAPTR_FLAGS

NAPTR record: flags (STR).

§

NAPTR_SERVICES

NAPTR record: services (STR).

§

NAPTR_REGEXP

NAPTR record: regexp (STR).

§

NAPTR_REPLACEMENT

NAPTR record: replacement (NAME).

§

OPT_UDP_SIZE

OPT record: UDP size (U16).

§

OPT_VERSION

OPT record: version (U8).

§

OPT_FLAGS

OPT record: flags (U16).

§

OPT_OPTIONS

OPT record: options (OPT).

§

TLSA_CERT_USAGE

TLSA record: certificate usage (U8).

§

TLSA_SELECTOR

TLSA record: selector (U8).

§

TLSA_MATCH

TLSA record: matching type (U8).

§

TLSA_DATA

TLSA record: certificate association data (BIN).

§

SVCB_PRIORITY

SVCB record: priority (U16).

§

SVCB_TARGET

SVCB record: target name (NAME).

§

SVCB_PARAMS

SVCB record: service parameters (OPT).

§

HTTPS_PRIORITY

HTTPS record: priority (U16).

§

HTTPS_TARGET

HTTPS record: target name (NAME).

§

HTTPS_PARAMS

HTTPS record: service parameters (OPT).

§

URI_PRIORITY

URI record: priority (U16).

§

URI_WEIGHT

URI record: weight (U16).

§

URI_TARGET

URI record: target (NAME).

§

CAA_CRITICAL

CAA record: critical flag (U8).

§

CAA_TAG

CAA record: tag/property (STR).

§

CAA_VALUE

CAA record: value (BINP).

§

RAW_RR_TYPE

RAW record: RR type (U16).

§

RAW_RR_DATA

RAW record: RR data (BIN).

Implementations§

Source§

impl DnsRrKey

Source

pub fn datatype(self) -> DnsDataType

Returns the data type associated with this resource record key.

This tells the caller which getter/setter method to use (e.g. get_addr for DnsDataType::InAddr, get_str for DnsDataType::Str or DnsDataType::Name).

Source

pub fn record_type(self) -> DnsRecordType

Returns the DNS record type that this key belongs to.

For example, DnsRrKey::A_ADDR returns DnsRecordType::A.

Trait Implementations§

Source§

impl Clone for DnsRrKey

Source§

fn clone(&self) -> DnsRrKey

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DnsRrKey

Source§

impl Debug for DnsRrKey

Source§

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

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

impl Display for DnsRrKey

Source§

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

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

impl Eq for DnsRrKey

Source§

impl From<DnsRrKey> for ares_dns_rr_key_t

Source§

fn from(val: DnsRrKey) -> Self

Converts to this type from the input type.
Source§

impl From<ares_dns_rr_key_t> for DnsRrKey

Source§

fn from(val: ares_dns_rr_key_t) -> Self

Converts to this type from the input type.
Source§

impl Hash for DnsRrKey

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 DnsRrKey

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · 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 DnsRrKey

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 DnsRrKey

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 StructuralPartialEq for DnsRrKey

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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§

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.