Module http

Source
Expand description

HTTP service, middleware, and future utilities

This module provides specialized versions of the various tower traits that are easier to work with in the context of HTTP requests and responses.

These traits can be used as aliases of sorts. Ideally, Rust will add trait alias support in the language and these traits can go away.

  • HttpService: A Service of http::Request to http::Response.
  • HttpMiddleware: Middleware for HttpService.
  • HttpFuture: A future yielding an http::Response, i.e. an HttpService response future.

These types will (probably) be moved into tower-http.

Structs§

LiftFuture
Contains an HttpFuture providing an implementation of Future.
LiftService
Contains an HttpService providing an implementation of Service.

Traits§

HttpFuture
HTTP response future trait
HttpMiddleware
HTTP middleware trait
HttpService
An HTTP service
NewHttpService
Creates HttpService values.