revolt_database/models/file_hashes/
ops.rs1use revolt_result::Result;
2
3use crate::FileHash;
4
5#[cfg(feature = "mongodb")]
6mod mongodb;
7mod reference;
8
9#[async_trait]
10pub trait AbstractAttachmentHashes: Sync + Send {
11 async fn insert_attachment_hash(&self, hash: &FileHash) -> Result<()>;
13
14 async fn fetch_attachment_hash(&self, hash: &str) -> Result<FileHash>;
16
17 async fn set_attachment_hash_nonce(&self, hash: &str, nonce: &str) -> Result<()>;
19
20 async fn delete_attachment_hash(&self, id: &str) -> Result<()>;
22}