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, }