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§
impl Eq for Memory
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl Freeze for Memory
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