pub trait Encoder<Item> {
type Error: From<Error>;
// Required method
fn encode(
&mut self,
item: Item,
dst: &mut BytesMut,
) -> Result<(), Self::Error>;
}
Expand description
Encoding of messages as bytes, for use with FramedWrite
.