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

12 lines
308 B
Rust
Raw Normal View History

use ruma::RoomId;
2022-07-10 16:28:43 +02:00
pub trait Data {
fn index_pdu<'a>(&self, room_id: &RoomId, pdu_id: u64, message_body: String) -> 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,
) -> Result<Option<(impl Iterator<Item = Vec<u8>> + 'a, Vec<String>)>>;
}