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,15 +1,15 @@
use std::{collections::HashSet, sync::Arc};
use crate::Result;
use crate::{service::rooms::short::ShortEventId, Result};
pub(crate) trait Data: Send + Sync {
fn get_cached_eventid_authchain(
&self,
shorteventid: &[u64],
) -> Result<Option<Arc<HashSet<u64>>>>;
shorteventid: &[ShortEventId],
) -> Result<Option<Arc<HashSet<ShortEventId>>>>;
fn cache_auth_chain(
&self,
shorteventid: Vec<u64>,
auth_chain: Arc<HashSet<u64>>,
shorteventid: Vec<ShortEventId>,
auth_chain: Arc<HashSet<ShortEventId>>,
) -> Result<()>;
}