referrerpolicy=no-referrer-when-downgrade

Trait frame_support::weights::WeightToFee

source ·
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§

source

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

The type that is returned as result from calculation.

Required Methods§

source

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

Calculates the fee from the passed weight.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> WeightToFee for IdentityFee<T>

§

type Balance = T

source§

impl<T> WeightToFee for T

source§

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

§

type Balance = T

source§

impl<const F: u32, T> WeightToFee for FixedFee<F, T>

§

type Balance = T