[][src]Struct actix_service::PipelineFactory

pub struct PipelineFactory<T> { /* fields omitted */ }

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]

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]

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]

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]

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]

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.

impl<T> Clone for PipelineFactory<T> where
    T: Clone
[src]

Auto Trait Implementations

impl<T> Send for PipelineFactory<T> where
    T: Send

impl<T> Sync for PipelineFactory<T> where
    T: Sync

impl<T> Unpin for PipelineFactory<T> where
    T: Unpin

impl<T> UnwindSafe for PipelineFactory<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for PipelineFactory<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> IntoServiceFactory<T> for T where
    T: ServiceFactory
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]