pub trait GasOps {
// Required methods
fn gas_used(&self) -> Gas;
fn gas_available(&self) -> Gas;
fn charge_gas(&mut self, name: &str, compute: Gas) -> Result<()>;
fn price_list(&self) -> &PriceList;
}
Expand description
Operations for explicit gas charging.
Required Methods§
sourcefn gas_available(&self) -> Gas
fn gas_available(&self) -> Gas
Returns the remaining gas for the transaction.
sourcefn charge_gas(&mut self, name: &str, compute: Gas) -> Result<()>
fn charge_gas(&mut self, name: &str, compute: Gas) -> Result<()>
ChargeGas charges specified amount of gas
for execution.
name
provides information about gas charging point.
sourcefn price_list(&self) -> &PriceList
fn price_list(&self) -> &PriceList
Returns the currently active gas price list.