pub struct MemoryMonitor { /* private fields */ }Expand description
Memory monitor
Implementations§
Source§impl MemoryMonitor
impl MemoryMonitor
Sourcepub fn record(&mut self, snapshot: MemorySnapshot)
pub fn record(&mut self, snapshot: MemorySnapshot)
Records a memory snapshot
Sourcepub fn record_current(&mut self, timestamp: f64)
pub fn record_current(&mut self, timestamp: f64)
Records current memory usage
Sourcepub fn latest(&self) -> Option<&MemorySnapshot>
pub fn latest(&self) -> Option<&MemorySnapshot>
Returns the latest snapshot
Sourcepub fn stats(&self) -> MemoryStats
pub fn stats(&self) -> MemoryStats
Returns memory statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryMonitor
impl RefUnwindSafe for MemoryMonitor
impl Send for MemoryMonitor
impl Sync for MemoryMonitor
impl Unpin for MemoryMonitor
impl UnsafeUnpin for MemoryMonitor
impl UnwindSafe for MemoryMonitor
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