sp_trie

Trait 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§

Source

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§

Source

fn drain_storage_proof(self) -> Option<StorageProof>

Create a StorageProof derived from the internal state.

Source

fn as_trie_recorder(&self, storage_root: H::Out) -> Self::Recorder<'_>

Provide a recorder implementing trie_db::TrieRecorder.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<H: Hasher> TrieRecorderProvider<H> for Recorder<H>

Source§

type Recorder<'a> = TrieRecorder<'a, H> where H: 'a