pub fn evaluate_condition<'a>(
expr: &str,
data: impl IntoIterator<Item = (&'a String, &'a Value)>,
) -> boolAvailable on crate feature
expression only.Expand description
Evaluate a boolean condition, returning false on missing fields.
This is the safe evaluation mode for scoring when conditions,
alert triggers, and routing rules. If a field referenced in the
expression is missing from data, returns false instead of
returning an error.
Non-boolean results are coerced: non-zero integers are truthy, zero and errors are falsy.