Struct frame_support::traits::tokens::imbalance::SplitTwoWays [−][src]
pub struct SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2>(_);
Expand description
Split an unbalanced amount two ways between a common divisor.
Trait Implementations
impl<Balance: From<u32> + Saturating + Div<Output = Balance>, I: Imbalance<Balance>, Part1: U32, Target1: OnUnbalanced<I>, Part2: U32, Target2: OnUnbalanced<I>> OnUnbalanced<I> for SplitTwoWays<Balance, I, Part1, Target1, Part2, Target2>
impl<Balance: From<u32> + Saturating + Div<Output = Balance>, I: Imbalance<Balance>, Part1: U32, Target1: OnUnbalanced<I>, Part2: U32, Target2: OnUnbalanced<I>> OnUnbalanced<I> for SplitTwoWays<Balance, I, Part1, Target1, Part2, Target2>
Actually handle a non-zero imbalance. You probably want to implement this rather than
on_unbalanced
. Read more
Handler for some imbalances. The different imbalances might have different origins or meanings, dependent on the context. Will default to simply calling on_unbalanced for all of them. Infallible. Read more
Handler for some imbalance. Infallible.
Auto Trait Implementations
impl<Balance, Imbalance, Part1, Target1, Part2, Target2> RefUnwindSafe for SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2> where
Balance: RefUnwindSafe,
Imbalance: RefUnwindSafe,
Part1: RefUnwindSafe,
Part2: RefUnwindSafe,
Target1: RefUnwindSafe,
Target2: RefUnwindSafe,
impl<Balance, Imbalance, Part1, Target1, Part2, Target2> Send for SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2> where
Balance: Send,
Imbalance: Send,
Part1: Send,
Part2: Send,
Target1: Send,
Target2: Send,
impl<Balance, Imbalance, Part1, Target1, Part2, Target2> Sync for SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2> where
Balance: Sync,
Imbalance: Sync,
Part1: Sync,
Part2: Sync,
Target1: Sync,
Target2: Sync,
impl<Balance, Imbalance, Part1, Target1, Part2, Target2> Unpin for SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2> where
Balance: Unpin,
Imbalance: Unpin,
Part1: Unpin,
Part2: Unpin,
Target1: Unpin,
Target2: Unpin,
impl<Balance, Imbalance, Part1, Target1, Part2, Target2> UnwindSafe for SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2> where
Balance: UnwindSafe,
Imbalance: UnwindSafe,
Part1: UnwindSafe,
Part2: UnwindSafe,
Target1: UnwindSafe,
Target2: 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