pub struct Ipv6RawExtensionHeaderSlice<'a> { /* private fields */ }
Expand description

Slice containing an IPv6 extension header without specific decoding methods (fallback in case no specific implementation is available).

Slice containing an IPv6 extension header with only minimal data interpretation. NOTE only ipv6 header extensions with the first two bytes representing the next header and the header length in 8-octets (- 8 octets) can be represented with this struct. This excludes the “Authentication Header” (AH) and “Encapsulating Security Payload” (ESP).

The following headers can be represented in a Ipv6ExtensionHeaderSlice:

  • HopbyHop
  • Destination Options
  • Routing
  • Mobility
  • Host Identity Protocol
  • Shim6 Protocol

Implementations§

Returns true if the given header type ip number can be represented in an Ipv6ExtensionHeaderSlice.

Creates a generic ipv6 extension header slice from a slice.

Creates a raw ipv6 extension header slice from a slice (assumes slice size & content was validated before).

Safety

This method assumes that the slice was previously validated to contain a valid & supported raw ipv6 extension header. This means the slice length must at least be at least 8 and (slice[1] + 1)*8. The data that the slice points must also be valid (meaning no nullptr or alike allowed).

If these precondtions are not fullfilled the behavior of this function and the methods of the return IpAuthenticationHeaderSlice will be undefined.

Returns the slice containing the ipv6 extension header

Returns the IP protocol number of the next header or transport layer protocol.

See IpNumber or ip_number for a definition of the known values.

Returns a slice containing the payload data of the header.

This contains all the data after the header length field until the end of the header (length specified by the hdr ext length field).

Convert the slice to an Ipv6RawExtensionHeader.

Decode some of the fields and copy the results to a Ipv6RawExtensionHeader struct together with a slice pointing to the non decoded parts.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. 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.

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.