9#include <userver/formats/bson/document.hpp>
11USERVER_NAMESPACE_BEGIN
21 explicit Cursor(std::unique_ptr<impl::CursorImpl>&&);
29 using iterator_category = std::input_iterator_tag;
32 using reference =
const value_type&;
33 using pointer =
const value_type*;
35 explicit Iterator(
Cursor*);
39 explicit DocHolder(value_type doc) : doc_(std::move(doc)) {}
41 value_type& operator*() {
return doc_; }
48 reference operator*()
const;
49 pointer operator->()
const;
51 bool operator==(
const Iterator&)
const;
52 bool operator!=(
const Iterator&)
const;
59 explicit operator
bool()
const {
return HasMore(); }
65 std::unique_ptr<impl::CursorImpl> impl_;