#[non_exhaustive]pub enum PowerBroadcastSetting {
AcdcPowerSource(PowerSource),
BatteryPercentageRemaining(u32),
ConsoleDisplayState(DisplayState),
GlobalUserPresence(UserStatus),
IdleBackgroundTask,
MonitorPowerOn(MonitorState),
PowerSavingStatus(BatterySaverState),
PowerSchemePersonality(PowerSchemePersonality),
SystemAwayMode(AwayModeState),
LidSwitchStateChange(LidSwitchStateChange),
}Expand description
Struct converted from Power::POWERBROADCAST_SETTING
Please refer to MSDN for more info about the data members: https://docs.microsoft.com/en-us/windows/win32/power/power-setting-guid
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.
AcdcPowerSource(PowerSource)
BatteryPercentageRemaining(u32)
ConsoleDisplayState(DisplayState)
GlobalUserPresence(UserStatus)
IdleBackgroundTask
MonitorPowerOn(MonitorState)
PowerSavingStatus(BatterySaverState)
PowerSchemePersonality(PowerSchemePersonality)
SystemAwayMode(AwayModeState)
LidSwitchStateChange(LidSwitchStateChange)
Implementations§
Source§impl PowerBroadcastSetting
impl PowerBroadcastSetting
Sourcepub unsafe fn from_raw(
raw: *mut c_void,
) -> Result<PowerBroadcastSetting, ParseRawError>
pub unsafe fn from_raw( raw: *mut c_void, ) -> Result<PowerBroadcastSetting, ParseRawError>
Extract PowerBroadcastSetting from raw
§Safety
The raw must be a valid Power::POWERBROADCAST_SETTING pointer.
Otherwise, it is undefined behavior.
Trait Implementations§
Source§impl Clone for PowerBroadcastSetting
impl Clone for PowerBroadcastSetting
Source§fn clone(&self) -> PowerBroadcastSetting
fn clone(&self) -> PowerBroadcastSetting
Returns a duplicate 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 PowerBroadcastSetting
impl Debug for PowerBroadcastSetting
Source§impl Hash for PowerBroadcastSetting
impl Hash for PowerBroadcastSetting
Source§impl PartialEq for PowerBroadcastSetting
impl PartialEq for PowerBroadcastSetting
impl Copy for PowerBroadcastSetting
impl Eq for PowerBroadcastSetting
impl StructuralPartialEq for PowerBroadcastSetting
Auto Trait Implementations§
impl Freeze for PowerBroadcastSetting
impl RefUnwindSafe for PowerBroadcastSetting
impl Send for PowerBroadcastSetting
impl Sync for PowerBroadcastSetting
impl Unpin for PowerBroadcastSetting
impl UnwindSafe for PowerBroadcastSetting
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