Trait SequenceBackend

pub trait SequenceBackend {
    // Required methods
    fn start_lyquid(
        &mut self,
        lyquid: &LyquidID,
        sequence: Sequence,
        store: Arc<dyn KVStore>,
    ) -> Result<Recipient<Stop>, Error>;
    fn stop<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn prune<'life0, 'async_trait>(
        &'life0 self,
        until: u64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

The slot retrieving backend for a totally ordered sequence (i.e. a chain).

Required Methods§

fn start_lyquid( &mut self, lyquid: &LyquidID, sequence: Sequence, store: Arc<dyn KVStore>, ) -> Result<Recipient<Stop>, Error>

Start an actor to work on fill slots for the given lyquid. The actor can be stopped by sending lyquor_api::actor::Stop.

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

Stop the backend.

Provided Methods§

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

Let the backend prune all its persisted data prior to the given block number (exclusive).

Implementors§