#[repr(u8)]pub enum BatteryLevel {
Drained = 0,
Critical = 1,
VeryLow = 2,
Low = 3,
Medium = 4,
High = 5,
}Expand description
Representation of the console’s battery charge level.
These values correspond to the various states the battery is shown to be in the Home Menu UI.
Variants§
Drained = 0
Battery charge at 0%. System shutdown is imminent.
Critical = 1
Battery charge between 5-1%.
VeryLow = 2
Battery charge between 10-6%.
Low = 3
Battery charge between 30-11%.
Medium = 4
Battery charge between 60-31%.
High = 5
Battery charge between 100-61%.
Trait Implementations§
Source§impl Clone for BatteryLevel
impl Clone for BatteryLevel
Source§fn clone(&self) -> BatteryLevel
fn clone(&self) -> BatteryLevel
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatteryLevel
impl Debug for BatteryLevel
Source§impl From<BatteryLevel> for u8
impl From<BatteryLevel> for u8
Source§fn from(v: BatteryLevel) -> Self
fn from(v: BatteryLevel) -> Self
Converts to this type from the input type.
Source§impl Ord for BatteryLevel
impl Ord for BatteryLevel
Source§impl PartialEq for BatteryLevel
impl PartialEq for BatteryLevel
Source§impl PartialOrd for BatteryLevel
impl PartialOrd for BatteryLevel
Source§fn partial_cmp(&self, other: &BatteryLevel) -> Option<Ordering>
fn partial_cmp(&self, other: &BatteryLevel) -> Option<Ordering>
Source§impl TryFrom<u8> for BatteryLevel
impl TryFrom<u8> 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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)