pub struct HeaderSection { /* private fields */ }
Expand description

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 the Default trait and 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

Creates a new header section.

The value will have all header and header counts fields set to zero or false.

Creates a reference from the octets slice of a message.

Panics

This function panics if the octets slice is shorter than 12 octets.

Creates a mutable reference from the octets slice of a message.

Panics

This function panics if the octets slice is shorter than 12 octets.

Returns a reference to the underlying octets slice.

Returns a reference to the header.

Returns a mutable reference to the header.

Returns a reference to the header counts.

Returns a mutable reference to the header counts.

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.

Converts this type into a mutable reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Appends the concrete representation of the value to the target. Read more

Appends the canonical representation of the value to the target. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Extracts a value from the beginning of parser. Read more

Skips over a value of this type at the beginning of parser. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.