Struct ntex_service::dev::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.
Trait Implementations§
source§impl<A, R, F, E> Service<R> for MapErr<A, F, E>where
A: Service<R>,
F: Fn(A::Error) -> E,
impl<A, R, F, E> Service<R> for MapErr<A, F, E>where A: Service<R>, F: Fn(A::Error) -> E,
§type Future<'f> = MapErrFuture<'f, A, R, F, E>
where
A: 'f,
R: 'f,
F: 'f,
E: 'f
type Future<'f> = MapErrFuture<'f, A, R, F, E> where A: 'f, R: 'f, F: 'f, E: 'f
The future response value.
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moresource§fn call<'a>(&'a self, req: R, ctx: ServiceCtx<'a, Self>) -> Self::Future<'a>
fn call<'a>(&'a self, req: R, ctx: ServiceCtx<'a, Self>) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where
Self: Sized,
F: Fn(Self::Response) -> Res,
fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where Self: Sized, F: Fn(Self::Response) -> Res,
Map this service’s output to a different type, returning a new service of the resulting type. Read more
source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where
Self: Sized,
F: Fn(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where Self: Sized, F: Fn(Self::Error) -> E,
Map this service’s error to a different error, returning a new service. Read more
source§fn chain(self) -> ServiceChain<Self, Req>where
Self: Sized,
fn chain(self) -> ServiceChain<Self, Req>where Self: Sized,
Convert
Self to a ServiceChainAuto 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> 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<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Servicesource§fn into_chain(self) -> ServiceChain<Svc, Req>where
Self: Sized,
fn into_chain(self) -> ServiceChain<Svc, Req>where Self: Sized,
Convert
Self to a ServiceChain