pub struct FragmentHeaderReader<'a> {
pub bytes: &'a [u8],
}
Expand description
Reads the Fragment header fields.
Fields§
§bytes: &'a [u8]
Implementations§
Source§impl<'a> FragmentHeaderReader<'a>
impl<'a> FragmentHeaderReader<'a>
pub fn new(bytes: &'a [u8]) -> Result<Self, &'static str>
Sourcepub fn next_header(&self) -> u8
pub fn next_header(&self) -> u8
Returns the next header field.
Identifies the type of the next header.
Sourcepub fn fragment_offset(&self) -> u16
pub fn fragment_offset(&self) -> u16
Returns the fragment offset field.
Offset in 8 bytes relative to the start of the fragmentable part of the original packet.
Sourcepub fn m_flag(&self) -> bool
pub fn m_flag(&self) -> bool
Returns the M flag.
1 means more fragments follow, 0 means this is the last fragment.
Sourcepub fn identification(&self) -> u32
pub fn identification(&self) -> u32
Returns the identification field.
Identifies the packet, generated by the sender, to help the receiver reassemble the fragments.
Sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Returns the length of the Fragment header.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FragmentHeaderReader<'a>
impl<'a> RefUnwindSafe for FragmentHeaderReader<'a>
impl<'a> Send for FragmentHeaderReader<'a>
impl<'a> Sync for FragmentHeaderReader<'a>
impl<'a> Unpin for FragmentHeaderReader<'a>
impl<'a> UnwindSafe for FragmentHeaderReader<'a>
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