Skip to main content

NativeAsyncJournal

Trait NativeAsyncJournal 

Source
pub trait NativeAsyncJournal: Send + Sync {
    // Required methods
    fn load<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<NativeAsyncCheckpoint>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        checkpoint: &'life1 NativeAsyncCheckpoint,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn heartbeat<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn release<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

An exclusive, durable conversation journal. Keep the ownership fence for the lifetime of the coordinator, including provider requests between pump calls.

Required Methods§

Source

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

Source

fn save<'life0, 'life1, 'async_trait>( &'life0 self, checkpoint: &'life1 NativeAsyncCheckpoint, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically persist and flush before returning success.

Provided Methods§

Source

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

Renew shared ownership while streams/jobs are quiet. Failure stops jobs.

Source

fn release<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + 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§