Skip to main content

wayle_sysinfo/types/
memory.rs

1/// Memory metrics snapshot.
2#[derive(Debug, Clone, Default, PartialEq)]
3pub struct MemoryData {
4    /// Total physical memory in bytes.
5    pub total_bytes: u64,
6
7    /// Used memory in bytes.
8    pub used_bytes: u64,
9
10    /// Available memory in bytes.
11    pub available_bytes: u64,
12
13    /// Memory usage percentage (0.0 - 100.0).
14    pub usage_percent: f32,
15
16    /// Total swap space in bytes.
17    pub swap_total_bytes: u64,
18
19    /// Used swap in bytes.
20    pub swap_used_bytes: u64,
21
22    /// Swap usage percentage (0.0 - 100.0).
23    pub swap_percent: f32,
24}