[−][src]Struct domain_core::bits::header::HeaderSection
The complete header section of a DNS message.
Consists of a Header
and a HeaderCounts
.
Methods
impl HeaderSection
[src]
pub fn new() -> Self
[src]
Creates a new empty header section.
pub fn for_message_slice(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 for_message_slice_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_slice(&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 Compose for HeaderSection
[src]
impl Parse for HeaderSection
[src]
type Err = ShortBuf
The type of an error returned when parsing fails.
fn parse(parser: &mut Parser) -> Result<Self, Self::Err>
[src]
fn skip(parser: &mut Parser) -> Result<(), Self::Err>
[src]
impl Eq for HeaderSection
[src]
impl Clone for HeaderSection
[src]
fn clone(&self) -> HeaderSection
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for HeaderSection
[src]
impl PartialEq<HeaderSection> for HeaderSection
[src]
fn eq(&self, other: &HeaderSection) -> bool
[src]
fn ne(&self, other: &HeaderSection) -> bool
[src]
impl Default for HeaderSection
[src]
fn default() -> HeaderSection
[src]
impl Debug for HeaderSection
[src]
Auto Trait Implementations
impl Send for HeaderSection
impl Sync for HeaderSection
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,