pub struct BatchOptions {
pub parallelism: usize,
pub memory_limit_per_worker: usize,
pub progress_interval: Duration,
pub stop_on_error: bool,
pub progress_callback: Option<Arc<dyn ProgressCallback>>,
pub job_timeout: Option<Duration>,
}Expand description
Options for batch processing
Fields§
§parallelism: usizeNumber of parallel workers
memory_limit_per_worker: usizeMaximum memory per worker (bytes)
progress_interval: DurationProgress update interval
stop_on_error: boolWhether to stop on first error
progress_callback: Option<Arc<dyn ProgressCallback>>Progress callback
job_timeout: Option<Duration>Timeout for individual jobs
Implementations§
Source§impl BatchOptions
impl BatchOptions
Sourcepub fn with_parallelism(self, parallelism: usize) -> Self
pub fn with_parallelism(self, parallelism: usize) -> Self
Set the number of parallel workers
Sourcepub fn with_memory_limit(self, bytes: usize) -> Self
pub fn with_memory_limit(self, bytes: usize) -> Self
Set memory limit per worker
Sourcepub fn with_progress_callback<F>(self, callback: F) -> Self
pub fn with_progress_callback<F>(self, callback: F) -> Self
Set progress callback
Sourcepub fn stop_on_error(self, stop: bool) -> Self
pub fn stop_on_error(self, stop: bool) -> Self
Set whether to stop on first error
Sourcepub fn with_job_timeout(self, timeout: Duration) -> Self
pub fn with_job_timeout(self, timeout: Duration) -> Self
Set job timeout
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchOptions
impl !RefUnwindSafe for BatchOptions
impl Send for BatchOptions
impl Sync for BatchOptions
impl Unpin 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