pub trait Validator<T> { fn accept(&mut self, value: &T) -> bool; }
A validator that can accept or reject a new register value
This trait is implemented for all function pointers and FnMut/Fn closures that accept an &T and return a bool.
FnMut
Fn
&T
bool
Returns true if the value is valid and should be stored, or false to reject the value