smoltcp::wire

Struct Ipv6HopByHopHeader

Source
pub struct Ipv6HopByHopHeader<T: AsRef<[u8]>> { /* private fields */ }
Expand description

A read/write wrapper around an IPv6 Hop-by-Hop Header buffer.

Implementations§

Source§

impl<T: AsRef<[u8]>> Header<T>

Source

pub const fn new_unchecked(buffer: T) -> Self

Create a raw octet buffer with an IPv6 Hop-by-Hop Header structure.

Source

pub fn new_checked(buffer: T) -> Result<Self>

Shorthand for a combination of new_unchecked and check_len.

Source

pub fn check_len(&self) -> Result<()>

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

The result of this check is invalidated by calling set_header_len.

Source

pub fn into_inner(self) -> T

Consume the header, returning the underlying buffer.

Source§

impl<'a, T: AsRef<[u8]> + ?Sized> Header<&'a T>

Source

pub fn options(&self) -> &'a [u8]

Return the options of the IPv6 Hop-by-Hop header.

Source§

impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Header<&'a mut T>

Source

pub fn options_mut(&mut self) -> &mut [u8]

Return a mutable pointer to the options of the IPv6 Hop-by-Hop header.

Auto Trait Implementations§

§

impl<T> Freeze for Header<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Header<T>
where T: RefUnwindSafe,

§

impl<T> Send for Header<T>
where T: Send,

§

impl<T> Sync for Header<T>
where T: Sync,

§

impl<T> Unpin for Header<T>
where T: Unpin,

§

impl<T> UnwindSafe for Header<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.