summaryrefslogtreecommitdiff
path: root/src/service/rooms/pdu_metadata/data.rs
blob: 5577b3e3730280a305bf67351111631746ce698b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std::sync::Arc;

use crate::Result;
use ruma::{EventId, RoomId};

pub trait Data: Send + Sync {
    fn add_relation(&self, from: u64, to: u64) -> Result<()>;
    fn mark_as_referenced(&self, room_id: &RoomId, event_ids: &[Arc<EventId>]) -> Result<()>;
    fn is_event_referenced(&self, room_id: &RoomId, event_id: &EventId) -> Result<bool>;
    fn mark_event_soft_failed(&self, event_id: &EventId) -> Result<()>;
    fn is_event_soft_failed(&self, event_id: &EventId) -> Result<bool>;
}