[][src]Trait interledger_service_util::BalanceStore

pub trait BalanceStore: AccountStore {
    fn get_balance(
        &self,
        account: Self::Account
    ) -> Box<dyn Future<Item = i64, Error = ()> + Send>;
fn update_balances_for_prepare(
        &self,
        from_account: Self::Account,
        incoming_amount: u64
    ) -> Box<dyn Future<Item = (), Error = ()> + Send>;
fn update_balances_for_fulfill(
        &self,
        to_account: Self::Account,
        outgoing_amount: u64
    ) -> Box<dyn Future<Item = (i64, u64), Error = ()> + Send>;
fn update_balances_for_reject(
        &self,
        from_account: Self::Account,
        incoming_amount: u64
    ) -> Box<dyn Future<Item = (), Error = ()> + Send>; }

Required methods

fn get_balance(
    &self,
    account: Self::Account
) -> Box<dyn Future<Item = i64, Error = ()> + Send>

Fetch the current balance for the given account.

fn update_balances_for_prepare(
    &self,
    from_account: Self::Account,
    incoming_amount: u64
) -> Box<dyn Future<Item = (), Error = ()> + Send>

fn update_balances_for_fulfill(
    &self,
    to_account: Self::Account,
    outgoing_amount: u64
) -> Box<dyn Future<Item = (i64, u64), Error = ()> + Send>

Increases the account's balance, and returns the updated balance along with the amount which should be settled

fn update_balances_for_reject(
    &self,
    from_account: Self::Account,
    incoming_amount: u64
) -> Box<dyn Future<Item = (), Error = ()> + Send>

Loading content...

Implementors

Loading content...