mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-21 01:31:24 +01:00
Add wrapper types for short IDs
This commit is contained in:
parent
f1642c92d1
commit
b0f33207fe
28 changed files with 427 additions and 232 deletions
|
|
@ -2,7 +2,10 @@ use std::sync::Arc;
|
|||
|
||||
use ruma::{EventId, RoomId, UserId};
|
||||
|
||||
use crate::{service::rooms::timeline::PduCount, PduEvent, Result};
|
||||
use crate::{
|
||||
service::rooms::{short::ShortRoomId, timeline::PduCount},
|
||||
PduEvent, Result,
|
||||
};
|
||||
|
||||
pub(crate) trait Data: Send + Sync {
|
||||
fn add_relation(&self, from: u64, to: u64) -> Result<()>;
|
||||
|
|
@ -10,7 +13,7 @@ pub(crate) trait Data: Send + Sync {
|
|||
fn relations_until<'a>(
|
||||
&'a self,
|
||||
user_id: &'a UserId,
|
||||
room_id: u64,
|
||||
room_id: ShortRoomId,
|
||||
target: u64,
|
||||
until: PduCount,
|
||||
) -> Result<Box<dyn Iterator<Item = Result<(PduCount, PduEvent)>> + 'a>>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue