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

Function BytesDebugString

common/values/bytes_value.cc:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42template <typename Bytes>
43std::string BytesDebugString(const Bytes& value) {
44 return value.NativeValue(absl::Overload(
45 [](absl::string_view string) -> std::string {
46 return internal::FormatBytesLiteral(string);
47 },
48 [](const absl::Cord& cord) -> std::string {
49 if (auto flat = cord.TryFlat(); flat.has_value()) {
50 return internal::FormatBytesLiteral(*flat);
51 }
52 return internal::FormatBytesLiteral(static_cast<std::string>(cord));
53 }));
54}
55
56} // namespace
57

Callers 1

DebugStringMethod · 0.85

Calls 4

FormatBytesLiteralFunction · 0.85
TryFlatMethod · 0.80
NativeValueMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected