system-utils 0.1.4

Cross-platform utilities for interacting with operating system features such as audio control, power management, system information, hardware monitoring, and device enumeration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::prelude::*;

/// The power action type
#[derive(Debug, Clone, Copy, Display, Eq, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
#[display(rename = "lowercase")]
pub enum PowerMode {
    Shutdown,
    Suspend,
    Reboot,
    Lock,
    Logout,
}