Skip to main content

Predicate

Trait Predicate 

Source
pub trait Predicate: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn evaluate(&self, value: &Value, args: &Value) -> bool;
}
Expand description

A named predicate function.

Required Methods§

Source

fn name(&self) -> &'static str

The name of this predicate.

Source

fn evaluate(&self, value: &Value, args: &Value) -> bool

Evaluate the predicate against a value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§