pub enum Origin {
Show 28 variants
Constructor,
BorrowedKey,
Column(ColumnOrigin),
Fuse(FuseOrigin),
Resolver(DatabaseKind),
Direction,
Lowering(DatabaseKind),
Identity,
Term(DatabaseKind),
Complete,
Finder(DatabaseKind),
Snapshot(DatabaseKind),
Getter(DatabaseKind),
Inserter(DatabaseKind),
Upserter(DatabaseKind),
Deleter(DatabaseKind),
Purger(DatabaseKind),
Address,
Argument,
RootField,
Fan(Ident),
Fold(Ident),
Door(DoorOrigin),
Delegate(Ident),
Roster,
Materialization,
Predicate(Ident),
Extraction,
}Expand description
What produced an emitted method’s name.
Comparable, because two emitted methods with the same origin are the downstream of a DUPLICATE COLUMN NAME rather than of two columns meeting: every member of the two families collides at once, so a front end that reported them would repeat another rule’s finding five times over.
Variants§
Constructor
The type’s own positional new — a name the emitter fixes rather than one a declaration
chose.
BorrowedKey
A derived index’s key_ref — the borrow of the upstream key it carries, and a fixed name for
the reason the constructor’s is.
Column(ColumnOrigin)
One member of one column’s family — see ColumnOrigin.
Fuse(FuseOrigin)
One name of the FUSE family — a package accessor, a question row or the column vocabulary’s
projection, on the type the tier minted it for. See FuseOrigin.
Resolver(DatabaseKind)
One database’s order-by resolver — sqlite_column.
Direction
The order-by’s direction — its other half, and the half no database refines.
Lowering(DatabaseKind)
One database’s order-by LOWERING — sqlite_order_by, which consumes both halves above.
Identity
The order-by’s rename-proof IDENTITY — the name a per-database rename cannot move, and the only input a cursor’s signature takes from a term.
Term(DatabaseKind)
One database’s order-by TERM — sqlite_term, which pairs the identity with this database’s
column, the direction and the column’s nullability.
Complete
The order-by’s id TAIL — complete, which is no database’s, because which column holds the id
is the record’s and no rename moves it.
Finder(DatabaseKind)
One database’s plural entry point — find_sqlite.
Snapshot(DatabaseKind)
One database’s plural entry point inside a read transaction — find_sqlite_snapshot.
Getter(DatabaseKind)
One database’s single entry point — get_sqlite.
Inserter(DatabaseKind)
One database’s plain WRITE — insert_sqlite.
Upserter(DatabaseKind)
One database’s KEYED REPLACE — upsert_sqlite.
Deleter(DatabaseKind)
One database’s REMOVAL at an address — delete_sqlite.
Purger(DatabaseKind)
One database’s REMOVAL over a predicate — delete_sqlite_where.
Beside the getter’s road rather than beside it in name, and that is the roster’s own grammar:
the address door and the predicate door are two verbs on the read side too — get_<db> and
find_<db> — so the removal half has two as well.
Address
The wire OUTPUT object’s own two members — the row’s id, and its whole address. Fixed names rather than a declaration’s, as the constructor’s is.
Argument
One member of the wire ARGUMENT object — the filter, the ceiling, the order, a page argument. Fixed names too: they mirror the engine’s find surface, which no declaration renames.
RootField
The QUERY UNIT’s own root FIELDS — the single and the list. Fixed names, built from the record’s own, so no declaration chooses either.
Fan(Ident)
A fanout field’s WRITE DOOR — fan_<field>, named after the field whose engines it writes.
The FIELD rides the variant because the sentence has to name it: two names meeting here are a declaration’s own field and another of its fields’ fan, and a message that said only the fan door would leave the reader to find out whose.
Fold(Ident)
A SET election’s DECLARED FOLD — fold_by_<field>, likewise named after its election.
Door(DoorOrigin)
One of a derived index’s RETRIEVE doors — see DoorOrigin.
Delegate(Ident)
One delegate(fn …) entry — the method the DECLARATION restated, at the name it wrote.
The ident rides the variant and IS the declared token, which is what makes this the one derived family whose refusal points at an author’s own word rather than at the field it was built from: a delegate’s name is not derived from anything, it is restated, so the caret belongs on the restatement.
Roster
A vocabulary MIRROR’s restated-variant roster — VARIANTS.
An associated CONST rather than a method, and it is enumerated all the same: Rust’s value
namespace holds consts and functions together, so a fn VARIANTS beside it is a duplicate
definition exactly as a second fn remote would be. What the enumeration is FOR is the names
an expansion puts in a scope, and this is one of them.
Materialization
A vocabulary MIRROR’s single materialization gate — remote().
A fixed name rather than a declaration’s, as the constructor’s is: every rendering, every bind and every delegated call reads through it, so the mode has one word for it and no knob moves it.
Predicate(Ident)
ONE variant’s predicate on a vocabulary — is_rgb24, built from the variant’s own name.
The VARIANT rides the variant because the sentence has to name it: a delegated entry meeting
is_bayer has met a specific variant’s question, and a message saying only a predicate would
leave the reader to work out whose.
Extraction
A MongoDB document’s own EXTRACTION — from_document, the bson twin of the FromRow impl the
SQL family emits.
It is here and its SQL counterpart is not, and the difference is the ITEM rather than the
backend: from_row lands in a TRAIT impl, which this enumeration does not walk, where the bson
twin is INHERENT — the trait it would implement is the framework’s, and the era rule is what
that is over. So it occupies a name in the declaring scope and has to be enumerated like every
other name the emission puts there.
Implementations§
Source§impl Origin
impl Origin
Sourcepub const fn column(&self) -> Option<&Ident>
pub const fn column(&self) -> Option<&Ident>
The DECLARED token a refusal about this name points at, or None for a name no declaration
chose.
The method’s own ident is not that token: Member::name builds it through format_ident!,
whose span is the macro’s call site — which is exactly the span E0592 already reports at
and the reason this rule exists.