/// Add middleware to an application.
///
/// Middleware provides customization of the request/response cycle, such as compression,
/// logging, or header modification. Middleware is invoked when processing a request, and can
/// either continue processing (possibly modifying the response) or immediately return a
/// response. See the [`Middleware`] trait for details.
///
/// Middleware can only be added at the "top level" of an application, and is processed in the
/// order in which it is applied.
Add middleware to an application.
Middleware provides customization of the request/response cycle, such as compression,
logging, or header modification. Middleware is invoked when processing a request, and can
either continue processing (possibly modifying the response) or immediately return a
response. See the [`Middleware`] trait for details.

Middleware can only be added at the "top level" of an application, and is processed in the
order in which it is applied.
Add middleware to an application . Middleware provides customization of the request / response cycle such as compression logging or header modification . Middleware is invoked when processing a request and can either continue processing ( possibly modifying the response ) or immediately return a response . See the [ ` Middleware ` ] trait for details . Middleware can only be added at the " top level " of an application and is processed in the order in which it is applied .
pub fn middleware<M>(&mut self, middleware: M) -> &mut Self
    where
        M: Middleware<State>,
    {
        log::trace!("Adding middleware {}", middleware.name());
        let m = Arc::get_mut(&mut self.middleware)
            .expect("Registering middleware is not possible after the Server has started");
        m.push(Arc::new(middleware));
        self
    }
pub fn middleware < M > ( & mut self , middleware : M ) -> & mut Self where M : Middleware < State > , { log :: trace ! ( " " middleware name ( ) ) ; let m = Arc :: get_mut ( & mut self . middleware ) . expect ( " " ) ; m . push ( Arc :: new ( middleware ) ) ; self }
Add middleware to an application.
Add middleware to an application .
&mut self
middleware
M