pub struct AllocationScopeGuard { /* private fields */ }Expand description
RAII scope guard enabling CountingAllocator tracking for the lifetime of a benchmark loop.
Implementations§
Source§impl AllocationScopeGuard
Scoped allocation tracking lifecycle for AllocationScopeGuard.
impl AllocationScopeGuard
Scoped allocation tracking lifecycle for AllocationScopeGuard.
Sourcepub fn enter() -> Self
pub fn enter() -> Self
Enters a serialized allocation tracking scope, resetting live-delta and peak counters on outermost entry.
§Returns
Self- Active RAII scope guard that disables tracking on drop.
Sourcepub fn elapsed_snapshot(&self) -> AllocationSnapshot
pub fn elapsed_snapshot(&self) -> AllocationSnapshot
Trait Implementations§
Source§impl Debug for AllocationScopeGuard
impl Debug for AllocationScopeGuard
Auto Trait Implementations§
impl !Send for AllocationScopeGuard
impl Forget for AllocationScopeGuard
impl Freeze for AllocationScopeGuard
impl Move for AllocationScopeGuard
impl RefUnwindSafe for AllocationScopeGuard
impl Sync for AllocationScopeGuard
impl Unpin for AllocationScopeGuard
impl UnsafeUnpin for AllocationScopeGuard
impl UnwindSafe for AllocationScopeGuard
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