(pool: sqlx::SqlitePool)
| 29 | } |
| 30 | |
| 31 | pub fn with_database(pool: sqlx::SqlitePool) -> Self { |
| 32 | Self { |
| 33 | state: Arc::new(RwLock::new(HashMap::new())), |
| 34 | db: Some(Arc::new(TodoRepository::new(pool))), |
| 35 | bus: None, |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | pub fn with_bus(bus: Arc<Bus>) -> Self { |
| 40 | Self { |