19template <
class ServiceClient,
class OperationRequest,
class OperationTraits>
35 Iterator(ServiceClient* client,
const OperationRequest& firstReq)
36 : m_client(client), m_request(firstReq), m_currentOutcome{OperationTraits::Invoke(m_client, m_request)} {}
42 if (m_atEnd)
return *
this;
44 if (!m_currentOutcome.IsSuccess())
50 if (!OperationTraits::HasMoreResults(m_currentOutcome.GetResult()))
56 OperationTraits::SetNextRequest(m_currentOutcome.GetResult(), m_request);
62 if (rhs.m_isSentinel) {
74 void Fetch() { m_currentOutcome = OperationTraits::Invoke(m_client, m_request); }
77 ServiceClient* m_client;
78 OperationRequest m_request{};
81 bool m_isSentinel{
false};
84 Paginator(ServiceClient* client,
const OperationRequest& firstReq) : m_client(client), m_firstRequest(firstReq) {}
90 ServiceClient* m_client;
91 OperationRequest m_firstRequest{};