Enum windows_service::service::PowerEventParam [−][src]
pub enum PowerEventParam { PowerStatusChange, ResumeAutomatic, ResumeSuspend, Suspend, PowerSettingChange(PowerBroadcastSetting), BatteryLow, OemEvent, QuerySuspend, QuerySuspendFailed, ResumeCritical, }
Expand description
Enum describing the PowerEvent event
Variants
Tuple Fields of PowerSettingChange
Implementations
pub 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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for PowerEventParam
impl Send for PowerEventParam
impl Sync for PowerEventParam
impl Unpin for PowerEventParam
impl UnwindSafe for PowerEventParam
Blanket Implementations
Mutably borrows from an owned value. Read more