[][src]Trait sunshine_util::traits::ChangeBankBalances

pub trait ChangeBankBalances<Currency, FineArithmetic> {
    type Bank: DepositWithdrawalOps<Currency, FineArithmetic>;
    fn make_deposit_to_update_bank_balance(
        bank: Self::Bank,
        amount: Currency,
        pct_savings: Option<FineArithmetic>
    ) -> Self::Bank;
fn request_withdrawal_to_update_bank_balance(
        bank: Self::Bank,
        amount: Currency,
        savings: bool,
        reserved_for_spends: bool
    ) -> Result<Self::Bank, DispatchError>; }

Associated Types

type Bank: DepositWithdrawalOps<Currency, FineArithmetic>

Loading content...

Required methods

fn make_deposit_to_update_bank_balance(
    bank: Self::Bank,
    amount: Currency,
    pct_savings: Option<FineArithmetic>
) -> Self::Bank

fn request_withdrawal_to_update_bank_balance(
    bank: Self::Bank,
    amount: Currency,
    savings: bool,
    reserved_for_spends: bool
) -> Result<Self::Bank, DispatchError>

Loading content...

Implementors

Loading content...