axum/axum-extra
David Pedersen f4716084a7
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
2021-12-27 14:01:26 +01:00
..
src Add middleware::from_fn for creating middleware from async fns (#656) 2021-12-27 14:01:26 +01:00
Cargo.toml Add middleware::from_fn for creating middleware from async fns (#656) 2021-12-27 14:01:26 +01:00
CHANGELOG.md Add middleware::from_fn for creating middleware from async fns (#656) 2021-12-27 14:01:26 +01:00
LICENSE Add axum-extra crate (#536) 2021-11-17 20:00:32 +00:00
README.md Add axum-extra crate (#536) 2021-11-17 20:00:32 +00:00

axum-extra

Build status Crates.io Documentation

Extra utilities for axum.

More information about this crate can be found in the crate documentation.

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% safe Rust.

Minimum supported Rust version

axum-extra's MSRV is 1.54.

Getting Help

You're also welcome to ask in the Discord channel or open an issue with your question.

Contributing

🎈 Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the axum project.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in axum by you, shall be licensed as MIT, without any additional terms or conditions.