Commit graph

133 commits

Author SHA1 Message Date
David Pedersen
03e8bc77f1
Implement IntoResponse for MultipartError (#1861) 2023-03-21 08:24:06 +00:00
David Pedersen
8e1eb8979f
Update to syn 2 (#1862) 2023-03-18 19:23:27 +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
Rob
68bf8ed7fc
Update documentation for FailedToDeserializeQueryString response type (#1795) 2023-02-27 22:29:39 +00: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
e6ff0281ae
Try cargo public-api-crates on CI (#1761) 2023-02-16 22:41:41 +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
Jonas Platte
2c9d2dea0e
Upgrade dependencies (#1746) 2023-02-11 23:36:40 +00: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
Jonas Platte
7ecf8bd6cf
Use implicit format-args captures where applicable (#1709) 2023-01-20 12:04:49 +01:00
David Pedersen
e3aaeb3cb7
Release axum, axum-core, and axum-macros (#1688) 2023-01-09 13:54:49 +01:00
Eray Karatay
949da2b300
axum-extra: Add serde_json as dev-dependency (#1673) 2023-01-03 21:14:24 +01:00
avdb
ea6eb81d6f
Typo fixes (#1628) 2022-12-08 17:50:59 +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
Allan
b1f7ee938d
Update axum-extra feature flag table (#1594) 2022-11-29 22:11:36 +00: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
0b26411f39
Change Router::with_state and impl Service for Router<()> (#1552)
* Implement `Service` for `Router<(), B>`

* wip

* wip

* fix some tests

* fix examples

* fix doc tests

* clean up docs

* changelog

* fix

* also call `with_state` when converting `MethodRouter` into a `MakeService`

* suggestions from review
2022-11-24 14:43:10 +00:00
walfie
7d0bb28876
Minor doc fixes (#1562) 2022-11-22 07:08:18 +00:00
Santiago Fraire Willemoes
ddee1c1d1a
docs: add how to use Arc<AppState> with the cookies examples (#1560) 2022-11-21 14:17:32 +01: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
64960bb19c
Type safe state inheritance (#1532)
* Make state type safe

* fix examples

* remove unnecessary `#[track_caller]`s

* Router::into_service -> Router::with_state

* fixup docs

* macro docs

* add missing docs

* fix examples

* format

* changelog

* Update trybuild tests

* Make sure fallbacks are still inherited for opaque services (#1540)

* Document nesting routers with different state

* fix leftover conflicts
2022-11-18 11:02:58 +00:00
David Pedersen
b1f894a500 Fix unused import if compiling with default features 2022-11-18 00:22: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
e0ef641e5f
Rework Form and Query rejections (#1496)
* Change `FailedToDeserializeQueryString` rejection for `Form`

Its now called `FailedToDeserializeForm`.

* changelog

* Make dedicate rejection type for axum-extra's `Form`

* update trybuild test

* Make dedicate rejection type for axum-extra's `Query`
2022-11-08 20:31:06 +00:00
Jonas Platte
944f388ae0 Add missing cfg's for signed cookie tests 2022-11-05 11:33:27 +01:00
David Pedersen
f9dc96fdce
Don't internally Arc the state (#1460) 2022-10-09 20:55:28 +00:00
Marek Barvíř
be54583d98
Reexport key-expansion (#1425)
* Reexport key-expansion

* Description

Co-authored-by: Marek Barvíř <barvir@cadwork.cz>
2022-09-28 20:06:56 +00:00
Jonas Platte
410fd49aa9
Fix Cached<T> as the last argument of a handler function (#1428)
* Remove FromRequest impl for Cached<T>

* Add a test for Cached<T> as the last argument of a handler function
2022-09-28 09:06:15 +00:00
Jonas Platte
4847d681b1
Allow Routers to inherit state (#1368)
* Rename Fallback::Custom to Fallback::Service

* Allow Routers to inherit state

* Rename Router::{nest => nest_service} and add new nest method for Routers

* Fix lints

* Add basic tests for state inheritance

* Changelog
2022-09-25 11:56:23 +00:00
Jonas Platte
69d64cecc3
Split RouterService off of Router (#1381) 2022-09-22 12:10:55 +02:00
Jonas Platte
4ade706ab0
Add track_caller to route_with_tsr (#1390)
… and route_service_with_tsr.
2022-09-18 23:12:08 +02:00
David Pedersen
54d8439e35
Ship rc.2 (#1363)
* rc.2

* don't bump version of axum-macros

* fix

* Update axum/Cargo.toml

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

* undo release of axum-extra

* fix

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-09-11 16:42:04 +02: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
be624306f4
Only allow last extractor to mutate the request (#1272)
* 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>
2022-08-22 12:23:20 +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
18dd830b84
Add #[non_exhaustive] to ProtoBufRejection (#1280) 2022-08-19 10:17:40 +00:00