diff --git a/serde_valid/src/lib.rs b/serde_valid/src/lib.rs index 2dc55ce..b350a8d 100644 --- a/serde_valid/src/lib.rs +++ b/serde_valid/src/lib.rs @@ -685,7 +685,9 @@ where pub use serde_valid_derive::Validate; +#[doc(hidden)] pub mod helpers { + /// This function is used to avoid [rustc(E0282)](https://doc.rust-lang.org/error_codes/E0282.html) error in `#[validate(custom)]` validator on the struct. pub fn wrap_closure_validation( data: &T, f: impl FnOnce(&T) -> Result<(), crate::validation::Error>,