Trait ntex_codec::Encoder
source · [−]pub trait Encoder {
type Item;
type Error: Debug;
fn encode(
&self,
item: Self::Item,
dst: &mut BytesMut
) -> Result<(), Self::Error>;
fn encode_vec(
&self,
item: Self::Item,
dst: &mut BytesVec
) -> Result<(), Self::Error> { ... }
}
Expand description
Trait of helper objects to write out messages as bytes.