Skip to main content

Origin

Enum Origin 

Source
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

Source

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.

Trait Implementations§

Source§

impl Clone for Origin

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 Origin

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for Origin

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for Origin

Source§

impl PartialEq for Origin

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Origin

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.