pub enum CpuAffinityError {
CpuSet(CpuSetError),
Set {
source: Error,
},
Query {
source: Error,
},
UnsupportedPlatform,
VerificationUnavailable,
Verification {
observed: Vec<CpuId>,
},
MaskSizeOverflow,
MaskTooLarge {
cpu: CpuId,
max_bytes: usize,
},
MaskAllocation {
source: TryReserveError,
},
EmptyMask,
}Expand description
Typed failures from the operating-system CPU-affinity boundary.
These errors stay CPU-local until a context-construction failure is
reported to the tensor API, where the complete value is retained as the
source of crate::CpuContextError.
§Examples
use tenferro_cpu::CpuAffinityError;
let error = CpuAffinityError::UnsupportedPlatform;
assert!(error.to_string().contains("unsupported"));Variants§
CpuSet(CpuSetError)
Constructing the one-CPU mask failed because the CPU set was invalid.
Set
The operating system rejected the requested affinity mask.
Query
Querying the current worker affinity failed.
UnsupportedPlatform
The platform has no supported thread-affinity implementation.
The operating system did not expose a process affinity mask.
Verification
The returned affinity did not contain exactly the requested worker.
MaskSizeOverflow
The requested CPU would overflow the affinity-mask size calculation.
MaskTooLarge
The requested CPU exceeds the supported mask allocation limit.
MaskAllocation
Allocating the operating-system affinity mask failed.
Fields
source: TryReserveErrorEmptyMask
The affinity mask had no CPU entries.
Trait Implementations§
Source§impl Debug for CpuAffinityError
impl Debug for CpuAffinityError
Source§impl Display for CpuAffinityError
impl Display for CpuAffinityError
Source§impl Error for CpuAffinityError
impl Error for CpuAffinityError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CpuSetError> for CpuAffinityError
impl From<CpuSetError> for CpuAffinityError
Source§fn from(source: CpuSetError) -> Self
fn from(source: CpuSetError) -> Self
Auto Trait Implementations§
impl Freeze for CpuAffinityError
impl !RefUnwindSafe for CpuAffinityError
impl Send for CpuAffinityError
impl Sync for CpuAffinityError
impl Unpin for CpuAffinityError
impl UnsafeUnpin for CpuAffinityError
impl !UnwindSafe for CpuAffinityError
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
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>
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>
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