pub enum ChargeState {
Charging,
Discharging,
Full,
NotCharging,
Unknown,
}Expand description
Whether the battery is charging.
Variants§
Charging
Charging from external power.
Discharging
Running on battery.
Full
At full charge on external power.
NotCharging
On external power but deliberately not charging.
Unknown
The platform did not report a state.
Implementations§
Trait Implementations§
Source§impl Clone for ChargeState
impl Clone for ChargeState
Source§fn clone(&self) -> ChargeState
fn clone(&self) -> ChargeState
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 ChargeState
Source§impl Debug for ChargeState
impl Debug for ChargeState
Source§impl Default for ChargeState
impl Default for ChargeState
Source§fn default() -> ChargeState
fn default() -> ChargeState
Returns the “default value” for a type. Read more
impl Eq for ChargeState
Source§impl PartialEq for ChargeState
impl PartialEq for ChargeState
impl StructuralPartialEq for ChargeState
Auto Trait Implementations§
impl Freeze for ChargeState
impl RefUnwindSafe for ChargeState
impl Send for ChargeState
impl Sync for ChargeState
impl Unpin for ChargeState
impl UnsafeUnpin for ChargeState
impl UnwindSafe for ChargeState
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