Skip to main content

Module block_offset_index

Module block_offset_index 

Source
Expand description

Sorted index of marker (block or table-anchor) → rope byte range.

Tracks the byte offset at which each marker starts in the global rope, plus the rope’s total byte length. A marker is either a real Block or a TableAnchor — the U+FFFC sentinel that occupies a line on its own in a parent frame’s range to represent an embedded table (plan §1.6). Each marker extends from its byte_start to the next marker’s byte_start (or to total_bytes for the last entry).

Invariants:

  • entries is sorted by byte_start ascending.
  • No two entries share the same byte_start.
  • The last entry’s byte_start ≤ total_bytes.
  • Empty entries ⟺ no markers in the document.

Structs§

BlockOffsetIndex

Enums§

OffsetMarker
Discriminates real blocks from table-anchor sentinels in the offset index. The wrapped EntityId is the corresponding entity’s id (a Block id or a Table id).