Trait MerklizedStateStorage

Source
pub trait MerklizedStateStorage<Types, State, const ARITY: usize>
where Types: NodeType, State: MerklizedState<Types, ARITY>,
{ // Required method fn get_path<'life0, 'async_trait>( &'life0 mut self, snapshot: Snapshot<Types, State, ARITY>, key: State::Key, ) -> Pin<Box<dyn Future<Output = QueryResult<MerkleProof<State::Entry, State::Key, State::T, ARITY>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }
Expand description

This trait defines methods that a data source should implement It enables retrieval of the membership path for a leaf node, which can be used to reconstruct the Merkle tree state.

Required Methods§

Source

fn get_path<'life0, 'async_trait>( &'life0 mut self, snapshot: Snapshot<Types, State, ARITY>, key: State::Key, ) -> Pin<Box<dyn Future<Output = QueryResult<MerkleProof<State::Entry, State::Key, State::T, ARITY>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<Mode, Types, State, const ARITY: usize> MerklizedStateStorage<Types, State, ARITY> for Transaction<Mode>
where Mode: TransactionMode, Types: NodeType, State: MerklizedState<Types, ARITY> + 'static,