Skip to main content

Module infer

Module infer 

Source
Expand description

Deterministic default inference: schema metadata in, a ViewSpec out.

Inference is pure and offline — no database, no network, no AI. The same input always yields the same output, which is what makes it testable and safe to use as a starting point for the future view designer. The output is just a draft ViewSpec; once saved, the spec — not this function — is the source of truth at render time.

Structs§

FieldMeta
Minimal description of a column, as the admin already knows it from the schema. Inference works purely off this.

Enums§

FieldKind
Coarse type buckets. The admin maps real column types down to these.

Functions§

infer_view_spec
Produce a reasonable ViewSpec from a model name and its columns.
infer_view_spec_from_fields
Convenience wrapper: infer directly from the framework’s own field metadata (AdminModel::FIELDS / AdminEntry::fields). Maps each AdminField through FieldMeta::from_admin_field then calls infer_view_spec.