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

14 lines
295 B
Rust

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