Struct ntex_service::dev::MapErr
source · [−]pub struct MapErr<A, R, 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
sourceimpl<A, R, F, E> Service<R> for MapErr<A, R, F, E> where
A: Service<R>,
F: Fn(A::Error) -> E + Clone,
impl<A, R, F, E> Service<R> for MapErr<A, R, F, E> where
A: Service<R>,
F: Fn(A::Error) -> E + Clone,
type Error = E
type Error = E
Errors produced by the service.
type Future = MapErrFuture<A, R, F, E>
type Future = MapErrFuture<A, R, F, E>
The future response value.
sourcefn 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 more
sourcefn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
fn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
Shutdown service. Read more
sourcefn call(&self, req: R) -> Self::Future
fn call(&self, req: R) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations
impl<A, R, F, E> RefUnwindSafe for MapErr<A, R, F, E> where
A: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, R, F, E> Send for MapErr<A, R, F, E> where
A: Send,
F: Send,
impl<A, R, F, E> Sync for MapErr<A, R, F, E> where
A: Sync,
F: Sync,
impl<A, R, F, E> Unpin for MapErr<A, R, F, E> where
A: Unpin,
F: Unpin,
impl<A, R, F, E> UnwindSafe for MapErr<A, R, F, E> where
A: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
impl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
sourcefn into_service(self) -> T
fn into_service(self) -> T
Convert to a Service