Struct Rtype

Source
pub struct Rtype(/* private fields */);
Expand description

Resource Record Types.

Each resource records has a 16 bit type value indicating what kind of information is represented by the record. Normal query includes the type of record information is requested for. A few aditional types, called query types, are defined as well and can only be used in questions. This type represents both these types.

The currently assigned values are maintained in an IANA registry. This type is complete as of 2019-01-28.

In order to avoid confusion over capitalization, the mnemonics are treated as single acronyms and therefore all variant names are spelled with an initial capital letter in accordance with the Rust naming guidelines.

Implementations§

Source§

impl Rtype

Source

pub const A: Rtype

A host address.

Source

pub const NS: Rtype

An authoritative name server.

Source

pub const MD: Rtype

A mail destination.

(Obsolete – use MX)

Source

pub const MF: Rtype

A mail forwarder.

(Obsolete – use MX)

Source

pub const CNAME: Rtype

The canonical name for an alias

Source

pub const SOA: Rtype

Marks the start of a zone of authority.

Source

pub const MB: Rtype

A mailbox domain name.

(Experimental.)

Source

pub const MG: Rtype

A mail group member

(Experimental.)

Source

pub const MR: Rtype

A mail rename domain name.

(Experimental.)

Source

pub const NULL: Rtype

A null resource record.

(Experimental.)

Source

pub const WKS: Rtype

A well known service description.

Source

pub const PTR: Rtype

A domain name pointer.

Source

pub const HINFO: Rtype

Host information.

Source

pub const MINFO: Rtype

Mailbox or mail list information.

Source

pub const MX: Rtype

Mail exchange.

Source

pub const TXT: Rtype

Text strings.

Source

pub const RP: Rtype

For Responsible Person.

See RFC 1183

Source

pub const AFSDB: Rtype

For AFS Data Base location.

See RFC 1183 and RFC 5864.

Source

pub const X25: Rtype

For X.25 PSDN address.

See RFC 1183.

Source

pub const ISDN: Rtype

For ISDN address.

See RFC 1183.

Source

pub const RT: Rtype

For Route Through.

See RFC 1183

Source

pub const NSAP: Rtype

For SNAP address, NSAP style A record.

See RFC 1706.

Source

pub const NSAPPTR: Rtype

For domain name pointer, NSAP style.

See RFC 1348, RFC 1637, RFC 1706.

Source

pub const SIG: Rtype

For security signature.

Source

pub const KEY: Rtype

For security key.

Source

pub const PX: Rtype

X.400 mail mapping information.

See RFC 2163.

Source

pub const GPOS: Rtype

Geographical position.

See RFC 1712

Source

pub const AAAA: Rtype

IPv6 address.

See RFC 3596.

Source

pub const LOC: Rtype

Location information.

See RFC 1876.

Source

pub const NXT: Rtype

Next domain.

(Obsolete.)

See RFC 3755 and RFC 2535.

Source

pub const EID: Rtype

Endpoint identifier.

Source

pub const NIMLOC: Rtype

Nimrod locator.

Source

pub const SRV: Rtype

Server selection.

See RFC 2782.

Source

pub const ATMA: Rtype

ATM address.

Source

pub const NAPTR: Rtype

Naming authority pointer.

See RFC 2915, RFC 2168, and RFC 3403.

Source

pub const KX: Rtype

Key exchanger.

See RFC 2230.

Source

pub const CERT: Rtype

CERT

See RFC 4398.

Source

pub const A6: Rtype

A6.

(Obsolete – use AAAA.)

See RFC 3226, RFC 2874, and RFC 6563.

Source

pub const DNAME: Rtype

DNAME.

See RFC 6672.

Source

pub const SINK: Rtype

SINK.

Source

pub const OPT: Rtype

OPT.

See RFC 6891 and RFC 3225.

Source

pub const APL: Rtype

APL.

See RFC 3123.

Source

pub const DS: Rtype

Delegation signer.

See RFC 4034 and RFC 3658.

Source

pub const SSHFP: Rtype

SSH key fingerprint.

See RFC 4255.

Source

pub const IPSECKEY: Rtype

IPSECKEY

See RFC 4255.

Source

pub const RRSIG: Rtype

RRSIG.

See RFC 4034 and RFC 3755.

Source

pub const NSEC: Rtype

NSEC.

See RFC 4034 and RFC 3755.

Source

pub const DNSKEY: Rtype

DNSKEY.

See RFC 4034 and RFC 3755.

Source

pub const DHCID: Rtype

DHCID.

See RFC 4701.

Source

pub const NSEC3: Rtype

NSEC3

See RFC 5155.

Source

pub const NSEC3PARAM: Rtype

NSEC3PARAM.

See RFC 5155.

Source

pub const TLSA: Rtype

TLSA.

See RFC 6698.

