Module index
Expand description
A workspace’s index of the records it holds. Ownership of the document is the caller’s business. The reference is what grants access: a member reaches only the records the workspace references, and removing one stops future changes but cannot un-share bytes a peer already synced.
Functions§
- discoverable_
references - A deterministic, resource-bounded view of collaborator-supplied record
names. It reads at most a small fixed prefix of the CRDT map and
returns at most
super::MAX_DISCOVERED_RECORDSvalid entries. It does not open records, create persistence, or join record routes; the caller must make that explicit after choosing a record. - duplicate
- Copy, the explicit verb: mints a new record id rather than reusing
the origin’s. The new document is created empty by the caller’s
next
RecordSet::checkout; this returns the identity to check out. - holds
- Whether this workspace references
id. - reference
- Bring a record name into this workspace. Keyed by record id (not appended to a list) so two machines referencing the same name concurrently converge on one index entry. The document it resolves to remains within this workspace’s scope; this is not a grant to another workspace.
- references
- Every well-formed record this workspace references. This is retained
for callers that already have their own work bound; hosts that learn a
collaborator-supplied index should use
discoverable_referencesinstead. - referencing
- Records this workspace holds that reference
targetunderrelation— how an app finds “the annotations for this document” without a second index. - unreference
- Drop a record’s reference from this workspace. The record itself is untouched — another workspace may hold an independently scoped replica.