Struct ntex::service::dev::MapErrServiceFactory [−][src]
pub struct MapErrServiceFactory<A, R, C, F, E> where
A: ServiceFactory<R, C>,
F: Fn(<A as ServiceFactory<R, C>>::Error) -> E + Clone, { /* fields omitted */ }
Expand description
Factory for the map_err
combinator, changing the type of a new
service’s error.
This is created by the NewServiceExt::map_err
method.
Trait Implementations
impl<A, R, C, F, E> Clone for MapErrServiceFactory<A, R, C, F, E> where
A: ServiceFactory<R, C> + Clone,
F: Fn(<A as ServiceFactory<R, C>>::Error) -> E + Clone,
impl<A, R, C, F, E> Clone for MapErrServiceFactory<A, R, C, F, E> where
A: ServiceFactory<R, C> + Clone,
F: Fn(<A as ServiceFactory<R, C>>::Error) -> E + Clone,
impl<A, R, C, F, E> ServiceFactory<R, C> for MapErrServiceFactory<A, R, C, F, E> where
A: ServiceFactory<R, C>,
F: Fn(<A as ServiceFactory<R, C>>::Error) -> E + Clone,
impl<A, R, C, F, E> ServiceFactory<R, C> for MapErrServiceFactory<A, R, C, F, E> where
A: ServiceFactory<R, C>,
F: Fn(<A as ServiceFactory<R, C>>::Error) -> E + Clone,
type Response = <A as ServiceFactory<R, C>>::Response
type Response = <A as ServiceFactory<R, C>>::Response
Responses given by the service
type Error = E
type Error = E
Errors produced by the service
type Service = MapErr<<A as ServiceFactory<R, C>>::Service, R, F, E>
type Service = MapErr<<A as ServiceFactory<R, C>>::Service, R, F, E>
The Service
value created by this factory
type InitError = <A as ServiceFactory<R, C>>::InitError
type InitError = <A as ServiceFactory<R, C>>::InitError
Errors produced while building a service.
type Future = MapErrServiceFuture<A, R, C, F, E>
type Future = MapErrServiceFuture<A, R, C, F, E>
The future of the ServiceFactory
instance.
pub fn new_service(
&self,
cfg: C
) -> <MapErrServiceFactory<A, R, C, F, E> as ServiceFactory<R, C>>::Future
pub fn new_service(
&self,
cfg: C
) -> <MapErrServiceFactory<A, R, C, F, E> as ServiceFactory<R, C>>::Future
Create and return a new service value asynchronously.
Map this service’s output to a different type, returning a new service of the resulting type. Read more
Map this service’s error to a different error, returning a new service.
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, F, E> where
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, F, E> where
F: Fn(Self::InitError) -> E + Clone,
Map this factory’s init error to a different error, returning a new service.
Auto Trait Implementations
impl<A, R, C, F, E> RefUnwindSafe for MapErrServiceFactory<A, R, C, F, E> where
A: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, R, C, F, E> Send for MapErrServiceFactory<A, R, C, F, E> where
A: Send,
F: Send,
impl<A, R, C, F, E> Sync for MapErrServiceFactory<A, R, C, F, E> where
A: Sync,
F: Sync,
impl<A, R, C, F, E> Unpin for MapErrServiceFactory<A, R, C, F, E> where
A: Unpin,
F: Unpin,
impl<A, R, C, F, E> UnwindSafe for MapErrServiceFactory<A, R, C, F, E> where
A: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Self
to a ServiceFactory
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more