Expand description
Relation Intelligence Layer — runtime registry.
The admin renders, filters, and guards deletes on foreign keys by
consulting a RelationRegistry built pure-functionally from the
current [AdminEntry] list. The registry itself is data; it does
no I/O and holds no connections.
Tier 1 supports only BelongsTo relations (declared via
#[rustio(belongs_to = "Target")] on the struct field). The
legacy schema-driven variant (built from crate::schema::Schema)
has been replaced with the AdminEntry-driven build below — Tier 1
has no separate schema layer.
§Two lookup tables, computed once per Admin reload
belongs_to[(model, field)] → ResolvedRelation— forward direction.has_many[model] → Vec<InverseRelation>— every incoming edge intomodel, used by the inverse-panel renderer and the delete guard.
Structs§
- Inverse
Relation - One reverse (
HasMany) relation — an incoming edge pointing at a given target model. Produced by inverting every storedBelongsToat registry-build time. - Relation
Registry - Relation lookup tables for one snapshot of the admin registration.
- Resolved
Relation - One forward (
BelongsTo) relation resolved against the current admin registration.
Enums§
- Registry
Error - Why a
RelationRegistrydeclaration was rejected.
Constants§
- RELATION_
FILTER_ DROPDOWN_ CAP - Soft cap on the number of rows a relation filter will expose as a
<select>dropdown. Above this threshold the admin renders a numeric-id input instead. 500 was chosen to fit comfortably in one HTTP round-trip.