mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
6c1434c165
Signed-off-by: Jason Volk <jason@zemos.net>
15 lines
578 B
Rust
15 lines
578 B
Rust
use ruma::{api::client::threads::get_threads::v1::IncludeThreads, OwnedUserId, RoomId, UserId};
|
|
|
|
use crate::{PduEvent, Result};
|
|
|
|
type PduEventIterResult<'a> = Result<Box<dyn Iterator<Item = Result<(u64, PduEvent)>> + 'a>>;
|
|
|
|
pub trait Data: Send + Sync {
|
|
fn threads_until<'a>(
|
|
&'a self, user_id: &'a UserId, room_id: &'a RoomId, until: u64, include: &'a IncludeThreads,
|
|
) -> PduEventIterResult<'a>;
|
|
|
|
fn update_participants(&self, root_id: &[u8], participants: &[OwnedUserId]) -> Result<()>;
|
|
fn get_participants(&self, root_id: &[u8]) -> Result<Option<Vec<OwnedUserId>>>;
|
|
}
|