Function predicates::ord::gt

source ·
pub fn gt<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 a pre-defined value.

§Examples

use predicates::prelude::*;

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