mithril_signer::services

Trait EpochPruningTask

source
pub trait EpochPruningTask: Send + Sync {
    // Required methods
    fn pruned_data(&self) -> &'static str;
    fn prune<'life0, 'async_trait>(
        &'life0 self,
        current_epoch: Epoch,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Define the task responsible for pruning a datasource below a certain epoch threshold.

Required Methods§

source

fn pruned_data(&self) -> &'static str

Get the name of the data that will be pruned.

source

fn prune<'life0, 'async_trait>( &'life0 self, current_epoch: Epoch, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prune the datasource based on the given current epoch.

Implementors§