pub struct LengthDelimitedCodec<F> { /* private fields */ }
Expand description
A codec for decoding and decoding length-delimited frames that implement
LengthDelimitedFrame
.
Implementations§
Source§impl<F> LengthDelimitedCodec<F>
impl<F> LengthDelimitedCodec<F>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new LengthDelimitedCodec
instance for [F
].
Trait Implementations§
Source§impl<F: Clone> Clone for LengthDelimitedCodec<F>
impl<F: Clone> Clone for LengthDelimitedCodec<F>
Source§fn clone(&self) -> LengthDelimitedCodec<F>
fn clone(&self) -> LengthDelimitedCodec<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F: Debug> Debug for LengthDelimitedCodec<F>
impl<F: Debug> Debug for LengthDelimitedCodec<F>
Source§impl<F> Decoder for LengthDelimitedCodec<F>where
F: LengthDelimitedFrame,
impl<F> Decoder for LengthDelimitedCodec<F>where
F: LengthDelimitedFrame,
Source§type Error = <F as LengthDelimitedFrame>::Error
type Error = <F as LengthDelimitedFrame>::Error
The type of unrecoverable frame decoding errors. Read more
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
Source§impl<F> Encoder<F> for LengthDelimitedCodec<F>where
F: LengthDelimitedFrame,
impl<F> Encoder<F> for LengthDelimitedCodec<F>where
F: LengthDelimitedFrame,
Auto Trait Implementations§
impl<F> Freeze for LengthDelimitedCodec<F>
impl<F> RefUnwindSafe for LengthDelimitedCodec<F>where
F: RefUnwindSafe,
impl<F> Send for LengthDelimitedCodec<F>where
F: Send,
impl<F> Sync for LengthDelimitedCodec<F>where
F: Sync,
impl<F> Unpin for LengthDelimitedCodec<F>where
F: Unpin,
impl<F> UnwindSafe for LengthDelimitedCodec<F>where
F: 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