pub trait Compensator: Send + Sync {
// Required methods
fn add_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
id: &'life2 str,
payload: Arc<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn remove_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
Sourcefn add_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
id: &'life2 str,
payload: Arc<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
id: &'life2 str,
payload: Arc<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Add a task to the compensation queue.
Sourcefn remove_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
topic: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a task from the compensation queue.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".