pub trait TimeContext {
// Required methods
fn label(caller_context: &CallerContext) -> String;
fn accumulate(milliseconds: &f64);
// Provided method
fn total_time() -> f64 { ... }
}Expand description
Trait providing the context of actions to be carried by the timer
Required Methods§
Sourcefn accumulate(milliseconds: &f64)
fn accumulate(milliseconds: &f64)
Includes de logic to accumulate the time in a global variable
Provided Methods§
Sourcefn total_time() -> f64
fn total_time() -> f64
Returns the total time spent in this context
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.