Struct linux_info::cpu::Cpu
source · 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.