Struct dns_parser::Header
[−]
[src]
pub struct Header { pub id: u16, pub query: bool, pub opcode: Opcode, pub authoritative: bool, pub truncated: bool, pub recursion_desired: bool, pub recursion_available: bool, pub authenticated_data: bool, pub checking_disabled: bool, pub response_code: ResponseCode, pub questions: u16, pub answers: u16, pub nameservers: u16, pub additional: u16, }
Represents parsed header of the packet
Fields
id: u16
query: bool
opcode: Opcode
truncated: bool
recursion_desired: bool
recursion_available: bool
authenticated_data: bool
checking_disabled: bool
response_code: ResponseCode
questions: u16
answers: u16
nameservers: u16
additional: u16
Methods
impl Header
[src]
fn parse(data: &[u8]) -> Result<Header, Error>
fn write(&self, data: &mut [u8])
fn set_truncated(data: &mut [u8])
fn size() -> usize
Trait Implementations
impl Debug for Header
[src]
impl PartialEq for Header
[src]
fn eq(&self, __arg_0: &Header) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Header) -> bool
This method tests for !=
.
impl Eq for Header
[src]
impl Clone for Header
[src]
fn clone(&self) -> Header
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more