Make store room-specific

This commit is contained in:
Joscha 2022-06-15 11:29:02 +02:00
parent 15213f8003
commit 23c551a5b7
7 changed files with 85 additions and 173 deletions

View file

@ -103,10 +103,10 @@ impl<M: Msg> Tree<M> {
#[async_trait]
pub trait MsgStore<M: Msg> {
async fn path(&self, room: &str, id: &M::Id) -> Path<M::Id>;
async fn tree(&self, room: &str, root: &M::Id) -> Tree<M>;
async fn prev_tree(&self, room: &str, tree: &M::Id) -> Option<M::Id>;
async fn next_tree(&self, room: &str, tree: &M::Id) -> Option<M::Id>;
async fn first_tree(&self, room: &str) -> Option<M::Id>;
async fn last_tree(&self, room: &str) -> Option<M::Id>;
async fn path(&self, id: &M::Id) -> Path<M::Id>;
async fn tree(&self, root: &M::Id) -> Tree<M>;
async fn prev_tree(&self, tree: &M::Id) -> Option<M::Id>;
async fn next_tree(&self, tree: &M::Id) -> Option<M::Id>;
async fn first_tree(&self) -> Option<M::Id>;
async fn last_tree(&self) -> Option<M::Id>;
}