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.
Trait Implementations§
source§impl PartialEq<Memory> for Memory
impl PartialEq<Memory> for Memory
impl Eq for Memory
impl StructuralEq for Memory
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more