Struct ntex_service::dev::MapServiceFactory
source · [−]pub struct MapServiceFactory<A, F, Req, Res, Cfg> { /* private fields */ }Expand description
MapNewService new service combinator
Trait Implementations
sourceimpl<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,
sourceimpl<A, F, Req, Res, Cfg> ServiceFactory<Req, Cfg> for MapServiceFactory<A, F, Req, Res, Cfg> where
A: ServiceFactory<Req, Cfg>,
F: FnMut(A::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::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.
sourcefn new_service(&self, cfg: Cfg) -> Self::Future
fn new_service(&self, cfg: Cfg) -> Self::Future
Create and return a new service value asynchronously.
sourcefn map<F, Res>(self, f: F) -> MapServiceFactory<Self, F, Req, Res, Cfg> where
Self: Sized,
F: FnMut(Self::Response) -> Res + Clone,
fn map<F, Res>(self, f: F) -> MapServiceFactory<Self, F, Req, Res, Cfg> where
Self: Sized,
F: FnMut(Self::Response) -> Res + Clone,
Map this service’s output to a different type, returning a new service of the resulting type. Read more
sourcefn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, Cfg, F, E> where
Self: Sized,
F: Fn(Self::Error) -> E + Clone,
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, Cfg, F, E> where
Self: Sized,
F: Fn(Self::Error) -> E + Clone,
Map this service’s error to a different error, returning a new service.
sourcefn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, F, E> where
Self: Sized,
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
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, Cfg> IntoServiceFactory<T, Req, Cfg> for T where
T: ServiceFactory<Req, Cfg>,
impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for T where
T: ServiceFactory<Req, Cfg>,
sourcefn into_factory(self) -> T
fn into_factory(self) -> T
Convert Self to a ServiceFactory