pub struct ElectionBackend {
pub kind: GraphqlKind,
pub first: Option<NonZeroU32>,
pub question: Option<LitStr>,
pub engines: Option<LitStr>,
pub sighting: Option<LitStr>,
pub fused_key_match: Option<LitStr>,
pub keys: Option<LitStr>,
pub hydrated: Option<LitStr>,
pub fused: Option<LitStr>,
pub similar: Option<LitStr>,
pub similar_hydrated: Option<LitStr>,
}Expand description
ONE backend’s block on an ELECTION — graphql(async_graphql(first = 20, keys(rename = "…"))).
The field-level twin of IndexBackend, and it exists for that one’s reason: a wire default is
the SKIN’s fact, so it lives in the block that names the skin, and a second backend sets its own
without touching the first’s.
§ONE GRAMMAR FOR EVERY NAME SEAT, and first is not one of them
The 2026-08-16 ruling, in the user’s own words — 不要有糖, 糖留给以后其他东西, rename 不值得一个
糖. Every seat here that names something is a BLOCK carrying a bare rename = "…" row, so a
reader who has learnt one has learnt all of them and the flat position stays free for whatever
later earns it. first keeps its flat spelling because it is a COUNT: there is no
name for a rename row to carry, and first(rename = 20) would be a sentence about renaming a
number.
§The seats split by WHAT each names: two TYPES and five ROADS
question and engines name TYPES this election mints — the
two a request builds by hand. The five road seats name QUERY FIELDS, one per road an election can
mount, which is Field’s own vocabulary read as a grammar: five roads, five words, and no
composition between any two of them.
Fields§
§kind: GraphqlKindThe backend this block dresses the election for.
first: Option<NonZeroU32>first = N — the GraphQL-term spelling of the number Numbers::limit carries, and the
literal this field’s query arguments publish as their SDL default.
SKIN and never bones: first is GraphQL’s own word for how many, so it has no business at a
Rust-facing tier — a hand-caller’s number is the positional limit the doors already take.
FLAT where every neighbour is a block, and the asymmetry is the ruling’s: a block exists to
hold a rename row, and a count has no name to move.
question: Option<LitStr>question(rename = "…") — what this backend calls <Index><Field>Question, the @oneOf a
request names a point with.
§The TYPE moves and the ARGUMENT WORD does not, which is law 3’s whole line
The parameter is spelled question: in every schema this framework writes, on every road, at
every declaration — the UNIFORM FLOOR, and the argument words are Relay’s precedent read one
grain down. What a client cannot predict is the type BEHIND that argument, because it is minted
per election and per declaration; that one is nameable, and this is the seat.
A syn::LitStr on the 2026-08-13 ruling every SDL rename in this workspace carries: the word
names a type in GraphQL’s own namespace and nothing in Rust, so a Rust keyword is an ordinary
word here.
engines: Option<LitStr>engines(rename = "…") — what this backend calls <Index><Field>Engines, the PRODUCT a fused
read states one floor per leg in.
question’s twin over the other per-election argument type, and PLURAL for
the shape it names: the selector beside it is a SUM over one leg and this names them ALL,
because a fused road walks every leg and each one needs a floor in its own currency.
Distinct from IndexBackend::engine, which names the @oneOf SELECTOR at the head. The two
words differ by a letter and name two shapes; the near-miss line is what tells an author which
position they are at.
sighting: Option<LitStr>sighting(rename = "…") — what this backend calls <Index><Field>Sighting, the wire UNION a
fused answer’s evidence list holds.
§An ANSWER-side type, which is why it is a seat rather than a floor word
The two seats above name types a REQUEST builds; this one names a type a request READS. Both
are the same KIND of name and are nameable for the same reason: the union is minted per
election and per declaration, so no client could predict it, while the uniform floor covers the
ROW WORDS a client writes (score, evidence, node) rather than the types behind them.
The ARMS take no seat of their own. Each is <Index><Field><Engine>Sighting, derived from the
leg’s own word, so one word here would move a SET of types — exactly the shape
IndexBackend::engine is refused for on a declaration that types two fields. A declaration
that wants the arms moved moves the leg words, which are its own.
fused_key_match: Option<LitStr>fused_key_match(rename = "…") — what this backend calls <Index><Field>FusedKeyMatch, the
ROW a fused read answers with: the address, the fused score, and the evidence list.
sighting’s twin over the other half of the fused answer, and a seat of its
own for the reason every road pair in this block has two: the two types are two names in one
namespace, and a declaration that renamed the union has said nothing about the row carrying it.
The word is SNAKE-CASED where its neighbours are single nouns, which is the minted name read
back: FusedKeyMatch is three words, and a word spelling only one of them would name a type
its author could not find.
keys: Option<LitStr>keys(rename = "…") — what this backend calls the KEYS query field this election publishes,
replacing the derived <index>By<Field>Keys VERBATIM.
§A FIELD name, which is why it is not the type-renaming axis
IndexRename moves RUST types and the two seats above move SDL type names; a query field is
neither. It is a name in the ROOT’s own namespace, where every mounted declaration’s fields
meet — so two declarations electing a field of the same name are the collision this word
exists to break, and it has to be sayable per field and per backend.
A syn::LitStr and never an ident, on the 2026-08-13 ruling the type-level renames already
carry. Carried VERBATIM — the derived name is composed from three parts and a word that
replaced only one of them would be a rename an author could not predict.
hydrated: Option<LitStr>hydrated(rename = "…") — the same word over the TIER BELOW that road: <index>By<Field>,
the question answered with the upstream’s whole entities.
A SEAT OF ITS OWN and never a composition off keys, which is what the verbatim
law forces: a declared word is carried exactly as written, so a name derived from the keys
word — clipNeighbours → clipNeighboursHydrated — would be a rename its author could not
predict from what they typed. Two names in one namespace need two words or none.
fused: Option<LitStr>fused(rename = "…") — the same word over the FUSED keys field, which exists where the
election is fanned across two or more typed stores.
A separate seat because the two fields are two names in one namespace: a declaration renaming its plain road has said nothing about its fused one, and a single word would have to move both or neither.
similar: Option<LitStr>similar(rename = "…") — the same word over the BY-EXAMPLE keys field, which exists wherever
the plain road does.
The seats above’s own argument, read one road further: the by-example field is a name in the same root namespace, and a declaration that renamed the road asked with a QUESTION has said nothing about the road asked with a KEY. It cannot share the fused word either — a fanned election publishes both, so one word would have to move two live names at once.
similar_hydrated: Option<LitStr>similar_hydrated(rename = "…") — the by-example road’s own tier below: <index>SimilarBy<Field>.
hydrated’s reason unchanged. It is ONE seat over TWO emitted shapes — the
single-vector road and the SET road — because a declaration publishes one or the other and
never both, so which shape ran is not a question a name has to answer.
Implementations§
Source§impl ElectionBackend
impl ElectionBackend
Sourcepub const fn of(kind: GraphqlKind) -> Self
pub const fn of(kind: GraphqlKind) -> Self
A backend named on a field and nothing else said about it.
Sourcepub fn road(&self, which: Field) -> Option<&LitStr>
pub fn road(&self, which: Field) -> Option<&LitStr>
What this block calls which’s query field, or None where it named that road nothing.
The ROAD LOOKUP, spelled once: Field is a closed five and so are the seats, so a road added
to one without the other is a non_exhaustive-free match arm the compiler asks about here
rather than a name silently falling back to the derived one.