[−][src]Type Definition balena_temen::FilterFn
type FilterFn = fn(input: &Value, args: &[Value], context: &mut Context) -> Result<Value>;
Evaluation engine filter signature
You can register custom filter with the filter
method.
Arguments
input
- An input valueargs
- A function argumentscontext
- An evaluation context
Examples
"hallo" | upper
:
"hallo"
- filterinput
upper
- filter nameargs
- empty slice
"hallo" | upper(true)
"hallo"
- filterinput
upper
- filter nameargs
- slice containsValue::Boolean(true)
as a first item
Visit filter
method documentation to see how to register custom function
and how it should look like.