Skip to main content

RecordType

Enum RecordType 

#[non_exhaustive]
pub enum RecordType {
Show 102 variants Reserved, A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL, WKS, PTR, HINFO, MINFO, MX, TXT, RP, AFSDB, X25, ISDN, RT, NSAP, NSAP_PTR, SIG, KEY, PX, GPOS, AAAA, LOC, NXT, EID, NIMLOC, SRV, ATMA, NAPTR, KX, CERT, A6, DNAME, SINK, OPT, APL, DS, SSHFP, IPSECKEY, RRSIG, NSEC, DNSKEY, DHCID, NSEC3, NSEC3PARAM, TLSA, SMIMEA, HIP, NINFO, RKEY, TALINK, CDS, CDNSKEY, OPENPGPKEY, CSYNC, ZONEMD, SVCB, HTTPS, DSYNC, HHIT, BRID, UNECE, ISO, SPF, UINFO, UID, GID, UNSPEC, NID, L32, L64, LP, EUI48, EUI64, NXNAME, TKEY, TSIG, IXFR, AXFR, MAILB, MAILA, ANY, URI, CAA, AVC, DOA, AMTRELAY, RESINFO, WALLET, CLA, IPN, TA, DLV, ReservedMax, Unknown(u16),
}
Available on crate features dns and std only.
Expand description

A DNS resource-record type from the IANA DNS Parameters registry.

Assigned values are represented explicitly. Unassigned, private-use, and future values are retained by RecordType::Unknown.

This list reflects a snapshot of the IANA Resource Record (RR) TYPEs registry taken on 2026-08-28.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Reserved

Provides the reserved type-zero marker, never for ordinary records.

§

A

Maps a name to an IPv4 host address.

§

NS

Names an authoritative server for a zone.

§

MD

Names an obsolete mail destination superseded by MX.

§

MF

Names an obsolete mail forwarder superseded by MX.

§

CNAME

Gives the canonical name for an alias.

§

SOA

Describes a zone’s authority and synchronization metadata.

§

MB

Names an experimental mailbox domain.

§

MG

Names an experimental mail-group member.

§

MR

Names an experimental mailbox rename target.

§

NULL

Carries experimental opaque data without defined semantics.

§

WKS

Describes well-known services available at an IPv4 address.

§

PTR

Points one DNS name to another.

§

HINFO

Describes a host’s CPU and operating system.

§

MINFO

Provides mailbox or mailing-list administration information.

§

MX

Selects mail exchange servers by preference.

§

TXT

Carries one or more text strings.

§

RP

Identifies a domain’s responsible person.

§

AFSDB

Locates an AFS or DCE database server.

§

X25

Carries an X.25 PSDN address.

§

ISDN

Carries an ISDN address and optional subaddress.

§

RT

Selects an intermediate host through which packets should route.

§

NSAP

Carries a deprecated OSI NSAP address.

§

NSAP_PTR

Provides a deprecated reverse mapping for an OSI NSAP address.

§

SIG

Carries a legacy DNS security signature.

§

KEY

Carries a legacy DNS security key.

§

PX

Maps between X.400 and RFC 822 mail addresses.

§

GPOS

Carries geographical position coordinates.

§

AAAA

Maps a name to an IPv6 host address.

§

LOC

Describes a geographical location and its precision.

§

NXT

Carries an obsolete DNSSEC next-domain proof.

§

EID

Carries a Nimrod endpoint identifier.

§

NIMLOC

Carries a Nimrod locator.

§

SRV

Selects service endpoints by priority, weight, port, and target.

§

ATMA

Carries an ATM network address.

§

NAPTR

Carries naming-authority rewrite and delegation rules.

§

KX

Selects a key-exchange server by preference.

§

CERT

Publishes certificates and certificate revocation lists.

§

A6

Carries an obsolete chained IPv6 address superseded by AAAA.

§

DNAME

Aliases an entire DNS name subtree.

§

SINK

Carries experimental kitchen-sink data.

§

OPT

Represents the EDNS pseudo-record and its options.

§

APL

Carries an address-prefix list.

§

DS

Publishes a DNSSEC delegation signer digest.

§

SSHFP

Publishes an SSH host-key fingerprint.

§

IPSECKEY

Publishes IPsec gateway and public-key information.

§

RRSIG

Carries a DNSSEC signature over an RRset.

§

NSEC

Authenticates DNSSEC denial of existence and covered record types.

§

DNSKEY

Publishes a DNSSEC zone public key.

§

DHCID

Associates a DNS name with a DHCP client identity.

§

NSEC3

Authenticates denial of existence using hashed owner names.

§

NSEC3PARAM

Publishes a zone’s NSEC3 hashing parameters.

§

TLSA

Publishes a TLS certificate association for DANE.

§

SMIMEA

Publishes an S/MIME certificate association.

§

HIP

Publishes Host Identity Protocol identities and rendezvous servers.

§

NINFO

Publishes descriptive zone-status text.

§

RKEY

Publishes application keys for encrypted DNS data.

Links adjacent entries in DNSSEC trust-anchor history.

§

CDS

Requests that a parent publish a child-selected DS record.

§

CDNSKEY

