* changelog
* bump versions
* reorder changelogs a bit
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Expand fallback inheritance
* Reword tsr
* Mention `parse-body-based-on-content-type` example
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* New release candidates
* Update axum/Cargo.toml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Support `State` with `#[derive(FromRequest[Parts])]`
Fixes https://github.com/tokio-rs/axum/issues/1314
This makes it possible to extract things via `State` in
`#[derive(FromRequet)]`:
```rust
struct Foo {
state: State<AppState>,
}
```
The state can also be inferred in a lot of cases so you only need to
write:
```rust
struct Foo {
// since we're using `State<AppState>` we know the state has to be
// `AppState`
state: State<AppState>,
}
```
Same for
```rust
struct Foo {
#[from_request(via(State))]
state: AppState,
}
```
And
```rust
struct AppState {}
```
I think I've covered all the edge cases but there are (unsurprisingly) a
few.
* make sure things can be combined with other extractors
* main functions in ui tests don't need to be async
* Add test for multiple identicaly state types
* Add failing test for multiple states
* Fix changelog entry for MSRV change in axum-extra 0.3.5
* Bump MSRV to 1.60 for axum, axum-extra, axum-macros
* Use new Cargo features to avoid implicit features for optional dependencies
* wip
* wip
* make macro implement trait
* checkpoint
* checkpoint
* Simplify things quite a bit
* re-export `axum_macros::TypedPath` from `axum_extra`
* docs
* add missing feature
* fix docs link
* fix features
* fix missing imports
* make serde an optional dep again
* ui tests
* Break things up a bit
* Update span for `FromRequest` impls to point to callsite
* make docs feature labels show up automatically
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* add note about Display/Serialize being compatible
* Update axum-extra/src/routing/typed.rs
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* fix missing docs link
* what about typed methods?
* Revert "what about typed methods?"
This reverts commit cc1f989467.
* don't allow wildcards for now
* percent encode params
* Update axum-extra/src/routing/typed.rs
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* rephrase args
* changelog
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Move axum-debug into axum-macros
* fix ref to axum-macros in changelog
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* 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>