Trait sp_trie::TrieRecorderProvider
source · pub trait TrieRecorderProvider<H: Hasher> {
type Recorder<'a>: TrieRecorder<H::Out> + 'a
where Self: 'a;
// Required methods
fn drain_storage_proof(self) -> Option<StorageProof>;
fn as_trie_recorder(&self, storage_root: H::Out) -> Self::Recorder<'_>;
}
Expand description
Type that is able to provide a trie_db::TrieRecorder
.
Types implementing this trait can be used to maintain recorded state
across operations on different [trie_db::TrieDB
] instances.
Required Associated Types§
sourcetype Recorder<'a>: TrieRecorder<H::Out> + 'a
where
Self: 'a
type Recorder<'a>: TrieRecorder<H::Out> + 'a where Self: 'a
Recorder type that is going to be returned by implementors of this trait.
Required Methods§
sourcefn drain_storage_proof(self) -> Option<StorageProof>
fn drain_storage_proof(self) -> Option<StorageProof>
Create a StorageProof
derived from the internal state.
sourcefn as_trie_recorder(&self, storage_root: H::Out) -> Self::Recorder<'_>
fn as_trie_recorder(&self, storage_root: H::Out) -> Self::Recorder<'_>
Provide a recorder implementing trie_db::TrieRecorder
.
Object Safety§
This trait is not object safe.