Struct frame_support::traits::SplitTwoWays
source · [−]pub struct SplitTwoWays<Balance, Imbalance, Part1, Target1, Part2, Target2>(_);
Expand description
Split an unbalanced amount two ways between a common divisor.
Trait Implementations
sourceimpl<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>
sourcefn on_nonzero_unbalanced(amount: I)
fn on_nonzero_unbalanced(amount: I)
Actually handle a non-zero imbalance. You probably want to implement this rather than
on_unbalanced
. Read more
sourcefn on_unbalanceds<B>(amounts: impl Iterator<Item = Imbalance>) where
Imbalance: Imbalance<B>,
fn on_unbalanceds<B>(amounts: impl Iterator<Item = Imbalance>) where
Imbalance: Imbalance<B>,
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
sourcefn on_unbalanced(amount: Imbalance)
fn on_unbalanced(amount: Imbalance)
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
. Read more
sourcefn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcepub fn unique_saturated_into(self) -> T
pub fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.