[][src]Struct scrappy_service::dev::FnServiceFactory

pub struct FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    F: FnMut(Req) -> Fut,
    Fut: Future<Output = Result<Res, Err>>, 
{ /* fields omitted */ }

Trait Implementations

impl<F, Fut, Req, Res, Err, Cfg> Clone for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    F: FnMut(Req) -> Fut + Clone,
    Fut: Future<Output = Result<Res, Err>>, 
[src]

impl<F, Fut, Req, Res, Err, Cfg> IntoServiceFactory<FnServiceFactory<F, Fut, Req, Res, Err, Cfg>> for F where
    F: Fn(Req) -> Fut + Clone,
    Fut: Future<Output = Result<Res, Err>>, 
[src]

impl<F, Fut, Req, Res, Err> Service for FnServiceFactory<F, Fut, Req, Res, Err, ()> where
    F: FnMut(Req) -> Fut + Clone,
    Fut: Future<Output = Result<Res, Err>>, 
[src]

type Request = Req

Requests handled by the service.

type Response = Res

Responses given by the service.

type Error = Err

Errors produced by the service.

type Future = Fut

The future response value.

impl<F, Fut, Req, Res, Err, Cfg> ServiceFactory for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    F: FnMut(Req) -> Fut + Clone,
    Fut: Future<Output = Result<Res, Err>>, 
[src]

type Request = Req

Requests handled by the service.

type Response = Res

Responses given by the service

type Error = Err

Errors produced by the service

type Config = Cfg

Service factory configuration

type Service = FnService<F, Fut, Req, Res, Err>

The Service value created by this factory

type InitError = ()

Errors produced while building a service.

type Future = Ready<Result<Self::Service, Self::InitError>>

The future of the Service instance.

Auto Trait Implementations

impl<F, Fut, Req, Res, Err, Cfg> RefUnwindSafe for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    Cfg: RefUnwindSafe,
    F: RefUnwindSafe,
    Req: RefUnwindSafe

impl<F, Fut, Req, Res, Err, Cfg> Send for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    Cfg: Send,
    F: Send,
    Req: Send

impl<F, Fut, Req, Res, Err, Cfg> Sync for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    Cfg: Sync,
    F: Sync,
    Req: Sync

impl<F, Fut, Req, Res, Err, Cfg> Unpin for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    Cfg: Unpin,
    F: Unpin,
    Req: Unpin

impl<F, Fut, Req, Res, Err, Cfg> UnwindSafe for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
    Cfg: UnwindSafe,
    F: UnwindSafe,
    Req: UnwindSafe

Blanket Implementations

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

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

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

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

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

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

impl<T> IntoServiceFactory<T> for T where
    T: ServiceFactory
[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 = Infallible

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.