[][src]Struct actix_service::Apply

pub struct Apply<T, F, In, Out, Request> where
    T: Service<Request>, 
{ /* fields omitted */ }

Apply service combinator

Methods

impl<T, F, In, Out, Request> Apply<T, F, In, Out, Request> where
    T: Service<Request>,
    F: Fn(In, &mut T) -> Out,
    Out: IntoFuture,
    Out::Error: From<T::Error>, 
[src]

pub fn new<I: IntoService<T, Request>>(service: I, f: F) -> Self
[src]

Create new Apply combinator

Trait Implementations

impl<T, F, In, Out, Request> Service<In> for Apply<T, F, In, Out, Request> where
    T: Service<Request>,
    F: Fn(In, &mut T) -> Out,
    Out: IntoFuture,
    Out::Error: From<T::Error>, 
[src]

type Response = Out::Item

Responses given by the service.

type Error = Out::Error

Errors produced by the service.

type Future = Out::Future

The future response value.

impl<T, F, In, Out, Request> Clone for Apply<T, F, In, Out, Request> where
    T: Service<Request> + Clone,
    F: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, F, In, Out, Request> Send for Apply<T, F, In, Out, Request> where
    F: Send,
    In: Send,
    Out: Send,
    Request: Send,
    T: Send

impl<T, F, In, Out, Request> Sync for Apply<T, F, In, Out, Request> where
    F: Sync,
    In: Sync,
    Out: Sync,
    Request: Sync,
    T: Sync

Blanket Implementations

impl<T, Request> ServiceExt for T where
    T: Service<Request> + ?Sized
[src]

fn apply<T, I, F, Out, Req>(
    self,
    service: I,
    f: F
) -> AndThen<Self, Apply<T, F, Self::Response, Out, Req>> where
    Self: Sized,
    T: Service<Req, Error = Self::Error>,
    I: IntoService<T, Req>,
    F: Fn(Self::Response, &mut T) -> Out,
    Out: IntoFuture<Error = Self::Error>, 
[src]

Apply function to specified service and use it as a next service in chain. Read more

fn and_then<F, B>(self, service: F) -> AndThen<Self, B> where
    Self: Sized,
    F: IntoService<B, Self::Response>,
    B: Service<Self::Response, Error = Self::Error>, 
[src]

Call another service after call to this one has resolved successfully. Read more

fn from_err<E>(self) -> FromErr<Self, E> where
    Self: Sized,
    E: From<Self::Error>, 
[src]

Map this service's error to any error implementing From for this servicesError`. Read more

fn then<B>(self, service: B) -> Then<Self, B> where
    Self: Sized,
    B: Service<Result<Self::Response, Self::Error>, Error = Self::Error>, 
[src]

Chain on a computation for when a call to the service finished, passing the result of the call to the next service B. Read more

fn map<F, R>(self, f: F) -> Map<Self, F, R> where
    Self: Sized,
    F: Fn(Self::Response) -> R, 
[src]

Map this service's output to a different type, returning a new service of the resulting type. Read more

fn map_err<F, E>(self, f: F) -> MapErr<Self, F, E> where
    Self: Sized,
    F: Fn(Self::Error) -> E, 
[src]

Map this service's error to a different error, returning a new service. Read more

impl<T, Request> IntoService for T where
    T: Service<Request>, 
[src]

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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