pub struct GenericCoreId<const MAX_CORES: usize>(usize);Expand description
Logical identifier for a CPU core in a system with up to MAX_CORES cores.
Tuple Fields§
§0: usizeImplementations§
Source§impl<const MAX_CORES: usize> GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> GenericCoreId<MAX_CORES>
const _ASSERT_VALID_MAX_CORES: ()
Sourcepub fn new(id: usize) -> Self
pub fn new(id: usize) -> Self
Constructs a GenericCoreId for the given logical core index.
§Panics
Debug-asserts that id < MAX_CORES.
Trait Implementations§
Source§impl<const MAX_CORES: usize> Clone for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Clone for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Copy for GenericCoreId<MAX_CORES>
Source§impl<const MAX_CORES: usize> Debug for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Debug for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Eq for GenericCoreId<MAX_CORES>
Source§impl<const MAX_CORES: usize> Hash for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Hash for GenericCoreId<MAX_CORES>
Source§impl<const MAX_CORES: usize> Ord for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Ord for GenericCoreId<MAX_CORES>
1.21.0 (const: unstable)§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)§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<const MAX_CORES: usize> PartialEq for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> PartialEq for GenericCoreId<MAX_CORES>
Source§impl<const MAX_CORES: usize> PartialOrd for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> PartialOrd for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> StructuralPartialEq for GenericCoreId<MAX_CORES>
Auto Trait Implementations§
impl<const MAX_CORES: usize> Forget for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Freeze for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Move for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> RefUnwindSafe for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Send for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Sync for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> Unpin for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> UnsafeUnpin for GenericCoreId<MAX_CORES>
impl<const MAX_CORES: usize> UnwindSafe for GenericCoreId<MAX_CORES>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)