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

Function SingletonUnaryBinding

cel/decls.go:255–257  ·  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

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

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