pub struct Tier<'a> {
pub krate: &'a Path,
pub vis: &'a Visibility,
pub index: &'a Ident,
pub kind: NodeKind,
pub embeddings: &'a [Elected],
pub searchable: &'a [Ident],
pub engines: &'a [FieldEngines],
pub field_numbers: &'a [FieldNumbers],
pub graphql: Option<&'a IndexGraphql>,
pub rename: Option<&'a IndexRename>,
}Expand description
ONE TIER of the fusion tree — a declaration, read for what it routes to.
A borrow of the lists IndexModel already holds rather than a second copy of them, for
OptionsSpine’s reason.
Fields§
§krate: &'a PathWhere ingraph lives, as the declaration named it.
vis: &'a VisibilityThe declaration’s own visibility — what every emitted package takes.
index: &'a IdentThe declaration this tier is.
kind: NodeKindWHICH of the three storages it is — the modality presence law’s whole input.
embeddings: &'a [Elected]The knn elections, in declared order — a vector tier’s routes.
searchable: &'a [Ident]The searchable fields, in declared order — a full-text tier’s ONE subject.
engines: &'a [FieldEngines]WHERE each election is written, kept in step with the lists above.
field_numbers: &'a [FieldNumbers]WHAT EACH ELECTION WROTE ABOUT ITSELF — its numbers and its own skin blocks, kept in step with
the lists above for engines’ reason.
Here rather than left on IndexModel because the per-election TYPE seats
(question(rename = …), engines(rename = …)) resolve inside Packages::sdl, which is
reached from emitters that hold a tier and never the model. A seat the naming home cannot see
is a seat that silently falls back to the derived name.
graphql: Option<&'a IndexGraphql>WHICH BACKENDS DRESS THIS TIER — the declaration’s graphql(…) block, or None where it
named none.
Every package above is emitted whatever this holds. What it decides is the SKIN: the
hand-written faces below — input_face, oneof and
enum_face — are one backend’s impls over these types, and a declaration
that named no backend has no backend for them to be impls for.
rename: Option<&'a IndexRename>WHAT THIS TIER’S MINTED RUST TYPES ARE CALLED — the declaration’s top-level rename, or
None where its own ident is the base.
Every format_ident! below reads base or one of the named accessors rather
than index, which is what makes the roster the proof: a mint whose name did
not come through here would show up as a roster row the emission does not declare.
Implementations§
Source§impl<'a> Tier<'a>
impl<'a> Tier<'a>
Sourcepub fn emit(&self) -> TokenStream
pub fn emit(&self) -> TokenStream
The WHOLE emission: every package this declaration mints, and the impl that hands them up.
Empty for a kind that does not retrieve, which is the presence law stated once.
Sourcepub fn emitted_methods(&self) -> Vec<(Ident, Ident)>
pub fn emitted_methods(&self) -> Vec<(Ident, Ident)>
Every (TYPE, METHOD) pair this tier mints, in emission order — the audits’ half of emit.
One source of truth: each arm mirrors the predicate the emission itself asks (a columns seat
only where a vocabulary exists, a semantics row only on a set election, a mini tier only
where a slot fans), so a knob cannot be added without its roster row appearing beside it.
Sourcepub fn emitted_types(&self) -> Vec<Ident>
pub fn emitted_types(&self) -> Vec<Ident>
Every TYPE this tier lands in the declaring scope, in emission order — emitted_methods’
one-level-up half, by the same mirroring rule.
Sourcepub fn options_name(&self) -> Option<Ident>
pub fn options_name(&self) -> Option<Ident>
This tier’s Fusable::Options — the binding table’s pick, or None where the kind does not
retrieve.
Sourcepub fn question_name(&self) -> Option<Ident>
pub fn question_name(&self) -> Option<Ident>
This tier’s Fusable::Question — the sister tree’s pick, by the same table.
Sourcepub fn packages(&self) -> Packages<'a>
pub fn packages(&self) -> Packages<'a>
The PACKAGE EMITTER this tier mints through — see Packages for what moved off Tier and
why.
Sourcepub fn route_options(&self, elected: &Elected) -> Ident
pub fn route_options(&self, elected: &Elected) -> Ident
ONE ROUTE’s options package, as a PARENT names it — slot_options under
the fused doors’ own noun, so an emitter reading routes is not reading about slots.
Sourcepub fn route_question(&self, elected: &Elected) -> Ident
pub fn route_question(&self, elected: &Elected) -> Ident
ONE ROUTE’s question package, by the same reading.
Sourcepub fn doors(&self) -> Doors
pub fn doors(&self) -> Doors
The routes this tier contributes to a FUSED door, by modality — the door law’s whole input.
§A full-text tier is ONE route however many fields it elects
FulltextRead::search takes no column selector at the route grain: an elected field is a
COLUMN of one subject rather than a subject of its own, which is what the columns row on the
package says. So the count is one wherever anything is elected, and a full-text declaration
never reaches its own fulltext_fuse — that door’s home is a SEARCH RECIPE, where two
full-text MEMBERS can meet.
§A SET election is not a route, and that is a measurement
RRF reads an ORDINAL, and fuse’s own note says which one: the hit’s position in the
ENGINE’s raw stream. A list(embedding) election answers in Folded, whose order the FOLD
authored — there are m engine streams and deliberately no ordinal minted across them, so
there is no number to hand the fold that means what it reads. Passing the folded answer’s
POSITION would produce a perfectly ordered result on every fixture whose floor let everything
through, which is exactly the silent defect fuse warns about.
The RRF-as-fold citizen that would close this is lettered in the β4 supplement and deliberately unbuilt, so a set election is absent from the walk at EMISSION — a compile-time absence with a name, rather than a route that silently contributes the wrong number.
Sourcepub fn fused_routes(&self) -> impl Iterator<Item = &'a Elected>
pub fn fused_routes(&self) -> impl Iterator<Item = &'a Elected>
The elections that ENTER this tier’s fused doors, in declared order — see doors for why a
set election is not among them.
Sourcepub fn base(&self) -> &'a Ident
pub fn base(&self) -> &'a Ident
THE BASE EVERY MINTED NAME IS BUILT ON — the declaration’s top-level rename, or its own
ident. IndexModel::base’s answer, read through the borrow this tier holds.
Sourcepub fn unmintable(&self, piece: RenamePiece) -> Option<&'static str>
pub fn unmintable(&self, piece: RenamePiece) -> Option<&'static str>
WHY THIS DECLARATION MINTS NO piece, or None where it mints exactly one.
The predicate the front end’s named-mint audit spends, written HERE because every clause is a fact about the emission: which packages a tier lands is decided a few lines up, and a second copy of that decision in the grammar is how the two come to disagree.
Each arm mirrors the condition the emitter itself asks, so a mint cannot become conditional without its clause appearing beside it.
Sourcepub fn fuse_options_name(&self) -> Ident
pub fn fuse_options_name(&self) -> Ident
<Index>FuseOptions — a vector tier’s multi-route options package.
Sourcepub fn fuse_question_name(&self) -> Ident
pub fn fuse_question_name(&self) -> Ident
<Index>FuseQuestion — its sister.
Sourcepub fn fulltext_options_name(&self) -> Ident
pub fn fulltext_options_name(&self) -> Ident
<Index>FulltextOptions — a full-text tier’s options package.
Sourcepub fn fulltext_question_name(&self) -> Ident
pub fn fulltext_question_name(&self) -> Ident
<Index>FulltextQuestion — its sister.
Sourcepub fn evidence_name(&self) -> Ident
pub fn evidence_name(&self) -> Ident
This tier’s EVIDENCE enum — <Index>FusedEvidence<S₁, …>, one variant AND ONE CURRENCY per
fused route.
Sourcepub fn fused_error_name(&self) -> Ident
pub fn fused_error_name(&self) -> Ident
This tier’s fused REFUSAL enum — <Index>FusedError<E₁, …>, one variant per fused route.
Sourcepub fn slot_evidence_name(&self, elected: &Elected) -> Ident
pub fn slot_evidence_name(&self, elected: &Elected) -> Ident
ONE FANNED SLOT’s evidence enum — <Index><Field>FusedEvidence<S₁, …>, the tier’s own type at
slot grain.
Sourcepub fn slot_error_name(&self, elected: &Elected) -> Ident
pub fn slot_error_name(&self, elected: &Elected) -> Ident
ONE FANNED SLOT’s refusal enum — <Index><Field>FusedError<E₁, …>.
Sourcepub fn fanned_slots(&self) -> impl Iterator<Item = &'a Elected>
pub fn fanned_slots(&self) -> impl Iterator<Item = &'a Elected>
The ELECTIONS whose slot gets a MINI FUSE DOOR, in declared order.
A fanned tier (fanned) that is not a SET election, and the second half is
doors’ own measurement read one grain down: RRF reads the ordinal an engine
gave a hit, a list(embedding) election answers in Folded whose order the FOLD authored, and
there is no number across its m streams that means what RRF reads. The exclusion is
therefore at EMISSION on both grains rather than stated once and forgotten on the other.
The PACKAGES are not gated by this: a fanned set slot still mints its mini tier, because that package describes the write fan and crosses the wire. What it does not get is a door.
Sourcepub fn slot_legs(&self, elected: &Elected) -> Vec<&'a Engine>
pub fn slot_legs(&self, elected: &Elected) -> Vec<&'a Engine>
The legs one fanned slot’s mini door asks and answers over, in written order — public for the door emitter, which lives a module away.
Sourcepub fn slot_participants(&self, elected: &Elected) -> Vec<&'a Engine>
pub fn slot_participants(&self, elected: &Elected) -> Vec<&'a Engine>
The legs one fanned slot’s FUSED road walks, in written order.
Sourcepub fn slot_leg_options(&self, elected: &Elected, engine: &Engine) -> Ident
pub fn slot_leg_options(&self, elected: &Elected, engine: &Engine) -> Ident
ONE fanned slot’s Route-wrapped leg package, as the mini door’s edge reader names it.
Sourcepub fn subject_selector(&self) -> Option<Ident>
pub fn subject_selector(&self) -> Option<Ident>
THE DECLARATION’S OWN engine SELECTOR, where it mints exactly one — what a FULL-TEXT wire
leg reads its floor and its knobs out of.
A full-text declaration is ONE ROUTE however many fields it elects, so its selector is at the
declaration grain where a vector election’s is per field. This is deliberately not a second
road to the same answer: engine_selector holds the whole rule, and this only makes it
reachable from the emitter.
Sourcepub fn slot_selector(&self, elected: &Elected) -> Option<Ident>
pub fn slot_selector(&self, elected: &Elected) -> Option<Ident>
ONE fanned slot’s engine SELECTOR enum, where the slot has one — <Index><Field>EngineInput.
Sourcepub fn route_params(&self) -> impl Iterator<Item = (&'a Elected, Ident, Ident)>
pub fn route_params(&self) -> impl Iterator<Item = (&'a Elected, Ident, Ident)>
The per-route generic parameters this tier’s fused door takes, in route order — the ENGINE, the currency it scores in, and the refusal it can speak.
One list rather than three walks, because all three are read together everywhere they are read and a route’s three names have to stay in step.