pub trait NewHttpService: Sealed {
type RequestBody: BufStream;
type ResponseBody: BufStream;
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_http_service(&self) -> Self::Future;
}Expand description
Creates HttpService values.
This is not intended to be implemented directly. Instead, it is a trait
alias of sorts, aliasing tower_service::NewService trait with
http::Request and http::Response types.
Required Associated Types§
Sourcetype RequestBody: BufStream
type RequestBody: BufStream
The HTTP request body handled by the service.
Sourcetype ResponseBody: BufStream
type ResponseBody: BufStream
The HTTP response body returned by the service.
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 Service value created by this factory
Required Methods§
Sourcefn new_http_service(&self) -> Self::Future
fn new_http_service(&self) -> Self::Future
Create and return a new service value asynchronously.