pub struct PowerState { /* private fields */ }Expand description
One immutable power and thermal snapshot.
Implementations§
Source§impl PowerState
impl PowerState
pub const fn source(self) -> PowerSource
pub const fn battery(self) -> Option<BatteryState>
pub const fn thermal_state(self) -> ThermalState
Sourcepub const fn low_power_mode(self) -> Option<bool>
pub const fn low_power_mode(self) -> Option<bool>
Whether the operating system reports an energy-saving mode, if supported.
Sourcepub const fn cpu_speed_limit_percent(self) -> Option<u8>
pub const fn cpu_speed_limit_percent(self) -> Option<u8>
Current OS-advertised CPU speed limit, where 100 means no advertised throttling.
Trait Implementations§
Source§impl Clone for PowerState
impl Clone for PowerState
impl Copy for PowerState
Source§impl Debug for PowerState
impl Debug for PowerState
impl Eq for PowerState
Source§impl Hash for PowerState
impl Hash for PowerState
Source§impl PartialEq for PowerState
impl PartialEq for PowerState
impl StructuralPartialEq for PowerState
Auto Trait Implementations§
impl Forget for PowerState
impl Freeze for PowerState
impl Move for PowerState
impl RefUnwindSafe for PowerState
impl Send for PowerState
impl Sync for PowerState
impl Unpin for PowerState
impl UnsafeUnpin for PowerState
impl UnwindSafe for PowerState
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