pub trait Range<T>{
type Error;
// Required methods
fn value_is_valid(&self, value: &T) -> bool;
fn check_value_is_valid(&self, value: &T) -> Result<(), Self::Error>;
}
Expand description
A trait to check if a particular value is within range
Required Associated Types§
Required Methods§
Sourcefn value_is_valid(&self, value: &T) -> bool
fn value_is_valid(&self, value: &T) -> bool
Returns true if the value is valid for the specified range