Trait MerklizedStateDataSource

Source
pub trait MerklizedStateDataSource<Types, State, const ARITY: usize>
where Types: NodeType, State: MerklizedState<Types, ARITY>,
{ // Required method fn get_path<'life0, 'async_trait>( &'life0 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 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<D, U, Types, State, const ARITY: usize> MerklizedStateDataSource<Types, State, ARITY> for ExtensibleDataSource<D, U>
where D: MerklizedStateDataSource<Types, State, ARITY> + Sync, U: Send + Sync, Types: NodeType, State: MerklizedState<Types, ARITY>,

Source§

impl<Types, S, P, State, const ARITY: usize> MerklizedStateDataSource<Types, State, ARITY> for FetchingDataSource<Types, S, P>
where Types: NodeType, S: VersionedDataSource + 'static, for<'a> S::ReadOnly<'a>: MerklizedStateStorage<Types, State, ARITY>, P: Send + Sync, State: MerklizedState<Types, ARITY> + 'static, <State as MerkleTreeScheme>::Commitment: Send,