Skip to main content

SagaDatabase

Trait SagaDatabase 

Source
pub trait SagaDatabase {
    type Err: Into<Error> + From<Error>;

    // Required methods
    fn get_melt_saga_by_quote_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        quote_id: &'life1 QuoteId,
    ) -> 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_incomplete_sagas<'life0, 'async_trait>(
        &'life0 self,
        operation_kind: OperationKind,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Saga>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Saga Database trait

Required Associated Types§

Source

type Err: Into<Error> + From<Error>

Saga Database Error

Required Methods§

Source

fn get_melt_saga_by_quote_id<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 QuoteId, ) -> Pin<Box<dyn Future<Output = Result<Option<Saga>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the melt saga associated with a melt quote id

Source

fn get_incomplete_sagas<'life0, 'async_trait>( &'life0 self, operation_kind: OperationKind, ) -> Pin<Box<dyn Future<Output = Result<Vec<Saga>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all incomplete sagas for a given operation kind

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§