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

Method ValueFromAny

eval/public/structs/cel_proto_wrap_util.cc:277–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275 }
276
277 CelValue ValueFromAny(const google::protobuf::Message* message) {
278 CEL_ASSIGN_OR_RETURN(
279 auto reflection,
280 cel::well_known_types::GetAnyReflection(message->GetDescriptor()),
281 _.With(ReturnCelValueError(arena_)));
282 std::string type_url_scratch;
283 std::string value_scratch;
284 return ValueFromAny(reflection.GetTypeUrl(*message, type_url_scratch),
285 reflection.GetValue(*message, value_scratch),
286 descriptor_pool_, message_factory_);
287 }
288
289 CelValue ValueFromAny(const cel::well_known_types::StringValue& type_url,
290 const cel::well_known_types::BytesValue& payload,

Callers

nothing calls this directly

Calls 6

CreateErrorValueFunction · 0.85
UnwrapMessageToValueFunction · 0.85
TryFlatMethod · 0.80
GetTypeUrlMethod · 0.45
GetValueMethod · 0.45
NewMethod · 0.45

Tested by

no test coverage detected