pub trait Packet {
// Required method
fn as_bytes(&self) -> Bytes;
}
Expand description
Packet trait that allows a struct to be sent through PacketManager
, for serializing
This is automatically implemented if using the macros bincode_packet
,
BinPacket
, or UnitPacket
.