[][src]Struct actix_service::FnTransform

pub struct FnTransform<F, S, In, Out, Err> where
    F: FnMut(In, &mut S) -> Out + Clone,
    Out: IntoFuture
{ /* fields omitted */ }

Methods

impl<F, S, In, Out, Err> FnTransform<F, S, In, Out, Err> where
    F: FnMut(In, &mut S) -> Out + Clone,
    Out: IntoFuture
[src]

pub fn new(f: F) -> Self[src]

Trait Implementations

impl<F, S, In, Out, Err> Transform<S> for FnTransform<F, S, In, Out, Err> where
    S: Service,
    F: FnMut(In, &mut S) -> Out + Clone,
    Out: IntoFuture,
    Out::Error: From<S::Error>, 
[src]

type Request = In

Requests handled by the service.

type Response = Out::Item

Responses given by the service.

type Error = Out::Error

Errors produced by the service.

type Transform = Apply<S, F, In, Out>

The TransformService value created by this factory

type InitError = Err

Errors produced while building a service.

type Future = FutureResult<Self::Transform, Self::InitError>

The future response value.

fn map_init_err<F, E>(self, f: F) -> TransformMapInitErr<Self, S, F, E> where
    Self: Sized,
    F: Fn(Self::InitError) -> E, 
[src]

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

impl<F, S, In, Out, Err> IntoTransform<FnTransform<F, S, In, Out, Err>, S> for F where
    S: Service,
    F: FnMut(In, &mut S) -> Out + Clone,
    Out: IntoFuture,
    Out::Error: From<S::Error>, 
[src]

impl<F, S, In, Out, Err> Clone for FnTransform<F, S, In, Out, Err> where
    F: FnMut(In, &mut S) -> Out + Clone,
    Out: IntoFuture
[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<F, S, In, Out, Err> Send for FnTransform<F, S, In, Out, Err> where
    Err: Send,
    F: Send,
    In: Send,
    Out: Send,
    S: Send

impl<F, S, In, Out, Err> Sync for FnTransform<F, S, In, Out, Err> where
    Err: Sync,
    F: Sync,
    In: Sync,
    Out: Sync,
    S: Sync

Blanket Implementations

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> From for T[src]

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

type Error = Infallible

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

The type returned in the event of a conversion error.

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