Struct tokio_serde_cbor::Decoder
source · [−]pub struct Decoder<Item> { /* private fields */ }
Expand description
CBOR based decoder.
This decoder can be used with tokio_io
’s Framed
to decode CBOR encoded frames. Anything
that is serde
s Deserialize
can be decoded this way.
Implementations
sourceimpl<'de, Item: Deserialize<'de>> Decoder<Item>
impl<'de, Item: Deserialize<'de>> Decoder<Item>
Trait Implementations
sourceimpl<'de, Item: Deserialize<'de>> Decoder for Decoder<Item>
impl<'de, Item: Deserialize<'de>> Decoder for Decoder<Item>
type Item = Item
type Item = Item
The type of decoded frames.
sourcefn decode(&mut self, src: &mut BytesMut) -> Result<Option<Item>, Error>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Item>, Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations
impl<Item> RefUnwindSafe for Decoder<Item>
impl<Item> Send for Decoder<Item>
impl<Item> Sync for Decoder<Item>
impl<Item> Unpin for Decoder<Item>
impl<Item> UnwindSafe for Decoder<Item>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more