#[non_exhaustive]pub enum ServiceControl {
Show 17 variants
Continue,
Interrogate,
NetBindAdd,
NetBindDisable,
NetBindEnable,
NetBindRemove,
ParamChange,
Pause,
Preshutdown,
Shutdown,
Stop,
HardwareProfileChange(HardwareProfileChangeParam),
PowerEvent(PowerEventParam),
SessionChange(SessionChangeParam),
TimeChange,
TriggerEvent,
UserEvent(UserEventCode),
}Expand description
Enum describing the service control operations.
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.
Continue
Interrogate
NetBindAdd
NetBindDisable
NetBindEnable
NetBindRemove
ParamChange
Pause
Preshutdown
Shutdown
Stop
HardwareProfileChange(HardwareProfileChangeParam)
PowerEvent(PowerEventParam)
SessionChange(SessionChangeParam)
TimeChange
TriggerEvent
UserEvent(UserEventCode)
Implementations§
Source§impl ServiceControl
impl ServiceControl
Sourcepub unsafe fn from_raw(
raw: u32,
event_type: u32,
event_data: *mut c_void,
) -> Result<Self, ParseRawError>
pub unsafe fn from_raw( raw: u32, event_type: u32, event_data: *mut c_void, ) -> Result<Self, ParseRawError>
Convert to ServiceControl from parameters received by service_control_handler
§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
pub fn raw_service_control_type(&self) -> u32
Trait Implementations§
Source§impl Clone for ServiceControl
impl Clone for ServiceControl
Source§fn clone(&self) -> ServiceControl
fn clone(&self) -> ServiceControl
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 ServiceControl
impl Debug for ServiceControl
Source§impl Hash for ServiceControl
impl Hash for ServiceControl
Source§impl PartialEq for ServiceControl
impl PartialEq for ServiceControl
impl Copy for ServiceControl
impl Eq for ServiceControl
impl StructuralPartialEq for ServiceControl
Auto Trait Implementations§
impl Freeze for ServiceControl
impl RefUnwindSafe for ServiceControl
impl Send for ServiceControl
impl Sync for ServiceControl
impl Unpin for ServiceControl
impl UnwindSafe for ServiceControl
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