MCPcopy Create free account
hub / github.com/ElementsProject/elements / Unser

Method Unser

src/serialize.h:553–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551{
552 template<typename Stream>
553 void Unser(Stream& s, std::string& v)
554 {
555 size_t size = ReadCompactSize(s);
556 if (size > Limit) {
557 throw std::ios_base::failure("String length limit exceeded");
558 }
559 v.resize(size);
560 if (size != 0) s.read(MakeWritableByteSpan(v));
561 }
562
563 template<typename Stream>
564 void Ser(Stream& s, const std::string& v)

Callers

nothing calls this directly

Calls 4

ReadCompactSizeFunction · 0.85
MakeWritableByteSpanFunction · 0.85
resizeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected