pub trait Encoder<I> {
type Error: From<Error>;
// Required method
fn encode(&mut self, item: I, dst: &mut BytesMut) -> Result<(), Self::Error>;
}
Expand description
The Encoder
trait.
Objects that implement this trait take a user-defined Item
and
insert into the provided BytesMut
.