Struct ntex::service::dev::MapServiceFactory [−][src]
pub struct MapServiceFactory<A, F, Req, Res, Cfg> { /* fields omitted */ }
Expand description
MapNewService
new service combinator
Trait Implementations
impl<A, F, Req, Res, Cfg> Clone for MapServiceFactory<A, F, Req, Res, Cfg> where
A: Clone,
F: Clone,
impl<A, F, Req, Res, Cfg> Clone for MapServiceFactory<A, F, Req, Res, Cfg> where
A: Clone,
F: Clone,
impl<A, F, Req, Res, Cfg> ServiceFactory<Req, Cfg> for MapServiceFactory<A, F, Req, Res, Cfg> where
A: ServiceFactory<Req, Cfg>,
F: FnMut(<A as ServiceFactory<Req, Cfg>>::Response) -> Res + Clone,
impl<A, F, Req, Res, Cfg> ServiceFactory<Req, Cfg> for MapServiceFactory<A, F, Req, Res, Cfg> where
A: ServiceFactory<Req, Cfg>,
F: FnMut(<A as ServiceFactory<Req, Cfg>>::Response) -> Res + Clone,
type Response = Res
type Response = Res
Responses given by the service
type Error = <A as ServiceFactory<Req, Cfg>>::Error
type Error = <A as ServiceFactory<Req, Cfg>>::Error
Errors produced by the service
type Service = Map<<A as ServiceFactory<Req, Cfg>>::Service, F, Req, Res>
type Service = Map<<A as ServiceFactory<Req, Cfg>>::Service, F, Req, Res>
The Service
value created by this factory
type InitError = <A as ServiceFactory<Req, Cfg>>::InitError
type InitError = <A as ServiceFactory<Req, Cfg>>::InitError
Errors produced while building a service.
type Future = MapServiceFuture<A, F, Req, Res, Cfg>
type Future = MapServiceFuture<A, F, Req, Res, Cfg>
The future of the ServiceFactory
instance.
pub fn new_service(
&self,
cfg: Cfg
) -> <MapServiceFactory<A, F, Req, Res, Cfg> as ServiceFactory<Req, Cfg>>::Future
pub fn new_service(
&self,
cfg: Cfg
) -> <MapServiceFactory<A, F, Req, Res, Cfg> as ServiceFactory<Req, Cfg>>::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, F, Req, Res, Cfg> RefUnwindSafe for MapServiceFactory<A, F, Req, Res, Cfg> where
A: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, F, Req, Res, Cfg> Send for MapServiceFactory<A, F, Req, Res, Cfg> where
A: Send,
F: Send,
impl<A, F, Req, Res, Cfg> Sync for MapServiceFactory<A, F, Req, Res, Cfg> where
A: Sync,
F: Sync,
impl<A, F, Req, Res, Cfg> Unpin for MapServiceFactory<A, F, Req, Res, Cfg> where
A: Unpin,
F: Unpin,
impl<A, F, Req, Res, Cfg> UnwindSafe for MapServiceFactory<A, F, Req, Res, Cfg> 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