pub enum NumaError {
PolicyNotSupported {
policy: String,
reason: String,
},
CapabilityMissing {
capability: &'static str,
},
HardModeUnavailable {
feature: &'static str,
reason: String,
},
TopologyError {
source: Error,
},
AllocationFailed {
size: usize,
source: Error,
},
PinningFailed {
source: Error,
},
BindFailed {
source: Error,
},
InvalidArgument {
message: String,
},
NotSupported {
feature: &'static str,
},
Io(Error),
}Expand description
Unified error type for all numaperf operations.
Errors are structured to explain both what failed and why, enabling callers to take appropriate recovery actions.
Variants§
PolicyNotSupported
The requested memory policy is not supported on this kernel.
Fields
CapabilityMissing
A required capability is missing.
Hard mode was requested but cannot be enforced.
TopologyError
Topology discovery failed.
AllocationFailed
Memory allocation or mapping failed.
PinningFailed
Thread pinning failed.
BindFailed
Memory binding (mbind) failed.
InvalidArgument
An invalid argument was provided.
NotSupported
Platform does not support the requested feature.
Io(Error)
Generic I/O error.
Implementations§
Source§impl NumaError
impl NumaError
Sourcepub fn allocation(size: usize, source: Error) -> NumaError
pub fn allocation(size: usize, source: Error) -> NumaError
Create an allocation error.
Sourcepub fn policy_not_supported(
policy: impl Into<String>,
reason: impl Into<String>,
) -> NumaError
pub fn policy_not_supported( policy: impl Into<String>, reason: impl Into<String>, ) -> NumaError
Create a policy not supported error.
Create a hard mode unavailable error.
Sourcepub fn invalid_argument(message: impl Into<String>) -> NumaError
pub fn invalid_argument(message: impl Into<String>) -> NumaError
Create an invalid argument error.
Sourcepub fn is_permission_error(&self) -> bool
pub fn is_permission_error(&self) -> bool
Check if this error indicates a permission issue.
Sourcepub fn is_not_supported(&self) -> bool
pub fn is_not_supported(&self) -> bool
Check if this error indicates the feature is not supported.