[][src]Trait grubbnet::packet::PacketBody

pub trait PacketBody: Any {
    fn box_clone(&self) -> Box<dyn PacketBody>;
fn serialize(&self) -> Vec<u8>;
fn deserialize(data: &[u8]) -> Self
    where
        Self: Sized
;
fn id(&self) -> u8; }

PacketBody Implementors of this trait can be serialized into a packet body.

Required methods

fn box_clone(&self) -> Box<dyn PacketBody>

fn serialize(&self) -> Vec<u8>

fn deserialize(data: &[u8]) -> Self where
    Self: Sized

fn id(&self) -> u8

Loading content...

Implementors

Loading content...