pub enum GasUnit {
}
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.
Hash(Word)
Hash crypto operation.
MemoryOwnership(Word)
Memory ownership test cost.
MemoryRead(Word)
Cost of memory read, per byte.
MemoryWrite(Word)
Cost of memory write, per byte.
Recover(Word)
Crypto public key recover.
StorageReadTree(Word)
Cost to read bytes from a storage tree
StorageWriteTree(Word)
Cost to write bytes to a storage tree
StorageWriteWord(Word)
Cost to write a word to the storage
Accumulated(Word)
Accumulated cost of several operations.
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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