Skip to main content

from_fn

Function from_fn 

Source
pub const fn from_fn<T, F>(f: F) -> FnValidator<F, T>
where T: ?Sized, F: Fn(&mut ValidationCtx, Option<&T>) -> ValidationResult,
Expand description

Creates a validator from a function, using FnValidator.