Skip to main content

RollbackDriver

Trait RollbackDriver 

Source
pub trait RollbackDriver: Send + Sync {
    // Required methods
    fn rollback_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        run_id: &'life2 str,
        opts: &'life3 RollbackOptions,
    ) -> Pin<Box<dyn Future<Output = Result<RollbackOutcome, FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn forget_run<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        run_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn rewind_commit_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        scope: &'life2 str,
        token: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;

    // Provided method
    fn enabled(&self) -> bool { ... }
}
Expand description

The run-rollback primitives of a destination (#706).

Required Methods§

Source

fn rollback_run<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, run_id: &'life2 str, opts: &'life3 RollbackOptions, ) -> Pin<Box<dyn Future<Output = Result<RollbackOutcome, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Undo what run_id wrote, per opts.mode.

Source

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

Drop what was kept to make run_id undoable.

Source

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

Rewind the exactly-once watermark for scope to token.

Provided Methods§

Source

fn enabled(&self) -> bool

Whether this configuration can roll back (a SQL sink needs mapped columns). When it cannot, the primitives are still called, so their error can say why. Default: it can.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§