1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
//! The ROW EQUATIONS: one per (stored field, database, member), saying the member's row really
//! carries the column at the type the interface pinned.
//!
//! The contract's own impls read a member's DOMAIN struct. That is one half of the promise, and the
//! half a fan-out cannot spend: a query reads ROWS, and a row is per database with its own column
//! names and its own stored types. So each pin is discharged where it is made — at the member's own
//! row, at a concrete backend, at the type the declaration said.
//!
//! # It is a NEVER-RUN function, and the leading underscore is load-bearing
//!
//! Nothing calls these. A function nobody calls is `dead_code` in the crate the expansion lands in —
//! a warning at a span its author cannot edit — and the one thing that silences it without an
//! `#[allow]` is rustc's own convention: an item whose name begins with `_` is not reported.
//! Measured rather than assumed; the same function without the underscore is a denied warning.
//!
//! What the name carries beyond that is WHERE the failure is. `_video_sqlite_mask` names the
//! member, the database and the field, so an `E0308` about it locates itself before a reader has
//! looked at anything else — and the pair of teeth is worth naming: a row that carries no such
//! column is refused at the column, and one carrying it at another type is refused at the type.
//!
//! # The pin has TWO readers, and the WORD is what tells them apart
//!
//! This equation reads the pin as the type the ROW holds; the crossing reads it as the type the
//! comparison is keyed on. For every column those are one type, and for a COLLECTION they are not:
//! a database stores a collection's ELEMENTS at the pinned type and the row holds the `Vec` of
//! them, which is exactly the split a record already carries — its `type` names one element and its
//! row field is the list.
//!
//! A record can tell the two apart because its field declared an interpretation WORD, and an
//! interface pin declares one now — [`InterfaceField::marker`](crate::interface::InterfaceField),
//! read here through [`InterfaceField::collects`]. So the two readings are two spellings of one
//! declared fact rather than one reading used at both sites: `&Vec<V>` here and `V` at the
//! crossing, and a pin with no collection word is `&V` at both as it always was.
//!
//! Before the word there was one reading and it was the wrong one here, which is what
//! `an_interface_operand_crossing_absorbs_a_collections_legs`'s second error pinned — the
//! refuse-until this line replaces.
//!
//! # The KIND is a second fact, and it needs a second equation
//!
//! `Vec<V>` is what a sequence's row holds and it is what a SET's row holds too, so this equation
//! cannot see a member that answered the interface's `list(…)` with a `set(…)` of its own — and the
//! two are different storage: a sequence's edge table carries an ordinal and a set's does not. That
//! is [`Self::collection_equation`], which meets the member at a projection this one does not read.
//!
//! # The gate is per DATABASE, and it is what keeps declare-many/build-one
//!
//! An equation names a CONCRETE backend, which is what makes it an audit rather than an obligation
//! deferred to a call site. Ungated, a declaration naming Postgres would fail to compile in a build
//! without the Postgres driver. Wrapped in the framework's conditional-expansion gate, the equations
//! exist per DECLARED ∩ COMPILED-IN backend — the same arrangement a record's own storability audit
//! rides, stated one layer up.
//!
//! # A member's row is reached by FIELD, and the declaration is where that has to be true
//!
//! `row.mask` and not `row.mask_ref()`, so the refusal is about the COLUMN rather than about an
//! accessor's name. The consequence is module locality: an emitted row's fields are private, so an
//! interface reads its members' rows from where those rows are declared. That is the same locality
//! the domain contract already has — it reads the members' own struct fields — and the two agree
//! rather than each having a rule.
//!
//! WHICH column is asked of [`InterfaceField::column`](crate::interface::InterfaceField::column),
//! so a member that carries the field under another name is read at that name here and at the same
//! name in its contract impl. The default and the rename come out of one function, which is what
//! keeps the two accesses from disagreeing about a column nobody moved.
use ;
use crate::;