mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
This will mean that calling DebugString on a MessageLite* which is actually a full Message will get the debug info instead of the minimal output. PiperOrigin-RevId: 649103508
16 lines
407 B
C++
16 lines
407 B
C++
#include "rust/cpp_kernel/debug.h"
|
|
|
|
#include <string>
|
|
|
|
#include "google/protobuf/message_lite.h"
|
|
#include "rust/cpp_kernel/strings.h"
|
|
|
|
extern "C" {
|
|
|
|
google::protobuf::rust::RustStringRawParts proto2_rust_utf8_debug_string(
|
|
const google::protobuf::MessageLite* msg) {
|
|
std::string text = google::protobuf::Utf8Format(*msg);
|
|
return google::protobuf::rust::RustStringRawParts(text);
|
|
}
|
|
|
|
} // extern "C"
|