1use std::{
4 collections::{HashMap, HashSet},
5 sync::{Arc, Mutex},
6 time::Duration,
7};
8
9pub type ReactiveContextSet = Arc<Mutex<HashSet<ReactiveContext>>>;
11
12pub type ReactiveContextRegistry = Arc<Mutex<HashMap<String, ReactiveContextSet>>>;
14
15pub type IntervalTaskRegistry = Arc<Mutex<HashMap<String, (Duration, ())>>>;
18
19#[derive(Debug, Clone, Hash, PartialEq, Eq)]
21pub struct ReactiveContext {
22 pub id: String,
23}
24
25impl ReactiveContext {
26 pub fn new(id: String) -> Self {
27 Self { id }
28 }
29}