/// Updates the available cycles in the call context based on how much
/// cycles the canister requested to keep.
///
/// Returns a `CallContextError::InsufficientCyclesInCall` if `cycles` is
/// more than what's available in the call context.
Updates the available cycles in the call context based on how much
cycles the canister requested to keep.

Returns a `CallContextError::InsufficientCyclesInCall` if `cycles` is
more than what's available in the call context.
Updates the available cycles in the call context based on how much cycles the canister requested to keep . Returns a ` CallContextError :: InsufficientCyclesInCall ` if ` cycles ` is more than what ' s available in the call context .
pub fn withdraw_cycles(&mut self, cycles: Cycles) -> Result<(), CallContextError> {
        if self.available_cycles < cycles {
            return Err(CallContextError::InsufficientCyclesInCall {
                available: self.available_cycles,
                requested: cycles,
            });
        }
        self.available_cycles -= cycles;
        Ok(())
    }
pub fn withdraw_cycles ( & mut self , cycles : Cycles ) -> Result < ( ) , CallContextError > { if self . available_cycles < cycles { return Err ( CallContextError :: InsufficientCyclesInCall { available : self . available_cycles , requested : cycles , } ) ; } self . available_cycles -= cycles ; Ok ( ( ) ) }
Updates the available cycles in the call context based on how much
cycles the canister requested to keep.
Updates the available cycles in the call context based on how much cycles the canister requested to keep .
&mut self
cycles
Cycles