Skip to main content

Module command

Module command 

Source
Expand description

The command model.

Every mutation to a Model is a ModelCommand. Nothing else may touch the store. That single rule is what buys undo, audit, replay, deterministic export, and — later — multi-user sync, none of which can be retrofitted onto ad-hoc mutation (docs/ifc-semantics.md §5).

Every variant has an exact inverse. CreateElement carries the whole record, so deleting and undoing restores the element byte-for-byte rather than approximately. SetName and SetProperty take Option, so setting and clearing are the same operation in opposite directions.

Structs§

CommandOutcome
What happened when a command was applied.

Enums§

CommandError
Why a command was rejected.
ModelCommand
A single durable edit.