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

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

Variants

INCHHSNONEANYOPT(u16)

Methods

impl DNSClass
[src]

fn from_str(str: &str) -> DecodeResult<Self>

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

fn from_u16(value: u16) -> DecodeResult<Self>

Convert from u16 to DNSClass

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

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

fn for_opt(value: u16) -> Self

Trait Implementations

impl Clone for DNSClass
[src]

fn clone(&self) -> DNSClass

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for DNSClass
[src]

impl Hash for DNSClass
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Eq for DNSClass
[src]

impl PartialEq for DNSClass
[src]

fn eq(&self, __arg_0: &DNSClass) -> bool

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

fn ne(&self, __arg_0: &DNSClass) -> bool

This method tests for !=.

impl Debug for DNSClass
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl BinSerializable<DNSClass> for DNSClass
[src]

fn read(decoder: &mut BinDecoder) -> DecodeResult<Self>

fn emit(&self, encoder: &mut BinEncoder) -> EncodeResult

impl PartialOrd<DNSClass> for DNSClass
[src]

fn partial_cmp(&self, other: &DNSClass) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool
1.0.0

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

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

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

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]

fn cmp(&self, other: &Self) -> Ordering

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