pub enum EnforcementLevel {
Strict,
BestEffort {
reason: String,
},
None {
reason: String,
},
}Expand description
Reports the actual enforcement level achieved for an operation.
When using soft mode, operations may succeed with reduced guarantees. This enum allows callers to inspect what level of NUMA policy enforcement was actually achieved.
Variants§
Strict
The policy is fully enforced.
Memory is bound to the requested nodes, threads are pinned, and the kernel guarantees the placement.
BestEffort
The policy was applied but is not guaranteed.
The kernel will try to honor the policy, but may move pages or threads under memory pressure or other conditions.
None
No NUMA policy was applied.
The operation succeeded, but no NUMA-specific behavior is in effect. Memory may be allocated from any node.
Implementations§
Source§impl EnforcementLevel
impl EnforcementLevel
Sourcepub fn best_effort(reason: impl Into<String>) -> Self
pub fn best_effort(reason: impl Into<String>) -> Self
Create a best-effort enforcement level.
Sourcepub fn is_best_effort(&self) -> bool
pub fn is_best_effort(&self) -> bool
Check if this is best-effort enforcement.
Trait Implementations§
Source§impl Clone for EnforcementLevel
impl Clone for EnforcementLevel
Source§fn clone(&self) -> EnforcementLevel
fn clone(&self) -> EnforcementLevel
Returns a duplicate of the value. Read more
1.0.0 · 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 EnforcementLevel
impl Debug for EnforcementLevel
Source§impl Default for EnforcementLevel
impl Default for EnforcementLevel
Source§fn default() -> EnforcementLevel
fn default() -> EnforcementLevel
Returns the “default value” for a type. Read more
Source§impl Display for EnforcementLevel
impl Display for EnforcementLevel
Source§impl PartialEq for EnforcementLevel
impl PartialEq for EnforcementLevel
impl Eq for EnforcementLevel
impl StructuralPartialEq for EnforcementLevel
Auto Trait Implementations§
impl Freeze for EnforcementLevel
impl RefUnwindSafe for EnforcementLevel
impl Send for EnforcementLevel
impl Sync for EnforcementLevel
impl Unpin for EnforcementLevel
impl UnwindSafe for EnforcementLevel
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