pub struct JsonCodec<D, E> { /* private fields */ }
Trait Implementations§
Source§impl<D, E> Decoder for JsonCodec<D, E>where
D: DeserializeOwned,
impl<D, E> Decoder for JsonCodec<D, E>where
D: DeserializeOwned,
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
§fn decode_eof(
&mut self,
buf: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode_eof( &mut self, buf: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
A default method available to be called when there are no more bytes
available to be read from the underlying I/O. Read more
Auto Trait Implementations§
impl<D, E> Freeze for JsonCodec<D, E>
impl<D, E> RefUnwindSafe for JsonCodec<D, E>where
D: RefUnwindSafe,
E: RefUnwindSafe,
impl<D, E> Send for JsonCodec<D, E>
impl<D, E> Sync for JsonCodec<D, E>
impl<D, E> Unpin for JsonCodec<D, E>
impl<D, E> UnwindSafe for JsonCodec<D, E>where
D: UnwindSafe,
E: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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