use ruma::ServerName; use super::{OutgoingKind, SendingEventType}; use crate::Result; pub(crate) trait Data: Send + Sync { #[allow(clippy::type_complexity)] fn active_requests<'a>( &'a self, ) -> Box< dyn Iterator, OutgoingKind, SendingEventType)>> + 'a, >; fn active_requests_for<'a>( &'a self, outgoing_kind: &OutgoingKind, ) -> Box, SendingEventType)>> + 'a>; fn delete_active_request(&self, key: Vec) -> Result<()>; fn delete_all_active_requests_for( &self, outgoing_kind: &OutgoingKind, ) -> Result<()>; fn delete_all_requests_for( &self, outgoing_kind: &OutgoingKind, ) -> Result<()>; fn queue_requests( &self, requests: &[(&OutgoingKind, SendingEventType)], ) -> Result>>; fn queued_requests<'a>( &'a self, outgoing_kind: &OutgoingKind, ) -> Box)>> + 'a>; fn mark_as_active( &self, events: &[(SendingEventType, Vec)], ) -> Result<()>; fn set_latest_educount( &self, server_name: &ServerName, educount: u64, ) -> Result<()>; fn get_latest_educount(&self, server_name: &ServerName) -> Result; }