Struct actix_service::AndThen
source · pub struct AndThen<A, B> { /* private fields */ }
Expand description
Service for the and_then
combinator, chaining a computation onto the end
of another service which completes successfully.
This is created by the ServiceExt::and_then
method.
Implementations§
Trait Implementations§
source§impl<A, B, Request> Service<Request> for AndThen<A, B>where
A: Service<Request>,
B: Service<A::Response, Error = A::Error>,
impl<A, B, Request> Service<Request> for AndThen<A, B>where
A: Service<Request>,
B: Service<A::Response, Error = A::Error>,
§type Response = <B as Service<<A as Service<Request>>::Response>>::Response
type Response = <B as Service<<A as Service<Request>>::Response>>::Response
Responses given by the service.
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 moresource§fn call(&mut self, req: Request) -> Self::Future
fn call(&mut self, req: Request) -> Self::Future
Process the request and return the response asynchronously. Read more
source§fn apply<T, I, F, Out, Req>(
self,
service: I,
f: F
) -> AndThen<Self, Apply<T, F, Self::Response, Out, Req>>where
Self: Sized,
T: Service<Req, Error = Self::Error>,
I: IntoService<T, Req>,
F: Fn(Self::Response, &mut T) -> Out,
Out: IntoFuture<Error = Self::Error>,
fn apply<T, I, F, Out, Req>(
self,
service: I,
f: F
) -> AndThen<Self, Apply<T, F, Self::Response, Out, Req>>where
Self: Sized,
T: Service<Req, Error = Self::Error>,
I: IntoService<T, Req>,
F: Fn(Self::Response, &mut T) -> Out,
Out: 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, Self::Response>,
B: Service<Self::Response, Error = Self::Error>,
fn and_then<F, B>(self, service: F) -> AndThen<Self, B>where
Self: Sized,
F: IntoService<B, Self::Response>,
B: Service<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<Result<Self::Response, Self::Error>, Error = Self::Error>,
fn then<B>(self, service: B) -> Then<Self, B>where
Self: Sized,
B: Service<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 moreAuto Trait Implementations§
impl<A, B> !RefUnwindSafe for AndThen<A, B>
impl<A, B> !Send for AndThen<A, B>
impl<A, B> !Sync for AndThen<A, B>
impl<A, B> Unpin for AndThen<A, B>where
A: Unpin,
impl<A, B> !UnwindSafe for AndThen<A, B>
Blanket Implementations§
source§impl<T, Request> IntoService<T, Request> for Twhere
T: Service<Request>,
impl<T, Request> IntoService<T, Request> for Twhere
T: Service<Request>,
source§fn into_service(self) -> T
fn into_service(self) -> T
Convert to a
Service