Files
axum-valid/src/path.rs
2023-08-04 18:50:02 +08:00

14 lines
280 B
Rust

//! # Implementation of the `HasValidate` trait for the `Path` extractor.
//!
use crate::HasValidate;
use axum::extract::Path;
use validator::Validate;
impl<T: Validate> HasValidate for Path<T> {
type Validate = T;
fn get_validate(&self) -> &T {
&self.0
}
}