pub struct EntryCodec { /* private fields */ }
Expand description
struct holding contextual information used while decoding
Implementations§
Source§impl EntryCodec
impl EntryCodec
Sourcepub fn new(c: EntryCodecConfig) -> Self
pub fn new(c: EntryCodecConfig) -> Self
create a new EntryCodec
with the specified configuration
Trait Implementations§
Source§impl Debug for EntryCodec
impl Debug for EntryCodec
Source§impl Decoder for EntryCodec
impl Decoder for EntryCodec
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>
calls parse_next
and manages state changes and buffer fill
Source§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>
decodes end of file and ensures that there are no unprocessed bytes on the stream.
and io::Error
of type io::ErrorKind::Other is thrown in the case of remaining data.
Source§type Error = CodecError
type Error = CodecError
The type of unrecoverable frame decoding errors. Read more
Source§impl Default for EntryCodec
impl Default for EntryCodec
Source§fn default() -> EntryCodec
fn default() -> EntryCodec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for EntryCodec
impl RefUnwindSafe for EntryCodec
impl Send for EntryCodec
impl Sync for EntryCodec
impl Unpin for EntryCodec
impl UnwindSafe for EntryCodec
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