pub struct Power {
pub source: Source,
pub battery_percent: Option<u8>,
pub low_power_mode: bool,
pub energy_mode: EnergyMode,
}Fields§
§source: Source§battery_percent: Option<u8>Battery charge as an integer percentage (0–100), or null when no
battery is present (e.g. Mac mini, iMac).
low_power_mode: boolWhether Low Power Mode is currently active
(NSProcessInfo.isLowPowerModeEnabled). This is the runtime state,
not a configured preference.
energy_mode: EnergyModeImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Power
impl RefUnwindSafe for Power
impl Send for Power
impl Sync for Power
impl Unpin for Power
impl UnsafeUnpin for Power
impl UnwindSafe for Power
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