31#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
65 std::optional<std::chrono::system_clock::time_point>
expiry_time,
66 std::shared_ptr<crypto::manager> crypto_manager = {})
68 , value_{ std::move(value) }
70 , crypto_manager_{ std::move(crypto_manager) }
85 template<
typename Document,
87 std::enable_if_t<!codec::is_transcoder_v<Document>,
bool> =
true,
88 std::enable_if_t<codec::is_transcoder_v<Transcoder>,
bool> =
true>
92 return Transcoder::template decode<Document>(value_, crypto_manager_);
94 return Transcoder::template decode<Document>(value_);
115 template<
typename Transcoder, std::enable_if_t<codec::is_transcoder_v<Transcoder>,
bool> = true>
116 [[nodiscard]]
auto content_as() const -> typename Transcoder::document_type
119 return Transcoder::decode(value_, crypto_manager_);
121 return Transcoder::decode(value_);
139 -> const std::optional<std::chrono::system_clock::time_point>&
146 std::optional<std::chrono::system_clock::time_point> expiry_time_{};
147 std::shared_ptr<crypto::manager> crypto_manager_{};
CAS is a special type that represented in protocol using unsigned 64-bit integer, but only equality c...
Definition cas.hxx:34
auto content_as() const -> typename Transcoder::document_type
Decodes content of the document using given codec.
Definition get_result.hxx:116
get_result(couchbase::cas cas, codec::encoded_value value, std::optional< std::chrono::system_clock::time_point > expiry_time, std::shared_ptr< crypto::manager > crypto_manager={})
Constructs result for get operation.
Definition get_result.hxx:63
auto content_as() const -> Document
Decodes content of the document using given codec.
Definition get_result.hxx:89
auto expiry_time() const -> const std::optional< std::chrono::system_clock::time_point > &
If the document has an expiry, returns the point in time when the loaded document expires.
Definition get_result.hxx:138
Base class for operations of data service.
Definition result.hxx:32
auto cas() const -> couchbase::cas
Definition result.hxx:57
constexpr bool is_crypto_transcoder_v
Definition transcoder_traits.hxx:36
json_transcoder< tao_json_serializer > default_json_transcoder
Definition default_json_transcoder.hxx:28
Definition internal.hxx:27
Represents a single item from the result of scan()
Definition allow_querying_search_index_options.hxx:28
Definition encoded_value.hxx:27