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)
Atomic operation.
Arithmetic(Word)
Arithmetic operation.
ArithmeticExpensive(Word)
Expensive arithmetic operation.
RegisterWrite(Word)
Write to a register.
Branching(Word)
Branching cost.
MemoryOwnership(Word)
Memory ownership test cost.
MemoryWrite(Word)
Cost of memory write, per byte.
Accumulated(Word)
Accumulated cost of several operations.
Undefined
Undefined gas cost.
Implementations
Trait Implementations
impl Copy for GasUnit
impl Eq for GasUnit
impl StructuralEq for GasUnit
impl StructuralPartialEq for GasUnit
Auto Trait Implementations
impl RefUnwindSafe for GasUnit
impl Send for GasUnit
impl Sync for GasUnit
impl Unpin for GasUnit
impl UnwindSafe for GasUnit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more