Trait frame_support::dispatch::WeighData

source ·
pub trait WeighData<T> {
    // Required method
    fn weigh_data(&self, target: T) -> Weight;
}
Expand description

Means of weighing some particular kind of data (T).

Required Methods§

source

fn weigh_data(&self, target: T) -> Weight

Weigh the data T given by target. When implementing this for a dispatchable, T will be a tuple of all arguments given to the function (except origin).

Implementations on Foreign Types§

source§

impl<T> WeighData<T> for (u64, DispatchClass)

source§

fn weigh_data(&self, args: T) -> Weight

source§

impl<T> WeighData<T> for (u64, DispatchClass, Pays)

source§

fn weigh_data(&self, args: T) -> Weight

source§

impl<T> WeighData<T> for (u64, Pays)

source§

fn weigh_data(&self, args: T) -> Weight

source§

impl<T> WeighData<T> for (Weight, DispatchClass)

source§

fn weigh_data(&self, args: T) -> Weight

source§

impl<T> WeighData<T> for (Weight, DispatchClass, Pays)

source§

fn weigh_data(&self, args: T) -> Weight

source§

impl<T> WeighData<T> for (Weight, Pays)

source§

fn weigh_data(&self, args: T) -> Weight

source§

impl<T> WeighData<T> for u64

source§

fn weigh_data(&self, _: T) -> Weight

Implementors§

source§

impl<T> WeighData<T> for Weight