[][src]Type Definition balena_temen::FunctionFn

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

Evaluation engine function signature

You can register custom function with the function method.

Arguments

  • args - A function arguments
  • context - An evaluation context

Examples

random():

  • random - function name
  • args - empty map

random(max=1024)

  • random - function name
  • args - map contains max key with the Value::Number(1024) value

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