and the FunctionCtx provides methods for accessing the target, args, and expression resolution.
Working With Args and Targets
Checking that the target was None, or that there were enough arges before indexing into them was verbose. The following methods have been added to simplify this.
pub fn contains(ftx: FunctionCtx) -> Result<CelType, ExecutionError> {
let target = ftx.target()?;
let arg = ftx.resolve_arg(0)?;
...
}
Adds several improvements to writing functions.
Function Signatures
Previously, every function signature accepted three parameters.
This has been simplified to
and the
FunctionCtx
provides methods for accessing the target, args, and expression resolution.Working With Args and Targets
Checking that the target was
None
, or that there were enough arges before indexing into them was verbose. The following methods have been added to simplify this.