pub trait Procedure: Send {
// Required methods
fn type_name(&self) -> &str;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn dump(&self) -> Result<String>;
fn lock_key(&self) -> LockKey;
// Provided methods
fn rollback<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn rollback_supported(&self) -> bool { ... }
fn recover(&mut self) -> Result<()> { ... }
}
Expand description
A Procedure
represents an operation or a set of operations to be performed step-by-step.
Required Methods§
Provided Methods§
Sourcefn rollback<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rollback<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Rollback the failed procedure.
The implementation must be idempotent.
Sourcefn rollback_supported(&self) -> bool
fn rollback_supported(&self) -> bool
Indicates whether it supports rolling back the procedure.