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

Function SingletonBinaryBinding

cel/decls.go:269–271  ·  view source on GitHub ↗

SingletonBinaryBinding creates a singleton function definition to be used with 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.BinaryOp, traits ...int)

Source from the content-addressed store, hash-verified

267// Note, this approach works well if operand is expected to have a specific trait which it implements,
268// e.g. traits.ContainerType. Otherwise, prefer per-overload function bindings.
269func SingletonBinaryBinding(fn functions.BinaryOp, traits ...int) FunctionOpt {
270 return decls.SingletonBinaryBinding(fn, traits...)
271}
272
273// SingletonFunctionImpl creates a singleton function definition to be used with all function overloads.
274//

Callers 4

CompileOptionsMethod · 0.92
TestFunctionMergeFunction · 0.70
TestFunctionNoOverloadsFunction · 0.70

Calls 1

SingletonBinaryBindingFunction · 0.92

Tested by 3

TestFunctionMergeFunction · 0.56
TestFunctionNoOverloadsFunction · 0.56