pub struct KeyValueStoreKeysIterator { /* private fields */ }Expand description
A lazy, page-fetching async iterator over the keys in a key-value store.
Created by KeyValueStoreClient::iterate_keys. Each call to next returns
the next key, fetching another page from the API when the local buffer is exhausted, until
every key has been yielded (or the caller’s total-key cap is reached).
Unlike the offset/limit-paginated ListIterator, key-value stores use
cursor-based pagination: each page is anchored by the previous page’s
nextExclusiveStartKey. The walk stops once the page reports isTruncated == false (the
authoritative end-of-data signal), a page comes back empty, the API stops returning a next
cursor, or the caller’s limit is exhausted. This yields the same result as the reference
client’s listKeys() async-iterable (which loops on the cursor); leading with isTruncated
additionally avoids a wasted empty fetch when a final page still carries a cursor.
Implementations§
Source§impl KeyValueStoreKeysIterator
impl KeyValueStoreKeysIterator
Sourcepub async fn next(&mut self) -> ApifyClientResult<Option<KeyValueStoreKey>>
pub async fn next(&mut self) -> ApifyClientResult<Option<KeyValueStoreKey>>
Returns the next key, or None when the store is exhausted (or the caller’s limit is
reached). Fetches another page from the API when the local buffer is empty.