Query store chronologically

This commit is contained in:
Joscha 2022-08-03 01:45:43 +02:00
parent 01ee4b4ce8
commit 1f19b4cdf5
3 changed files with 205 additions and 21 deletions

View file

@ -120,8 +120,12 @@ impl<M: Msg> Tree<M> {
pub trait MsgStore<M: Msg> {
async fn path(&self, id: &M::Id) -> Path<M::Id>;
async fn tree(&self, tree_id: &M::Id) -> Tree<M>;
async fn prev_tree_id(&self, tree_id: &M::Id) -> Option<M::Id>;
async fn next_tree_id(&self, tree_id: &M::Id) -> Option<M::Id>;
async fn first_tree_id(&self) -> Option<M::Id>;
async fn last_tree_id(&self) -> Option<M::Id>;
async fn prev_tree_id(&self, tree_id: &M::Id) -> Option<M::Id>;
async fn next_tree_id(&self, tree_id: &M::Id) -> Option<M::Id>;
async fn oldest_msg_id(&self) -> Option<M::Id>;
async fn newest_msg_id(&self) -> Option<M::Id>;
async fn older_msg_id(&self, id: &M::Id) -> Option<M::Id>;
async fn newer_msg_id(&self, id: &M::Id) -> Option<M::Id>;
}