Publishes a child DNSKEY for conversion into a parent DS record.

§

OPENPGPKEY

Publishes an OpenPGP public key.

§

CSYNC

Communicates child-to-parent DNS synchronization data.

§

ZONEMD

Publishes a digest over zone data.

§

SVCB

Publishes a general-purpose service binding.

§

HTTPS

Publishes an HTTP-specific service binding.

§

DSYNC

Discovers endpoints for DNS delegation synchronization.

§

HHIT

Publishes a Hierarchical Host Identity Tag’s verification material.

§

BRID

Publishes unmanned-aircraft Broadcast Remote Identification data.

§

UNECE

Carries a value coded by a UNECE Recommendation.

§

ISO

Carries a value coded by an ISO standard.

§

SPF

Carries obsolete Sender Policy Framework policy data.

§

UINFO

Retains the IANA-reserved UINFO code point.

§

UID

Retains the IANA-reserved UID code point.

§

GID

Retains the IANA-reserved GID code point.

§

UNSPEC

Retains the IANA-reserved UNSPEC code point.

§

NID

Publishes an Identifier-Locator Network Protocol node identifier.

§

L32

Publishes a 32-bit Identifier-Locator Network Protocol locator.

§

L64

Publishes a 64-bit Identifier-Locator Network Protocol locator.

§

LP

Selects Identifier-Locator Network Protocol locators by preference.

§

EUI48

Publishes an IEEE EUI-48 address.

§

EUI64

Publishes an IEEE EUI-64 address.

§

NXNAME

Signals NXDOMAIN in compact authenticated denial responses.

§

TKEY

Negotiates transaction authentication keys.

§

TSIG

Authenticates a DNS transaction message.

§

IXFR

Requests an incremental zone transfer.

§

AXFR

Requests a complete zone transfer.

§

MAILB

Requests mailbox-related MB, MG, or MR records.

§

MAILA

Requests obsolete mail-agent records superseded by MX.

§

ANY

Requests some or all available record types.

§

URI

Publishes a service URI with priority and weight.

§

CAA

Restricts which certification authorities may issue certificates.

§

AVC

Publishes Application Visibility and Control data.

§

DOA

Publishes Digital Object Architecture data.

§

AMTRELAY

Discovers an Automatic Multicast Tunneling relay.

§

RESINFO

Publishes resolver information as key-value pairs.

§

WALLET

Publishes a public wallet address.

§

CLA

Publishes a Bundle Protocol convergence-layer adapter.

§

IPN

Publishes a Bundle Protocol node number.

§

TA

Publishes DNSSEC trust-authority information.

§

DLV

Publishes obsolete DNSSEC lookaside-validation anchors.

§

ReservedMax

Reserves type 65535 for future standards action.

§

Unknown(u16)

Retains an unrecognized numeric value.

Implementations§

§

impl RecordType

pub fn variant_name(&self) -> Cow<'static, str>

Return this value’s variant name, or its decimal number when the value is unknown.

Known values borrow their 'static mnemonic, and unknown values render their numeric value. Unlike Display and Debug the result is a bare, stable label, suitable for log fields, metrics, and telemetry.

Trait Implementations§

§

impl Clone for RecordType

§

fn clone(&self) -> RecordType

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
§

impl Copy for RecordType

§

impl Debug for RecordType

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for RecordType

§

fn deserialize<D>( deserializer: D, ) -> Result<RecordType, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for RecordType

§

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

Formats the value using the given formatter. Read more
§

impl Eq for RecordType

§

impl From<RecordType> for u16

§

fn from(value: RecordType) -> u16

Converts to this type from the input type.
§

impl From<u16> for RecordType

§

fn from(x: u16) -> RecordType

Converts to this type from the input type.
§

impl Hash for RecordType

§

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

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
§

impl LowerHex for RecordType

§

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

Formats the value using the given formatter. Read more
§

impl Ord for RecordType

§

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

Compare by numeric value, then distinguish colliding variants.

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§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
§

impl PartialEq for RecordType

§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
§

impl PartialOrd for RecordType

§

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

impl Serialize for RecordType

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for RecordType

§

impl UpperHex for RecordType

§

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

Formats the value using the given formatter. Read more

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

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<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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a rama_grpc::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

impl<T, U> RamaFrom<T> for U
where U: From<T>,

§

fn rama_from(value: T) -> U

§

impl<T, U, CrateMarker> RamaInto<U, CrateMarker> for T
where U: RamaFrom<T, CrateMarker>,

§

fn rama_into(self) -> U

§

impl<T, U> RamaTryFrom<T> for U
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

§

fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>

§

impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for T
where U: RamaTryFrom<T, CrateMarker>,

§

type Error = <U as RamaTryFrom<T, CrateMarker>>::Error

§

fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

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
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<V, F> ValueFormatter<&V> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &&V)

Write value to writer
§

impl<V, F> ValueFormatter<Arc<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Arc<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Box<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Box<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Cow<'_, V>> for F
where V: ToOwned + ?Sized, F: ValueFormatter<V> + ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)

Write value to writer
§

impl<V, F> ValueFormatter<Option<V>> for F
where F: ValueFormatter<V> + ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Option<V>)

Write value to writer
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more