pub enum RecordType {
A,
AAAA,
ANY,
AXFR,
CAA,
CNAME,
IXFR,
MX,
NS,
NULL,
OPT,
PTR,
SOA,
SRV,
TLSA,
TXT,
Unknown(u16),
ZERO,
}
The type of the resource record.
This specifies the type of data in the RData field of the Resource Record
RFC 1035[1] IPv4 Address record
RFC 3596[2] IPv6 address record
RFC 1035[1] All cached records, aka ANY
RFC 1035[1] Authoritative Zone Transfer
RFC 6844 Certification Authority Authorization
RFC 1035[1] Canonical name record
RFC 1996 Incremental Zone Transfer
RFC 1035[1] Mail exchange record
RFC 1035[1] Name server record
RFC 1035[1] Null server record, for testing
RFC 1035[1] Pointer record
RFC 1035[1] and RFC 2308[9] Start of [a zone of] authority record
RFC 6698 TLSA certificate association
Unknown Record type, or unsupported
This corresponds to a record type of 0, unspecified
Returns true if this is an ANY
Returns true if this is a CNAME
Returns true if this is an SRV
Returns true if this is an A or an AAAA record
Write the type to the stream
Returns the object in binary form
Read the type from the stream
Returns the object in binary form
Performs copy-assignment from source
. Read more
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Convert from u16
to RecordType
use trust_dns_proto::rr::record_type::RecordType;
let var = RecordType::from(1);
assert_eq!(RecordType::A, var);
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);
Convert from RecordType to &str
use std::convert::From;
use trust_dns_proto::rr::record_type::RecordType;
let var: u16 = RecordType::A.into();
assert_eq!(1, var);
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
The associated error which can be returned from parsing.
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);
Converts the given value to a String
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static