Persistent indexed resident-row sequence.
Rows are held in an implicit chunk treap. Rank split/concatenation copy only
the search paths and the at-most-64-row boundary chunks; untouched prefix and
suffix subtrees are shared verbatim. Buffer positions are therefore not
stored eagerly in suffix payloads: payload_at/2 and payload_range/3
project positional metadata when a caller actually reads a row.
Summary
Functions
Materializes all entries. Reserved for hydration/debug/oracle paths.
Materializes all projected payloads. Reserved for explicit full hydration.
Persistent rank splice. Only boundary/search chunks are copied.
Types
@type entry() :: %{id: term(), content_hash: non_neg_integer(), payload: term()}
@type t() :: %MingaEditor.RenderModel.Window.ResidentStore{ digest: Minga.RenderModel.Window.ContentDigest.t(), root: tree(), size: non_neg_integer(), work: work() }
@type tree() :: nil | {:chunk, non_neg_integer(), pos_integer(), tree(), tuple(), tree()}
@type work() :: %{ rows_visited: non_neg_integer(), rows_copied: non_neg_integer(), rows_emitted: non_neg_integer(), chunks_touched: non_neg_integer() }
Functions
@spec delete_at(t(), non_neg_integer()) :: t()
@spec digest(t()) :: Minga.RenderModel.Window.ContentDigest.t()
Materializes all entries. Reserved for hydration/debug/oracle paths.
@spec entry(term(), non_neg_integer(), term()) :: entry()
@spec entry_at(t(), non_neg_integer()) :: {:ok, entry()} | :error
@spec insert_at(t(), non_neg_integer(), entry()) :: t()
@spec new() :: t()
@spec payload_at(t(), non_neg_integer()) :: {:ok, term()} | :error
@spec payload_range(t(), non_neg_integer(), non_neg_integer()) :: [term()]
Materializes all projected payloads. Reserved for explicit full hydration.
@spec rebuild(t(), MapSet.t(non_neg_integer()), (non_neg_integer() -> entry())) :: t()
@spec replace_at(t(), non_neg_integer(), entry()) :: t()
@spec replace_range(t(), non_neg_integer(), non_neg_integer(), [entry()]) :: t()
Persistent rank splice. Only boundary/search chunks are copied.
@spec size(t()) :: non_neg_integer()