Skip to main content

Module method

Module method 

Source
Expand description

Every method an emission declares, and the ONE place a derived name is shaped.

A method’s name comes from a COLUMN’s — x, x_ref, x_slice, set_x, with_x — and a few are fixed beside them: the positional new on each address type and on each comparison, and one order-by resolver per database. Nothing about Rust keeps two of those apart. A copy column called new gives its address type a second new; a copy column called set_x beside a column called x gives the record two set_x; and a column called x_ref beside one called set_x gives it two set_x_ref with no marker involved at all.

Each is E0592, and each lands INSIDE the expansion — the span is #[ingraph::record(…)], which the author cannot edit, and the message never says which column caused it. So a front end refuses the declaration instead, and this module is what it asks.

A LIST of derived shapes kept in the front end would be a second copy of what crate::emit writes, and two copies of a derived-name list is how one of them drifts — the same reason ingraph-derive’s column fence is a namespace rather than a list. Here the shapes have one home each: Member::name for the accessor family’s suffixes, wire_method for the __async_graphql_ prefix an emitted #[Object] face’s functions wear, and — for the names a DERIVED INDEX mints from a field of its own — fan_door, fold_accessor and Door::name. Every emitter site calls one of them to build the ident it emits; nothing spells a suffix or a prefix anywhere else.

What a shared function cannot fix is MEMBERSHIP — which of those names a given type really declares — because that follows the emitter’s walk rather than any one name’s shape. So it is not written twice either: it is asserted against the emission itself by tests::the_enumeration_names_exactly_the_methods_the_emission_declares — and by the derived index’s own twin in crate::index’s audits — which read every inherent method back out of the tokens and demand the same list in the same order. A name the emitter grows and this module does not know about fails there.

The enumeration is a STATEMENT ABOUT THE EMISSION, which is this crate’s subject; the refusal is the front end’s, which holds the spans to report at. That is the split crate::model already draws, and it is why nothing here pushes an error.

Structs§

ColumnOrigin
The payload of Origin::Column: which column, and which member of its family.
DoorOrigin
The payload of Origin::Door: which door, and the election it answers about.
Emitted
One method an emission declares, on one emitted type.
FuseOrigin
The payload of Origin::Fuse: WHICH minted type carries the name, and the member it is.

Enums§

Door
WHICH of a derived index’s RETRIEVE doors a name belongs to — the vocabulary the emitted read surface is spelled from.
Member
Which member of a column’s method family a name belongs to.
Origin
What produced an emitted method’s name.
Owner
Which of a record’s emitted types a method lands on.

Functions§

fan_door
The fan_<field> WRITE DOOR a fanout-marked field of a derived index gets — one name, here rather than beside the emitter, for wire_method’s reason.
fold_accessor
The fold_by_<field> accessor a SET election gets — what semantics(fold = "…") is spent on.
wire_method
The __async_graphql_ prefix every FUNCTION an emitted #[Object] face declares wears — and every ARGUMENT such a function takes.