Validator

Type Alias Validator 

Source
pub type Validator<Val, Data, Ctx> = Box<dyn FnOnce(&Val, &Data, &Ctx, bool) -> ValidateResult>;
Expand description

A validator function that receives a setting value to validate, the parent configuration the setting belongs to, the current context, and can return a ValidateError on failure.

Aliased Typeยง

pub struct Validator<Val, Data, Ctx>(/* private fields */);