pub struct DnsFlags {
pub flags: u16,
}
Expand description
Represents the flags of a DnsHeader
.
Fields
flags: u16
Implementations
sourceimpl DnsFlags
impl DnsFlags
sourcepub fn new(aa: bool, tc: bool, rd: bool, ra: bool, ad: bool, cd: bool) -> Self
pub fn new(aa: bool, tc: bool, rd: bool, ra: bool, ad: bool, cd: bool) -> Self
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 serverad
: 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
sourcepub fn from_flags(flags: u16) -> Self
pub fn from_flags(flags: u16) -> Self
Creates a DnsFlags
struct from bitflags as they would appear in the second 16-octet line of a DnsHeader
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DnsFlags
impl Send for DnsFlags
impl Sync for DnsFlags
impl Unpin for DnsFlags
impl UnwindSafe for DnsFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more