pub struct DataPacket {
pub from: NodeId,
pub to: NodeId,
pub data: Vec<u8>,
pub timestamp: Instant,
}Expand description
A data packet sent between nodes
Fields§
§from: NodeIdSource node
to: NodeIdDestination node
data: Vec<u8>Payload data
timestamp: InstantWhen it was sent
Trait Implementations§
Source§impl Clone for DataPacket
impl Clone for DataPacket
Source§fn clone(&self) -> DataPacket
fn clone(&self) -> DataPacket
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 DataPacket
impl RefUnwindSafe for DataPacket
impl Send for DataPacket
impl Sync for DataPacket
impl Unpin for DataPacket
impl UnwindSafe for DataPacket
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