#[non_exhaustive]pub enum BatteryState {
Charging,
Discharging,
Full,
NotCharging,
Unknown,
}Expand description
What a battery is doing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Charging
Charging.
Discharging
Powering the machine.
Full
Full.
NotCharging
On mains power and not charging (a charge limit, or a full pack).
Unknown
The OS does not say (E-83).
Trait Implementations§
Source§impl Clone for BatteryState
impl Clone for BatteryState
impl Copy for BatteryState
Source§impl Debug for BatteryState
impl Debug for BatteryState
impl Eq for BatteryState
Source§impl Hash for BatteryState
impl Hash for BatteryState
Source§impl PartialEq for BatteryState
impl PartialEq for BatteryState
impl StructuralPartialEq for BatteryState
Auto Trait Implementations§
impl Forget for BatteryState
impl Freeze for BatteryState
impl Move 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