pub trait Imbalance {
    type Balance;

    // Required methods
    fn peek(&self) -> Self::Balance;
    fn apply_to(
        &self,
        amount: &mut Option<Self::Balance>
    ) -> Result<(), ImbalanceError>;
}
Expand description

Represents either added or removed value to/from total supply of the currency.

Required Associated Types§

Required Methods§

source

fn peek(&self) -> Self::Balance

Returns imbalance raw value.

source

fn apply_to( &self, amount: &mut Option<Self::Balance> ) -> Result<(), ImbalanceError>

Applies imbalance to some amount.

Implementors§

source§

impl<Balance: BalanceTrait> Imbalance for NegativeImbalance<Balance>

§

type Balance = Balance

source§

impl<Balance: BalanceTrait> Imbalance for PositiveImbalance<Balance>

§

type Balance = Balance