#[repr(u16)]pub enum QClass {
IN = 1,
CS = 2,
CH = 3,
HS = 4,
ALL = 255,
}
Expand description
A two octet code that specifies the class of the query.
Variants§
IN = 1
the Internet 1
CS = 2
the CSNET class (Obsolete) 2
CH = 3
the CHAOS class 3
HS = 4
Hesiod [Dyer 87] 4
ALL = 255
any class 255
Implementations§
Source§impl QClass
impl QClass
Sourcepub fn u16_to_qclass(value: u16) -> CDnsResult<QClass>
pub fn u16_to_qclass(value: u16) -> CDnsResult<QClass>
Converts u16 to enum QClass.
QCLASS fields appear in the question part of a query. QCLASS are a superset of CLASSes, hence all CLASSes are valid QCLASSes.
Sourcepub fn u16_to_class(value: u16) -> CDnsResult<QClass>
pub fn u16_to_class(value: u16) -> CDnsResult<QClass>
Converts u16 to enum QClass, but for the response part of a query.
Trait Implementations§
impl Copy for QClass
impl Eq for QClass
impl StructuralPartialEq for QClass
Auto Trait Implementations§
impl Freeze for QClass
impl RefUnwindSafe for QClass
impl Send for QClass
impl Sync for QClass
impl Unpin for QClass
impl UnwindSafe for QClass
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
Mutably borrows from an owned value. Read more