Skip to main content

TrieWriter

Trait TrieWriter 

Source
pub trait TrieWriter: Send {
    // Required method
    fn write_trie_updates_sorted(
        &self,
        trie_updates: &TrieUpdatesSorted,
    ) -> Result<usize, ProviderError>;

    // Provided method
    fn write_trie_updates(
        &self,
        trie_updates: TrieUpdates,
    ) -> Result<usize, ProviderError> { ... }
}
Available on crate feature provider only.
Expand description

Trie Writer

Required Methods§

Source

fn write_trie_updates_sorted( &self, trie_updates: &TrieUpdatesSorted, ) -> Result<usize, ProviderError>

Writes trie updates to the database with already sorted updates.

Returns the number of entries modified.

Provided Methods§

Source

fn write_trie_updates( &self, trie_updates: TrieUpdates, ) -> Result<usize, ProviderError>

Writes trie updates to the database.

Returns the number of entries modified.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T> TrieWriter for &'a T
where T: 'a + TrieWriter + ?Sized, &'a T: Send,

Source§

impl<T> TrieWriter for Arc<T>
where T: TrieWriter + ?Sized, Arc<T>: Send,

Source§

impl<T> TrieWriter for Box<T>
where T: TrieWriter + ?Sized, Box<T>: Send,

Implementors§

Source§

impl<TX, N> TrieWriter for DatabaseProvider<TX, N>
where TX: DbTxMut + DbTx + 'static, N: NodeTypes,