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.“,
sourcepub const HS: Class = _
pub const HS: Class = _
Hesiod (HS).
A system information protocol part of MIT’s Project Athena.“,
source§impl Class
impl Class
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.
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub const COMPOSE_LEN: u16 = 2u16
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Trait Implementations§
source§impl Ord for Class
impl Ord for Class
source§impl PartialOrd for Class
impl PartialOrd for Class
impl Copy for Class
impl Eq for Class
impl StructuralPartialEq for Class
Auto Trait Implementations§
impl Freeze for Class
impl RefUnwindSafe for Class
impl Send for Class
impl Sync for Class
impl Unpin for Class
impl UnwindSafe for Class
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)