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§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
§impl Convert<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, Option<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId>> for ValidatorIdOf
impl Convert<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, Option<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId>> for ValidatorIdOf
fn convert( a: <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ) -> Option<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId>
§impl Convert<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, Option<()>> for FullIdentificationOf
impl Convert<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, Option<()>> for FullIdentificationOf
fn convert( _: <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ) -> Option<()>
source§impl<A> Convert<Perquintill, <A as TypedGet>::Type> for WithMaximumOf<A>
impl<A> Convert<Perquintill, <A as TypedGet>::Type> for WithMaximumOf<A>
source§impl<AssetId> Convert<NativeOrWithId<AssetId>, Either<(), AssetId>> for NativeFromLeftwhere
AssetId: Ord,
impl<AssetId> Convert<NativeOrWithId<AssetId>, Either<(), AssetId>> for NativeFromLeftwhere
AssetId: Ord,
source§impl<Balance, Fixed, Inc> Convert<usize, Balance> for GeometricDepositBase<Balance, Fixed, Inc>
impl<Balance, Fixed, Inc> Convert<usize, Balance> for GeometricDepositBase<Balance, Fixed, Inc>
source§impl<Base, Slope, Balance> Convert<Footprint, Balance> for LinearStoragePrice<Base, Slope, Balance>
impl<Base, Slope, Balance> Convert<Footprint, Balance> for LinearStoragePrice<Base, Slope, Balance>
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<Perquintill, u32> for NoCounterpart<T>
impl<T> Convert<Perquintill, u32> for NoCounterpart<T>
fn convert(_: Perquintill) -> u32
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.