Predicate

Trait Predicate 

Source
pub trait Predicate<T: Matchable> {
    // Required methods
    fn test(&self, value: &T) -> bool;
    fn test_detailed(&self, value: &T) -> ConditionResult;
}
Expand description

Trait for individual condition/predicate evaluation.

Implemented by Condition to evaluate a single rule against a value.

Required Methods§

Source

fn test(&self, value: &T) -> bool

Test this predicate against a value.

Source

fn test_detailed(&self, value: &T) -> ConditionResult

Test with detailed result information.

Implementors§

Source§

impl<'a, T: Matchable + 'static> Predicate<T> for Condition<'a, T>