Struct smoltcp::wire::Ipv6RoutingHeader[][src]

pub struct Ipv6RoutingHeader<T: AsRef<[u8]>> { /* fields omitted */ }
Expand description

A read/write wrapper around an IPv6 Routing Header buffer.

Implementations

Core getter methods relevant to any routing type.

Create a raw octet buffer with an IPv6 Routing Header 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_header_len.

Consume the header, returning the underlying buffer.

Return the next header field.

Return the header length field. Length of the Routing header in 8-octet units, not including the first 8 octets.

Return the routing type field.

Return the segments left field.

Getter methods for the Type 2 Routing Header routing type.

Return the IPv6 Home Address

Panics

This function may panic if this header is not the Type2 Routing Header routing type.

Getter methods for the RPL Source Routing Header routing type.

Return the number of prefix octects elided from addresses[1..n-1].

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Return the number of prefix octects elided from the last address (addresses[n]).

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Return the number of octects used for padding after addresses[n].

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Return the address vector in bytes

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Core setter methods relevant to any routing type.

Set the next header field.

Set the option data length. Length of the Routing header in 8-octet units.

Set the routing type.

Set the segments left field.

Initialize reserved fields to 0.

Panics

This function may panic if the routing type is not set.

Setter methods for the RPL Source Routing Header routing type.

Set the Ipv6 Home Address

Panics

This function may panic if this header is not the Type 2 Routing Header routing type.

Setter methods for the RPL Source Routing Header routing type.

Set the number of prefix octects elided from addresses[1..n-1].

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Set the number of prefix octects elided from the last address (addresses[n]).

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Set the number of octects used for padding after addresses[n].

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

Set address data

Panics

This function may panic if this header is not the RPL Source Routing Header routing type.

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 !=.

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

Performs the conversion.

Performs the conversion.

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.