Struct actix_service::PipelineFactory [−][src]
Pipeline factory
Implementations
impl<SF, Req> PipelineFactory<SF, Req> where
SF: ServiceFactory<Req>,
[src]
SF: ServiceFactory<Req>,
pub fn and_then<I, SF1>(
self,
factory: I
) -> PipelineFactory<impl ServiceFactory<Req, Response = SF1::Response, Error = SF::Error, Config = SF::Config, InitError = SF::InitError, Service = impl Service<Req, Response = SF1::Response, Error = SF::Error> + Clone> + Clone, Req> where
Self: Sized,
SF::Config: Clone,
I: IntoServiceFactory<SF1, SF::Response>,
SF1: ServiceFactory<SF::Response, Config = SF::Config, Error = SF::Error, InitError = SF::InitError>,
[src]
self,
factory: I
) -> PipelineFactory<impl ServiceFactory<Req, Response = SF1::Response, Error = SF::Error, Config = SF::Config, InitError = SF::InitError, Service = impl Service<Req, Response = SF1::Response, Error = SF::Error> + Clone> + Clone, Req> where
Self: Sized,
SF::Config: Clone,
I: IntoServiceFactory<SF1, SF::Response>,
SF1: ServiceFactory<SF::Response, Config = SF::Config, Error = SF::Error, InitError = SF::InitError>,
Call another service after call to this one has resolved successfully.
pub fn then<I, SF1>(
self,
factory: I
) -> PipelineFactory<impl ServiceFactory<Req, Response = SF1::Response, Error = SF::Error, Config = SF::Config, InitError = SF::InitError, Service = impl Service<Req, Response = SF1::Response, Error = SF::Error> + Clone> + Clone, Req> where
Self: Sized,
SF::Config: Clone,
I: IntoServiceFactory<SF1, Result<SF::Response, SF::Error>>,
SF1: ServiceFactory<Result<SF::Response, SF::Error>, Config = SF::Config, Error = SF::Error, InitError = SF::InitError>,
[src]
self,
factory: I
) -> PipelineFactory<impl ServiceFactory<Req, Response = SF1::Response, Error = SF::Error, Config = SF::Config, InitError = SF::InitError, Service = impl Service<Req, Response = SF1::Response, Error = SF::Error> + Clone> + Clone, Req> where
Self: Sized,
SF::Config: Clone,
I: IntoServiceFactory<SF1, Result<SF::Response, SF::Error>>,
SF1: ServiceFactory<Result<SF::Response, SF::Error>, Config = SF::Config, Error = SF::Error, InitError = SF::InitError>,
Create NewService
to chain on a computation for when a call to the
service finished, passing the result of the call to the next
service U
.
Note that this function consumes the receiving pipeline and returns a wrapped version of it.
pub fn map<F, R>(
self,
f: F
) -> PipelineFactory<MapServiceFactory<SF, F, Req, R>, Req> where
Self: Sized,
F: FnMut(SF::Response) -> R + Clone,
[src]
self,
f: F
) -> PipelineFactory<MapServiceFactory<SF, F, Req, R>, Req> where
Self: Sized,
F: FnMut(SF::Response) -> R + Clone,
Map this service's output to a different type, returning a new service of the resulting type.
pub fn map_err<F, E>(
self,
f: F
) -> PipelineFactory<MapErrServiceFactory<SF, Req, F, E>, Req> where
Self: Sized,
F: Fn(SF::Error) -> E + Clone,
[src]
self,
f: F
) -> PipelineFactory<MapErrServiceFactory<SF, Req, F, E>, Req> where
Self: Sized,
F: Fn(SF::Error) -> E + Clone,
Map this service's error to a different error, returning a new service.
pub fn map_init_err<F, E>(
self,
f: F
) -> PipelineFactory<MapInitErr<SF, F, Req, E>, Req> where
Self: Sized,
F: Fn(SF::InitError) -> E + Clone,
[src]
self,
f: F
) -> PipelineFactory<MapInitErr<SF, F, Req, E>, Req> where
Self: Sized,
F: Fn(SF::InitError) -> E + Clone,
Map this factory's init error to a different error, returning a new service.
Trait Implementations
impl<T, Req> Clone for PipelineFactory<T, Req> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<SF, Req> ServiceFactory<Req> for PipelineFactory<SF, Req> where
SF: ServiceFactory<Req>,
[src]
SF: ServiceFactory<Req>,
type Config = SF::Config
Service factory configuration.
type Response = SF::Response
Responses given by the created services.
type Error = SF::Error
Errors produced by the created services.
type Service = SF::Service
The kind of Service
created by this factory.
type InitError = SF::InitError
Errors potentially raised while building a service.
type Future = SF::Future
The future of the Service
instance.
fn new_service(&self, cfg: SF::Config) -> Self::Future
[src]
Auto Trait Implementations
impl<SF, Req> Send for PipelineFactory<SF, Req> where
Req: Send,
SF: Send,
[src]
Req: Send,
SF: Send,
impl<SF, Req> Sync for PipelineFactory<SF, Req> where
Req: Sync,
SF: Sync,
[src]
Req: Sync,
SF: Sync,
impl<SF, Req> Unpin for PipelineFactory<SF, Req> where
Req: Unpin,
SF: Unpin,
[src]
Req: Unpin,
SF: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<SF, Req> IntoServiceFactory<SF, Req> for SF where
SF: ServiceFactory<Req>,
[src]
SF: ServiceFactory<Req>,
pub fn into_factory(Self) -> SF
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,