pub struct Http11ChunksRead {
pub max_body_len: usize,
/* private fields */
}Expand description
I/O-free coroutine to read an HTTP response body using chunked transfer coding.
Fields§
§max_body_len: usizeMaximum size in bytes of the decoded body, all chunks
concatenated. A chunk announcing more fails the read with
Http11ChunksReadError::BodyTooLarge before any of it is
buffered. Defaults to HTTP_DEFAULT_MAX_BODY_LEN.
Trait Implementations§
Source§impl Debug for Http11ChunksRead
impl Debug for Http11ChunksRead
Source§impl Default for Http11ChunksRead
impl Default for Http11ChunksRead
Source§impl HttpCoroutine for Http11ChunksRead
impl HttpCoroutine for Http11ChunksRead
Source§type Return = Result<Http11ChunksReadOutput, Http11ChunksReadError>
type Return = Result<Http11ChunksReadOutput, Http11ChunksReadError>
The terminal value emitted on completion.
Source§fn resume(
&mut self,
arg: Option<&[u8]>,
) -> HttpCoroutineState<Self::Yield, Self::Return>
fn resume( &mut self, arg: Option<&[u8]>, ) -> HttpCoroutineState<Self::Yield, Self::Return>
Advances one step. Pass
None initially or after HttpYield::WantsWrite;
pass Some(data) after HttpYield::WantsRead; pass Some(&[]) for EOF.Auto Trait Implementations§
impl Freeze for Http11ChunksRead
impl RefUnwindSafe for Http11ChunksRead
impl Send for Http11ChunksRead
impl Sync for Http11ChunksRead
impl Unpin for Http11ChunksRead
impl UnsafeUnpin for Http11ChunksRead
impl UnwindSafe for Http11ChunksRead
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