Contain utility functions for formatting data.
More...
|
| template<typename OutputIt> |
| void | format_base64 (OutputIt &out, const std::vector< uint8_t > &data) |
| | Format a vector of bytes into a Base64 string literal.
|
| |
| template<typename OutputIt> |
| void | format_timestamp (OutputIt &out, const std::chrono::system_clock::time_point &data) |
| | Format a timestamp into an ISO 8601 string literal.
|
| |
| template<typename OutputIt, typename T> |
| void | format_data (OutputIt &out, const T &data) |
| | Format a generic data type into an output iterator.
|
| |
| template<typename OutputIt, typename T> |
| void | format_vector (OutputIt &out, const std::vector< T > &data) |
| | Format a generic vector into a comma-separated list in brackets.
|
| |
Contain utility functions for formatting data.
◆ format_base64()
template<typename OutputIt>
| void utils::format_base64 |
( |
OutputIt & | out, |
|
|
const std::vector< uint8_t > & | data ) |
Format a vector of bytes into a Base64 string literal.
- Template Parameters
-
| OutputIt | The type of the output iterator. |
- Parameters
-
| out | Reference to the output iterator where the result is written. |
| data | The vector of bytes to format. |
◆ format_data()
template<typename OutputIt, typename T>
| void utils::format_data |
( |
OutputIt & | out, |
|
|
const T & | data ) |
Format a generic data type into an output iterator.
- Template Parameters
-
| OutputIt | The type of the output iterator. |
| T | The type of the element. |
- Parameters
-
| out | Reference to the output iterator where the result is written. |
| data | The element to format. |
◆ format_timestamp()
template<typename OutputIt>
| void utils::format_timestamp |
( |
OutputIt & | out, |
|
|
const std::chrono::system_clock::time_point & | data ) |
Format a timestamp into an ISO 8601 string literal.
- Template Parameters
-
| OutputIt | The type of the output iterator. |
- Parameters
-
| out | Reference to the output iterator where the result is written. |
| data | The time_point to format. |
◆ format_vector()
template<typename OutputIt, typename T>
| void utils::format_vector |
( |
OutputIt & | out, |
|
|
const std::vector< T > & | data ) |
Format a generic vector into a comma-separated list in brackets.
- Template Parameters
-
| OutputIt | The type of the output iterator. |
| T | The type of elements in the vector. |
- Parameters
-
| out | Reference to the output iterator where the result is written. |
| data | The vector to format. |