Enum trust_dns::rr::dns_class::DNSClass
[−]
[src]
pub enum DNSClass { IN, CH, HS, NONE, ANY, OPT(u16), }
The DNS Record class
Variants
IN
Internet
CH
Chaos
HS
Hesiod
NONE
QCLASS NONE
ANY
QCLASS * (ANY)
OPT(u16)
Special class for OPT Version, it was overloaded for EDNS - RFC 6891
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
Return the OPT version from value
Trait Implementations
impl Debug 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 Eq for DNSClass
[src]
impl Hash for DNSClass
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Copy for DNSClass
[src]
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 BinSerializable<DNSClass> for DNSClass
[src]
fn read(decoder: &mut BinDecoder) -> DecodeResult<Self>
Read the type from the stream
fn emit(&self, encoder: &mut BinEncoder) -> EncodeResult
Write the type to the stream
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
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more