Struct actix_service::MapErr
source · pub struct MapErr<A, F, E> { /* private fields */ }
Expand description
Service for the map_err
combinator, changing the type of a service’s
error.
This is created by the ServiceExt::map_err
method.
Implementations§
Trait Implementations§
source§impl<A, F, E, Request> Service<Request> for MapErr<A, F, E>where
A: Service<Request>,
F: Fn(A::Error) -> E + Clone,
impl<A, F, E, Request> Service<Request> for MapErr<A, F, E>where
A: Service<Request>,
F: Fn(A::Error) -> E + Clone,
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, F, E> RefUnwindSafe for MapErr<A, F, E>where
A: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, F, E> Send for MapErr<A, F, E>where
A: Send,
E: Send,
F: Send,
impl<A, F, E> Sync for MapErr<A, F, E>where
A: Sync,
E: Sync,
F: Sync,
impl<A, F, E> Unpin for MapErr<A, F, E>where
A: Unpin,
E: Unpin,
F: Unpin,
impl<A, F, E> UnwindSafe for MapErr<A, F, E>where
A: UnwindSafe,
E: UnwindSafe,
F: 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