Expand description
Adaptive View Layer.
The database schema knows field names and types but not visual importance.
This module lets rustio-admin record that importance once, as a stable
ViewSpec, and render generated tables/lists/cards deterministically.
Runtime contract: rendering reads a saved ViewSpec and nothing else. No
AI, no dynamic guessing, no non-determinism. Inference (infer) and the
future view designer only ever produce a ViewSpec; the saved spec is
always the source of truth.
The layer is purely additive and presentation-only. It owns no search, filtering, sorting, pagination, actions, or permissions — when a model has no saved spec, callers fall back to the existing table path unchanged.
Re-exports§
pub use compose::CellComposition;pub use compose::ComposeStyle;pub use infer::infer_view_spec;pub use infer::infer_view_spec_from_fields;pub use infer::FieldKind;pub use infer::FieldMeta;pub use modes::ViewMode;pub use render::render_row;pub use render::render_view;pub use render::render_view_with_ids;pub use render::CellPart;pub use render::RenderedCell;pub use render::RenderedRow;pub use render::RenderedView;pub use render::RowData;pub use roles::FieldRole;pub use roles::SemanticClass;pub use spec::FieldViewSpec;pub use spec::ViewSpec;pub use spec::VIEW_SPEC_VERSION;
Modules§
- compose
- Cell composition — merging several schema fields into one visual unit (e.g. “name over email”, or “title with a trailing status badge”).
- infer
- Deterministic default inference: schema metadata in, a
ViewSpecout. - modes
- View modes — the layouts a collection of records can be rendered in.
- render
- Deterministic rendering: a saved
ViewSpecplus raw rows in, a typed, serde-serializableRenderedViewout. - roles
- Field roles and badge colour intent — the vocabulary of visual importance the database schema can’t express on its own.
- spec
- The saved
ViewSpec— the single source of truth at render time.