update to 0.5.0

This commit is contained in:
gengteng
2023-08-04 18:50:02 +08:00
parent f3f0171e72
commit d95e04b4d4
19 changed files with 836 additions and 292 deletions

20
src/msgpack.rs Normal file
View 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
}
}