pub trait Encode {
// Required method
fn encode<const CONFIG: u16>(
&self,
_: &mut (impl Write + ?Sized),
) -> Result<()>;
// Provided method
fn to_bytes<const CONFIG: u16>(&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.