Trait revolt_database::AbstractAttachments
source · pub trait AbstractAttachments: Sync + Send {
// Required methods
fn insert_attachment<'life0, 'life1, 'async_trait>(
&'life0 self,
attachment: &'life1 File
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_and_use_attachment<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
tag: &'life2 str,
parent_type: &'life3 str,
parent_id: &'life4 str
) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn mark_attachment_as_reported<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn mark_attachment_as_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn mark_attachments_as_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
sourcefn insert_attachment<'life0, 'life1, 'async_trait>(
&'life0 self,
attachment: &'life1 File
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_attachment<'life0, 'life1, 'async_trait>( &'life0 self, attachment: &'life1 File ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Insert attachment into database.
sourcefn find_and_use_attachment<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
tag: &'life2 str,
parent_type: &'life3 str,
parent_id: &'life4 str
) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn find_and_use_attachment<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, id: &'life1 str, tag: &'life2 str, parent_type: &'life3 str, parent_id: &'life4 str ) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,
Find an attachment by its details and mark it as used by a given parent.
sourcefn mark_attachment_as_reported<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_attachment_as_reported<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Mark an attachment as having been reported.