Struct dns_protocol::Flags
source · [−]#[repr(transparent)]pub struct Flags(_);Expand description
The flags associated with a DNS message.
Implementations
sourceimpl Flags
impl Flags
sourcepub const fn standard_query() -> Self
pub const fn standard_query() -> Self
Use the standard set of flags for a DNS query.
This is identical to new() but uses recursive querying.
sourcepub fn qr(&self) -> MessageType
pub fn qr(&self) -> MessageType
Get the query/response flag.
sourcepub fn set_qr(&mut self, qr: MessageType) -> &mut Self
pub fn set_qr(&mut self, qr: MessageType) -> &mut Self
Set the message’s query/response flag.
sourcepub fn set_opcode(&mut self, opcode: Opcode)
pub fn set_opcode(&mut self, opcode: Opcode)
Set the opcode.
Get whether this message is authoritative.
Set whether this message is authoritative.
sourcepub fn set_truncated(&mut self, truncated: bool) -> &mut Self
pub fn set_truncated(&mut self, truncated: bool) -> &mut Self
Set whether this message is truncated.
sourcepub fn set_recursive(&mut self, recursive: bool) -> &mut Self
pub fn set_recursive(&mut self, recursive: bool) -> &mut Self
Set whether this message is recursive.
sourcepub fn recursion_available(&self) -> bool
pub fn recursion_available(&self) -> bool
Get whether recursion is available for this message.
sourcepub fn set_recursion_available(&mut self, recursion_available: bool) -> &mut Self
pub fn set_recursion_available(&mut self, recursion_available: bool) -> &mut Self
Set whether recursion is available for this message.
sourcepub fn response_code(&self) -> ResponseCode
pub fn response_code(&self) -> ResponseCode
Get the response code.
sourcepub fn set_response_code(&mut self, response_code: ResponseCode) -> &mut Self
pub fn set_response_code(&mut self, response_code: ResponseCode) -> &mut Self
Set the response code.
Trait Implementations
sourceimpl Ord for Flags
impl Ord for Flags
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Flags> for Flags
impl PartialOrd<Flags> for Flags
sourcefn partial_cmp(&self, other: &Flags) -> Option<Ordering>
fn partial_cmp(&self, other: &Flags) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Flags
impl Eq for Flags
impl StructuralEq for Flags
impl StructuralPartialEq for Flags
Auto Trait Implementations
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnwindSafe for Flags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more