Retrieve individual messages from store

This commit is contained in:
Joscha 2022-08-29 22:57:02 +02:00
parent 7e086258b6
commit bb542ae08e
3 changed files with 54 additions and 0 deletions

View file

@ -133,6 +133,7 @@ impl<M: Msg> Tree<M> {
#[async_trait]
pub trait MsgStore<M: Msg> {
async fn path(&self, id: &M::Id) -> Path<M::Id>;
async fn msg(&self, id: &M::Id) -> Option<M>;
async fn tree(&self, tree_id: &M::Id) -> Tree<M>;
async fn first_tree_id(&self) -> Option<M::Id>;
async fn last_tree_id(&self) -> Option<M::Id>;