Enum Parallelism
#[non_exhaustive]pub enum Parallelism<'a> {
None,
Rayon(usize),
}
Expand description
Parallelism strategy that can be passed to most of the routines in the library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
No parallelism.
The code is executed sequentially on the same thread that calls a function and passes this argument.
Rayon(usize)
Rayon parallelism. Only available with the rayon
feature.
The code is possibly executed in parallel on the current thread, as well as the currently active rayon thread pool.
The contained value represents a hint about the number of threads an implementation should use, but there is no way to guarantee how many or which threads will be used.
A value of 0
treated as equivalent to rayon::current_num_threads()
.
Trait Implementations§
§impl<'a> Clone for Parallelism<'a>
impl<'a> Clone for Parallelism<'a>
§fn clone(&self) -> Parallelism<'a>
fn clone(&self) -> Parallelism<'a>
Returns a copy 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 more§impl<'a> Debug for Parallelism<'a>
impl<'a> Debug for Parallelism<'a>
§impl<'a> PartialEq for Parallelism<'a>
impl<'a> PartialEq for Parallelism<'a>
impl<'a> Copy for Parallelism<'a>
impl<'a> Eq for Parallelism<'a>
impl<'a> StructuralPartialEq for Parallelism<'a>
Auto Trait Implementations§
impl<'a> Freeze for Parallelism<'a>
impl<'a> RefUnwindSafe for Parallelism<'a>
impl<'a> Send for Parallelism<'a>
impl<'a> Sync for Parallelism<'a>
impl<'a> Unpin for Parallelism<'a>
impl<'a> UnwindSafe for Parallelism<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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