shutdown

Function shutdown 

Source
pub fn shutdown() -> ShutdownResult
Expand description

Calls the OS-specific function to shut down the machine.

Examples found in repository?
examples/example_shutdown.rs (line 6)
5fn main() {
6    match shutdown() {
7        Ok(_) => println!("Shutting down, bye!"),
8        Err(error) => eprintln!("Failed to shut down: {}", error),
9    }
10}