24#ifndef MYSQL_STRCONV_ENCODE_ENCODE_TEXT_H
25#define MYSQL_STRCONV_ENCODE_ENCODE_TEXT_H
43template <
class Object_t>
69template <Is_out_str_fixed Out_str_t,
class Object_t>
91template <Is_out_str_growable Out_str_t,
class Object_t>
92[[nodiscard]]
auto encode_text(Out_str_t out_str,
const Object_t &
object) {
93 return encode(Text_format{}, out_str, object);
110template <
class String_t = std::
string,
class Object_t>
112 return mysql::strconv::throwing::encode<String_t>(
Text_format{}, object);
127template <
class String_t = std::string,
class... Objects_t>
129 return mysql::strconv::throwing::concat<String_t>(
Text_format{}, objects...);
145template <
class String_t = std::
string,
class Object_t>
162template <
class String_t = std::string,
class... Objects_t>
164 return concat<String_t>(
Text_format{}, objects...);
String_t encode_text(const Object_t &object)
Return an std::string object holding the string representation of the object, using Text_format.
Definition: encode_text.h:111
String_t concat_text(const Objects_t &...objects)
Return an std::string object holding the concatenated string representations of the objects,...
Definition: encode_text.h:128
Definition: gtid_binary_format.h:41
std::size_t compute_encoded_length_text(const Object_t &object)
Return the string length of the object, using Text_format.
Definition: encode_text.h:44
auto concat_text(const Objects_t &...objects)
Return an std::optional<std::string> object holding the concatenated string representations of the ob...
Definition: encode_text.h:163
void encode(const Debug_format &format, Is_string_target auto &target, const Repeat &repeat)
Definition: debug_repeat.h:39
auto encode_text(Out_str_t out_str, const Object_t &object)
Write the string representation of the object to the given string output wrapper, using Text_format.
Definition: encode_text.h:70
std::size_t compute_encoded_length(const Is_format auto &format, const auto &object)
Return the string length of the object.
Definition: encode.h:57
Format tag to identify text format.
Definition: text_format.h:38