pub struct CobsCodec { /* private fields */ }Expand description
COBS frame codec for tokio_util::codec::Framed.
Implementations§
Trait Implementations§
Source§impl Decoder for CobsCodec
impl Decoder for CobsCodec
Source§fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Bytes>, Error>
fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Bytes>, 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 Freeze for CobsCodec
impl RefUnwindSafe for CobsCodec
impl Send for CobsCodec
impl Sync for CobsCodec
impl Unpin for CobsCodec
impl UnwindSafe for CobsCodec
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