axum/axum-macros/README.md
David Pedersen e4c389c94d
Add axum-macros crate with #[derive(FromRequest)] (#718)
* initial working impl

* support `#[from_request(via(...))]`

* support extracting the whole thing at once

* rely on type inference

* fix footgun

* fix typo

* generate rejection enums

* move tests to trybuild

* minor clean up

* docs

* Support multiple generic extractors with same "via" type

* support `Result` as well

* Update axum-macros/src/from_request.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* Add `#[automatically_derived]`

* remove needless `#[derive(Debug)]` on macro types

* Fix error messages that different for some reason

* Update axum-macros/src/lib.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* add more `#[automatically_derived]`

* support same types in tuple structs

* update docs

* prep axum-macros for release

* address review feedback

* Update axum-macros/src/lib.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* Update axum-macros/src/lib.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* Update known limitation

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2022-01-25 15:05:50 +01:00

45 lines
1.4 KiB
Markdown

# axum-macros
[![Build status](https://github.com/tokio-rs/axum/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/tokio-rs/axum-macros/actions/workflows/CI.yml)
[![Crates.io](https://img.shields.io/crates/v/axum-macros)](https://crates.io/crates/axum-macros)
[![Documentation](https://docs.rs/axum-macros/badge.svg)](https://docs.rs/axum-macros)
Macros for [`axum`].
More information about this crate can be found in the [crate documentation][docs].
## Safety
This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in 100% safe Rust.
## Minimum supported Rust version
axum-macros's MSRV is 1.54.
## Getting Help
You're also welcome to ask in the [Discord channel][chat] or open an [issue]
with your question.
## Contributing
:balloon: Thanks for your help improving the project! We are so happy to have
you! We have a [contributing guide][contributing] to help you get involved in the
`axum` project.
## License
This project is licensed under the [MIT license][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.
[`axum`]: https://crates.io/crates/axum
[chat]: https://discord.gg/tokio
[contributing]: /CONTRIBUTING.md
[docs]: https://docs.rs/axum-macros
[license]: /axum-macros/LICENSE
[issue]: https://github.com/tokio-rs/axum/issues/new