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