pub trait DataConsumer<T> { // Required method fn consume(&mut self, data: T); // Provided method fn get_stats(&self) -> Option<Value> { ... } }