Enum BatteryLevel
pub enum BatteryLevel {
Mains,
High,
Low,
Critical,
}Expand description
Represents the power source and battery level.
Variants§
Mains
Device is connected to a stable power source.
High
Battery is high (e.g. > 50%).
Low
Battery is low (e.g. < 20%).
Critical
Battery is at critical level, power saving is mandatory.
Trait Implementations§
§impl Clone for BatteryLevel
impl Clone for BatteryLevel
§fn clone(&self) -> BatteryLevel
fn clone(&self) -> BatteryLevel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for BatteryLevel
impl Debug for BatteryLevel
§impl Default for BatteryLevel
impl Default for BatteryLevel
§fn default() -> BatteryLevel
fn default() -> BatteryLevel
Returns the “default value” for a type. Read more
§impl PartialEq for BatteryLevel
impl PartialEq for BatteryLevel
impl Copy for BatteryLevel
impl Eq for BatteryLevel
impl StructuralPartialEq for BatteryLevel
Auto Trait Implementations§
impl Freeze for BatteryLevel
impl RefUnwindSafe for BatteryLevel
impl Send for BatteryLevel
impl Sync for BatteryLevel
impl Unpin for BatteryLevel
impl UnwindSafe for BatteryLevel
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