use std::collections::HashMap; use tokio::sync::broadcast::{Receiver, Sender}; use crate::{ messages::{repository::RepositoryMessage, MessageKind}, model::{instance::Instance, repository::Repository, user::User}, }; #[derive(Default)] pub struct Listeners { listeners: HashMap, Receiver)>, } impl Listeners { pub fn add( &mut self, instance: Option, user: Option, repository: Option, ) -> Receiver { todo!() } } #[derive(Hash)] pub struct ListenerTarget { pub instance: Option, pub user: Option, pub repository: Option, }