mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Add middleware::from_fn for creating middleware from async fns (#656)
* Add `middleware::from_fn` for creating middleware from async fns * More trait impls for `Next` * Make `Next::run` consume `self` * Use `.router_layer` in example, since middleware returns early * Actually `Next` probably shouldn't impl `Clone` and `Service` Has implications for backpressure and stuff * Simplify `print-request-response` example * Address review feedback * add changelog link
This commit is contained in:
@@ -44,5 +44,6 @@
|
||||
#![cfg_attr(test, allow(clippy::float_cmp))]
|
||||
|
||||
pub mod extract;
|
||||
pub mod middleware;
|
||||
pub mod response;
|
||||
pub mod routing;
|
||||
|
||||
Reference in New Issue
Block a user