(bus: Arc<Bus>)
| 37 | } |
| 38 | |
| 39 | pub fn with_bus(bus: Arc<Bus>) -> Self { |
| 40 | Self { |
| 41 | state: Arc::new(RwLock::new(HashMap::new())), |
| 42 | db: None, |
| 43 | bus: Some(bus), |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | pub async fn update(&self, session_id: &str, todos: Vec<TodoInfo>) { |
| 48 | let todos_payload = todos.clone(); |