Skip to main content

Profiler

Trait Profiler 

Source
pub trait Profiler {
    // Required method
    fn start_pass(&self, pass: Pass) -> Box<dyn Any>;
}
Expand description

A profiler.

Required Methods§

Source

fn start_pass(&self, pass: Pass) -> Box<dyn Any>

Start a profiling pass.

Will return a token which when dropped indicates the end of the pass.

Multiple passes can be active at the same time, but they must be started and stopped in a LIFO fashion.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Profiler for DefaultProfiler

Available on crate feature timing only.