Struct monoio_http::h1::codec::decoder::GenericHeadDecoder
source · [−]pub struct GenericHeadDecoder<R, D> { /* 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
sourceimpl<R, D> GenericHeadDecoder<R, D>
impl<R, D> GenericHeadDecoder<R, D>
Trait Implementations
sourceimpl<R, D> Decoder for GenericHeadDecoder<R, D>where
D: Decoder<Error = DecodeError>,
R: FromParts<D::Item, Payload>,
D::Item: ParamRef<HeaderMap>,
impl<R, D> Decoder for GenericHeadDecoder<R, D>where
D: Decoder<Error = DecodeError>,
R: FromParts<D::Item, Payload>,
D::Item: ParamRef<HeaderMap>,
type Item = (R, NextDecoder<FixedBodyDecoder, ChunkedBodyDecoder, Bytes>)
type Item = (R, NextDecoder<FixedBodyDecoder, ChunkedBodyDecoder, Bytes>)
The type of decoded frames.
type Error = DecodeError
type Error = DecodeError
The type of unrecoverable frame decoding errors. Read more
sourcefn 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
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<R, D> RefUnwindSafe for GenericHeadDecoder<R, D>where
D: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, D> Send for GenericHeadDecoder<R, D>where
D: Send,
R: Send,
impl<R, D> Sync for GenericHeadDecoder<R, D>where
D: Sync,
R: Sync,
impl<R, D> Unpin for GenericHeadDecoder<R, D>where
D: Unpin,
R: Unpin,
impl<R, D> UnwindSafe for GenericHeadDecoder<R, D>where
D: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more