[][src]Enum windows_service::service::PowerEventParam

pub enum PowerEventParam {
    PowerStatusChange,
    ResumeAutomatic,
    ResumeSuspend,
    Suspend,
    PowerSettingChange(PowerBroadcastSetting),
    BatteryLow,
    OemEvent,
    QuerySuspend,
    QuerySuspendFailed,
    ResumeCritical,
}

Enum describing the PowerEvent event

Variants

PowerStatusChange
ResumeAutomatic
ResumeSuspend
Suspend
PowerSettingChange(PowerBroadcastSetting)
BatteryLow
OemEvent
QuerySuspend
QuerySuspendFailed
ResumeCritical

Implementations

impl PowerEventParam[src]

pub unsafe fn from_event(
    event_type: u32,
    event_data: *mut c_void
) -> Result<Self, ParseRawError>
[src]

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

impl Clone for PowerEventParam[src]

impl Copy for PowerEventParam[src]

impl Debug for PowerEventParam[src]

impl Eq for PowerEventParam[src]

impl Hash for PowerEventParam[src]

impl PartialEq<PowerEventParam> for PowerEventParam[src]

impl StructuralEq for PowerEventParam[src]

impl StructuralPartialEq for PowerEventParam[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.