pub struct BatterySnapshot {
pub charge: Percent,
pub state: ChargeState,
pub time_remaining: MetricState<Duration>,
pub cycle_count: MetricState<u32>,
pub health: MetricState<Percent>,
}Expand description
Battery state.
Fields§
§charge: PercentCharge level.
state: ChargeStateCharging state.
time_remaining: MetricState<Duration>Estimated time to empty or to full.
cycle_count: MetricState<u32>Charge cycles, where reported.
health: MetricState<Percent>Full-charge capacity as a share of design capacity, i.e. battery health.
Trait Implementations§
Source§impl Clone for BatterySnapshot
impl Clone for BatterySnapshot
Source§fn clone(&self) -> BatterySnapshot
fn clone(&self) -> BatterySnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BatterySnapshot
Source§impl Debug for BatterySnapshot
impl Debug for BatterySnapshot
Source§impl PartialEq for BatterySnapshot
impl PartialEq for BatterySnapshot
impl StructuralPartialEq for BatterySnapshot
Auto Trait Implementations§
impl Freeze for BatterySnapshot
impl RefUnwindSafe for BatterySnapshot
impl Send for BatterySnapshot
impl Sync for BatterySnapshot
impl Unpin for BatterySnapshot
impl UnsafeUnpin for BatterySnapshot
impl UnwindSafe for BatterySnapshot
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