pub trait LedgerStore: Send + Sync {
// Required methods
fn save_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 LedgerEvent,
) -> Pin<Box<dyn Future<Output = Result<(), ZakatError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerEvent>, ZakatError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for persisting Zakat Ledger events.
Required Methods§
Sourcefn save_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 LedgerEvent,
) -> Pin<Box<dyn Future<Output = Result<(), ZakatError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 LedgerEvent,
) -> Pin<Box<dyn Future<Output = Result<(), ZakatError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Saves a single event to the store.
Sourcefn load_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerEvent>, ZakatError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerEvent>, ZakatError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all events from the store.