Expand description
ChangeSet — the position-composable change representation (ADR-0006 §1).
A changeset is a complete traversal of a document: every character of the input is
either retained or deleted, and new text is inserted between. That totality is what
makes the two operations we actually care about possible — ChangeSet::compose
(fold two changes into one) and ChangeSet::map_pos (where does this position end
up?). The Phase-00 stub stored absolute from/to offsets, which cannot express
either, which is why its rebase_onto was a hardcoded Err.
All lengths are char counts, matching ropey’s native indexing — never bytes,
never graphemes (ADR-0006 §1).
Structs§
- Change
Set - An ordered, position-composable set of changes.
- Change
SetBuilder - Builds a
ChangeSetin canonical form. - Changed
Span - The minimal span this change set replaces, in pre-image and post-image char
offsets.
Nonefor an identity change set.
Enums§
- Assoc
- Which side of an insertion a mapped position lands on (ADR-0006 §2).
- Operation
- One step of a document traversal.
- Range
Effect - What an applied change did to a range something else was anchored to.