mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-20 00:00:11 +02:00
Re-export debug_handler from axum (#1144)
* Re-export `debug_handler` from axum Fixes #1143 * also axum-extra
This commit is contained in:
@@ -8,7 +8,7 @@ license = "MIT"
|
|||||||
name = "axum-macros"
|
name = "axum-macros"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/tokio-rs/axum"
|
repository = "https://github.com/tokio-rs/axum"
|
||||||
version = "0.2.3"
|
version = "0.2.3" # remember to also bump the version that axum and axum-extra depends on
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
if you want the old behavior ([#1119])
|
if you want the old behavior ([#1119])
|
||||||
- **added** Implement `TryFrom<http:: Method>` for `MethodFilter` and use new `NoMatchingMethodFilter` error in case of failure ([#1130])
|
- **added** Implement `TryFrom<http:: Method>` for `MethodFilter` and use new `NoMatchingMethodFilter` error in case of failure ([#1130])
|
||||||
- **added:** Support running extractors from `middleware::from_fn` functions ([#1088])
|
- **added:** Support running extractors from `middleware::from_fn` functions ([#1088])
|
||||||
|
- **added:** Added `debug_handler` which is an attribute macro that improves
|
||||||
|
type errors when applied to handler function. It is re-exported from
|
||||||
|
`axum-macros`
|
||||||
|
|
||||||
[#1077]: https://github.com/tokio-rs/axum/pull/1077
|
[#1077]: https://github.com/tokio-rs/axum/pull/1077
|
||||||
[#1088]: https://github.com/tokio-rs/axum/pull/1088
|
[#1088]: https://github.com/tokio-rs/axum/pull/1088
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ form = ["serde_urlencoded"]
|
|||||||
http1 = ["hyper/http1"]
|
http1 = ["hyper/http1"]
|
||||||
http2 = ["hyper/http2"]
|
http2 = ["hyper/http2"]
|
||||||
json = ["serde_json"]
|
json = ["serde_json"]
|
||||||
|
macros = ["axum-macros"]
|
||||||
matched-path = []
|
matched-path = []
|
||||||
multipart = ["multer"]
|
multipart = ["multer"]
|
||||||
original-uri = []
|
original-uri = []
|
||||||
@@ -47,6 +48,7 @@ tower-layer = "0.3"
|
|||||||
tower-service = "0.3"
|
tower-service = "0.3"
|
||||||
|
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
|
axum-macros = { path = "../axum-macros", version = "0.2.3", optional = true }
|
||||||
base64 = { version = "0.13", optional = true }
|
base64 = { version = "0.13", optional = true }
|
||||||
headers = { version = "0.3.7", optional = true }
|
headers = { version = "0.3.7", optional = true }
|
||||||
multer = { version = "2.0.0", optional = true }
|
multer = { version = "2.0.0", optional = true }
|
||||||
|
|||||||
@@ -310,6 +310,7 @@
|
|||||||
//! `http1` | Enables hyper's `http1` feature | Yes
|
//! `http1` | Enables hyper's `http1` feature | Yes
|
||||||
//! `http2` | Enables hyper's `http2` feature | No
|
//! `http2` | Enables hyper's `http2` feature | No
|
||||||
//! `json` | Enables the [`Json`] type and some similar convenience functionality | Yes
|
//! `json` | Enables the [`Json`] type and some similar convenience functionality | Yes
|
||||||
|
//! `macros` | Enables optional utility macros | No
|
||||||
//! `matched-path` | Enables capturing of every request's router path and the [`MatchedPath`] extractor | Yes
|
//! `matched-path` | Enables capturing of every request's router path and the [`MatchedPath`] extractor | Yes
|
||||||
//! `multipart` | Enables parsing `multipart/form-data` requests with [`Multipart`] | No
|
//! `multipart` | Enables parsing `multipart/form-data` requests with [`Multipart`] | No
|
||||||
//! `original-uri` | Enables capturing of every request's original URI and the [`OriginalUri`] extractor | Yes
|
//! `original-uri` | Enables capturing of every request's original URI and the [`OriginalUri`] extractor | Yes
|
||||||
@@ -442,3 +443,6 @@ pub use self::form::Form;
|
|||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use axum_core::{BoxError, Error};
|
pub use axum_core::{BoxError, Error};
|
||||||
|
|
||||||
|
#[cfg(feature = "macros")]
|
||||||
|
pub use axum_macros::debug_handler;
|
||||||
|
|||||||
Reference in New Issue
Block a user