#[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 for PowerState
impl PartialEq for PowerState
impl Copy for PowerState
impl Eq for PowerState
impl StructuralPartialEq for PowerState
Auto Trait Implementations§
impl Freeze for PowerState
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