Enum trust_dns_client::rr::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
sourceimpl 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
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>
Read the type from the stream
sourcefn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
sourceimpl BinEncodable for RecordType
impl BinEncodable for RecordType
sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
sourceimpl Clone for RecordType
impl Clone for RecordType
sourcefn clone(&self) -> RecordType
fn clone(&self) -> RecordType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
Converts to this type from the input type.
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
The associated error which can be returned from parsing.
sourceimpl Hash for RecordType
impl Hash for RecordType
sourceimpl Ord for RecordType
impl Ord for RecordType
sourceimpl PartialEq<RecordType> for RecordType
impl PartialEq<RecordType> for RecordType
sourcefn eq(&self, other: &RecordType) -> bool
fn eq(&self, other: &RecordType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RecordType) -> bool
fn ne(&self, other: &RecordType) -> bool
This method tests for !=
.
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more