26#include <system_error>
31#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
32class internal_scan_result;
62 explicit scan_result(std::shared_ptr<internal_scan_result> internal);
106 explicit iterator(std::shared_ptr<internal_scan_result> internal);
107 explicit iterator(std::pair<error, scan_result_item> item);
118 std::shared_ptr<internal_scan_result> internal_{};
119 std::pair<error, scan_result_item> item_{};
143 std::shared_ptr<internal_scan_result> internal_{};
An iterator that can be used to iterate through all the scan_result_items.
Definition scan_result.hxx:99
auto operator++() -> iterator &
auto operator!=(const iterator &other) const -> bool
iterator(std::shared_ptr< internal_scan_result > internal)
iterator(std::pair< error, scan_result_item > item)
std::input_iterator_tag iterator_category
Definition scan_result.hxx:113
auto operator*() -> std::pair< error, scan_result_item >
std::ptrdiff_t difference_type
Definition scan_result.hxx:109
auto operator==(const iterator &other) const -> bool
Definition scan_result_item.hxx:41
Definition scan_result.hxx:44
void cancel()
Cancels the scan.
scan_result(std::shared_ptr< internal_scan_result > internal)
Constructs a scan result from an internal scan result.
auto end() -> iterator
Returns an iterator to the end.
void next(scan_item_handler &&handler) const
Fetches the next scan result item.
scan_result()=default
Constructs an empty scan result.
auto next() const -> std::future< std::pair< error, std::optional< scan_result_item > > >
Fetches the next scan result item.
auto begin() -> iterator
Returns an iterator to the beginning.
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
std::function< void(error, std::optional< scan_result_item >)> scan_item_handler
The signature for the handler of the scan_result::next() operation.
Definition scan_result.hxx:41