Enum winsafe::SvcCtlPowerEvent
source · pub enum SvcCtlPowerEvent<'a> {
StatusChange,
ResumeAutomatic,
ResumeSuspend,
Suspend,
PowerSettingChange(&'a POWERBROADCAST_SETTING),
}
Available on crate feature
kernel
only.Expand description
Notification content for SvcCtl
.
Variants§
Implementations§
source§impl<'a> SvcCtlPowerEvent<'a>
impl<'a> SvcCtlPowerEvent<'a>
sourcepub unsafe fn from_raw(event: PBT, event_data: *mut c_void) -> Self
pub unsafe fn from_raw(event: PBT, event_data: *mut c_void) -> Self
Constructs the enum according to the raw data.
§Panics
Panics if event
is invalid.
§Safety
This enum is constructed when building the output of
HSERVICESTATUS::RegisterServiceCtrlHandlerEx
callback, make sure all parameters are correct.
Auto Trait Implementations§
impl<'a> Freeze for SvcCtlPowerEvent<'a>
impl<'a> RefUnwindSafe for SvcCtlPowerEvent<'a>
impl<'a> Send for SvcCtlPowerEvent<'a>
impl<'a> Sync for SvcCtlPowerEvent<'a>
impl<'a> Unpin for SvcCtlPowerEvent<'a>
impl<'a> UnwindSafe for SvcCtlPowerEvent<'a>
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