pub struct GenericHeadDecoder<R, D, F> { /* private fields */ }
Expand description
A wrapper around D(normally RequestHeaderDecoder and ResponseHeaderDecoder).
Mainly for extract special headers and return the raw item and payload to
satisfy the constraint of ComposeDecoder
.
Implementations§
Source§impl<R, D, F> GenericHeadDecoder<R, D, F>
impl<R, D, F> GenericHeadDecoder<R, D, F>
Trait Implementations§
Source§impl<R, D, F> Decoder for GenericHeadDecoder<R, D, F>
impl<R, D, F> Decoder for GenericHeadDecoder<R, D, F>
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Decoded<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Decoded<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§fn decode_eof(
&mut self,
buf: &mut BytesMut,
) -> Result<Decoded<Self::Item>, Self::Error>
fn decode_eof( &mut self, buf: &mut BytesMut, ) -> Result<Decoded<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<R, D, F> Freeze for GenericHeadDecoder<R, D, F>where
D: Freeze,
impl<R, D, F> RefUnwindSafe for GenericHeadDecoder<R, D, F>
impl<R, D, F> Send for GenericHeadDecoder<R, D, F>
impl<R, D, F> Sync for GenericHeadDecoder<R, D, F>
impl<R, D, F> Unpin for GenericHeadDecoder<R, D, F>
impl<R, D, F> UnwindSafe for GenericHeadDecoder<R, D, F>
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