Skip to main content

AuditJournalStore

Trait AuditJournalStore 

Source
pub trait AuditJournalStore:
    Send
    + Sync
    + Debug {
    // Required methods
    fn enqueue<'life0, 'async_trait>(
        &'life0 self,
        entry: AuditJournalEntry,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn claim_pending<'life0, 'life1, 'async_trait>(
        &'life0 self,
        worker_id: &'life1 str,
        limit: usize,
        claim_expires_at: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AuditJournalEntry>, AuditLedgerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_delivered<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        event_ids: &'life1 [Uuid],
        worker_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn mark_retry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        event_ids: &'life1 [Uuid],
        worker_id: &'life2 str,
        failure_code: &'life3 str,
        retry_at: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn quarantine<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        event_ids: &'life1 [Uuid],
        worker_id: &'life2 str,
        failure_code: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn recover_expired_claims<'life0, 'async_trait>(
        &'life0 self,
        now: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<usize, AuditLedgerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn enqueue<'life0, 'async_trait>( &'life0 self, entry: AuditJournalEntry, ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn claim_pending<'life0, 'life1, 'async_trait>( &'life0 self, worker_id: &'life1 str, limit: usize, claim_expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<Vec<AuditJournalEntry>, AuditLedgerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn mark_delivered<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, event_ids: &'life1 [Uuid], worker_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn mark_retry<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, event_ids: &'life1 [Uuid], worker_id: &'life2 str, failure_code: &'life3 str, retry_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn quarantine<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, event_ids: &'life1 [Uuid], worker_id: &'life2 str, failure_code: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuditLedgerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn recover_expired_claims<'life0, 'async_trait>( &'life0 self, now: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<usize, AuditLedgerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§