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