Struct domain::bits::header::HeaderSection
[−]
[src]
pub struct HeaderSection { /* fields omitted */ }
The complete header section of a DNS message.
Consists of a Header
and a HeaderCounts
.
Methods
impl HeaderSection
[src]
pub fn new() -> HeaderSection
[src]
Creates a new empty header section.
pub fn from_message(s: &[u8]) -> &HeaderSection
[src]
Creates a reference from the bytes slice of a message.
Panics
This function panics if the size of the bytes slice is smaller than the header section.
pub fn from_message_mut(s: &mut [u8]) -> &mut HeaderSection
[src]
Creates a mutable reference from the bytes slice of a message.
Panics
This function panics if the size of the bytes slice is smaller than the header section.
pub fn as_bytes(&self) -> &[u8]
[src]
Returns a reference to the underlying bytes slice.
impl HeaderSection
[src]
pub fn header(&self) -> &Header
[src]
Returns a reference to the header.
pub fn header_mut(&mut self) -> &mut Header
[src]
Returns a mutable reference to the header.
pub fn counts(&self) -> &HeaderCounts
[src]
Returns a reference to the header counts.
pub fn counts_mut(&mut self) -> &mut HeaderCounts
[src]
Returns a mutable reference to the header counts.
Trait Implementations
impl Clone for HeaderSection
[src]
fn clone(&self) -> HeaderSection
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for HeaderSection
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for HeaderSection
[src]
fn default() -> HeaderSection
[src]
Returns the "default value" for a type. Read more
impl PartialEq for HeaderSection
[src]
fn eq(&self, __arg_0: &HeaderSection) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &HeaderSection) -> bool
[src]
This method tests for !=
.