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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
//! The CARRIER AXIS: what one operand crosses the wire AS, and the parameter a filter kind carries
//! so that a DECLARING crate can answer for its own type.
//!
//! [`scalar`](super::scalar) holds the carrier TYPES — the local newtypes that own a GraphQL scalar
//! on behalf of an operand whose own Rust type may not carry one. This module holds the two TRAITS
//! that say which carrier an operand crosses on, and it exists because the tables that used to say
//! so could only ever speak for this crate's own types.
//!
//! # The wall the axis is the way past
//!
//! `async_graphql::InputType` is foreign here and [`TextFilter`](crate::TextFilter) is local, so the
//! framework wrote one concrete registration per text operand — one for `String`, one for
//! `SmolStr`. A DECLARING crate has neither road:
//! `impl InputType for TextFilter<Tag>` names a foreign trait for a foreign type and is `E0117`
//! (RFC 2451 does not admit `ForeignTrait for ForeignType<Local>` — the trait takes no parameter for
//! a local type to sit in), and a generic row in `ingraph` would have collided with the two concrete
//! ones (`E0119`). So a declarer's own element under a text reading reached no schema at all, in
//! either crate — measured.
//!
//! The axis removes the second wall so the first stops mattering. The filter kind grows a parameter,
//! this crate carries exactly ONE generic row over it, and every concrete registration becomes a row
//! of [`Builtin`]'s — so the canonical names are unchanged, there is no second row for coherence to
//! hit, and a declaring crate joins by implementing the reading trait on a marker IT owns. That impl
//! is legal there for the same reason every row in [`marker`](super::marker) is legal there: the
//! self type is local.
//!
//! # Four traits, because the positions ask different questions
//!
//! Three of them are the READINGS, one per filter kind whose face is written over a carrier —
//! [`TextWire<T>`], [`ScalarWire<T>`] and [`BytesWire<B>`]. Each is keyed on the MARKER, and each
//! carries the schema NAME as well as the crossing: which name a filter is published under is a
//! property of the READING (`String` is `StringFilter` under [`Builtin`], `SmolStr` is `TextFilter`,
//! `i32` is `I32Filter` and `IntFilter` under [`Std`]), and a reading is what a marker is.
//!
//! They are three traits rather than one because the three kinds are three OPERATOR SETS and a
//! reading is written per kind: a row saying *this is how a `Tag` crosses* has to say which face it
//! is a reading FOR, since one declarer type may reach a text face under one marker and an ordering
//! face under another, and the two would publish different names. One trait keyed on the marker
//! alone could carry only one of those, and one keyed on `(marker, kind)` is the same three rows
//! with a phantom in them.
//!
//! The fourth is [`ToGraphqlInput`], keyed on the OPERAND TYPE, and it carries no name. It answers
//! the question a COLLECTION filter asks — *what does one element look like on the wire* — and a
//! collection filter has no marker parameter to key on: `ListFilter<T, VF>` takes the element and
//! the element's filter, and its name comes from the filter.
//!
//! All four are open, and a declaring crate writes rows for them on its own types.
//!
//! # The seats are BARE, and the backend asks where it SPENDS the form
//!
//! Neither `type Carrier` nor `type Input` names a GraphQL library, and this module is
//! unconditional. That is a law rather than an omission: a map from an operand to the form it crosses
//! as is one fact every binding shares, so a bound here would make the map — and every row a
//! declaring crate writes into it — one library's property.
//!
//! What each backend needs of a form it demands at ITS OWN consumption point, inside ITS OWN gate:
//! the `InputType` faces below the filters ask `Carrier: InputType` and `Input: InputType` in their
//! own `where` clauses, so a row naming a form async-graphql cannot parse is `E0277` at the face that
//! parses it. The same law [`output`](super::output) states one position over.
//!
//! # What [`ToGraphqlInput`] fixes, and it is not only the openness
//!
//! The collection faces used to ask `T: async_graphql::InputType` for their six list slots and
//! `hasElement`, which is a bound two registered operands cannot satisfy and one satisfies WRONGLY:
//!
//! - `u128` and `i128` have no `InputType` in any crate but async-graphql's, so a `Vec<u128>` column
//! compiled and could not reach a schema — while the SCALAR column of the same type crosses fine,
//! through the carrier its filter names.
//! - `Vec<u8>` has one and it answers a different question: async-graphql's blanket over `Vec<T>`
//! renders it `[Int!]`, so a `Vec<Vec<u8>>` column published a list of lists of small integers
//! while the same blob's own filter published hex. That one COMPILED and lied, where the first
//! refused to compile at all.
//!
//! Read through this trait instead, both are the element's own crossing: `[u128!]` and
//! `[bytes!]`, the same forms the scalar column already published.
//!
//! A THIRD class joined them when the SCALAR SUITE landed, and it is the largest: every ordinary
//! numeric element. `[Int!]` said *a list of some integer* and no more — a `Vec<i16>` column and a
//! `Vec<i64>` column published the same operand type, so a client could not tell which width it was
//! sending and a declaration that widened one changed no schema at all. Each crosses as its own
//! width now, `[i16!]` beside `[i64!]`. This class differs from the two above in what was wrong: the
//! face COMPILED and ANSWERED and was merely mute about the width, where `u128` had no face and the
//! blob's answered a different question.
use ;
use JiffDuration;
use ;
use RegexPattern;
use ;
use crate;
/// The framework's own reading of a crossing — the default every filter's carrier parameter takes,
/// so that a spelling written before the axis existed means what it meant.
///
/// Uninhabited, as the [`shape`](super::shape) markers are: it exists in type position and nothing
/// constructs one.
///
/// It is where the framework's own [`TextWire`], [`ScalarWire`] and [`BytesWire`] rows live, and the
/// reason the canonical names survived the axis: `TextFilter<String>` is `TextFilter<String,
/// Builtin>`, and `Builtin`'s row for `String` names the canonical `StringFilter`.
///
/// Unconditional, as everything in this module is: it is a DEFAULT TYPE PARAMETER of a filter struct
/// that exists in every build, so a build with no GraphQL library still has to be able to name it.
/// **THE GRAPHQL STANDARD FIVE, as a reading a field NAMES** — the constitution's second law, and
/// the seat `Int`, `Float`, `String`, `Boolean` and `ID` keep now that they are not the default.
///
/// [`Builtin`]'s twin, and uninhabited for the same reason: it exists in type position and nothing
/// constructs one. What a field spells to take it is the reading — `ScalarFilter<i32, Std>`
/// publishes `IntFilter { eq: Int }` where `ScalarFilter<i32>` publishes `I32Filter { eq: i32 }` —
/// and the two stand in ONE schema, being two names.
///
/// # Which rows are HERE, which are the DEFAULT'S, and which one is still missing
///
/// A reading carries at most one row per operand, so a `Std` row is writable only where it says
/// something DIFFERENT from the default. Two of the five do:
///
/// | standard type | operand | a field names | this reading publishes | the default publishes |
/// |---|---|---|---|---|
/// | `Int` | `i32` | `ScalarFilter<i32, Std>` | `IntFilter { eq: Int }` | `I32Filter { eq: i32 }` |
/// | `Float` | `f64` | `ScalarFilter<f64, Std>` | `FloatFilter { eq: Float }` | `F64Filter { eq: f64 }` |
/// | `String` | `String` | nothing — say nothing | — | `StringFilter { eq: String }` |
/// | `Boolean` | `bool` | nothing — say nothing | — | `BooleanFilter { eq: Boolean }` |
/// | `ID` | — | — | — | — |
///
/// **The last two rows are the DEFAULT'S, and that is the 2026-08-18 amendment.** `i32` and `f64`
/// are roster rows with CARRIERS, so the two readings differ in the operand as well as in the name
/// and both are worth publishing. `String` and `bool` are not roster rows at all — GraphQL's own
/// names say everything there is to say about those two operands, see [`roster`](super::roster) —
/// so the default already publishes exactly what a `Std` row would, and a row written here would put
/// a second Rust type under a name the default holds. `Registry::create_type` answers that with a
/// panic, so the reading and the default are ONE row each and `tests/half_roster.rs` is where the
/// merge is pinned against a built schema.
///
/// The boolean row has a second, structural reason for landing where it did.
/// [`BooleanFilter`](crate::BooleanFilter) carries no reading parameter — it is the one kind with no
/// carrier axis, `bool` being the only type it guards — so there is no position for `Std` to be
/// selected in even in principle. The name it publishes IS the standard one.
///
/// The road NOT taken is a `ScalarWire<bool>` row here, which would have made
/// `ScalarFilter<bool, Std>` the reading and published the EIGHT-operator ordering face
/// `legacy/ingraph` renders under this name. The boolean kind's own law refuses it: `gt: $flag` asks
/// whether one flag exceeds another, which is meaningless however the operand arrives, and a schema
/// offering the question invites a client to ask it.
///
/// # `ID` is the row that is still missing
///
/// GraphQL's `ID` is a string-or-int a server may spell how it likes, and which Rust type this
/// framework's ID is has not been decided; it is also not only a reading's question, `ID` being a
/// BUILT-IN scalar that a schema may not redefine.
///
/// # `Int` is `i32` and `Float` is `f64`, which is the spec rather than a choice
///
/// GraphQL's `Int` is a signed 32-bit integer and its `Float` is a double, so those are the two
/// operands whose whole domain the standard type carries. A `Std` row over `i64` would put a name on
/// a range it cannot hold — the same silence the roster exists to end, read from the other side.
///
/// Unconditional, as everything in this module is.
///
/// # Examples
///
/// ```
/// use ingraph::{ScalarFilter, Std};
///
/// # #[cfg(feature = "async-graphql")]
/// # fn main() {
/// use ingraph::__private::async_graphql::InputType;
///
/// // The field that NAMES the reading, and the neighbour that says nothing.
/// assert_eq!(<ScalarFilter<i32, Std> as InputType>::type_name(), "IntFilter");
/// assert_eq!(<ScalarFilter<i32> as InputType>::type_name(), "I32Filter");
///
/// // The text row, where saying nothing already gets the standard name — there is no second
/// // reading to name, and the merge is the amendment.
/// use ingraph::TextFilter;
///
/// assert_eq!(<TextFilter<String> as InputType>::type_name(), "StringFilter");
/// # }
/// # #[cfg(not(feature = "async-graphql"))]
/// # fn main() {}
/// ```
/// What a TEXT filter's operands cross the wire as, and the name that filter is published under.
///
/// Implemented on a MARKER rather than on the operand, which is the whole of what the parameter
/// buys: [`Builtin`] answers for `String` and `SmolStr`, a declaring crate answers for its own types
/// on a marker of its own, and the two never meet in one coherence question because
/// [`TextFilter`](crate::TextFilter)'s wire face is ONE generic row over the marker.
///
/// # The NAME is here rather than on the operand
///
/// A GraphQL name is a schema commitment and belongs to the READING: `String` publishes
/// `StringFilter` and `smol_str::SmolStr` publishes the canonical `TextFilter`, which are two names
/// for one kind over two operands. Keyed on the operand there would be one name per type, and a
/// second reading of a type would have nowhere to say its own — which is exactly what a declaring
/// crate spends when it writes a marker of its own for a text newtype.
///
/// # `cross` is FALLIBLE and `carry` is not
///
/// Reading a wire value into a domain operand may refuse — a declarer's newtype validates, and a
/// refusal is the honest answer. Writing one back cannot: the operand is already a value of the
/// domain type, so a carrier that could not hold it would be a row that never worked.
///
/// A row whose crossing cannot fail names [`Infallible`] and pays nothing for the arm.
///
/// # Examples
///
/// A declaring crate's own text type, reaching a schema under a name it chooses. Both impls name a
/// LOCAL type, which is what the axis exists to make possible:
///
/// ```
/// use ingraph::{DefaultMarker, StringFilterMarker, StringMarker, TextFilter, TextWire};
///
/// /// A declarer's own text newtype.
/// #[derive(Clone)]
/// struct Tag(String);
///
/// /// The marker that says how a `Tag` crosses. A local type, so the row below is legal here.
/// enum TagWire {}
///
/// impl TextWire<Tag> for TagWire {
/// const NAME: &'static str = "TagFilter";
///
/// type Carrier = String;
/// type Error = core::convert::Infallible;
///
/// fn cross(carrier: String) -> Result<Tag, Self::Error> {
/// Ok(Tag(carrier))
/// }
///
/// fn carry(operand: &Tag) -> String {
/// operand.0.clone()
/// }
/// }
///
/// // The field's reading, pointed at the filter the marker above gives a wire face.
/// impl StringFilterMarker for Tag {
/// type Filter = TextFilter<Tag, TagWire>;
/// }
///
/// impl DefaultMarker for Tag {
/// type Marker = StringMarker<Tag>;
/// }
/// ```
/// What a SCALAR filter's operands cross the wire as, and the name that filter is published under —
/// [`TextWire`]'s twin at the ORDERING family, with the same seat and the same law.
///
/// Implemented on a MARKER rather than on the operand, and everything [`TextWire`]'s own note says
/// about why holds here word for word: [`Builtin`] answers for the framework's own operands, a
/// declaring crate answers for its own types on a marker of its own, and the two never meet in one
/// coherence question because [`ScalarFilter`](crate::ScalarFilter)'s wire face is ONE generic row
/// over the marker.
///
/// # The table this replaced was the LAST per-operand one
///
/// The text family took the axis first and the ordering family kept a registration per operand
/// until this trait: twelve numeric widths, eight `NonZero` widths, the two framework primitives, a
/// cardinality and jiff's four instants, each with its own `impl InputType for ScalarFilter<…>`
/// written out. A declaring crate could not add a row (`impl InputType for ScalarFilter<Rate>` is
/// `E0117` there) and this crate could not either, never having heard of the operand — so a
/// single-column downstream scalar reached the framework's ordering face nowhere, and the road left
/// was to MINT a filter of its own through the element mode. That road is still open and still
/// useful; what it is no longer is the only one.
///
/// # `cross` is FALLIBLE and `carry` is not
///
/// [`TextWire`]'s reason, unchanged: reading a wire value into a domain operand may refuse — a
/// declarer's newtype validates — and writing one back cannot, the operand already being a value of
/// the domain type. A row whose crossing cannot fail names [`Infallible`] and pays nothing.
///
/// # Examples
///
/// A declaring crate's own ordered newtype, reaching a schema under a name it chooses. Both impls
/// name a LOCAL type, which is what the axis exists to make possible:
///
/// ```
/// use ingraph::{DefaultMarker, ScalarFilter, ScalarFilterMarker, ScalarMarker, ScalarWire, U32};
///
/// /// A declarer's own scalar.
/// #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
/// struct Rate(u32);
///
/// /// The marker that says how a `Rate` crosses. A local type, so the row below is legal here.
/// enum RateWire {}
///
/// impl ScalarWire<Rate> for RateWire {
/// const NAME: &'static str = "RateFilter";
///
/// type Carrier = U32;
/// type Error = core::convert::Infallible;
///
/// fn cross(carrier: U32) -> Result<Rate, Self::Error> {
/// Ok(Rate(u32::from(carrier)))
/// }
///
/// fn carry(operand: &Rate) -> U32 {
/// U32::from(operand.0)
/// }
/// }
///
/// // The field's reading, pointed at the filter the marker above gives a wire face.
/// impl ScalarFilterMarker for Rate {
/// type Filter = ScalarFilter<Rate, RateWire>;
/// }
///
/// impl DefaultMarker for Rate {
/// type Marker = ScalarMarker<Rate>;
/// }
/// ```
/// What a BYTES filter's operands cross the wire as, and the name that filter is published under —
/// the third reading, over the byte vocabularies.
///
/// Keyed on the MARKER and on the OPERAND, and NOT on the storage shape:
/// Whether a column is variable-length or exactly `N` bytes is which byte KIND its filter is —
/// [`BytesFilter`](crate::BytesFilter) or
/// [`FixedBytesFilter`](crate::FixedBytesFilter) — and that decides which fields a face publishes,
/// not what a row here says. So ONE reading serves both kinds of one operand, and a row is asked
/// nothing about the width.
///
/// # A row supplies the BASE name, and the fixed kind decorates it
///
/// The published name is not this const alone. [`FixedBytesFilter`](crate::FixedBytesFilter) carries
/// the column's width in its type, and its face puts that width in front of the name a row states —
/// so one row over one operand gives `SumFilter` at a blob and `Fixed4SumFilter` at a four-byte
/// column, out of the single literal written here. That face is the one place the two halves are
/// joined.
///
/// **That is why the width needs no row and costs no name.** A reading keyed on the width would have
/// been a second literal per width for a fact the type already states; a name blind to it would have
/// put two Rust types under one GraphQL name and left `Registry::create_type`'s own panic as the
/// answer. The decoration is neither: one literal, and as many names as there are widths, none of
/// which anybody spells.
///
/// # The one row this replaced, and the absences it turned into one line each
///
/// `Vec<u8>` was the only byte operand with a wire face, and it had one because the blob is the
/// shape a column resolves to by default. `bytes::Bytes`, the `smol_bytes` blob and `[u8; N]` had
/// none — not for want of a CROSSING, hex serving any of them, but because each needed a concrete
/// registration only this crate could write and no
/// declaration had asked. Each is a [`Builtin`] row now, and a declarer's own byte newtype is one
/// row of its own.
///
/// # Examples
///
/// ```
/// use ingraph::{BytesFilter, BytesFilterMarker, BytesMarker, BytesWire, DefaultMarker, HexBytes};
///
/// /// A declarer's own digest.
/// #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
/// struct Sum(Vec<u8>);
///
/// /// The marker that says how a `Sum` crosses. A local type, so the row below is legal here.
/// enum SumWire {}
///
/// impl BytesWire<Sum> for SumWire {
/// const NAME: &'static str = "SumFilter";
///
/// type Carrier = HexBytes;
/// type Error = core::convert::Infallible;
///
/// fn cross(carrier: HexBytes) -> Result<Sum, Self::Error> {
/// Ok(Sum(Vec::from(carrier)))
/// }
///
/// fn carry(operand: &Sum) -> HexBytes {
/// HexBytes::from(operand.0.clone())
/// }
/// }
///
/// impl BytesFilterMarker for Sum {
/// type Filter = BytesFilter<Sum, SumWire>;
/// }
///
/// impl DefaultMarker for Sum {
/// type Marker = BytesMarker<Sum>;
/// }
/// ```
/// What ONE operand of this type crosses the wire as — the INPUT twin of
/// [`ToGraphqlOutput`](crate::ToGraphqlOutput), and the bound the collection faces ask of their
/// element.
///
/// Total over the types it registers, with the rows spelled out and no blanket. That is forced
/// rather than chosen — one trait cannot carry a `u128` row naming a carrier beside an identity row
/// over everything else without specialization, which is not on stable — and it is the posture
/// [`DefaultMarker`](crate::DefaultMarker) already takes beside it.
///
/// The associated type is a BARE seat — see the module note for the law, and
/// [`ToGraphqlOutput`](crate::ToGraphqlOutput) for the same one stated at the other position. The
/// cost, stated: a row naming a form nothing can parse is well formed here and fails at the first
/// face that parses it.
///
/// # Keyed on the TYPE, where [`TextWire`] is keyed on a marker
///
/// A collection filter carries no marker: `ListFilter<T, VF>` is the element and the element's
/// filter, and the marker that chose `VF` is spent by the time this bound is asked. So the element
/// answers for itself, and the consequence — ONE type, one input form — is the one
/// [`ToGraphqlOutput`](crate::ToGraphqlOutput) already states for the other direction.
///
/// # The refusal names the NARROW COLLECTION, and it is written rather than left to be inferred
///
/// The bound's loudest failure is a `Vec<T>` column whose element has no row here, because the WIDE
/// collection kinds ask for one on the element's behalf: six whole-collection operators hold
/// `Box<[T]>` and `has_element` holds a bare `T`, so a sequence or set face cannot be published
/// without publishing the element's literal form. Every one of those operators is a real question
/// while a literal is a real thing to write.
///
/// For a great many element types it is not, and the refusal points at the kind cut for them:
/// [`QuantifiedFilter`](crate::QuantifiedFilter), whose whole vocabulary is `any` and `count` and
/// whose face asks its element for nothing at all. The note is written into the attribute rather
/// than left for a reader to find, because *which collection kind this element belongs at* is a
/// design question the diagnostic is the only place anyone is asked it.
///
/// It is a SECOND note rather than the message, because this bound is asked at several positions —
/// a key, an index question's argument, a flags operand — and only one of them is a collection. The
/// message says what is missing and the first note says how to supply it; the collection note is
/// conditional in its own first clause, which is the honest shape for a hint that does not apply
/// everywhere the bound does.
///
/// # Examples
///
/// A downstream type joins by writing one row, on its own type:
///
/// ```
/// use ingraph::ToGraphqlInput;
///
/// #[derive(Clone)]
/// struct Tag(String);
///
/// impl ToGraphqlInput for Tag {
/// type Input = String;
/// type Error = core::convert::Infallible;
///
/// fn cross(input: String) -> Result<Self, Self::Error> {
/// Ok(Self(input))
/// }
///
/// fn carry(operand: &Self) -> String {
/// operand.0.clone()
/// }
/// }
/// ```
/// The row for an operand async-graphql ALREADY faces: the wire form IS the type.
/// The row for an operand whose wire form is a CARRIER — the two total conversions the carrier
/// already owns, spent in the two directions.
///
/// The clone is the honest cost of a total render: a filter must not be consumed to be written back,
/// which is the trade the crossing helpers beside the filters already make.
// The types whose async-graphql face is already the one this crate wants: a boolean, a string, and
// the two scalars this crate mints itself.
//
// The NUMERICS left this arm for the one below. They had a face and it was UNDER-SPECIFIED rather
// than absent: async-graphql publishes `i8`…`i64` and `u8`…`u64` as `Int` and both floats as
// `Float`, so ten Rust widths reached a schema under two names — a byte and a 64-bit id read
// identically, and an `f32` currency beside an `f64` one was ONE SDL type that two Rust types could
// be minted under in silence. The SCALAR SUITE is that silence ended; see `graphql::scalar`.
faces_itself!;
// THE CONFIDENCE IS ONE ROW OVER THE WIDTH, and the reason is a rustc DIAGNOSTIC rather than a
// preference.
//
// What four rows would have done is put four lines into rustc's *the following other types
// implement trait `ToGraphqlInput`* help, TWO OF WHICH RIDE A CARGO FEATURE. That help block is a
// list of implementers truncated to eight, so its content varies with the feature set — and
// `ingraph/tests/collection_element_form` is a golden built to be byte-identical on every lane that
// compiles it, which is four lanes with different vocabulary words. MEASURED, with the four rows in
// place: that help block held `Confidence<f32> Confidence<f64> Confidence<half::binary16::f16>
// Confidence<rust_decimal::decimal::Decimal>` under `half,rust_decimal` and the first two alone
// without them — one golden, two spellings, no way to pin both.
//
// One generic row prints as one line — `Confidence<S>` — and that line is the same in every build,
// because what varies is which INSTANTIATIONS exist and not which impl does. The membership is not
// lost with the list: it is [`ConfidenceWire`](crate::ConfidenceWire)'s, which is where a reader
// asks what one width does at the wire.
//
// THE FORM IS THE WIDTH'S OWN ROSTER CARRIER, which is where the `Score*` scalars' retirement lands
// on this map. A confidence used to face ITSELF here, the identity crossing being free while each
// width carried a `#[Scalar]` citizenship of its own; with those retired it crosses as `f32`, `f64`,
// `f16` or `f128` — the same form the OUTPUT side returns it in, which is the mirror law, and the
// same form the roster already published for the bare width.
//
// The crossing is where the INTERVAL is kept, and this is the position that made keeping it there
// possible: a literal is read into the width and then handed to `Confidence::new`, which refuses
// what a confidence is not. The retired scalars stated the interval in prose; this row enforces it.
//
// A collection column is what spends this row — `hasElement` and the six whole-collection operands
// of a `Vec<Confidence<f32>>` — where the SCALAR column spends `ConfidenceFilter`'s widthless
// operand instead. The two are not a disagreement: an ELEMENT is a value of the column, and a
// THRESHOLD is not.
/// **What a confidence refuses a wire value with**, and the whole of the interval's enforcement at
/// this crossing.
///
/// It carries no value, and that is the honest shape: what is wrong is a property of the operand the
/// client already wrote, and the operand travels back to them in async-graphql's own error context.
/// A copy of it here would be a second spelling of the same digits.
;
// The operands whose own face is missing, wrong, or too coarse to name a width.
//
// The twelve numerics cross through the suite: the Rust slot still holds a `u64`, and what changed
// is the WIRE NAME it publishes under. `u128` and `i128` are the two that had no face at ALL —
// async-graphql's integers stop at 64 bits and the impl is `E0117` for every crate but its own —
// and the blob is the one whose face answers a different question, `[Int!]` being a list of small
// integers where the column is a thumbnail.
crosses_through!;
// THE NETWORK VOCABULARY, crossing through the carriers `graphql::scalar` mints for it. Every one of
// the six is in `u128`'s position rather than the blob's: `std::net`'s types have no
// `async_graphql::InputType` in any crate but async-graphql's own, and async-graphql declines the
// impl — it ships an IP VALIDATOR (`validators/ip.rs`, a string check) and no scalar — so an address
// element had no face at all before these rows, where a numeric one merely had a coarse face.
crosses_through!;
// THE UUID, crossing through the carrier `graphql::scalar` mints for it — the address family's
// position exactly: `uuid::Uuid` has no `async_graphql::InputType` in any crate but async-graphql's
// own, and async-graphql declines the impl, so before this row a uuid operand had no face at all.
//
// It is the row that closes `graphql::filter`'s standing uuid note: the sentence there said the
// crate had not TAKEN the dependency, and the id vocabulary took it — unconditionally — some time
// after that sentence was written. See that module, where the note is now the record of what it
// used to say.
crosses_through!;
// THE PATTERN, crossing through the carrier `graphql::scalar` mints for it — the uuid row's position
// one type over, and for the same reason: `regex::Regex` has an `async_graphql::InputType` in no
// crate at all, so before this row a pattern operand had no wire face to be read from.
//
// The crossing is INFALLIBLE here even though reading a pattern can fail, and that is not a hole:
// the compile happens inside the carrier's own `ScalarType::parse`, so by the time a `RegexPattern`
// exists the text has already compiled and holding the value is all that is left. The refusal a
// client sees is the engine's own sentence, raised where the text was — see `graphql::scalar`.
crosses_through!;
/// **What a `NonZero*` operand refuses a wire ZERO with** — the INPUT direction's half of the
/// invariant, and the wire twin of [`NonZeroColumnError`](crate::NonZeroColumnError).
///
/// The two sit at the two ends of one column and answer two different questions. A stored `0` is a
/// row this code did not write — a hand edit, a shared column, a bit flip — and refuses on the way
/// OUT of the database. A wire `0` is a value a CLIENT just wrote, and refuses here, before it
/// becomes an operand at all: the width publishes its underlying integer's scalar, so `0` is a
/// perfectly good `u32` and it is exactly one value short of being a `NonZeroU32`.
///
/// It names the WIDTH, because that is the fact a client cannot discover by trying: the SDL says
/// `eq: u32`, and what tells a reader the zero is excluded is the input object's name
/// (`NonZeroU32Filter`) and this sentence. It carries no copy of the operand, for
/// [`OutsideTheInterval`]'s reason — the operand is a value the client already wrote, and it travels
/// back to them in async-graphql's own error context.
/// ONE `NonZero` WIDTH's two INPUT rows, out of one literal — the ordering reading it is filtered
/// under, and the element crossing a collection of it spends.
///
/// Both legs cross through the UNDERLYING INTEGER's roster carrier and both refuse a zero by name,
/// which is what keeps them one fact rather than two: a `NonZeroU32` column's `eq` and a
/// `Vec<NonZeroU32>` column's `hasElement` read the same scalar and refuse the same value with the
/// same sentence. They are written from one table for the reason the roster's own rows are written
/// from one — a row is the single place its behaviour is stated.
///
/// # The literal is the WIDTH and the filter name DERIVES from it
///
/// `NonZeroU32` gives `NonZeroU32Filter`, which is the derivation law read at a Pascal row: the
/// rows this replaced spelled the filter name outright, so a renamed width and a forgotten filter
/// were a state this file could be left in. `concat!` is enough here where the roster needs a
/// `const fn` — a named type's word is already capital, so there is no case to raise.
// **THE `NonZero` FAMILY CROSSES ON ITS UNDERLYING INTEGER'S ROSTER SCALAR**, and that is the
// 2026-08-25 completeness ruling. It used to cross as ITSELF: async-graphql faces eight of the ten
// widths and renders every one of them `Int`, so a schema published `NonZeroI32Filter { eq: Int }`
// and said neither the width nor the refusal — the absence `graphql::tests::wire` carried on the
// record with the note *one `carrier!` line each, the day a declaration asks*.
//
// Three things move with the rows. The SDL states the width now (`NonZeroU32Filter { eq: u32 }`),
// which is law one applied to an operand the suite had already spelled. The REFUSAL is this crate's
// and names what is wrong (`ZeroOperand`), where async-graphql's own row answered
// `InputValueError::expected_type` and told a client only that its number was not accepted. And the
// two WIDEST widths join the family at all: async-graphql's `non_zero_integers.rs` covers
// `NonZeroI8`…`NonZeroI64` and `NonZeroU8`…`NonZeroU64` — the 128-bit pair is `E0117` for it exactly
// as `u128` is — so `ScalarFilter<NonZeroU128>` compiled here and could reach no schema, which is
// the same hole the suite closed for the bare widths.
//
// The OUTPUT mirror is one file over, in [`output`](super::output), and it is the reason this had to
// be all ten rather than the eight that had a face: a column publishing `u32!` on the way out and
// taking `Int` on the way in is the two directions disagreeing about one column, which is the law
// the byte households are arranged around.
//
// `NonZeroUsize` and `NonZeroIsize` are NOT here, and their absence is `usize`'s own: a pointer
// width has no width to state, so the roster deliberately spells no scalar for it and there is no
// carrier for a `NonZero` row to cross on. See the cardinality note below, where the whole of that
// argument is.
nonzero_wire!
/// ONE CLAIMED BYTE VOCABULARY's ELEMENT crossing — what a `Vec` of it publishes per member.
///
/// The `crosses_through!` arm above cannot carry these: it spends `carrier.into()` and
/// `Carrier::from(operand)`, and [`HexBytes`] converts with `Vec<u8>` and with nothing else. So the
/// hop through the vector is written here, once, where its cost is visible.
///
/// The row exists to keep the two directions in step. A `Vec<bytes::Bytes>` column reads its members
/// through [`ToGraphqlOutput`](crate::ToGraphqlOutput) and writes them through this trait, and a
/// vocabulary with one and not the other is a collection column that can be returned and not
/// filtered.
/// The same, for a UTF-8 vocabulary: an element crosses as an ordinary `String`.
// THE ELEMENT half of the claim, and the reason it is here at all: `to_filter!` gives every one of
// these types a `DefaultVecMarker` row, so `Vec<smol_bytes::Bytes>` is a declarable LIST column
// whose element is asked for this crossing. Each row is the singular one with the vector's hop in
// it, and the two arms match the two faces their singular rows take.
element_via_hex!;
element_via_string!;
element_via_hex!;
/// The FIXED-WIDTH element, which is the one row in either arm whose crossing can refuse — so a
/// `Vec<[u8; 16]>` column refuses a wrong-width MEMBER with the sentence its scalar sibling uses,
/// rather than at the list.
faces_itself!;
crosses_through!;
// The WALL CLOCK and the DISPLACEMENT, which async-graphql names neither of — its `jiff` module's
// five `#[Scalar]` impls are `Date`, `Time`, `Timestamp`, `Zoned` and `Span`. So both cross through
// a carrier of this crate's, exactly as the duration one line up does and for the identical reason.
crosses_through!;
faces_itself!;
// The framework's own TEXT readings, and both names are canonical: `smol_str::SmolStr` owns
// `TextFilter`, being the crate's O(1)-clone text type and a NAMED one, and `String` owns
// `StringFilter`, which is GraphQL's own word for the operand it carries.
//
// **`String` IS NOT A ROSTER ROW**, which is the 2026-08-18 amendment and the reason this literal is
// back where it started. The lowercase roster exists to carry information GraphQL lacks — a width, a
// byte shape — and a string has none of it: `String` is the spec's own name for exactly this
// operand, so a lowercase `string` beside it would be a second spelling of one fact. The round that
// gave the row a lowercase name is retired whole, and what it was going to buy — a `Std` reading
// under the Pascal name — is bought by this row instead, the default and the standard reading being
// ONE row for an operand the standard already names.
//
// Minting a `string` CARRIER was never the cheap half either: a carrier owns its value
// (`ScalarType::parse` hands back a `Self`) and is what a RESOLVER returns, and `String`'s output row
// is `&'a String` — so every text field of every row in every response would become a copy. See
// [`roster`](super::roster), where the account is written once.
//
// The literal is spelled rather than derived, and that is the same fact from the other side: the
// derivation runs through a `#[Scalar(name = …)]`, and a row with no carrier has no such attribute
// to hold one.
/// ONE UTF-8 VOCABULARY's row: an operand that crosses as an ordinary GraphQL `String`, under the
/// name the household register gives it.
///
/// The carrier is `String` and not a minted scalar, which is the whole difference from the byte arm
/// above: these three types GUARANTEE valid UTF-8 — `Utf8Bytes` maintains the invariant with
/// `unsafe` and reads itself back through `str::from_utf8_unchecked` — so the natural wire form is
/// text, and the crossing is total in both directions (`From<String>` in, `as_str` out).
// THE `smol-bytes` UTF-8 HOUSEHOLD, which takes the TEXT face where its byte sibling takes the byte
// one. The split is the `to_filter!` rows' and is restated there: the UTF-8 guarantee is real rather
// than a convenience `AsRef<str>`, and what it buys is the substring / affix family — a
// `starts_with` over characters is a question about a string, and byte comparison is not.
//
// ONE ROW, under the CRATE's own name for the type. `smol_bytes::Utf8Bytes` is the crate's canonical
// spelling — the root re-export of `shared::Utf8Bytes`, and the type its own documentation
// recommends — so the wire name is `SmolUtf8Bytes` and nothing here says *shared*. See the byte
// household below for the whole of the ruling and for what the other strategy's absence means.
//
// No feature, for the byte household's reason: the dependency is in every build.
text_wire_via_string!
/// ONE SCALAR READING's rows: the marker that IS the reading, and the operands it answers for under
/// the names it gives them.
///
/// The crossing is the IDENTITY at every row here, which is what the arm assumes and what makes the
/// reading a name and nothing else: these operands already have an `async_graphql::InputType`, so
/// the wire form IS the type. A row whose operand needs a CARRIER is a roster row, and those live in
/// [`scalar`](super::scalar) with the literal their filter name derives from.
///
/// The marker is a parameter rather than a spelling because there are two readings now —
/// [`Builtin`] and [`Std`], the constitution's first and second laws — and both write rows of
/// exactly this shape over different operands.
/// The same row for an operand async-graphql does NOT face — the wire type is a CARRIER of this
/// crate's, and the two total conversions it owns are what the crossing spends.
///
/// It is [`scalar_wire!`] with the identity taken out, and the two exist side by side because the
/// question they answer differently is the one the module's table is built on: whether the operand
/// already has a `#[Scalar]` somewhere. A row that guessed would put a name on a type with no wire
/// face, and the failure would be an unsatisfied `InputType` bound at the FILTER rather than here.
// Gated where its ONE caller is, unlike `scalar_wire!` one block up: that macro has rows under
// several words and this one has rows under `jiff` alone, so an ungated definition is an
// `unused_macros` warning in every build without it.
// THE ROSTER's own rows are NOT here. The twelve plain numerics and the blob are
// [`Builtin`](Builtin) readings like every row below, but their names DERIVE from a scalar name that
// has to reach a `#[Scalar]` attribute — which no macro expands — so the literal and everything
// derived from it live together in [`scalar`](super::scalar)'s tables. That is the whole of the
// NAMING CONSTITUTION's first law made mechanical: one literal per row, and `U32Filter` is
// `UpperCamel("u32") + "Filter"` rather than a second spelling somebody has to keep in step. See
// [`roster`](super::roster) for the table and its three laws.
//
// The NETWORK family's six rows are in that same file and for that same reason, Pascal though they
// are: what decides where a row is written is whether its name reaches a `#[Scalar]` attribute, and
// an operand with a CARRIER always does. So the split this file's table sits on either side of is
// carrier-versus-none rather than lowercase-versus-Pascal.
//
// What is left here is the half of the register whose operands async-graphql already faces — a name
// and nothing else, over a crossing that is the identity.
// The operands async-graphql ALREADY faces, whose reading is the identity and whose name is the
// whole of what the row supplies.
//
// **THE TEN `NonZero` WIDTHS HAVE LEFT THIS TABLE**, and they left it in the direction the row above
// this block goes: their reading is no longer the identity, because the operand crosses on its
// underlying integer's roster carrier and refuses a zero on the way in. What has not changed is
// where their `to_filter!` rows live — this file's neighbour's own (`graphql::filter`), ruled
// 2026-08-22 (findit-studio/ingraph#355) — nor why THIS crate writes them: the orphan rule asks
// that one of trait or type be local, and a DOWNSTREAM crate has neither, so
// `impl ingraph::DefaultMarker for NonZeroI32` written there is `E0117`. Nor has the NAME: they are
// NAMED TYPES under the household register, so `NonZeroI32Filter` is the width's own word and a
// `Filter` suffix, Pascal throughout — a `NonZero` width cannot be `I32Filter`, which `i32` holds,
// so the modifier has to be in the name.
//
// What the SAME 2026-08-22 ruling gave those ten beside the marker rows is a STORAGE crossing —
// `comparison::sql::carrier`'s `NonZero*` row binds the wrapped integer through `NonZero::get`, and
// `column::assemble`'s reads it back through `NonZero::new`, refusing a stored `0` by name rather
// than panicking or minting one — so a declared column round-trips as well as any other roster
// row's. The wire rows above are that arrangement read at the OTHER end of the column, and
// `ZeroOperand` is `NonZeroColumnError`'s twin there.
//
// `Timestamp` is the one row here whose OPERAND this crate declares, so it supplies both halves —
// the input object here and the `#[Scalar]` citizenship in `graphql::filter`. It is a named type and
// takes Pascal, and `TimestampFilter` says the true thing because the scalar its operators read IS
// `Timestamp`, this crate's own. The four temporal rows below are named after async-graphql's
// scalars instead, which is a different situation and not a second scheme.
//
// **THE CONFIDENCE HAD FOUR ROWS HERE AND HAS NONE**, which is the 2026-08-21 ruling and not an
// omission. `Score`, `ScoreF64Filter`, `ScoreF16Filter` and `ScoreF128Filter` were four readings over
// four widths of one type, published as four input objects carrying one vocabulary word for word —
// and a reading is the wrong seat for that shape, because a reading exists to give ONE operand a
// name and these four operands differed only in precision. The kind is
// [`ConfidenceFilter`](crate::ConfidenceFilter) now: a non-generic filter, one name, one vocabulary,
// whose operand is widthless and whose width is chosen at the LOWERING by the column's own carrier.
// Nothing keyed on a marker is left for it to be a row of.
//
// `CountFilter` is the CARDINALITY row, and the one name here that states a ROLE rather than a type.
// `usize` is what a collection's LENGTH is, so it is what the `count` slot on `ListFilter` and
// `SetFilter` compares against — and the roster deliberately does not spell it. A `usize` HAS a
// Rust-flavoured name the first law would happily derive; what it has not got is a WIDTH, since the
// same server binary built for a 32-bit target would advertise a different range under it, and a
// schema type whose meaning depends on the server's pointer width is not a contract. Nor could the
// row reuse `U64Filter`: that name is `u64`'s, and `Registry::create_type` panics on one GraphQL
// name held by two Rust types with a `rust_typename` — which every input object has.
//
// Its operands render as `Int` and deliberately STAY there, where the twelve widths moved onto the
// suite: a cardinality is the FRAMEWORK's own protocol vocabulary rather than a declared column, and
// the protocol rows — `first`, `depth`, `ordinal`, `rank`, and this one — are the spec's `Int` by the
// L17 floor. They are law two's reading spent by the framework on itself, and the one place the
// standard five are the default rather than something a field asks for. Nothing else can end up
// under it: `usize` has no `to_filter!` row, so no field type resolves to `ScalarFilter<usize>` and
// the cardinality slot is the only position in this crate that names it.
scalar_wire!
/// **THE DECLARED CARDINALITY'S READING**, and the one row in this file whose NAME had to be argued
/// rather than derived.
///
/// [`Count`](crate::Count) is a named type of this crate's, so the household register says it wears
/// its own name — `CountFilter`. **That name is taken**, and by the paragraph directly above: the
/// PROTOCOL's cardinality slot, over `usize`, at the `count` field of `ListFilter` and `SetFilter`.
/// A schema holding both a collection column and a `Count` column would then put one GraphQL name on
/// two Rust types, which `Registry::create_type` answers with a PANIC at schema build — the failure
/// that note already records for `U64Filter`, met from the other side.
///
/// `U64Filter` is not free either, and for the temporal block's own reason read one row on: that name
/// is `u64`'s, and a client cannot be told that two input objects reading the same scalar are one
/// type. So the row takes the other true word for what the operand IS — a CARDINALITY — and the SDL
/// carries two honest names for two different contracts: `CountFilter` over `Int`, which is the
/// framework's protocol vocabulary at the L17 floor, and this one over `u64`, which is a DECLARED
/// column's own width.
///
/// The CROSSING is TOTAL in both directions and refuses nothing: every `u64` is a cardinality. What
/// the newtype states is where a value CAME FROM — see [`Count`](crate::Count), where that
/// provenance is what buys the type a column on the two dialects with no unsigned 64-bit integer —
/// and provenance is not a property a wire value can be checked for.
/// The ELEMENT crossing beside it, mirroring [`output`](super::output)'s own row so that the two
/// directions cannot come to disagree about one column: a `Vec<Count>` is returned as `[u64!]` and
/// asked about with `hasElement: u64`, out of one carrier.
// The temporal readings, named after their SCALAR rather than after the operand's Rust type — the
// one place the register's *a named type wears its own name* is set aside, and set aside because
// async-graphql has already named these (`types/external/jiff.rs`, the five `#[Scalar]` impls). A
// filter over `jiff::Timestamp` whose every operator reads `DateTime` would put two names on one
// thing in the same SDL, and the client reads the scalar. `legacy/ingraph` binds
// `jiff::Timestamp => "DateTimeFilter"` on the same grounds; the other three follow it.
//
// Both spellings are Pascal, so the household register is untouched either way: what the exception
// picks is WHICH named thing the name comes from, not which case it is written in.
//
// `TimestampFilter` is therefore NOT free for this block, and it is not a name it wants: it belongs
// to the framework's own `Timestamp` above, whose operators do read a scalar of that name. `Date`
// and `Time` are the two whose scalar name and Rust name coincide, so nothing distinguishes the two
// schemes there — `Timestamp` → `DateTime` and `Zoned` → `ZonedDateTime` are where the choice is
// visible.
scalar_wire!
// The two whose scalar this crate MINTS, which is why they take the carried row rather than the
// identity one above: async-graphql's `jiff` module stops at five `#[Scalar]` impls and neither of
// these is among them.
//
// `LocalDateTime` rather than `DateTime`, because async-graphql already binds that word to
// `jiff::Timestamp`, an INSTANT — see `filter::temporal`, where the pair of names is argued — and
// `UtcOffset` rather than `Offset`, because an unqualified one reads as a cursor's in a schema that
// paginates.
carried_wire!
// The framework's own BYTES reading is a ROSTER row and lives with the other twelve, in
// [`scalar`](super::scalar)'s `bytes_scalar!` table. Its operand is `bytes::Bytes` since the DEFAULT
// BYTE HOUSEHOLD swapped on 2026-08-18, and the name it derives is Pascal `BytesFilter` under the
// amended derivation law — `UpperCamel(scalar) + "Filter"`, with `bytes` the scalar every byte
// vocabulary here crosses on.
//
// `Vec<u8>` demoted to a NAMED vocabulary in the same ruling and takes its row below, beside the
// others. It is still a citizen and still a blob: `u8`'s `DefaultVecMarker` row is what decides a
// `Vec` of bytes is read as bytes, and this carrier is why a `Vec<u8>` column publishes as hex
// instead of through async-graphql's own blanket over `Vec<T>`, which renders `[Int!]` — a
// thumbnail asked about as a list of small integers.
//
// `U8VectorFilter` is the name, and it is the GROWABLE TWIN of `Fixed{N}U8ArrayFilter`: the two
// spell the same operand family at the two widths a byte column can have, and neither is the
// framework's default.
/// **What a fixed-width byte column refuses a wire value with**, and the only refusal among the
/// framework's own byte rows.
///
/// Every other [`Builtin`] byte crossing names [`Infallible`]: a blob, a `Bytes` and a `BytesMut`
/// hold whatever number of bytes arrived, so their crossing has nothing to check. `[u8; N]` holds
/// exactly `N`, and a client that wrote fifteen bytes into a sixteen-byte column asked something the
/// column cannot be asked. The answer is this sentence rather than a truncation or a zero pad —
/// either of which is a DIFFERENT question answered in silence, which is the one thing a crossing
/// must not do.
///
/// The sentence reaches the client verbatim through `InputValueError::custom`, which is what
/// [`BytesWire::Error`]'s `Display` bound is for.
/// **THE FIXED-WIDTH BYTE ROW**, one impl over every width, and the row the shape decoration was
/// built for.
///
/// `NAME` is `&'static str` and `N` is not in it, which is not a limitation here but the
/// arrangement: the width is the FILTER KIND's to say, and `[u8; N]`'s marker row carries
/// [`FixedBytesFilter`](crate::FixedBytesFilter), so the face assembles `Fixed16U8ArrayFilter` out
/// of this one literal and that one parameter. A row per width would be a table with no bound on its
/// length.
///
/// `U8ArrayFilter` is the base, and it is Pascal because `[u8; N]` is a NAMED type under the
/// household register rather than a width the roster spells — `u8Array` would claim the lowercase
/// space the roster's own rows hold. The undecorated name is not published by anything: every
/// `[u8; N]` column resolves to a fixed shape, so what a schema ever sees is a decorated form.
///
/// The carrier is the WIDTH's own — [`FixedU8Array<N>`](crate::FixedU8Array), which publishes
/// `Fixed{N}U8Array` and assembles that name exactly as this filter assembles its own. The ENCODING
/// is the blob's, hex at every width, so a client filtering a hash and a thumbnail reads one form
/// under two names.
// EVERY BLOB HOUSEHOLD'S READING IS IN `scalar` NOW, beside the scalar whose name its filter's is
// derived from — `bytes::Bytes` under `bytes`, `Vec<u8>` under `U8Vector`, `smol_bytes::Bytes` under
// `SmolBytes`. That is what keeps a row the single place either of its names is written. What stays
// here is the one reading no scalar table can hold: `[u8; N]`'s, above, whose name is ASSEMBLED from
// a const parameter rather than stated as a literal.
// THE SECOND LAW's ORDERING rows — see [`Std`] for the table of five, for the text row below it, and
// for why `Boolean` is reached without naming `Std` at all and `ID` is not reached yet.
//
// The crossing is the IDENTITY here as it is above, which is the whole point: async-graphql already
// faces `i32` as `Int` and `f64` as `Float`, so what this reading supplies is the NAME and nothing
// else. There is no carrier, because a standard type is the one wire form this framework does not
// have to mint.
//
// The pair does not collide with the roster: `ScalarFilter<i32, Std>` is `IntFilter` and
// `ScalarFilter<i32>` is `I32Filter`, so a schema may hold both — which is what makes the second law
// a reading a field OPTS INTO rather than a mode a schema is built in.
scalar_wire!
// **THE SECOND LAW'S TEXT ROW IS THE DEFAULT'S**, and that is the 2026-08-18 amendment rather than
// a gap. A `Std` row is writable only where it says something DIFFERENT from the default; over
// `String` it would say `StringFilter { eq: String }`, which is exactly what [`Builtin`]'s row
// publishes — so the two rows are ONE row, and writing this one would put a second Rust type
// (`TextFilter<String, Std>`) under a name the default holds, which `Registry::create_type` answers
// with a panic rather than a mismatch. `Boolean` is the same shape one kind over; see [`Std`], where
// the table of five says which rows are reachable and how.
/// A witness that `T` crosses into an INPUT position — the compile-level assertion, and nothing at
/// runtime.
///
/// [`OutputCrossing`](crate::OutputCrossing)'s twin, and it is the probe the collection faces are
/// proved with: naming `InputCrossing::<SomeType>::WITNESS` demands the row and nothing else, so an
/// element that lost its crossing fails where the witness is written rather than inside an expansion
/// nobody can edit.
///
/// # Examples
///
/// ```
/// use ingraph::InputCrossing;
///
/// // A type ALIAS resolves to the type it names, which is what makes the map alias-proof: the
/// // witness below is `u128`'s row, reached through a word no macro could match.
/// type Uuid7 = u128;
///
/// const _: InputCrossing<Uuid7> = InputCrossing::WITNESS;
/// const _: InputCrossing<Vec<u8>> = InputCrossing::WITNESS;
/// ```
///
/// A type with no row is refused where the witness is written:
///
/// ```compile_fail
/// struct Unregistered;
///
/// const _: ingraph::InputCrossing<Unregistered> = ingraph::InputCrossing::WITNESS;
/// ```
>);
// The module is unconditional and its TESTS are not: they read a form through
// `async_graphql::InputType::type_name`, which is a question about the binding rather than about
// the map.