Struct CoreAffinity
pub struct CoreAffinity(/* private fields */);
Available on crate features
threading
and core-affinity
only.Expand description
Affinity mask that defines on what cores a thread can be scheduled.
Implementations§
§impl CoreAffinity
impl CoreAffinity
pub const fn no_affinity() -> CoreAffinity
pub const fn no_affinity() -> CoreAffinity
Allows a thread to be scheduled on any core and to migrate from one core to another between executions.
pub fn one(core: CoreId) -> CoreAffinity
pub fn one(core: CoreId) -> CoreAffinity
Restricts the thread execution to a specific core.
The thread can only be scheduled on this core, even if other cores are idle or execute a lower priority thread.
Trait Implementations§
§impl Clone for CoreAffinity
impl Clone for CoreAffinity
§fn clone(&self) -> CoreAffinity
fn clone(&self) -> CoreAffinity
Returns a copy 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 more§impl Debug for CoreAffinity
impl Debug for CoreAffinity
§impl Default for CoreAffinity
impl Default for CoreAffinity
§fn default() -> CoreAffinity
fn default() -> CoreAffinity
Returns the “default value” for a type. Read more
§impl Format for CoreAffinity
impl Format for CoreAffinity
§impl PartialEq for CoreAffinity
impl PartialEq for CoreAffinity
impl Copy for CoreAffinity
impl Eq for CoreAffinity
impl StructuralPartialEq for CoreAffinity
Auto Trait Implementations§
impl Freeze for CoreAffinity
impl RefUnwindSafe for CoreAffinity
impl Send for CoreAffinity
impl Sync for CoreAffinity
impl Unpin for CoreAffinity
impl UnwindSafe for CoreAffinity
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