Enum domain::iana::class::Class [−][src]
pub enum Class { In, Ch, Hs, None, Any, Int(u16), }
DNS CLASSes.
The domain name space is partitioned into separate classes for different network types. That is, each class has its own separate record tree starting at the root. However, in practice, only the IN class is really relevant.
In addition, there are query classes or QCLASSes that are used in questions or UPDATE queries, namely NONE and ANY (or *).
Classes are represented by a 16 bit value. The enum wraps these values.
See RFC 1034 for the introduction of classes, section 3.2 of RFC 6895 for a discussion of the current state of afairs, and the DNS CLASSes IANA registry for an overview of assigned values.
Variants
In
Internet (IN).
This class is defined in RFC 1035 and really the only one relevant at all.
Ch
Chaosnet (CH).
A network protocol developed at MIT in the 1970s. Reused by BIND for built-in server information zones.",
Hs
Hesiod (HS).
A system information protocol part of MIT's Project Athena.",
None
Query class None.
Defined in RFC 2136, this class is used in UPDATE queries to require that an RRset does not exist prior to the update.",
Any
Query class * (ANY).
This class can be used in a query to indicate that records for the given name from any class are requested.",
Int(u16)
A raw value given through its integer.
Methods
impl Class
[src]
impl Class
pub fn from_int(value: u16) -> Self
[src]
pub fn from_int(value: u16) -> Self
Returns a value from its raw integer value.
pub fn to_int(self) -> u16
[src]
pub fn to_int(self) -> u16
Returns the raw integer value for a value.
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
[src]
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
pub fn to_mnemonic(self) -> Option<&'static [u8]>
[src]
pub fn to_mnemonic(self) -> Option<&'static [u8]>
Returns the mnemonic for this value if there is one.
This will also return a mnemonic if a well-defined variant
is hidden in a Int
variant.
impl Class
[src]
impl Class
impl Class
[src]
impl Class
pub fn parse(parser: &mut Parser) -> ParseResult<Self>
[src]
pub fn parse(parser: &mut Parser) -> ParseResult<Self>
pub fn compose<C: AsMut<Composer>>(&self, composer: C) -> ComposeResult<()>
[src]
pub fn compose<C: AsMut<Composer>>(&self, composer: C) -> ComposeResult<()>
pub fn scan<S: Scanner>(scanner: &mut S) -> ScanResult<Self>
[src]
pub fn scan<S: Scanner>(scanner: &mut S) -> ScanResult<Self>
Trait Implementations
impl Clone for Class
[src]
impl Clone for Class
fn clone(&self) -> Class
[src]
fn clone(&self) -> Class
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Class
[src]
impl Copy for Class
impl Debug for Class
[src]
impl Debug for Class
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<u16> for Class
[src]
impl From<u16> for Class
impl From<Class> for u16
[src]
impl From<Class> for u16
impl<'a> From<&'a Class> for u16
[src]
impl<'a> From<&'a Class> for u16
impl PartialEq for Class
[src]
impl PartialEq for Class
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<u16> for Class
[src]
impl PartialEq<u16> for Class
fn eq(&self, other: &u16) -> bool
[src]
fn eq(&self, other: &u16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<Class> for u16
[src]
impl PartialEq<Class> for u16
fn eq(&self, other: &Class) -> bool
[src]
fn eq(&self, other: &Class) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for Class
[src]
impl Eq for Class
impl PartialOrd for Class
[src]
impl PartialOrd for Class
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> 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[src]
fn lt(&self, other: &Rhs) -> bool
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[src]
fn le(&self, other: &Rhs) -> bool
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[src]
fn gt(&self, other: &Rhs) -> bool
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[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<u16> for Class
[src]
impl PartialOrd<u16> for Class
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &u16) -> 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[src]
fn lt(&self, other: &Rhs) -> bool
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[src]
fn le(&self, other: &Rhs) -> bool
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[src]
fn gt(&self, other: &Rhs) -> bool
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[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<Class> for u16
[src]
impl PartialOrd<Class> for u16
fn partial_cmp(&self, other: &Class) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Class) -> 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[src]
fn lt(&self, other: &Rhs) -> bool
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[src]
fn le(&self, other: &Rhs) -> bool
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[src]
fn gt(&self, other: &Rhs) -> bool
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[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Class
[src]
impl Ord for Class
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Class
[src]
impl Hash for Class
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &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[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromStr for Class
[src]
impl FromStr for Class
type Err = FromStrError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Display for Class
[src]
impl Display for Class