1 2 3 4 5 6 7 8 9 10 11 12
use bytes::BytesMut; mod length; pub use self::length::LengthDecoder; pub trait Decoder { type Item; type Error; fn decode(&mut self, bytes: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error>; }