Struct shuttle_next::body::Full
source · pub struct Full<D> { /* private fields */ }
Expand description
A body that consists of a single chunk.
Implementations§
Trait Implementations§
source§impl<D> Body for Full<D>where
D: Buf,
impl<D> Body for Full<D>where
D: Buf,
§type Error = Infallible
type Error = Infallible
The error type this
Body
might generate.source§fn poll_data(
self: Pin<&mut Full<D>>,
_cx: &mut Context<'_>
) -> Poll<Option<Result<D, <Full<D> as Body>::Error>>>
fn poll_data( self: Pin<&mut Full<D>>, _cx: &mut Context<'_> ) -> Poll<Option<Result<D, <Full<D> as Body>::Error>>>
Attempt to pull out the next data buffer of this stream.
source§fn poll_trailers(
self: Pin<&mut Full<D>>,
_cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, <Full<D> as Body>::Error>>
fn poll_trailers( self: Pin<&mut Full<D>>, _cx: &mut Context<'_> ) -> Poll<Result<Option<HeaderMap>, <Full<D> as Body>::Error>>
Poll for an optional single
HeaderMap
of trailers. Read moresource§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Returns
true
when the end of stream has been reached. Read moresource§fn size_hint(&self) -> SizeHint
fn size_hint(&self) -> SizeHint
Returns the bounds on the remaining length of the stream. Read more
source§fn trailers(&mut self) -> Trailers<'_, Self>
fn trailers(&mut self) -> Trailers<'_, Self>
Returns future that resolves to trailers, if any.
source§fn map_data<F, B>(self, f: F) -> MapData<Self, F>
fn map_data<F, B>(self, f: F) -> MapData<Self, F>
Maps this body’s data value to a different value.
source§impl IntoResponse for Full<Bytes>
impl IntoResponse for Full<Bytes>
source§fn into_response(self) -> Response<UnsyncBoxBody<Bytes, Error>>
fn into_response(self) -> Response<UnsyncBoxBody<Bytes, Error>>
Create a response.
impl<D> Copy for Full<D>where
D: Copy,
impl<'__pin, D> Unpin for Full<D>where
__Origin<'__pin, D>: Unpin,
Auto Trait Implementations§
impl<D> RefUnwindSafe for Full<D>where
D: RefUnwindSafe,
impl<D> Send for Full<D>where
D: Send,
impl<D> Sync for Full<D>where
D: Sync,
impl<D> UnwindSafe for Full<D>where
D: UnwindSafe,
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, S, B> Handler<IntoResponseHandler, S, B> for T
impl<T, S, B> Handler<IntoResponseHandler, S, B> for T
§type Future = Ready<Response<UnsyncBoxBody<Bytes, Error>>>
type Future = Ready<Response<UnsyncBoxBody<Bytes, Error>>>
The type of future calling this handler returns.
source§fn call(
self,
_req: Request<B>,
_state: S
) -> <T as Handler<IntoResponseHandler, S, B>>::Future
fn call( self, _req: Request<B>, _state: S ) -> <T as Handler<IntoResponseHandler, S, B>>::Future
Call the handler with the given request.
source§fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where
L: Layer<HandlerService<Self, T, S, B>> + Clone,
<L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where
L: Layer<HandlerService<Self, T, S, B>> + Clone,
<L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
Apply a
tower::Layer
to the handler. Read moresource§fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
Convert the handler into a
Service
by providing the statesource§impl<H, T, B> HandlerWithoutStateExt<T, B> for H
impl<H, T, B> HandlerWithoutStateExt<T, B> for H
source§fn into_service(self) -> HandlerService<H, T, (), B>
fn into_service(self) -> HandlerService<H, T, (), B>
Convert the handler into a
Service
and no state.source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
Convert the handler into a
MakeService
and no state. Read more