pub trait Encoder: Send + 'static { type Item: Send + 'static; // Required method fn encode(&mut self, message: Self::Item, buf: &mut BytesMut) -> Result<()>; }
The encoder that can encode a message
The message type
Encode a message to buffer