blob: b6bb46934f03b12fd3893c83f7ab42c3675dabed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "linux")]
pub use self::linux::*;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "macos")]
pub use self::macos::*;
#[derive(PartialEq, Eq, Debug, Clone)]
pub enum PowerSupplyType {
AC,
Battery,
}
#[derive(Debug, Clone)]
pub struct PowerSupplyInfo {
pub name: String,
pub ty: PowerSupplyType,
pub energy_now: Option<u64>,
pub energy_full: Option<u64>,
pub online: Option<bool>,
}
|