Enum trust_dns_proto::rr::record_type::RecordType
[−]
[src]
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
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
Unknown(u16)
Unknown Record type, or unsupported
ZERO
This corresponds to a record type of 0, unspecified
Methods
impl RecordType
[src]
fn is_any(&self) -> bool
[src]
Returns true if this is an ANY
fn is_cname(&self) -> bool
[src]
Returns true if this is a CNAME
fn is_srv(&self) -> bool
[src]
Returns true if this is an SRV
Trait Implementations
impl Debug for RecordType
[src]
impl PartialEq for RecordType
[src]
fn eq(&self, __arg_0: &RecordType) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RecordType) -> bool
[src]
This method tests for !=
.
impl Eq for RecordType
[src]
impl Hash for RecordType
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Copy for RecordType
[src]
impl Clone for RecordType
[src]
fn clone(&self) -> RecordType
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl FromStr for RecordType
[src]
type Err = ProtoError
The associated error which can be returned from parsing.
fn from_str(str: &str) -> ProtoResult<Self>
[src]
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 From<u16> for RecordType
[src]
fn from(value: u16) -> Self
[src]
Convert from u16
to RecordType
use trust_dns_proto::rr::record_type::RecordType; let var = RecordType::from(1); assert_eq!(RecordType::A, var);
impl BinEncodable for RecordType
[src]
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[src]
Write the type to the stream
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]
Returns the object in binary form
impl<'r> BinDecodable<'r> for RecordType
[src]
fn read(decoder: &mut BinDecoder) -> ProtoResult<Self>
[src]
Read the type from the stream
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
[src]
Returns the object in binary form
impl PartialOrd<RecordType> for RecordType
[src]
fn partial_cmp(&self, other: &RecordType) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for RecordType
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more