compose

Function compose 

Source
pub fn compose<'a, I>(
    middlewares: I,
    final_handler: RequestHandler,
) -> RequestHandler
where I: IntoIterator<Item = &'a Arc<dyn Middleware>>, I::IntoIter: DoubleEndedIterator,
Expand description

Build the final handler by folding the middlewares in reverse. Each middleware and handler is consumed exactly once.