pub trait SagaTransaction<'a> {
type Err: Into<Error> + From<Error>;
// Required methods
fn get_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Saga>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
saga: &'life1 Saga,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
new_state: SagaStateEnum,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Saga Transaction trait
Required Associated Types§
Required Methods§
Sourcefn get_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Saga>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Saga>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get saga by operation_id
Sourcefn add_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
saga: &'life1 Saga,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
saga: &'life1 Saga,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add saga
Sourcefn update_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
new_state: SagaStateEnum,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_saga<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
new_state: SagaStateEnum,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update saga state (only updates state and updated_at fields)