pub struct CpuDomainExecutorCapabilities {
pub worker_count: NonZeroUsize,
pub outer_parallelism: bool,
pub inner_parallelism: CpuInnerParallelism,
pub reentrancy: CpuExecutorReentrancy,
pub affinity: CpuExecutorAffinity,
pub shutdown: CpuExecutorShutdown,
}Expand description
Immutable construction-time capabilities of a CPU domain executor.
§Examples
use std::num::NonZeroUsize;
use tenferro_cpu::{
CpuDomainExecutorCapabilities, CpuExecutorAffinity, CpuExecutorReentrancy,
CpuExecutorShutdown, CpuInnerParallelism,
};
let capabilities = CpuDomainExecutorCapabilities {
worker_count: NonZeroUsize::new(4).unwrap(),
outer_parallelism: true,
inner_parallelism: CpuInnerParallelism::Rayon,
reentrancy: CpuExecutorReentrancy::Rejected,
affinity: CpuExecutorAffinity::TenferroPinnedVerified,
shutdown: CpuExecutorShutdown::TenferroOwned,
};
assert_eq!(capabilities.worker_count.get(), 4);Fields§
§worker_count: NonZeroUsizeNumber of workers made available to this domain.
outer_parallelism: boolWhether indexed outer fork/join submission is supported.
inner_parallelism: CpuInnerParallelismProvider-owned inner parallel-region support.
reentrancy: CpuExecutorReentrancySame-executor re-entry capability.
affinity: CpuExecutorAffinityWorker-affinity claim and verification level.
shutdown: CpuExecutorShutdownExecutor shutdown owner.
Trait Implementations§
Source§impl Clone for CpuDomainExecutorCapabilities
impl Clone for CpuDomainExecutorCapabilities
Source§fn clone(&self) -> CpuDomainExecutorCapabilities
fn clone(&self) -> CpuDomainExecutorCapabilities
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 PartialEq for CpuDomainExecutorCapabilities
impl PartialEq for CpuDomainExecutorCapabilities
Source§fn eq(&self, other: &CpuDomainExecutorCapabilities) -> bool
fn eq(&self, other: &CpuDomainExecutorCapabilities) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CpuDomainExecutorCapabilities
impl Eq for CpuDomainExecutorCapabilities
impl StructuralPartialEq for CpuDomainExecutorCapabilities
Auto Trait Implementations§
impl Freeze for CpuDomainExecutorCapabilities
impl RefUnwindSafe for CpuDomainExecutorCapabilities
impl Send for CpuDomainExecutorCapabilities
impl Sync for CpuDomainExecutorCapabilities
impl Unpin for CpuDomainExecutorCapabilities
impl UnsafeUnpin for CpuDomainExecutorCapabilities
impl UnwindSafe for CpuDomainExecutorCapabilities
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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