pub struct PacedBody { /* private fields */ }Expand description
A request body sent in PACED_PIECE pieces, recording each piece the HTTP stack pulls in
an ExchangeProgress.
The stack pulls the next piece once it has written the one before, so a pull is the link
moving and a long gap between pulls is the link stalled. Handing out the last piece starts
the response wait — while the stack’s write buffer (hyper’s holds up to about 400 KiB) and
the kernel’s send buffer may still hold the tail unsent. A link too slow to drain that tail
inside the response wait is therefore cut as RequestCut::NoResponse; the upload client
answers that by re-sending the chunk shorter, so the tail shrinks until it drains in time.
The exact length is advertised, so the request still carries a Content-Length and is
never sent chunked.
Implementations§
Trait Implementations§
Source§impl Body for PacedBody
impl Body for PacedBody
Source§type Error = Infallible
type Error = Infallible
Body might generate.Source§fn poll_frame(
self: Pin<&mut Self>,
_: &mut Context<'_>,
) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn poll_frame( self: Pin<&mut Self>, _: &mut Context<'_>, ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
Source§fn size_hint(&self) -> SizeHint
fn size_hint(&self) -> SizeHint
§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
true when the end of stream has been reached. Read moreAuto Trait Implementations§
impl !Freeze for PacedBody
impl RefUnwindSafe for PacedBody
impl Send for PacedBody
impl Sync for PacedBody
impl Unpin for PacedBody
impl UnsafeUnpin for PacedBody
impl UnwindSafe for PacedBody
Blanket Implementations§
§impl<T> BodyExt for Twhere
T: Body + ?Sized,
impl<T> BodyExt for Twhere
T: Body + ?Sized,
§fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
Frame, if any.§fn inspect_frame<F>(self, f: F) -> InspectFrame<Self, F>
fn inspect_frame<F>(self, f: F) -> InspectFrame<Self, F>
§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
§fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
§fn collect(self) -> Collect<Self>where
Self: Sized,
fn collect(self) -> Collect<Self>where
Self: Sized,
Collected] body which will collect all the DATA frames
and trailers.§fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
§fn into_stream(self) -> BodyStream<Self>where
Self: Sized,
fn into_stream(self) -> BodyStream<Self>where
Self: Sized,
BodyStream].§fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
BodyDataStream].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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more