[][src]Macro jsonlogic::compute_const_with_data

macro_rules! compute_const_with_data {
    ($args:expr, $data:expr) => { ... };
}

Expects a function typically used for JsonLogic operators in the scope this macro is called in:

This example is not tested
fn compute(args: &[Expression], data: &Data) -> Value

Expects two arguments. First an slice containing Value's and second a Data instance. Calls the compute function with the given Value slice where every element is wrapped in Expression::Constant and the given data instance.