ListBuilder
pub struct ListBuilder<'a> { /* private fields */ }A builder for KVStore key list operations, supporting advanced configuration like cursor, limit, prefix, and asynchronous execution.
store.build_list().execute()?;Synchronous and Asynchronous support
ListBuilder also exposes the ability to issue an asynchronous list. When finalizing the ListBuilder,
execute_async will send the request, and unblock. There is currently no polling mechanism.
To retrieve the result, use the blocking function pending_list_wait.
Examples
// synchronous non-builder listlet result: Result<ListPage, KVStoreError> = store.list();// synchronous builder listlet result: Result<ListPage, KVStoreError> = store.build_list().execute();// asynchronous builder listlet list_handle: Result<PendingListHandle, KVStoreError> = store.build_list().execute_async();let result: Result<ListPage, KVStoreError> = store.pending_list_wait(list_handle?);Methods
cursor
View sourcefn cursor(self, cursor: &str) -> SelfChange the cursor of the request.
Parameters
- self: Self
- cursor: &str
Returns
eventual_consistency
View sourcefn eventual_consistency(self) -> SelfRather than read data from the primary data source, which is slower but strongly consistent (strong, the default), instead read a local copy if available, which offers higher speed and may be a few seconds out of date (eventual).
Parameters
- self: Self
Returns
execute
View sourceInitiate and wait on the first page of a list of values in the KV Store.
Returns Ok(ListPage) if the list is returned, and KVStoreError if the list failed.
Parameters
- self: Self
Returns
execute_async
View sourceInitiate async list of values in the KV Store.
Returns Ok(Some(PendingListHandle)) if list creation is successful.
Parameters
- self: &Self
Returns
iter
View sourceProduce a new ListResponse, which can be used as an iterator for chunked list operations.
Returns a new ListResponse, primed for iteration.
Parameters
- self: Self
Returns
limit
View sourcefn limit(self, limit: u32) -> SelfSet the maximum number of items included the response. The default limit is 100 items.
Parameters
- self: Self
- limit: u32
Returns
prefix
View sourcefn prefix(self, prefix: &str) -> SelfSet the prefix match for items to include in the resultset.
Parameters
- self: Self
- prefix: &str
Returns