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 serdes Deserialize can be decoded this way.
Implementations§
Trait Implementations§
Source§impl<'de, Item: Deserialize<'de>> Decoder for Decoder<Item>
impl<'de, Item: Deserialize<'de>> Decoder for Decoder<Item>
Source§fn 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> Freeze for Decoder<Item>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more