Add PduId wrapper struct

Death to Vec<u8>
This commit is contained in:
Lambda 2024-08-26 16:47:50 +00:00
parent 341f4213d0
commit 26322d5a95
15 changed files with 110 additions and 71 deletions

View file

@ -3,7 +3,7 @@ use ruma::{
UserId,
};
use crate::{PduEvent, Result};
use crate::{service::rooms::timeline::PduId, PduEvent, Result};
pub(crate) trait Data: Send + Sync {
#[allow(clippy::type_complexity)]
@ -17,11 +17,11 @@ pub(crate) trait Data: Send + Sync {
fn update_participants(
&self,
root_id: &[u8],
root_id: &PduId,
participants: &[OwnedUserId],
) -> Result<()>;
fn get_participants(
&self,
root_id: &[u8],
root_id: &PduId,
) -> Result<Option<Vec<OwnedUserId>>>;
}