pub trait Encoder {
type Item;
type Error: Debug;
// Required method
fn encode(
&self,
item: Self::Item,
dst: &mut BytesMut,
) -> Result<(), Self::Error>;
}Expand description
Trait of helper objects to write out messages as bytes.