pub struct ProcessorId {
pub group: u16,
pub number: u8,
}Expand description
The identity of one logical processor: its group and its number within that group.
Never flattened to a single index (D-7 in DESIGN-NOTES.md): a Windows
thread’s affinity is a GROUP_AFFINITY, one group and a bitmask within
it, so the group is a hard boundary a flattened index would lose.
Fields§
§group: u16The processor group.
number: u8The processor’s number within that group (0..MAX_PROCESSORS_PER_GROUP,
i.e. 0..usize::BITS).
Trait Implementations§
Source§impl Clone for ProcessorId
impl Clone for ProcessorId
Source§fn clone(&self) -> ProcessorId
fn clone(&self) -> ProcessorId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProcessorId
Source§impl Debug for ProcessorId
impl Debug for ProcessorId
Source§impl<'de> Deserialize<'de> for ProcessorId
impl<'de> Deserialize<'de> for ProcessorId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProcessorId
Source§impl Hash for ProcessorId
impl Hash for ProcessorId
Source§impl Ord for ProcessorId
impl Ord for ProcessorId
Source§fn cmp(&self, other: &ProcessorId) -> Ordering
fn cmp(&self, other: &ProcessorId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ProcessorId
impl PartialEq for ProcessorId
Source§impl PartialOrd for ProcessorId
impl PartialOrd for ProcessorId
Source§impl Serialize for ProcessorId
impl Serialize for ProcessorId
impl StructuralPartialEq for ProcessorId
Auto Trait Implementations§
impl Freeze for ProcessorId
impl RefUnwindSafe for ProcessorId
impl Send for ProcessorId
impl Sync for ProcessorId
impl Unpin for ProcessorId
impl UnsafeUnpin for ProcessorId
impl UnwindSafe for ProcessorId
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