tauri_plugin_system_info/model/
aggregate.rs

1// This file contains System Info Aggregation structs
2use crate::model::common::*;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Serialize, Deserialize)]
6pub struct AllSystemInfo {
7    pub hostname: Option<String>,
8    pub kernel_version: Option<String>,
9    pub os_version: Option<String>,
10    pub name: Option<String>,
11    pub total_memory: u64,
12    pub used_memory: u64,
13    pub total_swap: u64,
14    pub used_swap: u64,
15    pub cpus: Vec<Cpu>,
16    pub cpu_count: usize,
17    pub disks: Vec<Disk>,
18    pub networks: Vec<Network>,
19    pub components: Vec<Component>,
20    pub processes: Vec<Process>,
21    pub batteries: Vec<Battery>,
22}
23
24#[derive(Debug, Serialize, Deserialize)]
25pub struct StaticInfo {
26    pub hostname: Option<String>,
27    pub kernel_version: Option<String>,
28    pub os_version: Option<String>,
29    pub name: Option<String>,
30}
31
32#[derive(Debug, Serialize, Deserialize)]
33pub struct MemoryInfo {
34    pub total_memory: u64,
35    pub used_memory: u64,
36    pub total_swap: u64,
37    pub used_swap: u64,
38}
39
40#[derive(Debug, Serialize, Deserialize)]
41pub struct CpuInfo {
42    pub cpus: Vec<Cpu>,
43    pub cpu_count: usize,
44}