Struct ntex_service::dev::ApplyServiceFactory [−][src]
pub struct ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
T: ServiceFactory<Req, Cfg, Error = Err>,
F: Fn(In, &T::Service) -> R + Clone,
R: Future<Output = Result<Out, Err>>, { /* fields omitted */ }
Expand description
apply()
service factory
Trait Implementations
impl<T, Req, Cfg, F, R, In, Out, Err> Clone for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
T: ServiceFactory<Req, Cfg, Error = Err> + Clone,
F: Fn(In, &T::Service) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
impl<T, Req, Cfg, F, R, In, Out, Err> Clone for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
T: ServiceFactory<Req, Cfg, Error = Err> + Clone,
F: Fn(In, &T::Service) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
impl<T, Req, Cfg, F, R, In, Out, Err> ServiceFactory<In, Cfg> for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
T: ServiceFactory<Req, Cfg, Error = Err>,
F: Fn(In, &T::Service) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
impl<T, Req, Cfg, F, R, In, Out, Err> ServiceFactory<In, Cfg> for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
T: ServiceFactory<Req, Cfg, Error = Err>,
F: Fn(In, &T::Service) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
type Response = Out
type Response = Out
Responses given by the service
type Error = Err
type Error = Err
Errors produced by the service
type Future = ApplyServiceFactoryResponse<T, Req, Cfg, F, R, In, Out, Err>
type Future = ApplyServiceFactoryResponse<T, Req, Cfg, F, R, In, Out, Err>
The future of the ServiceFactory
instance.
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
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<T, Req, Cfg, F, R, In, Out, Err> RefUnwindSafe for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Req, Cfg, F, R, In, Out, Err> Send for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
F: Send,
T: Send,
impl<T, Req, Cfg, F, R, In, Out, Err> Sync for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
F: Sync,
T: Sync,
impl<T, Req, Cfg, F, R, In, Out, Err> Unpin for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
F: Unpin,
T: Unpin,
impl<T, Req, Cfg, F, R, In, Out, Err> UnwindSafe for ApplyServiceFactory<T, Req, Cfg, F, R, In, Out, Err> where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Self
to a ServiceFactory