[−][src]Struct cosmwasm_vm::GasInfo
Fields
cost: u64The gas cost of a computation that was executed already but not yet charged
externally_used: u64Gas that was used and charged externally. This is needed to adjust the VM's gas limit but does not affect the gas usage.
Implementations
impl GasInfo[src]
pub fn with_cost(amount: u64) -> Self[src]
pub fn with_externally_used(amount: u64) -> Self[src]
pub fn free() -> Self[src]
Creates a gas information with no cost for the caller and with zero externally used gas.
Caution: when using this you need to make sure no gas was metered externally to keep the gas values in sync.
Trait Implementations
impl AddAssign<GasInfo> for GasInfo[src]
pub fn add_assign(&mut self, other: Self)[src]
impl Clone for GasInfo[src]
impl Copy for GasInfo[src]
impl Debug for GasInfo[src]
Auto Trait Implementations
impl RefUnwindSafe for GasInfo
impl Send for GasInfo
impl Sync for GasInfo
impl Unpin for GasInfo
impl UnwindSafe for GasInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,