Function cel_interpreter::functions::size

source ·
pub fn size(
    ftx: &FunctionContext<'_>,
    value: Value,
) -> Result<i64, ExecutionError>
Expand description

Calculates the size of either the target, or the provided args depending on how the function is called. If called as a method, the target will be used. If called as a function, the first argument will be used.

The following Value variants are supported:

§Examples

size([1, 2, 3]) == 3