Enum hickory_proto::rr::record_type::RecordType
source · #[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
impl From<RecordType> for &'static str
Convert from RecordType
to &str
use hickory_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
impl From<RecordType> for u16
Convert from RecordType
to u16
use hickory_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 hickory_proto::rr::record_type::RecordType;
let var: RecordType = RecordType::from_str("A").unwrap();
assert_eq!(RecordType::A, var);
§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§impl PartialEq for RecordType
impl PartialEq for RecordType
source§fn eq(&self, other: &RecordType) -> bool
fn eq(&self, other: &RecordType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RecordType
impl PartialOrd for RecordType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl 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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.