Enum trust_dns::rr::RecordType
source · pub enum RecordType {
Show 19 variants
A,
AAAA,
ANY,
AXFR,
CAA,
CNAME,
IXFR,
MX,
NS,
NULL,
OPT,
PTR,
SOA,
SRV,
TLSA,
TXT,
DNSSEC(DNSSECRecordType),
Unknown(u16),
ZERO,
}
Expand description
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
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
NS
RFC 1035[1] Name server record
NULL
RFC 1035[1] Null server record, for testing
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
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
Implementations
sourceimpl RecordType
impl RecordType
Trait Implementations
sourceimpl<'r> BinDecodable<'r> for RecordType
impl<'r> BinDecodable<'r> for RecordType
sourcefn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
sourcefn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
sourceimpl BinEncodable for RecordType
impl BinEncodable for RecordType
sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
sourceimpl Clone for RecordType
impl Clone for RecordType
sourcefn clone(&self) -> RecordType
fn clone(&self) -> RecordType
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for RecordType
impl Debug for RecordType
sourceimpl Display for RecordType
impl Display for RecordType
sourceimpl From<RecordType> for &'static str
impl From<RecordType> for &'static str
Convert from RecordType to &str
use std::convert::From;
use trust_dns_proto::rr::record_type::RecordType;
let var: &'static str = From::from(RecordType::A);
assert_eq!("A", var);
let var: &'static str = RecordType::A.into();
assert_eq!("A", var);
sourcefn from(rt: RecordType) -> &'static str
fn from(rt: RecordType) -> &'static str
sourceimpl From<u16> for RecordType
impl From<u16> for RecordType
sourcefn from(value: u16) -> RecordType
fn from(value: u16) -> RecordType
Convert from u16
to RecordType
use trust_dns_proto::rr::record_type::RecordType;
let var = RecordType::from(1);
assert_eq!(RecordType::A, var);
sourceimpl FromStr for RecordType
impl FromStr for RecordType
sourcefn from_str(str: &str) -> Result<RecordType, ProtoError>
fn from_str(str: &str) -> Result<RecordType, ProtoError>
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);
type Err = ProtoError
type Err = ProtoError
sourceimpl Hash for RecordType
impl Hash for RecordType
sourceimpl Ord for RecordType
impl Ord for RecordType
sourcefn cmp(&self, other: &RecordType) -> Ordering
fn cmp(&self, other: &RecordType) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<RecordType> for RecordType
impl PartialEq<RecordType> for RecordType
sourcefn eq(&self, other: &RecordType) -> bool
fn eq(&self, other: &RecordType) -> bool
sourceimpl PartialOrd<RecordType> for RecordType
impl PartialOrd<RecordType> for RecordType
sourcefn partial_cmp(&self, other: &RecordType) -> Option<Ordering>
fn partial_cmp(&self, other: &RecordType) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more