pub trait AlgorithmIterationMetrics: Default {
// Required methods
fn merge(&mut self, other: Self);
fn append_records(
&self,
iteration: usize,
output: &mut Vec<AlgorithmMetricRecord>,
);
}Expand description
Algorithm-owned iteration metrics.
Implementations define both deterministic batch merging and conversion to generic persisted records. This deliberately avoids a central algorithm or metric enum.
Required Methods§
Sourcefn merge(&mut self, other: Self)
fn merge(&mut self, other: Self)
Deterministically accumulates metrics from another batch in schedule order.
Sourcefn append_records(
&self,
iteration: usize,
output: &mut Vec<AlgorithmMetricRecord>,
)
fn append_records( &self, iteration: usize, output: &mut Vec<AlgorithmMetricRecord>, )
Appends stable scalar records for a one-based completed iteration.
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.