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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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<Price, Balance> Convert<Footprint, Balance> for ConstantStoragePrice<Price, Balance>
impl<Price, Balance> Convert<Footprint, Balance> for ConstantStoragePrice<Price, 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.