* 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>
* Add IntoResponse impl for BytesMut and Chain
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* Add CHANGELOG entry
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* ECOSYSTEM: add the Svix webhooks service
* Update ECOSYSTEM.md
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Handle structs without fields
* Support opt-out of derived rejection traits
* Handle duplicate opt outs
* Improve error if opting out of `Display` or `Debug` but not `Error`
* document `rejection_derive`
* Handle using both `via` and `rejection_derive`
* don't derive debug for `RejectionDeriveOptOuts`
* Update axum-macros/src/from_request.rs
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
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>
* Add sqlx example with migrations
Simple use case for sqlx based on tokio postgres example.
Sqlite database is created on execution in ./target directory
and migrations are then run against it.
* sqlx example uses postgres instead of sqlite3
Also removed migrations and database creation code.
* 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>
* Introduce IntoResponseHeaders trait
* Implement IntoResponseHeaders for HeaderMap
* Add impl IntoResponse for impl IntoResponseHeaders
… and update IntoResponse impls that use HeaderMap to be generic instead.
* Add impl IntoResponseHeaders for Headers
… and remove IntoResponse impls that use it.
* axum-debug: Fix grammar in docs
* Explain confusing error message in docs
* Remove `RequestParts::take_extensions`
* fix out of date docs
* Remove RequestAlreadyExtracted and replace it with BodyAlreadyExtracted
* fix docs
* fix test
* Update axum-core/src/extract/mod.rs
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Remove macro only used once
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Change `HeaderMap` extractor to clone the headers
* fix docs
* changelog
* inline variable
* also add changelog item to axum
* don't list types from axum in axum-core's changelog
* document that `HeaderMap::from_request` clones the headers
* fix typo
* a few more typos
* Fix inconsistent indentation in axum/Cargo.toml
* Make MatchedPath and OriginalUri extractors and logic for them optional
… they add some runtime cost to handling any request that goes through
a Router, which only makes sense if they actually get used.
Enable both features by default for convenience.