Skip to main content

CommitTokenDriver

Trait CommitTokenDriver 

Source
pub trait CommitTokenDriver: Send + Sync {
    // Required methods
    fn last_token<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        scope: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn write_with_token<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        rows: &'life2 [Value],
        scope: &'life3 str,
        token: &'life4 str,
    ) -> Pin<Box<dyn Future<Output = Result<WriteReport, FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
}
Expand description

The exactly-once primitives of a destination: rows and a commit token committed as one unit (#215).

Required Methods§

Source

fn last_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, scope: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The last token committed under scope, if any.

Source

fn write_with_token<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, rows: &'life2 [Value], scope: &'life3 str, token: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<WriteReport, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Write rows and record token under scope atomically: both land or neither does. Store the token opaquely (it may carry a bookmark).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§