Skip to main content

JournalWriter

Trait JournalWriter 

Source
pub trait JournalWriter: Send + Sync {
    // Required methods
    fn append<'life0, 'async_trait>(
        &'life0 self,
        entry: JournalEntry,
    ) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn next_sequence<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for writing journal entries.

Default implementation is BufferedJournal. Phase 5 provides DurableJournal.

Required Methods§

Source

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

Append an entry to the journal.

Source

fn next_sequence<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the next sequence number.

Implementors§