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

Method SerializeTo

common/values/bytes_value.cc:66–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64std::string BytesValue::DebugString() const { return BytesDebugString(*this); }
65
66absl::Status BytesValue::SerializeTo(
67 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
68 google::protobuf::MessageFactory* absl_nonnull message_factory,
69 google::protobuf::io::ZeroCopyOutputStream* absl_nonnull output) const {
70 ABSL_DCHECK(descriptor_pool != nullptr);
71 ABSL_DCHECK(message_factory != nullptr);
72 ABSL_DCHECK(output != nullptr);
73
74 google::protobuf::BytesValue message;
75 message.set_value(NativeString());
76 if (!message.SerializePartialToZeroCopyStream(output)) {
77 return absl::UnknownError(
78 absl::StrCat("failed to serialize message: ", message.GetTypeName()));
79 }
80
81 return absl::OkStatus();
82}
83
84absl::Status BytesValue::ConvertToJson(
85 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