tower_web/middleware/
mod.rs

1//! Middleware traits and implementations.
2//!
3//! A middleware decorates an service and provides additional functionality.
4//! This additional functionality may include, but is not limited to:
5//!
6//! * Rejecting the request.
7//! * Taking an action based on the request.
8//! * Mutating the request before passing it along to the application.
9//! * Mutating the response returned by the application.
10//!
11//! A middleware implements the [`Middleware`] trait.
12//!
13//! Currently, the following middleware implementations are provided:
14//!
15//! * [access logging][log]
16//!
17//! More will come.
18//!
19//! **Note**: This module will eventually be extracted out of `tower-web` into
20//! `tower` and `tower-http`.
21//!
22//! [`Middleware`]: trait.Middleware.html
23//! [log]: log/index.html
24
25pub mod cors;
26pub mod deflate;
27pub mod log;
28
29mod chain;
30mod identity;
31mod middleware;
32
33pub use self::chain::Chain;
34pub use self::identity::Identity;
35pub use self::middleware::Middleware;