Struct actix_net::service::FnService[][src]

pub struct FnService<F, Req, Resp, E, Fut> where
    F: Fn(Req) -> Fut,
    Fut: IntoFuture<Item = Resp, Error = E>, 
{ /* fields omitted */ }

Methods

impl<F, Req, Resp, E, Fut> FnService<F, Req, Resp, E, Fut> where
    F: Fn(Req) -> Fut,
    Fut: IntoFuture<Item = Resp, Error = E>, 
[src]

Trait Implementations

impl<F, Req, Resp, E, Fut> Clone for FnService<F, Req, Resp, E, Fut> where
    F: Fn(Req) -> Fut + Clone,
    Fut: IntoFuture<Item = Resp, Error = E>, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F, Req, Resp, E, Fut> Service for FnService<F, Req, Resp, E, Fut> where
    F: Fn(Req) -> Fut,
    Fut: IntoFuture<Item = Resp, Error = E>, 
[src]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

Returns Ready when the service is able to process requests. Read more

Process the request and return the response asynchronously. Read more

A future yielding the service when it is ready to accept a request.

impl<F, Req, Resp, Err, Fut> IntoService<FnService<F, Req, Resp, Err, Fut>> for F where
    F: Fn(Req) -> Fut + 'static,
    Fut: IntoFuture<Item = Resp, Error = Err>, 
[src]

Convert to a Service

Auto Trait Implementations

impl<F, Req, Resp, E, Fut> Send for FnService<F, Req, Resp, E, Fut> where
    E: Send,
    F: Send,
    Req: Send,
    Resp: Send

impl<F, Req, Resp, E, Fut> Sync for FnService<F, Req, Resp, E, Fut> where
    E: Sync,
    F: Sync,
    Req: Sync,
    Resp: Sync