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

Function SingletonFunctionBinding

cel/decls.go:287–289  ·  view source on GitHub ↗

SingletonFunctionBinding 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.FunctionOp, traits ...int)

Source from the content-addressed store, hash-verified

285// Note, this approach works well if operand is expected to have a specific trait which it implements,
286// e.g. traits.ContainerType. Otherwise, prefer per-overload function bindings.
287func SingletonFunctionBinding(fn functions.FunctionOp, traits ...int) FunctionOpt {
288 return decls.SingletonFunctionBinding(fn, traits...)
289}
290
291// DisableDeclaration disables the function signatures, effectively removing them from the type-check
292// environment while preserving the runtime bindings.

Callers 2

TestProtosNonMatchFunction · 0.92

Calls 1

SingletonFunctionBindingFunction · 0.92

Tested by 2

TestProtosNonMatchFunction · 0.74