[−][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 argumentscontext
- An evaluation context
Examples
random()
:
random
- function nameargs
- empty slice
random(1024)
random
- function nameargs
- first slice element contains theValue::Number(1024)
value
Visit function
method documentation to see how to register custom function
and how it should look like.