pub struct AllocationGroupRegistry { /* private fields */ }
Expand description
A registry of allocation groups and the statistics for each of them.
Implementations§
Source§impl AllocationGroupRegistry
impl AllocationGroupRegistry
Sourcepub fn allocator_installed() -> bool
pub fn allocator_installed() -> bool
Returns true
if TrackingAllocator
is installed as the global allocator.
Sourcepub fn register_allocation_group<S>(&self, name: S) -> AllocationGroupToken
pub fn register_allocation_group<S>(&self, name: S) -> AllocationGroupToken
Registers a new allocation group with the given name.
Returns an AllocationGroupToken
that can be used to attribute allocations and deallocations to the
newly-created allocation group.
Sourcepub fn visit_allocation_groups<F>(&self, f: F)
pub fn visit_allocation_groups<F>(&self, f: F)
Visits all allocation groups in the registry and calls the given closure with their names and statistics.
Auto Trait Implementations§
impl !Freeze for AllocationGroupRegistry
impl RefUnwindSafe for AllocationGroupRegistry
impl Send for AllocationGroupRegistry
impl Sync for AllocationGroupRegistry
impl Unpin for AllocationGroupRegistry
impl UnwindSafe for AllocationGroupRegistry
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> 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