Skip to main content

Tier

Struct Tier 

Source
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 Path

Where ingraph lives, as the declaration named it.

§vis: &'a Visibility

The declaration’s own visibility — what every emitted package takes.

§index: &'a Ident

The declaration this tier is.

§kind: NodeKind

WHICH 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>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn question_name(&self) -> Option<Ident>

This tier’s Fusable::Question — the sister tree’s pick, by the same table.

Source

pub fn packages(&self) -> Packages<'a>

The PACKAGE EMITTER this tier mints through — see Packages for what moved off Tier and why.

Source

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.

Source

pub fn route_question(&self, elected: &Elected) -> Ident

ONE ROUTE’s question package, by the same reading.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn fuse_options_name(&self) -> Ident

<Index>FuseOptions — a vector tier’s multi-route options package.

Source

pub fn fuse_question_name(&self) -> Ident

<Index>FuseQuestion — its sister.

Source

pub fn fulltext_options_name(&self) -> Ident

<Index>FulltextOptions — a full-text tier’s options package.

Source

pub fn fulltext_question_name(&self) -> Ident

<Index>FulltextQuestion — its sister.

Source

pub fn evidence_name(&self) -> Ident

This tier’s EVIDENCE enum — <Index>FusedEvidence<S₁, …>, one variant AND ONE CURRENCY per fused route.

Source

pub fn fused_error_name(&self) -> Ident

This tier’s fused REFUSAL enum — <Index>FusedError<E₁, …>, one variant per fused route.

Source

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.

Source

pub fn slot_error_name(&self, elected: &Elected) -> Ident

ONE FANNED SLOT’s refusal enum — <Index><Field>FusedError<E₁, …>.

Source

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.

Source

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.

Source

pub fn slot_participants(&self, elected: &Elected) -> Vec<&'a Engine>

The legs one fanned slot’s FUSED road walks, in written order.

Source

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.

Source

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.

Source

pub fn slot_selector(&self, elected: &Elected) -> Option<Ident>

ONE fanned slot’s engine SELECTOR enum, where the slot has one — <Index><Field>EngineInput.

Source

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.

Trait Implementations§

Source§

impl<'a> Clone for Tier<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for Tier<'a>

Source§

impl<'a> Debug for Tier<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Send for Tier<'a>

§

impl<'a> !Sync for Tier<'a>

§

impl<'a> Freeze for Tier<'a>

§

impl<'a> RefUnwindSafe for Tier<'a>

§

impl<'a> Unpin for Tier<'a>

§

impl<'a> UnsafeUnpin for Tier<'a>

§

impl<'a> UnwindSafe for Tier<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.