Add NestedUri (#161)

Fixes https://github.com/tokio-rs/axum/issues/159
This commit is contained in:
David Pedersen
2021-08-08 14:45:31 +02:00
committed by GitHub
parent 8013165908
commit b4bdddf9d2
6 changed files with 86 additions and 2 deletions
+10
View File
@@ -108,6 +108,16 @@ define_rejection! {
pub struct InvalidFormContentType;
}
define_rejection! {
#[status = INTERNAL_SERVER_ERROR]
#[body = "`NestedUri` extractor used for route that isn't nested"]
/// Rejection type used if you try and extract [`NestedUri`] from a route that
/// isn't nested.
///
/// [`NestedUri`]: crate::extract::NestedUri
pub struct NotNested;
}
/// Rejection type for [`Path`](super::Path) if the capture route
/// param didn't have the expected type.
#[derive(Debug)]