Consider
pub struct MetricBatch<M: Metric> {
pub metrics: Vec<M>,
}
impl<M: Metric> Metric for MetricBatch<M> {
fn measurement_name(&self) -> &'static str {
// What here?
}
//...
}
In practice since the method returns &'static str, it effectively never depends on &self. If the function is refactored to not take self, then the batch implementation could simply call M::measurement_name().