[][src]Struct dnsparse::Header

#[repr(C)]pub struct Header { /* fields omitted */ }

A DNS header.

Implementations

impl Header[src]

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

pub fn set_id(&mut self, id: u16)[src]

pub fn kind(&self) -> HeaderKind[src]

pub fn set_kind(&mut self, kind: HeaderKind)[src]

pub fn opcode(&self) -> OpCode[src]

pub fn set_opcode(&mut self, opcode: OpCode)[src]

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

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

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

pub fn set_recursion_desired(&mut self, recursion_desired: bool)[src]

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

pub fn set_recursion_available(&mut self, recursion_available: bool)[src]

pub fn response_code(&self) -> ResponseCode[src]

pub fn set_response_code(&mut self, response_code: ResponseCode)[src]

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

pub unsafe fn set_question_count(&mut self, question_count: u16)[src]

Safety

Setting the question count manually is unsafe. It is the caller's responsibility to ensure that the corresponding message contains the right amount of questions.

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

pub unsafe fn set_answer_count(&mut self, answer_count: u16)[src]

Safety

Setting the answer count manually is unsafe. It is the caller's responsibility to ensure that the corresponding message contains the right amount of answers.

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

pub unsafe fn set_name_server_count(&mut self, name_server_count: u16)[src]

Safety

Setting the name server count manually is unsafe. It is the caller's responsibility to ensure that the corresponding message contains the right amount of name servers.

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

pub unsafe fn set_additional_records_count(
    &mut self,
    additional_records_count: u16
)
[src]

Safety

Setting the additional records count manually is unsafe. It is the caller's responsibility to ensure that the corresponding message contains the right amount of additional records.

pub fn builder() -> HeaderBuilder[src]

Trait Implementations

impl Clone for Header[src]

impl Debug for Header[src]

Auto Trait Implementations

impl Send for Header

impl Sync for Header

impl Unpin for Header

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.