referrerpolicy=no-referrer-when-downgrade

UnsafeManualAccounting

Trait UnsafeManualAccounting 

pub trait UnsafeManualAccounting<Balance> {
    // Required method
    fn saturating_subsume(
        &mut self,
        other: Box<dyn ImbalanceAccounting<Balance>>,
    );
}
Expand description

Unsafe manual accounting operations for imbalances.

This trait provides low-level operations that can violate imbalance invariants if misused. These methods are separated into their own trait to make it explicit when unsafe operations are being performed.

Required Methods§

fn saturating_subsume(&mut self, other: Box<dyn ImbalanceAccounting<Balance>>)

Saturating add other imbalance to the inner imbalance.

The caller is responsible for making sure self and other are compatible concrete types. Compatible meaning both self and other imbalances are equivalent types with same imbalance resolution implementation.

Implementors§

§

impl<A, B, OnDrop, OppositeOnDrop> UnsafeManualAccounting<u128> for polkadot_sdk_frame::token::fungibles::Imbalance<A, B, OnDrop, OppositeOnDrop>
where A: AssetId + 'static, B: Balance + 'static, OnDrop: HandleImbalanceDrop<A, B> + 'static, OppositeOnDrop: HandleImbalanceDrop<A, B> + 'static,

§

impl<B, OnDrop, OppositeOnDrop> UnsafeManualAccounting<u128> for polkadot_sdk_frame::token::fungible::Imbalance<B, OnDrop, OppositeOnDrop>
where B: Balance + 'static, OnDrop: HandleImbalanceDrop<B> + 'static, OppositeOnDrop: HandleImbalanceDrop<B> + 'static,