pub struct AllocationGroupToken { /* private fields */ }
Expand description
A token associated with a specific allocation group.
Used to attribute allocations and deallocations to a specific group with a scope guard TrackingGuard
, or
through helpers provided by the Track
trait.
Implementations§
Source§impl AllocationGroupToken
impl AllocationGroupToken
Sourcepub fn enter(&self) -> TrackingGuard<'_>
pub fn enter(&self) -> TrackingGuard<'_>
Enters this allocation group, returning a guard that will exit the allocation group when dropped.
Trait Implementations§
Source§impl Clone for AllocationGroupToken
impl Clone for AllocationGroupToken
Source§fn clone(&self) -> AllocationGroupToken
fn clone(&self) -> AllocationGroupToken
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 moreimpl Copy for AllocationGroupToken
impl Send for AllocationGroupToken
impl Sync for AllocationGroupToken
Auto Trait Implementations§
impl Freeze for AllocationGroupToken
impl RefUnwindSafe for AllocationGroupToken
impl Unpin for AllocationGroupToken
impl UnwindSafe for AllocationGroupToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self> ⓘ
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self> ⓘ
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more