[][src]Enum trust_dns::rr::record_type::RecordType

pub enum RecordType {
    A,
    AAAA,
    ANAME,
    ANY,
    AXFR,
    CAA,
    CNAME,
    IXFR,
    MX,
    NAPTR,
    NS,
    NULL,
    OPENPGPKEY,
    OPT,
    PTR,
    SOA,
    SRV,
    SSHFP,
    TLSA,
    TXT,
    DNSSEC(DNSSECRecordType),
    Unknown(u16),
    ZERO,
}

The type of the resource record.

This specifies the type of data in the RData field of the Resource Record

Variants

A

RFC 1035[1] IPv4 Address record

AAAA

RFC 3596[2] IPv6 address record

ANAME

ANAME draft-ietf-dnsop-aname

ANY

RFC 1035[1] All cached records, aka ANY

AXFR

RFC 1035[1] Authoritative Zone Transfer

CAA

RFC 6844 Certification Authority Authorization

CNAME

RFC 1035[1] Canonical name record

IXFR

RFC 1996 Incremental Zone Transfer

MX

RFC 1035[1] Mail exchange record

NAPTR

RFC 3403 Naming Authority Pointer

NS

RFC 1035[1] Name server record

NULL

RFC 1035[1] Null server record, for testing

OPENPGPKEY

RFC 7929 OpenPGP public key

OPT

RFC 6891 Option

PTR

RFC 1035[1] Pointer record

SOA

RFC 1035[1] and RFC 2308[9] Start of [a zone of] authority record

SRV

RFC 2782 Service locator

SSHFP

RFC 4255 SSH Public Key Fingerprint

TLSA

RFC 6698 TLSA certificate association

TXT

RFC 1035[1] Text record

DNSSEC(DNSSECRecordType)

A DNSSEC- or SIG(0)- specific record type.

These types are in DNSSECRecordType to make them easy to disable when crypto functionality isn't needed.

Unknown(u16)

Unknown Record type, or unsupported

ZERO

This corresponds to a record type of 0, unspecified

Methods

impl RecordType[src]

pub fn is_any(self) -> bool[src]

Returns true if this is an ANY

pub fn is_cname(self) -> bool[src]

Returns true if this is a CNAME

pub fn is_srv(self) -> bool[src]

Returns true if this is an SRV

pub fn is_ip_addr(self) -> bool[src]

Returns true if this is an A or an AAAA record

Trait Implementations

impl Debug for RecordType[src]

impl Hash for RecordType[src]

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

Feeds a slice of this type into the given [Hasher]. Read more

impl Copy for RecordType[src]

impl Clone for RecordType[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<RecordType> for RecordType[src]

impl Ord for RecordType[src]

default fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

default fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

default fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl FromStr for RecordType[src]

type Err = ProtoError

The associated error which can be returned from parsing.

fn from_str(str: &str) -> Result<RecordType, ProtoError>[src]

Convert &str to RecordType

use std::str::FromStr;
use trust_dns_proto::rr::record_type::RecordType;

let var: RecordType = RecordType::from_str("A").unwrap();
assert_eq!(RecordType::A, var);

impl Eq for RecordType[src]

impl PartialOrd<RecordType> for RecordType[src]

#[must_use]
default fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
default fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
default fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
default fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl From<u16> for RecordType[src]

fn from(value: u16) -> RecordType[src]

Convert from u16 to RecordType

use trust_dns_proto::rr::record_type::RecordType;

let var = RecordType::from(1);
assert_eq!(RecordType::A, var);

impl<'r> BinDecodable<'r> for RecordType[src]

default fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>[src]

Returns the object in binary form

impl Display for RecordType[src]

impl BinEncodable for RecordType[src]

default fn to_bytes(&self) -> Result<Vec<u8>, ProtoError>[src]

Returns the object in binary form

Auto Trait Implementations

impl Send for RecordType

impl Sync for RecordType

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Erased for T