MCPcopy Create free account
hub / github.com/bytedance/bolt / readVariantStringView

Function readVariantStringView

bolt/exec/VariantSerdeDetail.h:97–104  ·  view source on GitHub ↗

Read a length-prefixed StringView from a ByteInputStream. Requires a `readStringView(stream, storage)` function in scope.

Source from the content-addressed store, hash-verified

95/// Read a length-prefixed StringView from a ByteInputStream.
96/// Requires a `readStringView(stream, storage)` function in scope.
97inline StringView readVariantStringView(
98 ByteInputStream& stream,
99 std::string& storage) {
100 auto size = stream.read<int32_t>();
101 storage.resize(size);
102 stream.readBytes(storage.data(), size);
103 return StringView(storage);
104}
105
106/// Compare a serialized VARIANT value against a vector value.
107inline std::optional<int32_t> compareVariantStreamVsVector(

Callers

nothing calls this directly

Calls 4

StringViewClass · 0.50
resizeMethod · 0.45
readBytesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected