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§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)