Struct actix_service::FromErr
source · pub struct FromErr<A, E> { /* private fields */ }
Expand description
Service for the from_err
combinator, changing the error type of a service.
This is created by the ServiceExt::from_err
method.
Trait Implementations§
source§impl<A, E, Request> Service<Request> for FromErr<A, E>where
A: Service<Request>,
E: From<A::Error>,
impl<A, E, Request> Service<Request> for FromErr<A, E>where
A: Service<Request>,
E: From<A::Error>,
source§fn poll_ready(&mut self) -> Poll<(), E>
fn poll_ready(&mut self) -> Poll<(), E>
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, E> RefUnwindSafe for FromErr<A, E>where
A: RefUnwindSafe,
E: RefUnwindSafe,
impl<A, E> Send for FromErr<A, E>where
A: Send,
E: Send,
impl<A, E> Sync for FromErr<A, E>where
A: Sync,
E: Sync,
impl<A, E> Unpin for FromErr<A, E>where
A: Unpin,
E: Unpin,
impl<A, E> UnwindSafe for FromErr<A, E>where
A: UnwindSafe,
E: UnwindSafe,
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