1use std::cmp::Ordering;
2
3use typenum::tarr;
4
5use crate::*;
6
7impl<A: InlineOutput, B: ToOutput> ToOutput for (A, B) {
8 fn to_output(&self, output: &mut impl Output) {
9 self.0.to_output(output);
10 self.1.to_output(output);
11 }
12}
13
14impl<A: InlineOutput, B: InlineOutput> InlineOutput for (A, B) {}
15
16impl<A: ListHashes, B: ListHashes> ListHashes for (A, B) {
17 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
18 self.0.list_hashes(f);
19 self.1.list_hashes(f);
20 }
21}
22
23impl<A: Topological, B: Topological> Topological for (A, B) {
24 fn traverse(&self, visitor: &mut impl PointVisitor) {
25 self.0.traverse(visitor);
26 self.1.traverse(visitor);
27 }
28}
29
30impl<A: Tagged, B: Tagged> Tagged for (A, B) {
31 const TAGS: Tags = Tags(&[], &[&A::TAGS, &B::TAGS]);
32}
33
34impl<A: Size, B: Size> Size for (A, B)
35where
36 tarr![A::Size, B::Size,]: typenum::FoldAdd<Output: Unsigned>,
37{
38 const SIZE: usize = A::SIZE + B::SIZE;
39
40 type Size = <tarr![A::Size, B::Size,] as typenum::FoldAdd>::Output;
41}
42
43impl<II: ParseInput, A: ParseInline<II>, B: Parse<II>> Parse<II> for (A, B) {
44 fn parse(mut input: II) -> crate::Result<Self> {
45 Ok((input.parse_inline()?, input.parse()?))
46 }
47}
48
49impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>> ParseInline<II> for (A, B) {
50 fn parse_inline(input: &mut II) -> crate::Result<Self> {
51 Ok((input.parse_inline()?, input.parse_inline()?))
52 }
53}
54
55impl<A: MaybeHasNiche, B: MaybeHasNiche> MaybeHasNiche for (A, B) {
56 type MnArray = tarr![A::MnArray, B::MnArray,];
57}
58
59impl<A: ByteOrd + InlineOutput, B: ByteOrd> ByteOrd for (A, B) {
60 fn bytes_cmp(&self, other: &Self) -> Ordering {
61 (OrderedByBytes(&self.0), OrderedByBytes(&self.1))
62 .cmp(&(OrderedByBytes(&other.0), OrderedByBytes(&other.1)))
63 }
64}
65
66impl<A: Monostate, B: Monostate> Monostate for (A, B) {}
67
68impl<A: InlineOutput, B: InlineOutput, C: ToOutput> ToOutput for (A, B, C) {
69 fn to_output(&self, output: &mut impl Output) {
70 self.0.to_output(output);
71 self.1.to_output(output);
72 self.2.to_output(output);
73 }
74}
75
76impl<A: InlineOutput, B: InlineOutput, C: InlineOutput> InlineOutput for (A, B, C) {}
77
78impl<A: ListHashes, B: ListHashes, C: ListHashes> ListHashes for (A, B, C) {
79 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
80 self.0.list_hashes(f);
81 self.1.list_hashes(f);
82 self.2.list_hashes(f);
83 }
84}
85
86impl<A: Topological, B: Topological, C: Topological> Topological for (A, B, C) {
87 fn traverse(&self, visitor: &mut impl PointVisitor) {
88 self.0.traverse(visitor);
89 self.1.traverse(visitor);
90 self.2.traverse(visitor);
91 }
92}
93
94impl<A: Tagged, B: Tagged, C: Tagged> Tagged for (A, B, C) {
95 const TAGS: Tags = Tags(&[], &[&A::TAGS, &B::TAGS, &C::TAGS]);
96}
97
98impl<A: Size, B: Size, C: Size> Size for (A, B, C)
99where
100 tarr![A::Size, B::Size, C::Size,]: typenum::FoldAdd<Output: Unsigned>,
101{
102 const SIZE: usize = A::SIZE + B::SIZE + C::SIZE;
103
104 type Size = <tarr![A::Size, B::Size, C::Size,] as typenum::FoldAdd>::Output;
105}
106
107impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: Parse<II>> Parse<II> for (A, B, C) {
108 fn parse(mut input: II) -> crate::Result<Self> {
109 Ok((input.parse_inline()?, input.parse_inline()?, input.parse()?))
110 }
111}
112
113impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>> ParseInline<II>
114 for (A, B, C)
115{
116 fn parse_inline(input: &mut II) -> crate::Result<Self> {
117 Ok((
118 input.parse_inline()?,
119 input.parse_inline()?,
120 input.parse_inline()?,
121 ))
122 }
123}
124
125impl<A: MaybeHasNiche, B: MaybeHasNiche, C: MaybeHasNiche> MaybeHasNiche for (A, B, C) {
126 type MnArray = tarr![A::MnArray, B::MnArray, C::MnArray,];
127}
128
129impl<A: ByteOrd + InlineOutput, B: ByteOrd + InlineOutput, C: ByteOrd> ByteOrd for (A, B, C) {
130 fn bytes_cmp(&self, other: &Self) -> Ordering {
131 (
132 OrderedByBytes(&self.0),
133 OrderedByBytes(&self.1),
134 OrderedByBytes(&self.2),
135 )
136 .cmp(&(
137 OrderedByBytes(&other.0),
138 OrderedByBytes(&other.1),
139 OrderedByBytes(&other.2),
140 ))
141 }
142}
143
144impl<A: Monostate, B: Monostate, C: Monostate> Monostate for (A, B, C) {}
145
146impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: ToOutput> ToOutput for (A, B, C, D) {
147 fn to_output(&self, output: &mut impl Output) {
148 self.0.to_output(output);
149 self.1.to_output(output);
150 self.2.to_output(output);
151 self.3.to_output(output);
152 }
153}
154
155impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput> InlineOutput
156 for (A, B, C, D)
157{
158}
159
160impl<A: ListHashes, B: ListHashes, C: ListHashes, D: ListHashes> ListHashes for (A, B, C, D) {
161 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
162 self.0.list_hashes(f);
163 self.1.list_hashes(f);
164 self.2.list_hashes(f);
165 self.3.list_hashes(f);
166 }
167}
168
169impl<A: Topological, B: Topological, C: Topological, D: Topological> Topological for (A, B, C, D) {
170 fn traverse(&self, visitor: &mut impl PointVisitor) {
171 self.0.traverse(visitor);
172 self.1.traverse(visitor);
173 self.2.traverse(visitor);
174 self.3.traverse(visitor);
175 }
176}
177
178impl<A: Tagged, B: Tagged, C: Tagged, D: Tagged> Tagged for (A, B, C, D) {
179 const TAGS: Tags = Tags(&[], &[&A::TAGS, &B::TAGS, &C::TAGS, &D::TAGS]);
180}
181
182impl<A: Size, B: Size, C: Size, D: Size> Size for (A, B, C, D)
183where
184 tarr![A::Size, B::Size, C::Size, D::Size,]: typenum::FoldAdd<Output: Unsigned>,
185{
186 const SIZE: usize = A::SIZE + B::SIZE + C::SIZE + D::SIZE;
187
188 type Size = <tarr![A::Size, B::Size, C::Size, D::Size,] as typenum::FoldAdd>::Output;
189}
190
191impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: Parse<II>>
192 Parse<II> for (A, B, C, D)
193{
194 fn parse(mut input: II) -> crate::Result<Self> {
195 Ok((
196 input.parse_inline()?,
197 input.parse_inline()?,
198 input.parse_inline()?,
199 input.parse()?,
200 ))
201 }
202}
203
204impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>>
205 ParseInline<II> for (A, B, C, D)
206{
207 fn parse_inline(input: &mut II) -> crate::Result<Self> {
208 Ok((
209 input.parse_inline()?,
210 input.parse_inline()?,
211 input.parse_inline()?,
212 input.parse_inline()?,
213 ))
214 }
215}
216
217impl<A: MaybeHasNiche, B: MaybeHasNiche, C: MaybeHasNiche, D: MaybeHasNiche> MaybeHasNiche
218 for (A, B, C, D)
219{
220 type MnArray = tarr![A::MnArray, B::MnArray, C::MnArray, D::MnArray,];
221}
222
223impl<A: ByteOrd + InlineOutput, B: ByteOrd + InlineOutput, C: ByteOrd + InlineOutput, D: ByteOrd>
224 ByteOrd for (A, B, C, D)
225{
226 fn bytes_cmp(&self, other: &Self) -> Ordering {
227 (
228 OrderedByBytes(&self.0),
229 OrderedByBytes(&self.1),
230 OrderedByBytes(&self.2),
231 OrderedByBytes(&self.3),
232 )
233 .cmp(&(
234 OrderedByBytes(&other.0),
235 OrderedByBytes(&other.1),
236 OrderedByBytes(&other.2),
237 OrderedByBytes(&other.3),
238 ))
239 }
240}
241
242impl<A: Monostate, B: Monostate, C: Monostate, D: Monostate> Monostate for (A, B, C, D) {}
243
244impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: ToOutput> ToOutput
245 for (A, B, C, D, E)
246{
247 fn to_output(&self, output: &mut impl Output) {
248 self.0.to_output(output);
249 self.1.to_output(output);
250 self.2.to_output(output);
251 self.3.to_output(output);
252 self.4.to_output(output);
253 }
254}
255
256impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput>
257 InlineOutput for (A, B, C, D, E)
258{
259}
260
261impl<A: ListHashes, B: ListHashes, C: ListHashes, D: ListHashes, E: ListHashes> ListHashes
262 for (A, B, C, D, E)
263{
264 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
265 self.0.list_hashes(f);
266 self.1.list_hashes(f);
267 self.2.list_hashes(f);
268 self.3.list_hashes(f);
269 self.4.list_hashes(f);
270 }
271}
272
273impl<A: Topological, B: Topological, C: Topological, D: Topological, E: Topological> Topological
274 for (A, B, C, D, E)
275{
276 fn traverse(&self, visitor: &mut impl PointVisitor) {
277 self.0.traverse(visitor);
278 self.1.traverse(visitor);
279 self.2.traverse(visitor);
280 self.3.traverse(visitor);
281 self.4.traverse(visitor);
282 }
283}
284
285impl<A: Tagged, B: Tagged, C: Tagged, D: Tagged, E: Tagged> Tagged for (A, B, C, D, E) {
286 const TAGS: Tags = Tags(&[], &[&A::TAGS, &B::TAGS, &C::TAGS, &D::TAGS, &E::TAGS]);
287}
288
289impl<A: Size, B: Size, C: Size, D: Size, E: Size> Size for (A, B, C, D, E)
290where
291 tarr![A::Size, B::Size, C::Size, D::Size, E::Size,]: typenum::FoldAdd<Output: Unsigned>,
292{
293 const SIZE: usize = A::SIZE + B::SIZE + C::SIZE + D::SIZE + E::SIZE;
294
295 type Size = <tarr![A::Size, B::Size, C::Size, D::Size, E::Size,] as typenum::FoldAdd>::Output;
296}
297
298impl<
299 II: ParseInput,
300 A: ParseInline<II>,
301 B: ParseInline<II>,
302 C: ParseInline<II>,
303 D: ParseInline<II>,
304 E: Parse<II>,
305> Parse<II> for (A, B, C, D, E)
306{
307 fn parse(mut input: II) -> crate::Result<Self> {
308 Ok((
309 input.parse_inline()?,
310 input.parse_inline()?,
311 input.parse_inline()?,
312 input.parse_inline()?,
313 input.parse()?,
314 ))
315 }
316}
317
318impl<
319 II: ParseInput,
320 A: ParseInline<II>,
321 B: ParseInline<II>,
322 C: ParseInline<II>,
323 D: ParseInline<II>,
324 E: ParseInline<II>,
325> ParseInline<II> for (A, B, C, D, E)
326{
327 fn parse_inline(input: &mut II) -> crate::Result<Self> {
328 Ok((
329 input.parse_inline()?,
330 input.parse_inline()?,
331 input.parse_inline()?,
332 input.parse_inline()?,
333 input.parse_inline()?,
334 ))
335 }
336}
337
338impl<A: MaybeHasNiche, B: MaybeHasNiche, C: MaybeHasNiche, D: MaybeHasNiche, E: MaybeHasNiche>
339 MaybeHasNiche for (A, B, C, D, E)
340{
341 type MnArray = tarr![A::MnArray, B::MnArray, C::MnArray, D::MnArray, E::MnArray,];
342}
343
344impl<
345 A: ByteOrd + InlineOutput,
346 B: ByteOrd + InlineOutput,
347 C: ByteOrd + InlineOutput,
348 D: ByteOrd + InlineOutput,
349 E: ByteOrd,
350> ByteOrd for (A, B, C, D, E)
351{
352 fn bytes_cmp(&self, other: &Self) -> Ordering {
353 (
354 OrderedByBytes(&self.0),
355 OrderedByBytes(&self.1),
356 OrderedByBytes(&self.2),
357 OrderedByBytes(&self.3),
358 OrderedByBytes(&self.4),
359 )
360 .cmp(&(
361 OrderedByBytes(&other.0),
362 OrderedByBytes(&other.1),
363 OrderedByBytes(&other.2),
364 OrderedByBytes(&other.3),
365 OrderedByBytes(&other.4),
366 ))
367 }
368}
369
370impl<A: Monostate, B: Monostate, C: Monostate, D: Monostate, E: Monostate> Monostate
371 for (A, B, C, D, E)
372{
373}
374
375impl<
376 A: InlineOutput,
377 B: InlineOutput,
378 C: InlineOutput,
379 D: InlineOutput,
380 E: InlineOutput,
381 F: ToOutput,
382> ToOutput for (A, B, C, D, E, F)
383{
384 fn to_output(&self, output: &mut impl Output) {
385 self.0.to_output(output);
386 self.1.to_output(output);
387 self.2.to_output(output);
388 self.3.to_output(output);
389 self.4.to_output(output);
390 self.5.to_output(output);
391 }
392}
393
394impl<
395 A: InlineOutput,
396 B: InlineOutput,
397 C: InlineOutput,
398 D: InlineOutput,
399 E: InlineOutput,
400 F: InlineOutput,
401> InlineOutput for (A, B, C, D, E, F)
402{
403}
404
405impl<A: ListHashes, B: ListHashes, C: ListHashes, D: ListHashes, E: ListHashes, F: ListHashes>
406 ListHashes for (A, B, C, D, E, F)
407{
408 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
409 self.0.list_hashes(f);
410 self.1.list_hashes(f);
411 self.2.list_hashes(f);
412 self.3.list_hashes(f);
413 self.4.list_hashes(f);
414 self.5.list_hashes(f);
415 }
416}
417
418impl<A: Topological, B: Topological, C: Topological, D: Topological, E: Topological, F: Topological>
419 Topological for (A, B, C, D, E, F)
420{
421 fn traverse(&self, visitor: &mut impl PointVisitor) {
422 self.0.traverse(visitor);
423 self.1.traverse(visitor);
424 self.2.traverse(visitor);
425 self.3.traverse(visitor);
426 self.4.traverse(visitor);
427 self.5.traverse(visitor);
428 }
429}
430
431impl<A: Tagged, B: Tagged, C: Tagged, D: Tagged, E: Tagged, F: Tagged> Tagged
432 for (A, B, C, D, E, F)
433{
434 const TAGS: Tags = Tags(
435 &[],
436 &[&A::TAGS, &B::TAGS, &C::TAGS, &D::TAGS, &E::TAGS, &F::TAGS],
437 );
438}
439
440impl<A: Size, B: Size, C: Size, D: Size, E: Size, F: Size> Size for (A, B, C, D, E, F)
441where
442 tarr![A::Size, B::Size, C::Size, D::Size, E::Size, F::Size,]:
443 typenum::FoldAdd<Output: Unsigned>,
444{
445 const SIZE: usize = A::SIZE + B::SIZE + C::SIZE + D::SIZE + E::SIZE + F::SIZE;
446
447 type Size =
448 <tarr![A::Size, B::Size, C::Size, D::Size, E::Size, F::Size,] as typenum::FoldAdd>::Output;
449}
450
451impl<
452 II: ParseInput,
453 A: ParseInline<II>,
454 B: ParseInline<II>,
455 C: ParseInline<II>,
456 D: ParseInline<II>,
457 E: ParseInline<II>,
458 F: Parse<II>,
459> Parse<II> for (A, B, C, D, E, F)
460{
461 fn parse(mut input: II) -> crate::Result<Self> {
462 Ok((
463 input.parse_inline()?,
464 input.parse_inline()?,
465 input.parse_inline()?,
466 input.parse_inline()?,
467 input.parse_inline()?,
468 input.parse()?,
469 ))
470 }
471}
472
473impl<
474 II: ParseInput,
475 A: ParseInline<II>,
476 B: ParseInline<II>,
477 C: ParseInline<II>,
478 D: ParseInline<II>,
479 E: ParseInline<II>,
480 F: ParseInline<II>,
481> ParseInline<II> for (A, B, C, D, E, F)
482{
483 fn parse_inline(input: &mut II) -> crate::Result<Self> {
484 Ok((
485 input.parse_inline()?,
486 input.parse_inline()?,
487 input.parse_inline()?,
488 input.parse_inline()?,
489 input.parse_inline()?,
490 input.parse_inline()?,
491 ))
492 }
493}
494
495impl<
496 A: MaybeHasNiche,
497 B: MaybeHasNiche,
498 C: MaybeHasNiche,
499 D: MaybeHasNiche,
500 E: MaybeHasNiche,
501 F: MaybeHasNiche,
502> MaybeHasNiche for (A, B, C, D, E, F)
503{
504 type MnArray = tarr![
505 A::MnArray,
506 B::MnArray,
507 C::MnArray,
508 D::MnArray,
509 E::MnArray,
510 F::MnArray,
511 ];
512}
513
514impl<
515 A: ByteOrd + InlineOutput,
516 B: ByteOrd + InlineOutput,
517 C: ByteOrd + InlineOutput,
518 D: ByteOrd + InlineOutput,
519 E: ByteOrd + InlineOutput,
520 F: ByteOrd,
521> ByteOrd for (A, B, C, D, E, F)
522{
523 fn bytes_cmp(&self, other: &Self) -> Ordering {
524 (
525 OrderedByBytes(&self.0),
526 OrderedByBytes(&self.1),
527 OrderedByBytes(&self.2),
528 OrderedByBytes(&self.3),
529 OrderedByBytes(&self.4),
530 OrderedByBytes(&self.5),
531 )
532 .cmp(&(
533 OrderedByBytes(&other.0),
534 OrderedByBytes(&other.1),
535 OrderedByBytes(&other.2),
536 OrderedByBytes(&other.3),
537 OrderedByBytes(&other.4),
538 OrderedByBytes(&other.5),
539 ))
540 }
541}
542
543impl<A: Monostate, B: Monostate, C: Monostate, D: Monostate, E: Monostate, F: Monostate> Monostate
544 for (A, B, C, D, E, F)
545{
546}
547
548impl<
549 A: InlineOutput,
550 B: InlineOutput,
551 C: InlineOutput,
552 D: InlineOutput,
553 E: InlineOutput,
554 F: InlineOutput,
555 G: ToOutput,
556> ToOutput for (A, B, C, D, E, F, G)
557{
558 fn to_output(&self, output: &mut impl Output) {
559 self.0.to_output(output);
560 self.1.to_output(output);
561 self.2.to_output(output);
562 self.3.to_output(output);
563 self.4.to_output(output);
564 self.5.to_output(output);
565 self.6.to_output(output);
566 }
567}
568
569impl<
570 A: InlineOutput,
571 B: InlineOutput,
572 C: InlineOutput,
573 D: InlineOutput,
574 E: InlineOutput,
575 F: InlineOutput,
576 G: InlineOutput,
577> InlineOutput for (A, B, C, D, E, F, G)
578{
579}
580
581impl<
582 A: ListHashes,
583 B: ListHashes,
584 C: ListHashes,
585 D: ListHashes,
586 E: ListHashes,
587 F: ListHashes,
588 G: ListHashes,
589> ListHashes for (A, B, C, D, E, F, G)
590{
591 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
592 self.0.list_hashes(f);
593 self.1.list_hashes(f);
594 self.2.list_hashes(f);
595 self.3.list_hashes(f);
596 self.4.list_hashes(f);
597 self.5.list_hashes(f);
598 self.6.list_hashes(f);
599 }
600}
601
602impl<
603 A: Topological,
604 B: Topological,
605 C: Topological,
606 D: Topological,
607 E: Topological,
608 F: Topological,
609 G: Topological,
610> Topological for (A, B, C, D, E, F, G)
611{
612 fn traverse(&self, visitor: &mut impl PointVisitor) {
613 self.0.traverse(visitor);
614 self.1.traverse(visitor);
615 self.2.traverse(visitor);
616 self.3.traverse(visitor);
617 self.4.traverse(visitor);
618 self.5.traverse(visitor);
619 self.6.traverse(visitor);
620 }
621}
622
623impl<A: Tagged, B: Tagged, C: Tagged, D: Tagged, E: Tagged, F: Tagged, G: Tagged> Tagged
624 for (A, B, C, D, E, F, G)
625{
626 const TAGS: Tags = Tags(
627 &[],
628 &[
629 &A::TAGS,
630 &B::TAGS,
631 &C::TAGS,
632 &D::TAGS,
633 &E::TAGS,
634 &F::TAGS,
635 &G::TAGS,
636 ],
637 );
638}
639
640impl<A: Size, B: Size, C: Size, D: Size, E: Size, F: Size, G: Size> Size for (A, B, C, D, E, F, G)
641where
642 tarr![
643 A::Size,
644 B::Size,
645 C::Size,
646 D::Size,
647 E::Size,
648 F::Size,
649 G::Size,
650 ]: typenum::FoldAdd<Output: Unsigned>,
651{
652 const SIZE: usize = A::SIZE + B::SIZE + C::SIZE + D::SIZE + E::SIZE + F::SIZE + G::SIZE;
653
654 type Size = <tarr![
655 A::Size,
656 B::Size,
657 C::Size,
658 D::Size,
659 E::Size,
660 F::Size,
661 G::Size,
662 ] as typenum::FoldAdd>::Output;
663}
664
665impl<
666 II: ParseInput,
667 A: ParseInline<II>,
668 B: ParseInline<II>,
669 C: ParseInline<II>,
670 D: ParseInline<II>,
671 E: ParseInline<II>,
672 F: ParseInline<II>,
673 G: Parse<II>,
674> Parse<II> for (A, B, C, D, E, F, G)
675{
676 fn parse(mut input: II) -> crate::Result<Self> {
677 Ok((
678 input.parse_inline()?,
679 input.parse_inline()?,
680 input.parse_inline()?,
681 input.parse_inline()?,
682 input.parse_inline()?,
683 input.parse_inline()?,
684 input.parse()?,
685 ))
686 }
687}
688
689impl<
690 II: ParseInput,
691 A: ParseInline<II>,
692 B: ParseInline<II>,
693 C: ParseInline<II>,
694 D: ParseInline<II>,
695 E: ParseInline<II>,
696 F: ParseInline<II>,
697 G: ParseInline<II>,
698> ParseInline<II> for (A, B, C, D, E, F, G)
699{
700 fn parse_inline(input: &mut II) -> crate::Result<Self> {
701 Ok((
702 input.parse_inline()?,
703 input.parse_inline()?,
704 input.parse_inline()?,
705 input.parse_inline()?,
706 input.parse_inline()?,
707 input.parse_inline()?,
708 input.parse_inline()?,
709 ))
710 }
711}
712
713impl<
714 A: MaybeHasNiche,
715 B: MaybeHasNiche,
716 C: MaybeHasNiche,
717 D: MaybeHasNiche,
718 E: MaybeHasNiche,
719 F: MaybeHasNiche,
720 G: MaybeHasNiche,
721> MaybeHasNiche for (A, B, C, D, E, F, G)
722{
723 type MnArray = tarr![
724 A::MnArray,
725 B::MnArray,
726 C::MnArray,
727 D::MnArray,
728 E::MnArray,
729 F::MnArray,
730 G::MnArray,
731 ];
732}
733
734impl<
735 A: ByteOrd + InlineOutput,
736 B: ByteOrd + InlineOutput,
737 C: ByteOrd + InlineOutput,
738 D: ByteOrd + InlineOutput,
739 E: ByteOrd + InlineOutput,
740 F: ByteOrd + InlineOutput,
741 G: ByteOrd,
742> ByteOrd for (A, B, C, D, E, F, G)
743{
744 fn bytes_cmp(&self, other: &Self) -> Ordering {
745 (
746 OrderedByBytes(&self.0),
747 OrderedByBytes(&self.1),
748 OrderedByBytes(&self.2),
749 OrderedByBytes(&self.3),
750 OrderedByBytes(&self.4),
751 OrderedByBytes(&self.5),
752 OrderedByBytes(&self.6),
753 )
754 .cmp(&(
755 OrderedByBytes(&other.0),
756 OrderedByBytes(&other.1),
757 OrderedByBytes(&other.2),
758 OrderedByBytes(&other.3),
759 OrderedByBytes(&other.4),
760 OrderedByBytes(&other.5),
761 OrderedByBytes(&other.6),
762 ))
763 }
764}
765
766impl<
767 A: Monostate,
768 B: Monostate,
769 C: Monostate,
770 D: Monostate,
771 E: Monostate,
772 F: Monostate,
773 G: Monostate,
774> Monostate for (A, B, C, D, E, F, G)
775{
776}
777
778impl<
779 A: InlineOutput,
780 B: InlineOutput,
781 C: InlineOutput,
782 D: InlineOutput,
783 E: InlineOutput,
784 F: InlineOutput,
785 G: InlineOutput,
786 H: ToOutput,
787> ToOutput for (A, B, C, D, E, F, G, H)
788{
789 fn to_output(&self, output: &mut impl Output) {
790 self.0.to_output(output);
791 self.1.to_output(output);
792 self.2.to_output(output);
793 self.3.to_output(output);
794 self.4.to_output(output);
795 self.5.to_output(output);
796 self.6.to_output(output);
797 self.7.to_output(output);
798 }
799}
800
801impl<
802 A: InlineOutput,
803 B: InlineOutput,
804 C: InlineOutput,
805 D: InlineOutput,
806 E: InlineOutput,
807 F: InlineOutput,
808 G: InlineOutput,
809 H: InlineOutput,
810> InlineOutput for (A, B, C, D, E, F, G, H)
811{
812}
813
814impl<
815 A: ListHashes,
816 B: ListHashes,
817 C: ListHashes,
818 D: ListHashes,
819 E: ListHashes,
820 F: ListHashes,
821 G: ListHashes,
822 H: ListHashes,
823> ListHashes for (A, B, C, D, E, F, G, H)
824{
825 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
826 self.0.list_hashes(f);
827 self.1.list_hashes(f);
828 self.2.list_hashes(f);
829 self.3.list_hashes(f);
830 self.4.list_hashes(f);
831 self.5.list_hashes(f);
832 self.6.list_hashes(f);
833 self.7.list_hashes(f);
834 }
835}
836
837impl<
838 A: Topological,
839 B: Topological,
840 C: Topological,
841 D: Topological,
842 E: Topological,
843 F: Topological,
844 G: Topological,
845 H: Topological,
846> Topological for (A, B, C, D, E, F, G, H)
847{
848 fn traverse(&self, visitor: &mut impl PointVisitor) {
849 self.0.traverse(visitor);
850 self.1.traverse(visitor);
851 self.2.traverse(visitor);
852 self.3.traverse(visitor);
853 self.4.traverse(visitor);
854 self.5.traverse(visitor);
855 self.6.traverse(visitor);
856 self.7.traverse(visitor);
857 }
858}
859
860impl<A: Tagged, B: Tagged, C: Tagged, D: Tagged, E: Tagged, F: Tagged, G: Tagged, H: Tagged> Tagged
861 for (A, B, C, D, E, F, G, H)
862{
863 const TAGS: Tags = Tags(
864 &[],
865 &[
866 &A::TAGS,
867 &B::TAGS,
868 &C::TAGS,
869 &D::TAGS,
870 &E::TAGS,
871 &F::TAGS,
872 &G::TAGS,
873 &H::TAGS,
874 ],
875 );
876}
877
878impl<A: Size, B: Size, C: Size, D: Size, E: Size, F: Size, G: Size, H: Size> Size
879 for (A, B, C, D, E, F, G, H)
880where
881 tarr![
882 A::Size,
883 B::Size,
884 C::Size,
885 D::Size,
886 E::Size,
887 F::Size,
888 G::Size,
889 H::Size,
890 ]: typenum::FoldAdd<Output: Unsigned>,
891{
892 const SIZE: usize =
893 A::SIZE + B::SIZE + C::SIZE + D::SIZE + E::SIZE + F::SIZE + G::SIZE + H::SIZE;
894
895 type Size = <tarr![
896 A::Size,
897 B::Size,
898 C::Size,
899 D::Size,
900 E::Size,
901 F::Size,
902 G::Size,
903 H::Size,
904 ] as typenum::FoldAdd>::Output;
905}
906
907impl<
908 II: ParseInput,
909 A: ParseInline<II>,
910 B: ParseInline<II>,
911 C: ParseInline<II>,
912 D: ParseInline<II>,
913 E: ParseInline<II>,
914 F: ParseInline<II>,
915 G: ParseInline<II>,
916 H: Parse<II>,
917> Parse<II> for (A, B, C, D, E, F, G, H)
918{
919 fn parse(mut input: II) -> crate::Result<Self> {
920 Ok((
921 input.parse_inline()?,
922 input.parse_inline()?,
923 input.parse_inline()?,
924 input.parse_inline()?,
925 input.parse_inline()?,
926 input.parse_inline()?,
927 input.parse_inline()?,
928 input.parse()?,
929 ))
930 }
931}
932
933impl<
934 II: ParseInput,
935 A: ParseInline<II>,
936 B: ParseInline<II>,
937 C: ParseInline<II>,
938 D: ParseInline<II>,
939 E: ParseInline<II>,
940 F: ParseInline<II>,
941 G: ParseInline<II>,
942 H: ParseInline<II>,
943> ParseInline<II> for (A, B, C, D, E, F, G, H)
944{
945 fn parse_inline(input: &mut II) -> crate::Result<Self> {
946 Ok((
947 input.parse_inline()?,
948 input.parse_inline()?,
949 input.parse_inline()?,
950 input.parse_inline()?,
951 input.parse_inline()?,
952 input.parse_inline()?,
953 input.parse_inline()?,
954 input.parse_inline()?,
955 ))
956 }
957}
958
959impl<
960 A: MaybeHasNiche,
961 B: MaybeHasNiche,
962 C: MaybeHasNiche,
963 D: MaybeHasNiche,
964 E: MaybeHasNiche,
965 F: MaybeHasNiche,
966 G: MaybeHasNiche,
967 H: MaybeHasNiche,
968> MaybeHasNiche for (A, B, C, D, E, F, G, H)
969{
970 type MnArray = tarr![
971 A::MnArray,
972 B::MnArray,
973 C::MnArray,
974 D::MnArray,
975 E::MnArray,
976 F::MnArray,
977 G::MnArray,
978 H::MnArray,
979 ];
980}
981
982impl<
983 A: ByteOrd + InlineOutput,
984 B: ByteOrd + InlineOutput,
985 C: ByteOrd + InlineOutput,
986 D: ByteOrd + InlineOutput,
987 E: ByteOrd + InlineOutput,
988 F: ByteOrd + InlineOutput,
989 G: ByteOrd + InlineOutput,
990 H: ByteOrd,
991> ByteOrd for (A, B, C, D, E, F, G, H)
992{
993 fn bytes_cmp(&self, other: &Self) -> Ordering {
994 (
995 OrderedByBytes(&self.0),
996 OrderedByBytes(&self.1),
997 OrderedByBytes(&self.2),
998 OrderedByBytes(&self.3),
999 OrderedByBytes(&self.4),
1000 OrderedByBytes(&self.5),
1001 OrderedByBytes(&self.6),
1002 OrderedByBytes(&self.7),
1003 )
1004 .cmp(&(
1005 OrderedByBytes(&other.0),
1006 OrderedByBytes(&other.1),
1007 OrderedByBytes(&other.2),
1008 OrderedByBytes(&other.3),
1009 OrderedByBytes(&other.4),
1010 OrderedByBytes(&other.5),
1011 OrderedByBytes(&other.6),
1012 OrderedByBytes(&other.7),
1013 ))
1014 }
1015}
1016
1017impl<
1018 A: Monostate,
1019 B: Monostate,
1020 C: Monostate,
1021 D: Monostate,
1022 E: Monostate,
1023 F: Monostate,
1024 G: Monostate,
1025 H: Monostate,
1026> Monostate for (A, B, C, D, E, F, G, H)
1027{
1028}
1029
1030impl<
1031 A: InlineOutput,
1032 B: InlineOutput,
1033 C: InlineOutput,
1034 D: InlineOutput,
1035 E: InlineOutput,
1036 F: InlineOutput,
1037 G: InlineOutput,
1038 H: InlineOutput,
1039 I: ToOutput,
1040> ToOutput for (A, B, C, D, E, F, G, H, I)
1041{
1042 fn to_output(&self, output: &mut impl Output) {
1043 self.0.to_output(output);
1044 self.1.to_output(output);
1045 self.2.to_output(output);
1046 self.3.to_output(output);
1047 self.4.to_output(output);
1048 self.5.to_output(output);
1049 self.6.to_output(output);
1050 self.7.to_output(output);
1051 self.8.to_output(output);
1052 }
1053}
1054
1055impl<
1056 A: InlineOutput,
1057 B: InlineOutput,
1058 C: InlineOutput,
1059 D: InlineOutput,
1060 E: InlineOutput,
1061 F: InlineOutput,
1062 G: InlineOutput,
1063 H: InlineOutput,
1064 I: InlineOutput,
1065> InlineOutput for (A, B, C, D, E, F, G, H, I)
1066{
1067}
1068
1069impl<
1070 A: ListHashes,
1071 B: ListHashes,
1072 C: ListHashes,
1073 D: ListHashes,
1074 E: ListHashes,
1075 F: ListHashes,
1076 G: ListHashes,
1077 H: ListHashes,
1078 I: ListHashes,
1079> ListHashes for (A, B, C, D, E, F, G, H, I)
1080{
1081 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
1082 self.0.list_hashes(f);
1083 self.1.list_hashes(f);
1084 self.2.list_hashes(f);
1085 self.3.list_hashes(f);
1086 self.4.list_hashes(f);
1087 self.5.list_hashes(f);
1088 self.6.list_hashes(f);
1089 self.7.list_hashes(f);
1090 self.8.list_hashes(f);
1091 }
1092}
1093
1094impl<
1095 A: Topological,
1096 B: Topological,
1097 C: Topological,
1098 D: Topological,
1099 E: Topological,
1100 F: Topological,
1101 G: Topological,
1102 H: Topological,
1103 I: Topological,
1104> Topological for (A, B, C, D, E, F, G, H, I)
1105{
1106 fn traverse(&self, visitor: &mut impl PointVisitor) {
1107 self.0.traverse(visitor);
1108 self.1.traverse(visitor);
1109 self.2.traverse(visitor);
1110 self.3.traverse(visitor);
1111 self.4.traverse(visitor);
1112 self.5.traverse(visitor);
1113 self.6.traverse(visitor);
1114 self.7.traverse(visitor);
1115 self.8.traverse(visitor);
1116 }
1117}
1118
1119impl<
1120 A: Tagged,
1121 B: Tagged,
1122 C: Tagged,
1123 D: Tagged,
1124 E: Tagged,
1125 F: Tagged,
1126 G: Tagged,
1127 H: Tagged,
1128 I: Tagged,
1129> Tagged for (A, B, C, D, E, F, G, H, I)
1130{
1131 const TAGS: Tags = Tags(
1132 &[],
1133 &[
1134 &A::TAGS,
1135 &B::TAGS,
1136 &C::TAGS,
1137 &D::TAGS,
1138 &E::TAGS,
1139 &F::TAGS,
1140 &G::TAGS,
1141 &H::TAGS,
1142 &I::TAGS,
1143 ],
1144 );
1145}
1146
1147impl<A: Size, B: Size, C: Size, D: Size, E: Size, F: Size, G: Size, H: Size, I: Size> Size
1148 for (A, B, C, D, E, F, G, H, I)
1149where
1150 tarr![
1151 A::Size,
1152 B::Size,
1153 C::Size,
1154 D::Size,
1155 E::Size,
1156 F::Size,
1157 G::Size,
1158 H::Size,
1159 I::Size,
1160 ]: typenum::FoldAdd<Output: Unsigned>,
1161{
1162 const SIZE: usize =
1163 A::SIZE + B::SIZE + C::SIZE + D::SIZE + E::SIZE + F::SIZE + G::SIZE + H::SIZE + I::SIZE;
1164
1165 type Size = <tarr![
1166 A::Size,
1167 B::Size,
1168 C::Size,
1169 D::Size,
1170 E::Size,
1171 F::Size,
1172 G::Size,
1173 H::Size,
1174 I::Size,
1175 ] as typenum::FoldAdd>::Output;
1176}
1177
1178impl<
1179 II: ParseInput,
1180 A: ParseInline<II>,
1181 B: ParseInline<II>,
1182 C: ParseInline<II>,
1183 D: ParseInline<II>,
1184 E: ParseInline<II>,
1185 F: ParseInline<II>,
1186 G: ParseInline<II>,
1187 H: ParseInline<II>,
1188 I: Parse<II>,
1189> Parse<II> for (A, B, C, D, E, F, G, H, I)
1190{
1191 fn parse(mut input: II) -> crate::Result<Self> {
1192 Ok((
1193 input.parse_inline()?,
1194 input.parse_inline()?,
1195 input.parse_inline()?,
1196 input.parse_inline()?,
1197 input.parse_inline()?,
1198 input.parse_inline()?,
1199 input.parse_inline()?,
1200 input.parse_inline()?,
1201 input.parse()?,
1202 ))
1203 }
1204}
1205
1206impl<
1207 II: ParseInput,
1208 A: ParseInline<II>,
1209 B: ParseInline<II>,
1210 C: ParseInline<II>,
1211 D: ParseInline<II>,
1212 E: ParseInline<II>,
1213 F: ParseInline<II>,
1214 G: ParseInline<II>,
1215 H: ParseInline<II>,
1216 I: ParseInline<II>,
1217> ParseInline<II> for (A, B, C, D, E, F, G, H, I)
1218{
1219 fn parse_inline(input: &mut II) -> crate::Result<Self> {
1220 Ok((
1221 input.parse_inline()?,
1222 input.parse_inline()?,
1223 input.parse_inline()?,
1224 input.parse_inline()?,
1225 input.parse_inline()?,
1226 input.parse_inline()?,
1227 input.parse_inline()?,
1228 input.parse_inline()?,
1229 input.parse_inline()?,
1230 ))
1231 }
1232}
1233
1234impl<
1235 A: MaybeHasNiche,
1236 B: MaybeHasNiche,
1237 C: MaybeHasNiche,
1238 D: MaybeHasNiche,
1239 E: MaybeHasNiche,
1240 F: MaybeHasNiche,
1241 G: MaybeHasNiche,
1242 H: MaybeHasNiche,
1243 I: MaybeHasNiche,
1244> MaybeHasNiche for (A, B, C, D, E, F, G, H, I)
1245{
1246 type MnArray = tarr![
1247 A::MnArray,
1248 B::MnArray,
1249 C::MnArray,
1250 D::MnArray,
1251 E::MnArray,
1252 F::MnArray,
1253 G::MnArray,
1254 H::MnArray,
1255 I::MnArray,
1256 ];
1257}
1258
1259impl<
1260 A: ByteOrd + InlineOutput,
1261 B: ByteOrd + InlineOutput,
1262 C: ByteOrd + InlineOutput,
1263 D: ByteOrd + InlineOutput,
1264 E: ByteOrd + InlineOutput,
1265 F: ByteOrd + InlineOutput,
1266 G: ByteOrd + InlineOutput,
1267 H: ByteOrd + InlineOutput,
1268 I: ByteOrd,
1269> ByteOrd for (A, B, C, D, E, F, G, H, I)
1270{
1271 fn bytes_cmp(&self, other: &Self) -> Ordering {
1272 (
1273 OrderedByBytes(&self.0),
1274 OrderedByBytes(&self.1),
1275 OrderedByBytes(&self.2),
1276 OrderedByBytes(&self.3),
1277 OrderedByBytes(&self.4),
1278 OrderedByBytes(&self.5),
1279 OrderedByBytes(&self.6),
1280 OrderedByBytes(&self.7),
1281 OrderedByBytes(&self.8),
1282 )
1283 .cmp(&(
1284 OrderedByBytes(&other.0),
1285 OrderedByBytes(&other.1),
1286 OrderedByBytes(&other.2),
1287 OrderedByBytes(&other.3),
1288 OrderedByBytes(&other.4),
1289 OrderedByBytes(&other.5),
1290 OrderedByBytes(&other.6),
1291 OrderedByBytes(&other.7),
1292 OrderedByBytes(&other.8),
1293 ))
1294 }
1295}
1296
1297impl<
1298 A: Monostate,
1299 B: Monostate,
1300 C: Monostate,
1301 D: Monostate,
1302 E: Monostate,
1303 F: Monostate,
1304 G: Monostate,
1305 H: Monostate,
1306 I: Monostate,
1307> Monostate for (A, B, C, D, E, F, G, H, I)
1308{
1309}
1310
1311impl<
1312 A: InlineOutput,
1313 B: InlineOutput,
1314 C: InlineOutput,
1315 D: InlineOutput,
1316 E: InlineOutput,
1317 F: InlineOutput,
1318 G: InlineOutput,
1319 H: InlineOutput,
1320 I: InlineOutput,
1321 J: ToOutput,
1322> ToOutput for (A, B, C, D, E, F, G, H, I, J)
1323{
1324 fn to_output(&self, output: &mut impl Output) {
1325 self.0.to_output(output);
1326 self.1.to_output(output);
1327 self.2.to_output(output);
1328 self.3.to_output(output);
1329 self.4.to_output(output);
1330 self.5.to_output(output);
1331 self.6.to_output(output);
1332 self.7.to_output(output);
1333 self.8.to_output(output);
1334 self.9.to_output(output);
1335 }
1336}
1337
1338impl<
1339 A: InlineOutput,
1340 B: InlineOutput,
1341 C: InlineOutput,
1342 D: InlineOutput,
1343 E: InlineOutput,
1344 F: InlineOutput,
1345 G: InlineOutput,
1346 H: InlineOutput,
1347 I: InlineOutput,
1348 J: InlineOutput,
1349> InlineOutput for (A, B, C, D, E, F, G, H, I, J)
1350{
1351}
1352
1353impl<
1354 A: ListHashes,
1355 B: ListHashes,
1356 C: ListHashes,
1357 D: ListHashes,
1358 E: ListHashes,
1359 F: ListHashes,
1360 G: ListHashes,
1361 H: ListHashes,
1362 I: ListHashes,
1363 J: ListHashes,
1364> ListHashes for (A, B, C, D, E, F, G, H, I, J)
1365{
1366 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
1367 self.0.list_hashes(f);
1368 self.1.list_hashes(f);
1369 self.2.list_hashes(f);
1370 self.3.list_hashes(f);
1371 self.4.list_hashes(f);
1372 self.5.list_hashes(f);
1373 self.6.list_hashes(f);
1374 self.7.list_hashes(f);
1375 self.8.list_hashes(f);
1376 self.9.list_hashes(f);
1377 }
1378}
1379
1380impl<
1381 A: Topological,
1382 B: Topological,
1383 C: Topological,
1384 D: Topological,
1385 E: Topological,
1386 F: Topological,
1387 G: Topological,
1388 H: Topological,
1389 I: Topological,
1390 J: Topological,
1391> Topological for (A, B, C, D, E, F, G, H, I, J)
1392{
1393 fn traverse(&self, visitor: &mut impl PointVisitor) {
1394 self.0.traverse(visitor);
1395 self.1.traverse(visitor);
1396 self.2.traverse(visitor);
1397 self.3.traverse(visitor);
1398 self.4.traverse(visitor);
1399 self.5.traverse(visitor);
1400 self.6.traverse(visitor);
1401 self.7.traverse(visitor);
1402 self.8.traverse(visitor);
1403 self.9.traverse(visitor);
1404 }
1405}
1406
1407impl<
1408 A: Tagged,
1409 B: Tagged,
1410 C: Tagged,
1411 D: Tagged,
1412 E: Tagged,
1413 F: Tagged,
1414 G: Tagged,
1415 H: Tagged,
1416 I: Tagged,
1417 J: Tagged,
1418> Tagged for (A, B, C, D, E, F, G, H, I, J)
1419{
1420 const TAGS: Tags = Tags(
1421 &[],
1422 &[
1423 &A::TAGS,
1424 &B::TAGS,
1425 &C::TAGS,
1426 &D::TAGS,
1427 &E::TAGS,
1428 &F::TAGS,
1429 &G::TAGS,
1430 &H::TAGS,
1431 &I::TAGS,
1432 &J::TAGS,
1433 ],
1434 );
1435}
1436
1437impl<A: Size, B: Size, C: Size, D: Size, E: Size, F: Size, G: Size, H: Size, I: Size, J: Size> Size
1438 for (A, B, C, D, E, F, G, H, I, J)
1439where
1440 tarr![
1441 A::Size,
1442 B::Size,
1443 C::Size,
1444 D::Size,
1445 E::Size,
1446 F::Size,
1447 G::Size,
1448 H::Size,
1449 I::Size,
1450 J::Size,
1451 ]: typenum::FoldAdd<Output: Unsigned>,
1452{
1453 const SIZE: usize = A::SIZE
1454 + B::SIZE
1455 + C::SIZE
1456 + D::SIZE
1457 + E::SIZE
1458 + F::SIZE
1459 + G::SIZE
1460 + H::SIZE
1461 + I::SIZE
1462 + J::SIZE;
1463
1464 type Size = <tarr![
1465 A::Size,
1466 B::Size,
1467 C::Size,
1468 D::Size,
1469 E::Size,
1470 F::Size,
1471 G::Size,
1472 H::Size,
1473 I::Size,
1474 J::Size,
1475 ] as typenum::FoldAdd>::Output;
1476}
1477
1478impl<
1479 II: ParseInput,
1480 A: ParseInline<II>,
1481 B: ParseInline<II>,
1482 C: ParseInline<II>,
1483 D: ParseInline<II>,
1484 E: ParseInline<II>,
1485 F: ParseInline<II>,
1486 G: ParseInline<II>,
1487 H: ParseInline<II>,
1488 I: ParseInline<II>,
1489 J: Parse<II>,
1490> Parse<II> for (A, B, C, D, E, F, G, H, I, J)
1491{
1492 fn parse(mut input: II) -> crate::Result<Self> {
1493 Ok((
1494 input.parse_inline()?,
1495 input.parse_inline()?,
1496 input.parse_inline()?,
1497 input.parse_inline()?,
1498 input.parse_inline()?,
1499 input.parse_inline()?,
1500 input.parse_inline()?,
1501 input.parse_inline()?,
1502 input.parse_inline()?,
1503 input.parse()?,
1504 ))
1505 }
1506}
1507
1508impl<
1509 II: ParseInput,
1510 A: ParseInline<II>,
1511 B: ParseInline<II>,
1512 C: ParseInline<II>,
1513 D: ParseInline<II>,
1514 E: ParseInline<II>,
1515 F: ParseInline<II>,
1516 G: ParseInline<II>,
1517 H: ParseInline<II>,
1518 I: ParseInline<II>,
1519 J: ParseInline<II>,
1520> ParseInline<II> for (A, B, C, D, E, F, G, H, I, J)
1521{
1522 fn parse_inline(input: &mut II) -> crate::Result<Self> {
1523 Ok((
1524 input.parse_inline()?,
1525 input.parse_inline()?,
1526 input.parse_inline()?,
1527 input.parse_inline()?,
1528 input.parse_inline()?,
1529 input.parse_inline()?,
1530 input.parse_inline()?,
1531 input.parse_inline()?,
1532 input.parse_inline()?,
1533 input.parse_inline()?,
1534 ))
1535 }
1536}
1537
1538impl<
1539 A: MaybeHasNiche,
1540 B: MaybeHasNiche,
1541 C: MaybeHasNiche,
1542 D: MaybeHasNiche,
1543 E: MaybeHasNiche,
1544 F: MaybeHasNiche,
1545 G: MaybeHasNiche,
1546 H: MaybeHasNiche,
1547 I: MaybeHasNiche,
1548 J: MaybeHasNiche,
1549> MaybeHasNiche for (A, B, C, D, E, F, G, H, I, J)
1550{
1551 type MnArray = tarr![
1552 A::MnArray,
1553 B::MnArray,
1554 C::MnArray,
1555 D::MnArray,
1556 E::MnArray,
1557 F::MnArray,
1558 G::MnArray,
1559 H::MnArray,
1560 I::MnArray,
1561 J::MnArray,
1562 ];
1563}
1564
1565impl<
1566 A: ByteOrd + InlineOutput,
1567 B: ByteOrd + InlineOutput,
1568 C: ByteOrd + InlineOutput,
1569 D: ByteOrd + InlineOutput,
1570 E: ByteOrd + InlineOutput,
1571 F: ByteOrd + InlineOutput,
1572 G: ByteOrd + InlineOutput,
1573 H: ByteOrd + InlineOutput,
1574 I: ByteOrd + InlineOutput,
1575 J: ByteOrd,
1576> ByteOrd for (A, B, C, D, E, F, G, H, I, J)
1577{
1578 fn bytes_cmp(&self, other: &Self) -> Ordering {
1579 (
1580 OrderedByBytes(&self.0),
1581 OrderedByBytes(&self.1),
1582 OrderedByBytes(&self.2),
1583 OrderedByBytes(&self.3),
1584 OrderedByBytes(&self.4),
1585 OrderedByBytes(&self.5),
1586 OrderedByBytes(&self.6),
1587 OrderedByBytes(&self.7),
1588 OrderedByBytes(&self.8),
1589 OrderedByBytes(&self.9),
1590 )
1591 .cmp(&(
1592 OrderedByBytes(&other.0),
1593 OrderedByBytes(&other.1),
1594 OrderedByBytes(&other.2),
1595 OrderedByBytes(&other.3),
1596 OrderedByBytes(&other.4),
1597 OrderedByBytes(&other.5),
1598 OrderedByBytes(&other.6),
1599 OrderedByBytes(&other.7),
1600 OrderedByBytes(&other.8),
1601 OrderedByBytes(&other.9),
1602 ))
1603 }
1604}
1605
1606impl<
1607 A: Monostate,
1608 B: Monostate,
1609 C: Monostate,
1610 D: Monostate,
1611 E: Monostate,
1612 F: Monostate,
1613 G: Monostate,
1614 H: Monostate,
1615 I: Monostate,
1616 J: Monostate,
1617> Monostate for (A, B, C, D, E, F, G, H, I, J)
1618{
1619}
1620
1621impl<
1622 A: InlineOutput,
1623 B: InlineOutput,
1624 C: InlineOutput,
1625 D: InlineOutput,
1626 E: InlineOutput,
1627 F: InlineOutput,
1628 G: InlineOutput,
1629 H: InlineOutput,
1630 I: InlineOutput,
1631 J: InlineOutput,
1632 K: ToOutput,
1633> ToOutput for (A, B, C, D, E, F, G, H, I, J, K)
1634{
1635 fn to_output(&self, output: &mut impl Output) {
1636 self.0.to_output(output);
1637 self.1.to_output(output);
1638 self.2.to_output(output);
1639 self.3.to_output(output);
1640 self.4.to_output(output);
1641 self.5.to_output(output);
1642 self.6.to_output(output);
1643 self.7.to_output(output);
1644 self.8.to_output(output);
1645 self.9.to_output(output);
1646 self.10.to_output(output);
1647 }
1648}
1649
1650impl<
1651 A: InlineOutput,
1652 B: InlineOutput,
1653 C: InlineOutput,
1654 D: InlineOutput,
1655 E: InlineOutput,
1656 F: InlineOutput,
1657 G: InlineOutput,
1658 H: InlineOutput,
1659 I: InlineOutput,
1660 J: InlineOutput,
1661 K: InlineOutput,
1662> InlineOutput for (A, B, C, D, E, F, G, H, I, J, K)
1663{
1664}
1665
1666impl<
1667 A: ListHashes,
1668 B: ListHashes,
1669 C: ListHashes,
1670 D: ListHashes,
1671 E: ListHashes,
1672 F: ListHashes,
1673 G: ListHashes,
1674 H: ListHashes,
1675 I: ListHashes,
1676 J: ListHashes,
1677 K: ListHashes,
1678> ListHashes for (A, B, C, D, E, F, G, H, I, J, K)
1679{
1680 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
1681 self.0.list_hashes(f);
1682 self.1.list_hashes(f);
1683 self.2.list_hashes(f);
1684 self.3.list_hashes(f);
1685 self.4.list_hashes(f);
1686 self.5.list_hashes(f);
1687 self.6.list_hashes(f);
1688 self.7.list_hashes(f);
1689 self.8.list_hashes(f);
1690 self.9.list_hashes(f);
1691 self.10.list_hashes(f);
1692 }
1693}
1694
1695impl<
1696 A: Topological,
1697 B: Topological,
1698 C: Topological,
1699 D: Topological,
1700 E: Topological,
1701 F: Topological,
1702 G: Topological,
1703 H: Topological,
1704 I: Topological,
1705 J: Topological,
1706 K: Topological,
1707> Topological for (A, B, C, D, E, F, G, H, I, J, K)
1708{
1709 fn traverse(&self, visitor: &mut impl PointVisitor) {
1710 self.0.traverse(visitor);
1711 self.1.traverse(visitor);
1712 self.2.traverse(visitor);
1713 self.3.traverse(visitor);
1714 self.4.traverse(visitor);
1715 self.5.traverse(visitor);
1716 self.6.traverse(visitor);
1717 self.7.traverse(visitor);
1718 self.8.traverse(visitor);
1719 self.9.traverse(visitor);
1720 self.10.traverse(visitor);
1721 }
1722}
1723
1724impl<
1725 A: Tagged,
1726 B: Tagged,
1727 C: Tagged,
1728 D: Tagged,
1729 E: Tagged,
1730 F: Tagged,
1731 G: Tagged,
1732 H: Tagged,
1733 I: Tagged,
1734 J: Tagged,
1735 K: Tagged,
1736> Tagged for (A, B, C, D, E, F, G, H, I, J, K)
1737{
1738 const TAGS: Tags = Tags(
1739 &[],
1740 &[
1741 &A::TAGS,
1742 &B::TAGS,
1743 &C::TAGS,
1744 &D::TAGS,
1745 &E::TAGS,
1746 &F::TAGS,
1747 &G::TAGS,
1748 &H::TAGS,
1749 &I::TAGS,
1750 &J::TAGS,
1751 &K::TAGS,
1752 ],
1753 );
1754}
1755
1756impl<
1757 A: Size,
1758 B: Size,
1759 C: Size,
1760 D: Size,
1761 E: Size,
1762 F: Size,
1763 G: Size,
1764 H: Size,
1765 I: Size,
1766 J: Size,
1767 K: Size,
1768> Size for (A, B, C, D, E, F, G, H, I, J, K)
1769where
1770 tarr![
1771 A::Size,
1772 B::Size,
1773 C::Size,
1774 D::Size,
1775 E::Size,
1776 F::Size,
1777 G::Size,
1778 H::Size,
1779 I::Size,
1780 J::Size,
1781 K::Size,
1782 ]: typenum::FoldAdd<Output: Unsigned>,
1783{
1784 const SIZE: usize = A::SIZE
1785 + B::SIZE
1786 + C::SIZE
1787 + D::SIZE
1788 + E::SIZE
1789 + F::SIZE
1790 + G::SIZE
1791 + H::SIZE
1792 + I::SIZE
1793 + J::SIZE
1794 + K::SIZE;
1795
1796 type Size = <tarr![
1797 A::Size,
1798 B::Size,
1799 C::Size,
1800 D::Size,
1801 E::Size,
1802 F::Size,
1803 G::Size,
1804 H::Size,
1805 I::Size,
1806 J::Size,
1807 K::Size,
1808 ] as typenum::FoldAdd>::Output;
1809}
1810
1811impl<
1812 II: ParseInput,
1813 A: ParseInline<II>,
1814 B: ParseInline<II>,
1815 C: ParseInline<II>,
1816 D: ParseInline<II>,
1817 E: ParseInline<II>,
1818 F: ParseInline<II>,
1819 G: ParseInline<II>,
1820 H: ParseInline<II>,
1821 I: ParseInline<II>,
1822 J: ParseInline<II>,
1823 K: Parse<II>,
1824> Parse<II> for (A, B, C, D, E, F, G, H, I, J, K)
1825{
1826 fn parse(mut input: II) -> crate::Result<Self> {
1827 Ok((
1828 input.parse_inline()?,
1829 input.parse_inline()?,
1830 input.parse_inline()?,
1831 input.parse_inline()?,
1832 input.parse_inline()?,
1833 input.parse_inline()?,
1834 input.parse_inline()?,
1835 input.parse_inline()?,
1836 input.parse_inline()?,
1837 input.parse_inline()?,
1838 input.parse()?,
1839 ))
1840 }
1841}
1842
1843impl<
1844 II: ParseInput,
1845 A: ParseInline<II>,
1846 B: ParseInline<II>,
1847 C: ParseInline<II>,
1848 D: ParseInline<II>,
1849 E: ParseInline<II>,
1850 F: ParseInline<II>,
1851 G: ParseInline<II>,
1852 H: ParseInline<II>,
1853 I: ParseInline<II>,
1854 J: ParseInline<II>,
1855 K: ParseInline<II>,
1856> ParseInline<II> for (A, B, C, D, E, F, G, H, I, J, K)
1857{
1858 fn parse_inline(input: &mut II) -> crate::Result<Self> {
1859 Ok((
1860 input.parse_inline()?,
1861 input.parse_inline()?,
1862 input.parse_inline()?,
1863 input.parse_inline()?,
1864 input.parse_inline()?,
1865 input.parse_inline()?,
1866 input.parse_inline()?,
1867 input.parse_inline()?,
1868 input.parse_inline()?,
1869 input.parse_inline()?,
1870 input.parse_inline()?,
1871 ))
1872 }
1873}
1874
1875impl<
1876 A: MaybeHasNiche,
1877 B: MaybeHasNiche,
1878 C: MaybeHasNiche,
1879 D: MaybeHasNiche,
1880 E: MaybeHasNiche,
1881 F: MaybeHasNiche,
1882 G: MaybeHasNiche,
1883 H: MaybeHasNiche,
1884 I: MaybeHasNiche,
1885 J: MaybeHasNiche,
1886 K: MaybeHasNiche,
1887> MaybeHasNiche for (A, B, C, D, E, F, G, H, I, J, K)
1888{
1889 type MnArray = tarr![
1890 A::MnArray,
1891 B::MnArray,
1892 C::MnArray,
1893 D::MnArray,
1894 E::MnArray,
1895 F::MnArray,
1896 G::MnArray,
1897 H::MnArray,
1898 I::MnArray,
1899 J::MnArray,
1900 K::MnArray,
1901 ];
1902}
1903
1904impl<
1905 A: ByteOrd + InlineOutput,
1906 B: ByteOrd + InlineOutput,
1907 C: ByteOrd + InlineOutput,
1908 D: ByteOrd + InlineOutput,
1909 E: ByteOrd + InlineOutput,
1910 F: ByteOrd + InlineOutput,
1911 G: ByteOrd + InlineOutput,
1912 H: ByteOrd + InlineOutput,
1913 I: ByteOrd + InlineOutput,
1914 J: ByteOrd + InlineOutput,
1915 K: ByteOrd,
1916> ByteOrd for (A, B, C, D, E, F, G, H, I, J, K)
1917{
1918 fn bytes_cmp(&self, other: &Self) -> Ordering {
1919 (
1920 OrderedByBytes(&self.0),
1921 OrderedByBytes(&self.1),
1922 OrderedByBytes(&self.2),
1923 OrderedByBytes(&self.3),
1924 OrderedByBytes(&self.4),
1925 OrderedByBytes(&self.5),
1926 OrderedByBytes(&self.6),
1927 OrderedByBytes(&self.7),
1928 OrderedByBytes(&self.8),
1929 OrderedByBytes(&self.9),
1930 OrderedByBytes(&self.10),
1931 )
1932 .cmp(&(
1933 OrderedByBytes(&other.0),
1934 OrderedByBytes(&other.1),
1935 OrderedByBytes(&other.2),
1936 OrderedByBytes(&other.3),
1937 OrderedByBytes(&other.4),
1938 OrderedByBytes(&other.5),
1939 OrderedByBytes(&other.6),
1940 OrderedByBytes(&other.7),
1941 OrderedByBytes(&other.8),
1942 OrderedByBytes(&other.9),
1943 OrderedByBytes(&other.10),
1944 ))
1945 }
1946}
1947
1948impl<
1949 A: Monostate,
1950 B: Monostate,
1951 C: Monostate,
1952 D: Monostate,
1953 E: Monostate,
1954 F: Monostate,
1955 G: Monostate,
1956 H: Monostate,
1957 I: Monostate,
1958 J: Monostate,
1959 K: Monostate,
1960> Monostate for (A, B, C, D, E, F, G, H, I, J, K)
1961{
1962}
1963
1964impl<
1965 A: InlineOutput,
1966 B: InlineOutput,
1967 C: InlineOutput,
1968 D: InlineOutput,
1969 E: InlineOutput,
1970 F: InlineOutput,
1971 G: InlineOutput,
1972 H: InlineOutput,
1973 I: InlineOutput,
1974 J: InlineOutput,
1975 K: InlineOutput,
1976 L: ToOutput,
1977> ToOutput for (A, B, C, D, E, F, G, H, I, J, K, L)
1978{
1979 fn to_output(&self, output: &mut impl Output) {
1980 self.0.to_output(output);
1981 self.1.to_output(output);
1982 self.2.to_output(output);
1983 self.3.to_output(output);
1984 self.4.to_output(output);
1985 self.5.to_output(output);
1986 self.6.to_output(output);
1987 self.7.to_output(output);
1988 self.8.to_output(output);
1989 self.9.to_output(output);
1990 self.10.to_output(output);
1991 self.11.to_output(output);
1992 }
1993}
1994
1995impl<
1996 A: InlineOutput,
1997 B: InlineOutput,
1998 C: InlineOutput,
1999 D: InlineOutput,
2000 E: InlineOutput,
2001 F: InlineOutput,
2002 G: InlineOutput,
2003 H: InlineOutput,
2004 I: InlineOutput,
2005 J: InlineOutput,
2006 K: InlineOutput,
2007 L: InlineOutput,
2008> InlineOutput for (A, B, C, D, E, F, G, H, I, J, K, L)
2009{
2010}
2011
2012impl<
2013 A: ListHashes,
2014 B: ListHashes,
2015 C: ListHashes,
2016 D: ListHashes,
2017 E: ListHashes,
2018 F: ListHashes,
2019 G: ListHashes,
2020 H: ListHashes,
2021 I: ListHashes,
2022 J: ListHashes,
2023 K: ListHashes,
2024 L: ListHashes,
2025> ListHashes for (A, B, C, D, E, F, G, H, I, J, K, L)
2026{
2027 fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
2028 self.0.list_hashes(f);
2029 self.1.list_hashes(f);
2030 self.2.list_hashes(f);
2031 self.3.list_hashes(f);
2032 self.4.list_hashes(f);
2033 self.5.list_hashes(f);
2034 self.6.list_hashes(f);
2035 self.7.list_hashes(f);
2036 self.8.list_hashes(f);
2037 self.9.list_hashes(f);
2038 self.10.list_hashes(f);
2039 self.11.list_hashes(f);
2040 }
2041}
2042
2043impl<
2044 A: Topological,
2045 B: Topological,
2046 C: Topological,
2047 D: Topological,
2048 E: Topological,
2049 F: Topological,
2050 G: Topological,
2051 H: Topological,
2052 I: Topological,
2053 J: Topological,
2054 K: Topological,
2055 L: Topological,
2056> Topological for (A, B, C, D, E, F, G, H, I, J, K, L)
2057{
2058 fn traverse(&self, visitor: &mut impl PointVisitor) {
2059 self.0.traverse(visitor);
2060 self.1.traverse(visitor);
2061 self.2.traverse(visitor);
2062 self.3.traverse(visitor);
2063 self.4.traverse(visitor);
2064 self.5.traverse(visitor);
2065 self.6.traverse(visitor);
2066 self.7.traverse(visitor);
2067 self.8.traverse(visitor);
2068 self.9.traverse(visitor);
2069 self.10.traverse(visitor);
2070 self.11.traverse(visitor);
2071 }
2072}
2073
2074impl<
2075 A: Tagged,
2076 B: Tagged,
2077 C: Tagged,
2078 D: Tagged,
2079 E: Tagged,
2080 F: Tagged,
2081 G: Tagged,
2082 H: Tagged,
2083 I: Tagged,
2084 J: Tagged,
2085 K: Tagged,
2086 L: Tagged,
2087> Tagged for (A, B, C, D, E, F, G, H, I, J, K, L)
2088{
2089 const TAGS: Tags = Tags(
2090 &[],
2091 &[
2092 &A::TAGS,
2093 &B::TAGS,
2094 &C::TAGS,
2095 &D::TAGS,
2096 &E::TAGS,
2097 &F::TAGS,
2098 &G::TAGS,
2099 &H::TAGS,
2100 &I::TAGS,
2101 &J::TAGS,
2102 &K::TAGS,
2103 &L::TAGS,
2104 ],
2105 );
2106}
2107
2108impl<
2109 A: Size,
2110 B: Size,
2111 C: Size,
2112 D: Size,
2113 E: Size,
2114 F: Size,
2115 G: Size,
2116 H: Size,
2117 I: Size,
2118 J: Size,
2119 K: Size,
2120 L: Size,
2121> Size for (A, B, C, D, E, F, G, H, I, J, K, L)
2122where
2123 tarr![
2124 A::Size,
2125 B::Size,
2126 C::Size,
2127 D::Size,
2128 E::Size,
2129 F::Size,
2130 G::Size,
2131 H::Size,
2132 I::Size,
2133 J::Size,
2134 K::Size,
2135 L::Size,
2136 ]: typenum::FoldAdd<Output: Unsigned>,
2137{
2138 const SIZE: usize = A::SIZE
2139 + B::SIZE
2140 + C::SIZE
2141 + D::SIZE
2142 + E::SIZE
2143 + F::SIZE
2144 + G::SIZE
2145 + H::SIZE
2146 + I::SIZE
2147 + J::SIZE
2148 + K::SIZE
2149 + L::SIZE;
2150
2151 type Size = <tarr![
2152 A::Size,
2153 B::Size,
2154 C::Size,
2155 D::Size,
2156 E::Size,
2157 F::Size,
2158 G::Size,
2159 H::Size,
2160 I::Size,
2161 J::Size,
2162 K::Size,
2163 L::Size,
2164 ] as typenum::FoldAdd>::Output;
2165}
2166
2167impl<
2168 II: ParseInput,
2169 A: ParseInline<II>,
2170 B: ParseInline<II>,
2171 C: ParseInline<II>,
2172 D: ParseInline<II>,
2173 E: ParseInline<II>,
2174 F: ParseInline<II>,
2175 G: ParseInline<II>,
2176 H: ParseInline<II>,
2177 I: ParseInline<II>,
2178 J: ParseInline<II>,
2179 K: ParseInline<II>,
2180 L: Parse<II>,
2181> Parse<II> for (A, B, C, D, E, F, G, H, I, J, K, L)
2182{
2183 fn parse(mut input: II) -> crate::Result<Self> {
2184 Ok((
2185 input.parse_inline()?,
2186 input.parse_inline()?,
2187 input.parse_inline()?,
2188 input.parse_inline()?,
2189 input.parse_inline()?,
2190 input.parse_inline()?,
2191 input.parse_inline()?,
2192 input.parse_inline()?,
2193 input.parse_inline()?,
2194 input.parse_inline()?,
2195 input.parse_inline()?,
2196 input.parse()?,
2197 ))
2198 }
2199}
2200
2201impl<
2202 II: ParseInput,
2203 A: ParseInline<II>,
2204 B: ParseInline<II>,
2205 C: ParseInline<II>,
2206 D: ParseInline<II>,
2207 E: ParseInline<II>,
2208 F: ParseInline<II>,
2209 G: ParseInline<II>,
2210 H: ParseInline<II>,
2211 I: ParseInline<II>,
2212 J: ParseInline<II>,
2213 K: ParseInline<II>,
2214 L: ParseInline<II>,
2215> ParseInline<II> for (A, B, C, D, E, F, G, H, I, J, K, L)
2216{
2217 fn parse_inline(input: &mut II) -> crate::Result<Self> {
2218 Ok((
2219 input.parse_inline()?,
2220 input.parse_inline()?,
2221 input.parse_inline()?,
2222 input.parse_inline()?,
2223 input.parse_inline()?,
2224 input.parse_inline()?,
2225 input.parse_inline()?,
2226 input.parse_inline()?,
2227 input.parse_inline()?,
2228 input.parse_inline()?,
2229 input.parse_inline()?,
2230 input.parse_inline()?,
2231 ))
2232 }
2233}
2234
2235impl<
2236 A: MaybeHasNiche,
2237 B: MaybeHasNiche,
2238 C: MaybeHasNiche,
2239 D: MaybeHasNiche,
2240 E: MaybeHasNiche,
2241 F: MaybeHasNiche,
2242 G: MaybeHasNiche,
2243 H: MaybeHasNiche,
2244 I: MaybeHasNiche,
2245 J: MaybeHasNiche,
2246 K: MaybeHasNiche,
2247 L: MaybeHasNiche,
2248> MaybeHasNiche for (A, B, C, D, E, F, G, H, I, J, K, L)
2249{
2250 type MnArray = tarr![
2251 A::MnArray,
2252 B::MnArray,
2253 C::MnArray,
2254 D::MnArray,
2255 E::MnArray,
2256 F::MnArray,
2257 G::MnArray,
2258 H::MnArray,
2259 I::MnArray,
2260 J::MnArray,
2261 K::MnArray,
2262 L::MnArray,
2263 ];
2264}
2265
2266impl<
2267 A: ByteOrd + InlineOutput,
2268 B: ByteOrd + InlineOutput,
2269 C: ByteOrd + InlineOutput,
2270 D: ByteOrd + InlineOutput,
2271 E: ByteOrd + InlineOutput,
2272 F: ByteOrd + InlineOutput,
2273 G: ByteOrd + InlineOutput,
2274 H: ByteOrd + InlineOutput,
2275 I: ByteOrd + InlineOutput,
2276 J: ByteOrd + InlineOutput,
2277 K: ByteOrd + InlineOutput,
2278 L: ByteOrd,
2279> ByteOrd for (A, B, C, D, E, F, G, H, I, J, K, L)
2280{
2281 fn bytes_cmp(&self, other: &Self) -> Ordering {
2282 (
2283 OrderedByBytes(&self.0),
2284 OrderedByBytes(&self.1),
2285 OrderedByBytes(&self.2),
2286 OrderedByBytes(&self.3),
2287 OrderedByBytes(&self.4),
2288 OrderedByBytes(&self.5),
2289 OrderedByBytes(&self.6),
2290 OrderedByBytes(&self.7),
2291 OrderedByBytes(&self.8),
2292 OrderedByBytes(&self.9),
2293 OrderedByBytes(&self.10),
2294 OrderedByBytes(&self.11),
2295 )
2296 .cmp(&(
2297 OrderedByBytes(&other.0),
2298 OrderedByBytes(&other.1),
2299 OrderedByBytes(&other.2),
2300 OrderedByBytes(&other.3),
2301 OrderedByBytes(&other.4),
2302 OrderedByBytes(&other.5),
2303 OrderedByBytes(&other.6),
2304 OrderedByBytes(&other.7),
2305 OrderedByBytes(&other.8),
2306 OrderedByBytes(&other.9),
2307 OrderedByBytes(&other.10),
2308 OrderedByBytes(&other.11),
2309 ))
2310 }
2311}
2312
2313impl<
2314 A: Monostate,
2315 B: Monostate,
2316 C: Monostate,
2317 D: Monostate,
2318 E: Monostate,
2319 F: Monostate,
2320 G: Monostate,
2321 H: Monostate,
2322 I: Monostate,
2323 J: Monostate,
2324 K: Monostate,
2325 L: Monostate,
2326> Monostate for (A, B, C, D, E, F, G, H, I, J, K, L)
2327{
2328}