feat: with async commands instead of inline mutations phew.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-05-12 21:07:21 +02:00
parent 2d63d3ad4c
commit 9bb5bc9e87
19 changed files with 589 additions and 141 deletions

View File

@@ -24,17 +24,23 @@ impl State {
let engine = storage.load()?;
let events = Events::default();
let engine = SharedEngine::from(engine);
let querier = match backend {
Backend::Local => Querier::local(&engine),
Backend::Remote => Querier::remote().await?,
};
let commander = match backend {
Backend::Local => Commander::local(engine.clone(), storage.clone(), events.clone())?,
Backend::Remote => todo!(),
};
Ok(Self {
engine: engine.clone(),
storage: storage.clone(),
events: events.clone(),
commander: Commander::new(engine.clone(), storage, events)?,
commander,
querier,
})
}