mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-09 00:00:12 +02:00
Add an Attachment type to axum-extra (#2789)
This commit is contained in:
@@ -103,6 +103,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) struct MakeErasedRouter<S> {
|
||||
pub(crate) router: Router<S>,
|
||||
pub(crate) into_route: fn(Router<S>, S) -> Route,
|
||||
|
||||
@@ -181,7 +181,7 @@ router.
|
||||
# Panics
|
||||
|
||||
- If the route overlaps with another route. See [`Router::route`]
|
||||
for more details.
|
||||
for more details.
|
||||
- If the route contains a wildcard (`*`).
|
||||
- If `path` is empty.
|
||||
|
||||
|
||||
+1
-2
@@ -17,8 +17,7 @@ use serde::{de::DeserializeOwned, Serialize};
|
||||
///
|
||||
/// - The request doesn't have a `Content-Type: application/json` (or similar) header.
|
||||
/// - The body doesn't contain syntactically valid JSON.
|
||||
/// - The body contains syntactically valid JSON, but it couldn't be deserialized into the target
|
||||
/// type.
|
||||
/// - The body contains syntactically valid JSON, but it couldn't be deserialized into the target type.
|
||||
/// - Buffering the request body fails.
|
||||
///
|
||||
/// ⚠️ Since parsing JSON requires consuming the request body, the `Json` extractor must be
|
||||
|
||||
Reference in New Issue
Block a user