pub struct BinCodec<T>(/* private fields */);Available on crate feature
tokio only.Expand description
A tokio_util::codec codec that frames any bnb #[bin] message T. Construct with
BinCodec::new and hand it to Framed.
Implementations§
Trait Implementations§
Source§impl<T: BitDecode + BitEncode> Decoder for BinCodec<T>
impl<T: BitDecode + BitEncode> Decoder for BinCodec<T>
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<T>, Error>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<T>, Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl<T> Freeze for BinCodec<T>
impl<T> RefUnwindSafe for BinCodec<T>where
T: RefUnwindSafe,
impl<T> Send for BinCodec<T>where
T: Send,
impl<T> Sync for BinCodec<T>where
T: Sync,
impl<T> Unpin for BinCodec<T>where
T: Unpin,
impl<T> UnsafeUnpin for BinCodec<T>
impl<T> UnwindSafe for BinCodec<T>where
T: 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