pub struct BatchAddHandle {
pub added: Vec<ProcessedRequest>,
/* private fields */
}Expand description
Handle for observing completion of a batched request addition.
Fields§
§added: Vec<ProcessedRequest>Requests added synchronously.
Implementations§
Source§impl BatchAddHandle
impl BatchAddHandle
Sourcepub fn ready(added: Vec<ProcessedRequest>) -> Self
pub fn ready(added: Vec<ProcessedRequest>) -> Self
Creates an already-completed batch handle.
Sourcepub fn deferred(
added: Vec<ProcessedRequest>,
task: JoinHandle<StorageResult<AddRequestsBatchedResult>>,
) -> Self
pub fn deferred( added: Vec<ProcessedRequest>, task: JoinHandle<StorageResult<AddRequestsBatchedResult>>, ) -> Self
Creates a batch handle backed by a spawned completion task.
Sourcepub async fn wait(self) -> StorageResult<AddRequestsBatchedResult>
pub async fn wait(self) -> StorageResult<AddRequestsBatchedResult>
Waits until all requests in the batch have been processed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchAddHandle
impl RefUnwindSafe for BatchAddHandle
impl Send for BatchAddHandle
impl Sync for BatchAddHandle
impl Unpin for BatchAddHandle
impl UnsafeUnpin for BatchAddHandle
impl UnwindSafe for BatchAddHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more