Struct linux_info::memory::Memory [−][src]
Load memory info into this struct.
Implementations
impl Memory
[src]
pub fn read() -> Result<Self>
[src]
Read memory infos from /proc/meminfo.
pub fn values<'a>(&'a self) -> impl Iterator<Item = (&'a str, &'a str)>
[src]
Get all key and values.
pub fn keys<'a>(&'a self) -> impl Iterator<Item = &'a str>
[src]
get all keys.
pub fn value<'a>(&'a self, key: &str) -> Option<&'a str>
[src]
Get value by key.
pub fn size_value<'a>(&'a self, key: &str) -> Option<DataSize>
[src]
Get size by key.
pub fn total_memory(&self) -> Option<DataSize>
[src]
Returns the total memory.
pub fn free_memory(&self) -> Option<DataSize>
[src]
Returns the free memory.
pub fn available_memory(&self) -> Option<DataSize>
[src]
Returns the available memory.
Trait Implementations
impl Clone for Memory
[src]
impl Debug for Memory
[src]
impl Eq for Memory
[src]
impl PartialEq<Memory> for Memory
[src]
impl StructuralEq for Memory
[src]
impl StructuralPartialEq for Memory
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,