Trait Recover

Source
pub trait Recover<FE> {
    type Txn: Transaction<FE>;

    // Required method
    fn recover<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txn: &'life1 Self::Txn,
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Defines a method to recover the state of this Chain from a transaction failure.

Required Associated Types§

Required Methods§

Source

fn recover<'life0, 'life1, 'async_trait>( &'life0 self, txn: &'life1 Self::Txn, ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Recover this state after loading, in case the last transaction failed or was interrupted.

Implementors§

Source§

impl<State, T> Recover<<State as StateInstance>::FE> for Chain<State, State::Txn, State::FE, T>
where State: StateInstance + From<Collection<State::Txn, State::FE>> + From<Scalar>, State::FE: CacheBlock + for<'a> FileSave<'a>, T: Route<State> + Debug + Send + Sync, Collection<State::Txn, State::FE>: TryCastFrom<State>, Scalar: TryCastFrom<State>,

Source§

type Txn = <State as StateInstance>::Txn

Source§

impl<State, T> Recover<<State as StateInstance>::FE> for BlockChain<State, State::Txn, State::FE, T>
where State: StateInstance + From<Collection<State::Txn, State::FE>> + From<Scalar>, State::FE: CacheBlock + for<'a> FileSave<'a>, T: Route<State> + Debug, Collection<State::Txn, State::FE>: TryCastFrom<State>, Scalar: TryCastFrom<State>,

Source§

type Txn = <State as StateInstance>::Txn

Source§

impl<State, T> Recover<<State as StateInstance>::FE> for SyncChain<State, State::Txn, State::FE, T>
where State: StateInstance + From<Collection<State::Txn, State::FE>> + From<Scalar>, State::FE: CacheBlock + for<'a> FileSave<'a>, T: Route<State> + Debug + Send + Sync, Collection<State::Txn, State::FE>: TryCastFrom<State>, Scalar: TryCastFrom<State>,

Source§

type Txn = <State as StateInstance>::Txn