|
| 1 | +use std::path::PathBuf; |
| 2 | + |
| 3 | +#[derive(Debug, Clone, Serialize, Deserialize, TS)] |
| 4 | +#[cfg_attr(feature = "gen-binds", ts(export))] |
| 5 | +#[serde(rename_all = "camelCase")] |
| 6 | +pub struct Disk { |
| 7 | + pub name: String, |
| 8 | + pub file_system: String, |
| 9 | + pub total_space: u64, |
| 10 | + pub available_space: u64, |
| 11 | + pub mount_point: PathBuf, |
| 12 | + pub is_removable: bool, |
| 13 | + pub read_bytes: u64, |
| 14 | + pub written_bytes: u64, |
| 15 | +} |
| 16 | + |
| 17 | +#[derive(Debug, Clone, Serialize, Deserialize, TS)] |
| 18 | +#[cfg_attr(feature = "gen-binds", ts(export))] |
| 19 | +#[serde(rename_all = "camelCase")] |
| 20 | +pub struct NetworkStatistics { |
| 21 | + pub name: String, |
| 22 | + pub received: u64, |
| 23 | + pub transmitted: u64, |
| 24 | + pub packets_received: u64, |
| 25 | + pub packets_transmitted: u64, |
| 26 | +} |
| 27 | + |
| 28 | +#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)] |
| 29 | +#[cfg_attr(feature = "gen-binds", ts(export))] |
| 30 | +#[serde(rename_all = "camelCase")] |
| 31 | +pub struct Memory { |
| 32 | + pub total: u64, |
| 33 | + pub free: u64, |
| 34 | + pub swap_total: u64, |
| 35 | + pub swap_free: u64, |
| 36 | +} |
| 37 | + |
| 38 | +#[derive(Debug, Clone, Serialize, Deserialize, TS)] |
| 39 | +#[cfg_attr(feature = "gen-binds", ts(export))] |
| 40 | +#[serde(rename_all = "camelCase")] |
| 41 | +pub struct Core { |
| 42 | + pub name: String, |
| 43 | + pub brand: String, |
| 44 | + pub usage: f32, |
| 45 | + pub frequency: u64, |
| 46 | +} |
0 commit comments