#[non_exhaustive]pub enum RecordType {
Show 37 variants
A,
AAAA,
ANAME,
ANY,
AXFR,
CAA,
CDS,
CDNSKEY,
CNAME,
CSYNC,
DNSKEY,
DS,
HINFO,
HTTPS,
IXFR,
KEY,
MX,
NAPTR,
NS,
NSEC,
NSEC3,
NSEC3PARAM,
NULL,
OPENPGPKEY,
OPT,
PTR,
RRSIG,
SIG,
SOA,
SRV,
SSHFP,
SVCB,
TLSA,
TSIG,
TXT,
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
A
RFC 1035 IPv4 Address record
AAAA
RFC 3596 IPv6 address record
ANAME
ANY
RFC 1035 All cached records, aka ANY
AXFR
RFC 1035 Authoritative Zone Transfer
CAA
RFC 6844 Certification Authority Authorization
CDS
RFC 7344 Child DS
CDNSKEY
RFC 7344 Child DNSKEY
CNAME
RFC 1035 Canonical name record
CSYNC
RFC 7477 Child-to-parent synchronization record
DNSKEY
RFC 4034 DNS Key record: RSASHA256 and RSASHA512, RFC5702
DS
RFC 4034 Delegation signer: RSASHA256 and RSASHA512, RFC5702
HINFO
RFC 1035 host information
HTTPS
RFC draft-ietf-dnsop-svcb-https-03 DNS SVCB and HTTPS RRs
IXFR
RFC 1996 Incremental Zone Transfer
KEY
MX
RFC 1035 Mail exchange record
NAPTR
RFC 3403 Naming Authority Pointer
NS
RFC 1035 Name server record
NSEC
RFC 4034 Next-Secure record
NSEC3
RFC 5155 NSEC record version 3
NSEC3PARAM
RFC 5155 NSEC3 parameters
NULL
RFC 1035 Null server record, for testing
OPENPGPKEY
RFC 7929 OpenPGP public key
OPT
RFC 6891 Option
PTR
RFC 1035 Pointer record
RRSIG
RFC 4034 DNSSEC signature: RSASHA256 and RSASHA512, RFC5702
SIG
SOA
SRV
RFC 2782 Service locator
SSHFP
RFC 4255 SSH Public Key Fingerprint
SVCB
RFC draft-ietf-dnsop-svcb-https-03 DNS SVCB and HTTPS RRs
TLSA
RFC 6698 TLSA certificate association
TSIG
RFC 8945 Transaction Signature
TXT
RFC 1035 Text record
Unknown(u16)
Unknown Record type, or unsupported
ZERO
This corresponds to a record type of 0, unspecified
Implementations§
Source§impl RecordType
impl RecordType
Sourcepub fn is_ip_addr(self) -> bool
pub fn is_ip_addr(self) -> bool
Returns true if this is an A or an AAAA record
Trait Implementations§
Source§impl<'r> BinDecodable<'r> for RecordType
impl<'r> BinDecodable<'r> for RecordType
Source§fn read(decoder: &mut BinDecoder<'_>) -> ProtoResult<Self>
fn read(decoder: &mut BinDecoder<'_>) -> ProtoResult<Self>
Source§fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
Source§impl BinEncodable for RecordType
impl BinEncodable for RecordType
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
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<RecordType> for u16
Convert from RecordType
to u16
impl From<RecordType> for u16
Convert from RecordType
to u16
use std::convert::From;
use trust_dns_proto::rr::record_type::RecordType;
let var: u16 = RecordType::A.into();
assert_eq!(1, var);
Source§fn from(rt: RecordType) -> Self
fn from(rt: RecordType) -> Self
Source§impl From<u16> for RecordType
impl From<u16> for RecordType
Source§impl FromStr for RecordType
impl FromStr for RecordType
Source§fn from_str(str: &str) -> ProtoResult<Self>
fn from_str(str: &str) -> ProtoResult<Self>
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);