[−][src]Trait izanami_http::service::HttpService
An asynchronous service that handles HTTP requests on a transport.
Associated Types
type ResponseBody: HttpBody
The type of HTTP response returned from respond
.
type Error
The error type which will be returned from this service.
type Respond: Future<Item = Response<Self::ResponseBody>, Error = Self::Error>
The future that handles an incoming HTTP request.
Required methods
fn poll_ready(&mut self) -> Poll<(), Self::Error>
Returns true
when the service is ready to call respond
.
fn respond(&mut self, request: Request<RequestBody>) -> Self::Respond
Handles an incoming HTTP request and returns its response asynchronously.
Implementors
impl<S, ReqBd, ResBd> HttpService<ReqBd> for S where
S: Service<Request<ReqBd>, Response = Response<ResBd>>,
ReqBd: HttpBody,
ResBd: HttpBody,
[src]
S: Service<Request<ReqBd>, Response = Response<ResBd>>,
ReqBd: HttpBody,
ResBd: HttpBody,