A trait used to serialize bounded c-style strings.
More...
#include <string_traits.h>
|
template<typename Stream > |
static utility::is_writing_t< Stream > | serialize (Stream &writer, const char *value, uint32_t max_size) noexcept |
| Writes a c-style string into the writer . More...
|
|
template<typename Stream > |
static utility::is_reading_t< Stream > | serialize (Stream &reader, char *value, uint32_t max_size) noexcept |
| Read a c-style string from the reader into value . More...
|
|
A trait used to serialize bounded c-style strings.
◆ serialize() [1/2]
template<typename Stream >
Read a c-style string from the reader
into value
.
- Parameters
-
reader | The stream to read from |
value | A pointer to the buffer that should be read into. The size of this buffer should be at least max_size |
max_size | The maximum expected length of the string, including the null terminator |
- Returns
- Success
◆ serialize() [2/2]
template<typename Stream >
Writes a c-style string into the writer
.
- Parameters
-
writer | The stream to write to |
value | The string to serialize |
max_size | The maximum expected length of the string, including the null terminator |
- Returns
- Success
The documentation for this struct was generated from the following file: