Trait ExecuteCommitEvm
pub trait ExecuteCommitEvm: ExecuteEvm {
// Required method
fn commit(&mut self, state: Self::State);
// Provided methods
fn commit_inner(&mut self) { ... }
fn transact_commit(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error> { ... }
fn transact_many_commit(
&mut self,
txs: impl Iterator<Item = Self::Tx>,
) -> Result<Vec<Self::ExecutionResult>, Self::Error> { ... }
fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error> { ... }
}
Expand description
Extension of the ExecuteEvm
trait that adds a method that commits the state after execution.
Required Methods§
Provided Methods§
fn commit_inner(&mut self)
fn commit_inner(&mut self)
Finalize the state and commit it to the database.
Internally calls finalize
and commit
functions.
fn transact_commit(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_commit( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>
Transact the transaction and commit to the state.
fn transact_many_commit(
&mut self,
txs: impl Iterator<Item = Self::Tx>,
) -> Result<Vec<Self::ExecutionResult>, Self::Error>
fn transact_many_commit( &mut self, txs: impl Iterator<Item = Self::Tx>, ) -> Result<Vec<Self::ExecutionResult>, Self::Error>
Transact multiple transactions and commit to the state.
Internally calls transact_many
and commit_inner
functions.
fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error>
fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error>
Replay the transaction and commit to the state.
Internally calls replay
and commit
functions.
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.