Enum frame_support::traits::tokens::imbalance::SignedImbalance [−][src]
pub enum SignedImbalance<B, PositiveImbalance: Imbalance<B>> { Positive(PositiveImbalance), Negative(PositiveImbalance::Opposite), }
Expand description
Either a positive or a negative imbalance.
Variants
A positive imbalance (funds have been created but none destroyed).
Negative(PositiveImbalance::Opposite)
A negative imbalance (funds have been destroyed but none created).
Implementations
impl<P: Imbalance<B, Opposite = N>, N: Imbalance<B, Opposite = P>, B: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default> SignedImbalance<B, P>
impl<P: Imbalance<B, Opposite = N>, N: Imbalance<B, Opposite = P>, B: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default> SignedImbalance<B, P>
Drop Self
if and only if it is equal to zero. Return Err
with Self
if not.
Auto Trait Implementations
impl<B, PositiveImbalance> RefUnwindSafe for SignedImbalance<B, PositiveImbalance> where
PositiveImbalance: RefUnwindSafe,
<PositiveImbalance as Imbalance<B>>::Opposite: RefUnwindSafe,
impl<B, PositiveImbalance> Send for SignedImbalance<B, PositiveImbalance> where
PositiveImbalance: Send,
<PositiveImbalance as Imbalance<B>>::Opposite: Send,
impl<B, PositiveImbalance> Sync for SignedImbalance<B, PositiveImbalance> where
PositiveImbalance: Sync,
<PositiveImbalance as Imbalance<B>>::Opposite: Sync,
impl<B, PositiveImbalance> Unpin for SignedImbalance<B, PositiveImbalance> where
PositiveImbalance: Unpin,
<PositiveImbalance as Imbalance<B>>::Opposite: Unpin,
impl<B, PositiveImbalance> UnwindSafe for SignedImbalance<B, PositiveImbalance> where
PositiveImbalance: UnwindSafe,
<PositiveImbalance as Imbalance<B>>::Opposite: 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