One signature of a CEL.Function, and the code that evaluates it.
:id— a name for this overload, unique within the environment; checked expressions record which overload each call resolved to.:args— the argument types, asCEL.Type.t/0; for a:receivercall the receiver comes first.{:param, "T"}is a type parameter: every occurrence must have the same type.:result— the result type, which may use the same parameters.:eval—{Module, function}, called asModule.function(args, ...context)with the evaluated arguments as a list ofCEL.Value.t/0, and returning{:ok, value},{:error, reason}or{:unknown, reason}. Without:evalthe overload can be type-checked but not evaluated.:eval_context— extra arguments appended after the argument list, in order::varsfor the variable bindings, keyed by string name,:callfor%{function: name, overload_id: id, expr_id: id}, and:typesfor the environment'sCEL.TypeProvider.t/0, to read message arguments with.:strict— whenfalse, the function is also called with error and unknown arguments, as{:error, %CEL.Error{}}and{:unknown, %CEL.Unknown{}}. Defaults totrue.
Other fields are used by CEL's built-in functions and may change.
Summary
Types
@type t() :: %CEL.Function.Overload{ args: CEL.Function.args(), combine: CEL.Function.combine(), eval: CEL.Function.eval(), eval_context: [CEL.Function.eval_context()], id: String.t(), on_dyn: CEL.Function.on_dyn(), result: CEL.Function.result(), strict: boolean() }