add examples and support for typed_path

This commit is contained in:
gengteng
2023-09-12 13:02:09 +08:00
parent 6f3915bb87
commit e7dba8fd0b
17 changed files with 904 additions and 39 deletions

View File

@@ -116,6 +116,9 @@ impl<E: IntoResponse> IntoResponse for ValidRejection<E> {
}
/// Trait for types that can provide a reference that can be validated for correctness.
///
/// Extractor types `T` that implement this trait can be used with `Valid`.
///
pub trait HasValidate {
/// Inner type that can be validated for correctness
type Validate: Validate;