pub trait Encoder {
type Item;
type Error;
// Required method
fn encode(
&mut self,
item: Self::Item,
buf: &mut Vec<u8>,
) -> Result<(), Self::Error>;
}Available on crate feature
alloc only.Expand description
Encode an item into a buffer of bytes.