Enum trust_dns::rr::RecordType [] [src]

pub enum RecordType {
    A,
    AAAA,
    ANY,
    AXFR,
    CAA,
    CNAME,
    IXFR,
    MX,
    NS,
    NULL,
    OPT,
    PTR,
    SOA,
    SRV,
    TLSA,
    TXT,
    DNSSEC(DNSSECRecordType),
    Unknown(u16),
    ZERO,
}

The type of the resource record.

This specifies the type of data in the RData field of the Resource Record

Variants

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 6891 Option

RFC 1035[1] Pointer record

RFC 1035[1] and RFC 2308[9] Start of [a zone of] authority record

RFC 2782 Service locator

RFC 6698 TLSA certificate association

RFC 1035[1] Text record

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 Record type, or unsupported

This corresponds to a record type of 0, unspecified

Methods

impl RecordType
[src]

[src]

Returns true if this is an ANY

[src]

Returns true if this is a CNAME

[src]

Returns true if this is an SRV

[src]

Returns true if this is an A or an AAAA record

Trait Implementations

impl PartialOrd<RecordType> for RecordType
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

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 Copy for RecordType
[src]

impl FromStr for RecordType
[src]

The associated error which can be returned from parsing.

[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 PartialEq<RecordType> for RecordType
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Clone for RecordType
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for RecordType
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Display for RecordType
[src]

[src]

Formats the value using the given formatter. Read more

impl<'r> BinDecodable<'r> for RecordType
[src]

[src]

Read the type from the stream

[src]

Returns the object in binary form

impl BinEncodable for RecordType
[src]

[src]

Write the type to the stream

[src]

Returns the object in binary form

impl Eq for RecordType
[src]

impl Hash for RecordType
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl From<u16> for RecordType
[src]

[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 From<RecordType> for &'static str
[src]

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);

[src]

Performs the conversion.

impl From<RecordType> for u16
[src]

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);

[src]

Performs the conversion.

impl Debug for RecordType
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for RecordType

impl Sync for RecordType