Skip to main content

evaluate

Function evaluate 

Source
pub fn evaluate<'a>(
    expr: &str,
    data: impl IntoIterator<Item = (&'a String, &'a Value)>,
) -> ExpressionResult<Value>
Available on crate feature expression only.
Expand description

Compile and evaluate a CEL expression in one step.

For repeated evaluation of the same expression, use compile instead.

ยงErrors

Returns an error if the expression is invalid, violates the DFE profile, or evaluation fails (missing fields, type mismatch).