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

Method SerializeTo

common/values/string_value.cc:82–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82absl::Status StringValue::SerializeTo(
83 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
84 google::protobuf::MessageFactory* absl_nonnull message_factory,
85 google::protobuf::io::ZeroCopyOutputStream* absl_nonnull output) const {
86 ABSL_DCHECK(descriptor_pool != nullptr);
87 ABSL_DCHECK(message_factory != nullptr);
88 ABSL_DCHECK(output != nullptr);
89
90 google::protobuf::StringValue message;
91 message.set_value(NativeString());
92 if (!message.SerializePartialToZeroCopyStream(output)) {
93 return absl::UnknownError(
94 absl::StrCat("failed to serialize message: ", message.GetTypeName()));
95 }
96
97 return absl::OkStatus();
98}
99
100absl::Status StringValue::ConvertToJson(
101 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,

Callers

nothing calls this directly

Calls 3

NativeStringFunction · 0.70
set_valueMethod · 0.45
GetTypeNameMethod · 0.45

Tested by

no test coverage detected