pub enum RecordType {
Show 23 variants
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,
}
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
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
Implementations§
Source§impl RecordType
impl RecordType
Trait Implementations§
Source§impl BinEncodable for RecordType
impl BinEncodable for RecordType
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Source§impl<'r> BinDecodable<'r> for RecordType
impl<'r> BinDecodable<'r> for RecordType
Source§fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
Source§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Source§impl Clone for RecordType
impl Clone for RecordType
Source§fn clone(&self) -> RecordType
fn clone(&self) -> RecordType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RecordType
impl Debug for RecordType
Source§impl Display for RecordType
impl Display for RecordType
Source§impl From<RecordType> for &'static str
Convert from RecordType
to &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);
Source§fn from(rt: RecordType) -> &'static str
fn from(rt: RecordType) -> &'static str
Source§impl From<u16> for RecordType
impl From<u16> for RecordType
Source§fn 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);
Source§impl FromStr for RecordType
impl FromStr for RecordType
Source§fn 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);
Source§type Err = ProtoError
type Err = ProtoError
Source§impl Hash for RecordType
impl Hash for RecordType
Source§impl Ord for RecordType
impl Ord for RecordType
Source§fn cmp(&self, other: &RecordType) -> Ordering
fn cmp(&self, other: &RecordType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RecordType
impl PartialEq for RecordType
Source§impl PartialOrd for RecordType
impl PartialOrd for RecordType
impl Copy for RecordType
impl Eq for RecordType
impl StructuralPartialEq for RecordType
Auto Trait Implementations§
impl Freeze for RecordType
impl RefUnwindSafe for RecordType
impl Send for RecordType
impl Sync for RecordType
impl Unpin for RecordType
impl UnwindSafe for RecordType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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