pub struct EngineBinding {
pub word: Ident,
pub engine: Path,
}Expand description
ONE engines(<word> = "path::To::Engine") entry on a graph root — a WORD bound to a CONCRETE
TYPE.
§Why the binding is at the ROOT and not on the declaration
A word on a field is a NAME, and a name is bound where the program is assembled. Writing the path on the declaration would bind it there — in a library crate that cannot know which engine the application compiled, and cannot be re-pointed without editing the declaration. The root is the one place that knows: it is the deployment’s whole catalog already, and the same list the resources are read off.
It is REFER-QUOTED for this grammar’s standing reason: a word that points at something written elsewhere is written in a string literal, so the path resolves at the span its author wrote.
§What it emits: the compile-time MEMBER TABLE
One marker type per bound word, carrying the concrete engine as an associated type. That table is what a fused face reads to know which engines a query fans across, and it is a TYPE-level table rather than a runtime map for the reason every other binding here is: a member resolved by name at run time is a member no signature can be written against.
Fields§
§word: IdentThe WORD, exactly as a field would spell it.
engine: PathThe CONCRETE engine type, carried VERBATIM and resolved nowhere in this crate.
The tokens are the author’s own — respanned onto the string literal that named them — so a path
naming nothing is E0412 where it was written, which is the division every referring word in
this grammar is under.