Releases: tokio-rs/axum
axum-core - v0.2.0
-
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
. Instead
HeaderMap
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)
axum - v0.4.7
axum-macros - v0.1.2
- fixed: Use fully qualified
Result
type (#796)
axum-extra - v0.1.5
- added: Add
TypedPath::to_uri
for converting the path into aUri
(#790)
axum - v0.4.6
axum-macros - v0.1.1
- Add
#[derive(TypedPath)]
for use with axum-extra's new "type safe" routing API (#756)
axum-extra - v0.1.4
- fix: Depend on the right versions of axum and axum-macros (#782)
axum-extra - v0.1.3
axum-core - v0.1.2
- added: Implement
IntoResponse
forbytes::BytesMut
andbytes::Chain<T, U>
(#767)
v0.4.5
- Reference axum-macros instead of axum-debug. The latter has been superseded by
axum-macros and is deprecated (#738)