[−][src]Struct actix_service::PipelineFactory
Pipeline constructor
Methods
impl<T: ServiceFactory> PipelineFactory<T>
[src]
pub fn and_then<F, U>(
self,
factory: F
) -> PipelineFactory<AndThenServiceFactory<T, U>> where
Self: Sized,
T::Config: Clone,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = T::Config, Request = T::Response, Error = T::Error, InitError = T::InitError>,
[src]
self,
factory: F
) -> PipelineFactory<AndThenServiceFactory<T, U>> where
Self: Sized,
T::Config: Clone,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = T::Config, Request = T::Response, Error = T::Error, InitError = T::InitError>,
Call another service after call to this one has resolved successfully.
pub fn then<F, U>(self, factory: F) -> PipelineFactory<ThenServiceFactory<T, U>> where
Self: Sized,
T::Config: Clone,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = T::Config, Request = Result<T::Response, T::Error>, Error = T::Error, InitError = T::InitError>,
[src]
Self: Sized,
T::Config: Clone,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = T::Config, Request = Result<T::Response, T::Error>, Error = T::Error, InitError = T::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<T, F, R>> where
Self: Sized,
F: FnMut(T::Response) -> R + Clone,
[src]
Self: Sized,
F: FnMut(T::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<T, F, E>> where
Self: Sized,
F: Fn(T::Error) -> E + Clone,
[src]
self,
f: F
) -> PipelineFactory<MapErrServiceFactory<T, F, E>> where
Self: Sized,
F: Fn(T::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<T, F, E>> where
Self: Sized,
F: Fn(T::InitError) -> E + Clone,
[src]
Self: Sized,
F: Fn(T::InitError) -> E + Clone,
Map this factory's init error to a different error, returning a new service.
Trait Implementations
impl<T: ServiceFactory> ServiceFactory for PipelineFactory<T>
[src]
type Config = T::Config
Service factory configuration
type Request = T::Request
Requests handled by the service.
type Response = T::Response
Responses given by the service
type Error = T::Error
Errors produced by the service
type Service = T::Service
The Service
value created by this factory
type InitError = T::InitError
Errors produced while building a service.
type Future = T::Future
The future of the Service
instance.
fn new_service(&self, cfg: T::Config) -> Self::Future
[src]
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R> where
Self: Sized,
F: FnMut(Self::Response) -> R + Clone,
[src]
Self: Sized,
F: FnMut(Self::Response) -> R + Clone,
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E> where
Self: Sized,
F: Fn(Self::Error) -> E + Clone,
[src]
Self: Sized,
F: Fn(Self::Error) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
[src]
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
impl<T> Clone for PipelineFactory<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<T> Send for PipelineFactory<T> where
T: Send,
T: Send,
impl<T> Sync for PipelineFactory<T> where
T: Sync,
T: Sync,
impl<T> Unpin for PipelineFactory<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PipelineFactory<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for PipelineFactory<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> IntoServiceFactory<T> for T where
T: ServiceFactory,
[src]
T: ServiceFactory,
fn into_factory(Self) -> 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<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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 = !
The type returned in the event of a conversion error.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,