Structure that contains methods to count the number of bytes needed to encode a specific field.
More...
#include <primitive_type_codec.h>
|
template<class Type , typename Enabler = std::enable_if_t< std::is_integral<std::decay_t<Type>>::value>> |
static size_t | count_write_bytes (const Type &) |
| Calculates bytes needed to encode the field. More...
|
|
static size_t | count_write_bytes (const std::string &arg) |
| Calculates bytes needed to encode the bounded string field (specialization of count_write_bytes for string type) More...
|
|
template<
Field_size field_size>
struct mysql::serialization::Byte_count_helper< field_size >
Structure that contains methods to count the number of bytes needed to encode a specific field.
- Template Parameters
-
field_size | The number of bytes requested by the user. 0 means "default". For string, field_size is the boundary length of the string |
◆ count_write_bytes() [1/2]
Calculates bytes needed to encode the bounded string field (specialization of count_write_bytes for string type)
- Parameters
-
arg | String argument needed to be encoded |
- Returns
- Bytes needed to encode the arg
◆ count_write_bytes() [2/2]
template<class Type , typename Enabler = std::enable_if_t< std::is_integral<std::decay_t<Type>>::value>>
Calculates bytes needed to encode the field.
- Template Parameters
-
Type | of the field, as represented in the code |
- Returns
- Bytes needed to encode the field
The documentation for this struct was generated from the following file: