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

Function SingletonFunctionBinding

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

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

Callers 2

TestProtosNonMatchFunction · 0.92

Calls 1

SingletonFunctionBindingFunction · 0.92

Tested by 2

TestProtosNonMatchFunction · 0.74