[][src]Struct actix_service::FnTransform

pub struct FnTransform<F, S, Req, Res> where
    F: FnMut(Req, &mut S) -> Res,
    Res: IntoFuture
{ /* fields omitted */ }

Methods

impl<F, S, Req, Res> FnTransform<F, S, Req, Res> where
    F: FnMut(Req, &mut S) -> Res,
    Res: IntoFuture
[src]

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

Trait Implementations

impl<F, S, Req, Res> Transform<S> for FnTransform<F, S, Req, Res> where
    F: FnMut(Req, &mut S) -> Res,
    Res: IntoFuture
[src]

type Request = Req

Requests handled by the service.

type Response = Res::Item

Responses given by the service.

type Error = Res::Error

Errors produced by the service.

type Future = Res::Future

The future response value.

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

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

impl<F, S, Req, Res> IntoTransform<FnTransform<F, S, Req, Res>, S> for F where
    F: FnMut(Req, &mut S) -> Res,
    Res: IntoFuture
[src]

impl<F, S, Req, Res> Clone for FnTransform<F, S, Req, Res> where
    F: FnMut(Req, &mut S) -> Res + Clone,
    Res: 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, Req, Res> Send for FnTransform<F, S, Req, Res> where
    F: Send,
    Req: Send,
    Res: Send,
    S: Send

impl<F, S, Req, Res> Sync for FnTransform<F, S, Req, Res> where
    F: Sync,
    Req: Sync,
    Res: Sync,
    S: Sync

Blanket Implementations

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
    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> Any for T where
    T: 'static + ?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.