pub struct RequestBody<B, H> { /* private fields */ }Expand description
Request body wrapper for Callback.
Forwards frames from the inner request body unchanged, surfacing
every event to the configured RequestHandler via
on_body_chunk, on_end_of_stream, or on_body_error.
Trait Implementations§
Source§impl<B, H> Body for RequestBody<B, H>where
B: Body,
B::Error: Display + 'static,
H: RequestHandler,
impl<B, H> Body for RequestBody<B, H>where
B: Body,
B::Error: Display + 'static,
H: RequestHandler,
impl<'__pin, B, H> Unpin for RequestBody<B, H>where
PinnedFieldsOf<__Origin<'__pin, B, H>>: Unpin,
Auto Trait Implementations§
impl<B, H> Freeze for RequestBody<B, H>
impl<B, H> RefUnwindSafe for RequestBody<B, H>where
B: RefUnwindSafe,
H: RefUnwindSafe,
impl<B, H> Send for RequestBody<B, H>
impl<B, H> Sync for RequestBody<B, H>
impl<B, H> UnwindSafe for RequestBody<B, H>where
B: UnwindSafe,
H: UnwindSafe,
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,
Returns a future that resolves to the next
Frame, if any.§fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
Turn this body into a boxed trait object that is !Sync.
§fn collect(self) -> Collect<Self>where
Self: Sized,
fn collect(self) -> Collect<Self>where
Self: Sized,
Turn this body into [
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>
Add trailers to the body. Read more
§fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
Turn this body into [
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
Mutably borrows from an owned value. Read more