DatabaseCommit

Trait DatabaseCommit 

pub trait DatabaseCommit {
    // Required method
    fn commit(&mut self, changes: HashMap<Address, Account>);

    // Provided method
    fn commit_iter(
        &mut self,
        changes: impl IntoIterator<Item = (Address, Account)>,
    ) { ... }
}
Expand description

EVM database commit interface.

Required Methods§

fn commit(&mut self, changes: HashMap<Address, Account>)

Commit changes to the database.

Provided Methods§

fn commit_iter(&mut self, changes: impl IntoIterator<Item = (Address, Account)>)

Commit changes to the database with an iterator.

Implementors of DatabaseCommit should override this method when possible for efficiency.

Callers should prefer using DatabaseCommit::commit when they already have a [HashMap].

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.

Implementations on Foreign Types§

§

impl<'a, T> DatabaseCommit for &'a mut T
where T: 'a + DatabaseCommit + ?Sized,

§

fn commit(&mut self, changes: HashMap<Address, Account>)

§

fn commit_iter(&mut self, changes: impl IntoIterator<Item = (Address, Account)>)

§

impl<L, R> DatabaseCommit for Either<L, R>

§

fn commit(&mut self, changes: HashMap<Address, Account>)

§

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

§

fn commit(&mut self, changes: HashMap<Address, Account>)

§

fn commit_iter(&mut self, changes: impl IntoIterator<Item = (Address, Account)>)

Implementors§