MCPcopy Create free account
hub / github.com/cel-expr/cel-go / SingletonUnaryBinding

Function SingletonUnaryBinding

cel/decls.go:251–253  ·  view source on GitHub ↗

SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. Note, this approach works well if operand is expected to have a specific trait which it implements, e.g. traits.ContainerType. Otherwise, prefer per-overload function bindings.

(fn functions.UnaryOp, traits ...int)

Source from the content-addressed store, hash-verified

249// Note, this approach works well if operand is expected to have a specific trait which it implements,
250// e.g. traits.ContainerType. Otherwise, prefer per-overload function bindings.
251func SingletonUnaryBinding(fn functions.UnaryOp, traits ...int) FunctionOpt {
252 return decls.SingletonUnaryBinding(fn, traits...)
253}
254
255// SingletonBinaryImpl creates a singleton function definition to be used with all function overloads.
256//

Callers 6

CompileOptionsMethod · 0.92
TestFunctionMergeFunction · 0.70
TestFunctionBindingFunction · 0.70

Calls 1

SingletonUnaryBindingFunction · 0.92

Tested by 5

TestFunctionMergeFunction · 0.56
TestFunctionBindingFunction · 0.56