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>
impl<T: AsRef<[u8]>> Header<T>
Sourcepub const fn new_unchecked(buffer: T) -> Self
pub const fn new_unchecked(buffer: T) -> Self
Create a raw octet buffer with an IPv6 Hop-by-Hop Header structure.
Sourcepub fn new_checked(buffer: T) -> Result<Self>
pub fn new_checked(buffer: T) -> Result<Self>
Shorthand for a combination of new_unchecked and check_len.
Sourcepub fn check_len(&self) -> Result<()>
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.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consume the header, returning the underlying buffer.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more