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