[−][src]Trait refinement::Predicate
A Predicate
tests if a value satisfies a particular refinement type.
Used in conjunction with Refinement
.
Example
use refinement::Predicate; struct LessThanTen; impl Predicate<i32> for LessThanTen { fn test(x: &i32) -> bool { *x < 10 } }
Required methods
pub fn test(x: &T) -> bool
[src]
Test if a value satisfies the Predicate
.
See Refinement
for usage examples.