[][src]Struct toluol::DnsFlags

pub struct DnsFlags { /* fields omitted */ }

Represents the flags of a DnsHeader.

Implementations

impl DnsFlags[src]

pub fn new(aa: bool, tc: bool, rd: bool, ra: bool, ad: bool, cd: bool) -> Self[src]

Creates a DnsFlags struct from booleans. The meaning of the flags is as follows:

  • aa: authoritative answer (valid in responses only)
  • tc: truncated (set on all truncated messages except last one)
  • rd: recursion desired (copied in answer if supported and accepted)
  • ra: valid in responses, indicating recursive query support in the name server
  • ad: if set in query: indicates interest in the ad bit of the upcoming response; if set in response: indicates that the resolver side considers all RRsets in the Answer section and relevant negative response RRs in the Authority section to be authentic.
  • cd: disable signature validation in a security-aware name server's processing of a particular query

pub fn from_flags(flags: u16) -> Self[src]

Creates a DnsFlags struct from bitflags as they would appear in the second 16-octet line of a DnsHeader.

pub fn as_flags(&self) -> u16[src]

Returns a u16 representing bitflags as they would appear in the second 16-octet line of a DnsHeader.

pub fn aa(&self) -> bool[src]

Whether the aa flag is set.

pub fn tc(&self) -> bool[src]

Whether the tc flag is set.

pub fn rd(&self) -> bool[src]

Whether the rd flag is set.

pub fn ra(&self) -> bool[src]

Whether the ra flag is set.

pub fn ad(&self) -> bool[src]

Whether the ad flag is set.

pub fn cd(&self) -> bool[src]

Whether the cd flag is set.

Auto Trait Implementations

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, 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>,