referrerpolicy=no-referrer-when-downgrade

Module imbalance

Module imbalance 

Expand description

The imbalance trait type and its associates, which handles keeps everything adding up properly with unbalanced operations.

Structs§

MaybeResolveAssetTo
Resolves received asset credit to account Target if Target::get() returns some, implementing OnUnbalanced.
ResolveAssetTo
Resolves received asset credit to account A, implementing OnUnbalanced.
ResolveTo
Resolves received asset credit to account A, implementing OnUnbalanced.
SplitTwoWays
Split an unbalanced amount two ways between a common divisor.

Enums§

SignedImbalance
Either a positive or a negative imbalance.

Traits§

Imbalance
A trait for a not-quite Linear Type that tracks an imbalance.
ImbalanceAccounting
Helper trait to be used for generic Imbalance, helpful for tracking multiple concrete types of Imbalance using dynamic dispatch of this trait.
OnUnbalanced
Handler for when some currency “account” decreased in balance for some reason.
TryMerge
Try to merge two imbalances.
UnsafeConstructorDestructor
Unsafe imbalance cloning constructor and forgetful destructor.
UnsafeManualAccounting
Unsafe manual accounting operations for imbalances.