pub struct ParallelConfig {
pub parallelism: usize,
pub buffer_size: usize,
pub preserve_order: bool,
}Expand description
Configuration for parallel processing
Fields§
§parallelism: usizeNumber of parallel tasks
buffer_size: usizeMaximum buffer size per task
preserve_order: boolWhether to preserve ordering in parallel processing
Implementations§
Source§impl ParallelConfig
impl ParallelConfig
Sourcepub fn new(parallelism: usize, buffer_size: usize, preserve_order: bool) -> Self
pub fn new(parallelism: usize, buffer_size: usize, preserve_order: bool) -> Self
Create a new parallel configuration
Sourcepub fn with_parallelism(self, parallelism: usize) -> Self
pub fn with_parallelism(self, parallelism: usize) -> Self
Set the number of parallel tasks
Sourcepub fn with_buffer_size(self, buffer_size: usize) -> Self
pub fn with_buffer_size(self, buffer_size: usize) -> Self
Set the buffer size per task
Sourcepub fn with_preserve_order(self, preserve_order: bool) -> Self
pub fn with_preserve_order(self, preserve_order: bool) -> Self
Set whether to preserve ordering
Trait Implementations§
Source§impl Clone for ParallelConfig
impl Clone for ParallelConfig
Source§fn clone(&self) -> ParallelConfig
fn clone(&self) -> ParallelConfig
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 ParallelConfig
impl Debug for ParallelConfig
Auto Trait Implementations§
impl Freeze for ParallelConfig
impl RefUnwindSafe for ParallelConfig
impl Send for ParallelConfig
impl Sync for ParallelConfig
impl Unpin for ParallelConfig
impl UnwindSafe for ParallelConfig
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