Expand description
§Windows services
The windows-services crate provides a simple and safe way to implement Windows services in Rust.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-services]
version = "0.24"Use the Windows services support as needed. Here is how you might write a simple Windows services process:
fn main() {
windows_services::Service::new()
.can_pause()
.can_stop()
.run(|command| {
// Respond to service commands...
})
}Structs§
- Service
- A service builder, providing control over what commands the service supports before the service begins to run.
Enums§
- Command
- The commands are sent by the service control manager to the service through the closure or callback
passed to the service
runmethod. - State
- Possible service states including transitional states.