Skip to main content

Module render

Module render 

Source
Expand description

Deterministic rendering: a saved ViewSpec plus raw rows in, a typed, serde-serializable RenderedView out.

Rendering reads the spec and the row values and nothing else — no roles are decided here, no inference runs. Each cell is emitted as a tagged RenderedCell; templates switch on cell.kind and contain no logic of their own. Two guarantees the renderer upholds:

  1. Hidden/DetailOnly fields are never read from the row, so a sensitive value cannot reach the template context or the HTML.
  2. A field consumed by a CellComposition is not also rendered standalone.

Structs§

CellPart
One field inside a composed cell.
RenderedRow
Everything a list/table/card template needs for one row.
RenderedView
The view-level context handed to a template. Carries the active mode and the rows; the template just iterates.

Enums§

RenderedCell
One rendered cell, ready for the template. Serializes with a kind tag (primary, secondary, badge, timestamp, composed) so minijinja templates can switch on cell.kind without seeing roles or running logic.

Functions§

render_row
Render a single row according to a spec.
render_view
Render a full page of rows for the resolved mode. Rows carry no id (suitable for previews). Use render_view_with_ids when records must be clickable.
render_view_with_ids
Like render_view, but each row carries its record id so list/card layouts can link to /admin/<model>/<id>/edit. Used by the live list page.

Type Aliases§

RowData
A single row’s raw values keyed by field name. The admin’s data layer builds these; the renderer only reads them.