gear_core_backend

Trait 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.

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.

Implementors§