[−][src]Struct lpfs::proc::CpuInfo
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.
fn from_str(s: &str) -> Result<CpuInfo, ProcErr>
[src]
impl Index<usize> for CpuInfo
[src]
type Output = Processor
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,