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§
Provided Methods§
Sourcefn commit_iter(&mut self, changes: impl IntoIterator<Item = (Address, Account)>)
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.