Skip to main content

ActionStep

Type Alias ActionStep 

Source
pub type ActionStep = (Box<dyn Action>, Vec<u8>);
Expand description

A value that deterministically mutates a CRDT Doc.

apply MUST be a pure function of (self, doc-state) — no wall-clock reads, no RNG, no local-only state — and MUST NOT commit; the executor owns the commit boundary (actor id + timestamp) so the change is content-addressed identical everywhere.

Concrete actions are app-defined enums deriving Serialize/ Deserialize, registered by type_id in an ActionRegistry so a replaying peer can reconstruct them. One step of an action that stands for several (Action::steps): the action, and its payload under the type of the action it is a step of.