Files
tuwunel/src/service/rooms/search/data.rs

13 lines
340 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 ruma::RoomId;
2022-10-05 15:33:57 +02:00
pub trait Data: Send + Sync {
2022-11-21 09:51:39 +01:00
fn index_pdu(&self, shortroomid: u64, pdu_id: &[u8], message_body: &str) -> Result<()>;
2022-07-10 16:28:43 +02:00
fn search_pdus<'a>(
2022-07-10 16:28:43 +02:00
&'a self,
room_id: &RoomId,
search_string: &str,
2022-10-08 13:03:07 +02:00
) -> Result<Option<(Box<dyn Iterator<Item = Vec<u8>> + 'a>, Vec<String>)>>;
2022-07-10 16:28:43 +02:00
}