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]
impl HeaderSection
pub fn new() -> HeaderSection
[src]
pub fn new() -> HeaderSection
Creates a new empty header section.
pub fn from_message(s: &[u8]) -> &HeaderSection
[src]
pub fn from_message(s: &[u8]) -> &HeaderSection
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]
pub fn from_message_mut(s: &mut [u8]) -> &mut HeaderSection
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]
pub fn as_bytes(&self) -> &[u8]
Returns a reference to the underlying bytes slice.
impl HeaderSection
[src]
impl HeaderSection
pub fn header(&self) -> &Header
[src]
pub fn header(&self) -> &Header
Returns a reference to the header.
pub fn header_mut(&mut self) -> &mut Header
[src]
pub fn header_mut(&mut self) -> &mut Header
Returns a mutable reference to the header.
pub fn counts(&self) -> &HeaderCounts
[src]
pub fn counts(&self) -> &HeaderCounts
Returns a reference to the header counts.
pub fn counts_mut(&mut self) -> &mut HeaderCounts
[src]
pub fn counts_mut(&mut self) -> &mut HeaderCounts
Returns a mutable reference to the header counts.
Trait Implementations
impl Clone for HeaderSection
[src]
impl Clone for HeaderSection
fn clone(&self) -> HeaderSection
[src]
fn clone(&self) -> HeaderSection
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for HeaderSection
[src]
impl Debug for HeaderSection
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for HeaderSection
[src]
impl Default for HeaderSection
fn default() -> HeaderSection
[src]
fn default() -> HeaderSection
Returns the "default value" for a type. Read more
impl PartialEq for HeaderSection
[src]
impl PartialEq for HeaderSection
fn eq(&self, other: &HeaderSection) -> bool
[src]
fn eq(&self, other: &HeaderSection) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &HeaderSection) -> bool
[src]
fn ne(&self, other: &HeaderSection) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for HeaderSection
impl Send for HeaderSection
impl Sync for HeaderSection
impl Sync for HeaderSection