referrerpolicy=no-referrer-when-downgrade

Trait polkadot_sdk_frame::traits::tokens::imbalance::TryMerge

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§

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§

§

impl TryMerge for ()

§

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

Implementors§

§

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

§

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