Skip to main content

Module state

Module state 

Modules§

collab
diagnostics
Stable, serializable projections for state inspection and structured logs.
revision
Persistent, branch-preserving history derived from an Automerge document.

Structs§

CollaborationState
DocumentDiagnostics
DocumentFrontier
An explicit outbound synchronization frontier for one document route.
DocumentReplica
A CRDT document paired with the explicit frontier for one collaboration route. This is the small, undo-free replica used by metadata documents such as room indexes; application documents add history through State.
FrontierDiagnostics
RemoteCursor
Revision
One node in a document’s causal revision graph.
RevisionHistory
A causal-order snapshot of all revisions retained by a document.
RevisionId
Stable, content-addressed identifier for one document revision.
State
The unified state object that holds our CRDT document.
UndoEntry
One step of the history as a window shows it: the changes it brackets, where the caret was, and who made it.
UndoLog
A document’s undo, as one window drives it. See the module docs.
UnknownRevision
A revision id from another document or from discarded/corrupt input.

Functions§

write_patches
Write an already-derived patch set forward into doc’s open transaction.
write_revert_patches
Write the delta that leads from from_heads to to_heads into doc’s open transaction, without committing.
write_revert_patches_where
write_revert_patches for only the patches keep accepts: a restore of some items of a past version, or of everything but bookkeeping. The rest stay in the patch stream unwritten, so the indices of later sequence patches still line up. Returns how many patches were written.