pub trait Encode: Sized {
// Required method
fn encode<W: BufMut>(&self, w: &mut W);
// Provided method
fn encode_size(&self) -> usize { ... }
}
Required Methods§
Provided Methods§
fn encode_size(&self) -> usize
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.