pub struct Class(/* private fields */);Expand description
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.
Implementations§
Source§impl Class
impl Class
Sourcepub const IN: Class
pub const IN: Class
Internet (IN).
This class is defined in RFC 1035 and really the only one relevant at all.
Sourcepub const CH: Class
pub const CH: Class
Chaosnet (CH).
A network protocol developed at MIT in the 1970s. Reused by BIND for built-in server information zones.“,
Source§impl Class
impl Class
pub const COMPOSE_LEN: u16 = 2u16
Sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
Sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const 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.