Add wrapper types for short IDs

This commit is contained in:
Lambda 2024-08-27 14:27:12 +00:00
parent f1642c92d1
commit b0f33207fe
28 changed files with 427 additions and 232 deletions

View file

@ -1,18 +1,21 @@
use ruma::RoomId;
use crate::{service::rooms::timeline::PduId, Result};
use crate::{
service::rooms::{short::ShortRoomId, timeline::PduId},
Result,
};
pub(crate) trait Data: Send + Sync {
fn index_pdu(
&self,
shortroomid: u64,
shortroomid: ShortRoomId,
pdu_id: &PduId,
message_body: &str,
) -> Result<()>;
fn deindex_pdu(
&self,
shortroomid: u64,
shortroomid: ShortRoomId,
pdu_id: &PduId,
message_body: &str,
) -> Result<()>;