Trait simulacrum_shared::validator::Validator
[−]
[src]
pub trait Validator<I> { fn validate(&mut self, param: &I) -> bool; fn print(&self) -> String; }
A Validator
is an object that knows how to validate method parameters.
To use these, you typically pass them to the .with()
method for use with
the Params
Constraint.
Required Methods
fn validate(&mut self, param: &I) -> bool
This object has been called with the given parameters. Return true
if they are acceptable, and false
if they are not.
fn print(&self) -> String
Implementors
impl<I: PartialEq> Validator<I> for I