[][src]Type Definition balena_temen::FunctionFn

type FunctionFn = fn(args: &[Value], context: &mut Context) -> Result<Value>;

Evaluation engine function signature

You can register custom function with the function method.

Arguments

  • args - List of arguments
  • context - An evaluation context

Examples

random():

  • random - function name
  • args - empty slice

random(1024)

  • random - function name
  • args - first slice element contains the Value::Number(1024) value

Visit function method documentation to see how to register custom function and how it should look like.