pub struct MemoryProfile {
pub peak_bytes: usize,
pub current_bytes: usize,
pub allocations: usize,
pub deallocations: usize,
}Expand description
Memory usage statistics
Fields§
§peak_bytes: usize§current_bytes: usize§allocations: usize§deallocations: usizeImplementations§
Source§impl MemoryProfile
impl MemoryProfile
pub fn new() -> Self
pub fn record_allocation(&mut self, bytes: usize)
pub fn record_deallocation(&mut self, bytes: usize)
Trait Implementations§
Source§impl Clone for MemoryProfile
impl Clone for MemoryProfile
Source§fn clone(&self) -> MemoryProfile
fn clone(&self) -> MemoryProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryProfile
impl Debug for MemoryProfile
Source§impl Default for MemoryProfile
impl Default for MemoryProfile
Source§fn default() -> MemoryProfile
fn default() -> MemoryProfile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryProfile
impl RefUnwindSafe for MemoryProfile
impl Send for MemoryProfile
impl Sync for MemoryProfile
impl Unpin for MemoryProfile
impl UnwindSafe for MemoryProfile
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