Struct atopology::Core[][src]

pub struct Core {
    pub node_id: Option<NodeId>,
    pub package_id: PackageId,
    pub id: CoreId,
}

Represents a core in the system.

Note

The order is important here, when Ord is derived on structs, it will produce a lexicographic ordering based on the top-to-bottom declaration order of the struct’s members.

Fields

node_id: Option<NodeId>

NUMA node

package_id: PackageId

Package ID

id: CoreId

Core ID (which is relative within the package).

Implementations

impl Core[src]

pub fn siblings(&'static self) -> impl Iterator<Item = &'static Core>[src]

All neighboring cores (on the same core)

pub fn threads(&'static self) -> impl Iterator<Item = &'static Thread>[src]

All threads of the core.

pub fn package(&'static self) -> &'static Package[src]

Return the Package this core belongs to.

pub fn node(&'static self) -> Option<&'static Node>[src]

Return the NUMA node this core belongs to.

Trait Implementations

impl Debug for Core[src]

impl Eq for Core[src]

impl Ord for Core[src]

impl PartialEq<Core> for Core[src]

impl PartialOrd<Core> for Core[src]

impl StructuralEq for Core[src]

impl StructuralPartialEq for Core[src]

Auto Trait Implementations

impl Send for Core

impl Sync for Core

impl Unpin for Core

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.