pub trait ActionUnweighed: Sized {
    type Weighed: ActionWeighed;
    type Weight: Default;

    fn weighed(self, weight: Self::Weight) -> Self::Weighed;
}
Expand description

A trait to unify the “inner” parts of an Action, i.e. the structs inside the Action enum’s variants. This trait is used for the “unweighed” version of each struct, i.e. the version with weight information erased.

Action types with no weight are considered “weighed” and “unweighed” at the same time, but types with weight have distinct types for the weighed and unweighed versions.

Required Associated Types

Required Methods

Add a weight to this unweighed action, making it “weighed”. The weight is determined by the weigh callback, which is run on the unweighed version of this action.

Implementors