pub fn hold(&mut self, amount: f64) -> Result<()> {
        if amount > self.available_balance {
            return Err(Error::InssuficientFunds);
        }
        self.available_balance -= amount;
        self.held_balance += amount;
        Ok(())
    }
/// Put some of the client's funds in holding
/// This function updates the client's available, held and total balance
Put some of the client's funds in holding
This function updates the client's available, held and total balance
Put some of the client ' s funds in holding This function updates the client ' s available held and total balance
pub fn hold(&mut self, amount: f64) -> Result<()> {
        if amount > self.available_balance {
            return Err(Error::InssuficientFunds);
        }
        self.available_balance -= amount;
        self.held_balance += amount;
        Ok(())
    }
pub fn hold ( & mut self , amount : f64 ) -> Result < ( ) > { if amount > self . available_balance { return Err ( Error :: InssuficientFunds ) ; } self . available_balance -= amount ; self . held_balance += amount ; Ok ( ( ) ) }
Put some of the client's funds in holding
This function updates the client's available, held and total balance
Put some of the client ' s funds in holding This function updates the client ' s available held and total balance
&mut self
amount
f64
&mut self
amount
f64