[−][src]Struct ryzen_reader::CpuInfo
Implementations
impl CpuInfo
[src]
Struct that allows reading of cpu power info
Example
let cpu = CpuInfo::new()?; let power = cpu.read()?; println!("Package power:"); for (package, usage) in power.packages().enumerate() { println!("\t#{}: {:.2}W", package, usage); } println!("Core power:"); for (core, usage) in power.cores().enumerate() { println!("\t#{}: {:.2}W", core, usage); }
pub fn new() -> Result<Self, Error>
[src]
pub fn read(&self) -> Result<CpuPower, Error>
[src]
Read the cpu power levels
Note that this method will block for ~10ms
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, 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>,