referrerpolicy=no-referrer-when-downgrade
emulated_integration_tests_common::macros

Trait WeightToFee

pub trait WeightToFee {
    type Balance: BaseArithmetic + From<u32> + Copy + Unsigned;

    // Required method
    fn weight_to_fee(weight: &Weight) -> Self::Balance;
}
Expand description

A trait that describes the weight to fee calculation.

Required Associated Types§

type Balance: BaseArithmetic + From<u32> + Copy + Unsigned

The type that is returned as result from calculation.

Required Methods§

fn weight_to_fee(weight: &Weight) -> Self::Balance

Calculates the fee from the passed weight.

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.

Implementors§

§

impl<T> WeightToFee for IdentityFee<T>
where T: BaseArithmetic + From<u32> + Copy + Unsigned,

§

type Balance = T

§

impl<T> WeightToFee for T
where T: WeightToFeePolynomial,

§

type Balance = <T as WeightToFeePolynomial>::Balance

§

impl<T, M> WeightToFee for ConstantMultiplier<T, M>
where T: BaseArithmetic + From<u32> + Copy + Unsigned, M: Get<T>,

§

type Balance = T

§

impl<const F: u32, T> WeightToFee for FixedFee<F, T>
where T: BaseArithmetic + From<u32> + Copy + Unsigned,

§

type Balance = T

impl WeightToFee for WeightToFee

impl WeightToFee for WeightToFee