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>>)
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.