pub struct Memory(/* private fields */);
Expand description
Physical memory statistics.
Only three metrics are guaranteed to be cross-platform,
for other metrics see MemoryExt
traits in the os submodules.
Implementations§
Source§impl Memory
impl Memory
Sourcepub fn total(&self) -> Information
pub fn total(&self) -> Information
The total amount of physical memory.
Sourcepub fn available(&self) -> Information
pub fn available(&self) -> Information
The amount of memory that can be given instantly to processes without the system going into swap.
Sourcepub fn free(&self) -> Information
pub fn free(&self) -> Information
The amount of memory not being used at all (zeroed) that is readily available; note that this does not reflect the actual memory available.
Trait Implementations§
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