pub struct BatteryStats {
pub percent: Option<f32>,
pub status: String,
pub power_w: Option<f32>,
}Expand description
Charge and power of the system’s batteries (summed when there are
several), from /sys/class/power_supply on Linux.
Fields§
§percent: Option<f32>Charge in percent.
status: StringKernel status: Charging, Discharging, Full, Not charging…
power_w: Option<f32>Charge or discharge power (not signed; see status).
Implementations§
Trait Implementations§
Source§impl Clone for BatteryStats
impl Clone for BatteryStats
Source§impl Debug for BatteryStats
impl Debug for BatteryStats
Source§impl Default for BatteryStats
impl Default for BatteryStats
Source§impl<'de> Deserialize<'de> for BatteryStatswhere
BatteryStats: Default,
impl<'de> Deserialize<'de> for BatteryStatswhere
BatteryStats: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BatteryStats
impl PartialEq for BatteryStats
Source§impl Serialize for BatteryStats
impl Serialize for BatteryStats
impl StructuralPartialEq for BatteryStats
Auto Trait Implementations§
impl Freeze for BatteryStats
impl RefUnwindSafe for BatteryStats
impl Send for BatteryStats
impl Sync for BatteryStats
impl Unpin for BatteryStats
impl UnsafeUnpin for BatteryStats
impl UnwindSafe for BatteryStats
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