pub enum GasWallet {
Value(OrderedHashMap<CostTokenType, i64>),
Disabled,
}
Expand description
Environment tracking the amount of gas available in a statement’s context.
Variants§
Value(OrderedHashMap<CostTokenType, i64>)
A known value.
Disabled
If gas tracking is disabled, this value should be used for all the statements.
Implementations§
source§impl GasWallet
impl GasWallet
sourcepub fn update(
&self,
request: OrderedHashMap<CostTokenType, i64>
) -> Result<Self, GasWalletError>
pub fn update( &self, request: OrderedHashMap<CostTokenType, i64> ) -> Result<Self, GasWalletError>
Updates the value in the wallet by request
. Can be both negative (for most libfuncs) and
positive (for gas acquisition libfuncs).
Trait Implementations§
source§impl PartialEq for GasWallet
impl PartialEq for GasWallet
impl Eq for GasWallet
impl StructuralEq for GasWallet
impl StructuralPartialEq for GasWallet
Auto Trait Implementations§
impl RefUnwindSafe for GasWallet
impl Send for GasWallet
impl Sync for GasWallet
impl Unpin for GasWallet
impl UnwindSafe for GasWallet
Blanket Implementations§
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.