pub trait MetricsHandler: Send {
// Required methods
fn handle(&mut self, event: &dyn SimulationEvent);
fn get_value(&self) -> f64;
fn as_any(&self) -> &dyn Any;
}
Expand description
The MetricsHandler
trait defines the interface for handling simulation events and extracting metric values.
Implementors of this trait should process the events and update their internal state to compute the desired metric.