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

13 lines
328 B
Rust
Raw Normal View History

use ruma::RoomId;
2022-09-07 13:25:51 +02:00
use crate::Result;
2022-07-10 16:28:43 +02:00
pub trait Data {
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
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
}