Enum trust_dns::rr::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 From the RFC: Values lower than 512 MUST be treated as equal to 512

Methods

impl DNSClass
[src]

[src]

Convert from u16 to DNSClass

use trust_dns_proto::rr::dns_class::DNSClass;

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

[src]

Return the OPT version from value

Trait Implementations

impl PartialOrd<DNSClass> for DNSClass
[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 DNSClass
[src]

impl FromStr for DNSClass
[src]

The associated error which can be returned from parsing.

[src]

Convert from &str to DNSClass

use std::str::FromStr;
use trust_dns_proto::rr::dns_class::DNSClass;

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

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for DNSClass
[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 DNSClass
[src]

[src]

Formats the value using the given formatter. Read more

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

[src]

Read the type from the stream

[src]

Returns the object in binary form

impl BinEncodable for DNSClass
[src]

[src]

Write the type to the stream

[src]

Returns the object in binary form

impl Eq for DNSClass
[src]

impl Hash for DNSClass
[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<DNSClass> for &'static str
[src]

Convert from DNSClass to &str

use trust_dns_proto::rr::dns_class::DNSClass;

let var: &'static str = DNSClass::IN.into();
assert_eq!("IN", var);

[src]

Performs the conversion.

impl From<DNSClass> for u16
[src]

Convert from DNSClass to u16

use trust_dns_proto::rr::dns_class::DNSClass;

let var: u16 = DNSClass::IN.into();
assert_eq!(1, var);

[src]

Performs the conversion.

impl Debug for DNSClass
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for DNSClass

impl Sync for DNSClass