Skip to main content

Module crdt_vibed_length

Module crdt_vibed_length 

Source
Expand description

Length-based FugueMax CRDT.

Unlike crate::crdt_vibed_not_length, the CRDT here stores no text at all — only byte lengths and byte positions. Local edits return Insertion/Deletion values to send to other replicas, and integrating a remote op returns BufferEdits telling the caller what to do to its own text buffer. Note [Spans]

§References:

Structs§

Deletion
A replica’s deletion of a set of bytes, in CRDT coordinates: the exact ids of the deleted bytes, as runs of temporally-consecutive ids. Note [Deletion by id]
Insertion
A replica’s insertion of a run of bytes, in CRDT coordinates. Carries no text: the caller pairs the op with the inserted text, identified by author and bytes.
Replica
ReplicaId

Enums§

BufferEdit
An edit to apply to the text buffer paired with a Replica. Produced by the integrate_* methods; apply edits in the order given.