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 active(&self) -> Information
fn active(&self) -> Information
Returns memory currently in use or very recently used, and so it is in RAM.
Source§fn inactive(&self) -> Information
fn inactive(&self) -> Information
Returns memory that is marked as not used.
Source§fn wire(&self) -> Information
fn wire(&self) -> Information
Returns memory that is marked to always stay in RAM. It is never moved to disk.
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