Trait grubbnet::packet::PacketBody
source · pub trait PacketBody: Any + Send + Sync {
// Required methods
fn box_clone(&self) -> Box<dyn PacketBody>;
fn serialize(&self) -> Result<Vec<u8>, Error>;
fn deserialize(data: &[u8]) -> Result<Self, Error>
where Self: Sized;
fn id(&self) -> u8;
}
Expand description
PacketBody Implementors of this trait can be serialized into a packet body.