Enum windows_service::service::PowerEventParam
source · pub enum PowerEventParam {
PowerStatusChange,
ResumeAutomatic,
ResumeSuspend,
Suspend,
PowerSettingChange(PowerBroadcastSetting),
BatteryLow,
OemEvent,
QuerySuspend,
QuerySuspendFailed,
ResumeCritical,
}Expand description
Enum describing the PowerEvent event
Variants§
PowerStatusChange
ResumeAutomatic
ResumeSuspend
Suspend
PowerSettingChange(PowerBroadcastSetting)
BatteryLow
OemEvent
QuerySuspend
QuerySuspendFailed
ResumeCritical
Implementations§
source§impl PowerEventParam
impl PowerEventParam
sourcepub unsafe fn from_event(
event_type: u32,
event_data: *mut c_void
) -> Result<Self, ParseRawError>
pub unsafe fn from_event( event_type: u32, event_data: *mut c_void ) -> Result<Self, ParseRawError>
Extract PowerEventParam from event_type and event_data
Safety
Invalid event_data pointer may cause undefined behavior in some circumstances.
Please refer to MSDN for more info about the requirements:
https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nc-winsvc-lphandler_function_ex
Trait Implementations§
source§impl Clone for PowerEventParam
impl Clone for PowerEventParam
source§fn clone(&self) -> PowerEventParam
fn clone(&self) -> PowerEventParam
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 PowerEventParam
impl Debug for PowerEventParam
source§impl Hash for PowerEventParam
impl Hash for PowerEventParam
source§impl PartialEq<PowerEventParam> for PowerEventParam
impl PartialEq<PowerEventParam> for PowerEventParam
source§fn eq(&self, other: &PowerEventParam) -> bool
fn eq(&self, other: &PowerEventParam) -> bool
This method tests for
self and other values to be equal, and is used
by ==.