pub struct ManyBuilder { /* private fields */ }Expand description
A builder that can be used to enqueue multiple operations.
The client can optionally execute the operations as batch requests, leading to reduced network overhead.
Implementations§
Source§impl ManyBuilder
impl ManyBuilder
Sourcepub async fn send(self) -> OperationResults
pub async fn send(self) -> OperationResults
Consumes this builder, returning a lazy stream over all the enqueued operations’ results.
The results are not guaranteed to be in the order they were originally enqueued in.
Sourcepub fn max_individual_concurrency(self, concurrency: usize) -> Self
pub fn max_individual_concurrency(self, concurrency: usize) -> Self
Sets the maximum number of concurrent individual (non-batch) requests.
Operations that exceed the per-part size limit are sent as individual requests. This controls how many such requests can be in-flight simultaneously. Defaults to 5 if not set.
Sourcepub fn max_batch_concurrency(self, concurrency: usize) -> Self
pub fn max_batch_concurrency(self, concurrency: usize) -> Self
Sets the maximum number of concurrent batch requests.
Batchable operations are grouped into chunks and sent as multipart batch requests. This controls how many such batch requests can be in-flight simultaneously. Defaults to 3 if not set.
Sourcepub fn push<B: Into<BatchOperation>>(self, builder: B) -> Self
pub fn push<B: Into<BatchOperation>>(self, builder: B) -> Self
Enqueues an operation.
This method takes a GetBuilder/PutBuilder/DeleteBuilder, which you can
construct using Session::get/Session::put/Session::delete.
Important: All pushed builders must originate from the same Session that was used
to create this ManyBuilder. Mixing builders from different sessions is not supported
and will result in all operations being executed against this ManyBuilder’s session,
silently ignoring the original builder’s session.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ManyBuilder
impl !RefUnwindSafe for ManyBuilder
impl Send for ManyBuilder
impl !Sync for ManyBuilder
impl Unpin for ManyBuilder
impl UnsafeUnpin for ManyBuilder
impl !UnwindSafe for ManyBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more