Enum sdl2_sys::SDL_PowerState
source · #[repr(u32)]pub enum SDL_PowerState {
SDL_POWERSTATE_UNKNOWN = 0,
SDL_POWERSTATE_ON_BATTERY = 1,
SDL_POWERSTATE_NO_BATTERY = 2,
SDL_POWERSTATE_CHARGING = 3,
SDL_POWERSTATE_CHARGED = 4,
}
Expand description
The basic state for the system’s power supply.
Variants§
SDL_POWERSTATE_UNKNOWN = 0
< cannot determine power status
SDL_POWERSTATE_ON_BATTERY = 1
< Not plugged in, running on the battery
SDL_POWERSTATE_NO_BATTERY = 2
< Plugged in, no battery available
SDL_POWERSTATE_CHARGING = 3
< Plugged in, charging battery
SDL_POWERSTATE_CHARGED = 4
< Plugged in, battery charged
Trait Implementations§
source§impl Clone for SDL_PowerState
impl Clone for SDL_PowerState
source§fn clone(&self) -> SDL_PowerState
fn clone(&self) -> SDL_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 Hash for SDL_PowerState
impl Hash for SDL_PowerState
source§impl PartialEq for SDL_PowerState
impl PartialEq for SDL_PowerState
source§fn eq(&self, other: &SDL_PowerState) -> bool
fn eq(&self, other: &SDL_PowerState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SDL_PowerState
impl Eq for SDL_PowerState
impl StructuralPartialEq for SDL_PowerState
Auto Trait Implementations§
impl Freeze for SDL_PowerState
impl RefUnwindSafe for SDL_PowerState
impl Send for SDL_PowerState
impl Sync for SDL_PowerState
impl Unpin for SDL_PowerState
impl UnwindSafe for SDL_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