[][src]Struct lpfs::proc::CpuInfo

pub struct CpuInfo { /* fields omitted */ }

Represent the content of the /proc/cpuinfo, returned by cpuinfo().

It is an Vec<Process> actually, but provides two useful method : logical_core_num() and physical_core_num()

This struct implement Index trait.

Methods

impl CpuInfo[src]

pub fn logical_core_num(&self) -> usize[src]

Return logical core number

This is the numbers of the entry in /proc/cpuinfo.

pub fn physical_core_num(&self) -> usize[src]

Return physical core number

This is caculated from core id.

Note: This method will panic if core id doesn't appear.

Field core id only appears on SMP machine. In this case, physical core numbers equals to logical core numbers.

Trait Implementations

impl Clone for CpuInfo[src]

impl Debug for CpuInfo[src]

impl FromStr for CpuInfo[src]

type Err = ProcErr

The associated error which can be returned from parsing.

impl Index<usize> for CpuInfo[src]

type Output = Processor

The returned type after indexing.

impl PartialEq<CpuInfo> for CpuInfo[src]

impl StructuralPartialEq for CpuInfo[src]

Auto Trait Implementations

impl RefUnwindSafe for CpuInfo

impl Send for CpuInfo

impl Sync for CpuInfo

impl Unpin for CpuInfo

impl UnwindSafe for CpuInfo

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.