Type Alias net::wire::Ipv6HopByHopRepr

pub type Ipv6HopByHopRepr<'a> = Repr<'a>;
Expand description

A high-level representation of an IPv6 Hop-By-Hop heade.

Aliased Type§

struct Ipv6HopByHopRepr<'a> {
    pub next_header: Protocol,
    pub length: u8,
    pub data: &'a [u8],
}

Fields§

§next_header: Protocol§length: u8§data: &'a [u8]

Implementations§

§

impl<'a> Repr<'a>

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

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

pub const fn header_len(&self) -> usize

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

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

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

Trait Implementations§

§

impl<'a> Clone for Repr<'a>

§

fn clone(&self) -> Repr<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<'a> Debug for Repr<'a>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'a> PartialEq<Repr<'a>> for Repr<'a>

§

fn eq(&self, other: &Repr<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

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

impl<'a> Copy for Repr<'a>

§

impl<'a> Eq for Repr<'a>

§

impl<'a> StructuralEq for Repr<'a>

§

impl<'a> StructuralPartialEq for Repr<'a>