MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / RuntimeImplFromBuilder

Function RuntimeImplFromBuilder

runtime/reference_resolver.cc:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35using ::cel::runtime_internal::RuntimeImpl;
36
37absl::StatusOr<RuntimeImpl*> RuntimeImplFromBuilder(RuntimeBuilder& builder) {
38 Runtime& runtime = RuntimeFriendAccess::GetMutableRuntime(builder);
39
40 if (RuntimeFriendAccess::RuntimeTypeId(runtime) !=
41 NativeTypeId::For<RuntimeImpl>()) {
42 return absl::UnimplementedError(
43 "regex precompilation only supported on the default cel::Runtime "
44 "implementation.");
45 }
46
47 RuntimeImpl& runtime_impl = down_cast<RuntimeImpl&>(runtime);
48
49 return &runtime_impl;
50}
51
52google::api::expr::runtime::ReferenceResolverOption Convert(
53 ReferenceResolverEnabled enabled) {

Callers 3

EnableReferenceResolverFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected