Macro stp258_traits::parameter_type_with_key [−][src]
Create new implementations of the GetByKey
trait.
The implementation is typically used like a map or set.
Example:
ⓘ
use primitives::CurrencyId; parameter_type_with_key! { pub Rates: |currency_id: CurrencyId| -> u32 { match currency_id { CurrencyId::DOT => 1, CurrencyId::KSM => 2, _ => 3, } } }