* feat: add response::{Error, Result}
This type makes for efficient use of the `?` operator when in a function
with multiple return error types that all implement `IntoResponse`.
Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>
* misc adjustments from PR review
* Rename to `ErrorResponse` and `ResultResponse`
* nitpicky docs changes
* update changelog
* changelog wording
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Add `IntoResponseParts`
* docs
* Add test
* don't allow overriding body or response
* macroify impls
* re-order things a bit
* Fix tests
* Also allow overriding version
* Move things into separate modules
* docs
* clean up
* fix trybuild test
* remove churn
* simplify buliding response
* fixup test
* fix docs typo
* Use `HeaderValue::from_static`, might be faster
* Bring back `impl IntoResponse` in example
* Remove blanket impl to improve error message
* don't need to set `content-type`
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* 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>
* 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
* Move `IntoResponse` to axum-core
* Move `FromRequest` to axum-core
* some clean up
* Remove hyper dependency from axum-core
* Fix docs reference
* Use default
* Update changelog
* Remove mention of default type