Skip to main content

Module commit_envelope

Module commit_envelope 

Source
Expand description

Per-commit wire envelope and entity-change variants.

Engine-owned value types in the memstead-base::ops family (sibling to Diff, ChangeEnvelope, MemChangedEvent).

Mirrors the browser-sync JSON shapes one-to-one: the commit envelope and the SSE event.

Two producers exist today:

  • Native embedders — walk a git-branch tree-diff to build envelopes from native repos for thin-client consumers.
  • WASM clients — receive envelopes over the bridge wire and pass them to crate::Engine::apply_external_commit to materialize the new state in their in-memory store.

Field order matches the spec; field names are the canonical wire identifiers — do not rename or reshape without bumping the wire-format version.

Structs§

CommitEnvelope
One commit’s wire envelope. JSON example from the spec:

Enums§

EntityChange
One entity-level change carried by a CommitEnvelope. Tagged via the op discriminator so the wire shape matches the spec’s { "op": "...", ... } envelope.