Struct near_vm_logic::gas_counter::FastGasCounter [−][src]
#[repr(C)]pub struct FastGasCounter {
pub burnt_gas: u64,
pub gas_limit: u64,
pub opcode_cost: u64,
}
Expand description
Fast gas counter with very simple structure, could be exposed to compiled code in the VM.
Fields
burnt_gas: u64
The following three fields must be put next to another to make sure generated gas counting code can use and adjust them. We will share counter to ensure we never miss synchronization. This could change and in such a case synchronization required between compiled WASM code and the host code. The amount of gas that was irreversibly used for contract execution.
gas_limit: u64
Hard gas limit for execution
opcode_cost: u64
Single WASM opcode cost
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for FastGasCounter
impl Send for FastGasCounter
impl Sync for FastGasCounter
impl Unpin for FastGasCounter
impl UnwindSafe for FastGasCounter
Blanket Implementations
Mutably borrows from an owned value. Read more