Add an Attachment type to axum-extra (#2789)

This commit is contained in:
joeydewaal
2024-06-19 14:28:15 +02:00
committed by GitHub
parent 806bc26e62
commit fcb45b8d32
8 changed files with 119 additions and 10 deletions
+1
View File
@@ -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,
+1 -1
View File
@@ -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
View File
@@ -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