Struct ntex_service::dev::ThenFactory
source · [−]pub struct ThenFactory<A, B, R>(_, _);Expand description
.then() service factory combinator
Trait Implementations
sourceimpl<A, B, R> Clone for ThenFactory<A, B, R>
impl<A, B, R> Clone for ThenFactory<A, B, R>
sourceimpl<A, B, R, C> ServiceFactory<R, C> for ThenFactory<A, B, R> where
A: ServiceFactory<R, C>,
C: Clone,
B: ServiceFactory<Result<A::Response, A::Error>, C, Error = A::Error, InitError = A::InitError>,
impl<A, B, R, C> ServiceFactory<R, C> for ThenFactory<A, B, R> where
A: ServiceFactory<R, C>,
C: Clone,
B: ServiceFactory<Result<A::Response, A::Error>, C, Error = A::Error, InitError = A::InitError>,
type Response = <B as ServiceFactory<Result<<A as ServiceFactory<R, C>>::Response, <A as ServiceFactory<R, C>>::Error>, C>>::Response
type Response = <B as ServiceFactory<Result<<A as ServiceFactory<R, C>>::Response, <A as ServiceFactory<R, C>>::Error>, C>>::Response
Responses given by the service
type Error = <A as ServiceFactory<R, C>>::Error
type Error = <A as ServiceFactory<R, C>>::Error
Errors produced by the service
type Service = Then<<A as ServiceFactory<R, C>>::Service, <B as ServiceFactory<Result<<A as ServiceFactory<R, C>>::Response, <A as ServiceFactory<R, C>>::Error>, C>>::Service, R>
type Service = Then<<A as ServiceFactory<R, C>>::Service, <B as ServiceFactory<Result<<A as ServiceFactory<R, C>>::Response, <A as ServiceFactory<R, C>>::Error>, C>>::Service, R>
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 = ThenFactoryResponse<A, B, R, C>
type Future = ThenFactoryResponse<A, B, R, C>
The future of the ServiceFactory instance.
sourcefn new_service(&self, cfg: C) -> Self::Future
fn new_service(&self, cfg: C) -> 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, B, R> RefUnwindSafe for ThenFactory<A, B, R> where
A: RefUnwindSafe,
B: RefUnwindSafe,
R: RefUnwindSafe,
impl<A, B, R> !Send for ThenFactory<A, B, R>
impl<A, B, R> !Sync for ThenFactory<A, B, R>
impl<A, B, R> Unpin for ThenFactory<A, B, R> where
R: Unpin,
impl<A, B, R> UnwindSafe for ThenFactory<A, B, R> where
A: RefUnwindSafe,
B: RefUnwindSafe,
R: 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