Trait IServerDbMigrationContext

Source
pub trait IServerDbMigrationContext {
    // Required method
    fn get_module_history_stream<'s, 'tx, 'async_trait>(
        &'s self,
        module_id: ModuleInstanceId,
        dbtx: &'s mut DatabaseTransaction<'tx>,
    ) -> Pin<Box<dyn Future<Output = BoxStream<'s, DynModuleHistoryItem>> + Send + 'async_trait>>
       where Self: 'async_trait,
             's: 'async_trait,
             'tx: 'async_trait;
}
Expand description

An interface a server module db migration context needs to implement

An instance of this type is injected to server-side migrations from fedimint-server, but users of it (and fedimint-server-core) do not need to know the implementation.

Required Methods§

Source

fn get_module_history_stream<'s, 'tx, 'async_trait>( &'s self, module_id: ModuleInstanceId, dbtx: &'s mut DatabaseTransaction<'tx>, ) -> Pin<Box<dyn Future<Output = BoxStream<'s, DynModuleHistoryItem>> + Send + 'async_trait>>
where Self: 'async_trait, 's: 'async_trait, 'tx: 'async_trait,

Get a stream of historical consensus items belonging to the module

Implementors§