Expand description
IndexKind + IndexSpec — runtime declaration of a secondary
index.
IndexSpec is the runtime declaration a Document type emits
from Document::indexes() (#57); the on-disk reflection is the
IndexDescriptor in crate::catalog. The spec is small and
pure-data so it composes cleanly with the derive macro that lands
in M9.
§Power-of-ten posture
- Rule 5.
IndexSpec::validateis the runtime boundary that pairs with the kind-specific type invariants (Compositerequires ≥ 2 paths,Eachrequires exactly 1 path, etc.). The constructor helpers (IndexSpec::unique,::each, …) callvalidateso a caller cannot construct an invalid spec. - Rule 7. No
unwrap/expect— every fallible path returnscrate::Result. - Rule 9.
IndexKindis a concrete enum, NOTdyn IndexKind— static dispatch throughmatch.
Structs§
- Index
Spec - A runtime index declaration.