pub trait Serializablewhere
Self: Sized,
{ // Required methods fn serialize(&self) -> Result<Vec<u8>, Error>; fn deserialize<R: Read>(reader: &mut R) -> Result<Self, DecodeError>; }
Expand description

Trait used to de/serialize an object to/from a vector of bytes.

Required Methods§

source

fn serialize(&self) -> Result<Vec<u8>, Error>

Serialize the object.

source

fn deserialize<R: Read>(reader: &mut R) -> Result<Self, DecodeError>

Deserialize the object.

Implementors§

source§

impl<T> Serializable for Twhere
T: Writeable + Readable,