pub trait Encoder<Item> {
type Error: From<Error>;
// Required method
fn encode(
&mut self,
item: Item,
dst: &mut BytesMut,
) -> Result<(), Self::Error>;
}
Available on (crate features
async_io
or async_tokio
) and crate feature async_framed
only.