Enum rich_sdl2_rust::power::PowerState
source · #[non_exhaustive]pub enum PowerState {
Unknown,
OnBattery,
NoBattery,
Charging,
Charged,
}
Expand description
A state of power in the system.
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.
Unknown
A state cannot be known.
OnBattery
It has a battery, not charging.
NoBattery
It has no batteries.
Charging
It has a battery, charging.
Charged
It has a battery, completed to charge.
Trait Implementations§
source§impl Clone for PowerState
impl Clone for PowerState
source§fn clone(&self) -> PowerState
fn clone(&self) -> PowerState
Returns a copy 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 moresource§impl Debug for PowerState
impl Debug for PowerState
source§impl From<u32> for PowerState
impl From<u32> for PowerState
source§impl PartialEq for PowerState
impl PartialEq for PowerState
source§fn eq(&self, other: &PowerState) -> bool
fn eq(&self, other: &PowerState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PowerState
impl Eq for PowerState
impl StructuralPartialEq for PowerState
Auto Trait Implementations§
impl RefUnwindSafe for PowerState
impl Send for PowerState
impl Sync for PowerState
impl Unpin for PowerState
impl UnwindSafe for PowerState
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