A 2D grid of cells of fixed dimensions, returned by Harlock.Test.cells/1.
Cells are stored in a map keyed by {row, col}; missing keys behave
as blanks. The map representation keeps construction cheap (no need
to pre-fill every cell) and survives sparse frames where most cells
are blank.
In tests you'll typically pull this from Harlock.Test.cells/1 to
inspect individual cell contents and styles after a render.
Summary
Functions
Enumerate every cell in render order (row-major, top-left to bottom-right),
yielding {row, col, cell} tuples. Missing entries are surfaced as blanks
so the diff renderer can compare positions without checking presence.
Types
@type t() :: %Harlock.Render.Buffer{ cells: %{ required({non_neg_integer(), non_neg_integer()}) => Harlock.Render.Cell.t() }, cols: non_neg_integer(), rows: non_neg_integer() }
Functions
@spec each(t(), ({non_neg_integer(), non_neg_integer(), Harlock.Render.Cell.t()} -> any())) :: :ok
Enumerate every cell in render order (row-major, top-left to bottom-right),
yielding {row, col, cell} tuples. Missing entries are surfaced as blanks
so the diff renderer can compare positions without checking presence.
@spec get(t(), non_neg_integer(), non_neg_integer()) :: Harlock.Render.Cell.t()
@spec new(non_neg_integer(), non_neg_integer()) :: t()
@spec put(t(), non_neg_integer(), non_neg_integer(), Harlock.Render.Cell.t()) :: t()