Skip to main content

ElectionBackend

Struct ElectionBackend 

Source
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: GraphqlKind

The 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

Source

pub const fn of(kind: GraphqlKind) -> Self

A backend named on a field and nothing else said about it.

Source

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.

Trait Implementations§

Source§

impl Clone for ElectionBackend

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 Debug for ElectionBackend

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.