pub enum Parallelism {
Serial,
Custom(fn(count: usize, body: &(dyn Fn(usize) + Sync + Send))),
}Expand description
Strategy for dispatching row-parallel work inside batch codec methods.
Variants§
Serial
Execute rows sequentially on the current thread.
Custom(fn(count: usize, body: &(dyn Fn(usize) + Sync + Send)))
Defer to a caller-supplied driver (e.g. rayon).
The driver is a plain function pointer, so it cannot close over state
such as a specific rayon::ThreadPool. To target a non-global pool,
install it before invoking compress_batch_with:
pool.install(|| codec.compress_batch_with(..., Parallelism::Custom(driver))).
Implementations§
Source§impl Parallelism
impl Parallelism
Trait Implementations§
Source§impl Clone for Parallelism
impl Clone for Parallelism
Source§fn clone(&self) -> Parallelism
fn clone(&self) -> Parallelism
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 Default for Parallelism
impl Default for Parallelism
Source§fn default() -> Parallelism
fn default() -> Parallelism
Returns the “default value” for a type. Read more
impl Copy for Parallelism
Auto Trait Implementations§
impl Freeze for Parallelism
impl RefUnwindSafe for Parallelism
impl Send for Parallelism
impl Sync for Parallelism
impl Unpin for Parallelism
impl UnsafeUnpin for Parallelism
impl UnwindSafe for Parallelism
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