Struct ntex_service::dev::AndThenFactory
source · [−]pub struct AndThenFactory<A, B, Req, Cfg> { /* private fields */ }Expand description
.and_then() service factory combinator
Implementations
sourceimpl<A, B, Req, Cfg> AndThenFactory<A, B, Req, Cfg> where
A: ServiceFactory<Req, Cfg>,
B: ServiceFactory<A::Response, Cfg, Error = A::Error, InitError = A::InitError>,
Cfg: Clone,
impl<A, B, Req, Cfg> AndThenFactory<A, B, Req, Cfg> where
A: ServiceFactory<Req, Cfg>,
B: ServiceFactory<A::Response, Cfg, Error = A::Error, InitError = A::InitError>,
Cfg: Clone,
Trait Implementations
sourceimpl<A, B, Req, Cfg> Clone for AndThenFactory<A, B, Req, Cfg>
impl<A, B, Req, Cfg> Clone for AndThenFactory<A, B, Req, Cfg>
sourceimpl<A, B, Req, Cfg> ServiceFactory<Req, Cfg> for AndThenFactory<A, B, Req, Cfg> where
A: ServiceFactory<Req, Cfg>,
B: ServiceFactory<A::Response, Cfg, Error = A::Error, InitError = A::InitError>,
Cfg: Clone,
impl<A, B, Req, Cfg> ServiceFactory<Req, Cfg> for AndThenFactory<A, B, Req, Cfg> where
A: ServiceFactory<Req, Cfg>,
B: ServiceFactory<A::Response, Cfg, Error = A::Error, InitError = A::InitError>,
Cfg: Clone,
type Response = <B as ServiceFactory<<A as ServiceFactory<Req, Cfg>>::Response, Cfg>>::Response
type Response = <B as ServiceFactory<<A as ServiceFactory<Req, Cfg>>::Response, Cfg>>::Response
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 = AndThen<<A as ServiceFactory<Req, Cfg>>::Service, <B as ServiceFactory<<A as ServiceFactory<Req, Cfg>>::Response, Cfg>>::Service, Req>
type Service = AndThen<<A as ServiceFactory<Req, Cfg>>::Service, <B as ServiceFactory<<A as ServiceFactory<Req, Cfg>>::Response, Cfg>>::Service, Req>
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 = AndThenServiceFactoryResponse<A, B, Req, Cfg>
type Future = AndThenServiceFactoryResponse<A, B, Req, 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, B, Req, Cfg> RefUnwindSafe for AndThenFactory<A, B, Req, Cfg> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B, Req, Cfg> !Send for AndThenFactory<A, B, Req, Cfg>
impl<A, B, Req, Cfg> !Sync for AndThenFactory<A, B, Req, Cfg>
impl<A, B, Req, Cfg> Unpin for AndThenFactory<A, B, Req, Cfg>
impl<A, B, Req, Cfg> UnwindSafe for AndThenFactory<A, B, Req, Cfg> where
A: RefUnwindSafe,
B: RefUnwindSafe,
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