Trait cfg_traits::rewards::CurrencyGroupChange
source · pub trait CurrencyGroupChange {
type GroupId;
type CurrencyId;
// Required methods
fn attach_currency(
currency_id: Self::CurrencyId,
group_id: Self::GroupId
) -> DispatchResult;
fn currency_group(currency_id: Self::CurrencyId) -> Option<Self::GroupId>;
}
Expand description
Support for change currencies among groups.
Required Associated Types§
sourcetype CurrencyId
type CurrencyId
Type used to identify the currency.
Required Methods§
sourcefn attach_currency(
currency_id: Self::CurrencyId,
group_id: Self::GroupId
) -> DispatchResult
fn attach_currency( currency_id: Self::CurrencyId, group_id: Self::GroupId ) -> DispatchResult
Associate the currency to a group. If the currency was previously associated to another group, the associated stake is moved to the new group.
sourcefn currency_group(currency_id: Self::CurrencyId) -> Option<Self::GroupId>
fn currency_group(currency_id: Self::CurrencyId) -> Option<Self::GroupId>
Returns the associated group of a currency.
Object Safety§
This trait is not object safe.