pub struct BatchOptions {
pub max_concurrency: usize,
pub return_exceptions: bool,
pub wave_delay: Option<Duration>,
}Expand description
Settings for BatchProcessor.
Fields§
§max_concurrency: usizeMaximum in-flight tasks. 0 falls back to the config default.
return_exceptions: boolWhen true, errors are collected per-input rather than
short-circuiting the whole batch.
wave_delay: Option<Duration>Optional pause between waves of scheduled tasks. None schedules
continuously up to max_concurrency.
Implementations§
Source§impl BatchOptions
impl BatchOptions
Sourcepub fn with_max_concurrency(self, n: usize) -> Self
pub fn with_max_concurrency(self, n: usize) -> Self
Override max_concurrency (0 ⇒ use config’s value).
Sourcepub fn with_return_exceptions(self, on: bool) -> Self
pub fn with_return_exceptions(self, on: bool) -> Self
Toggle return_exceptions.
Sourcepub fn with_wave_delay(self, d: Duration) -> Self
pub fn with_wave_delay(self, d: Duration) -> Self
Set a wave delay between scheduled tasks.
Trait Implementations§
Source§impl Clone for BatchOptions
impl Clone for BatchOptions
Source§fn clone(&self) -> BatchOptions
fn clone(&self) -> BatchOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BatchOptions
impl Debug for BatchOptions
Source§impl Default for BatchOptions
impl Default for BatchOptions
Source§fn default() -> BatchOptions
fn default() -> BatchOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BatchOptions
impl RefUnwindSafe for BatchOptions
impl Send for BatchOptions
impl Sync for BatchOptions
impl Unpin for BatchOptions
impl UnsafeUnpin for BatchOptions
impl UnwindSafe for BatchOptions
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