conduwuit/src/service/rooms/auth_chain/data.rs

12 lines
331 B
Rust
Raw Normal View History

2022-09-07 13:25:51 +02:00
use crate::Result;
2022-10-05 20:34:31 +02:00
use std::{collections::HashSet, sync::Arc};
2022-10-05 15:33:57 +02:00
pub trait Data: Send + Sync {
2022-10-05 20:34:31 +02:00
fn get_cached_eventid_authchain(
&self,
shorteventid: &[u64],
) -> Result<Option<Arc<HashSet<u64>>>>;
fn cache_auth_chain(&self, shorteventid: Vec<u64>, auth_chain: Arc<HashSet<u64>>)
-> Result<()>;
}