update
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
//! ## Example
|
||||
//!
|
||||
//! ```no_run
|
||||
//!
|
||||
//! use axum::extract::Query;
|
||||
//! use axum::routing::post;
|
||||
//! use axum::Router;
|
||||
@@ -41,8 +42,11 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
use crate::{HasValidate, HasValidateArgs};
|
||||
use crate::HasValidate;
|
||||
#[cfg(feature = "validator")]
|
||||
use crate::HasValidateArgs;
|
||||
use axum::extract::Query;
|
||||
#[cfg(feature = "validator")]
|
||||
use validator::ValidateArgs;
|
||||
|
||||
impl<T> HasValidate for Query<T> {
|
||||
@@ -52,6 +56,7 @@ impl<T> HasValidate for Query<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "validator")]
|
||||
impl<'v, T: ValidateArgs<'v>> HasValidateArgs<'v> for Query<T> {
|
||||
type ValidateArgs = T;
|
||||
fn get_validate_args(&self) -> &Self::ValidateArgs {
|
||||
|
||||
Reference in New Issue
Block a user