pub trait TryMerge: Sized {
    // Required method
    fn try_merge(self, other: Self) -> Result<Self, (Self, Self)>;
}
Expand description

Try to merge two imbalances.

Required Methods§

source

fn try_merge(self, other: Self) -> Result<Self, (Self, Self)>

Consume self and an other to return a new instance that combines both. Errors with Err(self, other) if the imbalances cannot be merged (e.g. imbalances of different assets).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TryMerge for ()

source§

fn try_merge(self, _: Self) -> Result<Self, (Self, Self)>

Implementors§

source§

impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> TryMerge for frame_support::traits::tokens::fungibles::Imbalance<A, B, OnDrop, OppositeOnDrop>

source§

impl<B: Balance, OnDrop: HandleImbalanceDrop<B>, OppositeOnDrop: HandleImbalanceDrop<B>> TryMerge for frame_support::traits::tokens::fungible::Imbalance<B, OnDrop, OppositeOnDrop>