Commit graph

94 commits

Author SHA1 Message Date
David Pedersen
fe89ab5592
Release (#2461) 2023-12-29 17:47:06 +01:00
future-highway
56159b0d4e
JsonDeserializer extractor for zero-copy deserialization (#2431) 2023-12-29 12:06:47 +01:00
David Pedersen
72ccde5900
Update multer (#2433) 2023-12-17 11:31:38 +00:00
David Pedersen
b7d14d3602
Release axum 0.7 (#2354) 2023-11-27 09:30:38 +01:00
David Pedersen
1a78e093ed
Apply changelog changes from 0.6 branch to main (#2353) 2023-11-25 20:44:07 +01:00
Jonas Platte
906f803a20
Update changelog (#2349) 2023-11-25 18:34:04 +01:00
Michael Seele
e3d34bb553
axum-extra: Use impl Into<Cookie> (#2348) 2023-11-24 21:39:14 +01:00
Mikhail Antoshkin
39cc596e45
Add OptionalQuery extractor (#2310)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-11-18 12:38:30 +00:00
David Pedersen
3b3bbb2403
Make tokio an optional dependency of axum-extra (#2236) 2023-09-21 07:33:40 +00:00
David Pedersen
eade3fdad6
Update prost (#2224) 2023-09-14 15:19:23 +02:00
Jonas Platte
8af38763a5
Implement Clone for ErasedJson (#2142) 2023-08-02 19:35:04 +00:00
David Pedersen
877e3fe4de Move TypedHeader to axum-extra (#1850)
Co-authored-by: Michael Scofield <mscofield0@tutanota.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-04-21 17:45:31 +02:00
David Pedersen
c31bea2f96
Release axum and axum-extra (#1942) 2023-04-18 20:40:42 +02:00
David Pedersen
e97462d452
Add Html, Css, JavaScript, and Wasm response types (#1921) 2023-04-17 13:20:17 +02:00
David Pedersen
51edc9c895
Release (#1923) 2023-04-11 17:23:38 +02:00
David Pedersen
352cf9a266
Implement Deref and DerefMut for built-in extractors (#1922) 2023-04-10 07:18:35 +00:00
Jonas Platte
43b2d52403
Add OptionalPath extractor (#1889)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-04-09 12:23:13 +00:00
David Pedersen
4dd062e8ed Add missing changelog link 2023-03-22 15:26:17 +01:00
David Pedersen
562fa206f0
Release axum, axum-extra, axum-macros (#1875) 2023-03-22 15:22:47 +01:00
David Pedersen
03e8bc77f1
Implement IntoResponse for MultipartError (#1861) 2023-03-21 08:24:06 +00:00
David Pedersen
1133425d6b
Release axum, axum-macros, and axum-extra (#1843) 2023-03-13 11:00:13 +01:00
David Pedersen
bc3c35ea5a
Release all the crates (#1812) 2023-03-03 18:16:24 +01:00
John Downey
db22b7309d
Remove remnants of spa feature (#1802)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-03-03 14:43:19 +00:00
David Pedersen
5606ea3f9e
#[must_use] all the things! (#1809) 2023-03-03 14:12:35 +01:00
Dan Handrea
e167cfc325
Implement Clone for CookieJar, PrivateCookieJar and SignedCookieJar (#1808) 2023-03-03 11:13:25 +00:00
David Pedersen
aa2cbf6920
Add axum_extra::extract::Multipart (#1692) 2023-03-03 10:15:09 +01:00
David Pedersen
08bac36519
Release axum and axum-extra (#1788) 2023-02-27 09:41:11 +01:00
David Pedersen
27f05ad32e
Remove SpaRouter (#1784) 2023-02-25 11:05:23 +01:00
David Pedersen
f726f16b6d
Update to tower-http 0.4 (#1783) 2023-02-24 20:51:30 +00:00
David Pedersen
6a4825bb22
Rename ProtoBuf to Protobuf (#1763)
Co-authored-by: Allan <al@ayz.ai>
2023-02-24 21:40:42 +01:00
David Pedersen
c18ff9dd63
Release axum, axum-extra, and axum-macros (#1750) 2023-02-12 12:40:42 +01:00
David Pedersen
c454e37a1c
Update to cookie 0.17 (#1747) 2023-02-12 08:26:37 +01:00
David Pedersen
37922ab840
Add option_layer (#1696) 2023-02-11 23:11:21 +00:00
David Pedersen
b4204e223d
Add TypedPath::with_query_params (#1744) 2023-02-11 22:10:07 +00:00
David Pedersen
ee3cb971f7
axum-extra v0.4.2 (#1609) 2022-12-02 10:55:11 +00:00
David Pedersen
7386e5d185
Bug fixes for RouterExt:{route_with_tsr, route_service_with_tsr} (#1608)
* Bug fixes for `RouterExt:{route_with_tsr, route_service_with_tsr}`

* changelog link
2022-12-02 11:42:49 +01:00
David Pedersen
2121979a48
axum-extra - v0.4.1 (#1590) 2022-11-29 10:57:25 +01:00
David Pedersen
c7985b7858
Fix wrong From impl for Resource (#1589)
Really not sure how this got past the tests.
2022-11-29 09:35:26 +00:00
David Pedersen
1b6780cf6c
axum 0.6 and friends 🎉 (#1570)
* changelog

* bump versions

* reorder changelogs a bit

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Expand fallback inheritance

* Reword tsr

* Mention `parse-body-based-on-content-type` example

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-11-25 12:29:58 +00:00
David Pedersen
99c0224a7c
axum-extra 0.4.0-rc.3 (#1545)
* axum-extra 0.4.0-rc.3

Needs a new release because it uses the old state inheritance whic is
removed in the latest rc.

* fix
2022-11-19 13:02:11 +01:00
David Pedersen
e39d053d2f
New release candidates (#1514)
* New release candidates

* Update axum/Cargo.toml

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-11-09 09:01:47 +01:00
David Pedersen
9c804d506e Update changelog for axum-extra 2022-11-08 21:45:05 +01:00
David Pedersen
b315b60bca
Bump version of all crates (#1310)
* Bump version of all crates

* use the right versions inside the workspace
2022-08-23 22:57:13 +02:00
David Pedersen
f1769e5134
Re-organize changelog to make updating to 0.6 easier (#1274) 2022-08-20 21:11:02 +02:00
David Pedersen
423308de3c
Add type safe state extractor (#1155)
* 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 <dani.pardo@inmensys.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-08-17 15:13:31 +00:00
David Pedersen
e22f6f9d2b
Add Either{2..8} to axum-extra (#1263)
* Add `Either{2..8}`

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Either2 => Either

* Update axum-extra/src/either.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-08-17 08:57:19 +00:00
Altair Bueno
fb21561616
Add WithRejection (#1262)
* new(axum-extra): Added `WithRejection` base impl

Based on @jplatte's version (https://github.com/tokio-rs/axum/issues/1116#issuecomment-1215048273), with slight changes

- Using `From<E::Rejection>` to define the trait bound on a more concise way
- Renamed variables to something more meaningfull

* revert(axum-extra): Removed `with_rejection` feat

* ref(axum-extra): Replaced `match` with `?`

* tests(axum-extra): Added test for `WithRejection`

* examples: Replaced custom `Json` extractor with `WithRejection`

* docs(axum-extra): Added doc to `WithRejection`

* fmt(cargo-check): removed whitespaces

* fmt(customize-extractor-error): missing fmt

* docs(axum-extra): doctest includes `Handler` test

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* docs(axum-extra):` _ `-> `rejection`

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* docs(axum-extra): fixed suggestions

* fix(axum-extra): `WithRejection` manual trait impl

* revert(customize-extractor-error): Undo example changes

refs: d878eede18 , f9200bf4b9

* example(customize-extractor-error): Added reference to `WithRejection`

* docs(axum-extra): Removed `customize-extractor-error` reference

* fmt(axum-extra): cargo fmt

* docs(axum-extra): Added `WithRejection` to CHANGELOG.md

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-08-17 07:59:25 +00:00
David Pedersen
01630cfef6
Add sync constructors to CookieJar, SignedCookieJar, and PrivateCookieJar (#1264)
* Add sync constructors to `CookieJar`, `SignedCookieJar`, and `PrivateCookieJar`

* Move to constructor

* use `RequestParts::extract`
2022-08-16 15:42:01 +02:00
David Pedersen
fb32fcc07c Add protobuf extractor and response to changelog 2022-08-15 15:57:07 +02:00
David Pedersen
50a4be999d
Update matchit and fix nesting inconsistencies (#1086)
* Break `Router::nest` into `nest` and `nest_service` methods

* fix doc tests

* update docs

* fix

* Only accept `Router` in `Resource::{nest, nest_collection}`

* update changelog

* fix docs

* fix `MatchedPath` with `Router`s nested with `nest_service`

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* adjust docs for fallbacks

* Always nest services as opaque

* fix old docs reference

* more tests for `MatchedPath` with nested handlers

* minor clean up

* use identifier captures in format strings

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* fix test

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-08-11 10:17:08 +00:00