pub trait QueueStore: Send + Sync {
// Required methods
fn save_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 QueueEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<Option<QueueEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_all_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueueEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_to_dlq<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 QueueEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_dlq<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueueEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_from_dlq<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Queue storage operations
Required Methods§
Sourcefn save_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 QueueEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 QueueEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save a queue entry to persistent storage
Sourcefn load_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<Option<QueueEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<Option<QueueEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a queue entry from persistent storage
Sourcefn remove_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
mail_id: &'life1 MailId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a queue entry from persistent storage
Sourcefn load_all_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueueEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_all_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueueEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load all pending queue entries on startup
Sourcefn save_to_dlq<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 QueueEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_to_dlq<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 QueueEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save to dead letter queue