Enum chrootable_https::RecordType
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§
§impl RecordType
impl RecordType
Trait Implementations§
§impl<'r> BinDecodable<'r> for RecordType
impl<'r> BinDecodable<'r> for RecordType
§fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
§impl BinEncodable for RecordType
impl BinEncodable for RecordType
§impl Clone for RecordType
impl Clone for RecordType
§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 more§impl Debug for RecordType
impl Debug for RecordType
§impl Display for RecordType
impl Display for RecordType
§impl 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);
§fn from(rt: RecordType) -> &'static str
fn from(rt: RecordType) -> &'static str
§impl From<u16> for RecordType
impl From<u16> for RecordType
§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);
§impl FromStr for RecordType
impl FromStr for RecordType
§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);
§impl Hash for RecordType
impl Hash for RecordType
§impl Ord for RecordType
impl Ord for RecordType
§impl PartialEq<RecordType> for RecordType
impl PartialEq<RecordType> for RecordType
§fn eq(&self, other: &RecordType) -> bool
fn eq(&self, other: &RecordType) -> bool
§impl PartialOrd<RecordType> for RecordType
impl PartialOrd<RecordType> for RecordType
§fn partial_cmp(&self, other: &RecordType) -> Option<Ordering>
fn partial_cmp(&self, other: &RecordType) -> Option<Ordering>
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 StructuralEq for RecordType
impl StructuralPartialEq for RecordType
Auto Trait Implementations§
impl RefUnwindSafe for RecordType
impl Send for RecordType
impl Sync for RecordType
impl Unpin for RecordType
impl UnwindSafe for RecordType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.