diff options
author | Vika <vika@fireburn.ru> | 2024-12-31 01:03:54 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-12-31 01:03:54 +0300 |
commit | 2e70534967447e1c34c68d21444a81b851bd4d13 (patch) | |
tree | e528acba8684fcb2ea67cc87a40836b2d5767203 /src/database/mod.rs | |
parent | fecd5b75396f02be26d75aa5db48aaef723298c5 (diff) | |
download | kittybox-2e70534967447e1c34c68d21444a81b851bd4d13.tar.zst |
Storage::all_posts to return all posts for ?q=source w/o filters
Change-Id: I5d1220b6a2abbcb460bdb13c088c3dbd7e4d9856
Diffstat (limited to 'src/database/mod.rs')
-rw-r--r-- | src/database/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index 0993715..4390ae7 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -356,6 +356,10 @@ pub trait Storage: std::fmt::Debug + Clone + Send + Sync { /// Besides, it may even allow for nice tricks like storing the /// webmentions separately and rehydrating them on feed reads. fn add_or_update_webmention(&self, target: &str, mention_type: MentionType, mention: serde_json::Value) -> impl Future<Output = Result<()>> + Send; + + /// Return a stream of all posts ever made by a certain user, in + /// reverse-chronological order. + fn all_posts<'this>(&'this self, user: &url::Url) -> impl Future<Output = Result<impl futures::Stream<Item = serde_json::Value> + Send + 'this>> + Send; } #[cfg(test)] |