[][src]Enum domain::base::iana::class::Class

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. This type is complete as of the registry update of 2019-01-28.

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.

Implementations

impl Class[src]

pub fn from_int(value: u16) -> Self[src]

Returns a value from its raw integer value.

pub fn to_int(self) -> u16[src]

Returns the raw integer value for a value.

pub fn from_mnemonic(m: &[u8]) -> Option<Self>[src]

Returns a value from a well-defined mnemonic.

pub fn to_mnemonic(self) -> Option<&'static [u8]>[src]

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]

pub fn from_bytes(bytes: &[u8]) -> Option<Self>[src]

Trait Implementations

impl Clone for Class[src]

impl Compose for Class[src]

impl Copy for Class[src]

impl Debug for Class[src]

impl Display for Class[src]

impl Eq for Class[src]

impl<'a> From<&'a Class> for u16[src]

impl From<Class> for u16[src]

impl From<u16> for Class[src]

impl FromStr for Class[src]

type Err = FromStrError

The associated error which can be returned from parsing.

impl Hash for Class[src]

impl Ord for Class[src]

impl<Ref: AsRef<[u8]>> Parse<Ref> for Class[src]

impl PartialEq<Class> for Class[src]

impl PartialEq<Class> for u16[src]

impl PartialEq<u16> for Class[src]

impl PartialOrd<Class> for Class[src]

impl PartialOrd<Class> for u16[src]

impl PartialOrd<u16> for Class[src]

Auto Trait Implementations

impl RefUnwindSafe for Class

impl Send for Class

impl Sync for Class

impl Unpin for Class

impl UnwindSafe for Class

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,