pub trait Topic {
// Required methods
fn get_env(&self) -> &Env;
fn get_producer_db(&self) -> Database<U64<BE>, U64<BE>>;
fn get_consumer_db(&self) -> Database<Str, U64<BE>>;
// Provided method
fn lag(&self) -> Result<u64, Box<dyn Error>> { ... }
}