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

Method binding

common/decls/decls.go:889–899  ·  view source on GitHub ↗

binding returns the runtime binding for an overload whose implementation is provided at declaration time. Each implementation is wrapped in an invocation guard which ensures runtime type agreement between the overload signature and the argument values.

(funcName string, disableTypeGuards bool)

Source from the content-addressed store, hash-verified

887// Each implementation is wrapped in an invocation guard which ensures runtime type agreement
888// between the overload signature and the argument values.
889func (o *OverloadDecl) binding(funcName string, disableTypeGuards bool) *functions.Overload {
890 return &functions.Overload{
891 Operator: o.ID(),
892 Unary: o.guardedUnaryOp(funcName, disableTypeGuards),
893 Binary: o.guardedBinaryOp(funcName, disableTypeGuards),
894 Function: o.guardedFunctionOp(funcName, disableTypeGuards),
895 Async: o.guardedAsyncOp(funcName, disableTypeGuards),
896 OperandTrait: o.OperandTrait(),
897 NonStrict: o.IsNonStrict(),
898 }
899}
900
901// lateBoundBinding returns the runtime binding for an overload whose implementation is supplied
902// by the activation at evaluation time.

Callers 1

BindingsMethod · 0.80

Calls 7

IDMethod · 0.95
guardedUnaryOpMethod · 0.95
guardedBinaryOpMethod · 0.95
guardedFunctionOpMethod · 0.95
guardedAsyncOpMethod · 0.95
OperandTraitMethod · 0.95
IsNonStrictMethod · 0.95

Tested by

no test coverage detected