impl FromRef<()> for ValidationContext<()>

This commit is contained in:
gengteng
2023-09-27 19:09:54 +08:00
parent 8f1aab74c6
commit 27412a1f81

View File

@@ -293,6 +293,12 @@ impl<Arguments> ValidationContext<Arguments> {
} }
} }
impl FromRef<()> for ValidationContext<()> {
fn from_ref(_: &()) -> Self {
ValidationContext::default()
}
}
/// `ValidError` is the error type returned when the `Valid` extractor fails. /// `ValidError` is the error type returned when the `Valid` extractor fails.
/// ///
/// It has two variants: /// It has two variants: