pub fn total_cost(&self) -> Gas {
        let payment_cost = self
            .payment_execution_result
            .as_ref()
            .map(ExecutionResult::cost)
            .unwrap_or_default();
        let session_cost = self
            .session_execution_result
            .as_ref()
            .map(ExecutionResult::cost)
            .unwrap_or_default();
        // TODO: Make sure this code isn't in production, as, even though it's highly unlikely
        // to happen, an integer overflow would be silently ignored in release builds.
        // NOTE: This code should have been removed in the fix of #1968, where arithmetic
        // operations on the Gas type were disabled.
        payment_cost + session_cost
    }
/// Calculates the total gas cost of the execution result.
///
/// Takes a payment execution result, and a session execution result and returns a sum. If
/// either a payment or session code is not specified then a 0 is used.
Calculates the total gas cost of the execution result.
Takes a payment execution result, and a session execution result and returns a sum. If
either a payment or session code is not specified then a 0 is used.
Calculates the total gas cost of the execution result . Takes a payment execution result and a session execution result and returns a sum . If either a payment or session code is not specified then a 0 is used .
pub fn total_cost(&self) -> Gas {
        let payment_cost = self
            .payment_execution_result
            .as_ref()
            .map(ExecutionResult::cost)
            .unwrap_or_default();
        let session_cost = self
            .session_execution_result
            .as_ref()
            .map(ExecutionResult::cost)
            .unwrap_or_default();
        // TODO: Make sure this code isn't in production, as, even though it's highly unlikely
        // to happen, an integer overflow would be silently ignored in release builds.
        // NOTE: This code should have been removed in the fix of #1968, where arithmetic
        // operations on the Gas type were disabled.
        payment_cost + session_cost
    }
pub fn total_cost ( & self ) -> Gas { let payment_cost = self . payment_execution_result . as_ref ( ) . map ( ExecutionResult :: cost ) . unwrap_or_default ( ) ; let session_cost = self . session_execution_result . as_ref ( ) . map ( ExecutionResult :: cost ) . unwrap_or_default ( ) ; // TODO: Make sure this code isn't in production, as, even though it's highly unlikely // to happen, an integer overflow would be silently ignored in release builds. // NOTE: This code should have been removed in the fix of #1968, where arithmetic // operations on the Gas type were disabled. payment_cost + session_cost }
Calculates the total gas cost of the execution result.
Calculates the total gas cost of the execution result .
&self
&self