pub trait NewHttpService {
type RequestBody;
type ResponseBody;
type Error;
type Service: HttpService<RequestBody = Self::RequestBody, ResponseBody = Self::ResponseBody, Error = Self::Error>;
type InitError;
type Future: Future<Item = Self::Service, Error = Self::InitError>;
// Required method
fn new_service(&self) -> Self::Future;
}Expand description
A factory of an asynchronous HTTP service.
Required Associated Types§
Sourcetype RequestBody
type RequestBody
The type of message body in the request.
Sourcetype ResponseBody
type ResponseBody
The type of message body in the response.
Sourcetype Service: HttpService<RequestBody = Self::RequestBody, ResponseBody = Self::ResponseBody, Error = Self::Error>
type Service: HttpService<RequestBody = Self::RequestBody, ResponseBody = Self::ResponseBody, Error = Self::Error>
The type of HttpService to be created by this factory.
Required Methods§
Sourcefn new_service(&self) -> Self::Future
fn new_service(&self) -> Self::Future
Create a new instance of HttpService asynchronously.