pub struct IntoHandler<H, T, S> { /* private fields */ }
Expand description
A Handler
created from a HandlerCallWithExtractors
.
Created with HandlerCallWithExtractors::into_handler
.
Trait Implementations§
Source§impl<H, T, S> Clone for IntoHandler<H, T, S>where
H: Clone,
impl<H, T, S> Clone for IntoHandler<H, T, S>where
H: Clone,
Source§impl<H, T, S> Handler<T, S> for IntoHandler<H, T, S>where
H: HandlerCallWithExtractors<T, S> + Clone + Send + 'static,
T: FromRequest<S> + Send + 'static,
T::Rejection: Send,
S: Send + Sync + 'static,
impl<H, T, S> Handler<T, S> for IntoHandler<H, T, S>where
H: HandlerCallWithExtractors<T, S> + Clone + Send + 'static,
T: FromRequest<S> + Send + 'static,
T::Rejection: Send,
S: Send + Sync + 'static,
Source§type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>
type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>
The type of future calling this handler returns.
Source§fn call(self, req: Request, state: S) -> Self::Future
fn call(self, req: Request, state: S) -> Self::Future
Call the handler with the given request.
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a
tower::Layer
to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a
Service
by providing the stateimpl<H, T, S> Copy for IntoHandler<H, T, S>where
H: Copy,
Auto Trait Implementations§
impl<H, T, S> Freeze for IntoHandler<H, T, S>where
H: Freeze,
impl<H, T, S> RefUnwindSafe for IntoHandler<H, T, S>where
H: RefUnwindSafe,
impl<H, T, S> Send for IntoHandler<H, T, S>where
H: Send,
impl<H, T, S> Sync for IntoHandler<H, T, S>where
H: Sync,
impl<H, T, S> Unpin for IntoHandler<H, T, S>where
H: Unpin,
impl<H, T, S> UnwindSafe for IntoHandler<H, T, S>where
H: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
Source§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Convert the handler into a
Service
and no state.Source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
Convert the handler into a
MakeService
and no state. Read more