pub trait Decoder { type Output; type Error; // Required method fn decode( &mut self, buf: &mut Vec<u8>, ) -> Result<Option<Self::Output>, Self::Error>; }
Decode an item from a buffer of bytes.
The type of items the decoder accepts.
Error type returned by the decoder.
Decode an item from buf.
buf
Implementations should remove data from buf as each item is decoded.