* 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>
* add `#[derive(FromRef)]`
* tests
* don't support skipping fields
probably wouldn't work at all since the whole state likely needs `Clone`
* UI tests
* changelog
* changelog link
* revert hello-world example, used for testing
* Re-export `#[derive(FromRef)]`
* Don't need to return `Result`
* use `collect` instead of quoting the iterator
* Mention it in axum's changelog
* Add missing leading double colon
* Separate handling of last element in FromRequest derive
* FromRequestParts derive
* fix it and add lots of tests
* docs
* changelog
* Update axum-macros/src/lib.rs
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* Only allow last extractor to mutate the request
* Change `FromRequest` and add `FromRequestParts` trait (#1275)
* Add `Once`/`Mut` type parameter for `FromRequest` and `RequestParts`
* 🪄
* split traits
* `FromRequest` for tuples
* Remove `BodyAlreadyExtracted`
* don't need fully qualified path
* don't export `Once` and `Mut`
* remove temp tests
* depend on axum again
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Port `Handler` and most extractors (#1277)
* Port `Handler` and most extractors
* Put `M` inside `Handler` impls, not trait itself
* comment out tuples for now
* fix lints
* Reorder arguments to `Handler` (#1281)
I think `Request<B>, Arc<S>` is better since its consistent with
`FromRequest` and `FromRequestParts`.
* Port most things in axum-extra (#1282)
* Port `#[derive(TypedPath)]` and `#[debug_handler]` (#1283)
* port #[derive(TypedPath)]
* wip: #[debug_handler]
* fix #[debug_handler]
* don't need itertools
* also require `Send`
* update expected error
* support fully qualified `self`
* Implement FromRequest[Parts] for tuples (#1286)
* Port docs for axum and axum-core (#1285)
* Port axum-extra (#1287)
* Port axum-extra
* Update axum-core/Cargo.toml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* remove `impl FromRequest for Either*`
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* New FromRequest[Parts] trait cleanup (#1288)
* Make private module truly private again
* Simplify tuple FromRequest implementation
* Port `#[derive(FromRequest)]` (#1289)
* fix tests
* fix docs
* revert examples
* fix docs link
* fix intra docs links
* Port examples (#1291)
* Document wrapping other extractors (#1292)
* axum-extra doesn't need to depend on axum-core (#1294)
Missed this in https://github.com/tokio-rs/axum/pull/1287
* Add `FromRequest` changes to changelogs (#1293)
* Update changelog
* Remove default type for `S` in `Handler`
* Clarify which types have default types for `S`
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* remove unused import
* Rename `Mut` and `Once` (#1296)
* fix trybuild expected output
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* 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
* Support `#[from_request(via(...))]` on enums
* Check `#[from_request]` on variants
* check for non enum/struct and clean up
* changelog
* changelog
* remove needless feature
* changelog ref
* Support `Option` and `Result` in typed paths
* changelog
* Update axum-extra/CHANGELOG.md
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* fix one more
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Easily convert typed paths into URIs
`#[derive(TypedPath)]` will now also generate `TryFrom<_> for Uri` for
easily converting paths into URIs for use with `Redirect` and friends.
Fixes https://github.com/tokio-rs/axum/issues/789
* Use a method on the `TypedPath` trait to convert to `Uri`
* fix doc ref
* Update changelogs
* 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>
* 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>