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

Function LateFunctionBinding

common/decls/decls.go:1086–1094  ·  view source on GitHub ↗

LateFunctionBinding indicates that the function has a binding which is not known at compile time. This is useful for functions which have side-effects or are not deterministically computable. The implementation is supplied at evaluation time as a functions.LateBoundOp within the function namespace

()

Source from the content-addressed store, hash-verified

1084// The implementation is supplied at evaluation time as a functions.LateBoundOp within the function
1085// namespace of the activation, and is subject to the same runtime type-guard as an eager binding.
1086func LateFunctionBinding() OverloadOpt {
1087 return func(o *OverloadDecl) (*OverloadDecl, error) {
1088 if o.HasBinding() {
1089 return nil, fmt.Errorf("overload already has a binding: %s", o.ID())
1090 }
1091 o.hasLateBinding = true
1092 return o, nil
1093 }
1094}
1095
1096// OverloadIsNonStrict enables the function to be called with error and unknown argument values.
1097//

Calls 2

HasBindingMethod · 0.80
IDMethod · 0.65