pub trait TraceAlloc: Sized {
// Provided method
fn count_allocations(self) -> TraceAllocator<Self> ⓘ { ... }
}
Expand description
measure allocations for a future
Provided Methods§
Sourcefn count_allocations(self) -> TraceAllocator<Self> ⓘ
fn count_allocations(self) -> TraceAllocator<Self> ⓘ
Wraps the future and returns a new one that will resolve
to (max allocations, future result)
You can measure multiple nested futures
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.