impl HasValidateArgs for all extractors
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -66,6 +66,12 @@ impl<E> DerefMut for Valid<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Display> Display for ValidArgs<T> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
self.0.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> Valid<E> {
|
||||
/// Consume the `Valid` extractor and returns the inner type.
|
||||
pub fn into_inner(self) -> E {
|
||||
@@ -101,6 +107,12 @@ impl<E> DerefMut for ValidArgs<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Display> Display for Valid<T> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
self.0.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> ValidArgs<E> {
|
||||
/// Consume the `ValidArgs` extractor and returns the inner type.
|
||||
pub fn into_inner(self) -> E {
|
||||
|
||||
Reference in New Issue
Block a user