update to 0.5.0
This commit is contained in:
20
src/msgpack.rs
Normal file
20
src/msgpack.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
//! # Implementation of the `HasValidate` trait for the `MsgPack` extractor.
|
||||
//!
|
||||
|
||||
use crate::HasValidate;
|
||||
use axum_msgpack::{MsgPack, MsgPackRaw};
|
||||
use validator::Validate;
|
||||
|
||||
impl<T: Validate> HasValidate for MsgPack<T> {
|
||||
type Validate = T;
|
||||
fn get_validate(&self) -> &T {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Validate> HasValidate for MsgPackRaw<T> {
|
||||
type Validate = T;
|
||||
fn get_validate(&self) -> &T {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user