pub(crate) struct Decoder {
kind: Kind,
}
Expand description
Decoders to handle different Transfer-Encodings.
If a message body does not include a Transfer-Encoding, it should include a Content-Length header.
Fields§
§kind: Kind
Implementations§
source§impl Decoder
impl Decoder
pub(crate) fn length(x: u64) -> Decoder
pub(crate) fn chunked() -> Decoder
pub(crate) fn eof() -> Decoder
pub(super) fn new(len: DecodedLength) -> Self
pub(crate) fn is_eof(&self) -> bool
pub(crate) fn decode<R: MemRead>( &mut self, cx: &mut Context<'_>, body: &mut R, ) -> Poll<Result<Bytes, Error>>
Trait Implementations§
source§impl PartialEq for Decoder
impl PartialEq for Decoder
impl StructuralPartialEq for Decoder
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
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