pub enum BatteryState {
Charging,
Discharging,
Full,
NotCharging,
Unknown,
}Expand description
The battery’s charging state.
Variants§
Charging
Plugged in and charging.
Discharging
Running on battery.
Full
Plugged in and fully charged.
NotCharging
Plugged in but not charging (e.g. charge-limited / paused).
Unknown
State could not be determined.
Trait Implementations§
Source§impl Clone for BatteryState
impl Clone for BatteryState
Source§fn clone(&self) -> BatteryState
fn clone(&self) -> BatteryState
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 moreSource§impl Debug for BatteryState
impl Debug for BatteryState
Source§impl Default for BatteryState
impl Default for BatteryState
Source§fn default() -> BatteryState
fn default() -> BatteryState
Returns the “default value” for a type. Read more
Source§impl PartialEq for BatteryState
impl PartialEq for BatteryState
Source§fn eq(&self, other: &BatteryState) -> bool
fn eq(&self, other: &BatteryState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for BatteryState
impl Eq for BatteryState
impl StructuralPartialEq for BatteryState
Auto Trait Implementations§
impl Freeze for BatteryState
impl RefUnwindSafe for BatteryState
impl Send for BatteryState
impl Sync for BatteryState
impl Unpin for BatteryState
impl UnsafeUnpin for BatteryState
impl UnwindSafe for BatteryState
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