Struct async_alloc_counter::AsyncAllocatorCounter [−][src]
pub struct AsyncAllocatorCounter<T> {
pub allocator: T,
}Expand description
Allocator wrapper
this allocator will measure how much data is allocated in the future that is currently executed
Set t up as follows:
use async_alloc_counter::AsyncAllocatorCounter;
use std::{alloc::System, time::Duration};
#[global_allocator]
static GLOBAL: AsyncAllocatorCounter<System> = AsyncAllocatorCounter { allocator: System };Fields
allocator: TTrait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for AsyncAllocatorCounter<T> where
T: RefUnwindSafe,
impl<T> Send for AsyncAllocatorCounter<T> where
T: Send,
impl<T> Sync for AsyncAllocatorCounter<T> where
T: Sync,
impl<T> Unpin for AsyncAllocatorCounter<T> where
T: Unpin,
impl<T> UnwindSafe for AsyncAllocatorCounter<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
fn count_allocations(self) -> TraceAllocator<Self>ⓘNotable traits for TraceAllocator<T>impl<T: Future> Future for TraceAllocator<T> type Output = (usize, T::Output);
fn count_allocations(self) -> TraceAllocator<Self>ⓘNotable traits for TraceAllocator<T>impl<T: Future> Future for TraceAllocator<T> type Output = (usize, T::Output);
Notable traits for TraceAllocator<T>
impl<T: Future> Future for TraceAllocator<T> type Output = (usize, T::Output);Wraps the future and returns a new one that will resolve
to (max allocations, future result) Read more