pub struct Apply<T, F, R, Req> { /* private fields */ }
Expand description
Apply
service combinator
Implementations§
Trait Implementations§
source§impl<T, F, R, Req> Clone for Apply<T, F, R, Req>where
T: Service + Clone,
T::Error: Into<<R::Future as Future>::Error>,
F: Fn(Req, &mut T) -> R + Clone,
R: IntoFuture,
impl<T, F, R, Req> Clone for Apply<T, F, R, Req>where
T: Service + Clone,
T::Error: Into<<R::Future as Future>::Error>,
F: Fn(Req, &mut T) -> R + Clone,
R: IntoFuture,
source§impl<T, F, R, Req> Service for Apply<T, F, R, Req>where
T: Service,
T::Error: Into<<R::Future as Future>::Error>,
F: Fn(Req, &mut T) -> R,
R: IntoFuture,
impl<T, F, R, Req> Service for Apply<T, F, R, Req>where
T: Service,
T::Error: Into<<R::Future as Future>::Error>,
F: Fn(Req, &mut T) -> R,
R: IntoFuture,
§type Future = <R as IntoFuture>::Future
type Future = <R as IntoFuture>::Future
The future response value.
source§fn poll_ready(&mut self) -> Poll<(), Self::Error>
fn poll_ready(&mut self) -> Poll<(), Self::Error>
Returns
Ready
when the service is able to process requests. Read moreAuto Trait Implementations§
impl<T, F, R, Req> RefUnwindSafe for Apply<T, F, R, Req>where
F: RefUnwindSafe,
R: RefUnwindSafe,
Req: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F, R, Req> Send for Apply<T, F, R, Req>where
F: Send,
R: Send,
Req: Send,
T: Send,
impl<T, F, R, Req> Sync for Apply<T, F, R, Req>where
F: Sync,
R: Sync,
Req: Sync,
T: Sync,
impl<T, F, R, Req> Unpin for Apply<T, F, R, Req>where
F: Unpin,
R: Unpin,
Req: Unpin,
T: Unpin,
impl<T, F, R, Req> UnwindSafe for Apply<T, F, R, Req>where
F: UnwindSafe,
R: UnwindSafe,
Req: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<T> IntoService<T> for Twhere
T: Service,
impl<T> IntoService<T> for Twhere
T: Service,
source§fn into_service(self) -> T
fn into_service(self) -> T
Convert to a
Service
source§impl<T> ServiceExt for Twhere
T: Service + ?Sized,
impl<T> ServiceExt for Twhere
T: Service + ?Sized,
source§fn apply<S, I, F, R>(
self,
service: I,
f: F
) -> AndThen<Self, Apply<S, F, R, Self::Response>>where
Self: Sized,
S: Service,
S::Error: Into<<R::Future as Future>::Error>,
I: IntoService<S>,
F: Fn(Self::Response, &mut S) -> R,
R: IntoFuture<Error = Self::Error>,
fn apply<S, I, F, R>(
self,
service: I,
f: F
) -> AndThen<Self, Apply<S, F, R, Self::Response>>where
Self: Sized,
S: Service,
S::Error: Into<<R::Future as Future>::Error>,
I: IntoService<S>,
F: Fn(Self::Response, &mut S) -> R,
R: IntoFuture<Error = Self::Error>,
Apply function to specified service and use it as a next service in
chain. Read more
source§fn and_then<F, B>(self, service: F) -> AndThen<Self, B>where
Self: Sized,
F: IntoService<B>,
B: Service<Request = Self::Response, Error = Self::Error>,
fn and_then<F, B>(self, service: F) -> AndThen<Self, B>where
Self: Sized,
F: IntoService<B>,
B: Service<Request = Self::Response, Error = Self::Error>,
Call another service after call to this one has resolved successfully. Read more
source§fn then<B>(self, service: B) -> Then<Self, B>where
Self: Sized,
B: Service<Request = Result<Self::Response, Self::Error>, Error = Self::Error>,
fn then<B>(self, service: B) -> Then<Self, B>where
Self: Sized,
B: Service<Request = Result<Self::Response, Self::Error>, Error = Self::Error>,
Chain on a computation for when a call to the service finished,
passing the result of the call to the next service
B
. Read more