pub trait Encode<C: Codec> {
// Required method
fn encode<W: Write>(&self, c: C, w: &mut W) -> Result<()>;
}
Expand description
Encode trait.
This trait is generic over a codec, so that different codecs can be implemented for the same type.
Required Methods§
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.