Struct frame_support::traits::tokens::fungibles::Imbalance [−][src]
pub struct Imbalance<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> { /* fields omitted */ }
Expand description
An imbalance in the system, representing a divergence of recorded token supply from the sum of
the balances of all accounts. This is must_use
in order to ensure it gets handled (placing
into an account, settling from an account or altering the supply).
Importantly, it has a special Drop
impl, and cannot be created outside of this module.
Implementations
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> Imbalance<A, B, OnDrop, OppositeOnDrop>
Trait Implementations
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> Debug for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: Debug,
B: Debug,
OnDrop: Debug,
OppositeOnDrop: Debug,
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> Debug for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: Debug,
B: Debug,
OnDrop: Debug,
OppositeOnDrop: Debug,
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> Drop for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> Drop for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: PartialEq + AssetId, B: PartialEq + Balance, OnDrop: PartialEq + HandleImbalanceDrop<A, B>, OppositeOnDrop: PartialEq + HandleImbalanceDrop<A, B>> PartialEq<Imbalance<A, B, OnDrop, OppositeOnDrop>> for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: PartialEq + AssetId, B: PartialEq + Balance, OnDrop: PartialEq + HandleImbalanceDrop<A, B>, OppositeOnDrop: PartialEq + HandleImbalanceDrop<A, B>> PartialEq<Imbalance<A, B, OnDrop, OppositeOnDrop>> for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> TryDrop for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> TryDrop for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: Eq + AssetId, B: Eq + Balance, OnDrop: Eq + HandleImbalanceDrop<A, B>, OppositeOnDrop: Eq + HandleImbalanceDrop<A, B>> Eq for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> StructuralEq for Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> StructuralPartialEq for Imbalance<A, B, OnDrop, OppositeOnDrop>
Auto Trait Implementations
impl<A, B, OnDrop, OppositeOnDrop> RefUnwindSafe for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: RefUnwindSafe,
B: RefUnwindSafe,
OnDrop: RefUnwindSafe,
OppositeOnDrop: RefUnwindSafe,
impl<A, B, OnDrop, OppositeOnDrop> Send for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: Send,
B: Send,
OnDrop: Send,
OppositeOnDrop: Send,
impl<A, B, OnDrop, OppositeOnDrop> Sync for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: Sync,
B: Sync,
OnDrop: Sync,
OppositeOnDrop: Sync,
impl<A, B, OnDrop, OppositeOnDrop> Unpin for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: Unpin,
B: Unpin,
OnDrop: Unpin,
OppositeOnDrop: Unpin,
impl<A, B, OnDrop, OppositeOnDrop> UnwindSafe for Imbalance<A, B, OnDrop, OppositeOnDrop> where
A: UnwindSafe,
B: UnwindSafe,
OnDrop: UnwindSafe,
OppositeOnDrop: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,