pub enum MemoryAffinity {
Unknown,
Pinned(PinnedAffinity),
}Expand description
An MemoryAffinity can be thought of as a placement in a system.
It is used to represent a specific context or environment where data can be processed. For example a NUMA node, a thread, a specific CPU core, or a specific memory region.
Variants§
Unknown
An unknown affinity represents no specific binding, like an unpinned thread.
Pinned(PinnedAffinity)
A pinned affinity represents a specific binding to a processor and memory region.
Implementations§
Source§impl MemoryAffinity
impl MemoryAffinity
Sourcepub const fn is_unknown(self) -> bool
pub const fn is_unknown(self) -> bool
Returns true if the affinity is unknown.
Trait Implementations§
Source§impl Clone for MemoryAffinity
impl Clone for MemoryAffinity
Source§fn clone(&self) -> MemoryAffinity
fn clone(&self) -> MemoryAffinity
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 MemoryAffinity
impl Debug for MemoryAffinity
Source§impl From<PinnedAffinity> for MemoryAffinity
impl From<PinnedAffinity> for MemoryAffinity
Source§fn from(pinned: PinnedAffinity) -> Self
fn from(pinned: PinnedAffinity) -> Self
Converts to this type from the input type.
Source§impl Hash for MemoryAffinity
impl Hash for MemoryAffinity
Source§impl PartialEq for MemoryAffinity
impl PartialEq for MemoryAffinity
impl Copy for MemoryAffinity
impl Eq for MemoryAffinity
impl StructuralPartialEq for MemoryAffinity
Auto Trait Implementations§
impl Freeze for MemoryAffinity
impl RefUnwindSafe for MemoryAffinity
impl Send for MemoryAffinity
impl Sync for MemoryAffinity
impl Unpin for MemoryAffinity
impl UnwindSafe for MemoryAffinity
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