StormByte::Detail::Codec specialization for StormByte::String::String. More...
#include <StormByte/string/serializable.hxx>
Static Public Member Functions | |
| static ByteSize | Size (const String::String &data) noexcept |
Serialized size of data. | |
| static BinaryData | Write (const String::String &data) noexcept |
Encodes data. | |
| static Expected< String::String, DeserializeError > | Read (std::span< const std::byte > data) noexcept |
Decodes a StormByte::String::String from the start of data. | |
StormByte::Detail::Codec specialization for StormByte::String::String.
Same wire as std::string: uint64 byte count (LE) + raw UTF-8 bytes. A null StormByte::String::String is written as an empty payload. Decode always yields a non-null buffer ("" when the payload is empty).
|
staticnoexcept |
Decodes a StormByte::String::String from the start of data.
| data | Input span. |
|
staticnoexcept |
|
staticnoexcept |
Encodes data.
| data | Value to encode. |