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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
362 B
Rust
Raw Normal View History

2022-10-05 20:34:31 +02:00
use ruma::RoomId;
2022-09-07 13:25:51 +02:00
use crate::Result;
type SearchPdusResult<'a> = Result<Option<(Box<dyn Iterator<Item = Vec<u8>> + 'a>, Vec<String>)>>;
pub(crate) 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>(&'a self, room_id: &RoomId, search_string: &str) -> SearchPdusResult<'a>;
2022-07-10 16:28:43 +02:00
}