fn charge_host_function_call<T>(
        &mut self,
        host_function: &HostFunction<T>,
        weights: T,
    ) -> Result<(), Trap>
    where
        T: AsRef<[Cost]> + Copy,
    {
        let cost = host_function.calculate_gas_cost(weights);
        self.gas(cost)?;
        Ok(())
    }
/// Calculate gas cost for a host function
Calculate gas cost for a host function
Calculate gas cost for a host function
fn charge_host_function_call<T>(
        &mut self,
        host_function: &HostFunction<T>,
        weights: T,
    ) -> Result<(), Trap>
    where
        T: AsRef<[Cost]> + Copy,
    {
        let cost = host_function.calculate_gas_cost(weights);
        self.gas(cost)?;
        Ok(())
    }
fn charge_host_function_call < T > ( & mut self , host_function : & HostFunction < T > , weights : T , ) -> Result < ( ) , Trap > where T : AsRef < [ Cost ] > + Copy , { let cost = host_function . calculate_gas_cost ( weights ) ; self . gas ( cost ) ? ; Ok ( ( ) ) }
Calculate gas cost for a host function
Calculate gas cost for a host function
&mut self
host_function
&HostFunction<T>
weights
T
&mut self
host_function
&HostFunction<T>
weights
T