Trait polkadot_service::runtime_traits::Convert
source · pub trait Convert<A, B> {
// Required method
fn convert(a: A) -> B;
}
Expand description
Infallible conversion trait. Generic over both source and destination types.
Required Methods§
Implementations on Foreign Types§
source§impl<A> Convert<Perquintill, <A as TypedGet>::Type> for WithMaximumOf<A>where
A: TypedGet,
<A as TypedGet>::Type: Clone + Unsigned + From<u64>,
u64: TryFrom<<A as TypedGet>::Type>,
impl<A> Convert<Perquintill, <A as TypedGet>::Type> for WithMaximumOf<A>where A: TypedGet, <A as TypedGet>::Type: Clone + Unsigned + From<u64>, u64: TryFrom<<A as TypedGet>::Type>,
source§impl<T> Convert<Perquintill, u32> for NoCounterpart<T>
impl<T> Convert<Perquintill, u32> for NoCounterpart<T>
fn convert(_: Perquintill) -> u32
source§impl<T> Convert<<T as Config>::AccountId, Option<<T as Config>::AccountId>> for StashOf<T>where
T: Config,
impl<T> Convert<<T as Config>::AccountId, Option<<T as Config>::AccountId>> for StashOf<T>where T: Config,
source§impl<T> Convert<<T as Config>::AccountId, Option<Exposure<<T as Config>::AccountId, <T as Config>::CurrencyBalance>>> for ExposureOf<T>where
T: Config,
impl<T> Convert<<T as Config>::AccountId, Option<Exposure<<T as Config>::AccountId, <T as Config>::CurrencyBalance>>> for ExposureOf<T>where T: Config,
source§impl<T> Convert<Weight, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>where
T: Config,
impl<T> Convert<Weight, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>where T: Config,
source§fn convert(
weight: Weight
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
fn convert( weight: Weight ) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
Compute the fee for the specified weight.
This fee is already adjusted by the per block fee adjustment factor and is therefore the share that the weight contributes to the overall fee of a transaction. It is mainly for informational purposes and not used in the actual fee calculation.