Encoders, decoders and helpers for TSKV representations.
More...
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <string_view>
#include <type_traits>
#include <userver/utils/assert.hpp>
Go to the source code of this file.
|
| namespace | utils |
| | Utilities.
|
| |
|
| enum class | EncodeTskvMode {
kKey
,
kValue
,
kKeyReplacePeriod
} |
| |
Encoders, decoders and helpers for TSKV representations.
Definition in file tskv.hpp.
◆ USERVER_IMPL_DISABLE_ASAN
| #define USERVER_IMPL_DISABLE_ASAN __attribute__((no_sanitize_address)) |
◆ USERVER_IMPL_FORCE_INLINE
| #define USERVER_IMPL_FORCE_INLINE __attribute__((always_inline)) inline |
◆ EncodeTskvMode
| enum class utils::encoding::EncodeTskvMode |
|
strong |
◆ EncodeTskv() [1/3]
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 (").
- Note
- New contents are appended at the end of
container. Some extra memory is reserved as necessary.
- Template Parameters
-
| Container | must be continuous and support at least the following operations: 1) c.data() 2) c.size() 3) c.resize(new_size) |
Definition at line 428 of file tskv.hpp.
◆ EncodeTskv() [2/3]
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 (").
- Returns
- The iterator to after the inserted chars.
Definition at line 69 of file tskv.hpp.
◆ EncodeTskv() [3/3]
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 (").
- Returns
- The iterator to after the inserted chars.
Definition at line 69 of file tskv.hpp.
◆ kTskvKeyValueSeparator
| constexpr char utils::encoding::kTskvKeyValueSeparator = '=' |
|
inlineconstexpr |
◆ kTskvPairsSeparator
| constexpr char utils::encoding::kTskvPairsSeparator = '\t' |
|
inlineconstexpr |