Trait asynchronous_codec::Decoder
source · pub trait Decoder {
type Item;
type Error: From<Error>;
fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>;
fn decode_eof(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error> { ... }
}Expand description
Decoding of frames via buffers, for use with FramedRead.
Required Associated Types
Required Methods
Provided Methods
Implementors
sourceimpl<Enc, Dec> Decoder for CborCodec<Enc, Dec>where
for<'de> Dec: Deserialize<'de> + 'static,
for<'de> Enc: Serialize + 'static,
impl<Enc, Dec> Decoder for CborCodec<Enc, Dec>where
for<'de> Dec: Deserialize<'de> + 'static,
for<'de> Enc: Serialize + 'static,
Decoder impl parses cbor objects from bytes
type Item = Dec
type Error = CborCodecError
sourceimpl<Enc, Dec> Decoder for JsonCodec<Enc, Dec>where
for<'de> Dec: Deserialize<'de> + 'static,
for<'de> Enc: Serialize + 'static,
impl<Enc, Dec> Decoder for JsonCodec<Enc, Dec>where
for<'de> Dec: Deserialize<'de> + 'static,
for<'de> Enc: Serialize + 'static,
Decoder impl parses json objects from bytes