fn charge_gas(
		&mut self,
		token: RuntimeToken,
	) -> Result<(), sp_sandbox::HostError> {
		match self.gas_meter.charge(self.schedule, token) {
			GasMeterResult::Proceed => Ok(()),
			GasMeterResult::OutOfGas =>  {
				self.special_trap = Some(SpecialTrap::OutOfGas);
				Err(sp_sandbox::HostError)
			},
		}
	}
/// Charge the gas meter with the specified token.
///
/// Returns `Err(HostError)` if there is not enough gas.
Charge the gas meter with the specified token.
Returns `Err(HostError)` if there is not enough gas.
Charge the gas meter with the specified token . Returns ` Err ( HostError ) ` if there is not enough gas .
fn charge_gas(
		&mut self,
		token: RuntimeToken,
	) -> Result<(), sp_sandbox::HostError> {
		match self.gas_meter.charge(self.schedule, token) {
			GasMeterResult::Proceed => Ok(()),
			GasMeterResult::OutOfGas =>  {
				self.special_trap = Some(SpecialTrap::OutOfGas);
				Err(sp_sandbox::HostError)
			},
		}
	}
fn charge_gas ( & mut self , token : RuntimeToken , ) -> Result < ( ) , sp_sandbox :: HostError > { match self . gas_meter . charge ( self . schedule , token ) { GasMeterResult :: Proceed => Ok ( ( ) ) , GasMeterResult :: OutOfGas => { self . special_trap = Some ( SpecialTrap :: OutOfGas ) ; Err ( sp_sandbox :: HostError ) } , } }
Charge the gas meter with the specified token.
Charge the gas meter with the specified token .
&mut self
token
RuntimeToken
&mut self
token
RuntimeToken