pub struct Fragment {
pub fragment_id: u64,
pub fragment_index: u16,
pub total_fragments: u16,
pub data: Vec<u8>,
}Expand description
A single fragment of a larger payload.
Fields§
§fragment_id: u64Unique ID for the fragmented message this fragment belongs to.
fragment_index: u16Zero-based index of this fragment within the message.
total_fragments: u16Total number of fragments in this message.
data: Vec<u8>The fragment payload bytes.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Fragment
impl<'de> Deserialize<'de> for Fragment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Fragment
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnsafeUnpin for Fragment
impl UnwindSafe for Fragment
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