Skip to main content

QueueStore

Trait QueueStore 

Source
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§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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,

List all dead letter queue entries

Source

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,

Remove from dead letter queue

Implementors§