Trait holochain_zome_types::action::ActionUnweighed
source · [−]pub trait ActionUnweighed {
type Weighed: ActionWeighed;
type Weight: Default;
fn weighed(self, weight: Self::Weight) -> Self::Weighed;
fn weightless(self) -> 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
Provided Methods
fn weightless(self) -> Self::Weighed
fn weightless(self) -> Self::Weighed
Add zero weight to this unweighed action, making it “weighed”.