From 323d16c142af6a66470089c304283345b717dfe9 Mon Sep 17 00:00:00 2001 From: gengteng Date: Tue, 26 Sep 2023 18:46:00 +0800 Subject: [PATCH] add doc for ValidArgs --- src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 3be4abd..6000fe3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,7 +73,17 @@ impl Valid { } } +/// `ValidArgs` can be used with extractors from the various modules. +/// Refer to the examples for `Valid` in each module - the usage of +/// `ValidArgs` is similar, except the inner data type implements +/// `ValidateArgs` instead of `Validate`. /// +/// `ValidateArgs` is usually automatically implemented by validator's +/// derive macros. Refer to validator's documentation for details. +/// +/// Note that the documentation for each module currently only shows +/// examples of `Valid`, and does not demonstrate concrete usage of +/// `ValidArgs`, but the usage is analogous. #[derive(Debug, Clone, Copy, Default)] pub struct ValidArgs(pub E);