Enum windows_service::service::ServiceControl
source · pub enum ServiceControl {
Show 16 variants
Continue,
Interrogate,
NetBindAdd,
NetBindDisable,
NetBindEnable,
NetBindRemove,
ParamChange,
Pause,
Preshutdown,
Shutdown,
Stop,
HardwareProfileChange(HardwareProfileChangeParam),
PowerEvent(PowerEventParam),
SessionChange(SessionChangeParam),
TimeChange,
TriggerEvent,
}Expand description
Enum describing the service control operations.
Variants§
Continue
Interrogate
NetBindAdd
NetBindDisable
NetBindEnable
NetBindRemove
ParamChange
Pause
Preshutdown
Shutdown
Stop
HardwareProfileChange(HardwareProfileChangeParam)
PowerEvent(PowerEventParam)
SessionChange(SessionChangeParam)
TimeChange
TriggerEvent
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 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 ServiceControl
impl Debug for ServiceControl
source§impl Hash for ServiceControl
impl Hash for ServiceControl
source§impl PartialEq<ServiceControl> for ServiceControl
impl PartialEq<ServiceControl> for ServiceControl
source§fn eq(&self, other: &ServiceControl) -> bool
fn eq(&self, other: &ServiceControl) -> bool
This method tests for
self and other values to be equal, and is used
by ==.