pub struct Cpu { /* private fields */ }
Expand description
Read cpu information from /proc/cpuinfo.
Implementations§
Source§impl 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 StructuralPartialEq for Cpu
Auto Trait Implementations§
impl Freeze for Cpu
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnwindSafe for Cpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more