pub trait Encode {
type Error;
// Required method
fn encode(&self, buff: &mut [u8]) -> Result<usize, Self::Error>;
// Provided method
fn encode_iter<'a, V: Iterator<Item = &'a Self>>(
vals: V,
buff: &mut [u8],
) -> Result<usize, Self::Error>
where Self: 'static { ... }
}
Expand description
Encode trait for building encodable objects
Required Associated Types§
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.