mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
Add PduId wrapper struct
Death to Vec<u8>
This commit is contained in:
parent
341f4213d0
commit
26322d5a95
15 changed files with 110 additions and 71 deletions
|
|
@ -1,19 +1,19 @@
|
|||
use ruma::RoomId;
|
||||
|
||||
use crate::Result;
|
||||
use crate::{service::rooms::timeline::PduId, Result};
|
||||
|
||||
pub(crate) trait Data: Send + Sync {
|
||||
fn index_pdu(
|
||||
&self,
|
||||
shortroomid: u64,
|
||||
pdu_id: &[u8],
|
||||
pdu_id: &PduId,
|
||||
message_body: &str,
|
||||
) -> Result<()>;
|
||||
|
||||
fn deindex_pdu(
|
||||
&self,
|
||||
shortroomid: u64,
|
||||
pdu_id: &[u8],
|
||||
pdu_id: &PduId,
|
||||
message_body: &str,
|
||||
) -> Result<()>;
|
||||
|
||||
|
|
@ -22,5 +22,5 @@ pub(crate) trait Data: Send + Sync {
|
|||
&'a self,
|
||||
room_id: &RoomId,
|
||||
search_string: &str,
|
||||
) -> Result<Option<(Box<dyn Iterator<Item = Vec<u8>> + 'a>, Vec<String>)>>;
|
||||
) -> Result<Option<(Box<dyn Iterator<Item = PduId> + 'a>, Vec<String>)>>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue