Struct trust_dns::op::header::Header [] [src]

pub struct Header {
    // some fields omitted
}

Methods

impl Header
[src]

fn new() -> Self

A default Header, not very useful.

fn len() -> usize

fn id(&mut self, id: u16) -> &mut Self

fn message_type(&mut self, message_type: MessageType) -> &mut Self

fn op_code(&mut self, op_code: OpCode) -> &mut Self

fn authoritative(&mut self, authoritative: bool) -> &mut Self

fn truncated(&mut self, truncated: bool) -> &mut Self

fn recursion_desired(&mut self, recursion_desired: bool) -> &mut Self

fn recursion_available(&mut self, recursion_available: bool) -> &mut Self

fn authentic_data(&mut self, authentic_data: bool) -> &mut Self

fn checking_disabled(&mut self, checking_disabled: bool) -> &mut Self

fn response_code(&mut self, response_code: ResponseCode) -> &mut Self

fn query_count(&mut self, query_count: u16) -> &mut Self

fn answer_count(&mut self, answer_count: u16) -> &mut Self

fn name_server_count(&mut self, name_server_count: u16) -> &mut Self

fn additional_count(&mut self, additional_count: u16) -> &mut Self

fn get_id(&self) -> u16

fn get_message_type(&self) -> MessageType

fn get_op_code(&self) -> OpCode

fn is_authoritative(&self) -> bool

fn is_truncated(&self) -> bool

fn is_recursion_desired(&self) -> bool

fn is_recursion_available(&self) -> bool

fn is_authentic_data(&self) -> bool

fn is_checking_disabled(&self) -> bool

fn get_response_code(&self) -> u8

fn get_query_count(&self) -> u16

for query this is the count of query records for updates this is the zone count (only 1 allowed)

fn get_answer_count(&self) -> u16

for queries this is the answer section and record count for updates this is the prerequisite count

fn get_name_server_count(&self) -> u16

for queries this is the nameservers which are authorities for the SOA of the Record for updates this is the update record count

fn get_additional_count(&self) -> u16

number of records in the additional section, same for queries and updates.

fn clone(&self, query_count: u16, answer_count: u16, name_server_count: u16, additional_count: u16) -> Self

This is a specialized clone which clones all the fields but the counts handy for setting the count fields before sending over the wire.

Trait Implementations

impl PartialOrd for Header
[src]

fn partial_cmp(&self, __arg_0: &Header) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, __arg_0: &Header) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, __arg_0: &Header) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, __arg_0: &Header) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, __arg_0: &Header) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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 Debug for Header
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl BinSerializable<Header> for Header
[src]

fn read(decoder: &mut BinDecoder) -> DecodeResult<Self>

fn emit(&self, encoder: &mut BinEncoder) -> EncodeResult