mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
* begin threading the state through * Pass state to extractors * make state extractor work * make sure nesting with different states work * impl Service for MethodRouter<()> * Fix some of axum-macro's tests * Implement more traits for `State` * Update examples to use `State` * consistent naming of request body param * swap type params * Default the state param to () * fix docs references * Docs and handler state refactoring * docs clean ups * more consistent naming * when does MethodRouter implement Service? * add missing docs * use `Router`'s default state type param * changelog * don't use default type param for FromRequest and RequestParts probably safer for library authors so you don't accidentally forget * fix examples * minor docs tweaks * clarify how to convert handlers into services * group methods in one impl block * make sure merged `MethodRouter`s can access state * fix docs link * test merge with same state type * Document how to access state from middleware * Port cookie extractors to use state to extract keys (#1250) * Updates ECOSYSTEM with a new sample project (#1252) * Avoid unhelpful compiler suggestion (#1251) * fix docs typo * document how library authors should access state * Add `RequestParts::with_state` * fix example * apply suggestions from review * add relevant changes to axum-extra and axum-core changelogs * Add `route_service_with_tsr` * fix trybuild expectations * make sure `SpaRouter` works with routers that have state * Change order of type params on FromRequest and RequestParts * reverse order of `RequestParts::with_state` args to match type params * Add `FromRef` trait (#1268) * Add `FromRef` trait * Remove unnecessary type params * format * fix docs link * format examples * Avoid unnecessary `MethodRouter` * apply suggestions from review Co-authored-by: Dani Pardo <[email protected]> Co-authored-by: Jonas Platte <[email protected]>
6.6 KiB
6.6 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
RouterExt::route_with_tsrfor adding routes with an additional "trailing slash redirect" route (#1119) - breaking:
Resource::nestandResource::nest_collectionhas been removed. You can instead convert theResourceinto aRouterand add additional routes as necessary (#1086) - changed: For methods that accept some
S: Service, the bounds have been relaxed so the response type must implementIntoResponserather than being a literalResponse - added: Support chaining handlers with
HandlerCallWithExtractors::or(#1170) - change: axum-extra's MSRV is now 1.60 (#1239)
- breaking:
SignedCookieJarandPrivateCookieJarnow extracts the keys from the router's state, rather than extensions - added: Add Protocol Buffer extractor and response (#1239)
- added: Add
Either*types for combining extractors and responses into a single type (#1263) - added:
WithRejectionextractor for customizing other extractors' rejections (#1262) - added: Add sync constructors to
CookieJar,PrivateCookieJar, andSignedCookieJarso they're easier to use in custom middleware - breaking:
Resourcehas a newStype param which represents the state (#1155) - breaking:
RouterExt::route_with_tsrnow only acceptsMethodRouters (#1155) - added:
RouterExt::route_service_with_tsrfor routing to anyService(#1155)
0.3.5 (27. June, 2022)
- added: Add
JsonLinesfor streaming newline delimited JSON (#1093) - change: axum-extra's MSRV is now 1.56 (#1098)
0.3.4 (08. June, 2022)
- fixed: Use
impl IntoResponseless in docs (#1049) - added: Add
AsyncReadBodyfor creating a body from atokio::io::AsyncRead(#1072)
0.3.3 (18. May, 2022)
- added: Add
extract::Querywhich supports multi-value items (#1041) - added: Support customizing rejections for
#[derive(TypedPath)](#1012)
0.3.2 (15. May, 2022)
- added: Add
extract::Formwhich supports multi-value items (#1031)
0.3.1 (10. May, 2022)
- fixed:
OptionandResultare now supported in typed path route handler parameters (#1001) - fixed: Support wildcards in typed paths (#1003)
- added: Support using a custom rejection type for
#[derive(TypedPath)]instead ofPathRejection(#1012)
0.3.0 (27. April, 2022)
- fixed: Don't depend on axum with default features enabled (#913)
- breaking: Private and signed cookies now requires enabling the
cookie-privateandcookie-signedfeatures respectively (#949) - changed: Update to tower-http 0.3 (#965)
0.2.1 (03. April, 2022)
- added: Re-export
SameSiteandExpirationfrom thecookiecrate (#898) - added: Add
PrivateCookieJarfor managing private cookies (#900) - added: Add
SpaRouterfor routing setups commonly used for single page applications (#904) - fixed: Fix
SignedCookieJarwhen using custom key types (#899)
0.2.0 (31. March, 2022)
- added: Add
TypedPath::to_urifor converting the path into aUri(#790) - added: Extractors and responses for dealing with cookies. See
extract::cookiesfor more details (#816) - breaking:
CachedRejectionhas been removed (#699) - breaking:
<Cached<T> as FromRequest>::Rejectionis nowT::Rejection. (#699) - breaking:
middleware::from_fnhas been remove from axum-extra and moved into the main axum crate (#719) - breaking:
HasRouteshas been removed.Router::mergenow acceptsInto<Router>(#819) - breaking:
RouterExt::withmethod has been removed. UseRouter::mergeinstead. It works identically (#819)
0.1.5 (1. March, 2022)
- added: Add
TypedPath::to_urifor converting the path into aUri(#790)
0.1.4 (22. February, 2022)
- fix: Depend on the right versions of axum and axum-macros (#782)
0.1.3 (22. February, 2022)
- added: Add type safe routing. See
axum_extra::routing::typedfor more details (#756) - fix: Depend on tower with
default_features = false(#666) - change:
middleware::from_fnhas been deprecated and moved into the main axum crate (#719)
0.1.2 (13. January, 2022)
- fix: Depend on tower with
default_features = false(#666)
0.1.1 (27. December, 2021)
- Add
middleware::from_fnfor creating middleware from async functions (#656) - Add support for returning pretty JSON response in
response::ErasedJson(#662)
0.1.0 (02. December, 2021)
- Initial release.