1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
use std::collections::{HashMap, HashSet}; use nson::{ Message, message_id::MessageId }; use crate::Wire; #[derive(Debug)] pub struct Slot { pub token: usize, pub id: MessageId, pub root: bool, pub chans: HashMap<String, HashSet<String>>, pub share_chans: HashMap<String, HashSet<String>>, pub wire: Wire<Message> } impl Slot { pub fn new(token: usize, id: MessageId, root: bool, wire: Wire<Message>) -> Self { Self { token, id, root, chans: HashMap::new(), share_chans: HashMap::new(), wire } } }