[−][src]Struct domain::base::header::HeaderSection
The complete header section of a DNS message.
Consists of a Header
directly followed by a HeaderCounts
.
You can create an owned value via the new
function or Default
trait
or acquire a pointer referring the the header section of an existing DNS
message via the for_message_slice
or for_message_slice_mut
functions.
Implementations
impl HeaderSection
[src]
pub fn new() -> Self
[src]
Creates a new header section.
The value will have all header and header counts fields set to zero or false.
pub fn for_message_slice(s: &[u8]) -> &HeaderSection
[src]
Creates a reference from the octets slice of a message.
Panics
This function panics if the the octets slice is shorter than 24 octets.
pub fn for_message_slice_mut(s: &mut [u8]) -> &mut HeaderSection
[src]
Creates a mutable reference from the ocetets slice of a message.
Panics
This function panics if the the octets slice is shorter than 24 octets.
pub fn as_slice(&self) -> &[u8]
[src]
Returns a reference to the underlying octets 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 AsMut<Header> for HeaderSection
[src]
impl AsMut<HeaderCounts> for HeaderSection
[src]
fn as_mut(&mut self) -> &mut HeaderCounts
[src]
impl AsRef<Header> for HeaderSection
[src]
impl AsRef<HeaderCounts> for HeaderSection
[src]
fn as_ref(&self) -> &HeaderCounts
[src]
impl Clone for HeaderSection
[src]
fn clone(&self) -> HeaderSection
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Compose for HeaderSection
[src]
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
[src]
fn compose_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf>
impl Copy for HeaderSection
[src]
impl Debug for HeaderSection
[src]
impl Default for HeaderSection
[src]
fn default() -> HeaderSection
[src]
impl Eq for HeaderSection
[src]
impl<Ref: AsRef<[u8]>> Parse<Ref> for HeaderSection
[src]
fn parse(parser: &mut Parser<Ref>) -> Result<Self, ParseError>
[src]
fn skip(parser: &mut Parser<Ref>) -> Result<(), ParseError>
[src]
impl PartialEq<HeaderSection> for HeaderSection
[src]
fn eq(&self, other: &HeaderSection) -> bool
[src]
fn ne(&self, other: &HeaderSection) -> bool
[src]
impl StructuralEq for HeaderSection
[src]
impl StructuralPartialEq for HeaderSection
[src]
Auto Trait Implementations
impl RefUnwindSafe for HeaderSection
impl Send for HeaderSection
impl Sync for HeaderSection
impl Unpin for HeaderSection
impl UnwindSafe for HeaderSection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,