pub trait ComparisonGenerator: Debug + Sync + Send + ComparisonGeneratorClone {
fn name(&self) -> &str;
fn generate(&mut self, segments: &mut [Segment], attempts: &[Attempt]);
}
Expand description
A Comparison Generator automatically generates a comparison based on what kind of generator it is. Comparison Generators stored in a Run automatically get called between all attempts to refresh the comparison’s information.
Required Methods§
sourcefn generate(&mut self, segments: &mut [Segment], attempts: &[Attempt])
fn generate(&mut self, segments: &mut [Segment], attempts: &[Attempt])
Generate the comparison. The comparison generator is expected to modify the comparison’s times for each segment. The Attempt History is provided, in case the comparison generator requires information from the previous attempts.