An enum rather than a flat bag of (field, value) strings: the display,
the query grammar and doctor all have to know what a field means, and a
generic bag pushes that knowledge into string literals scattered through
the program. crate::analysis::FileAnalysis made the same choice.
§The two variants are not the same size, on purpose
An artist carries twelve fields, one of them a paragraph; a release carries
four. Clippy points out that a Facts is therefore as large as its larger
variant, and the usual remedy is to box that one. It is the wrong remedy
here: artist records are the majority of this layer, so boxing them puts a
heap allocation and a pointer chase on the common path in order to shrink
the rare one. The whole store is a few hundred rows of a few hundred bytes
— under a hundred kilobytes — and it is read once at start-up.
This is what makes a record’s entity kind and its contents impossible
to contradict each other: the kind is derived from the facts rather
than stored beside them.
true when the source answered but said nothing at all.
Distinct from having no record: “asked, and it holds nothing about
this” and “never asked” are two different states, and the whole layer
exists to keep them apart.