pub enum HandleFeeMode {
Pay {
initiator_addr: Box<InitiatorAddr>,
source: Box<BalanceIdentifier>,
target: Box<BalanceIdentifier>,
amount: U512,
},
Burn {
source: BalanceIdentifier,
amount: Option<U512>,
},
Credit {
validator: Box<PublicKey>,
amount: U512,
era_id: EraId,
},
}Expand description
Handle fee mode.
Variants§
Pay
Pay the fee.
Fields
§
initiator_addr: Box<InitiatorAddr>Initiator.
§
source: Box<BalanceIdentifier>Source.
§
target: Box<BalanceIdentifier>Target.
Burn
Burn the fee.
Credit
Validator credit (used in no fee mode).
Implementations§
Source§impl HandleFeeMode
impl HandleFeeMode
Sourcepub fn pay(
initiator_addr: Box<InitiatorAddr>,
source: BalanceIdentifier,
target: BalanceIdentifier,
amount: U512,
) -> Self
pub fn pay( initiator_addr: Box<InitiatorAddr>, source: BalanceIdentifier, target: BalanceIdentifier, amount: U512, ) -> Self
Ctor for Pay mode.
Sourcepub fn burn(source: BalanceIdentifier, amount: Option<U512>) -> Self
pub fn burn(source: BalanceIdentifier, amount: Option<U512>) -> Self
What source should be used to burn from, and how much? If amount is None or greater than the available balance, the full available balance will be burned. If amount is less than available balance, only that much will be burned leaving a remaining balance.
Trait Implementations§
Source§impl Clone for HandleFeeMode
impl Clone for HandleFeeMode
Source§fn clone(&self) -> HandleFeeMode
fn clone(&self) -> HandleFeeMode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandleFeeMode
impl Debug for HandleFeeMode
Source§impl PartialEq for HandleFeeMode
impl PartialEq for HandleFeeMode
impl Eq for HandleFeeMode
impl StructuralPartialEq for HandleFeeMode
Auto Trait Implementations§
impl Freeze for HandleFeeMode
impl RefUnwindSafe for HandleFeeMode
impl Send for HandleFeeMode
impl Sync for HandleFeeMode
impl Unpin for HandleFeeMode
impl UnwindSafe for HandleFeeMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more