Trait 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.

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§