Struct linux_info::cpu::Cpu
source · [−]pub struct Cpu { /* private fields */ }Expand description
Read cpu information from /proc/cpuinfo.
Implementations
sourceimpl Cpu
impl Cpu
sourcepub fn entries<'a>(&'a self) -> impl Iterator<Item = CpuEntry<'a>>
pub fn entries<'a>(&'a self) -> impl Iterator<Item = CpuEntry<'a>>
Main method to get cpu infos. Returns every entry.
sourcepub fn first_value<'a>(&'a self, key: &str) -> Option<&'a str>
pub fn first_value<'a>(&'a self, key: &str) -> Option<&'a str>
Returns the value of the first.
sourcepub fn unique_values<'a>(&'a self, key: &str) -> Vec<&'a str>
pub fn unique_values<'a>(&'a self, key: &str) -> Vec<&'a str>
Returns the unique values to a specific key.
Trait Implementations
impl Eq for Cpu
impl StructuralEq for Cpu
impl StructuralPartialEq for Cpu
Auto Trait Implementations
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnwindSafe for Cpu
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more