Skip to main content

Module surface

Module surface 

Source
Expand description

Layer 3 — surface kinds.

A small, closed set of surfaces. Each frontend implements the set once; new views are combinations of these, never new variants. The set is complete by design — Form and Matrix are included because both appear in the roadmap (see ADR-0005).

SurfaceKind is derived from Surface with strum::EnumDiscriminants, so the two lists can never drift apart.

Structs§

Column
A column definition. The view-model owns meaning (id, header key, data kind, sortability); the frontend owns geometry (rendered width in cells vs. font metrics). There is deliberately no width field here.
Field
A schema-driven form field. The semantic layer defines the field; the frontend renders the widget. Diff and validation live in the semantic layer.

Enums§

ColumnKind
EditorMode
The closed set of surface kinds, derived from Surface via #[strum_discriminants(name(SurfaceKind))], so the variant lists cannot drift apart. Adding a new kind is a breaking contract change (see docs/versioning.md).
FieldKind
Projection
A projection (which frontend or agent surface).
SupportLevel
Which projections implement which surface kind, and at what fidelity.
Surface
A single surface, carrying the kind and any kind-specific data.
SurfaceKind
Auto-generated discriminant enum variants

Functions§

support_level
Look up the support level for a (projection, kind) pair.