Enum trust_dns::rr::dns_class::DNSClass [] [src]

pub enum DNSClass {
    IN,
    CH,
    HS,
    NONE,
    ANY,
    OPT(u16),
}

The DNS Record class

Variants

Internet

Chaos

Hesiod

QCLASS NONE

QCLASS * (ANY)

Special class for OPT Version, it was overloaded for EDNS - RFC 6891

Methods

impl DNSClass
[src]

Convert from &str to DNSClass

use trust_dns::rr::dns_class::DNSClass;

let var: DNSClass = DNSClass::from_str("IN").unwrap();
assert_eq!(DNSClass::IN, var);

Convert from u16 to DNSClass

use trust_dns::rr::dns_class::DNSClass;

let var = DNSClass::from_u16(1).unwrap();
assert_eq!(DNSClass::IN, var);

Return the OPT version from value

Trait Implementations

impl Debug for DNSClass
[src]

Formats the value using the given formatter.

impl PartialEq for DNSClass
[src]

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

This method tests for !=.

impl Eq for DNSClass
[src]

impl Hash for DNSClass
[src]

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

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

impl Copy for DNSClass
[src]

impl Clone for DNSClass
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl BinSerializable<DNSClass> for DNSClass
[src]

Read the type from the stream

Write the type to the stream

impl PartialOrd<DNSClass> for DNSClass
[src]

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

impl Ord for DNSClass
[src]

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