Trait slimproto::Encoder

source ·
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.

Required Associated Types§

Required Methods§

source

fn encode(&mut self, item: I, dst: &mut BytesMut) -> Result<(), Self::Error>

Implementors§