Function predicates::ord::ge

source ·
pub fn ge<T>(constant: T) -> OrdPredicate<T>
where T: PartialOrd + Debug,
Expand description

Creates a new predicate that will return true when the given variable is greater than or equal to a pre-defined value.

§Examples

use predicates::prelude::*;

let predicate = predicate::ge(5);
assert_eq!(false, predicate.eval(&4));
assert_eq!(true, predicate.eval(&5));
assert_eq!(true, predicate.eval(&6));