tower_web/util/http/
mod.rs

1//! HTTP service, middleware, and future utilities
2//!
3//! This module provides specialized versions of the various tower traits that
4//! are easier to work with in the context of HTTP requests and responses.
5//!
6//! These traits can be used as aliases of sorts. Ideally, Rust will add trait
7//! alias support in the language and these traits can go away.
8//!
9//! * [`HttpService`]: A `Service` of `http::Request` to `http::Response`.
10//! * [`HttpMiddleware`]: Middleware for `HttpService`.
11//! * [`HttpFuture`]: A future yielding an http::Response, i.e. an `HttpService`
12//! response future.
13//!
14//! These types will (probably) be moved into tower-http.
15//!
16//! [`HttpService`]: trait.HttpService.html
17//! [`HttpMiddleware`]: trait.HttpMiddleware.html
18//! [`HttpFuture`]: trait.HttpFuture.html
19
20mod future;
21mod middleware;
22mod new_service;
23mod service;
24
25pub use self::future::{HttpFuture, LiftFuture};
26pub use self::middleware::HttpMiddleware;
27pub use self::new_service::NewHttpService;
28pub use self::service::{HttpService, LiftService};
29
30pub(crate) use self::future::sealed::Sealed as SealedFuture;