pub struct MapOptions { /* private fields */ }Expand description
Configure map operation behavior including batching.
Control how items in a collection are processed. By default, all items
execute concurrently in a single batch. Set batch_size to limit
concurrency — each batch completes before the next begins.
§Examples
use durable_lambda_core::types::MapOptions;
// Default: all items concurrent.
let opts = MapOptions::new();
// Process in batches of 10.
let opts = MapOptions::new().batch_size(10);Implementations§
Source§impl MapOptions
impl MapOptions
Sourcepub fn new() -> MapOptions
pub fn new() -> MapOptions
Create a new MapOptions with default settings (all items concurrent).
§Examples
use durable_lambda_core::types::MapOptions;
let opts = MapOptions::new();Sourcepub fn batch_size(self, size: usize) -> MapOptions
pub fn batch_size(self, size: usize) -> MapOptions
Set the maximum number of items to process concurrently per batch.
Each batch of items executes concurrently, but batches themselves run sequentially — the next batch starts only after the previous batch completes. Must be a positive value.
§Panics
Panics if size is 0.
§Examples
use durable_lambda_core::types::MapOptions;
let opts = MapOptions::new().batch_size(5);Sourcepub fn get_batch_size(&self) -> Option<usize>
pub fn get_batch_size(&self) -> Option<usize>
Return the configured batch size, if any.
§Examples
use durable_lambda_core::types::MapOptions;
let opts = MapOptions::new();
assert_eq!(opts.get_batch_size(), None);
let opts = MapOptions::new().batch_size(10);
assert_eq!(opts.get_batch_size(), Some(10));Trait Implementations§
Source§impl Clone for MapOptions
impl Clone for MapOptions
Source§fn clone(&self) -> MapOptions
fn clone(&self) -> MapOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MapOptions
impl Debug for MapOptions
Source§impl Default for MapOptions
impl Default for MapOptions
Source§fn default() -> MapOptions
fn default() -> MapOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MapOptions
impl RefUnwindSafe for MapOptions
impl Send for MapOptions
impl Sync for MapOptions
impl Unpin for MapOptions
impl UnsafeUnpin for MapOptions
impl UnwindSafe for MapOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.