pub fn violated(&self, value: f32) -> Option<bool> {
        if self.min.is_none() && self.max.is_none() {
            None
        } else {
            let b = self.min.map(|min| value < min)
                .unwrap_or(false)
                ||
                self.max.map(|max| value > max)
                .unwrap_or(false);

            Some(b)
        }
    }
/** Returns true if the given value violates the criterion.

    If there is no part of the criterion can be violated this function will return None.
     */
Returns true if the given value violates the criterion.
If there is no part of the criterion can be violated this function will return None.
Returns true if the given value violates the criterion . If there is no part of the criterion can be violated this function will return None .
pub fn violated(&self, value: f32) -> Option<bool> {
        if self.min.is_none() && self.max.is_none() {
            None
        } else {
            let b = self.min.map(|min| value < min)
                .unwrap_or(false)
                ||
                self.max.map(|max| value > max)
                .unwrap_or(false);
            Some(b)
        }
    }
pub fn violated ( & self , value : f32 ) -> Option < bool > { if self . min . is_none ( ) && self . max . is_none ( ) { None } else { let b = self . min . map ( | min | value < min ) . unwrap_or ( false ) || self . max . map ( | max | value > max ) . unwrap_or ( false ) ; Some ( b ) } }
Returns true if the given value violates the criterion.
Returns true if the given value violates the criterion .
&self
value
f32
&self
value
f32