pub struct Codec<D, E> { /* private fields */ }
Expand description
JSON-based codec.
Implementations§
Trait Implementations§
Source§impl<D, E> Decoder for Codec<D, E>where
for<'de> D: Deserialize<'de>,
impl<D, E> Decoder for Codec<D, E>where
for<'de> D: Deserialize<'de>,
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<D>, Error>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<D>, Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl<D, E> Freeze for Codec<D, E>
impl<D, E> RefUnwindSafe for Codec<D, E>where
D: RefUnwindSafe,
E: RefUnwindSafe,
impl<D, E> Send for Codec<D, E>
impl<D, E> Sync for Codec<D, E>
impl<D, E> Unpin for Codec<D, E>
impl<D, E> UnwindSafe for Codec<D, E>where
D: UnwindSafe,
E: UnwindSafe,
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