pub struct BatchConfig {
pub parallel_threshold: usize,
pub max_threads: Option<usize>,
pub progress_interval: usize,
pub verbose: bool,
}Expand description
Configuration for batch processing operations.
Controls parallelization strategy, progress reporting, and error handling behavior.
§Examples
use hedl_cli::batch::BatchConfig;
// Default configuration (auto parallelization)
let config = BatchConfig::default();
// Custom configuration
let config = BatchConfig {
parallel_threshold: 5, // Parallelize if >= 5 files
max_threads: Some(4), // Use at most 4 threads
progress_interval: 10, // Update progress every 10 files
verbose: true, // Show detailed progress
};Fields§
§parallel_threshold: usizeMinimum number of files to trigger parallel processing.
Files below this threshold are processed serially to avoid thread pool overhead. Default: 10
max_threads: Option<usize>Maximum number of threads to use for parallel processing.
None means use Rayon’s default (typically number of CPU cores). Default: None
progress_interval: usizeNumber of files between progress updates.
Progress is printed every N files processed. Set to 0 to disable. Default: 1 (update after each file)
verbose: boolEnable verbose progress reporting.
When true, shows file names and detailed status for each file. Default: false
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
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 BatchConfig
impl Debug for BatchConfig
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnwindSafe for BatchConfig
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> 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 more