[−][src]Struct dnsparse::Header
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]
&mut self,
additional_records_count: u16
)
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]
fn clone(&self) -> Header
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Header
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,