Encoders, decoders and helpers for TSKV representations.
Definition in file tskv.hpp.
Go to the source code of this file.
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <string_view>
#include <type_traits>
#include <userver/utils/assert.hpp>
Namespaces | |
namespace | utils |
Utilities. | |
Macros | |
#define | USERVER_IMPL_FORCE_INLINE __attribute__((always_inline)) inline |
#define | USERVER_IMPL_DISABLE_ASAN __attribute__((no_sanitize_address)) |
Enumerations | |
enum class | EncodeTskvMode { kKey , kValue , kKeyReplacePeriod } |
Functions | |
template<typename OutIter > | |
OutIter | utils::encoding::EncodeTskv (OutIter destination, char ch, EncodeTskvMode mode) |
Encode according to the TSKV rules, but without escaping the quotation mark ("). | |
template<typename Container > | |
void | utils::encoding::EncodeTskv (Container &container, std::string_view str, EncodeTskvMode mode) |
Encode according to the TSKV rules, but without escaping the quotation mark ("). | |
template<typename OutIter > | |
USERVER_IMPL_FORCE_INLINE OutIter | utils::encoding::EncodeTskv (OutIter destination, char ch, EncodeTskvMode mode) |
Encode according to the TSKV rules, but without escaping the quotation mark ("). | |
Variables | |
constexpr char | utils::encoding::kTskvKeyValueSeparator = '=' |
constexpr char | utils::encoding::kTskvPairsSeparator = '\t' |
#define USERVER_IMPL_DISABLE_ASAN __attribute__((no_sanitize_address)) |
#define USERVER_IMPL_FORCE_INLINE __attribute__((always_inline)) inline |
void utils::encoding::EncodeTskv | ( | Container & | container, |
std::string_view | str, | ||
EncodeTskvMode | mode ) |
Encode according to the TSKV rules, but without escaping the quotation mark (").
container
. Some extra memory is reserved as necessary. Container | must be continuous and support at least the following operations: 1) c.data() 2) c.size() 3) c.resize(new_size) |
|
inlineconstexpr |