* 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>
4.8 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
- breaking:
FromRequest
has been reworked andRequestParts
has been removed. See axum's changelog for more details (#1272) - added: Added new
FromRequestParts
trait. See axum's changelog for more details (#1272) - breaking:
BodyAlreadyExtracted
has been removed (#1272)
0.2.7 (10. July, 2022)
- fix: Fix typos in
RequestParts
docs (#1147)
0.2.6 (18. June, 2022)
- change: axum-core's MSRV is now 1.56 (#1098)
0.2.5 (08. June, 2022)
- added: Automatically handle
http_body::LengthLimitError
inFailedToBufferBody
and map such errors to413 Payload Too Large
(#1048) - fixed: Use
impl IntoResponse
less in docs (#1049)
0.2.4 (02. May, 2022)
- added: Implement
IntoResponse
andIntoResponseParts
forhttp::Extensions
(#975) - added: Implement
IntoResponse
for(http::response::Parts, impl IntoResponse)
(#950) - added: Implement
IntoResponse
for(http::response::Response<()>, impl IntoResponse)
(#950) - added: Implement
IntoResponse for (Parts | Request<()>, $(impl IntoResponseParts)+, impl IntoResponse)
(#980)
0.2.3 (25. April, 2022)
- added: Add
response::ErrorResponse
andresponse::Result
forIntoResponse
-based error handling (#921)
0.2.2 (19. April, 2022)
- added: Add
AppendHeaders
for appending headers to a response rather than overriding them (#927)
0.2.1 (03. April, 2022)
- added: Add
RequestParts::extract
which allows applying an extractor as a method call (#897)
0.2.0 (31. March, 2022)
-
added: Add
IntoResponseParts
trait which allows defining custom response types for adding headers or extensions to responses (#797) -
breaking: Using
HeaderMap
as an extractor will no longer remove the headers and thus they'll still be accessible to other extractors, such asaxum::extract::Json
. InsteadHeaderMap
will clone the headers. You should prefer to useTypedHeader
to extract only the headers you need (#698)This includes these breaking changes:
RequestParts::take_headers
has been removed.RequestParts::headers
returns&HeaderMap
.RequestParts::headers_mut
returns&mut HeaderMap
.HeadersAlreadyExtracted
has been removed.- The
HeadersAlreadyExtracted
variant has been removed from these rejections:RequestAlreadyExtracted
RequestPartsAlreadyExtracted
<HeaderMap as FromRequest<_>>::Rejection
has been changed tostd::convert::Infallible
.
-
breaking:
axum::http::Extensions
is no longer an extractor (ie it doesn't implementFromRequest
). Theaxum::extract::Extension
extractor 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_extensions
has been removed.RequestParts::extensions
returns&Extensions
.RequestParts::extensions_mut
returns&mut Extensions
.RequestAlreadyExtracted
has been removed.<Request as FromRequest>::Rejection
is nowBodyAlreadyExtracted
.<http::request::Parts as FromRequest>::Rejection
is nowInfallible
.ExtensionsAlreadyExtracted
has been removed.
-
breaking:
RequestParts::body_mut
now returns&mut Option<B>
so the body can be swapped (#869)
0.1.2 (22. February, 2022)
- added: Implement
IntoResponse
forbytes::BytesMut
andbytes::Chain<T, U>
(#767)
0.1.1 (06. December, 2021)
- added:
axum_core::response::Response
now exists as a shorthand for writingResponse<BoxBody>
(#590)
0.1.0 (02. December, 2021)
- Initial release.