pub trait AutotuneLoggerExt {
// Required methods
fn push_short_circuit(&mut self, name: String);
fn push_tuning_step(&mut self, name: String, duration: Duration);
fn set_bounds(&mut self, bounds: Option<Bounds>);
fn set_limit(&mut self, limit: Option<Duration>);
fn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>);
fn log_result<K: AutotuneKey>(
&self,
logger: &mut Logger,
key: &K,
results: &[AutotuneResult],
);
}Expand description
Extension trait for Option<AutotuneLogContext> and Option<&mut AutotuneLogContext>.
Required Methods§
Sourcefn push_short_circuit(&mut self, name: String)
fn push_short_circuit(&mut self, name: String)
Pushes a short circuit event if logging is enabled.
Sourcefn push_tuning_step(&mut self, name: String, duration: Duration)
fn push_tuning_step(&mut self, name: String, duration: Duration)
Pushes a tuning step event if logging is enabled.
Sourcefn set_bounds(&mut self, bounds: Option<Bounds>)
fn set_bounds(&mut self, bounds: Option<Bounds>)
Sets the tuning bounds if logging is active.
Sourcefn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>)
fn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>)
Sets checks if logging is active.
Sourcefn log_result<K: AutotuneKey>(
&self,
logger: &mut Logger,
key: &K,
results: &[AutotuneResult],
)
fn log_result<K: AutotuneKey>( &self, logger: &mut Logger, key: &K, results: &[AutotuneResult], )
Logs the benchmark result if logging is enabled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".