pub enum CpuThreadCountControl {
Sequential,
PerCallUpperBound,
BinaryClampToOne,
GlobalOrUncontrolled,
}Expand description
Per-call control over the maximum number of threads used by a CPU provider.
§Examples
use tenferro_cpu::CpuThreadCountControl;
assert_ne!(
CpuThreadCountControl::PerCallUpperBound,
CpuThreadCountControl::GlobalOrUncontrolled,
);Variants§
Sequential
The provider is sequential by construction.
PerCallUpperBound
Every call accepts an arbitrary positive upper bound.
BinaryClampToOne
Every finite-budget call is clamped to one thread by the adapter.
The adapter must never select its provider-controlled auto mode for a
resource-domain call. Providers that cannot make that guarantee must
report CpuThreadCountControl::GlobalOrUncontrolled instead.
GlobalOrUncontrolled
Control is global, startup-fixed, absent, or otherwise unsafe per call.
Trait Implementations§
Source§impl Clone for CpuThreadCountControl
impl Clone for CpuThreadCountControl
Source§fn clone(&self) -> CpuThreadCountControl
fn clone(&self) -> CpuThreadCountControl
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 CpuThreadCountControl
impl Debug for CpuThreadCountControl
Source§impl Default for CpuThreadCountControl
impl Default for CpuThreadCountControl
Source§fn default() -> CpuThreadCountControl
fn default() -> CpuThreadCountControl
Returns the “default value” for a type. Read more
Source§impl PartialEq for CpuThreadCountControl
impl PartialEq for CpuThreadCountControl
Source§fn eq(&self, other: &CpuThreadCountControl) -> bool
fn eq(&self, other: &CpuThreadCountControl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CpuThreadCountControl
impl Eq for CpuThreadCountControl
impl StructuralPartialEq for CpuThreadCountControl
Auto Trait Implementations§
impl Freeze for CpuThreadCountControl
impl RefUnwindSafe for CpuThreadCountControl
impl Send for CpuThreadCountControl
impl Sync for CpuThreadCountControl
impl Unpin for CpuThreadCountControl
impl UnsafeUnpin for CpuThreadCountControl
impl UnwindSafe for CpuThreadCountControl
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