Struct smoltcp::wire::Ipv6Option

source ·
pub struct Ipv6Option<T: AsRef<[u8]>> { /* private fields */ }
Expand description

A read/write wrapper around an IPv6 Extension Header Option.

Implementations§

Create a raw octet buffer with an IPv6 Extension Header Option structure.

Shorthand for a combination of new_unchecked and check_len.

Ensure that no accessor method will panic if called. Returns Err(Error::Truncated) if the buffer is too short.

The result of this check is invalidated by calling set_data_len.

Consume the ipv6 option, returning the underlying buffer.

Return the option type.

Return the length of the data.

Panics

This function panics if this is an 1-byte padding option.

Return the option data.

Panics

This function panics if this is an 1-byte padding option.

Set the option type.

Set the option data length.

Panics

This function panics if this is an 1-byte padding option.

Return a mutable pointer to the option data.

Panics

This function panics if this is an 1-byte padding option.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. 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.

Converts the given value to a String. 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.