Struct smoltcp::wire::Ipv6FragmentHeader
source · pub struct Ipv6FragmentHeader<T: AsRef<[u8]>> { /* private fields */ }
Expand description
A read/write wrapper around an IPv6 Fragment Header.
Implementations§
source§impl<T: AsRef<[u8]>> Header<T>
impl<T: AsRef<[u8]>> Header<T>
sourcepub const fn new_unchecked(buffer: T) -> Header<T>
pub const fn new_unchecked(buffer: T) -> Header<T>
Create a raw octet buffer with an IPv6 Fragment Header structure.
sourcepub fn new_checked(buffer: T) -> Result<Header<T>>
pub fn new_checked(buffer: T) -> Result<Header<T>>
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.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consume the header, returning the underlying buffer.
sourcepub fn next_header(&self) -> Protocol
pub fn next_header(&self) -> Protocol
Return the next header field.
sourcepub fn frag_offset(&self) -> u16
pub fn frag_offset(&self) -> u16
Return the fragment offset field.
sourcepub fn more_frags(&self) -> bool
pub fn more_frags(&self) -> bool
Return more fragment flag field.
source§impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T>
impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T>
sourcepub fn set_next_header(&mut self, value: Protocol)
pub fn set_next_header(&mut self, value: Protocol)
Set the next header field.
sourcepub fn clear_reserved(&mut self)
pub fn clear_reserved(&mut self)
Set reserved fields.
Set 8-bit reserved field after the next header field. Set 2-bit reserved field between fragment offset and more fragments.
sourcepub fn set_frag_offset(&mut self, value: u16)
pub fn set_frag_offset(&mut self, value: u16)
Set the fragment offset field.
sourcepub fn set_more_frags(&mut self, value: bool)
pub fn set_more_frags(&mut self, value: bool)
Set the more fragments flag field.