Trait finchers_runtime::service::HttpService [] [src]

pub trait HttpService {
    type RequestBody;
    type ResponseBody;
    type Error;
    type Future: Future<Item = Response<Self::ResponseBody>, Error = Self::Error>;
    fn call(&mut self, request: Request<Self::RequestBody>) -> Self::Future;
}

Trait representing an asynchronous function from an HTTP request to an HTTP response.

Associated Types

The type of message body in the request.

The type of message body in the response.

The type of error which will be returned from this service.

A Future which will be returned from call and resolved as an HTTP response.

Required Methods

Apply an HTTP request to this service and get a future which will be resolved as an HTTP response.

Implementations on Foreign Types

impl<S: HttpService> HttpService for Box<S>
[src]

[src]

Implementors