[−][src]Module xi_rope::engine
An engine for handling edits (possibly from async sources) and undo. It conceptually represents the current text and all edit history for that text.
This module actually implements a mini Conflict-free Replicated Data Type
under Engine::edit_rev
, which is considerably simpler than the usual
CRDT implementation techniques, because all operations are serialized in
this central engine. It provides the ability to apply edits that depend on
a previously committed version of the text rather than the current text,
which is sufficient for asynchronous plugins that can only have one
pending edit in flight each.
There is also a full CRDT merge operation implemented under
Engine::merge
, which is more powerful but considerably more complex.
It enables support for full asynchronous and even peer-to-peer editing.
Structs
Engine | Represents the current state of a document and all of its history |
RevId |
Enums
Error | Type for errors that occur during CRDT operations. |
Type Definitions
RevToken | Valid within a session. If there's a collision the most recent matching Revision will be used, which means only the (small) set of concurrent edits could trigger incorrect behavior if they collide, so u64 is safe. |
SessionId | the session ID component of a |