pub struct Codec<const SENTINEL_ENCODE: u8 = DEFAULT_SENTINEL, const SENTINEL_DECODE: u8 = DEFAULT_SENTINEL, const MAX_LEN_ENCODE: usize = DEFAULT_MAX_LEN, const MAX_LEN_DECODE: usize = DEFAULT_MAX_LEN> { /* private fields */ }
Expand description
Implementations§
Trait Implementations§
Source§impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Debug for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Debug for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
Source§impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Decoder for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Decoder for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
Source§type Error = DecodeError
type Error = DecodeError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<BytesMut>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<BytesMut>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Default for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Default for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
Auto Trait Implementations§
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Freeze for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> RefUnwindSafe for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Send for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Sync for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> Unpin for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
impl<const SENTINEL_ENCODE: u8, const SENTINEL_DECODE: u8, const MAX_LEN_ENCODE: usize, const MAX_LEN_DECODE: usize> UnwindSafe for Codec<SENTINEL_ENCODE, SENTINEL_DECODE, MAX_LEN_ENCODE, MAX_LEN_DECODE>
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