pub trait Codec: Sized {
// Required methods
fn encode<W: Write>(&self, output: &mut W) -> Result<()>;
fn decode<R: Read>(tag: u8, input: &mut R) -> Result<Self>;
}
Required Methods§
fn encode<W: Write>(&self, output: &mut W) -> Result<()>
fn decode<R: Read>(tag: u8, input: &mut R) -> Result<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.