Trait gear_core_backend::BackendExternalities

source ·
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§

source

fn gas_amount(&self) -> GasAmount

source

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.

Implementors§