[][src]Trait frame_support::traits::OnUnbalanced

pub trait OnUnbalanced<Imbalance: TryDrop> {
    pub fn on_unbalanceds<B>(amounts: impl Iterator<Item = Imbalance>)
        Imbalance: Imbalance<B>
, { ... }
pub fn on_unbalanced(amount: Imbalance) { ... }
pub fn on_nonzero_unbalanced(amount: Imbalance) { ... } }

Handler for when some currency "account" decreased in balance for some reason.

The only reason at present for an increase would be for validator rewards, but there may be other reasons in the future or for other chains.

Reasons for decreases include:

Provided methods

pub fn on_unbalanceds<B>(amounts: impl Iterator<Item = Imbalance>) where
    Imbalance: Imbalance<B>, 

Handler for some imbalances. The different imbalances might have different origins or meanings, dependent on the context. Will default to simply calling on_unbalanced for all of them. Infallible.

pub fn on_unbalanced(amount: Imbalance)

Handler for some imbalance. Infallible.

pub fn on_nonzero_unbalanced(amount: Imbalance)

Actually handle a non-zero imbalance. You probably want to implement this rather than on_unbalanced.

Loading content...

Implementations on Foreign Types

impl<Imbalance: TryDrop> OnUnbalanced<Imbalance> for ()[src]

Loading content...


impl<Balance: From<u32> + Saturating + Div<Output = Balance>, I: Imbalance<Balance>, Part1: U32, Target1: OnUnbalanced<I>, Part2: U32, Target2: OnUnbalanced<I>> OnUnbalanced<I> for SplitTwoWays<Balance, I, Part1, Target1, Part2, Target2>[src]

Loading content...