[][src]Enum smoltcp::wire::Ipv6RoutingRepr

pub enum Ipv6RoutingRepr<'a> {
    Type2 {
        next_header: Protocol,
        length: u8,
        segments_left: u8,
        home_address: Address,
    },
    Rpl {
        next_header: Protocol,
        length: u8,
        segments_left: u8,
        cmpr_i: u8,
        cmpr_e: u8,
        pad: u8,
        addresses: &'a [u8],
    },
    // some variants omitted
}

A high-level representation of an IPv6 Routing Header.

Variants

Type2

Fields of Type2

next_header: Protocol

The type of header immediately following the Routing header.

length: u8

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

segments_left: u8

Number of route segments remaining.

home_address: Address

The home address of the destination mobile node.

Rpl

Fields of Rpl

next_header: Protocol

The type of header immediately following the Routing header.

length: u8

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

segments_left: u8

Number of route segments remaining.

cmpr_i: u8

Number of prefix octets from each segment, except the last segment, that are elided.

cmpr_e: u8

Number of prefix octets from the last segment that are elided.

pad: u8

Number of octets that are used for padding after address[n] at the end of the RPL Source Route Header.

addresses: &'a [u8]

Vector of addresses, numbered 1 to n.

Methods

impl<'a> Repr<'a>[src]

pub fn parse<T: ?Sized>(header: &'a Header<&'a T>) -> Result<Repr<'a>> where
    T: AsRef<[u8]>, 
[src]

Parse an IPv6 Routing Header and return a high-level representation.

pub fn buffer_len(&self) -> usize[src]

Return the length, in bytes, of a header that will be emitted from this high-level representation.

pub fn emit<T: AsRef<[u8]> + AsMut<[u8]> + ?Sized>(
    &self,
    header: &mut Header<&mut T>
)
[src]

Emit a high-level representation into an IPv6 Routing Header.

Trait Implementations

impl<'a> Clone for Repr<'a>[src]

impl<'a> Copy for Repr<'a>[src]

impl<'a> Debug for Repr<'a>[src]

impl<'a> Display for Repr<'a>[src]

impl<'a> Eq for Repr<'a>[src]

impl<'a> PartialEq<Repr<'a>> for Repr<'a>[src]

impl<'a> StructuralEq for Repr<'a>[src]

impl<'a> StructuralPartialEq for Repr<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Repr<'a>

impl<'a> Send for Repr<'a>

impl<'a> Sync for Repr<'a>

impl<'a> Unpin for Repr<'a>

impl<'a> UnwindSafe for Repr<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.