Trait Convert
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§
fn convert(a: A) -> B
fn convert(a: A) -> B
Make conversion.
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<Id, AggregateMessageOrigin> for ParaIdToSibling
impl Convert<Id, AggregateMessageOrigin> for ParaIdToSibling
fn convert(para_id: Id) -> AggregateMessageOrigin
§impl<AssetId> Convert<NativeOrWithId<AssetId>, Either<(), AssetId>> for NativeFromLeftwhere
AssetId: Ord,
impl<AssetId> Convert<NativeOrWithId<AssetId>, Either<(), AssetId>> for NativeFromLeftwhere
AssetId: Ord,
§impl<Base, Slope, Balance> Convert<Footprint, Balance> for LinearStoragePrice<Base, Slope, Balance>
impl<Base, Slope, Balance> Convert<Footprint, Balance> for LinearStoragePrice<Base, Slope, Balance>
§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,
§impl<T> Convert<<T as Config>::AccountId, Option<ExistenceOrLegacyExposure<<T as Config>::AccountId, <T as Config>::CurrencyBalance>>> for ExistenceOrLegacyExposureOf<T>where
T: Config,
impl<T> Convert<<T as Config>::AccountId, Option<ExistenceOrLegacyExposure<<T as Config>::AccountId, <T as Config>::CurrencyBalance>>> for ExistenceOrLegacyExposureOf<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,
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<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,
§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.