pub struct NetworkPacket {
pub id: u64,
pub payload: Vec<u8>,
pub channel: String,
pub timestamp_ms: u64,
}Expand description
A single network packet with a typed payload.
Fields§
§id: u64Monotonically increasing packet identifier.
payload: Vec<u8>Raw payload bytes.
channel: StringPacket channel / topic tag.
timestamp_ms: u64Approximate timestamp in milliseconds (wall-clock at receipt).
Trait Implementations§
Source§impl Clone for NetworkPacket
impl Clone for NetworkPacket
Source§fn clone(&self) -> NetworkPacket
fn clone(&self) -> NetworkPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NetworkPacket
impl RefUnwindSafe for NetworkPacket
impl Send for NetworkPacket
impl Sync for NetworkPacket
impl Unpin for NetworkPacket
impl UnsafeUnpin for NetworkPacket
impl UnwindSafe for NetworkPacket
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