Type Definition balena_temen::FilterFn
source · pub type FilterFn = fn(input: &Value, args: &HashMap<String, Value>, context: &mut Context) -> Result<Value>;
Expand description
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 map
"hallo" | upper(trim=true)
"hallo"
- filterinput
upper
- filter nameargs
- map containstrim
key with theValue::Boolean(true)
value
Visit filter
method documentation to see how to register custom function
and how it should look like.