pub struct RayonExecutorServiceBuilder { /* private fields */ }Expand description
Builder for RayonExecutorService.
The default builder uses the available CPU parallelism and names workers
with the qubit-rayon-executor prefix.
Implementations§
Source§impl RayonExecutorServiceBuilder
impl RayonExecutorServiceBuilder
Sourcepub fn num_threads(self, num_threads: usize) -> Self
pub fn num_threads(self, num_threads: usize) -> Self
Sourcepub fn thread_name_prefix(self, prefix: &str) -> Self
pub fn thread_name_prefix(self, prefix: &str) -> Self
Sourcepub fn stack_size(self, stack_size: usize) -> Self
pub fn stack_size(self, stack_size: usize) -> Self
Sourcepub fn build(
self,
) -> Result<RayonExecutorService, RayonExecutorServiceBuildError>
pub fn build( self, ) -> Result<RayonExecutorService, RayonExecutorServiceBuildError>
Builds the configured Rayon executor service.
§Returns
Ok(RayonExecutorService) if the Rayon thread pool is created
successfully.
§Errors
Returns RayonExecutorServiceBuildError if the thread count or stack
size is zero, or if Rayon rejects the thread-pool configuration.
Trait Implementations§
Source§impl Clone for RayonExecutorServiceBuilder
impl Clone for RayonExecutorServiceBuilder
Source§fn clone(&self) -> RayonExecutorServiceBuilder
fn clone(&self) -> RayonExecutorServiceBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RayonExecutorServiceBuilder
impl Debug for RayonExecutorServiceBuilder
Auto Trait Implementations§
impl Freeze for RayonExecutorServiceBuilder
impl RefUnwindSafe for RayonExecutorServiceBuilder
impl Send for RayonExecutorServiceBuilder
impl Sync for RayonExecutorServiceBuilder
impl Unpin for RayonExecutorServiceBuilder
impl UnsafeUnpin for RayonExecutorServiceBuilder
impl UnwindSafe for RayonExecutorServiceBuilder
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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