33#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
37to_binary(std::string_view value)
noexcept -> std::vector<std::byte>;
54 std::enable_if_t<std::is_same_v<Document, document_type>,
bool> =
true>
58 throw std::system_error(
60 "raw_string_transcoder expects document to have STRING common flags, flags=" +
61 std::to_string(encoded.flags));
64 return std::string{
reinterpret_cast<const char*
>(encoded.data.data()), encoded.data.size() };
68#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
70struct is_transcoder<raw_string_transcoder> :
public std::true_type {
Definition raw_string_transcoder.hxx:44
std::string document_type
Definition raw_string_transcoder.hxx:46
static auto encode(document_type document) -> encoded_value
Definition raw_string_transcoder.hxx:48
static auto decode(const encoded_value &encoded) -> Document
Definition raw_string_transcoder.hxx:55
constexpr auto has_common_flags(std::uint32_t flags) -> bool
Checks whether the upper 8 bits are set, indicating common flags presence.
Definition codec_flags.hxx:95
constexpr std::uint32_t string_common_flags
Definition codec_flags.hxx:147
@ decoding_failure
Returned when decoding of the data into the user object failed.
auto to_binary(mutate_in_macro value) -> std::vector< std::byte >
Converts macro into binary array suitable for sending to the server.
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
Definition encoded_value.hxx:27