Expand description
Used for storing total or available RAM and Swap.
Fields
ram: f32swap: f32Implementations
sourceimpl Memory
impl Memory
sourcepub fn format(mem_in_kb: f32) -> String
pub fn format(mem_in_kb: f32) -> String
Returns argument, given in kb, formatted to suitable unit.
sourcepub fn save_with_unit(&mut self)
pub fn save_with_unit(&mut self)
Formats RAM and Swap to suitable units, saving the result to struct’s fields for cheaper usage
sourcepub fn get_ram_with_unit(&self) -> &str
pub fn get_ram_with_unit(&self) -> &str
Returns the RAM with unit as a &str
sourcepub fn get_swap_with_unit(&self) -> &str
pub fn get_swap_with_unit(&self) -> &str
Returns the Swap with unit as a &str
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more