pub trait ActionPrimitive {
// Required methods
fn manifest(&self) -> &ActionPrimitiveManifest;
fn execute(
&self,
inputs: &HashMap<String, ActionValue>,
parameters: &HashMap<String, ParameterValue>,
) -> HashMap<String, ActionValue>;
}Expand description
An action primitive that performs effects keyed by inputs and parameters.
Statelessness is enforced at registration by manifest validation
(ACT-10, state.allowed == false) and at runtime by capture/replay.
Structural enforcement on top (derive macros, marker traits, newtype
wrappers) was considered and rejected; see
docs/ledger/decisions/rejected-structural-enforcement-of-statelessness.md.
Required Methods§
fn manifest(&self) -> &ActionPrimitiveManifest
fn execute( &self, inputs: &HashMap<String, ActionValue>, parameters: &HashMap<String, ParameterValue>, ) -> HashMap<String, ActionValue>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".