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§
source§impl PartialEq<GasUnit> for GasUnit
impl PartialEq<GasUnit> for GasUnit
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§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more