pub struct FragmentFrame {
pub fragment_id: u32,
pub fragment_offset: u16,
pub total_length: u16,
pub payload: Bytes,
}Expand description
A single fragment of a larger IP packet.
Fields§
§fragment_id: u32Identifies the original packet being fragmented (monotonically increasing per sender; unique enough within the reassembly timeout window).
fragment_offset: u16Byte offset of payload within the original packet.
total_length: u16Total byte length of the original (unfragmented) packet.
payload: BytesFragment payload.
Implementations§
Source§impl FragmentFrame
impl FragmentFrame
Sourcepub fn deserialize(buf: &[u8]) -> Option<Self>
pub fn deserialize(buf: &[u8]) -> Option<Self>
Deserialize from wire bytes. Returns None if the buffer is too short
or the contained offsets are nonsensical.
Trait Implementations§
Source§impl Clone for FragmentFrame
impl Clone for FragmentFrame
Source§fn clone(&self) -> FragmentFrame
fn clone(&self) -> FragmentFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FragmentFrame
impl Debug for FragmentFrame
Source§impl PartialEq for FragmentFrame
impl PartialEq for FragmentFrame
Source§fn eq(&self, other: &FragmentFrame) -> bool
fn eq(&self, other: &FragmentFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FragmentFrame
impl StructuralPartialEq for FragmentFrame
Auto Trait Implementations§
impl !Freeze for FragmentFrame
impl RefUnwindSafe for FragmentFrame
impl Send for FragmentFrame
impl Sync for FragmentFrame
impl Unpin for FragmentFrame
impl UnsafeUnpin for FragmentFrame
impl UnwindSafe for FragmentFrame
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