StormByte::Detail::Codec specialization for StormByte::Safe::WString. More...
#include <StormByte/serializable.hxx>
Static Public Member Functions | |
| static ByteSize | Size (const Safe::WString &data) noexcept |
Serialized size of data. | |
| static Safe::Binary | Write (const Safe::WString &data) noexcept |
Encodes data. | |
| static Expected< Safe::WString, DeserializeError > | Read (std::span< const std::byte > data) noexcept |
Decodes a StormByte::Safe::WString from the start of data. | |
StormByte::Detail::Codec specialization for StormByte::Safe::WString.
Same UTF-8 wire as std::wstring, preserving embedded NUL characters. A null StormByte::Safe::WString is written as an empty payload. Decode always yields a non-null buffer (L"" when the payload is empty).
|
staticnoexcept |
Decodes a StormByte::Safe::WString from the start of data.
| data | Input span. |
|
staticnoexcept |
|
staticnoexcept |
Encodes data.
| data | Value to encode. |