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§
Source§impl MemoryExt for Memory
impl MemoryExt for Memory
Source§fn used(&self) -> Information
fn used(&self) -> Information
The amount of physical RAM used. Read more
Source§fn buffers(&self) -> Information
fn buffers(&self) -> Information
The amount of physical RAM used for file buffers.
Source§fn cached(&self) -> Information
fn cached(&self) -> Information
The amount of physical RAM used as cache memory.
The amount of memory that may be simultaneously accessed by multiple processes.
Source§fn active(&self) -> Information
fn active(&self) -> Information
The total amount of buffer or page cache memory, that is in active use. Read more
Source§fn inactive(&self) -> Information
fn inactive(&self) -> Information
The total amount of buffer or page cache memory, that are free and available. Read more
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