Trait TraceAlloc

Source
pub trait TraceAlloc: Sized {
    // Provided method
    fn count_allocations(self) -> TraceAllocator<Self>  { ... }
}
Expand description

measure allocations for a future

Provided Methods§

Source

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.

Implementors§

Source§

impl<T: Sized + Future<Output = O>, O> TraceAlloc for T