Struct linux_info::memory::Memory[][src]

pub struct Memory { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.