pub trait Codec
where Self: Sized + Serialize + for<'de> Deserialize<'de>,
{ // Provided methods fn decode<R>(reader: &mut R) -> Result<Self> where R: Read { ... } fn encode<W>(&self, writer: &mut W) -> Result<()> where W: Write { ... } }
Expand description

Encoding and decoding

Provided Methods§

source

fn decode<R>(reader: &mut R) -> Result<Self>
where R: Read,

Decodes object from std::io::Read

source

fn encode<W>(&self, writer: &mut W) -> Result<()>
where W: Write,

Encodes object to std::io::Write

Object Safety§

This trait is not object safe.

Implementors§