pub trait BackendExternalities: Externalities + CountersOwner {
// Required methods
fn gas_amount(&self) -> GasAmount;
fn pre_process_memory_accesses(
&mut self,
reads: &[MemoryInterval],
writes: &[MemoryInterval],
gas_counter: &mut u64,
) -> Result<(), ProcessAccessError>;
}
Expand description
Extended externalities that can manage gas counters.
Required Methods§
fn gas_amount(&self) -> GasAmount
sourcefn pre_process_memory_accesses(
&mut self,
reads: &[MemoryInterval],
writes: &[MemoryInterval],
gas_counter: &mut u64,
) -> Result<(), ProcessAccessError>
fn pre_process_memory_accesses( &mut self, reads: &[MemoryInterval], writes: &[MemoryInterval], gas_counter: &mut u64, ) -> Result<(), ProcessAccessError>
Pre-process memory access if needed.
Object Safety§
This trait is not object safe.