Source

pub const SMIMEA: Rtype

S/MIME cert association.

See draft-ietf-dane-smime.

Source

pub const HIP: Rtype

Host Identity Protocol.

See RFC 5205.

Source

pub const NINFO: Rtype

NINFO.

Source

pub const RKEY: Rtype

RKEY.

Trust Anchor Link

Source

pub const CDS: Rtype

Child DS.

See RFC 7344.

Source

pub const CDNSKEY: Rtype

DNSKEY(s) the child wants reflected in DS.

See RFC 7344.

Source

pub const OPENPGPKEY: Rtype

OpenPGP key.

See draft-ietf-dane-openpgpkey.

Source

pub const CSYNC: Rtype

Child-to-parent synchronization.

See RFC 7477.

Source

pub const ZONEMD: Rtype

Message digest for DNS zone.

See draft-wessels-dns-zone-digest.

Source

pub const SVCB: Rtype

General Purpose Service Endpoints.

See draft-ietf-dnsop-svcb-httpssvc

Source

pub const HTTPS: Rtype

HTTPS Specific Service Endpoints.

See draft-ietf-dnsop-svcb-httpssvc

Source

pub const SPF: Rtype

SPF.

RFC 7208.

Source

pub const UINFO: Rtype

UINFO.

IANA-Reserved.

Source

pub const UID: Rtype

UID.

IANA-Reserved.

Source

pub const GID: Rtype

GID.

IANA-Reserved.

Source

pub const UNSPEC: Rtype

UNSPEC.

IANA-Reserved.

Source

pub const NID: Rtype

NID.

See RFC 6742.

Source

pub const L32: Rtype

L32.

See RFC 6742.

Source

pub const L64: Rtype

L64.

See RFC 6742.

Source

pub const LP: Rtype

LP.

See RFC 6742.

Source

pub const EUI48: Rtype

An EUI-48 address.

See RFC 7043.

Source

pub const EUI64: Rtype

An EUI-64 address.

See RFC 7043.

Source

pub const NXNAME: Rtype

NXNAME.

IANA-Reserved.

Source

pub const TKEY: Rtype

Transaction key.

See RFC 2930.

Source

pub const TSIG: Rtype

Transaction signature.

See RFC 2845.

Source

pub const IXFR: Rtype

Incremental transfer.

See RFC 1995.

Source

pub const AXFR: Rtype

Transfer of entire zone.

See RFC 1035 and RFC 5936.

Source

pub const MAILB: Rtype

Mailbox-related RRs (MB, MG, or MR).

Source

pub const MAILA: Rtype

Mail agent RRS.

(Obsolete – see MX.)

Source

pub const ANY: Rtype

A request for all records the server/cache has available.

See RFC 1035 and RFC 6895.

Source

pub const URI: Rtype

URI.

See RFC 7553.

Source

pub const CAA: Rtype

Certification Authority Restriction.

See RFC 6844.

Source

pub const AVC: Rtype

Application visibility and control.

Source

pub const DOA: Rtype

Digital Object Architecture

See draft-durand-doa-over-dns.

Source

pub const TA: Rtype

DNSSEC trust authorities.

Source

pub const DLV: Rtype

DNSSEC lookaside validation.

See RFC 4431

Source§

impl Rtype

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 const fn to_mnemonic_str(self) -> Option<&'static str>

Returns the mnemonic as a &str for this value if there is one

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 Rtype

Source

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

Source§

impl Rtype

Source

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

Source§

impl Rtype

Source

pub fn is_glue(&self) -> bool

Returns true if this record type is a type used for Glue records.

See the definition of “glue” in RFC 9499 Section 7 “Zones”.

Trait Implementations§

Source§

impl Clone for Rtype

Source§

fn clone(&self) -> Rtype

Returns a duplicate 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 Rtype

Source§

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

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

impl Display for Rtype

Source§

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

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

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

Source§

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

Converts to this type from the input type.
Source§

impl From<Rtype> for u16

Source§

fn from(value: Rtype) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Rtype

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Rtype

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 Rtype

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 Rtype

Source§

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

Source§

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

Source§

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

Source§

fn fmt(&self, p: &mut impl Formatter) -> Result

Format the item as zonefile fmt into a fmt::Formatter Read more
Source§

fn display_zonefile( &self, display_kind: DisplayKind, ) -> ZoneFileDisplay<'_, Self>

Display the item as a zonefile Read more
Source§

impl Copy for Rtype

Source§

impl Eq for Rtype

Source§

impl StructuralPartialEq for Rtype

Auto Trait Implementations§

§

impl Freeze for Rtype

§

impl RefUnwindSafe for Rtype

§

impl Send for Rtype

§

impl Sync for Rtype

§

impl Unpin for Rtype

§

impl UnwindSafe for Rtype

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> 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.
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