2022-09-06 23:15:09 +02:00
|
|
|
use ruma::RoomId;
|
2022-09-07 13:25:51 +02:00
|
|
|
use crate::Result;
|
2022-09-06 23:15:09 +02:00
|
|
|
|
2022-10-05 15:33:57 +02:00
|
|
|
pub trait Data: Send + Sync {
|
2022-10-05 12:45:54 +02:00
|
|
|
fn index_pdu<'a>(&self, shortroomid: u64, pdu_id: &[u8], message_body: String) -> Result<()>;
|
2022-07-10 16:28:43 +02:00
|
|
|
|
2022-09-06 23:15:09 +02:00
|
|
|
fn search_pdus<'a>(
|
2022-07-10 16:28:43 +02:00
|
|
|
&'a self,
|
|
|
|
|
room_id: &RoomId,
|
|
|
|
|
search_string: &str,
|
2022-09-07 13:25:51 +02:00
|
|
|
) -> Result<Option<(Box<dyn Iterator<Item = Vec<u8>>>, Vec<String>)>>;
|
2022-07-10 16:28:43 +02:00
|
|
|
}
|