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§fn from(raw: SDL_PowerState) -> Self
fn from(raw: SDL_PowerState) -> Self
Converts to this type from the input type.
source§impl PartialEq<PowerState> for PowerState
impl PartialEq<PowerState> 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 ==
.