pub trait Validator<T> {
    fn accept(&mut self, value: &T) -> bool;
}
Expand description

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.

Required methods

Returns true if the value is valid and should be stored, or false to reject the value

Implementors