[][src]Trait interledger::settlement::LeftoversStore

pub trait LeftoversStore {
    type AccountId;
    type AssetType: ToString;
    fn save_uncredited_settlement_amount(
        &self,
        account_id: Self::AccountId,
        uncredited_settlement_amount: (Self::AssetType, u8)
    ) -> Box<dyn Future<Item = (), Error = ()> + 'static + Send>;
fn load_uncredited_settlement_amount(
        &self,
        account_id: Self::AccountId,
        local_scale: u8
    ) -> Box<dyn Future<Item = Self::AssetType, Error = ()> + 'static + Send>;
fn get_uncredited_settlement_amount(
        &self,
        account_id: Self::AccountId
    ) -> Box<dyn Future<Item = (Self::AssetType, u8), Error = ()> + 'static + Send>; }

Associated Types

Loading content...

Required methods

fn save_uncredited_settlement_amount(
    &self,
    account_id: Self::AccountId,
    uncredited_settlement_amount: (Self::AssetType, u8)
) -> Box<dyn Future<Item = (), Error = ()> + 'static + Send>

Saves the leftover data

fn load_uncredited_settlement_amount(
    &self,
    account_id: Self::AccountId,
    local_scale: u8
) -> Box<dyn Future<Item = Self::AssetType, Error = ()> + 'static + Send>

Returns the leftover data scaled to local_scale from the saved scale. If any precision loss occurs during the scaling, it should be saved as the new leftover value.

fn get_uncredited_settlement_amount(
    &self,
    account_id: Self::AccountId
) -> Box<dyn Future<Item = (Self::AssetType, u8), Error = ()> + 'static + Send>

Loading content...

Implementors

impl LeftoversStore for RedisStore[src]

type AccountId = AccountId

type AssetType = BigUint

Loading content...