referrerpolicy=no-referrer-when-downgrade

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§

source

fn convert(a: A) -> B

Make conversion.

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<()>> for FullIdentificationOf

source§

impl Convert<u16, u32> for Geometric

source§

impl Convert<u16, u32> for Linear

source§

impl Convert<u16, u32> for Unit

source§

impl Convert<u128, U256> for BalanceToU256

source§

fn convert(n: u128) -> U256

source§

impl Convert<u128, U256> for BalanceToU256

source§

fn convert(n: u128) -> U256

source§

impl Convert<Public, Vec<u8>> for BeefyEcdsaToEthereum

source§

fn convert(beefy_id: Public) -> Vec<u8>

source§

impl Convert<U256, u128> for U256ToBalance

source§

fn convert(n: U256) -> u128

source§

impl Convert<U256, u128> for U256ToBalance

source§

fn convert(n: U256) -> u128

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>,

source§

impl<A, B> Convert<A, B> for ()
where B: Default,

source§

fn convert(_: A) -> B

source§

impl<AssetId> Convert<NativeOrWithId<AssetId>, Either<(), AssetId>> for NativeFromLeft
where AssetId: Ord,

source§

fn convert(asset: NativeOrWithId<AssetId>) -> Either<(), AssetId>

source§

impl<Balance, Fixed, Inc> Convert<usize, Balance> for GeometricDepositBase<Balance, Fixed, Inc>
where Balance: FixedPointOperand, Fixed: Get<Balance>, Inc: Get<Percent>,

source§

fn convert(queue_len: usize) -> Balance

source§

impl<Base, Slope, Balance> Convert<Footprint, Balance> for LinearStoragePrice<Base, Slope, Balance>
where Base: Get<Balance>, Slope: Get<Balance>, Balance: From<u64> + Saturating,

source§

fn convert(a: Footprint) -> Balance

source§

impl<M> Convert<FixedU128, FixedU128> for ConstFeeMultiplier<M>
where M: Get<FixedU128>,

source§

impl<T> Convert<<T as Config>::AccountId, Option<<T as Config>::AccountId>> for StashOf<T>
where T: Config,

source§

fn convert( controller: <T as Config>::AccountId, ) -> Option<<T as Config>::AccountId>

source§

impl<T> Convert<<T as Config>::AccountId, Option<Exposure<<T as Config>::AccountId, <T as Config>::CurrencyBalance>>> for ExposureOf<T>
where T: Config,

source§

fn convert( validator: <T as Config>::AccountId, ) -> Option<Exposure<<T as Config>::AccountId, <T as Config>::CurrencyBalance>>

source§

impl<T> Convert<Perquintill, u32> for NoCounterpart<T>

source§

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

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.

source§

impl<T, S, V, M, X> Convert<FixedU128, FixedU128> for TargetedFeeAdjustment<T, S, V, M, X>
where T: Config, S: Get<Perquintill>, V: Get<FixedU128>, M: Get<FixedU128>, X: Get<FixedU128>,

Implementors§

source§

impl<A, B> Convert<A, B> for ConvertInto
where A: Into<B>,

source§

impl<T> Convert<T, T> for Identity

source§

impl<X, Y, T> Convert<X, Y> for ConvertToValue<T>
where T: Get<Y>,