Trait holochain_types::prelude::builder::ActionBuilder
source · pub trait ActionBuilder<U>: Sizedwhere
U: ActionUnweighed,{
// Required method
fn build(self, common: ActionBuilderCommon) -> U;
}
Expand description
Builder for non-genesis Actions
SourceChain::put takes one of these rather than a raw Action, so that it
can inject the proper values via ActionBuilderCommon
, rather than requiring
surrounding code to construct a proper Action outside of the context of
the SourceChain.
Genesis actions cannot be built with this method, because the way
SourceChain is written, the agent key is not known until after genesis is
performed, and the agent key is one of the values injected rather than
provided by this builder. (There is also the problem that the Dna action
is a special case as it has no prev_action
, and generalizing
ActionBuilderCommon
just to make that optional is a bit inconvenient.)
SourceChain::genesis
already handles genesis in one fell swoop.
Required Methods§
fn build(self, common: ActionBuilderCommon) -> U
Object Safety§
This trait is not object safe.