pub trait Encoder {
// Required method
fn encoder(&self, _: &mut impl Write) -> Result<()>;
// Provided method
fn encode(&self) -> Vec<u8> ⓘ { ... }
}
Expand description
This trait used to serialize the data structure into binary format.
Required Methods§
Provided 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.