pub enum GasUnit {
Atom(Word),
Arithmetic(Word),
ArithmeticExpensive(Word),
RegisterWrite(Word),
Branching(Word),
MemoryOwnership(Word),
MemoryWrite(Word),
Accumulated(Word),
Undefined,
}
Expand description
Gas unit cost that embeds a unit price and operations count.
The operations count will be the argument of every variant except
Accumulated
, that will hold the total acumulated gas.
Variants
Atom(Word)
Tuple Fields
0: Word
Atomic operation.
Arithmetic(Word)
Tuple Fields
0: Word
Arithmetic operation.
ArithmeticExpensive(Word)
Tuple Fields
0: Word
Expensive arithmetic operation.
RegisterWrite(Word)
Tuple Fields
0: Word
Write to a register.
Branching(Word)
Tuple Fields
0: Word
Branching cost.
MemoryOwnership(Word)
Tuple Fields
0: Word
Memory ownership test cost.
MemoryWrite(Word)
Tuple Fields
0: Word
Cost of memory write, per byte.
Accumulated(Word)
Tuple Fields
0: Word
Accumulated cost of several operations.
Undefined
Undefined gas cost.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GasUnit
impl UnwindSafe for GasUnit
Blanket Implementations
Mutably borrows from an owned value. Read more