* 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 <[email protected]> * changelog Co-authored-by: Jonas Platte <[email protected]>
2.4 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
-
added: Add
IntoResponsePartstrait (#797) -
added: Implement
IntoResponseforbytes::BytesMutandbytes::Chain<T, U>(#767) -
breaking: Using
HeaderMapas an extractor will no longer remove the headers and thus they'll still be accessible to other extractors, such asaxum::extract::Json. InsteadHeaderMapwill clone the headers. You should prefer to useTypedHeaderto extract only the headers you need (#698)This includes these breaking changes:
RequestParts::take_headershas been removed.RequestParts::headersreturns&HeaderMap.RequestParts::headers_mutreturns&mut HeaderMap.HeadersAlreadyExtractedhas been removed.- The
HeadersAlreadyExtractedvariant has been removed from these rejections:RequestAlreadyExtractedRequestPartsAlreadyExtracted
<HeaderMap as FromRequest<_>>::Rejectionhas been changed tostd::convert::Infallible.
-
breaking:
axum::http::Extensionsis no longer an extractor (ie it doesn't implementFromRequest). Theaxum::extract::Extensionextractor is not impacted by this and works the same. This change makes it harder to accidentally remove all extensions which would result in confusing errors elsewhere (#699) This includes these breaking changes:RequestParts::take_extensionshas been removed.RequestParts::extensionsreturns&Extensions.RequestParts::extensions_mutreturns&mut Extensions.RequestAlreadyExtractedhas been removed.<Request as FromRequest>::Rejectionis nowBodyAlreadyExtracted.<http::request::Parts as FromRequest>::Rejectionis nowInfallible.ExtensionsAlreadyExtractedhas been removed.
0.1.1 (06. December, 2021)
- added:
axum_core::response::Responsenow exists as a shorthand for writingResponse<BoxBody>(#590)
0.1.0 (02. December, 2021)
- Initial release.