Struct linux_info::memory::Memory
source · pub struct Memory { /* private fields */ }Expand description
Read memory information from /proc/meminfo.
Implementations§
source§impl Memory
impl Memory
sourcepub fn values<'a>(&'a self) -> impl Iterator<Item = (&'a str, &'a str)>
pub fn values<'a>(&'a self) -> impl Iterator<Item = (&'a str, &'a str)>
Get all key and values.
sourcepub fn size_value<'a>(&'a self, key: &str) -> Option<DataSize>
pub fn size_value<'a>(&'a self, key: &str) -> Option<DataSize>
Get size by key.
sourcepub fn total_memory(&self) -> Option<DataSize>
pub fn total_memory(&self) -> Option<DataSize>
Returns the total memory.
sourcepub fn free_memory(&self) -> Option<DataSize>
pub fn free_memory(&self) -> Option<DataSize>
Returns the free memory.
sourcepub fn available_memory(&self) -> Option<DataSize>
pub fn available_memory(&self) -> Option<DataSize>
Returns the available memory.