pub trait PacketBuilder<T: Packet> {
// Required method
fn read(&self, bytes: Bytes) -> Result<T, Box<dyn Error>>;
}
Expand description
PacketBuilder is the deserializer for Packet
and used when PacketManager
receives bytes
This is automatically implemented if using the macros bincode_packet
,
BinPacket
, or UnitPacket
.