pub enum ElectionLabel {
Embedding,
List,
}Expand description
WHAT AN ELECTED FIELD HOLDS, as its own LABEL states it — embedding or list(embedding).
§The label is what the EXPANSION reads, and it is a WORD because a macro holds tokens
An earlier round read this off the field’s TYPE: peel a Vec<…>, and what is left says one or
many. That is a guess at a meaning only rustc has — wrong for type ClipFrames = Vec<…>, wrong
for a re-export renamed on the way in, and wrong for every carrier not literally spelled Vec.
So the declaration STATES it, exactly as a record’s field states its kind, and the type-read is
gone from this crate entirely.
§It restates NO fact, which is what dissolves the disagreement refusal worry
The label carries no width, no element and no space — those are the type’s, projected through
[EmbeddingMarker] at rustc time. What it carries is STRUCTURAL INTENT: which faces this
declaration emits and which doors it grows. So the two readers cannot disagree about a fact,
only about a shape, and that disagreement is settled by the compiler rather than by this crate:
the emission states the label’s claim as a bound, and a label that lied is E0277 carrying a
sentence that names both sides.
§list(embedding) and not set(embedding)
The container word is the ordered, duplicate-bearing one, because that is what a set election IS:
its members are stored under ORDINALS, and set in this grammar’s collection vocabulary promises
unordered-and-deduplicated, which the structure does not have. The word set stays reserved for
a true unordered container.
Variants§
Embedding
embedding — one embedding, the form every declaration written before the set arrived has.
List
list(embedding) — a per-entity SET, variable in length, EMPTY being legal.
An empty set is a legal value and is never similarity-matched: a collection has no null state, so no members is what a record with nothing to index says, and a knn over its column simply does not reach it.
Implementations§
Source§impl ElectionLabel
impl ElectionLabel
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The label as a DECLARATION writes it, which is also how a refusal quotes it.
Sourcepub const fn multiplicity(self) -> &'static str
pub const fn multiplicity(self) -> &'static str
The framework MULTIPLICITY marker this label claims — the type an emitted audit holds the field’s own type to.
Sourcepub const fn audit(self) -> &'static str
pub const fn audit(self) -> &'static str
The framework AUDIT this label is stated as, spanned at the election word.
A function rather than the projection bound itself, for the reason the audit’s own doc gives:
Multiplicity = One reports E0271, a type mismatch, and the on_unimplemented attribute
rides unsatisfied TRAIT bounds only — so the claim is spelled as a trait that can carry the
sentence.