1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub type Boool = bool;
12
13pub type HollowStruct = AnotherEmptyStruct;
14
15pub type Hover64 = f64;
16
17pub type Id = u64;
18
19pub type Rope = String;
20
21pub const DEFAULT_EVENT_RIGHTS: Rights = Rights::from_bits_truncate(53251);
22
23pub const RIGHTS_BASIC: Rights = Rights::from_bits_truncate(49155);
24
25bitflags! {
26 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
27 pub struct BitsUint32: u32 {
28 const MEMBER_LOW_1 = 1;
29 const MEMBER_LOW_2 = 2;
30 const MEMBER_HIG_1 = 268435456;
31 const MEMBER_HIG_2 = 536870912;
32 }
33}
34
35impl BitsUint32 {}
36
37bitflags! {
38 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
39 pub struct BitsUint8: u8 {
40 const MEMBER = 8;
41 }
42}
43
44impl BitsUint8 {}
45
46bitflags! {
47 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
48 pub struct EmptyBits: u32 {
49 }
50}
51
52impl EmptyBits {
53 #[inline(always)]
54 pub fn from_bits_allow_unknown(bits: u32) -> Self {
55 Self::from_bits_retain(bits)
56 }
57
58 #[inline(always)]
59 pub fn has_unknown_bits(&self) -> bool {
60 self.get_unknown_bits() != 0
61 }
62
63 #[inline(always)]
64 pub fn get_unknown_bits(&self) -> u32 {
65 self.bits() & !Self::all().bits()
66 }
67}
68
69bitflags! {
70 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
71 pub struct FidlvizBits: u8 {
72 const A = 1;
73 const B = 2;
74 const C = 4;
75 }
76}
77
78impl FidlvizBits {}
79
80bitflags! {
81 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
82 pub struct FlexibleBitsUint16: u16 {
83 const A = 1;
84 const B = 2;
85 }
86}
87
88impl FlexibleBitsUint16 {
89 #[inline(always)]
90 pub fn from_bits_allow_unknown(bits: u16) -> Self {
91 Self::from_bits_retain(bits)
92 }
93
94 #[inline(always)]
95 pub fn has_unknown_bits(&self) -> bool {
96 self.get_unknown_bits() != 0
97 }
98
99 #[inline(always)]
100 pub fn get_unknown_bits(&self) -> u16 {
101 self.bits() & !Self::all().bits()
102 }
103}
104
105bitflags! {
106 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
107 pub struct FlexibleBitsUint32: u32 {
108 const A = 1;
109 const B = 2;
110 }
111}
112
113impl FlexibleBitsUint32 {
114 #[inline(always)]
115 pub fn from_bits_allow_unknown(bits: u32) -> Self {
116 Self::from_bits_retain(bits)
117 }
118
119 #[inline(always)]
120 pub fn has_unknown_bits(&self) -> bool {
121 self.get_unknown_bits() != 0
122 }
123
124 #[inline(always)]
125 pub fn get_unknown_bits(&self) -> u32 {
126 self.bits() & !Self::all().bits()
127 }
128}
129
130bitflags! {
131 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
132 pub struct FlexibleBitsUint64: u64 {
133 const A = 1;
134 const B = 2;
135 }
136}
137
138impl FlexibleBitsUint64 {
139 #[inline(always)]
140 pub fn from_bits_allow_unknown(bits: u64) -> Self {
141 Self::from_bits_retain(bits)
142 }
143
144 #[inline(always)]
145 pub fn has_unknown_bits(&self) -> bool {
146 self.get_unknown_bits() != 0
147 }
148
149 #[inline(always)]
150 pub fn get_unknown_bits(&self) -> u64 {
151 self.bits() & !Self::all().bits()
152 }
153}
154
155bitflags! {
156 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
157 pub struct FlexibleBitsUint8: u8 {
158 const A = 1;
159 const B = 2;
160 }
161}
162
163impl FlexibleBitsUint8 {
164 #[inline(always)]
165 pub fn from_bits_allow_unknown(bits: u8) -> Self {
166 Self::from_bits_retain(bits)
167 }
168
169 #[inline(always)]
170 pub fn has_unknown_bits(&self) -> bool {
171 self.get_unknown_bits() != 0
172 }
173
174 #[inline(always)]
175 pub fn get_unknown_bits(&self) -> u8 {
176 self.bits() & !Self::all().bits()
177 }
178}
179
180bitflags! {
181 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
182 pub struct GoldenBits: u16 {
183 const A = 1;
184 }
185}
186
187impl GoldenBits {}
188
189bitflags! {
190 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
191 pub struct StrictBitsUint16: u16 {
192 const A = 1;
193 const B = 2;
194 }
195}
196
197impl StrictBitsUint16 {}
198
199bitflags! {
200 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
201 pub struct StrictBitsUint32: u32 {
202 const A = 1;
203 const B = 2;
204 }
205}
206
207impl StrictBitsUint32 {}
208
209bitflags! {
210 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
211 pub struct StrictBitsUint64: u64 {
212 const A = 1;
213 const B = 2;
214 }
215}
216
217impl StrictBitsUint64 {}
218
219bitflags! {
220 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
221 pub struct StrictBitsUint8: u8 {
222 const A = 1;
223 const B = 2;
224 }
225}
226
227impl StrictBitsUint8 {}
228
229bitflags! {
230 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
231 pub struct Rights: u32 {
232 const DUPLICATE = 1;
233 const TRANSFER = 2;
234 const WAIT = 16384;
235 const INSPECT = 32768;
236 const SIGNAL = 4096;
237 }
238}
239
240impl Rights {}
241
242#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
243pub enum EmptyEnum {
244 #[doc(hidden)]
245 __SourceBreaking { unknown_ordinal: u32 },
246}
247
248#[macro_export]
250macro_rules! EmptyEnumUnknown {
251 () => {
252 _
253 };
254}
255
256impl EmptyEnum {
257 #[inline]
258 pub fn from_primitive(prim: u32) -> Option<Self> {
259 match prim {
260 _ => None,
261 }
262 }
263
264 #[inline]
265 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
266 match prim {
267 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
268 }
269 }
270
271 #[inline]
272 pub fn unknown() -> Self {
273 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
274 }
275
276 #[inline]
277 pub const fn into_primitive(self) -> u32 {
278 match self {
279 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
280 }
281 }
282
283 #[inline]
284 pub fn is_unknown(&self) -> bool {
285 match self {
286 Self::__SourceBreaking { unknown_ordinal: _ } => true,
287 }
288 }
289}
290
291#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
292#[repr(u32)]
293pub enum EnumUint32 {
294 Member = 842084399,
295}
296
297impl EnumUint32 {
298 #[inline]
299 pub fn from_primitive(prim: u32) -> Option<Self> {
300 match prim {
301 842084399 => Some(Self::Member),
302 _ => None,
303 }
304 }
305
306 #[inline]
307 pub const fn into_primitive(self) -> u32 {
308 self as u32
309 }
310}
311
312#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
313#[repr(u8)]
314pub enum EnumUint8 {
315 Member = 8,
316}
317
318impl EnumUint8 {
319 #[inline]
320 pub fn from_primitive(prim: u8) -> Option<Self> {
321 match prim {
322 8 => Some(Self::Member),
323 _ => None,
324 }
325 }
326
327 #[inline]
328 pub const fn into_primitive(self) -> u8 {
329 self as u8
330 }
331}
332
333#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
334#[repr(u8)]
335pub enum FidlvizEnum {
336 A = 42,
337}
338
339impl FidlvizEnum {
340 #[inline]
341 pub fn from_primitive(prim: u8) -> Option<Self> {
342 match prim {
343 42 => Some(Self::A),
344 _ => None,
345 }
346 }
347
348 #[inline]
349 pub const fn into_primitive(self) -> u8 {
350 self as u8
351 }
352}
353
354#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
355pub enum FlexibleEnumInt16 {
356 First,
357 Second,
358 #[doc(hidden)]
359 __SourceBreaking {
360 unknown_ordinal: i16,
361 },
362}
363
364#[macro_export]
366macro_rules! FlexibleEnumInt16Unknown {
367 () => {
368 _
369 };
370}
371
372impl FlexibleEnumInt16 {
373 #[inline]
374 pub fn from_primitive(prim: i16) -> Option<Self> {
375 match prim {
376 258 => Some(Self::First),
377 4370 => Some(Self::Second),
378 _ => None,
379 }
380 }
381
382 #[inline]
383 pub fn from_primitive_allow_unknown(prim: i16) -> Self {
384 match prim {
385 258 => Self::First,
386 4370 => Self::Second,
387 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
388 }
389 }
390
391 #[inline]
392 pub fn unknown() -> Self {
393 Self::__SourceBreaking { unknown_ordinal: 0x7fff }
394 }
395
396 #[inline]
397 pub const fn into_primitive(self) -> i16 {
398 match self {
399 Self::First => 258,
400 Self::Second => 4370,
401 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
402 }
403 }
404
405 #[inline]
406 pub fn is_unknown(&self) -> bool {
407 match self {
408 Self::__SourceBreaking { unknown_ordinal: _ } => true,
409 _ => false,
410 }
411 }
412}
413
414#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
415pub enum FlexibleEnumInt32 {
416 First,
417 Second,
418 #[doc(hidden)]
419 __SourceBreaking {
420 unknown_ordinal: i32,
421 },
422}
423
424#[macro_export]
426macro_rules! FlexibleEnumInt32Unknown {
427 () => {
428 _
429 };
430}
431
432impl FlexibleEnumInt32 {
433 #[inline]
434 pub fn from_primitive(prim: i32) -> Option<Self> {
435 match prim {
436 16909060 => Some(Self::First),
437 286397204 => Some(Self::Second),
438 _ => None,
439 }
440 }
441
442 #[inline]
443 pub fn from_primitive_allow_unknown(prim: i32) -> Self {
444 match prim {
445 16909060 => Self::First,
446 286397204 => Self::Second,
447 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
448 }
449 }
450
451 #[inline]
452 pub fn unknown() -> Self {
453 Self::__SourceBreaking { unknown_ordinal: 0x7fffffff }
454 }
455
456 #[inline]
457 pub const fn into_primitive(self) -> i32 {
458 match self {
459 Self::First => 16909060,
460 Self::Second => 286397204,
461 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
462 }
463 }
464
465 #[inline]
466 pub fn is_unknown(&self) -> bool {
467 match self {
468 Self::__SourceBreaking { unknown_ordinal: _ } => true,
469 _ => false,
470 }
471 }
472}
473
474#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
475pub enum FlexibleEnumInt64 {
476 First,
477 Second,
478 #[doc(hidden)]
479 __SourceBreaking {
480 unknown_ordinal: i64,
481 },
482}
483
484#[macro_export]
486macro_rules! FlexibleEnumInt64Unknown {
487 () => {
488 _
489 };
490}
491
492impl FlexibleEnumInt64 {
493 #[inline]
494 pub fn from_primitive(prim: i64) -> Option<Self> {
495 match prim {
496 72623859790382856 => Some(Self::First),
497 1230066625199609624 => Some(Self::Second),
498 _ => None,
499 }
500 }
501
502 #[inline]
503 pub fn from_primitive_allow_unknown(prim: i64) -> Self {
504 match prim {
505 72623859790382856 => Self::First,
506 1230066625199609624 => Self::Second,
507 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
508 }
509 }
510
511 #[inline]
512 pub fn unknown() -> Self {
513 Self::__SourceBreaking { unknown_ordinal: 0x7fffffffffffffff }
514 }
515
516 #[inline]
517 pub const fn into_primitive(self) -> i64 {
518 match self {
519 Self::First => 72623859790382856,
520 Self::Second => 1230066625199609624,
521 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
522 }
523 }
524
525 #[inline]
526 pub fn is_unknown(&self) -> bool {
527 match self {
528 Self::__SourceBreaking { unknown_ordinal: _ } => true,
529 _ => false,
530 }
531 }
532}
533
534#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
535pub enum FlexibleEnumInt8 {
536 First,
537 Second,
538 #[doc(hidden)]
539 __SourceBreaking {
540 unknown_ordinal: i8,
541 },
542}
543
544#[macro_export]
546macro_rules! FlexibleEnumInt8Unknown {
547 () => {
548 _
549 };
550}
551
552impl FlexibleEnumInt8 {
553 #[inline]
554 pub fn from_primitive(prim: i8) -> Option<Self> {
555 match prim {
556 1 => Some(Self::First),
557 17 => Some(Self::Second),
558 _ => None,
559 }
560 }
561
562 #[inline]
563 pub fn from_primitive_allow_unknown(prim: i8) -> Self {
564 match prim {
565 1 => Self::First,
566 17 => Self::Second,
567 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
568 }
569 }
570
571 #[inline]
572 pub fn unknown() -> Self {
573 Self::__SourceBreaking { unknown_ordinal: 0x7f }
574 }
575
576 #[inline]
577 pub const fn into_primitive(self) -> i8 {
578 match self {
579 Self::First => 1,
580 Self::Second => 17,
581 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
582 }
583 }
584
585 #[inline]
586 pub fn is_unknown(&self) -> bool {
587 match self {
588 Self::__SourceBreaking { unknown_ordinal: _ } => true,
589 _ => false,
590 }
591 }
592}
593
594#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
595pub enum FlexibleEnumUint16 {
596 First,
597 Second,
598 #[doc(hidden)]
599 __SourceBreaking {
600 unknown_ordinal: u16,
601 },
602}
603
604#[macro_export]
606macro_rules! FlexibleEnumUint16Unknown {
607 () => {
608 _
609 };
610}
611
612impl FlexibleEnumUint16 {
613 #[inline]
614 pub fn from_primitive(prim: u16) -> Option<Self> {
615 match prim {
616 258 => Some(Self::First),
617 4370 => Some(Self::Second),
618 _ => None,
619 }
620 }
621
622 #[inline]
623 pub fn from_primitive_allow_unknown(prim: u16) -> Self {
624 match prim {
625 258 => Self::First,
626 4370 => Self::Second,
627 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
628 }
629 }
630
631 #[inline]
632 pub fn unknown() -> Self {
633 Self::__SourceBreaking { unknown_ordinal: 0xffff }
634 }
635
636 #[inline]
637 pub const fn into_primitive(self) -> u16 {
638 match self {
639 Self::First => 258,
640 Self::Second => 4370,
641 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
642 }
643 }
644
645 #[inline]
646 pub fn is_unknown(&self) -> bool {
647 match self {
648 Self::__SourceBreaking { unknown_ordinal: _ } => true,
649 _ => false,
650 }
651 }
652}
653
654#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
655pub enum FlexibleEnumUint32 {
656 First,
657 Second,
658 #[doc(hidden)]
659 __SourceBreaking {
660 unknown_ordinal: u32,
661 },
662}
663
664#[macro_export]
666macro_rules! FlexibleEnumUint32Unknown {
667 () => {
668 _
669 };
670}
671
672impl FlexibleEnumUint32 {
673 #[inline]
674 pub fn from_primitive(prim: u32) -> Option<Self> {
675 match prim {
676 16909060 => Some(Self::First),
677 286397204 => Some(Self::Second),
678 _ => None,
679 }
680 }
681
682 #[inline]
683 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
684 match prim {
685 16909060 => Self::First,
686 286397204 => Self::Second,
687 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
688 }
689 }
690
691 #[inline]
692 pub fn unknown() -> Self {
693 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
694 }
695
696 #[inline]
697 pub const fn into_primitive(self) -> u32 {
698 match self {
699 Self::First => 16909060,
700 Self::Second => 286397204,
701 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
702 }
703 }
704
705 #[inline]
706 pub fn is_unknown(&self) -> bool {
707 match self {
708 Self::__SourceBreaking { unknown_ordinal: _ } => true,
709 _ => false,
710 }
711 }
712}
713
714#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
715pub enum FlexibleEnumUint64 {
716 First,
717 Second,
718 #[doc(hidden)]
719 __SourceBreaking {
720 unknown_ordinal: u64,
721 },
722}
723
724#[macro_export]
726macro_rules! FlexibleEnumUint64Unknown {
727 () => {
728 _
729 };
730}
731
732impl FlexibleEnumUint64 {
733 #[inline]
734 pub fn from_primitive(prim: u64) -> Option<Self> {
735 match prim {
736 72623859790382856 => Some(Self::First),
737 1230066625199609624 => Some(Self::Second),
738 _ => None,
739 }
740 }
741
742 #[inline]
743 pub fn from_primitive_allow_unknown(prim: u64) -> Self {
744 match prim {
745 72623859790382856 => Self::First,
746 1230066625199609624 => Self::Second,
747 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
748 }
749 }
750
751 #[inline]
752 pub fn unknown() -> Self {
753 Self::__SourceBreaking { unknown_ordinal: 0xffffffffffffffff }
754 }
755
756 #[inline]
757 pub const fn into_primitive(self) -> u64 {
758 match self {
759 Self::First => 72623859790382856,
760 Self::Second => 1230066625199609624,
761 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
762 }
763 }
764
765 #[inline]
766 pub fn is_unknown(&self) -> bool {
767 match self {
768 Self::__SourceBreaking { unknown_ordinal: _ } => true,
769 _ => false,
770 }
771 }
772}
773
774#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
775pub enum FlexibleEnumUint8 {
776 First,
777 Second,
778 #[doc(hidden)]
779 __SourceBreaking {
780 unknown_ordinal: u8,
781 },
782}
783
784#[macro_export]
786macro_rules! FlexibleEnumUint8Unknown {
787 () => {
788 _
789 };
790}
791
792impl FlexibleEnumUint8 {
793 #[inline]
794 pub fn from_primitive(prim: u8) -> Option<Self> {
795 match prim {
796 1 => Some(Self::First),
797 2 => Some(Self::Second),
798 _ => None,
799 }
800 }
801
802 #[inline]
803 pub fn from_primitive_allow_unknown(prim: u8) -> Self {
804 match prim {
805 1 => Self::First,
806 2 => Self::Second,
807 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
808 }
809 }
810
811 #[inline]
812 pub fn unknown() -> Self {
813 Self::__SourceBreaking { unknown_ordinal: 0xff }
814 }
815
816 #[inline]
817 pub const fn into_primitive(self) -> u8 {
818 match self {
819 Self::First => 1,
820 Self::Second => 2,
821 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
822 }
823 }
824
825 #[inline]
826 pub fn is_unknown(&self) -> bool {
827 match self {
828 Self::__SourceBreaking { unknown_ordinal: _ } => true,
829 _ => false,
830 }
831 }
832}
833
834#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
835#[repr(u16)]
836pub enum GoldenEnum {
837 A = 1,
838}
839
840impl GoldenEnum {
841 #[inline]
842 pub fn from_primitive(prim: u16) -> Option<Self> {
843 match prim {
844 1 => Some(Self::A),
845 _ => None,
846 }
847 }
848
849 #[inline]
850 pub const fn into_primitive(self) -> u16 {
851 self as u16
852 }
853}
854
855#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
856pub enum SignedEnum {
857 Default,
858 #[doc(hidden)]
859 __SourceBreaking {
860 unknown_ordinal: i32,
861 },
862}
863
864#[macro_export]
866macro_rules! SignedEnumUnknown {
867 () => {
868 _
869 };
870}
871
872impl SignedEnum {
873 #[inline]
874 pub fn from_primitive(prim: i32) -> Option<Self> {
875 match prim {
876 1 => Some(Self::Default),
877 _ => None,
878 }
879 }
880
881 #[inline]
882 pub fn from_primitive_allow_unknown(prim: i32) -> Self {
883 match prim {
884 1 => Self::Default,
885 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
886 }
887 }
888
889 #[inline]
890 pub fn unknown() -> Self {
891 Self::__SourceBreaking { unknown_ordinal: 0x7fffffff }
892 }
893
894 #[inline]
895 pub const fn into_primitive(self) -> i32 {
896 match self {
897 Self::Default => 1,
898 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
899 }
900 }
901
902 #[inline]
903 pub fn is_unknown(&self) -> bool {
904 match self {
905 Self::__SourceBreaking { unknown_ordinal: _ } => true,
906 _ => false,
907 }
908 }
909}
910
911#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
912#[repr(i16)]
913pub enum StrictEnumInt16 {
914 First = 258,
915 Second = 4370,
916}
917
918impl StrictEnumInt16 {
919 #[inline]
920 pub fn from_primitive(prim: i16) -> Option<Self> {
921 match prim {
922 258 => Some(Self::First),
923 4370 => Some(Self::Second),
924 _ => None,
925 }
926 }
927
928 #[inline]
929 pub const fn into_primitive(self) -> i16 {
930 self as i16
931 }
932}
933
934#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
935#[repr(i32)]
936pub enum StrictEnumInt32 {
937 First = 16909060,
938 Second = 286397204,
939}
940
941impl StrictEnumInt32 {
942 #[inline]
943 pub fn from_primitive(prim: i32) -> Option<Self> {
944 match prim {
945 16909060 => Some(Self::First),
946 286397204 => Some(Self::Second),
947 _ => None,
948 }
949 }
950
951 #[inline]
952 pub const fn into_primitive(self) -> i32 {
953 self as i32
954 }
955}
956
957#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
958#[repr(i64)]
959pub enum StrictEnumInt64 {
960 First = 72623859790382856,
961 Second = 1230066625199609624,
962}
963
964impl StrictEnumInt64 {
965 #[inline]
966 pub fn from_primitive(prim: i64) -> Option<Self> {
967 match prim {
968 72623859790382856 => Some(Self::First),
969 1230066625199609624 => Some(Self::Second),
970 _ => None,
971 }
972 }
973
974 #[inline]
975 pub const fn into_primitive(self) -> i64 {
976 self as i64
977 }
978}
979
980#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
981#[repr(i8)]
982pub enum StrictEnumInt8 {
983 First = 1,
984 Second = 17,
985}
986
987impl StrictEnumInt8 {
988 #[inline]
989 pub fn from_primitive(prim: i8) -> Option<Self> {
990 match prim {
991 1 => Some(Self::First),
992 17 => Some(Self::Second),
993 _ => None,
994 }
995 }
996
997 #[inline]
998 pub const fn into_primitive(self) -> i8 {
999 self as i8
1000 }
1001}
1002
1003#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1004#[repr(u16)]
1005pub enum StrictEnumUint16 {
1006 First = 258,
1007 Second = 4370,
1008}
1009
1010impl StrictEnumUint16 {
1011 #[inline]
1012 pub fn from_primitive(prim: u16) -> Option<Self> {
1013 match prim {
1014 258 => Some(Self::First),
1015 4370 => Some(Self::Second),
1016 _ => None,
1017 }
1018 }
1019
1020 #[inline]
1021 pub const fn into_primitive(self) -> u16 {
1022 self as u16
1023 }
1024}
1025
1026#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1027#[repr(u32)]
1028pub enum StrictEnumUint32 {
1029 First = 16909060,
1030 Second = 286397204,
1031}
1032
1033impl StrictEnumUint32 {
1034 #[inline]
1035 pub fn from_primitive(prim: u32) -> Option<Self> {
1036 match prim {
1037 16909060 => Some(Self::First),
1038 286397204 => Some(Self::Second),
1039 _ => None,
1040 }
1041 }
1042
1043 #[inline]
1044 pub const fn into_primitive(self) -> u32 {
1045 self as u32
1046 }
1047}
1048
1049#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1050#[repr(u64)]
1051pub enum StrictEnumUint64 {
1052 First = 72623859790382856,
1053 Second = 1230066625199609624,
1054}
1055
1056impl StrictEnumUint64 {
1057 #[inline]
1058 pub fn from_primitive(prim: u64) -> Option<Self> {
1059 match prim {
1060 72623859790382856 => Some(Self::First),
1061 1230066625199609624 => Some(Self::Second),
1062 _ => None,
1063 }
1064 }
1065
1066 #[inline]
1067 pub const fn into_primitive(self) -> u64 {
1068 self as u64
1069 }
1070}
1071
1072#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1073#[repr(u8)]
1074pub enum StrictEnumUint8 {
1075 First = 1,
1076 Second = 2,
1077}
1078
1079impl StrictEnumUint8 {
1080 #[inline]
1081 pub fn from_primitive(prim: u8) -> Option<Self> {
1082 match prim {
1083 1 => Some(Self::First),
1084 2 => Some(Self::Second),
1085 _ => None,
1086 }
1087 }
1088
1089 #[inline]
1090 pub const fn into_primitive(self) -> u8 {
1091 self as u8
1092 }
1093}
1094
1095#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1096pub enum UnsignedEnum {
1097 Default,
1098 #[doc(hidden)]
1099 __SourceBreaking {
1100 unknown_ordinal: u16,
1101 },
1102}
1103
1104#[macro_export]
1106macro_rules! UnsignedEnumUnknown {
1107 () => {
1108 _
1109 };
1110}
1111
1112impl UnsignedEnum {
1113 #[inline]
1114 pub fn from_primitive(prim: u16) -> Option<Self> {
1115 match prim {
1116 1 => Some(Self::Default),
1117 _ => None,
1118 }
1119 }
1120
1121 #[inline]
1122 pub fn from_primitive_allow_unknown(prim: u16) -> Self {
1123 match prim {
1124 1 => Self::Default,
1125 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1126 }
1127 }
1128
1129 #[inline]
1130 pub fn unknown() -> Self {
1131 Self::__SourceBreaking { unknown_ordinal: 0xffff }
1132 }
1133
1134 #[inline]
1135 pub const fn into_primitive(self) -> u16 {
1136 match self {
1137 Self::Default => 1,
1138 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1139 }
1140 }
1141
1142 #[inline]
1143 pub fn is_unknown(&self) -> bool {
1144 match self {
1145 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1146 _ => false,
1147 }
1148 }
1149}
1150
1151#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1152#[repr(u32)]
1153pub enum ObjType {
1154 None = 0,
1155 Channel = 4,
1156 Event = 5,
1157}
1158
1159impl ObjType {
1160 #[inline]
1161 pub fn from_primitive(prim: u32) -> Option<Self> {
1162 match prim {
1163 0 => Some(Self::None),
1164 4 => Some(Self::Channel),
1165 5 => Some(Self::Event),
1166 _ => None,
1167 }
1168 }
1169
1170 #[inline]
1171 pub const fn into_primitive(self) -> u32 {
1172 self as u32
1173 }
1174}
1175
1176#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1177pub struct AliasedBool {
1178 pub value: bool,
1179}
1180
1181impl fidl::Persistable for AliasedBool {}
1182
1183#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1184pub struct AliasedFloat64 {
1185 pub value: f64,
1186}
1187
1188impl fidl::Persistable for AliasedFloat64 {}
1189
1190#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1191pub struct AliasedString {
1192 pub value: String,
1193}
1194
1195impl fidl::Persistable for AliasedString {}
1196
1197#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1198pub struct AliasedStruct {
1199 pub value: AnotherEmptyStruct,
1200}
1201
1202impl fidl::Persistable for AliasedStruct {}
1203
1204#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1205#[repr(C)]
1206pub struct AliasedUint64 {
1207 pub value: u64,
1208}
1209
1210impl fidl::Persistable for AliasedUint64 {}
1211
1212#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1213pub struct AnEmptyStructInStruct {
1214 pub v: EmptyStruct,
1215}
1216
1217impl fidl::Persistable for AnEmptyStructInStruct {}
1218
1219#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1220pub struct AnotherEmptyStruct;
1221
1222impl fidl::Persistable for AnotherEmptyStruct {}
1223
1224#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1225pub struct ArrayStruct {
1226 pub unions: [StringUnion; 3],
1227 pub optional_unions: [Option<Box<StringUnion>>; 3],
1228}
1229
1230impl fidl::Persistable for ArrayStruct {}
1231
1232#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1233#[repr(C)]
1234pub struct ArrayWithInternalPadding {
1235 pub v: [OneLayerStructWithPaddingAlign4; 2],
1236}
1237
1238impl fidl::Persistable for ArrayWithInternalPadding {}
1239
1240#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1241pub struct Bounded32NonnullableString {
1242 pub s0: String,
1243}
1244
1245impl fidl::Persistable for Bounded32NonnullableString {}
1246
1247#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1248pub struct Bounded32NonnullableVectorOfUint32s {
1249 pub vu0: Vec<u32>,
1250}
1251
1252impl fidl::Persistable for Bounded32NonnullableVectorOfUint32s {}
1253
1254#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1255pub struct Bounded32NullableString {
1256 pub s0: Option<String>,
1257}
1258
1259impl fidl::Persistable for Bounded32NullableString {}
1260
1261#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1262pub struct Bounded32NullableVectorOfUint32s {
1263 pub vu0: Option<Vec<u32>>,
1264}
1265
1266impl fidl::Persistable for Bounded32NullableVectorOfUint32s {}
1267
1268#[derive(Clone, Debug, PartialEq)]
1269pub struct CompatTable {
1270 pub value: CompatTableValue,
1271 pub empty: String,
1272}
1273
1274impl fidl::Persistable for CompatTable {}
1275
1276#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1277pub struct EmptyBitsStruct {
1278 pub b: EmptyBits,
1279}
1280
1281impl fidl::Persistable for EmptyBitsStruct {}
1282
1283#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1284pub struct EmptyEnumStruct {
1285 pub e: EmptyEnum,
1286}
1287
1288impl fidl::Persistable for EmptyEnumStruct {}
1289
1290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1291pub struct EmptyStruct;
1292
1293impl fidl::Persistable for EmptyStruct {}
1294
1295#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1296pub struct EmptyStructSandwich {
1297 pub before: String,
1298 pub es: EmptyStruct,
1299 pub after: String,
1300}
1301
1302impl fidl::Persistable for EmptyStructSandwich {}
1303
1304#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1305pub struct EmptyStructUnionStruct {
1306 pub u: EmptyStructUnion,
1307}
1308
1309impl fidl::Persistable for EmptyStructUnionStruct {}
1310
1311#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1312pub struct EmptyStructsInArrayInStruct {
1313 pub v: [EmptyStruct; 4],
1314}
1315
1316impl fidl::Persistable for EmptyStructsInArrayInStruct {}
1317
1318#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1319pub struct EmptyStructsInVectorInStruct {
1320 pub v: Vec<EmptyStruct>,
1321}
1322
1323impl fidl::Persistable for EmptyStructsInVectorInStruct {}
1324
1325#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1326pub struct FidlvizStruct1;
1327
1328impl fidl::Persistable for FidlvizStruct1 {}
1329
1330#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1331#[repr(C)]
1332pub struct FidlvizStruct2 {
1333 pub x: u64,
1334}
1335
1336impl fidl::Persistable for FidlvizStruct2 {}
1337
1338#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1339#[repr(C)]
1340pub struct FileGetAttrResponse {
1341 pub s: i32,
1342 pub attributes: NodeAttributes,
1343}
1344
1345impl fidl::Persistable for FileGetAttrResponse {}
1346
1347#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1348#[repr(C)]
1349pub struct FiveByte {
1350 pub elem1: u32,
1351 pub elem2: u8,
1352}
1353
1354impl fidl::Persistable for FiveByte {}
1355
1356#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1357#[repr(C)]
1358pub struct FiveByteInArray {
1359 pub elems: [FiveByte; 3],
1360}
1361
1362impl fidl::Persistable for FiveByteInArray {}
1363
1364#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1365#[repr(C)]
1366pub struct FiveByteInStruct {
1367 pub elem1: FiveByte,
1368 pub elem2: FiveByte,
1369 pub elem3: FiveByte,
1370}
1371
1372impl fidl::Persistable for FiveByteInStruct {}
1373
1374#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1375pub struct FiveByteInVector {
1376 pub elems: Vec<FiveByte>,
1377}
1378
1379impl fidl::Persistable for FiveByteInVector {}
1380
1381#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1382pub struct FlexibleBitsUint16Struct {
1383 pub b: FlexibleBitsUint16,
1384}
1385
1386impl fidl::Persistable for FlexibleBitsUint16Struct {}
1387
1388#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1389pub struct FlexibleBitsUint32Struct {
1390 pub b: FlexibleBitsUint32,
1391}
1392
1393impl fidl::Persistable for FlexibleBitsUint32Struct {}
1394
1395#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1396pub struct FlexibleBitsUint64Struct {
1397 pub b: FlexibleBitsUint64,
1398}
1399
1400impl fidl::Persistable for FlexibleBitsUint64Struct {}
1401
1402#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1403pub struct FlexibleBitsUint8Struct {
1404 pub b: FlexibleBitsUint8,
1405}
1406
1407impl fidl::Persistable for FlexibleBitsUint8Struct {}
1408
1409#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1410pub struct FlexibleEnumInt16Struct {
1411 pub e: FlexibleEnumInt16,
1412}
1413
1414impl fidl::Persistable for FlexibleEnumInt16Struct {}
1415
1416#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1417pub struct FlexibleEnumInt32Struct {
1418 pub e: FlexibleEnumInt32,
1419}
1420
1421impl fidl::Persistable for FlexibleEnumInt32Struct {}
1422
1423#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1424pub struct FlexibleEnumInt64Struct {
1425 pub e: FlexibleEnumInt64,
1426}
1427
1428impl fidl::Persistable for FlexibleEnumInt64Struct {}
1429
1430#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1431pub struct FlexibleEnumInt8Struct {
1432 pub e: FlexibleEnumInt8,
1433}
1434
1435impl fidl::Persistable for FlexibleEnumInt8Struct {}
1436
1437#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1438pub struct FlexibleEnumUint16Struct {
1439 pub e: FlexibleEnumUint16,
1440}
1441
1442impl fidl::Persistable for FlexibleEnumUint16Struct {}
1443
1444#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1445pub struct FlexibleEnumUint32Struct {
1446 pub e: FlexibleEnumUint32,
1447}
1448
1449impl fidl::Persistable for FlexibleEnumUint32Struct {}
1450
1451#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1452pub struct FlexibleEnumUint64Struct {
1453 pub e: FlexibleEnumUint64,
1454}
1455
1456impl fidl::Persistable for FlexibleEnumUint64Struct {}
1457
1458#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1459pub struct FlexibleEnumUint8Struct {
1460 pub e: FlexibleEnumUint8,
1461}
1462
1463impl fidl::Persistable for FlexibleEnumUint8Struct {}
1464
1465#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1466pub struct GoldenBitsStruct {
1467 pub v: GoldenBits,
1468}
1469
1470impl fidl::Persistable for GoldenBitsStruct {}
1471
1472#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1473pub struct GoldenBoolStruct {
1474 pub v: bool,
1475}
1476
1477impl fidl::Persistable for GoldenBoolStruct {}
1478
1479#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1480#[repr(C)]
1481pub struct GoldenByteArrayStruct {
1482 pub v: [u8; 4],
1483}
1484
1485impl fidl::Persistable for GoldenByteArrayStruct {}
1486
1487#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1488pub struct GoldenByteVectorStruct {
1489 pub v: Vec<u8>,
1490}
1491
1492impl fidl::Persistable for GoldenByteVectorStruct {}
1493
1494#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1495pub struct GoldenDoubleStruct {
1496 pub v: f64,
1497}
1498
1499impl fidl::Persistable for GoldenDoubleStruct {}
1500
1501#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1502pub struct GoldenEnumStruct {
1503 pub v: GoldenEnum,
1504}
1505
1506impl fidl::Persistable for GoldenEnumStruct {}
1507
1508#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1509pub struct GoldenFloatStruct {
1510 pub v: f32,
1511}
1512
1513impl fidl::Persistable for GoldenFloatStruct {}
1514
1515#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1516#[repr(C)]
1517pub struct GoldenIntStruct {
1518 pub v: i16,
1519}
1520
1521impl fidl::Persistable for GoldenIntStruct {}
1522
1523#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1524pub struct GoldenNullableByteVectorStruct {
1525 pub v: Option<Vec<u8>>,
1526}
1527
1528impl fidl::Persistable for GoldenNullableByteVectorStruct {}
1529
1530#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1531pub struct GoldenNullableStringStruct {
1532 pub v: Option<String>,
1533}
1534
1535impl fidl::Persistable for GoldenNullableStringStruct {}
1536
1537#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1538pub struct GoldenNullableStruct {
1539 pub v: Option<Box<GoldenBoolStruct>>,
1540}
1541
1542impl fidl::Persistable for GoldenNullableStruct {}
1543
1544#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1545pub struct GoldenNullableUnionStruct {
1546 pub v: Option<Box<GoldenUnion>>,
1547}
1548
1549impl fidl::Persistable for GoldenNullableUnionStruct {}
1550
1551#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1552pub struct GoldenStringStruct {
1553 pub v: String,
1554}
1555
1556impl fidl::Persistable for GoldenStringStruct {}
1557
1558#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1559pub struct GoldenStringWithMaxSize2 {
1560 pub s: String,
1561}
1562
1563impl fidl::Persistable for GoldenStringWithMaxSize2 {}
1564
1565#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1566#[repr(C)]
1567pub struct GoldenStructArrayStruct {
1568 pub v: [GoldenIntStruct; 2],
1569}
1570
1571impl fidl::Persistable for GoldenStructArrayStruct {}
1572
1573#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1574pub struct GoldenStructVectorStruct {
1575 pub v: Vec<GoldenIntStruct>,
1576}
1577
1578impl fidl::Persistable for GoldenStructVectorStruct {}
1579
1580#[derive(Clone, Debug, PartialEq)]
1581pub struct GoldenTableStruct {
1582 pub v: GoldenTable,
1583}
1584
1585impl fidl::Persistable for GoldenTableStruct {}
1586
1587#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1588#[repr(C)]
1589pub struct GoldenUintStruct {
1590 pub v: u16,
1591}
1592
1593impl fidl::Persistable for GoldenUintStruct {}
1594
1595#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1596pub struct GoldenUnionStruct {
1597 pub v: GoldenUnion,
1598}
1599
1600impl fidl::Persistable for GoldenUnionStruct {}
1601
1602#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1603#[repr(C)]
1604pub struct Int64Struct {
1605 pub x: i64,
1606}
1607
1608impl fidl::Persistable for Int64Struct {}
1609
1610#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1611pub struct InterfaceConfig {
1612 pub name: String,
1613 pub ip_address_config: IpAddressConfig,
1614}
1615
1616impl fidl::Persistable for InterfaceConfig {}
1617
1618#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1619pub struct LargeArrays {
1620 pub a33: [Option<String>; 33],
1621 pub a100: [u8; 100],
1622 pub nested: Vec<[[String; 100]; 200]>,
1623}
1624
1625impl fidl::Persistable for LargeArrays {}
1626
1627#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1628pub struct Length2StringWrapper {
1629 pub length_2_string: String,
1630}
1631
1632impl fidl::Persistable for Length2StringWrapper {}
1633
1634#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1635pub struct LotsOfVectors {
1636 pub v1: Vec<u16>,
1637 pub v2: Vec<u32>,
1638 pub v3: Vec<u64>,
1639 pub v4: Vec<String>,
1640 pub v5: Vec<i8>,
1641 pub v6: Vec<i16>,
1642 pub v7: Vec<i32>,
1643 pub v8: Vec<i64>,
1644 pub v9: Vec<bool>,
1645}
1646
1647impl fidl::Persistable for LotsOfVectors {}
1648
1649#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1650pub struct MixedFieldsBody {
1651 pub before: u32,
1652 pub first_union: UnionSize8Align4,
1653 pub middle_start: u16,
1654 pub middle_end: u64,
1655 pub second_union: UnionSize8Align4,
1656 pub after: u32,
1657}
1658
1659impl fidl::Persistable for MixedFieldsBody {}
1660
1661#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1662pub struct MixedFieldsMessage {
1663 pub header: TransactionHeader,
1664 pub body: MixedFieldsBody,
1665}
1666
1667impl fidl::Persistable for MixedFieldsMessage {}
1668
1669#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1670pub struct MultipleBoundedNonnullableVectorsOfUint32s {
1671 pub vu0: Vec<u32>,
1672 pub vu1: Vec<u32>,
1673}
1674
1675impl fidl::Persistable for MultipleBoundedNonnullableVectorsOfUint32s {}
1676
1677#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1678pub struct MultipleBoundedNullableVectorsOfUint32s {
1679 pub vu0: Option<Vec<u32>>,
1680 pub vu1: Option<Vec<u32>>,
1681}
1682
1683impl fidl::Persistable for MultipleBoundedNullableVectorsOfUint32s {}
1684
1685#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1686pub struct MultipleNonnullableStrings {
1687 pub s0: String,
1688 pub s1: String,
1689}
1690
1691impl fidl::Persistable for MultipleNonnullableStrings {}
1692
1693#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1694pub struct MultipleNonnullableVectorsOfUint32s {
1695 pub vu0: Vec<u32>,
1696 pub vu1: Vec<u32>,
1697}
1698
1699impl fidl::Persistable for MultipleNonnullableVectorsOfUint32s {}
1700
1701#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1702pub struct MultipleNullableStrings {
1703 pub s0: Option<String>,
1704 pub s1: Option<String>,
1705}
1706
1707impl fidl::Persistable for MultipleNullableStrings {}
1708
1709#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1710pub struct MultipleShortNonnullableStrings {
1711 pub s0: String,
1712 pub s1: String,
1713}
1714
1715impl fidl::Persistable for MultipleShortNonnullableStrings {}
1716
1717#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1718pub struct MultipleShortNullableStrings {
1719 pub s0: String,
1720 pub s1: String,
1721}
1722
1723impl fidl::Persistable for MultipleShortNullableStrings {}
1724
1725#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1726pub struct MutualRecursionUnionStruct {
1727 pub u: Option<Box<MutualRecursionUnion>>,
1728}
1729
1730impl fidl::Persistable for MutualRecursionUnionStruct {}
1731
1732#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1733pub struct MyBool {
1734 pub value: bool,
1735}
1736
1737impl fidl::Persistable for MyBool {}
1738
1739#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1740#[repr(C)]
1741pub struct MyByte {
1742 pub value: u8,
1743}
1744
1745impl fidl::Persistable for MyByte {}
1746
1747#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1748pub struct MyFloat32 {
1749 pub value: f32,
1750}
1751
1752impl fidl::Persistable for MyFloat32 {}
1753
1754#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1755pub struct MyFloat64 {
1756 pub value: f64,
1757}
1758
1759impl fidl::Persistable for MyFloat64 {}
1760
1761#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1762#[repr(C)]
1763pub struct MyInt16 {
1764 pub value: i16,
1765}
1766
1767impl fidl::Persistable for MyInt16 {}
1768
1769#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1770#[repr(C)]
1771pub struct MyInt32 {
1772 pub value: i32,
1773}
1774
1775impl fidl::Persistable for MyInt32 {}
1776
1777#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1778#[repr(C)]
1779pub struct MyInt64 {
1780 pub value: i64,
1781}
1782
1783impl fidl::Persistable for MyInt64 {}
1784
1785#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1786#[repr(C)]
1787pub struct MyInt8 {
1788 pub value: i8,
1789}
1790
1791impl fidl::Persistable for MyInt8 {}
1792
1793#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1794#[repr(C)]
1795pub struct MyUint16 {
1796 pub value: u16,
1797}
1798
1799impl fidl::Persistable for MyUint16 {}
1800
1801#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1802#[repr(C)]
1803pub struct MyUint32 {
1804 pub value: u32,
1805}
1806
1807impl fidl::Persistable for MyUint32 {}
1808
1809#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1810#[repr(C)]
1811pub struct MyUint64 {
1812 pub value: u64,
1813}
1814
1815impl fidl::Persistable for MyUint64 {}
1816
1817#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1818#[repr(C)]
1819pub struct MyUint8 {
1820 pub value: u8,
1821}
1822
1823impl fidl::Persistable for MyUint8 {}
1824
1825#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1826pub struct NoCodingTablesStressor {
1827 pub f1: u64,
1828 pub f2: u64,
1829 pub u1: UnionSize36Align4,
1830 pub f3: u64,
1831 pub f4: u64,
1832 pub u2: UnionSize36Align4,
1833 pub f5: u64,
1834 pub f6: u64,
1835 pub u3: UnionSize36Align4,
1836 pub f7: u64,
1837 pub p1: Option<Box<Size8Align8>>,
1838 pub f8: u64,
1839 pub p2: Option<Box<Size8Align8>>,
1840 pub f9: u64,
1841}
1842
1843impl fidl::Persistable for NoCodingTablesStressor {}
1844
1845#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1846#[repr(C)]
1847pub struct NodeAttributes {
1848 pub mode: u32,
1849 pub id: u64,
1850 pub content_size: u64,
1851 pub storage_size: u64,
1852 pub link_count: u64,
1853 pub creation_time: u64,
1854 pub modification_time: u64,
1855}
1856
1857impl fidl::Persistable for NodeAttributes {}
1858
1859#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1860#[repr(C)]
1861pub struct OneLayerStructNoPaddingAlign4 {
1862 pub a: u16,
1863 pub b: u8,
1864 pub c: u8,
1865 pub d: u32,
1866}
1867
1868impl fidl::Persistable for OneLayerStructNoPaddingAlign4 {}
1869
1870#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1871#[repr(C)]
1872pub struct OneLayerStructNoPaddingAlign8 {
1873 pub a: u32,
1874 pub b: u16,
1875 pub c: u16,
1876 pub d: u64,
1877}
1878
1879impl fidl::Persistable for OneLayerStructNoPaddingAlign8 {}
1880
1881#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1882pub struct OneLayerStructWithBool {
1883 pub a: bool,
1884 pub b: u8,
1885 pub c: u16,
1886 pub d: u32,
1887}
1888
1889impl fidl::Persistable for OneLayerStructWithBool {}
1890
1891#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1892#[repr(C)]
1893pub struct OneLayerStructWithPaddingAlign4 {
1894 pub a: u16,
1895 pub b: u8,
1896 pub c: u32,
1897}
1898
1899impl fidl::Persistable for OneLayerStructWithPaddingAlign4 {}
1900
1901#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1902#[repr(C)]
1903pub struct OneLayerStructWithPaddingAlign8 {
1904 pub a: u32,
1905 pub b: u16,
1906 pub c: u64,
1907}
1908
1909impl fidl::Persistable for OneLayerStructWithPaddingAlign8 {}
1910
1911#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1912pub struct OptionalEmptyStructWrapper {
1913 pub s: Option<Box<EmptyStruct>>,
1914}
1915
1916impl fidl::Persistable for OptionalEmptyStructWrapper {}
1917
1918#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1919pub struct OptionalStringWrapper {
1920 pub str: Option<String>,
1921}
1922
1923impl fidl::Persistable for OptionalStringWrapper {}
1924
1925#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1926pub struct OptionalVectorWrapper {
1927 pub v: Option<Vec<u8>>,
1928}
1929
1930impl fidl::Persistable for OptionalVectorWrapper {}
1931
1932#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1933pub struct OutOfLinePaddingZeroed4 {
1934 pub a: Option<Box<Uint32Struct>>,
1935 pub b: Option<Box<Uint64Struct>>,
1936}
1937
1938impl fidl::Persistable for OutOfLinePaddingZeroed4 {}
1939
1940#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1941pub struct OutOfLinePaddingZeroed6 {
1942 pub a: Option<Box<Uint16Struct>>,
1943 pub b: Option<Box<Uint64Struct>>,
1944}
1945
1946impl fidl::Persistable for OutOfLinePaddingZeroed6 {}
1947
1948#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1949pub struct OutOfLinePaddingZeroed7 {
1950 pub a: Option<Box<Uint8Struct>>,
1951 pub b: Option<Box<Uint64Struct>>,
1952}
1953
1954impl fidl::Persistable for OutOfLinePaddingZeroed7 {}
1955
1956#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1957pub struct OutOfLineSandwich1 {
1958 pub before: String,
1959 pub v: Vec<Sandwich1>,
1960 pub after: String,
1961}
1962
1963impl fidl::Persistable for OutOfLineSandwich1 {}
1964
1965#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1966pub struct OutOfLineSandwich1WithOptUnion {
1967 pub before: String,
1968 pub v: Vec<Sandwich1WithOptUnion>,
1969 pub after: String,
1970}
1971
1972impl fidl::Persistable for OutOfLineSandwich1WithOptUnion {}
1973
1974#[derive(Clone, Debug, PartialEq)]
1975pub struct PaddedTableStruct {
1976 pub t: PaddedTable,
1977}
1978
1979impl fidl::Persistable for PaddedTableStruct {}
1980
1981#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1982pub struct PaddedUnionStruct {
1983 pub u: PaddedUnion,
1984}
1985
1986impl fidl::Persistable for PaddedUnionStruct {}
1987
1988#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1989#[repr(C)]
1990pub struct PaddingAlignment2MaskMayBe4Bytes {
1991 pub a: u8,
1992 pub b: u16,
1993 pub c: u16,
1994}
1995
1996impl fidl::Persistable for PaddingAlignment2MaskMayBe4Bytes {}
1997
1998#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1999pub struct PaddingAlignment2MaskMayBe4BytesVector {
2000 pub v: Vec<PaddingAlignment2MaskMayBe4Bytes>,
2001}
2002
2003impl fidl::Persistable for PaddingAlignment2MaskMayBe4BytesVector {}
2004
2005#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2006#[repr(C)]
2007pub struct PaddingAlignment4MaskMayBe8Bytes {
2008 pub a: u8,
2009 pub b: u32,
2010 pub c: u32,
2011}
2012
2013impl fidl::Persistable for PaddingAlignment4MaskMayBe8Bytes {}
2014
2015#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2016pub struct PaddingAlignment4MaskMayBe8BytesVector {
2017 pub v: Vec<PaddingAlignment4MaskMayBe8Bytes>,
2018}
2019
2020impl fidl::Persistable for PaddingAlignment4MaskMayBe8BytesVector {}
2021
2022#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2023#[repr(C)]
2024pub struct PaddingBetweenFieldsInt16Int32 {
2025 pub a: i16,
2026 pub b: i32,
2027}
2028
2029impl fidl::Persistable for PaddingBetweenFieldsInt16Int32 {}
2030
2031#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2032#[repr(C)]
2033pub struct PaddingBetweenFieldsInt16Int64 {
2034 pub a: i16,
2035 pub b: i64,
2036}
2037
2038impl fidl::Persistable for PaddingBetweenFieldsInt16Int64 {}
2039
2040#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2041#[repr(C)]
2042pub struct PaddingBetweenFieldsInt32Int64 {
2043 pub a: i32,
2044 pub b: i64,
2045}
2046
2047impl fidl::Persistable for PaddingBetweenFieldsInt32Int64 {}
2048
2049#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2050#[repr(C)]
2051pub struct PaddingBetweenFieldsInt8Int16 {
2052 pub a: i8,
2053 pub b: i16,
2054}
2055
2056impl fidl::Persistable for PaddingBetweenFieldsInt8Int16 {}
2057
2058#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2059#[repr(C)]
2060pub struct PaddingBetweenFieldsInt8Int32 {
2061 pub a: i8,
2062 pub b: i32,
2063}
2064
2065impl fidl::Persistable for PaddingBetweenFieldsInt8Int32 {}
2066
2067#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2068#[repr(C)]
2069pub struct PaddingBetweenFieldsInt8Int64 {
2070 pub a: i8,
2071 pub b: i64,
2072}
2073
2074impl fidl::Persistable for PaddingBetweenFieldsInt8Int64 {}
2075
2076#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2077#[repr(C)]
2078pub struct PaddingEndOfInlineObject1Byte {
2079 pub a: Struct1Byte,
2080}
2081
2082impl fidl::Persistable for PaddingEndOfInlineObject1Byte {}
2083
2084#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2085#[repr(C)]
2086pub struct PaddingEndOfInlineObject2Byte {
2087 pub a: Struct2Byte,
2088}
2089
2090impl fidl::Persistable for PaddingEndOfInlineObject2Byte {}
2091
2092#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2093#[repr(C)]
2094pub struct PaddingEndOfInlineObject3Byte {
2095 pub a: Struct3Byte,
2096}
2097
2098impl fidl::Persistable for PaddingEndOfInlineObject3Byte {}
2099
2100#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2101#[repr(C)]
2102pub struct PaddingEndOfInlineObject4Byte {
2103 pub a: Struct4Byte,
2104}
2105
2106impl fidl::Persistable for PaddingEndOfInlineObject4Byte {}
2107
2108#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2109#[repr(C)]
2110pub struct PaddingEndOfInlineObject5Byte {
2111 pub a: Struct5Byte,
2112}
2113
2114impl fidl::Persistable for PaddingEndOfInlineObject5Byte {}
2115
2116#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2117#[repr(C)]
2118pub struct PaddingEndOfInlineObject6Byte {
2119 pub a: Struct6Byte,
2120}
2121
2122impl fidl::Persistable for PaddingEndOfInlineObject6Byte {}
2123
2124#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2125#[repr(C)]
2126pub struct PaddingEndOfInlineObject7Byte {
2127 pub a: Struct7Byte,
2128}
2129
2130impl fidl::Persistable for PaddingEndOfInlineObject7Byte {}
2131
2132#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2133pub struct PaddingEndOfInlineObjectBeforeNextObject1Byte {
2134 pub out_of_line: Option<Box<Struct8Byte>>,
2135 pub in_line: Struct1Byte,
2136}
2137
2138impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject1Byte {}
2139
2140#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2141pub struct PaddingEndOfInlineObjectBeforeNextObject2Byte {
2142 pub out_of_line: Option<Box<Struct8Byte>>,
2143 pub in_line: Struct2Byte,
2144}
2145
2146impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject2Byte {}
2147
2148#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2149pub struct PaddingEndOfInlineObjectBeforeNextObject3Byte {
2150 pub out_of_line: Option<Box<Struct8Byte>>,
2151 pub in_line: Struct3Byte,
2152}
2153
2154impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject3Byte {}
2155
2156#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2157pub struct PaddingEndOfInlineObjectBeforeNextObject4Byte {
2158 pub out_of_line: Option<Box<Struct8Byte>>,
2159 pub in_line: Struct4Byte,
2160}
2161
2162impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject4Byte {}
2163
2164#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2165pub struct PaddingEndOfInlineObjectBeforeNextObject5Byte {
2166 pub out_of_line: Option<Box<Struct8Byte>>,
2167 pub in_line: Struct5Byte,
2168}
2169
2170impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject5Byte {}
2171
2172#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2173pub struct PaddingEndOfInlineObjectBeforeNextObject6Byte {
2174 pub out_of_line: Option<Box<Struct8Byte>>,
2175 pub in_line: Struct6Byte,
2176}
2177
2178impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject6Byte {}
2179
2180#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2181pub struct PaddingEndOfInlineObjectBeforeNextObject7Byte {
2182 pub out_of_line: Option<Box<Struct8Byte>>,
2183 pub in_line: Struct7Byte,
2184}
2185
2186impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject7Byte {}
2187
2188#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2189pub struct PaddingEndOfOutOfLineObject1Byte {
2190 pub out_of_line: Option<Box<Struct1Byte>>,
2191}
2192
2193impl fidl::Persistable for PaddingEndOfOutOfLineObject1Byte {}
2194
2195#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2196pub struct PaddingEndOfOutOfLineObject2Byte {
2197 pub out_of_line: Option<Box<Struct2Byte>>,
2198}
2199
2200impl fidl::Persistable for PaddingEndOfOutOfLineObject2Byte {}
2201
2202#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2203pub struct PaddingEndOfOutOfLineObject3Byte {
2204 pub out_of_line: Option<Box<Struct3Byte>>,
2205}
2206
2207impl fidl::Persistable for PaddingEndOfOutOfLineObject3Byte {}
2208
2209#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2210pub struct PaddingEndOfOutOfLineObject4Byte {
2211 pub out_of_line: Option<Box<Struct4Byte>>,
2212}
2213
2214impl fidl::Persistable for PaddingEndOfOutOfLineObject4Byte {}
2215
2216#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2217pub struct PaddingEndOfOutOfLineObject5Byte {
2218 pub out_of_line: Option<Box<Struct5Byte>>,
2219}
2220
2221impl fidl::Persistable for PaddingEndOfOutOfLineObject5Byte {}
2222
2223#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2224pub struct PaddingEndOfOutOfLineObject6Byte {
2225 pub out_of_line: Option<Box<Struct6Byte>>,
2226}
2227
2228impl fidl::Persistable for PaddingEndOfOutOfLineObject6Byte {}
2229
2230#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2231pub struct PaddingEndOfOutOfLineObject7Byte {
2232 pub out_of_line: Option<Box<Struct7Byte>>,
2233}
2234
2235impl fidl::Persistable for PaddingEndOfOutOfLineObject7Byte {}
2236
2237#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2238pub struct PaddingInBetweenOutOfLineObjects1Byte {
2239 pub first: Option<Box<Struct1Byte>>,
2240 pub second: Option<Box<Struct8Byte>>,
2241}
2242
2243impl fidl::Persistable for PaddingInBetweenOutOfLineObjects1Byte {}
2244
2245#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2246pub struct PaddingInBetweenOutOfLineObjects2Byte {
2247 pub first: Option<Box<Struct2Byte>>,
2248 pub second: Option<Box<Struct8Byte>>,
2249}
2250
2251impl fidl::Persistable for PaddingInBetweenOutOfLineObjects2Byte {}
2252
2253#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2254pub struct PaddingInBetweenOutOfLineObjects3Byte {
2255 pub first: Option<Box<Struct3Byte>>,
2256 pub second: Option<Box<Struct8Byte>>,
2257}
2258
2259impl fidl::Persistable for PaddingInBetweenOutOfLineObjects3Byte {}
2260
2261#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2262pub struct PaddingInBetweenOutOfLineObjects4Byte {
2263 pub first: Option<Box<Struct4Byte>>,
2264 pub second: Option<Box<Struct8Byte>>,
2265}
2266
2267impl fidl::Persistable for PaddingInBetweenOutOfLineObjects4Byte {}
2268
2269#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2270pub struct PaddingInBetweenOutOfLineObjects5Byte {
2271 pub first: Option<Box<Struct5Byte>>,
2272 pub second: Option<Box<Struct8Byte>>,
2273}
2274
2275impl fidl::Persistable for PaddingInBetweenOutOfLineObjects5Byte {}
2276
2277#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2278pub struct PaddingInBetweenOutOfLineObjects6Byte {
2279 pub first: Option<Box<Struct6Byte>>,
2280 pub second: Option<Box<Struct8Byte>>,
2281}
2282
2283impl fidl::Persistable for PaddingInBetweenOutOfLineObjects6Byte {}
2284
2285#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2286pub struct PaddingInBetweenOutOfLineObjects7Byte {
2287 pub first: Option<Box<Struct7Byte>>,
2288 pub second: Option<Box<Struct8Byte>>,
2289}
2290
2291impl fidl::Persistable for PaddingInBetweenOutOfLineObjects7Byte {}
2292
2293#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2294pub struct RecursiveEmptyStruct {
2295 pub inner: Option<Box<RecursiveEmptyStruct>>,
2296}
2297
2298impl fidl::Persistable for RecursiveEmptyStruct {}
2299
2300#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2301pub struct RecursiveEmptyStructArrayWrapper {
2302 pub arr: [RecursiveEmptyStruct; 1],
2303}
2304
2305impl fidl::Persistable for RecursiveEmptyStructArrayWrapper {}
2306
2307#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2308pub struct RecursiveEmptyStructVectorWrapper {
2309 pub vec: Vec<RecursiveEmptyStruct>,
2310}
2311
2312impl fidl::Persistable for RecursiveEmptyStructVectorWrapper {}
2313
2314#[derive(Clone, Debug, PartialEq)]
2315pub struct RecursiveOptionalAndTableStruct {
2316 pub t: RecursiveOptionalAndTable,
2317}
2318
2319impl fidl::Persistable for RecursiveOptionalAndTableStruct {}
2320
2321#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2322pub struct RecursiveOptionalAndUnionStruct {
2323 pub u: RecursiveOptionalAndUnion,
2324}
2325
2326impl fidl::Persistable for RecursiveOptionalAndUnionStruct {}
2327
2328#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2329pub struct RecursiveOptionalAndVectorStruct {
2330 pub vec: Vec<RecursiveOptionalStruct>,
2331}
2332
2333impl fidl::Persistable for RecursiveOptionalAndVectorStruct {}
2334
2335#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2336pub struct RecursiveOptionalBasicStruct {
2337 pub inner: Option<Box<RecursiveOptionalBasicStruct>>,
2338}
2339
2340impl fidl::Persistable for RecursiveOptionalBasicStruct {}
2341
2342#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2343pub struct RecursiveOptionalStruct {
2344 pub inner: Option<Box<RecursiveOptionalStruct>>,
2345}
2346
2347impl fidl::Persistable for RecursiveOptionalStruct {}
2348
2349#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2350pub struct RecursiveOptionalStructArrayWrapper {
2351 pub arr: [RecursiveOptionalStruct; 1],
2352}
2353
2354impl fidl::Persistable for RecursiveOptionalStructArrayWrapper {}
2355
2356#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2357pub struct RecursiveOptionalStructWithString {
2358 pub inner: Option<Box<RecursiveOptionalStructWithString>>,
2359 pub str: Option<String>,
2360}
2361
2362impl fidl::Persistable for RecursiveOptionalStructWithString {}
2363
2364#[derive(Clone, Debug, PartialEq)]
2365pub struct RecursiveTableHolder {
2366 pub t: RecursiveTable,
2367}
2368
2369impl fidl::Persistable for RecursiveTableHolder {}
2370
2371#[derive(Clone, Debug, PartialEq)]
2372pub struct RecursiveTableOptionalHolder {
2373 pub o: Option<Box<RecursiveTableHolder>>,
2374}
2375
2376impl fidl::Persistable for RecursiveTableOptionalHolder {}
2377
2378#[derive(Clone, Debug, PartialEq)]
2379pub struct RecursiveUnionStruct {
2380 pub u: Option<Box<RecursiveUnion>>,
2381}
2382
2383impl fidl::Persistable for RecursiveUnionStruct {}
2384
2385#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2386pub struct RecursiveVectorStruct {
2387 pub vec: Option<Vec<RecursiveVectorStruct>>,
2388}
2389
2390impl fidl::Persistable for RecursiveVectorStruct {}
2391
2392#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2393pub struct RecursiveVectorUnionStruct {
2394 pub u: RecursiveVectorUnion,
2395}
2396
2397impl fidl::Persistable for RecursiveVectorUnionStruct {}
2398
2399#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2400#[repr(C)]
2401pub struct Regression1 {
2402 pub f1: u8,
2403 pub f2: u32,
2404 pub f3: u8,
2405 pub f4: u16,
2406 pub f5: u64,
2407 pub f6: u8,
2408}
2409
2410impl fidl::Persistable for Regression1 {}
2411
2412#[derive(Clone, Debug, PartialEq)]
2413pub struct Regression10V1 {
2414 pub table: Regression10TableV1,
2415}
2416
2417impl fidl::Persistable for Regression10V1 {}
2418
2419#[derive(Clone, Debug, PartialEq)]
2420pub struct Regression10V2 {
2421 pub table: Regression10TableV2,
2422}
2423
2424impl fidl::Persistable for Regression10V2 {}
2425
2426#[derive(Clone, Debug, PartialEq)]
2427pub struct Regression10V3 {
2428 pub table: Regression10TableV3,
2429}
2430
2431impl fidl::Persistable for Regression10V3 {}
2432
2433#[derive(Clone, Debug, PartialEq)]
2434pub struct Regression11 {
2435 pub table_of_table: UnionWithRegression10Table,
2436}
2437
2438impl fidl::Persistable for Regression11 {}
2439
2440#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2441#[repr(C)]
2442pub struct Regression2 {
2443 pub head: Regression1,
2444 pub f7: u8,
2445}
2446
2447impl fidl::Persistable for Regression2 {}
2448
2449#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2450pub struct Regression3 {
2451 pub opt_value: Option<Box<Regression2>>,
2452}
2453
2454impl fidl::Persistable for Regression3 {}
2455
2456#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2457#[repr(C)]
2458pub struct Regression4 {
2459 pub f1: u8,
2460 pub f2: u32,
2461 pub s1: StructSize3Align1,
2462 pub f3: u8,
2463 pub f4: u16,
2464 pub f5: u64,
2465 pub f6: u8,
2466}
2467
2468impl fidl::Persistable for Regression4 {}
2469
2470#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2471pub struct Regression5 {
2472 pub f1: u8,
2473 pub f2: EnumUint32,
2474 pub f3: EnumUint8,
2475 pub f4: u16,
2476 pub f5: u64,
2477 pub f6: u8,
2478}
2479
2480impl fidl::Persistable for Regression5 {}
2481
2482#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2483pub struct Regression6 {
2484 pub f1: u8,
2485 pub f2: BitsUint32,
2486 pub f3: BitsUint8,
2487 pub f4: u16,
2488 pub f5: u64,
2489 pub f6: u8,
2490}
2491
2492impl fidl::Persistable for Regression6 {}
2493
2494#[derive(Clone, Debug, PartialEq)]
2495pub struct Regression7TableUnionXUnion {
2496 pub value: TableOfUnionThenXUnionThenTableThenXUnionThenUnion,
2497}
2498
2499impl fidl::Persistable for Regression7TableUnionXUnion {}
2500
2501#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2502pub struct Regression8OptUnionSize12Align4 {
2503 pub opt_union1: Option<Box<UnionSize12Align4>>,
2504 pub opt_union2: Option<Box<UnionSize12Align4>>,
2505 pub opt_union3: Option<Box<UnionSize12Align4>>,
2506}
2507
2508impl fidl::Persistable for Regression8OptUnionSize12Align4 {}
2509
2510#[derive(Clone, Debug, PartialEq)]
2511pub struct Regression8TableWithUnionSize12Align4 {
2512 pub value: TableWithUnionSize12Align4,
2513}
2514
2515impl fidl::Persistable for Regression8TableWithUnionSize12Align4 {}
2516
2517#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2518pub struct Regression8VectorOfOptUnionSize12Align4 {
2519 pub value: Vec<Option<Box<UnionSize12Align4>>>,
2520}
2521
2522impl fidl::Persistable for Regression8VectorOfOptUnionSize12Align4 {}
2523
2524#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2525pub struct Regression9Message {
2526 pub header: TransactionHeader,
2527 pub body: Regression9Result,
2528}
2529
2530impl fidl::Persistable for Regression9Message {}
2531
2532#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2533pub struct Regression9Value {
2534 pub u: StringBoolUnion,
2535 pub nullable_u: Option<Box<StringBoolUnion>>,
2536}
2537
2538impl fidl::Persistable for Regression9Value {}
2539
2540#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2541pub struct ReverseOrdinalUnionStruct {
2542 pub u: ReverseOrdinalUnion,
2543}
2544
2545impl fidl::Persistable for ReverseOrdinalUnionStruct {}
2546
2547#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2548pub struct Sandwich1 {
2549 pub before: u32,
2550 pub the_union: UnionSize8Align4,
2551 pub after: u32,
2552}
2553
2554impl fidl::Persistable for Sandwich1 {}
2555
2556#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2557pub struct Sandwich1Message {
2558 pub header: TransactionHeader,
2559 pub body: Sandwich1,
2560}
2561
2562impl fidl::Persistable for Sandwich1Message {}
2563
2564#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2565pub struct Sandwich1WithOptUnion {
2566 pub before: u32,
2567 pub opt_union: Option<Box<UnionSize8Align4>>,
2568 pub after: u32,
2569}
2570
2571impl fidl::Persistable for Sandwich1WithOptUnion {}
2572
2573#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2574pub struct Sandwich2 {
2575 pub before: u32,
2576 pub the_union: UnionSize12Align4,
2577 pub after: u32,
2578}
2579
2580impl fidl::Persistable for Sandwich2 {}
2581
2582#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2583pub struct Sandwich3 {
2584 pub before: u32,
2585 pub the_union: UnionSize24Align8,
2586 pub after: u32,
2587}
2588
2589impl fidl::Persistable for Sandwich3 {}
2590
2591#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2592pub struct Sandwich4 {
2593 pub before: u32,
2594 pub the_union: UnionSize36Align4,
2595 pub after: u32,
2596}
2597
2598impl fidl::Persistable for Sandwich4 {}
2599
2600#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2601pub struct Sandwich4Align8 {
2602 pub sandwich4: Sandwich4,
2603 pub alignment8_enforcement: u64,
2604}
2605
2606impl fidl::Persistable for Sandwich4Align8 {}
2607
2608#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2609pub struct Sandwich4Align8WithPointer {
2610 pub sandwich4: Sandwich4,
2611 pub alignment8_enforcement: Option<Box<Size8Align8>>,
2612}
2613
2614impl fidl::Persistable for Sandwich4Align8WithPointer {}
2615
2616#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2617pub struct Sandwich4Message {
2618 pub header: TransactionHeader,
2619 pub body: Sandwich4,
2620}
2621
2622impl fidl::Persistable for Sandwich4Message {}
2623
2624#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2625pub struct Sandwich5 {
2626 pub before: u32,
2627 pub union_of_union: UnionOfUnion,
2628 pub after: u32,
2629}
2630
2631impl fidl::Persistable for Sandwich5 {}
2632
2633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2634pub struct Sandwich5Message {
2635 pub header: TransactionHeader,
2636 pub body: Sandwich5,
2637}
2638
2639impl fidl::Persistable for Sandwich5Message {}
2640
2641#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2642pub struct Sandwich7 {
2643 pub before: u32,
2644 pub opt_sandwich1: Option<Box<Sandwich1>>,
2645 pub after: u32,
2646}
2647
2648impl fidl::Persistable for Sandwich7 {}
2649
2650#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2651pub struct Sandwich7Message {
2652 pub header: TransactionHeader,
2653 pub body: Sandwich7,
2654}
2655
2656impl fidl::Persistable for Sandwich7Message {}
2657
2658#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2659pub struct Sandwich8 {
2660 pub before: u64,
2661 pub union_of_union: UnionOfUnion,
2662 pub after: u32,
2663}
2664
2665impl fidl::Persistable for Sandwich8 {}
2666
2667#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2668pub struct Sandwich9 {
2669 pub before: u16,
2670 pub the_union: UnionWithVectorOfVectors,
2671 pub after: u16,
2672}
2673
2674impl fidl::Persistable for Sandwich9 {}
2675
2676#[derive(Clone, Debug, PartialEq)]
2677pub struct SimpleTableArrayStruct {
2678 pub the_array: [TransformerSimpleTable; 2],
2679}
2680
2681impl fidl::Persistable for SimpleTableArrayStruct {}
2682
2683#[derive(Clone, Debug, PartialEq)]
2684pub struct SimpleTableThenUint64 {
2685 pub table: SimpleTable,
2686 pub number: u64,
2687}
2688
2689impl fidl::Persistable for SimpleTableThenUint64 {}
2690
2691#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2692pub struct SingleVariantUnionStruct {
2693 pub u: SingleVariantUnion,
2694}
2695
2696impl fidl::Persistable for SingleVariantUnionStruct {}
2697
2698#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2699#[repr(C)]
2700pub struct Size5Alignment1 {
2701 pub data: [u8; 5],
2702}
2703
2704impl fidl::Persistable for Size5Alignment1 {}
2705
2706#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2707#[repr(C)]
2708pub struct Size5Alignment1Array {
2709 pub a: [Size5Alignment1; 3],
2710}
2711
2712impl fidl::Persistable for Size5Alignment1Array {}
2713
2714#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2715pub struct Size5Alignment1Vector {
2716 pub v: Vec<Size5Alignment1>,
2717}
2718
2719impl fidl::Persistable for Size5Alignment1Vector {}
2720
2721#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2722#[repr(C)]
2723pub struct Size5Alignment4 {
2724 pub four: u32,
2725 pub one: u8,
2726}
2727
2728impl fidl::Persistable for Size5Alignment4 {}
2729
2730#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2731#[repr(C)]
2732pub struct Size5Alignment4Array {
2733 pub a: [Size5Alignment4; 3],
2734}
2735
2736impl fidl::Persistable for Size5Alignment4Array {}
2737
2738#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2739pub struct Size5Alignment4Vector {
2740 pub v: Vec<Size5Alignment4>,
2741}
2742
2743impl fidl::Persistable for Size5Alignment4Vector {}
2744
2745#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2746#[repr(C)]
2747pub struct Size8Align8 {
2748 pub data: u64,
2749}
2750
2751impl fidl::Persistable for Size8Align8 {}
2752
2753#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2754pub struct StrictBitsUint16Struct {
2755 pub b: StrictBitsUint16,
2756}
2757
2758impl fidl::Persistable for StrictBitsUint16Struct {}
2759
2760#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2761pub struct StrictBitsUint32Struct {
2762 pub b: StrictBitsUint32,
2763}
2764
2765impl fidl::Persistable for StrictBitsUint32Struct {}
2766
2767#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2768pub struct StrictBitsUint64Struct {
2769 pub b: StrictBitsUint64,
2770}
2771
2772impl fidl::Persistable for StrictBitsUint64Struct {}
2773
2774#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2775pub struct StrictBitsUint8Struct {
2776 pub b: StrictBitsUint8,
2777}
2778
2779impl fidl::Persistable for StrictBitsUint8Struct {}
2780
2781#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2782pub struct StrictEnumInt16Struct {
2783 pub e: StrictEnumInt16,
2784}
2785
2786impl fidl::Persistable for StrictEnumInt16Struct {}
2787
2788#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2789pub struct StrictEnumInt32Struct {
2790 pub e: StrictEnumInt32,
2791}
2792
2793impl fidl::Persistable for StrictEnumInt32Struct {}
2794
2795#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2796pub struct StrictEnumInt64Struct {
2797 pub e: StrictEnumInt64,
2798}
2799
2800impl fidl::Persistable for StrictEnumInt64Struct {}
2801
2802#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2803pub struct StrictEnumInt8Struct {
2804 pub e: StrictEnumInt8,
2805}
2806
2807impl fidl::Persistable for StrictEnumInt8Struct {}
2808
2809#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2810pub struct StrictEnumUint16Struct {
2811 pub e: StrictEnumUint16,
2812}
2813
2814impl fidl::Persistable for StrictEnumUint16Struct {}
2815
2816#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2817pub struct StrictEnumUint32Struct {
2818 pub e: StrictEnumUint32,
2819}
2820
2821impl fidl::Persistable for StrictEnumUint32Struct {}
2822
2823#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2824pub struct StrictEnumUint64Struct {
2825 pub e: StrictEnumUint64,
2826}
2827
2828impl fidl::Persistable for StrictEnumUint64Struct {}
2829
2830#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2831pub struct StrictEnumUint8Struct {
2832 pub e: StrictEnumUint8,
2833}
2834
2835impl fidl::Persistable for StrictEnumUint8Struct {}
2836
2837#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2838pub struct StringUnionStruct {
2839 pub u: StringBoolUnion,
2840 pub nullable_u: Option<Box<StringBoolUnion>>,
2841}
2842
2843impl fidl::Persistable for StringUnionStruct {}
2844
2845#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2846pub struct StringUnionStructWrapper {
2847 pub sus: StringUnionStruct,
2848}
2849
2850impl fidl::Persistable for StringUnionStructWrapper {}
2851
2852#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2853pub struct StringUnionStructWrapperResponse {
2854 pub header: TransactionHeader,
2855 pub body: StringUnionStructWrapper,
2856}
2857
2858impl fidl::Persistable for StringUnionStructWrapperResponse {}
2859
2860#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2861pub struct StringUnionVector {
2862 pub the_vector: Vec<Option<Box<StringUnion>>>,
2863}
2864
2865impl fidl::Persistable for StringUnionVector {}
2866
2867#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2868pub struct StringWrapper {
2869 pub str: String,
2870}
2871
2872impl fidl::Persistable for StringWrapper {}
2873
2874#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2875#[repr(C)]
2876pub struct Struct1Byte {
2877 pub a: i8,
2878}
2879
2880impl fidl::Persistable for Struct1Byte {}
2881
2882#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2883#[repr(C)]
2884pub struct Struct2Byte {
2885 pub a: i16,
2886}
2887
2888impl fidl::Persistable for Struct2Byte {}
2889
2890#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2891#[repr(C)]
2892pub struct Struct3Byte {
2893 pub a: i16,
2894 pub b: i8,
2895}
2896
2897impl fidl::Persistable for Struct3Byte {}
2898
2899#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2900#[repr(C)]
2901pub struct Struct4Byte {
2902 pub a: i32,
2903}
2904
2905impl fidl::Persistable for Struct4Byte {}
2906
2907#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2908#[repr(C)]
2909pub struct Struct5Byte {
2910 pub a: i32,
2911 pub b: i8,
2912}
2913
2914impl fidl::Persistable for Struct5Byte {}
2915
2916#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2917#[repr(C)]
2918pub struct Struct6Byte {
2919 pub a: i32,
2920 pub b: i16,
2921}
2922
2923impl fidl::Persistable for Struct6Byte {}
2924
2925#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2926#[repr(C)]
2927pub struct Struct7Byte {
2928 pub a: i32,
2929 pub b: i16,
2930 pub c: i8,
2931}
2932
2933impl fidl::Persistable for Struct7Byte {}
2934
2935#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2936#[repr(C)]
2937pub struct Struct8Byte {
2938 pub a: i64,
2939}
2940
2941impl fidl::Persistable for Struct8Byte {}
2942
2943#[derive(Clone, Debug, PartialEq)]
2944pub struct StructOfEmptyFlexibleUnion {
2945 pub empty: EmptyFlexibleUnion,
2946}
2947
2948impl fidl::Persistable for StructOfEmptyFlexibleUnion {}
2949
2950#[derive(Clone, Debug, PartialEq)]
2951pub struct StructOfEmptyTable {
2952 pub table: EmptyTable,
2953}
2954
2955impl fidl::Persistable for StructOfEmptyTable {}
2956
2957#[derive(Clone, Debug, PartialEq)]
2958pub struct StructOfReverseOrdinalTable {
2959 pub table: ReverseOrdinalTable,
2960}
2961
2962impl fidl::Persistable for StructOfReverseOrdinalTable {}
2963
2964#[derive(Clone, Debug, PartialEq)]
2965pub struct StructOfSimpleTable {
2966 pub table: SimpleTable,
2967}
2968
2969impl fidl::Persistable for StructOfSimpleTable {}
2970
2971#[derive(Clone, Debug, PartialEq)]
2972pub struct StructOfTableWithGaps {
2973 pub table: TableWithGaps,
2974}
2975
2976impl fidl::Persistable for StructOfTableWithGaps {}
2977
2978#[derive(Clone, Debug, PartialEq)]
2979pub struct StructOfTableWithStringAndVector {
2980 pub table: TableWithStringAndVector,
2981}
2982
2983impl fidl::Persistable for StructOfTableWithStringAndVector {}
2984
2985#[derive(Clone, Debug, PartialEq)]
2986pub struct StructOfTableWithXUnion {
2987 pub value: TableWithXUnion,
2988}
2989
2990impl fidl::Persistable for StructOfTableWithXUnion {}
2991
2992#[derive(Clone, Debug, PartialEq)]
2993pub struct StructOfUnionOfTable {
2994 pub u: UnionOfTable,
2995}
2996
2997impl fidl::Persistable for StructOfUnionOfTable {}
2998
2999#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3000#[repr(C)]
3001pub struct StructSize16Align8 {
3002 pub f1: u64,
3003 pub f2: u64,
3004}
3005
3006impl fidl::Persistable for StructSize16Align8 {}
3007
3008#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3009#[repr(C)]
3010pub struct StructSize3Align1 {
3011 pub three_bytes: [u8; 3],
3012}
3013
3014impl fidl::Persistable for StructSize3Align1 {}
3015
3016#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3017#[repr(C)]
3018pub struct StructSize3Align2 {
3019 pub f1: u16,
3020 pub f2: u8,
3021}
3022
3023impl fidl::Persistable for StructSize3Align2 {}
3024
3025#[derive(Clone, Debug, PartialEq)]
3026pub struct StructTableNoFields {
3027 pub t: TableNoFields,
3028}
3029
3030impl fidl::Persistable for StructTableNoFields {}
3031
3032#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3033pub struct StructWithArrays {
3034 pub arr_int: [i32; 2],
3035 pub arr_string: [String; 2],
3036 pub arr_nullable_string: [Option<String>; 2],
3037 pub arr_struct: [StructWithInt; 2],
3038 pub arr_nullable_struct: [Option<Box<StructWithInt>>; 2],
3039 pub arr_arr_int: [[i32; 3]; 2],
3040}
3041
3042impl fidl::Persistable for StructWithArrays {}
3043
3044#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3045#[repr(C)]
3046pub struct StructWithInt {
3047 pub x: i32,
3048}
3049
3050impl fidl::Persistable for StructWithInt {}
3051
3052#[derive(Clone, Debug, PartialEq)]
3053pub struct StructWithOptionals {
3054 pub s: EmptyStruct,
3055 pub s2: Option<Box<EmptyStruct>>,
3056 pub t: TableWithEmptyStruct,
3057 pub xu: XUnionWithEmptyStruct,
3058 pub xu2: Option<Box<XUnionWithEmptyStruct>>,
3059 pub u: UnionWithEmptyStruct,
3060 pub u2: Option<Box<UnionWithEmptyStruct>>,
3061}
3062
3063impl fidl::Persistable for StructWithOptionals {}
3064
3065#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3066pub struct StructWithVectors {
3067 pub vec_empty: Vec<i32>,
3068 pub vec_int: Vec<i32>,
3069 pub vec_string: Vec<String>,
3070 pub vec_nullable_string: Vec<Option<String>>,
3071 pub vec_struct: Vec<StructWithInt>,
3072 pub vec_nullable_struct: Vec<Option<Box<StructWithInt>>>,
3073 pub vec_vec_int: Vec<Vec<i32>>,
3074}
3075
3076impl fidl::Persistable for StructWithVectors {}
3077
3078#[derive(Clone, Debug, PartialEq)]
3079pub struct TableFieldInlinedStruct {
3080 pub t: TableFieldInlined,
3081}
3082
3083impl fidl::Persistable for TableFieldInlinedStruct {}
3084
3085#[derive(Clone, Debug, PartialEq)]
3086pub struct TableFieldOutOfLineStruct {
3087 pub t: TableFieldOutOfLine,
3088}
3089
3090impl fidl::Persistable for TableFieldOutOfLineStruct {}
3091
3092#[derive(Clone, Debug, PartialEq)]
3093pub struct TableFieldUnknownStruct {
3094 pub t: TableFieldUnknown,
3095}
3096
3097impl fidl::Persistable for TableFieldUnknownStruct {}
3098
3099#[derive(Clone, Debug, PartialEq)]
3100pub struct TableFieldUnsetFlexibleEnumInlinedStruct {
3101 pub t: TableFieldUnsetFlexibleEnumInlined,
3102}
3103
3104impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlinedStruct {}
3105
3106#[derive(Clone, Debug, PartialEq)]
3107pub struct TableStructWithReservedSandwichStruct {
3108 pub table: TableStructWithReservedSandwich,
3109}
3110
3111impl fidl::Persistable for TableStructWithReservedSandwichStruct {}
3112
3113#[derive(Clone, Debug, PartialEq)]
3114pub struct TableStructWithUint32SandwichStruct {
3115 pub table: TableStructWithUint32Sandwich,
3116}
3117
3118impl fidl::Persistable for TableStructWithUint32SandwichStruct {}
3119
3120#[derive(Clone, Debug, PartialEq)]
3121pub struct TableWithReservedFieldThenUnionStruct {
3122 pub t: TableWithReservedFieldThenUnion,
3123}
3124
3125impl fidl::Persistable for TableWithReservedFieldThenUnionStruct {}
3126
3127#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3128pub struct TestAddEthernetDeviceRequest {
3129 pub topological_path: String,
3130 pub config: InterfaceConfig,
3131 pub this_should_be_a_handle: u32,
3132}
3133
3134impl fidl::Persistable for TestAddEthernetDeviceRequest {}
3135
3136#[derive(Clone, Debug, PartialEq)]
3137pub struct TestFlexibleXUnionInStruct {
3138 pub xu: SampleXUnion,
3139}
3140
3141impl fidl::Persistable for TestFlexibleXUnionInStruct {}
3142
3143#[derive(Clone, Debug, PartialEq)]
3144pub struct TestInlineXUnionInStruct {
3145 pub before: String,
3146 pub xu: SampleXUnion,
3147 pub after: String,
3148}
3149
3150impl fidl::Persistable for TestInlineXUnionInStruct {}
3151
3152#[derive(Clone, Debug, PartialEq)]
3153pub struct TestOptionalFlexibleXUnionInStruct {
3154 pub xu: Option<Box<SampleXUnion>>,
3155}
3156
3157impl fidl::Persistable for TestOptionalFlexibleXUnionInStruct {}
3158
3159#[derive(Clone, Debug, PartialEq)]
3160pub struct TestOptionalStrictXUnionInStruct {
3161 pub xu: Option<Box<SampleStrictXUnion>>,
3162}
3163
3164impl fidl::Persistable for TestOptionalStrictXUnionInStruct {}
3165
3166#[derive(Clone, Debug, PartialEq)]
3167pub struct TestOptionalXUnionInStruct {
3168 pub before: String,
3169 pub xu: Option<Box<SampleXUnion>>,
3170 pub after: String,
3171}
3172
3173impl fidl::Persistable for TestOptionalXUnionInStruct {}
3174
3175#[derive(Clone, Debug, PartialEq)]
3176pub struct TestStrictXUnionInStruct {
3177 pub xu: SampleStrictXUnion,
3178}
3179
3180impl fidl::Persistable for TestStrictXUnionInStruct {}
3181
3182#[derive(Clone, Debug, PartialEq)]
3183pub struct TestXUnionInTable {
3184 pub value: XUnionInTable,
3185}
3186
3187impl fidl::Persistable for TestXUnionInTable {}
3188
3189#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3190#[repr(C)]
3191pub struct ThreeByte {
3192 pub elem1: u8,
3193 pub elem2: u8,
3194 pub elem3: u8,
3195}
3196
3197impl fidl::Persistable for ThreeByte {}
3198
3199#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3200#[repr(C)]
3201pub struct ThreeByteInArray {
3202 pub elems: [ThreeByte; 3],
3203}
3204
3205impl fidl::Persistable for ThreeByteInArray {}
3206
3207#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3208#[repr(C)]
3209pub struct ThreeByteInStruct {
3210 pub elem1: ThreeByte,
3211 pub elem2: ThreeByte,
3212 pub elem3: ThreeByte,
3213}
3214
3215impl fidl::Persistable for ThreeByteInStruct {}
3216
3217#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3218pub struct ThreeByteInVector {
3219 pub elems: Vec<ThreeByte>,
3220}
3221
3222impl fidl::Persistable for ThreeByteInVector {}
3223
3224#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3225#[repr(C)]
3226pub struct TransactionHeader {
3227 pub tx_id: u32,
3228 pub flags: [u8; 3],
3229 pub magic_number: u8,
3230 pub ordinal: u64,
3231}
3232
3233impl fidl::Persistable for TransactionHeader {}
3234
3235#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3236pub struct TransformerEmptyStruct;
3237
3238impl fidl::Persistable for TransformerEmptyStruct {}
3239
3240#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3241pub struct TwoEmptyStructsInStruct {
3242 pub a: EmptyStruct,
3243 pub b: EmptyStruct,
3244}
3245
3246impl fidl::Persistable for TwoEmptyStructsInStruct {}
3247
3248#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3249pub struct TwoEmptyStructsInStructInVectorInStruct {
3250 pub v: Vec<TwoEmptyStructsInStruct>,
3251}
3252
3253impl fidl::Persistable for TwoEmptyStructsInStructInVectorInStruct {}
3254
3255#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3256pub struct TwoLayerStructInnerBool {
3257 pub s: OneLayerStructWithBool,
3258 pub a: u64,
3259}
3260
3261impl fidl::Persistable for TwoLayerStructInnerBool {}
3262
3263#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3264#[repr(C)]
3265pub struct TwoLayerStructInnerPaddingAlign4 {
3266 pub s: OneLayerStructWithPaddingAlign4,
3267 pub a: u32,
3268}
3269
3270impl fidl::Persistable for TwoLayerStructInnerPaddingAlign4 {}
3271
3272#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3273#[repr(C)]
3274pub struct TwoLayerStructInnerPaddingAlign8 {
3275 pub s: OneLayerStructWithPaddingAlign8,
3276 pub a: u64,
3277}
3278
3279impl fidl::Persistable for TwoLayerStructInnerPaddingAlign8 {}
3280
3281#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3282#[repr(C)]
3283pub struct TwoLayerStructNoPaddingAlign4 {
3284 pub s: OneLayerStructNoPaddingAlign4,
3285 pub a: u32,
3286}
3287
3288impl fidl::Persistable for TwoLayerStructNoPaddingAlign4 {}
3289
3290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3291#[repr(C)]
3292pub struct TwoLayerStructNoPaddingAlign8 {
3293 pub s: OneLayerStructNoPaddingAlign8,
3294 pub a: u64,
3295}
3296
3297impl fidl::Persistable for TwoLayerStructNoPaddingAlign8 {}
3298
3299#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3300#[repr(C)]
3301pub struct Uint16Struct {
3302 pub val: u16,
3303}
3304
3305impl fidl::Persistable for Uint16Struct {}
3306
3307#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3308#[repr(C)]
3309pub struct Uint32Struct {
3310 pub val: u32,
3311}
3312
3313impl fidl::Persistable for Uint32Struct {}
3314
3315#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3316#[repr(C)]
3317pub struct Uint64Struct {
3318 pub val: u64,
3319}
3320
3321impl fidl::Persistable for Uint64Struct {}
3322
3323#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3324#[repr(C)]
3325pub struct Uint64Uint32Uint16Uint8 {
3326 pub f1: u64,
3327 pub f2: u32,
3328 pub f3: u16,
3329 pub f4: u8,
3330}
3331
3332impl fidl::Persistable for Uint64Uint32Uint16Uint8 {}
3333
3334#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3335#[repr(C)]
3336pub struct Uint8Struct {
3337 pub val: u8,
3338}
3339
3340impl fidl::Persistable for Uint8Struct {}
3341
3342#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3343#[repr(C)]
3344pub struct Uint8Uint16Uint32Uint64 {
3345 pub f1: u8,
3346 pub f2: u16,
3347 pub f3: u32,
3348 pub f4: u64,
3349}
3350
3351impl fidl::Persistable for Uint8Uint16Uint32Uint64 {}
3352
3353#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3354pub struct Uint8UnionStruct {
3355 pub u: Uint8Union,
3356}
3357
3358impl fidl::Persistable for Uint8UnionStruct {}
3359
3360#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3361pub struct UnboundedNonnullableString {
3362 pub s0: String,
3363}
3364
3365impl fidl::Persistable for UnboundedNonnullableString {}
3366
3367#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3368pub struct UnboundedNonnullableVectorOfUint32s {
3369 pub vu0: Vec<u32>,
3370}
3371
3372impl fidl::Persistable for UnboundedNonnullableVectorOfUint32s {}
3373
3374#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3375pub struct UnboundedNullableString {
3376 pub s0: Option<String>,
3377}
3378
3379impl fidl::Persistable for UnboundedNullableString {}
3380
3381#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3382pub struct UnboundedNullableVectorOfUint32s {
3383 pub vu0: Option<Vec<u32>>,
3384}
3385
3386impl fidl::Persistable for UnboundedNullableVectorOfUint32s {}
3387
3388#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3389pub struct UnionInlinePaddingStruct {
3390 pub u: UnionInlinePadding,
3391}
3392
3393impl fidl::Persistable for UnionInlinePaddingStruct {}
3394
3395#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3396pub struct UnionWithBoundStringStruct {
3397 pub v: UnionWithBoundString,
3398}
3399
3400impl fidl::Persistable for UnionWithBoundStringStruct {}
3401
3402#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3403pub struct UpdatePolicy {
3404 pub fetch_if_absent: bool,
3405 pub allow_old_versions: bool,
3406}
3407
3408impl fidl::Persistable for UpdatePolicy {}
3409
3410#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3411pub struct VectorOfByteVector {
3412 pub v: Vec<Vec<u8>>,
3413}
3414
3415impl fidl::Persistable for VectorOfByteVector {}
3416
3417#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3418pub struct VectorOfEnumStruct {
3419 pub v: Vec<StrictEnumInt16>,
3420}
3421
3422impl fidl::Persistable for VectorOfEnumStruct {}
3423
3424#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3425pub struct VectorOfStrings {
3426 pub v: Vec<String>,
3427}
3428
3429impl fidl::Persistable for VectorOfStrings {}
3430
3431#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3432pub struct VectorWithLimit {
3433 pub v: Vec<u8>,
3434}
3435
3436impl fidl::Persistable for VectorWithLimit {}
3437
3438#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3439pub struct VectorWrapper {
3440 pub v: Vec<u8>,
3441}
3442
3443impl fidl::Persistable for VectorWrapper {}
3444
3445#[derive(Clone, Debug, PartialEq)]
3446pub struct XUnionWithStructStruct {
3447 pub xu: XUnionWithStruct,
3448}
3449
3450impl fidl::Persistable for XUnionWithStructStruct {}
3451
3452#[derive(Clone, Debug, PartialEq)]
3453pub struct XUnionWithXUnionStruct {
3454 pub xu: XUnionWithXUnion,
3455}
3456
3457impl fidl::Persistable for XUnionWithXUnionStruct {}
3458
3459#[derive(Clone, Debug, Default, PartialEq)]
3460pub struct CompatTableString {
3461 pub s: Option<String>,
3462 #[doc(hidden)]
3463 pub __source_breaking: fidl::marker::SourceBreaking,
3464}
3465
3466impl fidl::Persistable for CompatTableString {}
3467
3468#[derive(Clone, Debug, Default, PartialEq)]
3469pub struct CompatTableValue {
3470 pub union_member: Option<CompatUnion>,
3471 pub array_member: Option<[u32; 3]>,
3472 pub table_member: Option<CompatTableString>,
3473 pub xunion_member: Option<CompatXUnion>,
3474 #[doc(hidden)]
3475 pub __source_breaking: fidl::marker::SourceBreaking,
3476}
3477
3478impl fidl::Persistable for CompatTableValue {}
3479
3480#[derive(Clone, Debug, Default, PartialEq)]
3481pub struct EmptyTable {
3482 #[doc(hidden)]
3483 pub __source_breaking: fidl::marker::SourceBreaking,
3484}
3485
3486impl fidl::Persistable for EmptyTable {}
3487
3488#[derive(Clone, Debug, Default, PartialEq)]
3489pub struct FidlvizTable {
3490 pub f1: Option<bool>,
3491 pub f3: Option<bool>,
3492 #[doc(hidden)]
3493 pub __source_breaking: fidl::marker::SourceBreaking,
3494}
3495
3496impl fidl::Persistable for FidlvizTable {}
3497
3498#[derive(Clone, Debug, Default, PartialEq)]
3499pub struct GoldenTable {
3500 pub v: Option<i16>,
3501 #[doc(hidden)]
3502 pub __source_breaking: fidl::marker::SourceBreaking,
3503}
3504
3505impl fidl::Persistable for GoldenTable {}
3506
3507#[derive(Clone, Debug, Default, PartialEq)]
3508pub struct PaddedTable {
3509 pub field: Option<i8>,
3510 #[doc(hidden)]
3511 pub __source_breaking: fidl::marker::SourceBreaking,
3512}
3513
3514impl fidl::Persistable for PaddedTable {}
3515
3516#[derive(Clone, Debug, Default, PartialEq)]
3517pub struct RecursiveOptionalAndTable {
3518 pub recursive_optional: Option<RecursiveOptionalStruct>,
3519 #[doc(hidden)]
3520 pub __source_breaking: fidl::marker::SourceBreaking,
3521}
3522
3523impl fidl::Persistable for RecursiveOptionalAndTable {}
3524
3525#[derive(Clone, Debug, Default, PartialEq)]
3526pub struct RecursiveTable {
3527 pub s: Option<RecursiveTableOptionalHolder>,
3528 #[doc(hidden)]
3529 pub __source_breaking: fidl::marker::SourceBreaking,
3530}
3531
3532impl fidl::Persistable for RecursiveTable {}
3533
3534#[derive(Clone, Debug, Default, PartialEq)]
3535pub struct Regression10TableV1 {
3536 pub member1: Option<u64>,
3537 #[doc(hidden)]
3538 pub __source_breaking: fidl::marker::SourceBreaking,
3539}
3540
3541impl fidl::Persistable for Regression10TableV1 {}
3542
3543#[derive(Clone, Debug, Default, PartialEq)]
3544pub struct Regression10TableV2 {
3545 pub member1: Option<u64>,
3546 pub member2: Option<u64>,
3547 #[doc(hidden)]
3548 pub __source_breaking: fidl::marker::SourceBreaking,
3549}
3550
3551impl fidl::Persistable for Regression10TableV2 {}
3552
3553#[derive(Clone, Debug, Default, PartialEq)]
3554pub struct Regression10TableV3 {
3555 pub x: Option<i64>,
3556 pub y: Option<i64>,
3557 pub z: Option<i64>,
3558 #[doc(hidden)]
3559 pub __source_breaking: fidl::marker::SourceBreaking,
3560}
3561
3562impl fidl::Persistable for Regression10TableV3 {}
3563
3564#[derive(Clone, Debug, Default, PartialEq)]
3565pub struct ReverseOrdinalTable {
3566 pub z: Option<i64>,
3567 pub y: Option<i64>,
3568 pub x: Option<i64>,
3569 #[doc(hidden)]
3570 pub __source_breaking: fidl::marker::SourceBreaking,
3571}
3572
3573impl fidl::Persistable for ReverseOrdinalTable {}
3574
3575#[derive(Clone, Debug, Default, PartialEq)]
3576pub struct SimpleTable {
3577 pub x: Option<i64>,
3578 pub y: Option<i64>,
3579 #[doc(hidden)]
3580 pub __source_breaking: fidl::marker::SourceBreaking,
3581}
3582
3583impl fidl::Persistable for SimpleTable {}
3584
3585#[derive(Clone, Debug, Default, PartialEq)]
3586pub struct TableFieldInlined {
3587 pub f: Option<i32>,
3588 #[doc(hidden)]
3589 pub __source_breaking: fidl::marker::SourceBreaking,
3590}
3591
3592impl fidl::Persistable for TableFieldInlined {}
3593
3594#[derive(Clone, Debug, Default, PartialEq)]
3595pub struct TableFieldOutOfLine {
3596 pub f: Option<i64>,
3597 #[doc(hidden)]
3598 pub __source_breaking: fidl::marker::SourceBreaking,
3599}
3600
3601impl fidl::Persistable for TableFieldOutOfLine {}
3602
3603#[derive(Clone, Debug, Default, PartialEq)]
3604pub struct TableFieldUnknown {
3605 #[doc(hidden)]
3606 pub __source_breaking: fidl::marker::SourceBreaking,
3607}
3608
3609impl fidl::Persistable for TableFieldUnknown {}
3610
3611#[derive(Clone, Debug, Default, PartialEq)]
3612pub struct TableFieldUnsetFlexibleEnumInlined {
3613 pub signed_enum: Option<SignedEnum>,
3614 pub unsigned_enum: Option<UnsignedEnum>,
3615 pub always_set: Option<bool>,
3616 #[doc(hidden)]
3617 pub __source_breaking: fidl::marker::SourceBreaking,
3618}
3619
3620impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlined {}
3621
3622#[derive(Clone, Debug, Default, PartialEq)]
3623pub struct TableNoFields {
3624 #[doc(hidden)]
3625 pub __source_breaking: fidl::marker::SourceBreaking,
3626}
3627
3628impl fidl::Persistable for TableNoFields {}
3629
3630#[derive(Clone, Debug, Default, PartialEq)]
3631pub struct TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
3632 pub member: Option<UnionOfXUnionThenTableThenXUnionThenUnion>,
3633 #[doc(hidden)]
3634 pub __source_breaking: fidl::marker::SourceBreaking,
3635}
3636
3637impl fidl::Persistable for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {}
3638
3639#[derive(Clone, Debug, Default, PartialEq)]
3640pub struct TableOfXUnionThenUnion {
3641 pub member: Option<XUnionOfUnion>,
3642 #[doc(hidden)]
3643 pub __source_breaking: fidl::marker::SourceBreaking,
3644}
3645
3646impl fidl::Persistable for TableOfXUnionThenUnion {}
3647
3648#[derive(Clone, Debug, Default, PartialEq)]
3649pub struct TableStructWithReservedSandwich {
3650 pub s1: Option<StructSize3Align1>,
3651 pub s2: Option<StructSize3Align1>,
3652 #[doc(hidden)]
3653 pub __source_breaking: fidl::marker::SourceBreaking,
3654}
3655
3656impl fidl::Persistable for TableStructWithReservedSandwich {}
3657
3658#[derive(Clone, Debug, Default, PartialEq)]
3659pub struct TableStructWithUint32Sandwich {
3660 pub i: Option<u32>,
3661 pub s1: Option<StructSize3Align1>,
3662 pub s2: Option<StructSize3Align1>,
3663 pub i2: Option<u32>,
3664 #[doc(hidden)]
3665 pub __source_breaking: fidl::marker::SourceBreaking,
3666}
3667
3668impl fidl::Persistable for TableStructWithUint32Sandwich {}
3669
3670#[derive(Clone, Debug, Default, PartialEq)]
3671pub struct TableWithEmptyStruct {
3672 pub s: Option<EmptyStruct>,
3673 #[doc(hidden)]
3674 pub __source_breaking: fidl::marker::SourceBreaking,
3675}
3676
3677impl fidl::Persistable for TableWithEmptyStruct {}
3678
3679#[derive(Clone, Debug, Default, PartialEq)]
3680pub struct TableWithGaps {
3681 pub second: Option<i32>,
3682 pub fourth: Option<i32>,
3683 #[doc(hidden)]
3684 pub __source_breaking: fidl::marker::SourceBreaking,
3685}
3686
3687impl fidl::Persistable for TableWithGaps {}
3688
3689#[derive(Clone, Debug, Default, PartialEq)]
3690pub struct TableWithReservedFieldThenUnion {
3691 pub uv: Option<UnionSize8Align4>,
3692 #[doc(hidden)]
3693 pub __source_breaking: fidl::marker::SourceBreaking,
3694}
3695
3696impl fidl::Persistable for TableWithReservedFieldThenUnion {}
3697
3698#[derive(Clone, Debug, Default, PartialEq)]
3699pub struct TableWithStringAndVector {
3700 pub foo: Option<String>,
3701 pub bar: Option<i32>,
3702 pub baz: Option<Vec<u8>>,
3703 #[doc(hidden)]
3704 pub __source_breaking: fidl::marker::SourceBreaking,
3705}
3706
3707impl fidl::Persistable for TableWithStringAndVector {}
3708
3709#[derive(Clone, Debug, Default, PartialEq)]
3710pub struct TableWithUnionSize12Align4 {
3711 pub before: Option<u8>,
3712 pub member: Option<UnionSize12Align4>,
3713 pub after: Option<u8>,
3714 #[doc(hidden)]
3715 pub __source_breaking: fidl::marker::SourceBreaking,
3716}
3717
3718impl fidl::Persistable for TableWithUnionSize12Align4 {}
3719
3720#[derive(Clone, Debug, Default, PartialEq)]
3721pub struct TableWithXUnion {
3722 pub member: Option<CompatXUnion>,
3723 #[doc(hidden)]
3724 pub __source_breaking: fidl::marker::SourceBreaking,
3725}
3726
3727impl fidl::Persistable for TableWithXUnion {}
3728
3729#[derive(Clone, Debug, Default, PartialEq)]
3730pub struct TransformerSimpleTable {
3731 pub value: Option<u32>,
3732 #[doc(hidden)]
3733 pub __source_breaking: fidl::marker::SourceBreaking,
3734}
3735
3736impl fidl::Persistable for TransformerSimpleTable {}
3737
3738#[derive(Clone, Debug, Default, PartialEq)]
3739pub struct XUnionInTable {
3740 pub before: Option<String>,
3741 pub xu: Option<SampleXUnion>,
3742 pub after: Option<String>,
3743 #[doc(hidden)]
3744 pub __source_breaking: fidl::marker::SourceBreaking,
3745}
3746
3747impl fidl::Persistable for XUnionInTable {}
3748
3749#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3750pub enum CompatUnion {
3751 S(String),
3752 B(bool),
3753}
3754
3755impl CompatUnion {
3756 #[inline]
3757 pub fn ordinal(&self) -> u64 {
3758 match *self {
3759 Self::S(_) => 1,
3760 Self::B(_) => 2,
3761 }
3762 }
3763}
3764
3765impl fidl::Persistable for CompatUnion {}
3766
3767#[derive(Clone, Debug)]
3768pub enum CompatXUnion {
3769 S(String),
3770 B(bool),
3771 #[doc(hidden)]
3772 __SourceBreaking {
3773 unknown_ordinal: u64,
3774 },
3775}
3776
3777#[macro_export]
3779macro_rules! CompatXUnionUnknown {
3780 () => {
3781 _
3782 };
3783}
3784
3785impl PartialEq for CompatXUnion {
3787 fn eq(&self, other: &Self) -> bool {
3788 match (self, other) {
3789 (Self::S(x), Self::S(y)) => *x == *y,
3790 (Self::B(x), Self::B(y)) => *x == *y,
3791 _ => false,
3792 }
3793 }
3794}
3795
3796impl CompatXUnion {
3797 #[inline]
3798 pub fn ordinal(&self) -> u64 {
3799 match *self {
3800 Self::S(_) => 1,
3801 Self::B(_) => 2,
3802 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3803 }
3804 }
3805
3806 #[inline]
3807 pub fn unknown_variant_for_testing() -> Self {
3808 Self::__SourceBreaking { unknown_ordinal: 0 }
3809 }
3810
3811 #[inline]
3812 pub fn is_unknown(&self) -> bool {
3813 match self {
3814 Self::__SourceBreaking { .. } => true,
3815 _ => false,
3816 }
3817 }
3818}
3819
3820impl fidl::Persistable for CompatXUnion {}
3821
3822#[derive(Clone, Debug)]
3823pub enum EmptyFlexibleUnion {
3824 #[doc(hidden)]
3825 __SourceBreaking { unknown_ordinal: u64 },
3826}
3827
3828#[macro_export]
3830macro_rules! EmptyFlexibleUnionUnknown {
3831 () => {
3832 _
3833 };
3834}
3835
3836impl PartialEq for EmptyFlexibleUnion {
3838 fn eq(&self, other: &Self) -> bool {
3839 match (self, other) {
3840 _ => false,
3841 }
3842 }
3843}
3844
3845impl EmptyFlexibleUnion {
3846 #[inline]
3847 pub fn ordinal(&self) -> u64 {
3848 match *self {
3849 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3850 }
3851 }
3852
3853 #[inline]
3854 pub fn unknown_variant_for_testing() -> Self {
3855 Self::__SourceBreaking { unknown_ordinal: 0 }
3856 }
3857
3858 #[inline]
3859 pub fn is_unknown(&self) -> bool {
3860 match self {
3861 Self::__SourceBreaking { .. } => true,
3862 }
3863 }
3864}
3865
3866impl fidl::Persistable for EmptyFlexibleUnion {}
3867
3868#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3869pub enum EmptyStructUnion {
3870 Unused(u8),
3871 Es(TransformerEmptyStruct),
3872}
3873
3874impl EmptyStructUnion {
3875 #[inline]
3876 pub fn ordinal(&self) -> u64 {
3877 match *self {
3878 Self::Unused(_) => 1,
3879 Self::Es(_) => 2,
3880 }
3881 }
3882}
3883
3884impl fidl::Persistable for EmptyStructUnion {}
3885
3886#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3887pub enum FidlvizUnion {
3888 F7(String),
3889}
3890
3891impl FidlvizUnion {
3892 #[inline]
3893 pub fn ordinal(&self) -> u64 {
3894 match *self {
3895 Self::F7(_) => 7,
3896 }
3897 }
3898}
3899
3900impl fidl::Persistable for FidlvizUnion {}
3901
3902#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3903pub enum GoldenUnion {
3904 V(i16),
3905}
3906
3907impl GoldenUnion {
3908 #[inline]
3909 pub fn ordinal(&self) -> u64 {
3910 match *self {
3911 Self::V(_) => 1,
3912 }
3913 }
3914}
3915
3916impl fidl::Persistable for GoldenUnion {}
3917
3918#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3919pub enum IpAddressConfig {
3920 PaddingSize24Align4([u32; 6]),
3921 Dhcp(bool),
3922}
3923
3924impl IpAddressConfig {
3925 #[inline]
3926 pub fn ordinal(&self) -> u64 {
3927 match *self {
3928 Self::PaddingSize24Align4(_) => 1,
3929 Self::Dhcp(_) => 2,
3930 }
3931 }
3932}
3933
3934impl fidl::Persistable for IpAddressConfig {}
3935
3936#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3937pub enum MutualRecursionUnion {
3938 S(MutualRecursionUnionStruct),
3939}
3940
3941impl MutualRecursionUnion {
3942 #[inline]
3943 pub fn ordinal(&self) -> u64 {
3944 match *self {
3945 Self::S(_) => 1,
3946 }
3947 }
3948}
3949
3950impl fidl::Persistable for MutualRecursionUnion {}
3951
3952#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3953pub enum PaddedUnion {
3954 Field(i8),
3955}
3956
3957impl PaddedUnion {
3958 #[inline]
3959 pub fn ordinal(&self) -> u64 {
3960 match *self {
3961 Self::Field(_) => 1,
3962 }
3963 }
3964}
3965
3966impl fidl::Persistable for PaddedUnion {}
3967
3968#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3969pub enum RecursiveOptionalAndUnion {
3970 RecursiveOptional(RecursiveOptionalStruct),
3971}
3972
3973impl RecursiveOptionalAndUnion {
3974 #[inline]
3975 pub fn ordinal(&self) -> u64 {
3976 match *self {
3977 Self::RecursiveOptional(_) => 1,
3978 }
3979 }
3980}
3981
3982impl fidl::Persistable for RecursiveOptionalAndUnion {}
3983
3984#[derive(Clone, Debug)]
3985pub enum RecursiveUnion {
3986 S(RecursiveUnionStruct),
3987 #[doc(hidden)]
3988 __SourceBreaking {
3989 unknown_ordinal: u64,
3990 },
3991}
3992
3993#[macro_export]
3995macro_rules! RecursiveUnionUnknown {
3996 () => {
3997 _
3998 };
3999}
4000
4001impl PartialEq for RecursiveUnion {
4003 fn eq(&self, other: &Self) -> bool {
4004 match (self, other) {
4005 (Self::S(x), Self::S(y)) => *x == *y,
4006 _ => false,
4007 }
4008 }
4009}
4010
4011impl RecursiveUnion {
4012 #[inline]
4013 pub fn ordinal(&self) -> u64 {
4014 match *self {
4015 Self::S(_) => 1,
4016 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4017 }
4018 }
4019
4020 #[inline]
4021 pub fn unknown_variant_for_testing() -> Self {
4022 Self::__SourceBreaking { unknown_ordinal: 0 }
4023 }
4024
4025 #[inline]
4026 pub fn is_unknown(&self) -> bool {
4027 match self {
4028 Self::__SourceBreaking { .. } => true,
4029 _ => false,
4030 }
4031 }
4032}
4033
4034impl fidl::Persistable for RecursiveUnion {}
4035
4036#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4037pub enum RecursiveVectorUnion {
4038 Vec(Vec<Option<Box<RecursiveVectorUnion>>>),
4039}
4040
4041impl RecursiveVectorUnion {
4042 #[inline]
4043 pub fn ordinal(&self) -> u64 {
4044 match *self {
4045 Self::Vec(_) => 1,
4046 }
4047 }
4048}
4049
4050impl fidl::Persistable for RecursiveVectorUnion {}
4051
4052#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4053pub enum Regression9Result {
4054 Ok(Regression9Value),
4055 Error(u32),
4056}
4057
4058impl Regression9Result {
4059 #[inline]
4060 pub fn ordinal(&self) -> u64 {
4061 match *self {
4062 Self::Ok(_) => 1,
4063 Self::Error(_) => 2,
4064 }
4065 }
4066}
4067
4068impl fidl::Persistable for Regression9Result {}
4069
4070#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4071pub enum ReverseOrdinalUnion {
4072 Z(u32),
4073 Y(bool),
4074 X(i64),
4075}
4076
4077impl ReverseOrdinalUnion {
4078 #[inline]
4079 pub fn ordinal(&self) -> u64 {
4080 match *self {
4081 Self::Z(_) => 1,
4082 Self::Y(_) => 2,
4083 Self::X(_) => 4,
4084 }
4085 }
4086}
4087
4088impl fidl::Persistable for ReverseOrdinalUnion {}
4089
4090#[derive(Clone, Debug, PartialEq)]
4091pub enum SampleStrictXUnion {
4092 U(u32),
4093 Su(SimpleUnion),
4094 St(SimpleTable),
4095}
4096
4097impl SampleStrictXUnion {
4098 #[inline]
4099 pub fn ordinal(&self) -> u64 {
4100 match *self {
4101 Self::U(_) => 1,
4102 Self::Su(_) => 2,
4103 Self::St(_) => 3,
4104 }
4105 }
4106}
4107
4108impl fidl::Persistable for SampleStrictXUnion {}
4109
4110#[derive(Clone, Debug)]
4111pub enum SampleXUnion {
4112 U(u32),
4113 Su(SimpleUnion),
4114 St(SimpleTable),
4115 #[doc(hidden)]
4116 __SourceBreaking {
4117 unknown_ordinal: u64,
4118 },
4119}
4120
4121#[macro_export]
4123macro_rules! SampleXUnionUnknown {
4124 () => {
4125 _
4126 };
4127}
4128
4129impl PartialEq for SampleXUnion {
4131 fn eq(&self, other: &Self) -> bool {
4132 match (self, other) {
4133 (Self::U(x), Self::U(y)) => *x == *y,
4134 (Self::Su(x), Self::Su(y)) => *x == *y,
4135 (Self::St(x), Self::St(y)) => *x == *y,
4136 _ => false,
4137 }
4138 }
4139}
4140
4141impl SampleXUnion {
4142 #[inline]
4143 pub fn ordinal(&self) -> u64 {
4144 match *self {
4145 Self::U(_) => 1,
4146 Self::Su(_) => 2,
4147 Self::St(_) => 3,
4148 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4149 }
4150 }
4151
4152 #[inline]
4153 pub fn unknown_variant_for_testing() -> Self {
4154 Self::__SourceBreaking { unknown_ordinal: 0 }
4155 }
4156
4157 #[inline]
4158 pub fn is_unknown(&self) -> bool {
4159 match self {
4160 Self::__SourceBreaking { .. } => true,
4161 _ => false,
4162 }
4163 }
4164}
4165
4166impl fidl::Persistable for SampleXUnion {}
4167
4168#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4169pub enum SimpleUnion {
4170 I32(i32),
4171 I64(i64),
4172 S(Int64Struct),
4173 Str(String),
4174}
4175
4176impl SimpleUnion {
4177 #[inline]
4178 pub fn ordinal(&self) -> u64 {
4179 match *self {
4180 Self::I32(_) => 1,
4181 Self::I64(_) => 2,
4182 Self::S(_) => 3,
4183 Self::Str(_) => 4,
4184 }
4185 }
4186}
4187
4188impl fidl::Persistable for SimpleUnion {}
4189
4190#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4191pub enum SingleVariantUnion {
4192 X(u32),
4193}
4194
4195impl SingleVariantUnion {
4196 #[inline]
4197 pub fn ordinal(&self) -> u64 {
4198 match *self {
4199 Self::X(_) => 1,
4200 }
4201 }
4202}
4203
4204impl fidl::Persistable for SingleVariantUnion {}
4205
4206#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4207pub enum StringBoolUnion {
4208 S(String),
4209 B(bool),
4210}
4211
4212impl StringBoolUnion {
4213 #[inline]
4214 pub fn ordinal(&self) -> u64 {
4215 match *self {
4216 Self::S(_) => 1,
4217 Self::B(_) => 2,
4218 }
4219 }
4220}
4221
4222impl fidl::Persistable for StringBoolUnion {}
4223
4224#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4225pub enum StringUnion {
4226 Unused(u8),
4227 S(String),
4228 U8(u8),
4229}
4230
4231impl StringUnion {
4232 #[inline]
4233 pub fn ordinal(&self) -> u64 {
4234 match *self {
4235 Self::Unused(_) => 1,
4236 Self::S(_) => 2,
4237 Self::U8(_) => 3,
4238 }
4239 }
4240}
4241
4242impl fidl::Persistable for StringUnion {}
4243
4244#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4245pub enum Uint8Union {
4246 Uint8Value(u8),
4247 EmptyStruct(EmptyStruct),
4248}
4249
4250impl Uint8Union {
4251 #[inline]
4252 pub fn ordinal(&self) -> u64 {
4253 match *self {
4254 Self::Uint8Value(_) => 1,
4255 Self::EmptyStruct(_) => 2,
4256 }
4257 }
4258}
4259
4260impl fidl::Persistable for Uint8Union {}
4261
4262#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4263pub enum UnionAtTheBottom {
4264 Unused1(u8),
4265 Unused2(u8),
4266 Tiny(u8),
4267}
4268
4269impl UnionAtTheBottom {
4270 #[inline]
4271 pub fn ordinal(&self) -> u64 {
4272 match *self {
4273 Self::Unused1(_) => 1,
4274 Self::Unused2(_) => 2,
4275 Self::Tiny(_) => 3,
4276 }
4277 }
4278}
4279
4280impl fidl::Persistable for UnionAtTheBottom {}
4281
4282#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4283pub enum UnionInlinePadding {
4284 ThreePaddingBytes(u8),
4285 TwoPaddingBytes(u16),
4286 OnePaddingByte([u8; 3]),
4287}
4288
4289impl UnionInlinePadding {
4290 #[inline]
4291 pub fn ordinal(&self) -> u64 {
4292 match *self {
4293 Self::ThreePaddingBytes(_) => 1,
4294 Self::TwoPaddingBytes(_) => 2,
4295 Self::OnePaddingByte(_) => 3,
4296 }
4297 }
4298}
4299
4300impl fidl::Persistable for UnionInlinePadding {}
4301
4302#[derive(Clone, Debug, PartialEq)]
4303pub enum UnionOfTable {
4304 T(SimpleTable),
4305}
4306
4307impl UnionOfTable {
4308 #[inline]
4309 pub fn ordinal(&self) -> u64 {
4310 match *self {
4311 Self::T(_) => 1,
4312 }
4313 }
4314}
4315
4316impl fidl::Persistable for UnionOfTable {}
4317
4318#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4319pub enum UnionOfUnion {
4320 Unused1(u8),
4321 Size8align4(UnionSize8Align4),
4322 Size12align4(UnionSize12Align4),
4323 Unused2(u8),
4324 Size24align8(UnionSize24Align8),
4325}
4326
4327impl UnionOfUnion {
4328 #[inline]
4329 pub fn ordinal(&self) -> u64 {
4330 match *self {
4331 Self::Unused1(_) => 1,
4332 Self::Size8align4(_) => 2,
4333 Self::Size12align4(_) => 3,
4334 Self::Unused2(_) => 4,
4335 Self::Size24align8(_) => 5,
4336 }
4337 }
4338}
4339
4340impl fidl::Persistable for UnionOfUnion {}
4341
4342#[derive(Clone, Debug, PartialEq)]
4343pub enum UnionOfXUnionThenTableThenXUnionThenUnion {
4344 Unused1(u8),
4345 Variant(XUnionOfTableThenXUnionThenUnion),
4346}
4347
4348impl UnionOfXUnionThenTableThenXUnionThenUnion {
4349 #[inline]
4350 pub fn ordinal(&self) -> u64 {
4351 match *self {
4352 Self::Unused1(_) => 1,
4353 Self::Variant(_) => 3,
4354 }
4355 }
4356}
4357
4358impl fidl::Persistable for UnionOfXUnionThenTableThenXUnionThenUnion {}
4359
4360#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4361pub enum UnionSize12Align4 {
4362 Unused1(u8),
4363 Unused2(u8),
4364 Unused3(u8),
4365 Variant([u8; 6]),
4366}
4367
4368impl UnionSize12Align4 {
4369 #[inline]
4370 pub fn ordinal(&self) -> u64 {
4371 match *self {
4372 Self::Unused1(_) => 1,
4373 Self::Unused2(_) => 2,
4374 Self::Unused3(_) => 3,
4375 Self::Variant(_) => 4,
4376 }
4377 }
4378}
4379
4380impl fidl::Persistable for UnionSize12Align4 {}
4381
4382#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4383pub enum UnionSize24Align8 {
4384 Unused1(u8),
4385 Unused2(u8),
4386 Unused3(u8),
4387 Variant(StructSize16Align8),
4388}
4389
4390impl UnionSize24Align8 {
4391 #[inline]
4392 pub fn ordinal(&self) -> u64 {
4393 match *self {
4394 Self::Unused1(_) => 1,
4395 Self::Unused2(_) => 2,
4396 Self::Unused3(_) => 3,
4397 Self::Variant(_) => 4,
4398 }
4399 }
4400}
4401
4402impl fidl::Persistable for UnionSize24Align8 {}
4403
4404#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4405pub enum UnionSize36Align4 {
4406 Unused1(u8),
4407 Unused2(u8),
4408 Unused3(u8),
4409 Variant([u8; 32]),
4410}
4411
4412impl UnionSize36Align4 {
4413 #[inline]
4414 pub fn ordinal(&self) -> u64 {
4415 match *self {
4416 Self::Unused1(_) => 1,
4417 Self::Unused2(_) => 2,
4418 Self::Unused3(_) => 3,
4419 Self::Variant(_) => 4,
4420 }
4421 }
4422}
4423
4424impl fidl::Persistable for UnionSize36Align4 {}
4425
4426#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4427pub enum UnionSize8Align4 {
4428 Unused1(u8),
4429 Unused2(u8),
4430 Variant(u32),
4431}
4432
4433impl UnionSize8Align4 {
4434 #[inline]
4435 pub fn ordinal(&self) -> u64 {
4436 match *self {
4437 Self::Unused1(_) => 1,
4438 Self::Unused2(_) => 2,
4439 Self::Variant(_) => 3,
4440 }
4441 }
4442}
4443
4444impl fidl::Persistable for UnionSize8Align4 {}
4445
4446#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4447pub enum UnionWithBoundString {
4448 BoundFiveStr(String),
4449}
4450
4451impl UnionWithBoundString {
4452 #[inline]
4453 pub fn ordinal(&self) -> u64 {
4454 match *self {
4455 Self::BoundFiveStr(_) => 1,
4456 }
4457 }
4458}
4459
4460impl fidl::Persistable for UnionWithBoundString {}
4461
4462#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4463pub enum UnionWithEmptyStruct {
4464 S(EmptyStruct),
4465 ForceAlignmentOf8(u64),
4466}
4467
4468impl UnionWithEmptyStruct {
4469 #[inline]
4470 pub fn ordinal(&self) -> u64 {
4471 match *self {
4472 Self::S(_) => 1,
4473 Self::ForceAlignmentOf8(_) => 2,
4474 }
4475 }
4476}
4477
4478impl fidl::Persistable for UnionWithEmptyStruct {}
4479
4480#[derive(Clone, Debug, PartialEq)]
4481pub enum UnionWithRegression10Table {
4482 Unused(u8),
4483 AtV2(Regression10TableV2),
4484}
4485
4486impl UnionWithRegression10Table {
4487 #[inline]
4488 pub fn ordinal(&self) -> u64 {
4489 match *self {
4490 Self::Unused(_) => 1,
4491 Self::AtV2(_) => 3,
4492 }
4493 }
4494}
4495
4496impl fidl::Persistable for UnionWithRegression10Table {}
4497
4498#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4499pub enum UnionWithVectorOfVectors {
4500 V(Vec<Vec<Option<Box<StructSize3Align1>>>>),
4501}
4502
4503impl UnionWithVectorOfVectors {
4504 #[inline]
4505 pub fn ordinal(&self) -> u64 {
4506 match *self {
4507 Self::V(_) => 1,
4508 }
4509 }
4510}
4511
4512impl fidl::Persistable for UnionWithVectorOfVectors {}
4513
4514#[derive(Clone, Debug)]
4515pub enum XUnionOfTableThenXUnionThenUnion {
4516 Variant(TableOfXUnionThenUnion),
4517 #[doc(hidden)]
4518 __SourceBreaking {
4519 unknown_ordinal: u64,
4520 },
4521}
4522
4523#[macro_export]
4525macro_rules! XUnionOfTableThenXUnionThenUnionUnknown {
4526 () => {
4527 _
4528 };
4529}
4530
4531impl PartialEq for XUnionOfTableThenXUnionThenUnion {
4533 fn eq(&self, other: &Self) -> bool {
4534 match (self, other) {
4535 (Self::Variant(x), Self::Variant(y)) => *x == *y,
4536 _ => false,
4537 }
4538 }
4539}
4540
4541impl XUnionOfTableThenXUnionThenUnion {
4542 #[inline]
4543 pub fn ordinal(&self) -> u64 {
4544 match *self {
4545 Self::Variant(_) => 1,
4546 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4547 }
4548 }
4549
4550 #[inline]
4551 pub fn unknown_variant_for_testing() -> Self {
4552 Self::__SourceBreaking { unknown_ordinal: 0 }
4553 }
4554
4555 #[inline]
4556 pub fn is_unknown(&self) -> bool {
4557 match self {
4558 Self::__SourceBreaking { .. } => true,
4559 _ => false,
4560 }
4561 }
4562}
4563
4564impl fidl::Persistable for XUnionOfTableThenXUnionThenUnion {}
4565
4566#[derive(Clone, Debug)]
4567pub enum XUnionOfUnion {
4568 Variant(UnionAtTheBottom),
4569 #[doc(hidden)]
4570 __SourceBreaking {
4571 unknown_ordinal: u64,
4572 },
4573}
4574
4575#[macro_export]
4577macro_rules! XUnionOfUnionUnknown {
4578 () => {
4579 _
4580 };
4581}
4582
4583impl PartialEq for XUnionOfUnion {
4585 fn eq(&self, other: &Self) -> bool {
4586 match (self, other) {
4587 (Self::Variant(x), Self::Variant(y)) => *x == *y,
4588 _ => false,
4589 }
4590 }
4591}
4592
4593impl XUnionOfUnion {
4594 #[inline]
4595 pub fn ordinal(&self) -> u64 {
4596 match *self {
4597 Self::Variant(_) => 1,
4598 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4599 }
4600 }
4601
4602 #[inline]
4603 pub fn unknown_variant_for_testing() -> Self {
4604 Self::__SourceBreaking { unknown_ordinal: 0 }
4605 }
4606
4607 #[inline]
4608 pub fn is_unknown(&self) -> bool {
4609 match self {
4610 Self::__SourceBreaking { .. } => true,
4611 _ => false,
4612 }
4613 }
4614}
4615
4616impl fidl::Persistable for XUnionOfUnion {}
4617
4618#[derive(Clone, Debug)]
4619pub enum XUnionWithEmptyStruct {
4620 S(EmptyStruct),
4621 #[doc(hidden)]
4622 __SourceBreaking {
4623 unknown_ordinal: u64,
4624 },
4625}
4626
4627#[macro_export]
4629macro_rules! XUnionWithEmptyStructUnknown {
4630 () => {
4631 _
4632 };
4633}
4634
4635impl PartialEq for XUnionWithEmptyStruct {
4637 fn eq(&self, other: &Self) -> bool {
4638 match (self, other) {
4639 (Self::S(x), Self::S(y)) => *x == *y,
4640 _ => false,
4641 }
4642 }
4643}
4644
4645impl XUnionWithEmptyStruct {
4646 #[inline]
4647 pub fn ordinal(&self) -> u64 {
4648 match *self {
4649 Self::S(_) => 1,
4650 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4651 }
4652 }
4653
4654 #[inline]
4655 pub fn unknown_variant_for_testing() -> Self {
4656 Self::__SourceBreaking { unknown_ordinal: 0 }
4657 }
4658
4659 #[inline]
4660 pub fn is_unknown(&self) -> bool {
4661 match self {
4662 Self::__SourceBreaking { .. } => true,
4663 _ => false,
4664 }
4665 }
4666}
4667
4668impl fidl::Persistable for XUnionWithEmptyStruct {}
4669
4670#[derive(Clone, Debug)]
4671pub enum XUnionWithStruct {
4672 S(StructSize3Align1),
4673 #[doc(hidden)]
4674 __SourceBreaking {
4675 unknown_ordinal: u64,
4676 },
4677}
4678
4679#[macro_export]
4681macro_rules! XUnionWithStructUnknown {
4682 () => {
4683 _
4684 };
4685}
4686
4687impl PartialEq for XUnionWithStruct {
4689 fn eq(&self, other: &Self) -> bool {
4690 match (self, other) {
4691 (Self::S(x), Self::S(y)) => *x == *y,
4692 _ => false,
4693 }
4694 }
4695}
4696
4697impl XUnionWithStruct {
4698 #[inline]
4699 pub fn ordinal(&self) -> u64 {
4700 match *self {
4701 Self::S(_) => 1,
4702 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4703 }
4704 }
4705
4706 #[inline]
4707 pub fn unknown_variant_for_testing() -> Self {
4708 Self::__SourceBreaking { unknown_ordinal: 0 }
4709 }
4710
4711 #[inline]
4712 pub fn is_unknown(&self) -> bool {
4713 match self {
4714 Self::__SourceBreaking { .. } => true,
4715 _ => false,
4716 }
4717 }
4718}
4719
4720impl fidl::Persistable for XUnionWithStruct {}
4721
4722#[derive(Clone, Debug)]
4723pub enum XUnionWithUnions {
4724 U1(UnionSize8Align4),
4725 U2(UnionSize12Align4),
4726 #[doc(hidden)]
4727 __SourceBreaking {
4728 unknown_ordinal: u64,
4729 },
4730}
4731
4732#[macro_export]
4734macro_rules! XUnionWithUnionsUnknown {
4735 () => {
4736 _
4737 };
4738}
4739
4740impl PartialEq for XUnionWithUnions {
4742 fn eq(&self, other: &Self) -> bool {
4743 match (self, other) {
4744 (Self::U1(x), Self::U1(y)) => *x == *y,
4745 (Self::U2(x), Self::U2(y)) => *x == *y,
4746 _ => false,
4747 }
4748 }
4749}
4750
4751impl XUnionWithUnions {
4752 #[inline]
4753 pub fn ordinal(&self) -> u64 {
4754 match *self {
4755 Self::U1(_) => 1,
4756 Self::U2(_) => 2,
4757 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4758 }
4759 }
4760
4761 #[inline]
4762 pub fn unknown_variant_for_testing() -> Self {
4763 Self::__SourceBreaking { unknown_ordinal: 0 }
4764 }
4765
4766 #[inline]
4767 pub fn is_unknown(&self) -> bool {
4768 match self {
4769 Self::__SourceBreaking { .. } => true,
4770 _ => false,
4771 }
4772 }
4773}
4774
4775impl fidl::Persistable for XUnionWithUnions {}
4776
4777#[derive(Clone, Debug)]
4778pub enum XUnionWithXUnion {
4779 Xu(XUnionWithStruct),
4780 #[doc(hidden)]
4781 __SourceBreaking {
4782 unknown_ordinal: u64,
4783 },
4784}
4785
4786#[macro_export]
4788macro_rules! XUnionWithXUnionUnknown {
4789 () => {
4790 _
4791 };
4792}
4793
4794impl PartialEq for XUnionWithXUnion {
4796 fn eq(&self, other: &Self) -> bool {
4797 match (self, other) {
4798 (Self::Xu(x), Self::Xu(y)) => *x == *y,
4799 _ => false,
4800 }
4801 }
4802}
4803
4804impl XUnionWithXUnion {
4805 #[inline]
4806 pub fn ordinal(&self) -> u64 {
4807 match *self {
4808 Self::Xu(_) => 1,
4809 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4810 }
4811 }
4812
4813 #[inline]
4814 pub fn unknown_variant_for_testing() -> Self {
4815 Self::__SourceBreaking { unknown_ordinal: 0 }
4816 }
4817
4818 #[inline]
4819 pub fn is_unknown(&self) -> bool {
4820 match self {
4821 Self::__SourceBreaking { .. } => true,
4822 _ => false,
4823 }
4824 }
4825}
4826
4827impl fidl::Persistable for XUnionWithXUnion {}
4828
4829pub mod component_controller_ordinals {}
4830
4831pub mod protocol_ordinals {}
4832
4833mod internal {
4834 use super::*;
4835 unsafe impl fidl::encoding::TypeMarker for BitsUint32 {
4836 type Owned = Self;
4837
4838 #[inline(always)]
4839 fn inline_align(_context: fidl::encoding::Context) -> usize {
4840 4
4841 }
4842
4843 #[inline(always)]
4844 fn inline_size(_context: fidl::encoding::Context) -> usize {
4845 4
4846 }
4847 }
4848
4849 impl fidl::encoding::ValueTypeMarker for BitsUint32 {
4850 type Borrowed<'a> = Self;
4851 #[inline(always)]
4852 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4853 *value
4854 }
4855 }
4856
4857 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint32 {
4858 #[inline]
4859 unsafe fn encode(
4860 self,
4861 encoder: &mut fidl::encoding::Encoder<'_, D>,
4862 offset: usize,
4863 _depth: fidl::encoding::Depth,
4864 ) -> fidl::Result<()> {
4865 encoder.debug_check_bounds::<Self>(offset);
4866 if self.bits() & Self::all().bits() != self.bits() {
4867 return Err(fidl::Error::InvalidBitsValue);
4868 }
4869 encoder.write_num(self.bits(), offset);
4870 Ok(())
4871 }
4872 }
4873
4874 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint32 {
4875 #[inline(always)]
4876 fn new_empty() -> Self {
4877 Self::empty()
4878 }
4879
4880 #[inline]
4881 unsafe fn decode(
4882 &mut self,
4883 decoder: &mut fidl::encoding::Decoder<'_, D>,
4884 offset: usize,
4885 _depth: fidl::encoding::Depth,
4886 ) -> fidl::Result<()> {
4887 decoder.debug_check_bounds::<Self>(offset);
4888 let prim = decoder.read_num::<u32>(offset);
4889 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
4890 Ok(())
4891 }
4892 }
4893 unsafe impl fidl::encoding::TypeMarker for BitsUint8 {
4894 type Owned = Self;
4895
4896 #[inline(always)]
4897 fn inline_align(_context: fidl::encoding::Context) -> usize {
4898 1
4899 }
4900
4901 #[inline(always)]
4902 fn inline_size(_context: fidl::encoding::Context) -> usize {
4903 1
4904 }
4905 }
4906
4907 impl fidl::encoding::ValueTypeMarker for BitsUint8 {
4908 type Borrowed<'a> = Self;
4909 #[inline(always)]
4910 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4911 *value
4912 }
4913 }
4914
4915 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint8 {
4916 #[inline]
4917 unsafe fn encode(
4918 self,
4919 encoder: &mut fidl::encoding::Encoder<'_, D>,
4920 offset: usize,
4921 _depth: fidl::encoding::Depth,
4922 ) -> fidl::Result<()> {
4923 encoder.debug_check_bounds::<Self>(offset);
4924 if self.bits() & Self::all().bits() != self.bits() {
4925 return Err(fidl::Error::InvalidBitsValue);
4926 }
4927 encoder.write_num(self.bits(), offset);
4928 Ok(())
4929 }
4930 }
4931
4932 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint8 {
4933 #[inline(always)]
4934 fn new_empty() -> Self {
4935 Self::empty()
4936 }
4937
4938 #[inline]
4939 unsafe fn decode(
4940 &mut self,
4941 decoder: &mut fidl::encoding::Decoder<'_, D>,
4942 offset: usize,
4943 _depth: fidl::encoding::Depth,
4944 ) -> fidl::Result<()> {
4945 decoder.debug_check_bounds::<Self>(offset);
4946 let prim = decoder.read_num::<u8>(offset);
4947 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
4948 Ok(())
4949 }
4950 }
4951 unsafe impl fidl::encoding::TypeMarker for EmptyBits {
4952 type Owned = Self;
4953
4954 #[inline(always)]
4955 fn inline_align(_context: fidl::encoding::Context) -> usize {
4956 4
4957 }
4958
4959 #[inline(always)]
4960 fn inline_size(_context: fidl::encoding::Context) -> usize {
4961 4
4962 }
4963 }
4964
4965 impl fidl::encoding::ValueTypeMarker for EmptyBits {
4966 type Borrowed<'a> = Self;
4967 #[inline(always)]
4968 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4969 *value
4970 }
4971 }
4972
4973 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyBits {
4974 #[inline]
4975 unsafe fn encode(
4976 self,
4977 encoder: &mut fidl::encoding::Encoder<'_, D>,
4978 offset: usize,
4979 _depth: fidl::encoding::Depth,
4980 ) -> fidl::Result<()> {
4981 encoder.debug_check_bounds::<Self>(offset);
4982 encoder.write_num(self.bits(), offset);
4983 Ok(())
4984 }
4985 }
4986
4987 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBits {
4988 #[inline(always)]
4989 fn new_empty() -> Self {
4990 Self::empty()
4991 }
4992
4993 #[inline]
4994 unsafe fn decode(
4995 &mut self,
4996 decoder: &mut fidl::encoding::Decoder<'_, D>,
4997 offset: usize,
4998 _depth: fidl::encoding::Depth,
4999 ) -> fidl::Result<()> {
5000 decoder.debug_check_bounds::<Self>(offset);
5001 let prim = decoder.read_num::<u32>(offset);
5002 *self = Self::from_bits_allow_unknown(prim);
5003 Ok(())
5004 }
5005 }
5006 unsafe impl fidl::encoding::TypeMarker for FidlvizBits {
5007 type Owned = Self;
5008
5009 #[inline(always)]
5010 fn inline_align(_context: fidl::encoding::Context) -> usize {
5011 1
5012 }
5013
5014 #[inline(always)]
5015 fn inline_size(_context: fidl::encoding::Context) -> usize {
5016 1
5017 }
5018 }
5019
5020 impl fidl::encoding::ValueTypeMarker for FidlvizBits {
5021 type Borrowed<'a> = Self;
5022 #[inline(always)]
5023 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5024 *value
5025 }
5026 }
5027
5028 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizBits {
5029 #[inline]
5030 unsafe fn encode(
5031 self,
5032 encoder: &mut fidl::encoding::Encoder<'_, D>,
5033 offset: usize,
5034 _depth: fidl::encoding::Depth,
5035 ) -> fidl::Result<()> {
5036 encoder.debug_check_bounds::<Self>(offset);
5037 if self.bits() & Self::all().bits() != self.bits() {
5038 return Err(fidl::Error::InvalidBitsValue);
5039 }
5040 encoder.write_num(self.bits(), offset);
5041 Ok(())
5042 }
5043 }
5044
5045 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizBits {
5046 #[inline(always)]
5047 fn new_empty() -> Self {
5048 Self::empty()
5049 }
5050
5051 #[inline]
5052 unsafe fn decode(
5053 &mut self,
5054 decoder: &mut fidl::encoding::Decoder<'_, D>,
5055 offset: usize,
5056 _depth: fidl::encoding::Depth,
5057 ) -> fidl::Result<()> {
5058 decoder.debug_check_bounds::<Self>(offset);
5059 let prim = decoder.read_num::<u8>(offset);
5060 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5061 Ok(())
5062 }
5063 }
5064 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16 {
5065 type Owned = Self;
5066
5067 #[inline(always)]
5068 fn inline_align(_context: fidl::encoding::Context) -> usize {
5069 2
5070 }
5071
5072 #[inline(always)]
5073 fn inline_size(_context: fidl::encoding::Context) -> usize {
5074 2
5075 }
5076 }
5077
5078 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16 {
5079 type Borrowed<'a> = Self;
5080 #[inline(always)]
5081 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5082 *value
5083 }
5084 }
5085
5086 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5087 for FlexibleBitsUint16
5088 {
5089 #[inline]
5090 unsafe fn encode(
5091 self,
5092 encoder: &mut fidl::encoding::Encoder<'_, D>,
5093 offset: usize,
5094 _depth: fidl::encoding::Depth,
5095 ) -> fidl::Result<()> {
5096 encoder.debug_check_bounds::<Self>(offset);
5097 encoder.write_num(self.bits(), offset);
5098 Ok(())
5099 }
5100 }
5101
5102 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint16 {
5103 #[inline(always)]
5104 fn new_empty() -> Self {
5105 Self::empty()
5106 }
5107
5108 #[inline]
5109 unsafe fn decode(
5110 &mut self,
5111 decoder: &mut fidl::encoding::Decoder<'_, D>,
5112 offset: usize,
5113 _depth: fidl::encoding::Depth,
5114 ) -> fidl::Result<()> {
5115 decoder.debug_check_bounds::<Self>(offset);
5116 let prim = decoder.read_num::<u16>(offset);
5117 *self = Self::from_bits_allow_unknown(prim);
5118 Ok(())
5119 }
5120 }
5121 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32 {
5122 type Owned = Self;
5123
5124 #[inline(always)]
5125 fn inline_align(_context: fidl::encoding::Context) -> usize {
5126 4
5127 }
5128
5129 #[inline(always)]
5130 fn inline_size(_context: fidl::encoding::Context) -> usize {
5131 4
5132 }
5133 }
5134
5135 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32 {
5136 type Borrowed<'a> = Self;
5137 #[inline(always)]
5138 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5139 *value
5140 }
5141 }
5142
5143 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5144 for FlexibleBitsUint32
5145 {
5146 #[inline]
5147 unsafe fn encode(
5148 self,
5149 encoder: &mut fidl::encoding::Encoder<'_, D>,
5150 offset: usize,
5151 _depth: fidl::encoding::Depth,
5152 ) -> fidl::Result<()> {
5153 encoder.debug_check_bounds::<Self>(offset);
5154 encoder.write_num(self.bits(), offset);
5155 Ok(())
5156 }
5157 }
5158
5159 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint32 {
5160 #[inline(always)]
5161 fn new_empty() -> Self {
5162 Self::empty()
5163 }
5164
5165 #[inline]
5166 unsafe fn decode(
5167 &mut self,
5168 decoder: &mut fidl::encoding::Decoder<'_, D>,
5169 offset: usize,
5170 _depth: fidl::encoding::Depth,
5171 ) -> fidl::Result<()> {
5172 decoder.debug_check_bounds::<Self>(offset);
5173 let prim = decoder.read_num::<u32>(offset);
5174 *self = Self::from_bits_allow_unknown(prim);
5175 Ok(())
5176 }
5177 }
5178 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64 {
5179 type Owned = Self;
5180
5181 #[inline(always)]
5182 fn inline_align(_context: fidl::encoding::Context) -> usize {
5183 8
5184 }
5185
5186 #[inline(always)]
5187 fn inline_size(_context: fidl::encoding::Context) -> usize {
5188 8
5189 }
5190 }
5191
5192 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64 {
5193 type Borrowed<'a> = Self;
5194 #[inline(always)]
5195 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5196 *value
5197 }
5198 }
5199
5200 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5201 for FlexibleBitsUint64
5202 {
5203 #[inline]
5204 unsafe fn encode(
5205 self,
5206 encoder: &mut fidl::encoding::Encoder<'_, D>,
5207 offset: usize,
5208 _depth: fidl::encoding::Depth,
5209 ) -> fidl::Result<()> {
5210 encoder.debug_check_bounds::<Self>(offset);
5211 encoder.write_num(self.bits(), offset);
5212 Ok(())
5213 }
5214 }
5215
5216 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint64 {
5217 #[inline(always)]
5218 fn new_empty() -> Self {
5219 Self::empty()
5220 }
5221
5222 #[inline]
5223 unsafe fn decode(
5224 &mut self,
5225 decoder: &mut fidl::encoding::Decoder<'_, D>,
5226 offset: usize,
5227 _depth: fidl::encoding::Depth,
5228 ) -> fidl::Result<()> {
5229 decoder.debug_check_bounds::<Self>(offset);
5230 let prim = decoder.read_num::<u64>(offset);
5231 *self = Self::from_bits_allow_unknown(prim);
5232 Ok(())
5233 }
5234 }
5235 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8 {
5236 type Owned = Self;
5237
5238 #[inline(always)]
5239 fn inline_align(_context: fidl::encoding::Context) -> usize {
5240 1
5241 }
5242
5243 #[inline(always)]
5244 fn inline_size(_context: fidl::encoding::Context) -> usize {
5245 1
5246 }
5247 }
5248
5249 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8 {
5250 type Borrowed<'a> = Self;
5251 #[inline(always)]
5252 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5253 *value
5254 }
5255 }
5256
5257 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5258 for FlexibleBitsUint8
5259 {
5260 #[inline]
5261 unsafe fn encode(
5262 self,
5263 encoder: &mut fidl::encoding::Encoder<'_, D>,
5264 offset: usize,
5265 _depth: fidl::encoding::Depth,
5266 ) -> fidl::Result<()> {
5267 encoder.debug_check_bounds::<Self>(offset);
5268 encoder.write_num(self.bits(), offset);
5269 Ok(())
5270 }
5271 }
5272
5273 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint8 {
5274 #[inline(always)]
5275 fn new_empty() -> Self {
5276 Self::empty()
5277 }
5278
5279 #[inline]
5280 unsafe fn decode(
5281 &mut self,
5282 decoder: &mut fidl::encoding::Decoder<'_, D>,
5283 offset: usize,
5284 _depth: fidl::encoding::Depth,
5285 ) -> fidl::Result<()> {
5286 decoder.debug_check_bounds::<Self>(offset);
5287 let prim = decoder.read_num::<u8>(offset);
5288 *self = Self::from_bits_allow_unknown(prim);
5289 Ok(())
5290 }
5291 }
5292 unsafe impl fidl::encoding::TypeMarker for GoldenBits {
5293 type Owned = Self;
5294
5295 #[inline(always)]
5296 fn inline_align(_context: fidl::encoding::Context) -> usize {
5297 2
5298 }
5299
5300 #[inline(always)]
5301 fn inline_size(_context: fidl::encoding::Context) -> usize {
5302 2
5303 }
5304 }
5305
5306 impl fidl::encoding::ValueTypeMarker for GoldenBits {
5307 type Borrowed<'a> = Self;
5308 #[inline(always)]
5309 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5310 *value
5311 }
5312 }
5313
5314 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenBits {
5315 #[inline]
5316 unsafe fn encode(
5317 self,
5318 encoder: &mut fidl::encoding::Encoder<'_, D>,
5319 offset: usize,
5320 _depth: fidl::encoding::Depth,
5321 ) -> fidl::Result<()> {
5322 encoder.debug_check_bounds::<Self>(offset);
5323 if self.bits() & Self::all().bits() != self.bits() {
5324 return Err(fidl::Error::InvalidBitsValue);
5325 }
5326 encoder.write_num(self.bits(), offset);
5327 Ok(())
5328 }
5329 }
5330
5331 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBits {
5332 #[inline(always)]
5333 fn new_empty() -> Self {
5334 Self::empty()
5335 }
5336
5337 #[inline]
5338 unsafe fn decode(
5339 &mut self,
5340 decoder: &mut fidl::encoding::Decoder<'_, D>,
5341 offset: usize,
5342 _depth: fidl::encoding::Depth,
5343 ) -> fidl::Result<()> {
5344 decoder.debug_check_bounds::<Self>(offset);
5345 let prim = decoder.read_num::<u16>(offset);
5346 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5347 Ok(())
5348 }
5349 }
5350 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16 {
5351 type Owned = Self;
5352
5353 #[inline(always)]
5354 fn inline_align(_context: fidl::encoding::Context) -> usize {
5355 2
5356 }
5357
5358 #[inline(always)]
5359 fn inline_size(_context: fidl::encoding::Context) -> usize {
5360 2
5361 }
5362 }
5363
5364 impl fidl::encoding::ValueTypeMarker for StrictBitsUint16 {
5365 type Borrowed<'a> = Self;
5366 #[inline(always)]
5367 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5368 *value
5369 }
5370 }
5371
5372 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5373 for StrictBitsUint16
5374 {
5375 #[inline]
5376 unsafe fn encode(
5377 self,
5378 encoder: &mut fidl::encoding::Encoder<'_, D>,
5379 offset: usize,
5380 _depth: fidl::encoding::Depth,
5381 ) -> fidl::Result<()> {
5382 encoder.debug_check_bounds::<Self>(offset);
5383 if self.bits() & Self::all().bits() != self.bits() {
5384 return Err(fidl::Error::InvalidBitsValue);
5385 }
5386 encoder.write_num(self.bits(), offset);
5387 Ok(())
5388 }
5389 }
5390
5391 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint16 {
5392 #[inline(always)]
5393 fn new_empty() -> Self {
5394 Self::empty()
5395 }
5396
5397 #[inline]
5398 unsafe fn decode(
5399 &mut self,
5400 decoder: &mut fidl::encoding::Decoder<'_, D>,
5401 offset: usize,
5402 _depth: fidl::encoding::Depth,
5403 ) -> fidl::Result<()> {
5404 decoder.debug_check_bounds::<Self>(offset);
5405 let prim = decoder.read_num::<u16>(offset);
5406 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5407 Ok(())
5408 }
5409 }
5410 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32 {
5411 type Owned = Self;
5412
5413 #[inline(always)]
5414 fn inline_align(_context: fidl::encoding::Context) -> usize {
5415 4
5416 }
5417
5418 #[inline(always)]
5419 fn inline_size(_context: fidl::encoding::Context) -> usize {
5420 4
5421 }
5422 }
5423
5424 impl fidl::encoding::ValueTypeMarker for StrictBitsUint32 {
5425 type Borrowed<'a> = Self;
5426 #[inline(always)]
5427 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5428 *value
5429 }
5430 }
5431
5432 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5433 for StrictBitsUint32
5434 {
5435 #[inline]
5436 unsafe fn encode(
5437 self,
5438 encoder: &mut fidl::encoding::Encoder<'_, D>,
5439 offset: usize,
5440 _depth: fidl::encoding::Depth,
5441 ) -> fidl::Result<()> {
5442 encoder.debug_check_bounds::<Self>(offset);
5443 if self.bits() & Self::all().bits() != self.bits() {
5444 return Err(fidl::Error::InvalidBitsValue);
5445 }
5446 encoder.write_num(self.bits(), offset);
5447 Ok(())
5448 }
5449 }
5450
5451 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint32 {
5452 #[inline(always)]
5453 fn new_empty() -> Self {
5454 Self::empty()
5455 }
5456
5457 #[inline]
5458 unsafe fn decode(
5459 &mut self,
5460 decoder: &mut fidl::encoding::Decoder<'_, D>,
5461 offset: usize,
5462 _depth: fidl::encoding::Depth,
5463 ) -> fidl::Result<()> {
5464 decoder.debug_check_bounds::<Self>(offset);
5465 let prim = decoder.read_num::<u32>(offset);
5466 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5467 Ok(())
5468 }
5469 }
5470 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64 {
5471 type Owned = Self;
5472
5473 #[inline(always)]
5474 fn inline_align(_context: fidl::encoding::Context) -> usize {
5475 8
5476 }
5477
5478 #[inline(always)]
5479 fn inline_size(_context: fidl::encoding::Context) -> usize {
5480 8
5481 }
5482 }
5483
5484 impl fidl::encoding::ValueTypeMarker for StrictBitsUint64 {
5485 type Borrowed<'a> = Self;
5486 #[inline(always)]
5487 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5488 *value
5489 }
5490 }
5491
5492 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5493 for StrictBitsUint64
5494 {
5495 #[inline]
5496 unsafe fn encode(
5497 self,
5498 encoder: &mut fidl::encoding::Encoder<'_, D>,
5499 offset: usize,
5500 _depth: fidl::encoding::Depth,
5501 ) -> fidl::Result<()> {
5502 encoder.debug_check_bounds::<Self>(offset);
5503 if self.bits() & Self::all().bits() != self.bits() {
5504 return Err(fidl::Error::InvalidBitsValue);
5505 }
5506 encoder.write_num(self.bits(), offset);
5507 Ok(())
5508 }
5509 }
5510
5511 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint64 {
5512 #[inline(always)]
5513 fn new_empty() -> Self {
5514 Self::empty()
5515 }
5516
5517 #[inline]
5518 unsafe fn decode(
5519 &mut self,
5520 decoder: &mut fidl::encoding::Decoder<'_, D>,
5521 offset: usize,
5522 _depth: fidl::encoding::Depth,
5523 ) -> fidl::Result<()> {
5524 decoder.debug_check_bounds::<Self>(offset);
5525 let prim = decoder.read_num::<u64>(offset);
5526 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5527 Ok(())
5528 }
5529 }
5530 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8 {
5531 type Owned = Self;
5532
5533 #[inline(always)]
5534 fn inline_align(_context: fidl::encoding::Context) -> usize {
5535 1
5536 }
5537
5538 #[inline(always)]
5539 fn inline_size(_context: fidl::encoding::Context) -> usize {
5540 1
5541 }
5542 }
5543
5544 impl fidl::encoding::ValueTypeMarker for StrictBitsUint8 {
5545 type Borrowed<'a> = Self;
5546 #[inline(always)]
5547 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5548 *value
5549 }
5550 }
5551
5552 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5553 for StrictBitsUint8
5554 {
5555 #[inline]
5556 unsafe fn encode(
5557 self,
5558 encoder: &mut fidl::encoding::Encoder<'_, D>,
5559 offset: usize,
5560 _depth: fidl::encoding::Depth,
5561 ) -> fidl::Result<()> {
5562 encoder.debug_check_bounds::<Self>(offset);
5563 if self.bits() & Self::all().bits() != self.bits() {
5564 return Err(fidl::Error::InvalidBitsValue);
5565 }
5566 encoder.write_num(self.bits(), offset);
5567 Ok(())
5568 }
5569 }
5570
5571 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8 {
5572 #[inline(always)]
5573 fn new_empty() -> Self {
5574 Self::empty()
5575 }
5576
5577 #[inline]
5578 unsafe fn decode(
5579 &mut self,
5580 decoder: &mut fidl::encoding::Decoder<'_, D>,
5581 offset: usize,
5582 _depth: fidl::encoding::Depth,
5583 ) -> fidl::Result<()> {
5584 decoder.debug_check_bounds::<Self>(offset);
5585 let prim = decoder.read_num::<u8>(offset);
5586 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5587 Ok(())
5588 }
5589 }
5590 unsafe impl fidl::encoding::TypeMarker for Rights {
5591 type Owned = Self;
5592
5593 #[inline(always)]
5594 fn inline_align(_context: fidl::encoding::Context) -> usize {
5595 4
5596 }
5597
5598 #[inline(always)]
5599 fn inline_size(_context: fidl::encoding::Context) -> usize {
5600 4
5601 }
5602 }
5603
5604 impl fidl::encoding::ValueTypeMarker for Rights {
5605 type Borrowed<'a> = Self;
5606 #[inline(always)]
5607 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5608 *value
5609 }
5610 }
5611
5612 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Rights {
5613 #[inline]
5614 unsafe fn encode(
5615 self,
5616 encoder: &mut fidl::encoding::Encoder<'_, D>,
5617 offset: usize,
5618 _depth: fidl::encoding::Depth,
5619 ) -> fidl::Result<()> {
5620 encoder.debug_check_bounds::<Self>(offset);
5621 if self.bits() & Self::all().bits() != self.bits() {
5622 return Err(fidl::Error::InvalidBitsValue);
5623 }
5624 encoder.write_num(self.bits(), offset);
5625 Ok(())
5626 }
5627 }
5628
5629 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Rights {
5630 #[inline(always)]
5631 fn new_empty() -> Self {
5632 Self::empty()
5633 }
5634
5635 #[inline]
5636 unsafe fn decode(
5637 &mut self,
5638 decoder: &mut fidl::encoding::Decoder<'_, D>,
5639 offset: usize,
5640 _depth: fidl::encoding::Depth,
5641 ) -> fidl::Result<()> {
5642 decoder.debug_check_bounds::<Self>(offset);
5643 let prim = decoder.read_num::<u32>(offset);
5644 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5645 Ok(())
5646 }
5647 }
5648 unsafe impl fidl::encoding::TypeMarker for EmptyEnum {
5649 type Owned = Self;
5650
5651 #[inline(always)]
5652 fn inline_align(_context: fidl::encoding::Context) -> usize {
5653 std::mem::align_of::<u32>()
5654 }
5655
5656 #[inline(always)]
5657 fn inline_size(_context: fidl::encoding::Context) -> usize {
5658 std::mem::size_of::<u32>()
5659 }
5660
5661 #[inline(always)]
5662 fn encode_is_copy() -> bool {
5663 false
5664 }
5665
5666 #[inline(always)]
5667 fn decode_is_copy() -> bool {
5668 false
5669 }
5670 }
5671
5672 impl fidl::encoding::ValueTypeMarker for EmptyEnum {
5673 type Borrowed<'a> = Self;
5674 #[inline(always)]
5675 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5676 *value
5677 }
5678 }
5679
5680 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyEnum {
5681 #[inline]
5682 unsafe fn encode(
5683 self,
5684 encoder: &mut fidl::encoding::Encoder<'_, D>,
5685 offset: usize,
5686 _depth: fidl::encoding::Depth,
5687 ) -> fidl::Result<()> {
5688 encoder.debug_check_bounds::<Self>(offset);
5689 encoder.write_num(self.into_primitive(), offset);
5690 Ok(())
5691 }
5692 }
5693
5694 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnum {
5695 #[inline(always)]
5696 fn new_empty() -> Self {
5697 Self::unknown()
5698 }
5699
5700 #[inline]
5701 unsafe fn decode(
5702 &mut self,
5703 decoder: &mut fidl::encoding::Decoder<'_, D>,
5704 offset: usize,
5705 _depth: fidl::encoding::Depth,
5706 ) -> fidl::Result<()> {
5707 decoder.debug_check_bounds::<Self>(offset);
5708 let prim = decoder.read_num::<u32>(offset);
5709
5710 *self = Self::from_primitive_allow_unknown(prim);
5711 Ok(())
5712 }
5713 }
5714 unsafe impl fidl::encoding::TypeMarker for EnumUint32 {
5715 type Owned = Self;
5716
5717 #[inline(always)]
5718 fn inline_align(_context: fidl::encoding::Context) -> usize {
5719 std::mem::align_of::<u32>()
5720 }
5721
5722 #[inline(always)]
5723 fn inline_size(_context: fidl::encoding::Context) -> usize {
5724 std::mem::size_of::<u32>()
5725 }
5726
5727 #[inline(always)]
5728 fn encode_is_copy() -> bool {
5729 true
5730 }
5731
5732 #[inline(always)]
5733 fn decode_is_copy() -> bool {
5734 false
5735 }
5736 }
5737
5738 impl fidl::encoding::ValueTypeMarker for EnumUint32 {
5739 type Borrowed<'a> = Self;
5740 #[inline(always)]
5741 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5742 *value
5743 }
5744 }
5745
5746 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint32 {
5747 #[inline]
5748 unsafe fn encode(
5749 self,
5750 encoder: &mut fidl::encoding::Encoder<'_, D>,
5751 offset: usize,
5752 _depth: fidl::encoding::Depth,
5753 ) -> fidl::Result<()> {
5754 encoder.debug_check_bounds::<Self>(offset);
5755 encoder.write_num(self.into_primitive(), offset);
5756 Ok(())
5757 }
5758 }
5759
5760 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint32 {
5761 #[inline(always)]
5762 fn new_empty() -> Self {
5763 Self::Member
5764 }
5765
5766 #[inline]
5767 unsafe fn decode(
5768 &mut self,
5769 decoder: &mut fidl::encoding::Decoder<'_, D>,
5770 offset: usize,
5771 _depth: fidl::encoding::Depth,
5772 ) -> fidl::Result<()> {
5773 decoder.debug_check_bounds::<Self>(offset);
5774 let prim = decoder.read_num::<u32>(offset);
5775
5776 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5777 Ok(())
5778 }
5779 }
5780 unsafe impl fidl::encoding::TypeMarker for EnumUint8 {
5781 type Owned = Self;
5782
5783 #[inline(always)]
5784 fn inline_align(_context: fidl::encoding::Context) -> usize {
5785 std::mem::align_of::<u8>()
5786 }
5787
5788 #[inline(always)]
5789 fn inline_size(_context: fidl::encoding::Context) -> usize {
5790 std::mem::size_of::<u8>()
5791 }
5792
5793 #[inline(always)]
5794 fn encode_is_copy() -> bool {
5795 true
5796 }
5797
5798 #[inline(always)]
5799 fn decode_is_copy() -> bool {
5800 false
5801 }
5802 }
5803
5804 impl fidl::encoding::ValueTypeMarker for EnumUint8 {
5805 type Borrowed<'a> = Self;
5806 #[inline(always)]
5807 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5808 *value
5809 }
5810 }
5811
5812 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint8 {
5813 #[inline]
5814 unsafe fn encode(
5815 self,
5816 encoder: &mut fidl::encoding::Encoder<'_, D>,
5817 offset: usize,
5818 _depth: fidl::encoding::Depth,
5819 ) -> fidl::Result<()> {
5820 encoder.debug_check_bounds::<Self>(offset);
5821 encoder.write_num(self.into_primitive(), offset);
5822 Ok(())
5823 }
5824 }
5825
5826 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint8 {
5827 #[inline(always)]
5828 fn new_empty() -> Self {
5829 Self::Member
5830 }
5831
5832 #[inline]
5833 unsafe fn decode(
5834 &mut self,
5835 decoder: &mut fidl::encoding::Decoder<'_, D>,
5836 offset: usize,
5837 _depth: fidl::encoding::Depth,
5838 ) -> fidl::Result<()> {
5839 decoder.debug_check_bounds::<Self>(offset);
5840 let prim = decoder.read_num::<u8>(offset);
5841
5842 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5843 Ok(())
5844 }
5845 }
5846 unsafe impl fidl::encoding::TypeMarker for FidlvizEnum {
5847 type Owned = Self;
5848
5849 #[inline(always)]
5850 fn inline_align(_context: fidl::encoding::Context) -> usize {
5851 std::mem::align_of::<u8>()
5852 }
5853
5854 #[inline(always)]
5855 fn inline_size(_context: fidl::encoding::Context) -> usize {
5856 std::mem::size_of::<u8>()
5857 }
5858
5859 #[inline(always)]
5860 fn encode_is_copy() -> bool {
5861 true
5862 }
5863
5864 #[inline(always)]
5865 fn decode_is_copy() -> bool {
5866 false
5867 }
5868 }
5869
5870 impl fidl::encoding::ValueTypeMarker for FidlvizEnum {
5871 type Borrowed<'a> = Self;
5872 #[inline(always)]
5873 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5874 *value
5875 }
5876 }
5877
5878 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizEnum {
5879 #[inline]
5880 unsafe fn encode(
5881 self,
5882 encoder: &mut fidl::encoding::Encoder<'_, D>,
5883 offset: usize,
5884 _depth: fidl::encoding::Depth,
5885 ) -> fidl::Result<()> {
5886 encoder.debug_check_bounds::<Self>(offset);
5887 encoder.write_num(self.into_primitive(), offset);
5888 Ok(())
5889 }
5890 }
5891
5892 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizEnum {
5893 #[inline(always)]
5894 fn new_empty() -> Self {
5895 Self::A
5896 }
5897
5898 #[inline]
5899 unsafe fn decode(
5900 &mut self,
5901 decoder: &mut fidl::encoding::Decoder<'_, D>,
5902 offset: usize,
5903 _depth: fidl::encoding::Depth,
5904 ) -> fidl::Result<()> {
5905 decoder.debug_check_bounds::<Self>(offset);
5906 let prim = decoder.read_num::<u8>(offset);
5907
5908 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5909 Ok(())
5910 }
5911 }
5912 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16 {
5913 type Owned = Self;
5914
5915 #[inline(always)]
5916 fn inline_align(_context: fidl::encoding::Context) -> usize {
5917 std::mem::align_of::<i16>()
5918 }
5919
5920 #[inline(always)]
5921 fn inline_size(_context: fidl::encoding::Context) -> usize {
5922 std::mem::size_of::<i16>()
5923 }
5924
5925 #[inline(always)]
5926 fn encode_is_copy() -> bool {
5927 false
5928 }
5929
5930 #[inline(always)]
5931 fn decode_is_copy() -> bool {
5932 false
5933 }
5934 }
5935
5936 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16 {
5937 type Borrowed<'a> = Self;
5938 #[inline(always)]
5939 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5940 *value
5941 }
5942 }
5943
5944 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5945 for FlexibleEnumInt16
5946 {
5947 #[inline]
5948 unsafe fn encode(
5949 self,
5950 encoder: &mut fidl::encoding::Encoder<'_, D>,
5951 offset: usize,
5952 _depth: fidl::encoding::Depth,
5953 ) -> fidl::Result<()> {
5954 encoder.debug_check_bounds::<Self>(offset);
5955 encoder.write_num(self.into_primitive(), offset);
5956 Ok(())
5957 }
5958 }
5959
5960 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt16 {
5961 #[inline(always)]
5962 fn new_empty() -> Self {
5963 Self::unknown()
5964 }
5965
5966 #[inline]
5967 unsafe fn decode(
5968 &mut self,
5969 decoder: &mut fidl::encoding::Decoder<'_, D>,
5970 offset: usize,
5971 _depth: fidl::encoding::Depth,
5972 ) -> fidl::Result<()> {
5973 decoder.debug_check_bounds::<Self>(offset);
5974 let prim = decoder.read_num::<i16>(offset);
5975
5976 *self = Self::from_primitive_allow_unknown(prim);
5977 Ok(())
5978 }
5979 }
5980 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32 {
5981 type Owned = Self;
5982
5983 #[inline(always)]
5984 fn inline_align(_context: fidl::encoding::Context) -> usize {
5985 std::mem::align_of::<i32>()
5986 }
5987
5988 #[inline(always)]
5989 fn inline_size(_context: fidl::encoding::Context) -> usize {
5990 std::mem::size_of::<i32>()
5991 }
5992
5993 #[inline(always)]
5994 fn encode_is_copy() -> bool {
5995 false
5996 }
5997
5998 #[inline(always)]
5999 fn decode_is_copy() -> bool {
6000 false
6001 }
6002 }
6003
6004 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32 {
6005 type Borrowed<'a> = Self;
6006 #[inline(always)]
6007 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6008 *value
6009 }
6010 }
6011
6012 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6013 for FlexibleEnumInt32
6014 {
6015 #[inline]
6016 unsafe fn encode(
6017 self,
6018 encoder: &mut fidl::encoding::Encoder<'_, D>,
6019 offset: usize,
6020 _depth: fidl::encoding::Depth,
6021 ) -> fidl::Result<()> {
6022 encoder.debug_check_bounds::<Self>(offset);
6023 encoder.write_num(self.into_primitive(), offset);
6024 Ok(())
6025 }
6026 }
6027
6028 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt32 {
6029 #[inline(always)]
6030 fn new_empty() -> Self {
6031 Self::unknown()
6032 }
6033
6034 #[inline]
6035 unsafe fn decode(
6036 &mut self,
6037 decoder: &mut fidl::encoding::Decoder<'_, D>,
6038 offset: usize,
6039 _depth: fidl::encoding::Depth,
6040 ) -> fidl::Result<()> {
6041 decoder.debug_check_bounds::<Self>(offset);
6042 let prim = decoder.read_num::<i32>(offset);
6043
6044 *self = Self::from_primitive_allow_unknown(prim);
6045 Ok(())
6046 }
6047 }
6048 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64 {
6049 type Owned = Self;
6050
6051 #[inline(always)]
6052 fn inline_align(_context: fidl::encoding::Context) -> usize {
6053 std::mem::align_of::<i64>()
6054 }
6055
6056 #[inline(always)]
6057 fn inline_size(_context: fidl::encoding::Context) -> usize {
6058 std::mem::size_of::<i64>()
6059 }
6060
6061 #[inline(always)]
6062 fn encode_is_copy() -> bool {
6063 false
6064 }
6065
6066 #[inline(always)]
6067 fn decode_is_copy() -> bool {
6068 false
6069 }
6070 }
6071
6072 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64 {
6073 type Borrowed<'a> = Self;
6074 #[inline(always)]
6075 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6076 *value
6077 }
6078 }
6079
6080 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6081 for FlexibleEnumInt64
6082 {
6083 #[inline]
6084 unsafe fn encode(
6085 self,
6086 encoder: &mut fidl::encoding::Encoder<'_, D>,
6087 offset: usize,
6088 _depth: fidl::encoding::Depth,
6089 ) -> fidl::Result<()> {
6090 encoder.debug_check_bounds::<Self>(offset);
6091 encoder.write_num(self.into_primitive(), offset);
6092 Ok(())
6093 }
6094 }
6095
6096 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt64 {
6097 #[inline(always)]
6098 fn new_empty() -> Self {
6099 Self::unknown()
6100 }
6101
6102 #[inline]
6103 unsafe fn decode(
6104 &mut self,
6105 decoder: &mut fidl::encoding::Decoder<'_, D>,
6106 offset: usize,
6107 _depth: fidl::encoding::Depth,
6108 ) -> fidl::Result<()> {
6109 decoder.debug_check_bounds::<Self>(offset);
6110 let prim = decoder.read_num::<i64>(offset);
6111
6112 *self = Self::from_primitive_allow_unknown(prim);
6113 Ok(())
6114 }
6115 }
6116 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8 {
6117 type Owned = Self;
6118
6119 #[inline(always)]
6120 fn inline_align(_context: fidl::encoding::Context) -> usize {
6121 std::mem::align_of::<i8>()
6122 }
6123
6124 #[inline(always)]
6125 fn inline_size(_context: fidl::encoding::Context) -> usize {
6126 std::mem::size_of::<i8>()
6127 }
6128
6129 #[inline(always)]
6130 fn encode_is_copy() -> bool {
6131 false
6132 }
6133
6134 #[inline(always)]
6135 fn decode_is_copy() -> bool {
6136 false
6137 }
6138 }
6139
6140 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8 {
6141 type Borrowed<'a> = Self;
6142 #[inline(always)]
6143 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6144 *value
6145 }
6146 }
6147
6148 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6149 for FlexibleEnumInt8
6150 {
6151 #[inline]
6152 unsafe fn encode(
6153 self,
6154 encoder: &mut fidl::encoding::Encoder<'_, D>,
6155 offset: usize,
6156 _depth: fidl::encoding::Depth,
6157 ) -> fidl::Result<()> {
6158 encoder.debug_check_bounds::<Self>(offset);
6159 encoder.write_num(self.into_primitive(), offset);
6160 Ok(())
6161 }
6162 }
6163
6164 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt8 {
6165 #[inline(always)]
6166 fn new_empty() -> Self {
6167 Self::unknown()
6168 }
6169
6170 #[inline]
6171 unsafe fn decode(
6172 &mut self,
6173 decoder: &mut fidl::encoding::Decoder<'_, D>,
6174 offset: usize,
6175 _depth: fidl::encoding::Depth,
6176 ) -> fidl::Result<()> {
6177 decoder.debug_check_bounds::<Self>(offset);
6178 let prim = decoder.read_num::<i8>(offset);
6179
6180 *self = Self::from_primitive_allow_unknown(prim);
6181 Ok(())
6182 }
6183 }
6184 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16 {
6185 type Owned = Self;
6186
6187 #[inline(always)]
6188 fn inline_align(_context: fidl::encoding::Context) -> usize {
6189 std::mem::align_of::<u16>()
6190 }
6191
6192 #[inline(always)]
6193 fn inline_size(_context: fidl::encoding::Context) -> usize {
6194 std::mem::size_of::<u16>()
6195 }
6196
6197 #[inline(always)]
6198 fn encode_is_copy() -> bool {
6199 false
6200 }
6201
6202 #[inline(always)]
6203 fn decode_is_copy() -> bool {
6204 false
6205 }
6206 }
6207
6208 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16 {
6209 type Borrowed<'a> = Self;
6210 #[inline(always)]
6211 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6212 *value
6213 }
6214 }
6215
6216 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6217 for FlexibleEnumUint16
6218 {
6219 #[inline]
6220 unsafe fn encode(
6221 self,
6222 encoder: &mut fidl::encoding::Encoder<'_, D>,
6223 offset: usize,
6224 _depth: fidl::encoding::Depth,
6225 ) -> fidl::Result<()> {
6226 encoder.debug_check_bounds::<Self>(offset);
6227 encoder.write_num(self.into_primitive(), offset);
6228 Ok(())
6229 }
6230 }
6231
6232 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint16 {
6233 #[inline(always)]
6234 fn new_empty() -> Self {
6235 Self::unknown()
6236 }
6237
6238 #[inline]
6239 unsafe fn decode(
6240 &mut self,
6241 decoder: &mut fidl::encoding::Decoder<'_, D>,
6242 offset: usize,
6243 _depth: fidl::encoding::Depth,
6244 ) -> fidl::Result<()> {
6245 decoder.debug_check_bounds::<Self>(offset);
6246 let prim = decoder.read_num::<u16>(offset);
6247
6248 *self = Self::from_primitive_allow_unknown(prim);
6249 Ok(())
6250 }
6251 }
6252 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32 {
6253 type Owned = Self;
6254
6255 #[inline(always)]
6256 fn inline_align(_context: fidl::encoding::Context) -> usize {
6257 std::mem::align_of::<u32>()
6258 }
6259
6260 #[inline(always)]
6261 fn inline_size(_context: fidl::encoding::Context) -> usize {
6262 std::mem::size_of::<u32>()
6263 }
6264
6265 #[inline(always)]
6266 fn encode_is_copy() -> bool {
6267 false
6268 }
6269
6270 #[inline(always)]
6271 fn decode_is_copy() -> bool {
6272 false
6273 }
6274 }
6275
6276 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32 {
6277 type Borrowed<'a> = Self;
6278 #[inline(always)]
6279 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6280 *value
6281 }
6282 }
6283
6284 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6285 for FlexibleEnumUint32
6286 {
6287 #[inline]
6288 unsafe fn encode(
6289 self,
6290 encoder: &mut fidl::encoding::Encoder<'_, D>,
6291 offset: usize,
6292 _depth: fidl::encoding::Depth,
6293 ) -> fidl::Result<()> {
6294 encoder.debug_check_bounds::<Self>(offset);
6295 encoder.write_num(self.into_primitive(), offset);
6296 Ok(())
6297 }
6298 }
6299
6300 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint32 {
6301 #[inline(always)]
6302 fn new_empty() -> Self {
6303 Self::unknown()
6304 }
6305
6306 #[inline]
6307 unsafe fn decode(
6308 &mut self,
6309 decoder: &mut fidl::encoding::Decoder<'_, D>,
6310 offset: usize,
6311 _depth: fidl::encoding::Depth,
6312 ) -> fidl::Result<()> {
6313 decoder.debug_check_bounds::<Self>(offset);
6314 let prim = decoder.read_num::<u32>(offset);
6315
6316 *self = Self::from_primitive_allow_unknown(prim);
6317 Ok(())
6318 }
6319 }
6320 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64 {
6321 type Owned = Self;
6322
6323 #[inline(always)]
6324 fn inline_align(_context: fidl::encoding::Context) -> usize {
6325 std::mem::align_of::<u64>()
6326 }
6327
6328 #[inline(always)]
6329 fn inline_size(_context: fidl::encoding::Context) -> usize {
6330 std::mem::size_of::<u64>()
6331 }
6332
6333 #[inline(always)]
6334 fn encode_is_copy() -> bool {
6335 false
6336 }
6337
6338 #[inline(always)]
6339 fn decode_is_copy() -> bool {
6340 false
6341 }
6342 }
6343
6344 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64 {
6345 type Borrowed<'a> = Self;
6346 #[inline(always)]
6347 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6348 *value
6349 }
6350 }
6351
6352 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6353 for FlexibleEnumUint64
6354 {
6355 #[inline]
6356 unsafe fn encode(
6357 self,
6358 encoder: &mut fidl::encoding::Encoder<'_, D>,
6359 offset: usize,
6360 _depth: fidl::encoding::Depth,
6361 ) -> fidl::Result<()> {
6362 encoder.debug_check_bounds::<Self>(offset);
6363 encoder.write_num(self.into_primitive(), offset);
6364 Ok(())
6365 }
6366 }
6367
6368 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint64 {
6369 #[inline(always)]
6370 fn new_empty() -> Self {
6371 Self::unknown()
6372 }
6373
6374 #[inline]
6375 unsafe fn decode(
6376 &mut self,
6377 decoder: &mut fidl::encoding::Decoder<'_, D>,
6378 offset: usize,
6379 _depth: fidl::encoding::Depth,
6380 ) -> fidl::Result<()> {
6381 decoder.debug_check_bounds::<Self>(offset);
6382 let prim = decoder.read_num::<u64>(offset);
6383
6384 *self = Self::from_primitive_allow_unknown(prim);
6385 Ok(())
6386 }
6387 }
6388 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8 {
6389 type Owned = Self;
6390
6391 #[inline(always)]
6392 fn inline_align(_context: fidl::encoding::Context) -> usize {
6393 std::mem::align_of::<u8>()
6394 }
6395
6396 #[inline(always)]
6397 fn inline_size(_context: fidl::encoding::Context) -> usize {
6398 std::mem::size_of::<u8>()
6399 }
6400
6401 #[inline(always)]
6402 fn encode_is_copy() -> bool {
6403 false
6404 }
6405
6406 #[inline(always)]
6407 fn decode_is_copy() -> bool {
6408 false
6409 }
6410 }
6411
6412 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8 {
6413 type Borrowed<'a> = Self;
6414 #[inline(always)]
6415 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6416 *value
6417 }
6418 }
6419
6420 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6421 for FlexibleEnumUint8
6422 {
6423 #[inline]
6424 unsafe fn encode(
6425 self,
6426 encoder: &mut fidl::encoding::Encoder<'_, D>,
6427 offset: usize,
6428 _depth: fidl::encoding::Depth,
6429 ) -> fidl::Result<()> {
6430 encoder.debug_check_bounds::<Self>(offset);
6431 encoder.write_num(self.into_primitive(), offset);
6432 Ok(())
6433 }
6434 }
6435
6436 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint8 {
6437 #[inline(always)]
6438 fn new_empty() -> Self {
6439 Self::unknown()
6440 }
6441
6442 #[inline]
6443 unsafe fn decode(
6444 &mut self,
6445 decoder: &mut fidl::encoding::Decoder<'_, D>,
6446 offset: usize,
6447 _depth: fidl::encoding::Depth,
6448 ) -> fidl::Result<()> {
6449 decoder.debug_check_bounds::<Self>(offset);
6450 let prim = decoder.read_num::<u8>(offset);
6451
6452 *self = Self::from_primitive_allow_unknown(prim);
6453 Ok(())
6454 }
6455 }
6456 unsafe impl fidl::encoding::TypeMarker for GoldenEnum {
6457 type Owned = Self;
6458
6459 #[inline(always)]
6460 fn inline_align(_context: fidl::encoding::Context) -> usize {
6461 std::mem::align_of::<u16>()
6462 }
6463
6464 #[inline(always)]
6465 fn inline_size(_context: fidl::encoding::Context) -> usize {
6466 std::mem::size_of::<u16>()
6467 }
6468
6469 #[inline(always)]
6470 fn encode_is_copy() -> bool {
6471 true
6472 }
6473
6474 #[inline(always)]
6475 fn decode_is_copy() -> bool {
6476 false
6477 }
6478 }
6479
6480 impl fidl::encoding::ValueTypeMarker for GoldenEnum {
6481 type Borrowed<'a> = Self;
6482 #[inline(always)]
6483 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6484 *value
6485 }
6486 }
6487
6488 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenEnum {
6489 #[inline]
6490 unsafe fn encode(
6491 self,
6492 encoder: &mut fidl::encoding::Encoder<'_, D>,
6493 offset: usize,
6494 _depth: fidl::encoding::Depth,
6495 ) -> fidl::Result<()> {
6496 encoder.debug_check_bounds::<Self>(offset);
6497 encoder.write_num(self.into_primitive(), offset);
6498 Ok(())
6499 }
6500 }
6501
6502 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnum {
6503 #[inline(always)]
6504 fn new_empty() -> Self {
6505 Self::A
6506 }
6507
6508 #[inline]
6509 unsafe fn decode(
6510 &mut self,
6511 decoder: &mut fidl::encoding::Decoder<'_, D>,
6512 offset: usize,
6513 _depth: fidl::encoding::Depth,
6514 ) -> fidl::Result<()> {
6515 decoder.debug_check_bounds::<Self>(offset);
6516 let prim = decoder.read_num::<u16>(offset);
6517
6518 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6519 Ok(())
6520 }
6521 }
6522 unsafe impl fidl::encoding::TypeMarker for SignedEnum {
6523 type Owned = Self;
6524
6525 #[inline(always)]
6526 fn inline_align(_context: fidl::encoding::Context) -> usize {
6527 std::mem::align_of::<i32>()
6528 }
6529
6530 #[inline(always)]
6531 fn inline_size(_context: fidl::encoding::Context) -> usize {
6532 std::mem::size_of::<i32>()
6533 }
6534
6535 #[inline(always)]
6536 fn encode_is_copy() -> bool {
6537 false
6538 }
6539
6540 #[inline(always)]
6541 fn decode_is_copy() -> bool {
6542 false
6543 }
6544 }
6545
6546 impl fidl::encoding::ValueTypeMarker for SignedEnum {
6547 type Borrowed<'a> = Self;
6548 #[inline(always)]
6549 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6550 *value
6551 }
6552 }
6553
6554 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SignedEnum {
6555 #[inline]
6556 unsafe fn encode(
6557 self,
6558 encoder: &mut fidl::encoding::Encoder<'_, D>,
6559 offset: usize,
6560 _depth: fidl::encoding::Depth,
6561 ) -> fidl::Result<()> {
6562 encoder.debug_check_bounds::<Self>(offset);
6563 encoder.write_num(self.into_primitive(), offset);
6564 Ok(())
6565 }
6566 }
6567
6568 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SignedEnum {
6569 #[inline(always)]
6570 fn new_empty() -> Self {
6571 Self::unknown()
6572 }
6573
6574 #[inline]
6575 unsafe fn decode(
6576 &mut self,
6577 decoder: &mut fidl::encoding::Decoder<'_, D>,
6578 offset: usize,
6579 _depth: fidl::encoding::Depth,
6580 ) -> fidl::Result<()> {
6581 decoder.debug_check_bounds::<Self>(offset);
6582 let prim = decoder.read_num::<i32>(offset);
6583
6584 *self = Self::from_primitive_allow_unknown(prim);
6585 Ok(())
6586 }
6587 }
6588 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16 {
6589 type Owned = Self;
6590
6591 #[inline(always)]
6592 fn inline_align(_context: fidl::encoding::Context) -> usize {
6593 std::mem::align_of::<i16>()
6594 }
6595
6596 #[inline(always)]
6597 fn inline_size(_context: fidl::encoding::Context) -> usize {
6598 std::mem::size_of::<i16>()
6599 }
6600
6601 #[inline(always)]
6602 fn encode_is_copy() -> bool {
6603 true
6604 }
6605
6606 #[inline(always)]
6607 fn decode_is_copy() -> bool {
6608 false
6609 }
6610 }
6611
6612 impl fidl::encoding::ValueTypeMarker for StrictEnumInt16 {
6613 type Borrowed<'a> = Self;
6614 #[inline(always)]
6615 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6616 *value
6617 }
6618 }
6619
6620 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6621 for StrictEnumInt16
6622 {
6623 #[inline]
6624 unsafe fn encode(
6625 self,
6626 encoder: &mut fidl::encoding::Encoder<'_, D>,
6627 offset: usize,
6628 _depth: fidl::encoding::Depth,
6629 ) -> fidl::Result<()> {
6630 encoder.debug_check_bounds::<Self>(offset);
6631 encoder.write_num(self.into_primitive(), offset);
6632 Ok(())
6633 }
6634 }
6635
6636 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16 {
6637 #[inline(always)]
6638 fn new_empty() -> Self {
6639 Self::First
6640 }
6641
6642 #[inline]
6643 unsafe fn decode(
6644 &mut self,
6645 decoder: &mut fidl::encoding::Decoder<'_, D>,
6646 offset: usize,
6647 _depth: fidl::encoding::Depth,
6648 ) -> fidl::Result<()> {
6649 decoder.debug_check_bounds::<Self>(offset);
6650 let prim = decoder.read_num::<i16>(offset);
6651
6652 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6653 Ok(())
6654 }
6655 }
6656 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32 {
6657 type Owned = Self;
6658
6659 #[inline(always)]
6660 fn inline_align(_context: fidl::encoding::Context) -> usize {
6661 std::mem::align_of::<i32>()
6662 }
6663
6664 #[inline(always)]
6665 fn inline_size(_context: fidl::encoding::Context) -> usize {
6666 std::mem::size_of::<i32>()
6667 }
6668
6669 #[inline(always)]
6670 fn encode_is_copy() -> bool {
6671 true
6672 }
6673
6674 #[inline(always)]
6675 fn decode_is_copy() -> bool {
6676 false
6677 }
6678 }
6679
6680 impl fidl::encoding::ValueTypeMarker for StrictEnumInt32 {
6681 type Borrowed<'a> = Self;
6682 #[inline(always)]
6683 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6684 *value
6685 }
6686 }
6687
6688 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6689 for StrictEnumInt32
6690 {
6691 #[inline]
6692 unsafe fn encode(
6693 self,
6694 encoder: &mut fidl::encoding::Encoder<'_, D>,
6695 offset: usize,
6696 _depth: fidl::encoding::Depth,
6697 ) -> fidl::Result<()> {
6698 encoder.debug_check_bounds::<Self>(offset);
6699 encoder.write_num(self.into_primitive(), offset);
6700 Ok(())
6701 }
6702 }
6703
6704 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32 {
6705 #[inline(always)]
6706 fn new_empty() -> Self {
6707 Self::First
6708 }
6709
6710 #[inline]
6711 unsafe fn decode(
6712 &mut self,
6713 decoder: &mut fidl::encoding::Decoder<'_, D>,
6714 offset: usize,
6715 _depth: fidl::encoding::Depth,
6716 ) -> fidl::Result<()> {
6717 decoder.debug_check_bounds::<Self>(offset);
6718 let prim = decoder.read_num::<i32>(offset);
6719
6720 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6721 Ok(())
6722 }
6723 }
6724 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64 {
6725 type Owned = Self;
6726
6727 #[inline(always)]
6728 fn inline_align(_context: fidl::encoding::Context) -> usize {
6729 std::mem::align_of::<i64>()
6730 }
6731
6732 #[inline(always)]
6733 fn inline_size(_context: fidl::encoding::Context) -> usize {
6734 std::mem::size_of::<i64>()
6735 }
6736
6737 #[inline(always)]
6738 fn encode_is_copy() -> bool {
6739 true
6740 }
6741
6742 #[inline(always)]
6743 fn decode_is_copy() -> bool {
6744 false
6745 }
6746 }
6747
6748 impl fidl::encoding::ValueTypeMarker for StrictEnumInt64 {
6749 type Borrowed<'a> = Self;
6750 #[inline(always)]
6751 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6752 *value
6753 }
6754 }
6755
6756 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6757 for StrictEnumInt64
6758 {
6759 #[inline]
6760 unsafe fn encode(
6761 self,
6762 encoder: &mut fidl::encoding::Encoder<'_, D>,
6763 offset: usize,
6764 _depth: fidl::encoding::Depth,
6765 ) -> fidl::Result<()> {
6766 encoder.debug_check_bounds::<Self>(offset);
6767 encoder.write_num(self.into_primitive(), offset);
6768 Ok(())
6769 }
6770 }
6771
6772 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64 {
6773 #[inline(always)]
6774 fn new_empty() -> Self {
6775 Self::First
6776 }
6777
6778 #[inline]
6779 unsafe fn decode(
6780 &mut self,
6781 decoder: &mut fidl::encoding::Decoder<'_, D>,
6782 offset: usize,
6783 _depth: fidl::encoding::Depth,
6784 ) -> fidl::Result<()> {
6785 decoder.debug_check_bounds::<Self>(offset);
6786 let prim = decoder.read_num::<i64>(offset);
6787
6788 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6789 Ok(())
6790 }
6791 }
6792 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8 {
6793 type Owned = Self;
6794
6795 #[inline(always)]
6796 fn inline_align(_context: fidl::encoding::Context) -> usize {
6797 std::mem::align_of::<i8>()
6798 }
6799
6800 #[inline(always)]
6801 fn inline_size(_context: fidl::encoding::Context) -> usize {
6802 std::mem::size_of::<i8>()
6803 }
6804
6805 #[inline(always)]
6806 fn encode_is_copy() -> bool {
6807 true
6808 }
6809
6810 #[inline(always)]
6811 fn decode_is_copy() -> bool {
6812 false
6813 }
6814 }
6815
6816 impl fidl::encoding::ValueTypeMarker for StrictEnumInt8 {
6817 type Borrowed<'a> = Self;
6818 #[inline(always)]
6819 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6820 *value
6821 }
6822 }
6823
6824 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StrictEnumInt8 {
6825 #[inline]
6826 unsafe fn encode(
6827 self,
6828 encoder: &mut fidl::encoding::Encoder<'_, D>,
6829 offset: usize,
6830 _depth: fidl::encoding::Depth,
6831 ) -> fidl::Result<()> {
6832 encoder.debug_check_bounds::<Self>(offset);
6833 encoder.write_num(self.into_primitive(), offset);
6834 Ok(())
6835 }
6836 }
6837
6838 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8 {
6839 #[inline(always)]
6840 fn new_empty() -> Self {
6841 Self::First
6842 }
6843
6844 #[inline]
6845 unsafe fn decode(
6846 &mut self,
6847 decoder: &mut fidl::encoding::Decoder<'_, D>,
6848 offset: usize,
6849 _depth: fidl::encoding::Depth,
6850 ) -> fidl::Result<()> {
6851 decoder.debug_check_bounds::<Self>(offset);
6852 let prim = decoder.read_num::<i8>(offset);
6853
6854 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6855 Ok(())
6856 }
6857 }
6858 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16 {
6859 type Owned = Self;
6860
6861 #[inline(always)]
6862 fn inline_align(_context: fidl::encoding::Context) -> usize {
6863 std::mem::align_of::<u16>()
6864 }
6865
6866 #[inline(always)]
6867 fn inline_size(_context: fidl::encoding::Context) -> usize {
6868 std::mem::size_of::<u16>()
6869 }
6870
6871 #[inline(always)]
6872 fn encode_is_copy() -> bool {
6873 true
6874 }
6875
6876 #[inline(always)]
6877 fn decode_is_copy() -> bool {
6878 false
6879 }
6880 }
6881
6882 impl fidl::encoding::ValueTypeMarker for StrictEnumUint16 {
6883 type Borrowed<'a> = Self;
6884 #[inline(always)]
6885 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6886 *value
6887 }
6888 }
6889
6890 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6891 for StrictEnumUint16
6892 {
6893 #[inline]
6894 unsafe fn encode(
6895 self,
6896 encoder: &mut fidl::encoding::Encoder<'_, D>,
6897 offset: usize,
6898 _depth: fidl::encoding::Depth,
6899 ) -> fidl::Result<()> {
6900 encoder.debug_check_bounds::<Self>(offset);
6901 encoder.write_num(self.into_primitive(), offset);
6902 Ok(())
6903 }
6904 }
6905
6906 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint16 {
6907 #[inline(always)]
6908 fn new_empty() -> Self {
6909 Self::First
6910 }
6911
6912 #[inline]
6913 unsafe fn decode(
6914 &mut self,
6915 decoder: &mut fidl::encoding::Decoder<'_, D>,
6916 offset: usize,
6917 _depth: fidl::encoding::Depth,
6918 ) -> fidl::Result<()> {
6919 decoder.debug_check_bounds::<Self>(offset);
6920 let prim = decoder.read_num::<u16>(offset);
6921
6922 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6923 Ok(())
6924 }
6925 }
6926 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32 {
6927 type Owned = Self;
6928
6929 #[inline(always)]
6930 fn inline_align(_context: fidl::encoding::Context) -> usize {
6931 std::mem::align_of::<u32>()
6932 }
6933
6934 #[inline(always)]
6935 fn inline_size(_context: fidl::encoding::Context) -> usize {
6936 std::mem::size_of::<u32>()
6937 }
6938
6939 #[inline(always)]
6940 fn encode_is_copy() -> bool {
6941 true
6942 }
6943
6944 #[inline(always)]
6945 fn decode_is_copy() -> bool {
6946 false
6947 }
6948 }
6949
6950 impl fidl::encoding::ValueTypeMarker for StrictEnumUint32 {
6951 type Borrowed<'a> = Self;
6952 #[inline(always)]
6953 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6954 *value
6955 }
6956 }
6957
6958 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6959 for StrictEnumUint32
6960 {
6961 #[inline]
6962 unsafe fn encode(
6963 self,
6964 encoder: &mut fidl::encoding::Encoder<'_, D>,
6965 offset: usize,
6966 _depth: fidl::encoding::Depth,
6967 ) -> fidl::Result<()> {
6968 encoder.debug_check_bounds::<Self>(offset);
6969 encoder.write_num(self.into_primitive(), offset);
6970 Ok(())
6971 }
6972 }
6973
6974 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint32 {
6975 #[inline(always)]
6976 fn new_empty() -> Self {
6977 Self::First
6978 }
6979
6980 #[inline]
6981 unsafe fn decode(
6982 &mut self,
6983 decoder: &mut fidl::encoding::Decoder<'_, D>,
6984 offset: usize,
6985 _depth: fidl::encoding::Depth,
6986 ) -> fidl::Result<()> {
6987 decoder.debug_check_bounds::<Self>(offset);
6988 let prim = decoder.read_num::<u32>(offset);
6989
6990 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6991 Ok(())
6992 }
6993 }
6994 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64 {
6995 type Owned = Self;
6996
6997 #[inline(always)]
6998 fn inline_align(_context: fidl::encoding::Context) -> usize {
6999 std::mem::align_of::<u64>()
7000 }
7001
7002 #[inline(always)]
7003 fn inline_size(_context: fidl::encoding::Context) -> usize {
7004 std::mem::size_of::<u64>()
7005 }
7006
7007 #[inline(always)]
7008 fn encode_is_copy() -> bool {
7009 true
7010 }
7011
7012 #[inline(always)]
7013 fn decode_is_copy() -> bool {
7014 false
7015 }
7016 }
7017
7018 impl fidl::encoding::ValueTypeMarker for StrictEnumUint64 {
7019 type Borrowed<'a> = Self;
7020 #[inline(always)]
7021 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7022 *value
7023 }
7024 }
7025
7026 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7027 for StrictEnumUint64
7028 {
7029 #[inline]
7030 unsafe fn encode(
7031 self,
7032 encoder: &mut fidl::encoding::Encoder<'_, D>,
7033 offset: usize,
7034 _depth: fidl::encoding::Depth,
7035 ) -> fidl::Result<()> {
7036 encoder.debug_check_bounds::<Self>(offset);
7037 encoder.write_num(self.into_primitive(), offset);
7038 Ok(())
7039 }
7040 }
7041
7042 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint64 {
7043 #[inline(always)]
7044 fn new_empty() -> Self {
7045 Self::First
7046 }
7047
7048 #[inline]
7049 unsafe fn decode(
7050 &mut self,
7051 decoder: &mut fidl::encoding::Decoder<'_, D>,
7052 offset: usize,
7053 _depth: fidl::encoding::Depth,
7054 ) -> fidl::Result<()> {
7055 decoder.debug_check_bounds::<Self>(offset);
7056 let prim = decoder.read_num::<u64>(offset);
7057
7058 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7059 Ok(())
7060 }
7061 }
7062 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8 {
7063 type Owned = Self;
7064
7065 #[inline(always)]
7066 fn inline_align(_context: fidl::encoding::Context) -> usize {
7067 std::mem::align_of::<u8>()
7068 }
7069
7070 #[inline(always)]
7071 fn inline_size(_context: fidl::encoding::Context) -> usize {
7072 std::mem::size_of::<u8>()
7073 }
7074
7075 #[inline(always)]
7076 fn encode_is_copy() -> bool {
7077 true
7078 }
7079
7080 #[inline(always)]
7081 fn decode_is_copy() -> bool {
7082 false
7083 }
7084 }
7085
7086 impl fidl::encoding::ValueTypeMarker for StrictEnumUint8 {
7087 type Borrowed<'a> = Self;
7088 #[inline(always)]
7089 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7090 *value
7091 }
7092 }
7093
7094 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7095 for StrictEnumUint8
7096 {
7097 #[inline]
7098 unsafe fn encode(
7099 self,
7100 encoder: &mut fidl::encoding::Encoder<'_, D>,
7101 offset: usize,
7102 _depth: fidl::encoding::Depth,
7103 ) -> fidl::Result<()> {
7104 encoder.debug_check_bounds::<Self>(offset);
7105 encoder.write_num(self.into_primitive(), offset);
7106 Ok(())
7107 }
7108 }
7109
7110 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8 {
7111 #[inline(always)]
7112 fn new_empty() -> Self {
7113 Self::First
7114 }
7115
7116 #[inline]
7117 unsafe fn decode(
7118 &mut self,
7119 decoder: &mut fidl::encoding::Decoder<'_, D>,
7120 offset: usize,
7121 _depth: fidl::encoding::Depth,
7122 ) -> fidl::Result<()> {
7123 decoder.debug_check_bounds::<Self>(offset);
7124 let prim = decoder.read_num::<u8>(offset);
7125
7126 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7127 Ok(())
7128 }
7129 }
7130 unsafe impl fidl::encoding::TypeMarker for UnsignedEnum {
7131 type Owned = Self;
7132
7133 #[inline(always)]
7134 fn inline_align(_context: fidl::encoding::Context) -> usize {
7135 std::mem::align_of::<u16>()
7136 }
7137
7138 #[inline(always)]
7139 fn inline_size(_context: fidl::encoding::Context) -> usize {
7140 std::mem::size_of::<u16>()
7141 }
7142
7143 #[inline(always)]
7144 fn encode_is_copy() -> bool {
7145 false
7146 }
7147
7148 #[inline(always)]
7149 fn decode_is_copy() -> bool {
7150 false
7151 }
7152 }
7153
7154 impl fidl::encoding::ValueTypeMarker for UnsignedEnum {
7155 type Borrowed<'a> = Self;
7156 #[inline(always)]
7157 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7158 *value
7159 }
7160 }
7161
7162 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsignedEnum {
7163 #[inline]
7164 unsafe fn encode(
7165 self,
7166 encoder: &mut fidl::encoding::Encoder<'_, D>,
7167 offset: usize,
7168 _depth: fidl::encoding::Depth,
7169 ) -> fidl::Result<()> {
7170 encoder.debug_check_bounds::<Self>(offset);
7171 encoder.write_num(self.into_primitive(), offset);
7172 Ok(())
7173 }
7174 }
7175
7176 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsignedEnum {
7177 #[inline(always)]
7178 fn new_empty() -> Self {
7179 Self::unknown()
7180 }
7181
7182 #[inline]
7183 unsafe fn decode(
7184 &mut self,
7185 decoder: &mut fidl::encoding::Decoder<'_, D>,
7186 offset: usize,
7187 _depth: fidl::encoding::Depth,
7188 ) -> fidl::Result<()> {
7189 decoder.debug_check_bounds::<Self>(offset);
7190 let prim = decoder.read_num::<u16>(offset);
7191
7192 *self = Self::from_primitive_allow_unknown(prim);
7193 Ok(())
7194 }
7195 }
7196 unsafe impl fidl::encoding::TypeMarker for ObjType {
7197 type Owned = Self;
7198
7199 #[inline(always)]
7200 fn inline_align(_context: fidl::encoding::Context) -> usize {
7201 std::mem::align_of::<u32>()
7202 }
7203
7204 #[inline(always)]
7205 fn inline_size(_context: fidl::encoding::Context) -> usize {
7206 std::mem::size_of::<u32>()
7207 }
7208
7209 #[inline(always)]
7210 fn encode_is_copy() -> bool {
7211 true
7212 }
7213
7214 #[inline(always)]
7215 fn decode_is_copy() -> bool {
7216 false
7217 }
7218 }
7219
7220 impl fidl::encoding::ValueTypeMarker for ObjType {
7221 type Borrowed<'a> = Self;
7222 #[inline(always)]
7223 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7224 *value
7225 }
7226 }
7227
7228 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ObjType {
7229 #[inline]
7230 unsafe fn encode(
7231 self,
7232 encoder: &mut fidl::encoding::Encoder<'_, D>,
7233 offset: usize,
7234 _depth: fidl::encoding::Depth,
7235 ) -> fidl::Result<()> {
7236 encoder.debug_check_bounds::<Self>(offset);
7237 encoder.write_num(self.into_primitive(), offset);
7238 Ok(())
7239 }
7240 }
7241
7242 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ObjType {
7243 #[inline(always)]
7244 fn new_empty() -> Self {
7245 Self::None
7246 }
7247
7248 #[inline]
7249 unsafe fn decode(
7250 &mut self,
7251 decoder: &mut fidl::encoding::Decoder<'_, D>,
7252 offset: usize,
7253 _depth: fidl::encoding::Depth,
7254 ) -> fidl::Result<()> {
7255 decoder.debug_check_bounds::<Self>(offset);
7256 let prim = decoder.read_num::<u32>(offset);
7257
7258 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7259 Ok(())
7260 }
7261 }
7262
7263 impl fidl::encoding::ValueTypeMarker for AliasedBool {
7264 type Borrowed<'a> = &'a Self;
7265 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7266 value
7267 }
7268 }
7269
7270 unsafe impl fidl::encoding::TypeMarker for AliasedBool {
7271 type Owned = Self;
7272
7273 #[inline(always)]
7274 fn inline_align(_context: fidl::encoding::Context) -> usize {
7275 1
7276 }
7277
7278 #[inline(always)]
7279 fn inline_size(_context: fidl::encoding::Context) -> usize {
7280 1
7281 }
7282 }
7283
7284 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedBool, D>
7285 for &AliasedBool
7286 {
7287 #[inline]
7288 unsafe fn encode(
7289 self,
7290 encoder: &mut fidl::encoding::Encoder<'_, D>,
7291 offset: usize,
7292 _depth: fidl::encoding::Depth,
7293 ) -> fidl::Result<()> {
7294 encoder.debug_check_bounds::<AliasedBool>(offset);
7295 fidl::encoding::Encode::<AliasedBool, D>::encode(
7297 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7298 encoder,
7299 offset,
7300 _depth,
7301 )
7302 }
7303 }
7304 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7305 fidl::encoding::Encode<AliasedBool, D> for (T0,)
7306 {
7307 #[inline]
7308 unsafe fn encode(
7309 self,
7310 encoder: &mut fidl::encoding::Encoder<'_, D>,
7311 offset: usize,
7312 depth: fidl::encoding::Depth,
7313 ) -> fidl::Result<()> {
7314 encoder.debug_check_bounds::<AliasedBool>(offset);
7315 self.0.encode(encoder, offset + 0, depth)?;
7319 Ok(())
7320 }
7321 }
7322
7323 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedBool {
7324 #[inline(always)]
7325 fn new_empty() -> Self {
7326 Self { value: fidl::new_empty!(bool, D) }
7327 }
7328
7329 #[inline]
7330 unsafe fn decode(
7331 &mut self,
7332 decoder: &mut fidl::encoding::Decoder<'_, D>,
7333 offset: usize,
7334 _depth: fidl::encoding::Depth,
7335 ) -> fidl::Result<()> {
7336 decoder.debug_check_bounds::<Self>(offset);
7337 fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7339 Ok(())
7340 }
7341 }
7342
7343 impl fidl::encoding::ValueTypeMarker for AliasedFloat64 {
7344 type Borrowed<'a> = &'a Self;
7345 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7346 value
7347 }
7348 }
7349
7350 unsafe impl fidl::encoding::TypeMarker for AliasedFloat64 {
7351 type Owned = Self;
7352
7353 #[inline(always)]
7354 fn inline_align(_context: fidl::encoding::Context) -> usize {
7355 8
7356 }
7357
7358 #[inline(always)]
7359 fn inline_size(_context: fidl::encoding::Context) -> usize {
7360 8
7361 }
7362 }
7363
7364 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedFloat64, D>
7365 for &AliasedFloat64
7366 {
7367 #[inline]
7368 unsafe fn encode(
7369 self,
7370 encoder: &mut fidl::encoding::Encoder<'_, D>,
7371 offset: usize,
7372 _depth: fidl::encoding::Depth,
7373 ) -> fidl::Result<()> {
7374 encoder.debug_check_bounds::<AliasedFloat64>(offset);
7375 fidl::encoding::Encode::<AliasedFloat64, D>::encode(
7377 (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7378 encoder,
7379 offset,
7380 _depth,
7381 )
7382 }
7383 }
7384 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
7385 fidl::encoding::Encode<AliasedFloat64, D> for (T0,)
7386 {
7387 #[inline]
7388 unsafe fn encode(
7389 self,
7390 encoder: &mut fidl::encoding::Encoder<'_, D>,
7391 offset: usize,
7392 depth: fidl::encoding::Depth,
7393 ) -> fidl::Result<()> {
7394 encoder.debug_check_bounds::<AliasedFloat64>(offset);
7395 self.0.encode(encoder, offset + 0, depth)?;
7399 Ok(())
7400 }
7401 }
7402
7403 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedFloat64 {
7404 #[inline(always)]
7405 fn new_empty() -> Self {
7406 Self { value: fidl::new_empty!(f64, D) }
7407 }
7408
7409 #[inline]
7410 unsafe fn decode(
7411 &mut self,
7412 decoder: &mut fidl::encoding::Decoder<'_, D>,
7413 offset: usize,
7414 _depth: fidl::encoding::Depth,
7415 ) -> fidl::Result<()> {
7416 decoder.debug_check_bounds::<Self>(offset);
7417 fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
7419 Ok(())
7420 }
7421 }
7422
7423 impl fidl::encoding::ValueTypeMarker for AliasedString {
7424 type Borrowed<'a> = &'a Self;
7425 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7426 value
7427 }
7428 }
7429
7430 unsafe impl fidl::encoding::TypeMarker for AliasedString {
7431 type Owned = Self;
7432
7433 #[inline(always)]
7434 fn inline_align(_context: fidl::encoding::Context) -> usize {
7435 8
7436 }
7437
7438 #[inline(always)]
7439 fn inline_size(_context: fidl::encoding::Context) -> usize {
7440 16
7441 }
7442 }
7443
7444 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedString, D>
7445 for &AliasedString
7446 {
7447 #[inline]
7448 unsafe fn encode(
7449 self,
7450 encoder: &mut fidl::encoding::Encoder<'_, D>,
7451 offset: usize,
7452 _depth: fidl::encoding::Depth,
7453 ) -> fidl::Result<()> {
7454 encoder.debug_check_bounds::<AliasedString>(offset);
7455 fidl::encoding::Encode::<AliasedString, D>::encode(
7457 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
7458 &self.value,
7459 ),),
7460 encoder,
7461 offset,
7462 _depth,
7463 )
7464 }
7465 }
7466 unsafe impl<
7467 D: fidl::encoding::ResourceDialect,
7468 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
7469 > fidl::encoding::Encode<AliasedString, D> for (T0,)
7470 {
7471 #[inline]
7472 unsafe fn encode(
7473 self,
7474 encoder: &mut fidl::encoding::Encoder<'_, D>,
7475 offset: usize,
7476 depth: fidl::encoding::Depth,
7477 ) -> fidl::Result<()> {
7478 encoder.debug_check_bounds::<AliasedString>(offset);
7479 self.0.encode(encoder, offset + 0, depth)?;
7483 Ok(())
7484 }
7485 }
7486
7487 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedString {
7488 #[inline(always)]
7489 fn new_empty() -> Self {
7490 Self { value: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
7491 }
7492
7493 #[inline]
7494 unsafe fn decode(
7495 &mut self,
7496 decoder: &mut fidl::encoding::Decoder<'_, D>,
7497 offset: usize,
7498 _depth: fidl::encoding::Depth,
7499 ) -> fidl::Result<()> {
7500 decoder.debug_check_bounds::<Self>(offset);
7501 fidl::decode!(
7503 fidl::encoding::UnboundedString,
7504 D,
7505 &mut self.value,
7506 decoder,
7507 offset + 0,
7508 _depth
7509 )?;
7510 Ok(())
7511 }
7512 }
7513
7514 impl fidl::encoding::ValueTypeMarker for AliasedStruct {
7515 type Borrowed<'a> = &'a Self;
7516 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7517 value
7518 }
7519 }
7520
7521 unsafe impl fidl::encoding::TypeMarker for AliasedStruct {
7522 type Owned = Self;
7523
7524 #[inline(always)]
7525 fn inline_align(_context: fidl::encoding::Context) -> usize {
7526 1
7527 }
7528
7529 #[inline(always)]
7530 fn inline_size(_context: fidl::encoding::Context) -> usize {
7531 1
7532 }
7533 }
7534
7535 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedStruct, D>
7536 for &AliasedStruct
7537 {
7538 #[inline]
7539 unsafe fn encode(
7540 self,
7541 encoder: &mut fidl::encoding::Encoder<'_, D>,
7542 offset: usize,
7543 _depth: fidl::encoding::Depth,
7544 ) -> fidl::Result<()> {
7545 encoder.debug_check_bounds::<AliasedStruct>(offset);
7546 fidl::encoding::Encode::<AliasedStruct, D>::encode(
7548 (<AnotherEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7549 encoder,
7550 offset,
7551 _depth,
7552 )
7553 }
7554 }
7555 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<AnotherEmptyStruct, D>>
7556 fidl::encoding::Encode<AliasedStruct, D> for (T0,)
7557 {
7558 #[inline]
7559 unsafe fn encode(
7560 self,
7561 encoder: &mut fidl::encoding::Encoder<'_, D>,
7562 offset: usize,
7563 depth: fidl::encoding::Depth,
7564 ) -> fidl::Result<()> {
7565 encoder.debug_check_bounds::<AliasedStruct>(offset);
7566 self.0.encode(encoder, offset + 0, depth)?;
7570 Ok(())
7571 }
7572 }
7573
7574 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedStruct {
7575 #[inline(always)]
7576 fn new_empty() -> Self {
7577 Self { value: fidl::new_empty!(AnotherEmptyStruct, D) }
7578 }
7579
7580 #[inline]
7581 unsafe fn decode(
7582 &mut self,
7583 decoder: &mut fidl::encoding::Decoder<'_, D>,
7584 offset: usize,
7585 _depth: fidl::encoding::Depth,
7586 ) -> fidl::Result<()> {
7587 decoder.debug_check_bounds::<Self>(offset);
7588 fidl::decode!(AnotherEmptyStruct, D, &mut self.value, decoder, offset + 0, _depth)?;
7590 Ok(())
7591 }
7592 }
7593
7594 impl fidl::encoding::ValueTypeMarker for AliasedUint64 {
7595 type Borrowed<'a> = &'a Self;
7596 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7597 value
7598 }
7599 }
7600
7601 unsafe impl fidl::encoding::TypeMarker for AliasedUint64 {
7602 type Owned = Self;
7603
7604 #[inline(always)]
7605 fn inline_align(_context: fidl::encoding::Context) -> usize {
7606 8
7607 }
7608
7609 #[inline(always)]
7610 fn inline_size(_context: fidl::encoding::Context) -> usize {
7611 8
7612 }
7613 #[inline(always)]
7614 fn encode_is_copy() -> bool {
7615 true
7616 }
7617
7618 #[inline(always)]
7619 fn decode_is_copy() -> bool {
7620 true
7621 }
7622 }
7623
7624 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedUint64, D>
7625 for &AliasedUint64
7626 {
7627 #[inline]
7628 unsafe fn encode(
7629 self,
7630 encoder: &mut fidl::encoding::Encoder<'_, D>,
7631 offset: usize,
7632 _depth: fidl::encoding::Depth,
7633 ) -> fidl::Result<()> {
7634 encoder.debug_check_bounds::<AliasedUint64>(offset);
7635 unsafe {
7636 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7638 (buf_ptr as *mut AliasedUint64)
7639 .write_unaligned((self as *const AliasedUint64).read());
7640 }
7643 Ok(())
7644 }
7645 }
7646 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7647 fidl::encoding::Encode<AliasedUint64, D> for (T0,)
7648 {
7649 #[inline]
7650 unsafe fn encode(
7651 self,
7652 encoder: &mut fidl::encoding::Encoder<'_, D>,
7653 offset: usize,
7654 depth: fidl::encoding::Depth,
7655 ) -> fidl::Result<()> {
7656 encoder.debug_check_bounds::<AliasedUint64>(offset);
7657 self.0.encode(encoder, offset + 0, depth)?;
7661 Ok(())
7662 }
7663 }
7664
7665 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedUint64 {
7666 #[inline(always)]
7667 fn new_empty() -> Self {
7668 Self { value: fidl::new_empty!(u64, D) }
7669 }
7670
7671 #[inline]
7672 unsafe fn decode(
7673 &mut self,
7674 decoder: &mut fidl::encoding::Decoder<'_, D>,
7675 offset: usize,
7676 _depth: fidl::encoding::Depth,
7677 ) -> fidl::Result<()> {
7678 decoder.debug_check_bounds::<Self>(offset);
7679 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7680 unsafe {
7683 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7684 }
7685 Ok(())
7686 }
7687 }
7688
7689 impl fidl::encoding::ValueTypeMarker for AnEmptyStructInStruct {
7690 type Borrowed<'a> = &'a Self;
7691 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7692 value
7693 }
7694 }
7695
7696 unsafe impl fidl::encoding::TypeMarker for AnEmptyStructInStruct {
7697 type Owned = Self;
7698
7699 #[inline(always)]
7700 fn inline_align(_context: fidl::encoding::Context) -> usize {
7701 1
7702 }
7703
7704 #[inline(always)]
7705 fn inline_size(_context: fidl::encoding::Context) -> usize {
7706 1
7707 }
7708 }
7709
7710 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnEmptyStructInStruct, D>
7711 for &AnEmptyStructInStruct
7712 {
7713 #[inline]
7714 unsafe fn encode(
7715 self,
7716 encoder: &mut fidl::encoding::Encoder<'_, D>,
7717 offset: usize,
7718 _depth: fidl::encoding::Depth,
7719 ) -> fidl::Result<()> {
7720 encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7721 fidl::encoding::Encode::<AnEmptyStructInStruct, D>::encode(
7723 (<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
7724 encoder,
7725 offset,
7726 _depth,
7727 )
7728 }
7729 }
7730 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStruct, D>>
7731 fidl::encoding::Encode<AnEmptyStructInStruct, D> for (T0,)
7732 {
7733 #[inline]
7734 unsafe fn encode(
7735 self,
7736 encoder: &mut fidl::encoding::Encoder<'_, D>,
7737 offset: usize,
7738 depth: fidl::encoding::Depth,
7739 ) -> fidl::Result<()> {
7740 encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7741 self.0.encode(encoder, offset + 0, depth)?;
7745 Ok(())
7746 }
7747 }
7748
7749 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnEmptyStructInStruct {
7750 #[inline(always)]
7751 fn new_empty() -> Self {
7752 Self { v: fidl::new_empty!(EmptyStruct, D) }
7753 }
7754
7755 #[inline]
7756 unsafe fn decode(
7757 &mut self,
7758 decoder: &mut fidl::encoding::Decoder<'_, D>,
7759 offset: usize,
7760 _depth: fidl::encoding::Depth,
7761 ) -> fidl::Result<()> {
7762 decoder.debug_check_bounds::<Self>(offset);
7763 fidl::decode!(EmptyStruct, D, &mut self.v, decoder, offset + 0, _depth)?;
7765 Ok(())
7766 }
7767 }
7768
7769 impl fidl::encoding::ValueTypeMarker for AnotherEmptyStruct {
7770 type Borrowed<'a> = &'a Self;
7771 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7772 value
7773 }
7774 }
7775
7776 unsafe impl fidl::encoding::TypeMarker for AnotherEmptyStruct {
7777 type Owned = Self;
7778
7779 #[inline(always)]
7780 fn inline_align(_context: fidl::encoding::Context) -> usize {
7781 1
7782 }
7783
7784 #[inline(always)]
7785 fn inline_size(_context: fidl::encoding::Context) -> usize {
7786 1
7787 }
7788 }
7789
7790 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnotherEmptyStruct, D>
7791 for &AnotherEmptyStruct
7792 {
7793 #[inline]
7794 unsafe fn encode(
7795 self,
7796 encoder: &mut fidl::encoding::Encoder<'_, D>,
7797 offset: usize,
7798 _depth: fidl::encoding::Depth,
7799 ) -> fidl::Result<()> {
7800 encoder.debug_check_bounds::<AnotherEmptyStruct>(offset);
7801 encoder.write_num(0u8, offset);
7802 Ok(())
7803 }
7804 }
7805
7806 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnotherEmptyStruct {
7807 #[inline(always)]
7808 fn new_empty() -> Self {
7809 Self
7810 }
7811
7812 #[inline]
7813 unsafe fn decode(
7814 &mut self,
7815 decoder: &mut fidl::encoding::Decoder<'_, D>,
7816 offset: usize,
7817 _depth: fidl::encoding::Depth,
7818 ) -> fidl::Result<()> {
7819 decoder.debug_check_bounds::<Self>(offset);
7820 match decoder.read_num::<u8>(offset) {
7821 0 => Ok(()),
7822 _ => Err(fidl::Error::Invalid),
7823 }
7824 }
7825 }
7826
7827 impl fidl::encoding::ValueTypeMarker for ArrayStruct {
7828 type Borrowed<'a> = &'a Self;
7829 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7830 value
7831 }
7832 }
7833
7834 unsafe impl fidl::encoding::TypeMarker for ArrayStruct {
7835 type Owned = Self;
7836
7837 #[inline(always)]
7838 fn inline_align(_context: fidl::encoding::Context) -> usize {
7839 8
7840 }
7841
7842 #[inline(always)]
7843 fn inline_size(_context: fidl::encoding::Context) -> usize {
7844 96
7845 }
7846 }
7847
7848 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArrayStruct, D>
7849 for &ArrayStruct
7850 {
7851 #[inline]
7852 unsafe fn encode(
7853 self,
7854 encoder: &mut fidl::encoding::Encoder<'_, D>,
7855 offset: usize,
7856 _depth: fidl::encoding::Depth,
7857 ) -> fidl::Result<()> {
7858 encoder.debug_check_bounds::<ArrayStruct>(offset);
7859 fidl::encoding::Encode::<ArrayStruct, D>::encode(
7861 (
7862 <fidl::encoding::Array<StringUnion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
7863 <fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.optional_unions),
7864 ),
7865 encoder, offset, _depth
7866 )
7867 }
7868 }
7869 unsafe impl<
7870 D: fidl::encoding::ResourceDialect,
7871 T0: fidl::encoding::Encode<fidl::encoding::Array<StringUnion, 3>, D>,
7872 T1: fidl::encoding::Encode<
7873 fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
7874 D,
7875 >,
7876 > fidl::encoding::Encode<ArrayStruct, D> for (T0, T1)
7877 {
7878 #[inline]
7879 unsafe fn encode(
7880 self,
7881 encoder: &mut fidl::encoding::Encoder<'_, D>,
7882 offset: usize,
7883 depth: fidl::encoding::Depth,
7884 ) -> fidl::Result<()> {
7885 encoder.debug_check_bounds::<ArrayStruct>(offset);
7886 self.0.encode(encoder, offset + 0, depth)?;
7890 self.1.encode(encoder, offset + 48, depth)?;
7891 Ok(())
7892 }
7893 }
7894
7895 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArrayStruct {
7896 #[inline(always)]
7897 fn new_empty() -> Self {
7898 Self {
7899 unions: fidl::new_empty!(fidl::encoding::Array<StringUnion, 3>, D),
7900 optional_unions: fidl::new_empty!(
7901 fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
7902 D
7903 ),
7904 }
7905 }
7906
7907 #[inline]
7908 unsafe fn decode(
7909 &mut self,
7910 decoder: &mut fidl::encoding::Decoder<'_, D>,
7911 offset: usize,
7912 _depth: fidl::encoding::Depth,
7913 ) -> fidl::Result<()> {
7914 decoder.debug_check_bounds::<Self>(offset);
7915 fidl::decode!(fidl::encoding::Array<StringUnion, 3>, D, &mut self.unions, decoder, offset + 0, _depth)?;
7917 fidl::decode!(
7918 fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
7919 D,
7920 &mut self.optional_unions,
7921 decoder,
7922 offset + 48,
7923 _depth
7924 )?;
7925 Ok(())
7926 }
7927 }
7928
7929 impl fidl::encoding::ValueTypeMarker for ArrayWithInternalPadding {
7930 type Borrowed<'a> = &'a Self;
7931 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7932 value
7933 }
7934 }
7935
7936 unsafe impl fidl::encoding::TypeMarker for ArrayWithInternalPadding {
7937 type Owned = Self;
7938
7939 #[inline(always)]
7940 fn inline_align(_context: fidl::encoding::Context) -> usize {
7941 4
7942 }
7943
7944 #[inline(always)]
7945 fn inline_size(_context: fidl::encoding::Context) -> usize {
7946 16
7947 }
7948 }
7949
7950 unsafe impl<D: fidl::encoding::ResourceDialect>
7951 fidl::encoding::Encode<ArrayWithInternalPadding, D> for &ArrayWithInternalPadding
7952 {
7953 #[inline]
7954 unsafe fn encode(
7955 self,
7956 encoder: &mut fidl::encoding::Encoder<'_, D>,
7957 offset: usize,
7958 _depth: fidl::encoding::Depth,
7959 ) -> fidl::Result<()> {
7960 encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
7961 unsafe {
7962 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7964 (buf_ptr as *mut ArrayWithInternalPadding)
7965 .write_unaligned((self as *const ArrayWithInternalPadding).read());
7966 let padding_ptr = buf_ptr.offset(0) as *mut u32;
7969 let padding_mask = 0xff000000u32;
7970 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
7971 let padding_ptr = buf_ptr.offset(8) as *mut u32;
7972 let padding_mask = 0xff000000u32;
7973 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
7974 }
7975 Ok(())
7976 }
7977 }
7978 unsafe impl<
7979 D: fidl::encoding::ResourceDialect,
7980 T0: fidl::encoding::Encode<fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D>,
7981 > fidl::encoding::Encode<ArrayWithInternalPadding, D> for (T0,)
7982 {
7983 #[inline]
7984 unsafe fn encode(
7985 self,
7986 encoder: &mut fidl::encoding::Encoder<'_, D>,
7987 offset: usize,
7988 depth: fidl::encoding::Depth,
7989 ) -> fidl::Result<()> {
7990 encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
7991 self.0.encode(encoder, offset + 0, depth)?;
7995 Ok(())
7996 }
7997 }
7998
7999 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8000 for ArrayWithInternalPadding
8001 {
8002 #[inline(always)]
8003 fn new_empty() -> Self {
8004 Self {
8005 v: fidl::new_empty!(fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D),
8006 }
8007 }
8008
8009 #[inline]
8010 unsafe fn decode(
8011 &mut self,
8012 decoder: &mut fidl::encoding::Decoder<'_, D>,
8013 offset: usize,
8014 _depth: fidl::encoding::Depth,
8015 ) -> fidl::Result<()> {
8016 decoder.debug_check_bounds::<Self>(offset);
8017 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8018 let ptr = unsafe { buf_ptr.offset(0) };
8020 let padval = unsafe { (ptr as *const u32).read_unaligned() };
8021 let mask = 0xff000000u32;
8022 let maskedval = padval & mask;
8023 if maskedval != 0 {
8024 return Err(fidl::Error::NonZeroPadding {
8025 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8026 });
8027 }
8028 let ptr = unsafe { buf_ptr.offset(8) };
8029 let padval = unsafe { (ptr as *const u32).read_unaligned() };
8030 let mask = 0xff000000u32;
8031 let maskedval = padval & mask;
8032 if maskedval != 0 {
8033 return Err(fidl::Error::NonZeroPadding {
8034 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8035 });
8036 }
8037 unsafe {
8039 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
8040 }
8041 Ok(())
8042 }
8043 }
8044
8045 impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableString {
8046 type Borrowed<'a> = &'a Self;
8047 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8048 value
8049 }
8050 }
8051
8052 unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableString {
8053 type Owned = Self;
8054
8055 #[inline(always)]
8056 fn inline_align(_context: fidl::encoding::Context) -> usize {
8057 8
8058 }
8059
8060 #[inline(always)]
8061 fn inline_size(_context: fidl::encoding::Context) -> usize {
8062 16
8063 }
8064 }
8065
8066 unsafe impl<D: fidl::encoding::ResourceDialect>
8067 fidl::encoding::Encode<Bounded32NonnullableString, D> for &Bounded32NonnullableString
8068 {
8069 #[inline]
8070 unsafe fn encode(
8071 self,
8072 encoder: &mut fidl::encoding::Encoder<'_, D>,
8073 offset: usize,
8074 _depth: fidl::encoding::Depth,
8075 ) -> fidl::Result<()> {
8076 encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8077 fidl::encoding::Encode::<Bounded32NonnullableString, D>::encode(
8079 (<fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
8080 &self.s0,
8081 ),),
8082 encoder,
8083 offset,
8084 _depth,
8085 )
8086 }
8087 }
8088 unsafe impl<
8089 D: fidl::encoding::ResourceDialect,
8090 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
8091 > fidl::encoding::Encode<Bounded32NonnullableString, D> for (T0,)
8092 {
8093 #[inline]
8094 unsafe fn encode(
8095 self,
8096 encoder: &mut fidl::encoding::Encoder<'_, D>,
8097 offset: usize,
8098 depth: fidl::encoding::Depth,
8099 ) -> fidl::Result<()> {
8100 encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8101 self.0.encode(encoder, offset + 0, depth)?;
8105 Ok(())
8106 }
8107 }
8108
8109 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8110 for Bounded32NonnullableString
8111 {
8112 #[inline(always)]
8113 fn new_empty() -> Self {
8114 Self { s0: fidl::new_empty!(fidl::encoding::BoundedString<32>, D) }
8115 }
8116
8117 #[inline]
8118 unsafe fn decode(
8119 &mut self,
8120 decoder: &mut fidl::encoding::Decoder<'_, D>,
8121 offset: usize,
8122 _depth: fidl::encoding::Depth,
8123 ) -> fidl::Result<()> {
8124 decoder.debug_check_bounds::<Self>(offset);
8125 fidl::decode!(
8127 fidl::encoding::BoundedString<32>,
8128 D,
8129 &mut self.s0,
8130 decoder,
8131 offset + 0,
8132 _depth
8133 )?;
8134 Ok(())
8135 }
8136 }
8137
8138 impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableVectorOfUint32s {
8139 type Borrowed<'a> = &'a Self;
8140 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8141 value
8142 }
8143 }
8144
8145 unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfUint32s {
8146 type Owned = Self;
8147
8148 #[inline(always)]
8149 fn inline_align(_context: fidl::encoding::Context) -> usize {
8150 8
8151 }
8152
8153 #[inline(always)]
8154 fn inline_size(_context: fidl::encoding::Context) -> usize {
8155 16
8156 }
8157 }
8158
8159 unsafe impl<D: fidl::encoding::ResourceDialect>
8160 fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D>
8161 for &Bounded32NonnullableVectorOfUint32s
8162 {
8163 #[inline]
8164 unsafe fn encode(
8165 self,
8166 encoder: &mut fidl::encoding::Encoder<'_, D>,
8167 offset: usize,
8168 _depth: fidl::encoding::Depth,
8169 ) -> fidl::Result<()> {
8170 encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8171 fidl::encoding::Encode::<Bounded32NonnullableVectorOfUint32s, D>::encode(
8173 (<fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
8174 &self.vu0,
8175 ),),
8176 encoder,
8177 offset,
8178 _depth,
8179 )
8180 }
8181 }
8182 unsafe impl<
8183 D: fidl::encoding::ResourceDialect,
8184 T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
8185 > fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D> for (T0,)
8186 {
8187 #[inline]
8188 unsafe fn encode(
8189 self,
8190 encoder: &mut fidl::encoding::Encoder<'_, D>,
8191 offset: usize,
8192 depth: fidl::encoding::Depth,
8193 ) -> fidl::Result<()> {
8194 encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8195 self.0.encode(encoder, offset + 0, depth)?;
8199 Ok(())
8200 }
8201 }
8202
8203 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8204 for Bounded32NonnullableVectorOfUint32s
8205 {
8206 #[inline(always)]
8207 fn new_empty() -> Self {
8208 Self { vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D) }
8209 }
8210
8211 #[inline]
8212 unsafe fn decode(
8213 &mut self,
8214 decoder: &mut fidl::encoding::Decoder<'_, D>,
8215 offset: usize,
8216 _depth: fidl::encoding::Depth,
8217 ) -> fidl::Result<()> {
8218 decoder.debug_check_bounds::<Self>(offset);
8219 fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
8221 Ok(())
8222 }
8223 }
8224
8225 impl fidl::encoding::ValueTypeMarker for Bounded32NullableString {
8226 type Borrowed<'a> = &'a Self;
8227 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8228 value
8229 }
8230 }
8231
8232 unsafe impl fidl::encoding::TypeMarker for Bounded32NullableString {
8233 type Owned = Self;
8234
8235 #[inline(always)]
8236 fn inline_align(_context: fidl::encoding::Context) -> usize {
8237 8
8238 }
8239
8240 #[inline(always)]
8241 fn inline_size(_context: fidl::encoding::Context) -> usize {
8242 16
8243 }
8244 }
8245
8246 unsafe impl<D: fidl::encoding::ResourceDialect>
8247 fidl::encoding::Encode<Bounded32NullableString, D> for &Bounded32NullableString
8248 {
8249 #[inline]
8250 unsafe fn encode(
8251 self,
8252 encoder: &mut fidl::encoding::Encoder<'_, D>,
8253 offset: usize,
8254 _depth: fidl::encoding::Depth,
8255 ) -> fidl::Result<()> {
8256 encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8257 fidl::encoding::Encode::<Bounded32NullableString, D>::encode(
8259 (
8260 <fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
8261 ),
8262 encoder, offset, _depth
8263 )
8264 }
8265 }
8266 unsafe impl<
8267 D: fidl::encoding::ResourceDialect,
8268 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
8269 > fidl::encoding::Encode<Bounded32NullableString, D> for (T0,)
8270 {
8271 #[inline]
8272 unsafe fn encode(
8273 self,
8274 encoder: &mut fidl::encoding::Encoder<'_, D>,
8275 offset: usize,
8276 depth: fidl::encoding::Depth,
8277 ) -> fidl::Result<()> {
8278 encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8279 self.0.encode(encoder, offset + 0, depth)?;
8283 Ok(())
8284 }
8285 }
8286
8287 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8288 for Bounded32NullableString
8289 {
8290 #[inline(always)]
8291 fn new_empty() -> Self {
8292 Self {
8293 s0: fidl::new_empty!(
8294 fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8295 D
8296 ),
8297 }
8298 }
8299
8300 #[inline]
8301 unsafe fn decode(
8302 &mut self,
8303 decoder: &mut fidl::encoding::Decoder<'_, D>,
8304 offset: usize,
8305 _depth: fidl::encoding::Depth,
8306 ) -> fidl::Result<()> {
8307 decoder.debug_check_bounds::<Self>(offset);
8308 fidl::decode!(
8310 fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8311 D,
8312 &mut self.s0,
8313 decoder,
8314 offset + 0,
8315 _depth
8316 )?;
8317 Ok(())
8318 }
8319 }
8320
8321 impl fidl::encoding::ValueTypeMarker for Bounded32NullableVectorOfUint32s {
8322 type Borrowed<'a> = &'a Self;
8323 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8324 value
8325 }
8326 }
8327
8328 unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfUint32s {
8329 type Owned = Self;
8330
8331 #[inline(always)]
8332 fn inline_align(_context: fidl::encoding::Context) -> usize {
8333 8
8334 }
8335
8336 #[inline(always)]
8337 fn inline_size(_context: fidl::encoding::Context) -> usize {
8338 16
8339 }
8340 }
8341
8342 unsafe impl<D: fidl::encoding::ResourceDialect>
8343 fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D>
8344 for &Bounded32NullableVectorOfUint32s
8345 {
8346 #[inline]
8347 unsafe fn encode(
8348 self,
8349 encoder: &mut fidl::encoding::Encoder<'_, D>,
8350 offset: usize,
8351 _depth: fidl::encoding::Depth,
8352 ) -> fidl::Result<()> {
8353 encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8354 fidl::encoding::Encode::<Bounded32NullableVectorOfUint32s, D>::encode(
8356 (
8357 <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
8358 ),
8359 encoder, offset, _depth
8360 )
8361 }
8362 }
8363 unsafe impl<
8364 D: fidl::encoding::ResourceDialect,
8365 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
8366 > fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D> for (T0,)
8367 {
8368 #[inline]
8369 unsafe fn encode(
8370 self,
8371 encoder: &mut fidl::encoding::Encoder<'_, D>,
8372 offset: usize,
8373 depth: fidl::encoding::Depth,
8374 ) -> fidl::Result<()> {
8375 encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8376 self.0.encode(encoder, offset + 0, depth)?;
8380 Ok(())
8381 }
8382 }
8383
8384 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8385 for Bounded32NullableVectorOfUint32s
8386 {
8387 #[inline(always)]
8388 fn new_empty() -> Self {
8389 Self {
8390 vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
8391 }
8392 }
8393
8394 #[inline]
8395 unsafe fn decode(
8396 &mut self,
8397 decoder: &mut fidl::encoding::Decoder<'_, D>,
8398 offset: usize,
8399 _depth: fidl::encoding::Depth,
8400 ) -> fidl::Result<()> {
8401 decoder.debug_check_bounds::<Self>(offset);
8402 fidl::decode!(
8404 fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
8405 D,
8406 &mut self.vu0,
8407 decoder,
8408 offset + 0,
8409 _depth
8410 )?;
8411 Ok(())
8412 }
8413 }
8414
8415 impl fidl::encoding::ValueTypeMarker for CompatTable {
8416 type Borrowed<'a> = &'a Self;
8417 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8418 value
8419 }
8420 }
8421
8422 unsafe impl fidl::encoding::TypeMarker for CompatTable {
8423 type Owned = Self;
8424
8425 #[inline(always)]
8426 fn inline_align(_context: fidl::encoding::Context) -> usize {
8427 8
8428 }
8429
8430 #[inline(always)]
8431 fn inline_size(_context: fidl::encoding::Context) -> usize {
8432 32
8433 }
8434 }
8435
8436 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTable, D>
8437 for &CompatTable
8438 {
8439 #[inline]
8440 unsafe fn encode(
8441 self,
8442 encoder: &mut fidl::encoding::Encoder<'_, D>,
8443 offset: usize,
8444 _depth: fidl::encoding::Depth,
8445 ) -> fidl::Result<()> {
8446 encoder.debug_check_bounds::<CompatTable>(offset);
8447 fidl::encoding::Encode::<CompatTable, D>::encode(
8449 (
8450 <CompatTableValue as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
8451 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8452 &self.empty,
8453 ),
8454 ),
8455 encoder,
8456 offset,
8457 _depth,
8458 )
8459 }
8460 }
8461 unsafe impl<
8462 D: fidl::encoding::ResourceDialect,
8463 T0: fidl::encoding::Encode<CompatTableValue, D>,
8464 T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8465 > fidl::encoding::Encode<CompatTable, D> for (T0, T1)
8466 {
8467 #[inline]
8468 unsafe fn encode(
8469 self,
8470 encoder: &mut fidl::encoding::Encoder<'_, D>,
8471 offset: usize,
8472 depth: fidl::encoding::Depth,
8473 ) -> fidl::Result<()> {
8474 encoder.debug_check_bounds::<CompatTable>(offset);
8475 self.0.encode(encoder, offset + 0, depth)?;
8479 self.1.encode(encoder, offset + 16, depth)?;
8480 Ok(())
8481 }
8482 }
8483
8484 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTable {
8485 #[inline(always)]
8486 fn new_empty() -> Self {
8487 Self {
8488 value: fidl::new_empty!(CompatTableValue, D),
8489 empty: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8490 }
8491 }
8492
8493 #[inline]
8494 unsafe fn decode(
8495 &mut self,
8496 decoder: &mut fidl::encoding::Decoder<'_, D>,
8497 offset: usize,
8498 _depth: fidl::encoding::Depth,
8499 ) -> fidl::Result<()> {
8500 decoder.debug_check_bounds::<Self>(offset);
8501 fidl::decode!(CompatTableValue, D, &mut self.value, decoder, offset + 0, _depth)?;
8503 fidl::decode!(
8504 fidl::encoding::UnboundedString,
8505 D,
8506 &mut self.empty,
8507 decoder,
8508 offset + 16,
8509 _depth
8510 )?;
8511 Ok(())
8512 }
8513 }
8514
8515 impl fidl::encoding::ValueTypeMarker for EmptyBitsStruct {
8516 type Borrowed<'a> = &'a Self;
8517 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8518 value
8519 }
8520 }
8521
8522 unsafe impl fidl::encoding::TypeMarker for EmptyBitsStruct {
8523 type Owned = Self;
8524
8525 #[inline(always)]
8526 fn inline_align(_context: fidl::encoding::Context) -> usize {
8527 4
8528 }
8529
8530 #[inline(always)]
8531 fn inline_size(_context: fidl::encoding::Context) -> usize {
8532 4
8533 }
8534 }
8535
8536 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyBitsStruct, D>
8537 for &EmptyBitsStruct
8538 {
8539 #[inline]
8540 unsafe fn encode(
8541 self,
8542 encoder: &mut fidl::encoding::Encoder<'_, D>,
8543 offset: usize,
8544 _depth: fidl::encoding::Depth,
8545 ) -> fidl::Result<()> {
8546 encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8547 fidl::encoding::Encode::<EmptyBitsStruct, D>::encode(
8549 (<EmptyBits as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
8550 encoder,
8551 offset,
8552 _depth,
8553 )
8554 }
8555 }
8556 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyBits, D>>
8557 fidl::encoding::Encode<EmptyBitsStruct, D> for (T0,)
8558 {
8559 #[inline]
8560 unsafe fn encode(
8561 self,
8562 encoder: &mut fidl::encoding::Encoder<'_, D>,
8563 offset: usize,
8564 depth: fidl::encoding::Depth,
8565 ) -> fidl::Result<()> {
8566 encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8567 self.0.encode(encoder, offset + 0, depth)?;
8571 Ok(())
8572 }
8573 }
8574
8575 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBitsStruct {
8576 #[inline(always)]
8577 fn new_empty() -> Self {
8578 Self { b: fidl::new_empty!(EmptyBits, D) }
8579 }
8580
8581 #[inline]
8582 unsafe fn decode(
8583 &mut self,
8584 decoder: &mut fidl::encoding::Decoder<'_, D>,
8585 offset: usize,
8586 _depth: fidl::encoding::Depth,
8587 ) -> fidl::Result<()> {
8588 decoder.debug_check_bounds::<Self>(offset);
8589 fidl::decode!(EmptyBits, D, &mut self.b, decoder, offset + 0, _depth)?;
8591 Ok(())
8592 }
8593 }
8594
8595 impl fidl::encoding::ValueTypeMarker for EmptyEnumStruct {
8596 type Borrowed<'a> = &'a Self;
8597 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8598 value
8599 }
8600 }
8601
8602 unsafe impl fidl::encoding::TypeMarker for EmptyEnumStruct {
8603 type Owned = Self;
8604
8605 #[inline(always)]
8606 fn inline_align(_context: fidl::encoding::Context) -> usize {
8607 4
8608 }
8609
8610 #[inline(always)]
8611 fn inline_size(_context: fidl::encoding::Context) -> usize {
8612 4
8613 }
8614 }
8615
8616 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyEnumStruct, D>
8617 for &EmptyEnumStruct
8618 {
8619 #[inline]
8620 unsafe fn encode(
8621 self,
8622 encoder: &mut fidl::encoding::Encoder<'_, D>,
8623 offset: usize,
8624 _depth: fidl::encoding::Depth,
8625 ) -> fidl::Result<()> {
8626 encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8627 fidl::encoding::Encode::<EmptyEnumStruct, D>::encode(
8629 (<EmptyEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
8630 encoder,
8631 offset,
8632 _depth,
8633 )
8634 }
8635 }
8636 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyEnum, D>>
8637 fidl::encoding::Encode<EmptyEnumStruct, D> for (T0,)
8638 {
8639 #[inline]
8640 unsafe fn encode(
8641 self,
8642 encoder: &mut fidl::encoding::Encoder<'_, D>,
8643 offset: usize,
8644 depth: fidl::encoding::Depth,
8645 ) -> fidl::Result<()> {
8646 encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8647 self.0.encode(encoder, offset + 0, depth)?;
8651 Ok(())
8652 }
8653 }
8654
8655 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnumStruct {
8656 #[inline(always)]
8657 fn new_empty() -> Self {
8658 Self { e: fidl::new_empty!(EmptyEnum, D) }
8659 }
8660
8661 #[inline]
8662 unsafe fn decode(
8663 &mut self,
8664 decoder: &mut fidl::encoding::Decoder<'_, D>,
8665 offset: usize,
8666 _depth: fidl::encoding::Depth,
8667 ) -> fidl::Result<()> {
8668 decoder.debug_check_bounds::<Self>(offset);
8669 fidl::decode!(EmptyEnum, D, &mut self.e, decoder, offset + 0, _depth)?;
8671 Ok(())
8672 }
8673 }
8674
8675 impl fidl::encoding::ValueTypeMarker for EmptyStruct {
8676 type Borrowed<'a> = &'a Self;
8677 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8678 value
8679 }
8680 }
8681
8682 unsafe impl fidl::encoding::TypeMarker for EmptyStruct {
8683 type Owned = Self;
8684
8685 #[inline(always)]
8686 fn inline_align(_context: fidl::encoding::Context) -> usize {
8687 1
8688 }
8689
8690 #[inline(always)]
8691 fn inline_size(_context: fidl::encoding::Context) -> usize {
8692 1
8693 }
8694 }
8695
8696 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStruct, D>
8697 for &EmptyStruct
8698 {
8699 #[inline]
8700 unsafe fn encode(
8701 self,
8702 encoder: &mut fidl::encoding::Encoder<'_, D>,
8703 offset: usize,
8704 _depth: fidl::encoding::Depth,
8705 ) -> fidl::Result<()> {
8706 encoder.debug_check_bounds::<EmptyStruct>(offset);
8707 encoder.write_num(0u8, offset);
8708 Ok(())
8709 }
8710 }
8711
8712 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStruct {
8713 #[inline(always)]
8714 fn new_empty() -> Self {
8715 Self
8716 }
8717
8718 #[inline]
8719 unsafe fn decode(
8720 &mut self,
8721 decoder: &mut fidl::encoding::Decoder<'_, D>,
8722 offset: usize,
8723 _depth: fidl::encoding::Depth,
8724 ) -> fidl::Result<()> {
8725 decoder.debug_check_bounds::<Self>(offset);
8726 match decoder.read_num::<u8>(offset) {
8727 0 => Ok(()),
8728 _ => Err(fidl::Error::Invalid),
8729 }
8730 }
8731 }
8732
8733 impl fidl::encoding::ValueTypeMarker for EmptyStructSandwich {
8734 type Borrowed<'a> = &'a Self;
8735 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8736 value
8737 }
8738 }
8739
8740 unsafe impl fidl::encoding::TypeMarker for EmptyStructSandwich {
8741 type Owned = Self;
8742
8743 #[inline(always)]
8744 fn inline_align(_context: fidl::encoding::Context) -> usize {
8745 8
8746 }
8747
8748 #[inline(always)]
8749 fn inline_size(_context: fidl::encoding::Context) -> usize {
8750 40
8751 }
8752 }
8753
8754 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructSandwich, D>
8755 for &EmptyStructSandwich
8756 {
8757 #[inline]
8758 unsafe fn encode(
8759 self,
8760 encoder: &mut fidl::encoding::Encoder<'_, D>,
8761 offset: usize,
8762 _depth: fidl::encoding::Depth,
8763 ) -> fidl::Result<()> {
8764 encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8765 fidl::encoding::Encode::<EmptyStructSandwich, D>::encode(
8767 (
8768 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8769 &self.before,
8770 ),
8771 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
8772 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8773 &self.after,
8774 ),
8775 ),
8776 encoder,
8777 offset,
8778 _depth,
8779 )
8780 }
8781 }
8782 unsafe impl<
8783 D: fidl::encoding::ResourceDialect,
8784 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8785 T1: fidl::encoding::Encode<EmptyStruct, D>,
8786 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8787 > fidl::encoding::Encode<EmptyStructSandwich, D> for (T0, T1, T2)
8788 {
8789 #[inline]
8790 unsafe fn encode(
8791 self,
8792 encoder: &mut fidl::encoding::Encoder<'_, D>,
8793 offset: usize,
8794 depth: fidl::encoding::Depth,
8795 ) -> fidl::Result<()> {
8796 encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8797 unsafe {
8800 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8801 (ptr as *mut u64).write_unaligned(0);
8802 }
8803 self.0.encode(encoder, offset + 0, depth)?;
8805 self.1.encode(encoder, offset + 16, depth)?;
8806 self.2.encode(encoder, offset + 24, depth)?;
8807 Ok(())
8808 }
8809 }
8810
8811 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructSandwich {
8812 #[inline(always)]
8813 fn new_empty() -> Self {
8814 Self {
8815 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8816 es: fidl::new_empty!(EmptyStruct, D),
8817 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8818 }
8819 }
8820
8821 #[inline]
8822 unsafe fn decode(
8823 &mut self,
8824 decoder: &mut fidl::encoding::Decoder<'_, D>,
8825 offset: usize,
8826 _depth: fidl::encoding::Depth,
8827 ) -> fidl::Result<()> {
8828 decoder.debug_check_bounds::<Self>(offset);
8829 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8831 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8832 let mask = 0xffffffffffffff00u64;
8833 let maskedval = padval & mask;
8834 if maskedval != 0 {
8835 return Err(fidl::Error::NonZeroPadding {
8836 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8837 });
8838 }
8839 fidl::decode!(
8840 fidl::encoding::UnboundedString,
8841 D,
8842 &mut self.before,
8843 decoder,
8844 offset + 0,
8845 _depth
8846 )?;
8847 fidl::decode!(EmptyStruct, D, &mut self.es, decoder, offset + 16, _depth)?;
8848 fidl::decode!(
8849 fidl::encoding::UnboundedString,
8850 D,
8851 &mut self.after,
8852 decoder,
8853 offset + 24,
8854 _depth
8855 )?;
8856 Ok(())
8857 }
8858 }
8859
8860 impl fidl::encoding::ValueTypeMarker for EmptyStructUnionStruct {
8861 type Borrowed<'a> = &'a Self;
8862 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8863 value
8864 }
8865 }
8866
8867 unsafe impl fidl::encoding::TypeMarker for EmptyStructUnionStruct {
8868 type Owned = Self;
8869
8870 #[inline(always)]
8871 fn inline_align(_context: fidl::encoding::Context) -> usize {
8872 8
8873 }
8874
8875 #[inline(always)]
8876 fn inline_size(_context: fidl::encoding::Context) -> usize {
8877 16
8878 }
8879 }
8880
8881 unsafe impl<D: fidl::encoding::ResourceDialect>
8882 fidl::encoding::Encode<EmptyStructUnionStruct, D> for &EmptyStructUnionStruct
8883 {
8884 #[inline]
8885 unsafe fn encode(
8886 self,
8887 encoder: &mut fidl::encoding::Encoder<'_, D>,
8888 offset: usize,
8889 _depth: fidl::encoding::Depth,
8890 ) -> fidl::Result<()> {
8891 encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
8892 fidl::encoding::Encode::<EmptyStructUnionStruct, D>::encode(
8894 (<EmptyStructUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
8895 encoder,
8896 offset,
8897 _depth,
8898 )
8899 }
8900 }
8901 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStructUnion, D>>
8902 fidl::encoding::Encode<EmptyStructUnionStruct, D> for (T0,)
8903 {
8904 #[inline]
8905 unsafe fn encode(
8906 self,
8907 encoder: &mut fidl::encoding::Encoder<'_, D>,
8908 offset: usize,
8909 depth: fidl::encoding::Depth,
8910 ) -> fidl::Result<()> {
8911 encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
8912 self.0.encode(encoder, offset + 0, depth)?;
8916 Ok(())
8917 }
8918 }
8919
8920 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8921 for EmptyStructUnionStruct
8922 {
8923 #[inline(always)]
8924 fn new_empty() -> Self {
8925 Self { u: fidl::new_empty!(EmptyStructUnion, D) }
8926 }
8927
8928 #[inline]
8929 unsafe fn decode(
8930 &mut self,
8931 decoder: &mut fidl::encoding::Decoder<'_, D>,
8932 offset: usize,
8933 _depth: fidl::encoding::Depth,
8934 ) -> fidl::Result<()> {
8935 decoder.debug_check_bounds::<Self>(offset);
8936 fidl::decode!(EmptyStructUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
8938 Ok(())
8939 }
8940 }
8941
8942 impl fidl::encoding::ValueTypeMarker for EmptyStructsInArrayInStruct {
8943 type Borrowed<'a> = &'a Self;
8944 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8945 value
8946 }
8947 }
8948
8949 unsafe impl fidl::encoding::TypeMarker for EmptyStructsInArrayInStruct {
8950 type Owned = Self;
8951
8952 #[inline(always)]
8953 fn inline_align(_context: fidl::encoding::Context) -> usize {
8954 1
8955 }
8956
8957 #[inline(always)]
8958 fn inline_size(_context: fidl::encoding::Context) -> usize {
8959 4
8960 }
8961 }
8962
8963 unsafe impl<D: fidl::encoding::ResourceDialect>
8964 fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for &EmptyStructsInArrayInStruct
8965 {
8966 #[inline]
8967 unsafe fn encode(
8968 self,
8969 encoder: &mut fidl::encoding::Encoder<'_, D>,
8970 offset: usize,
8971 _depth: fidl::encoding::Depth,
8972 ) -> fidl::Result<()> {
8973 encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
8974 fidl::encoding::Encode::<EmptyStructsInArrayInStruct, D>::encode(
8976 (
8977 <fidl::encoding::Array<EmptyStruct, 4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
8978 ),
8979 encoder, offset, _depth
8980 )
8981 }
8982 }
8983 unsafe impl<
8984 D: fidl::encoding::ResourceDialect,
8985 T0: fidl::encoding::Encode<fidl::encoding::Array<EmptyStruct, 4>, D>,
8986 > fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for (T0,)
8987 {
8988 #[inline]
8989 unsafe fn encode(
8990 self,
8991 encoder: &mut fidl::encoding::Encoder<'_, D>,
8992 offset: usize,
8993 depth: fidl::encoding::Depth,
8994 ) -> fidl::Result<()> {
8995 encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
8996 self.0.encode(encoder, offset + 0, depth)?;
9000 Ok(())
9001 }
9002 }
9003
9004 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9005 for EmptyStructsInArrayInStruct
9006 {
9007 #[inline(always)]
9008 fn new_empty() -> Self {
9009 Self { v: fidl::new_empty!(fidl::encoding::Array<EmptyStruct, 4>, D) }
9010 }
9011
9012 #[inline]
9013 unsafe fn decode(
9014 &mut self,
9015 decoder: &mut fidl::encoding::Decoder<'_, D>,
9016 offset: usize,
9017 _depth: fidl::encoding::Depth,
9018 ) -> fidl::Result<()> {
9019 decoder.debug_check_bounds::<Self>(offset);
9020 fidl::decode!(fidl::encoding::Array<EmptyStruct, 4>, D, &mut self.v, decoder, offset + 0, _depth)?;
9022 Ok(())
9023 }
9024 }
9025
9026 impl fidl::encoding::ValueTypeMarker for EmptyStructsInVectorInStruct {
9027 type Borrowed<'a> = &'a Self;
9028 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9029 value
9030 }
9031 }
9032
9033 unsafe impl fidl::encoding::TypeMarker for EmptyStructsInVectorInStruct {
9034 type Owned = Self;
9035
9036 #[inline(always)]
9037 fn inline_align(_context: fidl::encoding::Context) -> usize {
9038 8
9039 }
9040
9041 #[inline(always)]
9042 fn inline_size(_context: fidl::encoding::Context) -> usize {
9043 16
9044 }
9045 }
9046
9047 unsafe impl<D: fidl::encoding::ResourceDialect>
9048 fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for &EmptyStructsInVectorInStruct
9049 {
9050 #[inline]
9051 unsafe fn encode(
9052 self,
9053 encoder: &mut fidl::encoding::Encoder<'_, D>,
9054 offset: usize,
9055 _depth: fidl::encoding::Depth,
9056 ) -> fidl::Result<()> {
9057 encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9058 fidl::encoding::Encode::<EmptyStructsInVectorInStruct, D>::encode(
9060 (
9061 <fidl::encoding::UnboundedVector<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
9062 ),
9063 encoder, offset, _depth
9064 )
9065 }
9066 }
9067 unsafe impl<
9068 D: fidl::encoding::ResourceDialect,
9069 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<EmptyStruct>, D>,
9070 > fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for (T0,)
9071 {
9072 #[inline]
9073 unsafe fn encode(
9074 self,
9075 encoder: &mut fidl::encoding::Encoder<'_, D>,
9076 offset: usize,
9077 depth: fidl::encoding::Depth,
9078 ) -> fidl::Result<()> {
9079 encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9080 self.0.encode(encoder, offset + 0, depth)?;
9084 Ok(())
9085 }
9086 }
9087
9088 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9089 for EmptyStructsInVectorInStruct
9090 {
9091 #[inline(always)]
9092 fn new_empty() -> Self {
9093 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<EmptyStruct>, D) }
9094 }
9095
9096 #[inline]
9097 unsafe fn decode(
9098 &mut self,
9099 decoder: &mut fidl::encoding::Decoder<'_, D>,
9100 offset: usize,
9101 _depth: fidl::encoding::Depth,
9102 ) -> fidl::Result<()> {
9103 decoder.debug_check_bounds::<Self>(offset);
9104 fidl::decode!(
9106 fidl::encoding::UnboundedVector<EmptyStruct>,
9107 D,
9108 &mut self.v,
9109 decoder,
9110 offset + 0,
9111 _depth
9112 )?;
9113 Ok(())
9114 }
9115 }
9116
9117 impl fidl::encoding::ValueTypeMarker for FidlvizStruct1 {
9118 type Borrowed<'a> = &'a Self;
9119 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9120 value
9121 }
9122 }
9123
9124 unsafe impl fidl::encoding::TypeMarker for FidlvizStruct1 {
9125 type Owned = Self;
9126
9127 #[inline(always)]
9128 fn inline_align(_context: fidl::encoding::Context) -> usize {
9129 1
9130 }
9131
9132 #[inline(always)]
9133 fn inline_size(_context: fidl::encoding::Context) -> usize {
9134 1
9135 }
9136 }
9137
9138 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct1, D>
9139 for &FidlvizStruct1
9140 {
9141 #[inline]
9142 unsafe fn encode(
9143 self,
9144 encoder: &mut fidl::encoding::Encoder<'_, D>,
9145 offset: usize,
9146 _depth: fidl::encoding::Depth,
9147 ) -> fidl::Result<()> {
9148 encoder.debug_check_bounds::<FidlvizStruct1>(offset);
9149 encoder.write_num(0u8, offset);
9150 Ok(())
9151 }
9152 }
9153
9154 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct1 {
9155 #[inline(always)]
9156 fn new_empty() -> Self {
9157 Self
9158 }
9159
9160 #[inline]
9161 unsafe fn decode(
9162 &mut self,
9163 decoder: &mut fidl::encoding::Decoder<'_, D>,
9164 offset: usize,
9165 _depth: fidl::encoding::Depth,
9166 ) -> fidl::Result<()> {
9167 decoder.debug_check_bounds::<Self>(offset);
9168 match decoder.read_num::<u8>(offset) {
9169 0 => Ok(()),
9170 _ => Err(fidl::Error::Invalid),
9171 }
9172 }
9173 }
9174
9175 impl fidl::encoding::ValueTypeMarker for FidlvizStruct2 {
9176 type Borrowed<'a> = &'a Self;
9177 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9178 value
9179 }
9180 }
9181
9182 unsafe impl fidl::encoding::TypeMarker for FidlvizStruct2 {
9183 type Owned = Self;
9184
9185 #[inline(always)]
9186 fn inline_align(_context: fidl::encoding::Context) -> usize {
9187 8
9188 }
9189
9190 #[inline(always)]
9191 fn inline_size(_context: fidl::encoding::Context) -> usize {
9192 8
9193 }
9194 #[inline(always)]
9195 fn encode_is_copy() -> bool {
9196 true
9197 }
9198
9199 #[inline(always)]
9200 fn decode_is_copy() -> bool {
9201 true
9202 }
9203 }
9204
9205 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct2, D>
9206 for &FidlvizStruct2
9207 {
9208 #[inline]
9209 unsafe fn encode(
9210 self,
9211 encoder: &mut fidl::encoding::Encoder<'_, D>,
9212 offset: usize,
9213 _depth: fidl::encoding::Depth,
9214 ) -> fidl::Result<()> {
9215 encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9216 unsafe {
9217 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9219 (buf_ptr as *mut FidlvizStruct2)
9220 .write_unaligned((self as *const FidlvizStruct2).read());
9221 }
9224 Ok(())
9225 }
9226 }
9227 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9228 fidl::encoding::Encode<FidlvizStruct2, D> for (T0,)
9229 {
9230 #[inline]
9231 unsafe fn encode(
9232 self,
9233 encoder: &mut fidl::encoding::Encoder<'_, D>,
9234 offset: usize,
9235 depth: fidl::encoding::Depth,
9236 ) -> fidl::Result<()> {
9237 encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9238 self.0.encode(encoder, offset + 0, depth)?;
9242 Ok(())
9243 }
9244 }
9245
9246 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct2 {
9247 #[inline(always)]
9248 fn new_empty() -> Self {
9249 Self { x: fidl::new_empty!(u64, D) }
9250 }
9251
9252 #[inline]
9253 unsafe fn decode(
9254 &mut self,
9255 decoder: &mut fidl::encoding::Decoder<'_, D>,
9256 offset: usize,
9257 _depth: fidl::encoding::Depth,
9258 ) -> fidl::Result<()> {
9259 decoder.debug_check_bounds::<Self>(offset);
9260 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9261 unsafe {
9264 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9265 }
9266 Ok(())
9267 }
9268 }
9269
9270 impl fidl::encoding::ValueTypeMarker for FileGetAttrResponse {
9271 type Borrowed<'a> = &'a Self;
9272 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9273 value
9274 }
9275 }
9276
9277 unsafe impl fidl::encoding::TypeMarker for FileGetAttrResponse {
9278 type Owned = Self;
9279
9280 #[inline(always)]
9281 fn inline_align(_context: fidl::encoding::Context) -> usize {
9282 8
9283 }
9284
9285 #[inline(always)]
9286 fn inline_size(_context: fidl::encoding::Context) -> usize {
9287 64
9288 }
9289 }
9290
9291 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FileGetAttrResponse, D>
9292 for &FileGetAttrResponse
9293 {
9294 #[inline]
9295 unsafe fn encode(
9296 self,
9297 encoder: &mut fidl::encoding::Encoder<'_, D>,
9298 offset: usize,
9299 _depth: fidl::encoding::Depth,
9300 ) -> fidl::Result<()> {
9301 encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9302 unsafe {
9303 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9305 (buf_ptr as *mut FileGetAttrResponse)
9306 .write_unaligned((self as *const FileGetAttrResponse).read());
9307 let padding_ptr = buf_ptr.offset(0) as *mut u64;
9310 let padding_mask = 0xffffffff00000000u64;
9311 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9312 let padding_ptr = buf_ptr.offset(8) as *mut u64;
9313 let padding_mask = 0xffffffff00000000u64;
9314 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9315 }
9316 Ok(())
9317 }
9318 }
9319 unsafe impl<
9320 D: fidl::encoding::ResourceDialect,
9321 T0: fidl::encoding::Encode<i32, D>,
9322 T1: fidl::encoding::Encode<NodeAttributes, D>,
9323 > fidl::encoding::Encode<FileGetAttrResponse, D> for (T0, T1)
9324 {
9325 #[inline]
9326 unsafe fn encode(
9327 self,
9328 encoder: &mut fidl::encoding::Encoder<'_, D>,
9329 offset: usize,
9330 depth: fidl::encoding::Depth,
9331 ) -> fidl::Result<()> {
9332 encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9333 unsafe {
9336 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9337 (ptr as *mut u64).write_unaligned(0);
9338 }
9339 self.0.encode(encoder, offset + 0, depth)?;
9341 self.1.encode(encoder, offset + 8, depth)?;
9342 Ok(())
9343 }
9344 }
9345
9346 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FileGetAttrResponse {
9347 #[inline(always)]
9348 fn new_empty() -> Self {
9349 Self { s: fidl::new_empty!(i32, D), attributes: fidl::new_empty!(NodeAttributes, D) }
9350 }
9351
9352 #[inline]
9353 unsafe fn decode(
9354 &mut self,
9355 decoder: &mut fidl::encoding::Decoder<'_, D>,
9356 offset: usize,
9357 _depth: fidl::encoding::Depth,
9358 ) -> fidl::Result<()> {
9359 decoder.debug_check_bounds::<Self>(offset);
9360 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9361 let ptr = unsafe { buf_ptr.offset(0) };
9363 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9364 let mask = 0xffffffff00000000u64;
9365 let maskedval = padval & mask;
9366 if maskedval != 0 {
9367 return Err(fidl::Error::NonZeroPadding {
9368 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9369 });
9370 }
9371 let ptr = unsafe { buf_ptr.offset(8) };
9372 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9373 let mask = 0xffffffff00000000u64;
9374 let maskedval = padval & mask;
9375 if maskedval != 0 {
9376 return Err(fidl::Error::NonZeroPadding {
9377 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9378 });
9379 }
9380 unsafe {
9382 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 64);
9383 }
9384 Ok(())
9385 }
9386 }
9387
9388 impl fidl::encoding::ValueTypeMarker for FiveByte {
9389 type Borrowed<'a> = &'a Self;
9390 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9391 value
9392 }
9393 }
9394
9395 unsafe impl fidl::encoding::TypeMarker for FiveByte {
9396 type Owned = Self;
9397
9398 #[inline(always)]
9399 fn inline_align(_context: fidl::encoding::Context) -> usize {
9400 4
9401 }
9402
9403 #[inline(always)]
9404 fn inline_size(_context: fidl::encoding::Context) -> usize {
9405 8
9406 }
9407 }
9408
9409 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByte, D> for &FiveByte {
9410 #[inline]
9411 unsafe fn encode(
9412 self,
9413 encoder: &mut fidl::encoding::Encoder<'_, D>,
9414 offset: usize,
9415 _depth: fidl::encoding::Depth,
9416 ) -> fidl::Result<()> {
9417 encoder.debug_check_bounds::<FiveByte>(offset);
9418 unsafe {
9419 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9421 (buf_ptr as *mut FiveByte).write_unaligned((self as *const FiveByte).read());
9422 let padding_ptr = buf_ptr.offset(4) as *mut u32;
9425 let padding_mask = 0xffffff00u32;
9426 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9427 }
9428 Ok(())
9429 }
9430 }
9431 unsafe impl<
9432 D: fidl::encoding::ResourceDialect,
9433 T0: fidl::encoding::Encode<u32, D>,
9434 T1: fidl::encoding::Encode<u8, D>,
9435 > fidl::encoding::Encode<FiveByte, D> for (T0, T1)
9436 {
9437 #[inline]
9438 unsafe fn encode(
9439 self,
9440 encoder: &mut fidl::encoding::Encoder<'_, D>,
9441 offset: usize,
9442 depth: fidl::encoding::Depth,
9443 ) -> fidl::Result<()> {
9444 encoder.debug_check_bounds::<FiveByte>(offset);
9445 unsafe {
9448 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
9449 (ptr as *mut u32).write_unaligned(0);
9450 }
9451 self.0.encode(encoder, offset + 0, depth)?;
9453 self.1.encode(encoder, offset + 4, depth)?;
9454 Ok(())
9455 }
9456 }
9457
9458 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByte {
9459 #[inline(always)]
9460 fn new_empty() -> Self {
9461 Self { elem1: fidl::new_empty!(u32, D), elem2: fidl::new_empty!(u8, D) }
9462 }
9463
9464 #[inline]
9465 unsafe fn decode(
9466 &mut self,
9467 decoder: &mut fidl::encoding::Decoder<'_, D>,
9468 offset: usize,
9469 _depth: fidl::encoding::Depth,
9470 ) -> fidl::Result<()> {
9471 decoder.debug_check_bounds::<Self>(offset);
9472 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9473 let ptr = unsafe { buf_ptr.offset(4) };
9475 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9476 let mask = 0xffffff00u32;
9477 let maskedval = padval & mask;
9478 if maskedval != 0 {
9479 return Err(fidl::Error::NonZeroPadding {
9480 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9481 });
9482 }
9483 unsafe {
9485 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9486 }
9487 Ok(())
9488 }
9489 }
9490
9491 impl fidl::encoding::ValueTypeMarker for FiveByteInArray {
9492 type Borrowed<'a> = &'a Self;
9493 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9494 value
9495 }
9496 }
9497
9498 unsafe impl fidl::encoding::TypeMarker for FiveByteInArray {
9499 type Owned = Self;
9500
9501 #[inline(always)]
9502 fn inline_align(_context: fidl::encoding::Context) -> usize {
9503 4
9504 }
9505
9506 #[inline(always)]
9507 fn inline_size(_context: fidl::encoding::Context) -> usize {
9508 24
9509 }
9510 }
9511
9512 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInArray, D>
9513 for &FiveByteInArray
9514 {
9515 #[inline]
9516 unsafe fn encode(
9517 self,
9518 encoder: &mut fidl::encoding::Encoder<'_, D>,
9519 offset: usize,
9520 _depth: fidl::encoding::Depth,
9521 ) -> fidl::Result<()> {
9522 encoder.debug_check_bounds::<FiveByteInArray>(offset);
9523 unsafe {
9524 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9526 (buf_ptr as *mut FiveByteInArray)
9527 .write_unaligned((self as *const FiveByteInArray).read());
9528 let padding_ptr = buf_ptr.offset(4) as *mut u32;
9531 let padding_mask = 0xffffff00u32;
9532 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9533 let padding_ptr = buf_ptr.offset(12) as *mut u32;
9534 let padding_mask = 0xffffff00u32;
9535 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9536 let padding_ptr = buf_ptr.offset(20) as *mut u32;
9537 let padding_mask = 0xffffff00u32;
9538 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9539 }
9540 Ok(())
9541 }
9542 }
9543 unsafe impl<
9544 D: fidl::encoding::ResourceDialect,
9545 T0: fidl::encoding::Encode<fidl::encoding::Array<FiveByte, 3>, D>,
9546 > fidl::encoding::Encode<FiveByteInArray, D> for (T0,)
9547 {
9548 #[inline]
9549 unsafe fn encode(
9550 self,
9551 encoder: &mut fidl::encoding::Encoder<'_, D>,
9552 offset: usize,
9553 depth: fidl::encoding::Depth,
9554 ) -> fidl::Result<()> {
9555 encoder.debug_check_bounds::<FiveByteInArray>(offset);
9556 self.0.encode(encoder, offset + 0, depth)?;
9560 Ok(())
9561 }
9562 }
9563
9564 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInArray {
9565 #[inline(always)]
9566 fn new_empty() -> Self {
9567 Self { elems: fidl::new_empty!(fidl::encoding::Array<FiveByte, 3>, D) }
9568 }
9569
9570 #[inline]
9571 unsafe fn decode(
9572 &mut self,
9573 decoder: &mut fidl::encoding::Decoder<'_, D>,
9574 offset: usize,
9575 _depth: fidl::encoding::Depth,
9576 ) -> fidl::Result<()> {
9577 decoder.debug_check_bounds::<Self>(offset);
9578 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9579 let ptr = unsafe { buf_ptr.offset(4) };
9581 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9582 let mask = 0xffffff00u32;
9583 let maskedval = padval & mask;
9584 if maskedval != 0 {
9585 return Err(fidl::Error::NonZeroPadding {
9586 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9587 });
9588 }
9589 let ptr = unsafe { buf_ptr.offset(12) };
9590 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9591 let mask = 0xffffff00u32;
9592 let maskedval = padval & mask;
9593 if maskedval != 0 {
9594 return Err(fidl::Error::NonZeroPadding {
9595 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9596 });
9597 }
9598 let ptr = unsafe { buf_ptr.offset(20) };
9599 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9600 let mask = 0xffffff00u32;
9601 let maskedval = padval & mask;
9602 if maskedval != 0 {
9603 return Err(fidl::Error::NonZeroPadding {
9604 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9605 });
9606 }
9607 unsafe {
9609 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9610 }
9611 Ok(())
9612 }
9613 }
9614
9615 impl fidl::encoding::ValueTypeMarker for FiveByteInStruct {
9616 type Borrowed<'a> = &'a Self;
9617 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9618 value
9619 }
9620 }
9621
9622 unsafe impl fidl::encoding::TypeMarker for FiveByteInStruct {
9623 type Owned = Self;
9624
9625 #[inline(always)]
9626 fn inline_align(_context: fidl::encoding::Context) -> usize {
9627 4
9628 }
9629
9630 #[inline(always)]
9631 fn inline_size(_context: fidl::encoding::Context) -> usize {
9632 24
9633 }
9634 }
9635
9636 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInStruct, D>
9637 for &FiveByteInStruct
9638 {
9639 #[inline]
9640 unsafe fn encode(
9641 self,
9642 encoder: &mut fidl::encoding::Encoder<'_, D>,
9643 offset: usize,
9644 _depth: fidl::encoding::Depth,
9645 ) -> fidl::Result<()> {
9646 encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9647 unsafe {
9648 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9650 (buf_ptr as *mut FiveByteInStruct)
9651 .write_unaligned((self as *const FiveByteInStruct).read());
9652 let padding_ptr = buf_ptr.offset(4) as *mut u32;
9655 let padding_mask = 0xffffff00u32;
9656 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9657 let padding_ptr = buf_ptr.offset(12) as *mut u32;
9658 let padding_mask = 0xffffff00u32;
9659 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9660 let padding_ptr = buf_ptr.offset(20) as *mut u32;
9661 let padding_mask = 0xffffff00u32;
9662 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9663 }
9664 Ok(())
9665 }
9666 }
9667 unsafe impl<
9668 D: fidl::encoding::ResourceDialect,
9669 T0: fidl::encoding::Encode<FiveByte, D>,
9670 T1: fidl::encoding::Encode<FiveByte, D>,
9671 T2: fidl::encoding::Encode<FiveByte, D>,
9672 > fidl::encoding::Encode<FiveByteInStruct, D> for (T0, T1, T2)
9673 {
9674 #[inline]
9675 unsafe fn encode(
9676 self,
9677 encoder: &mut fidl::encoding::Encoder<'_, D>,
9678 offset: usize,
9679 depth: fidl::encoding::Depth,
9680 ) -> fidl::Result<()> {
9681 encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9682 self.0.encode(encoder, offset + 0, depth)?;
9686 self.1.encode(encoder, offset + 8, depth)?;
9687 self.2.encode(encoder, offset + 16, depth)?;
9688 Ok(())
9689 }
9690 }
9691
9692 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInStruct {
9693 #[inline(always)]
9694 fn new_empty() -> Self {
9695 Self {
9696 elem1: fidl::new_empty!(FiveByte, D),
9697 elem2: fidl::new_empty!(FiveByte, D),
9698 elem3: fidl::new_empty!(FiveByte, D),
9699 }
9700 }
9701
9702 #[inline]
9703 unsafe fn decode(
9704 &mut self,
9705 decoder: &mut fidl::encoding::Decoder<'_, D>,
9706 offset: usize,
9707 _depth: fidl::encoding::Depth,
9708 ) -> fidl::Result<()> {
9709 decoder.debug_check_bounds::<Self>(offset);
9710 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9711 let ptr = unsafe { buf_ptr.offset(4) };
9713 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9714 let mask = 0xffffff00u32;
9715 let maskedval = padval & mask;
9716 if maskedval != 0 {
9717 return Err(fidl::Error::NonZeroPadding {
9718 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9719 });
9720 }
9721 let ptr = unsafe { buf_ptr.offset(12) };
9722 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9723 let mask = 0xffffff00u32;
9724 let maskedval = padval & mask;
9725 if maskedval != 0 {
9726 return Err(fidl::Error::NonZeroPadding {
9727 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9728 });
9729 }
9730 let ptr = unsafe { buf_ptr.offset(20) };
9731 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9732 let mask = 0xffffff00u32;
9733 let maskedval = padval & mask;
9734 if maskedval != 0 {
9735 return Err(fidl::Error::NonZeroPadding {
9736 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9737 });
9738 }
9739 unsafe {
9741 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9742 }
9743 Ok(())
9744 }
9745 }
9746
9747 impl fidl::encoding::ValueTypeMarker for FiveByteInVector {
9748 type Borrowed<'a> = &'a Self;
9749 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9750 value
9751 }
9752 }
9753
9754 unsafe impl fidl::encoding::TypeMarker for FiveByteInVector {
9755 type Owned = Self;
9756
9757 #[inline(always)]
9758 fn inline_align(_context: fidl::encoding::Context) -> usize {
9759 8
9760 }
9761
9762 #[inline(always)]
9763 fn inline_size(_context: fidl::encoding::Context) -> usize {
9764 16
9765 }
9766 }
9767
9768 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInVector, D>
9769 for &FiveByteInVector
9770 {
9771 #[inline]
9772 unsafe fn encode(
9773 self,
9774 encoder: &mut fidl::encoding::Encoder<'_, D>,
9775 offset: usize,
9776 _depth: fidl::encoding::Depth,
9777 ) -> fidl::Result<()> {
9778 encoder.debug_check_bounds::<FiveByteInVector>(offset);
9779 fidl::encoding::Encode::<FiveByteInVector, D>::encode(
9781 (
9782 <fidl::encoding::UnboundedVector<FiveByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
9783 ),
9784 encoder, offset, _depth
9785 )
9786 }
9787 }
9788 unsafe impl<
9789 D: fidl::encoding::ResourceDialect,
9790 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<FiveByte>, D>,
9791 > fidl::encoding::Encode<FiveByteInVector, D> for (T0,)
9792 {
9793 #[inline]
9794 unsafe fn encode(
9795 self,
9796 encoder: &mut fidl::encoding::Encoder<'_, D>,
9797 offset: usize,
9798 depth: fidl::encoding::Depth,
9799 ) -> fidl::Result<()> {
9800 encoder.debug_check_bounds::<FiveByteInVector>(offset);
9801 self.0.encode(encoder, offset + 0, depth)?;
9805 Ok(())
9806 }
9807 }
9808
9809 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInVector {
9810 #[inline(always)]
9811 fn new_empty() -> Self {
9812 Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<FiveByte>, D) }
9813 }
9814
9815 #[inline]
9816 unsafe fn decode(
9817 &mut self,
9818 decoder: &mut fidl::encoding::Decoder<'_, D>,
9819 offset: usize,
9820 _depth: fidl::encoding::Depth,
9821 ) -> fidl::Result<()> {
9822 decoder.debug_check_bounds::<Self>(offset);
9823 fidl::decode!(
9825 fidl::encoding::UnboundedVector<FiveByte>,
9826 D,
9827 &mut self.elems,
9828 decoder,
9829 offset + 0,
9830 _depth
9831 )?;
9832 Ok(())
9833 }
9834 }
9835
9836 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16Struct {
9837 type Borrowed<'a> = &'a Self;
9838 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9839 value
9840 }
9841 }
9842
9843 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16Struct {
9844 type Owned = Self;
9845
9846 #[inline(always)]
9847 fn inline_align(_context: fidl::encoding::Context) -> usize {
9848 2
9849 }
9850
9851 #[inline(always)]
9852 fn inline_size(_context: fidl::encoding::Context) -> usize {
9853 2
9854 }
9855 }
9856
9857 unsafe impl<D: fidl::encoding::ResourceDialect>
9858 fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for &FlexibleBitsUint16Struct
9859 {
9860 #[inline]
9861 unsafe fn encode(
9862 self,
9863 encoder: &mut fidl::encoding::Encoder<'_, D>,
9864 offset: usize,
9865 _depth: fidl::encoding::Depth,
9866 ) -> fidl::Result<()> {
9867 encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
9868 fidl::encoding::Encode::<FlexibleBitsUint16Struct, D>::encode(
9870 (<FlexibleBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
9871 encoder,
9872 offset,
9873 _depth,
9874 )
9875 }
9876 }
9877 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint16, D>>
9878 fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for (T0,)
9879 {
9880 #[inline]
9881 unsafe fn encode(
9882 self,
9883 encoder: &mut fidl::encoding::Encoder<'_, D>,
9884 offset: usize,
9885 depth: fidl::encoding::Depth,
9886 ) -> fidl::Result<()> {
9887 encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
9888 self.0.encode(encoder, offset + 0, depth)?;
9892 Ok(())
9893 }
9894 }
9895
9896 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9897 for FlexibleBitsUint16Struct
9898 {
9899 #[inline(always)]
9900 fn new_empty() -> Self {
9901 Self { b: fidl::new_empty!(FlexibleBitsUint16, D) }
9902 }
9903
9904 #[inline]
9905 unsafe fn decode(
9906 &mut self,
9907 decoder: &mut fidl::encoding::Decoder<'_, D>,
9908 offset: usize,
9909 _depth: fidl::encoding::Depth,
9910 ) -> fidl::Result<()> {
9911 decoder.debug_check_bounds::<Self>(offset);
9912 fidl::decode!(FlexibleBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
9914 Ok(())
9915 }
9916 }
9917
9918 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32Struct {
9919 type Borrowed<'a> = &'a Self;
9920 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9921 value
9922 }
9923 }
9924
9925 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32Struct {
9926 type Owned = Self;
9927
9928 #[inline(always)]
9929 fn inline_align(_context: fidl::encoding::Context) -> usize {
9930 4
9931 }
9932
9933 #[inline(always)]
9934 fn inline_size(_context: fidl::encoding::Context) -> usize {
9935 4
9936 }
9937 }
9938
9939 unsafe impl<D: fidl::encoding::ResourceDialect>
9940 fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for &FlexibleBitsUint32Struct
9941 {
9942 #[inline]
9943 unsafe fn encode(
9944 self,
9945 encoder: &mut fidl::encoding::Encoder<'_, D>,
9946 offset: usize,
9947 _depth: fidl::encoding::Depth,
9948 ) -> fidl::Result<()> {
9949 encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
9950 fidl::encoding::Encode::<FlexibleBitsUint32Struct, D>::encode(
9952 (<FlexibleBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
9953 encoder,
9954 offset,
9955 _depth,
9956 )
9957 }
9958 }
9959 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint32, D>>
9960 fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for (T0,)
9961 {
9962 #[inline]
9963 unsafe fn encode(
9964 self,
9965 encoder: &mut fidl::encoding::Encoder<'_, D>,
9966 offset: usize,
9967 depth: fidl::encoding::Depth,
9968 ) -> fidl::Result<()> {
9969 encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
9970 self.0.encode(encoder, offset + 0, depth)?;
9974 Ok(())
9975 }
9976 }
9977
9978 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9979 for FlexibleBitsUint32Struct
9980 {
9981 #[inline(always)]
9982 fn new_empty() -> Self {
9983 Self { b: fidl::new_empty!(FlexibleBitsUint32, D) }
9984 }
9985
9986 #[inline]
9987 unsafe fn decode(
9988 &mut self,
9989 decoder: &mut fidl::encoding::Decoder<'_, D>,
9990 offset: usize,
9991 _depth: fidl::encoding::Depth,
9992 ) -> fidl::Result<()> {
9993 decoder.debug_check_bounds::<Self>(offset);
9994 fidl::decode!(FlexibleBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
9996 Ok(())
9997 }
9998 }
9999
10000 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64Struct {
10001 type Borrowed<'a> = &'a Self;
10002 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10003 value
10004 }
10005 }
10006
10007 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64Struct {
10008 type Owned = Self;
10009
10010 #[inline(always)]
10011 fn inline_align(_context: fidl::encoding::Context) -> usize {
10012 8
10013 }
10014
10015 #[inline(always)]
10016 fn inline_size(_context: fidl::encoding::Context) -> usize {
10017 8
10018 }
10019 }
10020
10021 unsafe impl<D: fidl::encoding::ResourceDialect>
10022 fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for &FlexibleBitsUint64Struct
10023 {
10024 #[inline]
10025 unsafe fn encode(
10026 self,
10027 encoder: &mut fidl::encoding::Encoder<'_, D>,
10028 offset: usize,
10029 _depth: fidl::encoding::Depth,
10030 ) -> fidl::Result<()> {
10031 encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10032 fidl::encoding::Encode::<FlexibleBitsUint64Struct, D>::encode(
10034 (<FlexibleBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10035 encoder,
10036 offset,
10037 _depth,
10038 )
10039 }
10040 }
10041 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint64, D>>
10042 fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for (T0,)
10043 {
10044 #[inline]
10045 unsafe fn encode(
10046 self,
10047 encoder: &mut fidl::encoding::Encoder<'_, D>,
10048 offset: usize,
10049 depth: fidl::encoding::Depth,
10050 ) -> fidl::Result<()> {
10051 encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10052 self.0.encode(encoder, offset + 0, depth)?;
10056 Ok(())
10057 }
10058 }
10059
10060 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10061 for FlexibleBitsUint64Struct
10062 {
10063 #[inline(always)]
10064 fn new_empty() -> Self {
10065 Self { b: fidl::new_empty!(FlexibleBitsUint64, D) }
10066 }
10067
10068 #[inline]
10069 unsafe fn decode(
10070 &mut self,
10071 decoder: &mut fidl::encoding::Decoder<'_, D>,
10072 offset: usize,
10073 _depth: fidl::encoding::Depth,
10074 ) -> fidl::Result<()> {
10075 decoder.debug_check_bounds::<Self>(offset);
10076 fidl::decode!(FlexibleBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
10078 Ok(())
10079 }
10080 }
10081
10082 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8Struct {
10083 type Borrowed<'a> = &'a Self;
10084 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10085 value
10086 }
10087 }
10088
10089 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8Struct {
10090 type Owned = Self;
10091
10092 #[inline(always)]
10093 fn inline_align(_context: fidl::encoding::Context) -> usize {
10094 1
10095 }
10096
10097 #[inline(always)]
10098 fn inline_size(_context: fidl::encoding::Context) -> usize {
10099 1
10100 }
10101 }
10102
10103 unsafe impl<D: fidl::encoding::ResourceDialect>
10104 fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for &FlexibleBitsUint8Struct
10105 {
10106 #[inline]
10107 unsafe fn encode(
10108 self,
10109 encoder: &mut fidl::encoding::Encoder<'_, D>,
10110 offset: usize,
10111 _depth: fidl::encoding::Depth,
10112 ) -> fidl::Result<()> {
10113 encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10114 fidl::encoding::Encode::<FlexibleBitsUint8Struct, D>::encode(
10116 (<FlexibleBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10117 encoder,
10118 offset,
10119 _depth,
10120 )
10121 }
10122 }
10123 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint8, D>>
10124 fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for (T0,)
10125 {
10126 #[inline]
10127 unsafe fn encode(
10128 self,
10129 encoder: &mut fidl::encoding::Encoder<'_, D>,
10130 offset: usize,
10131 depth: fidl::encoding::Depth,
10132 ) -> fidl::Result<()> {
10133 encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10134 self.0.encode(encoder, offset + 0, depth)?;
10138 Ok(())
10139 }
10140 }
10141
10142 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10143 for FlexibleBitsUint8Struct
10144 {
10145 #[inline(always)]
10146 fn new_empty() -> Self {
10147 Self { b: fidl::new_empty!(FlexibleBitsUint8, D) }
10148 }
10149
10150 #[inline]
10151 unsafe fn decode(
10152 &mut self,
10153 decoder: &mut fidl::encoding::Decoder<'_, D>,
10154 offset: usize,
10155 _depth: fidl::encoding::Depth,
10156 ) -> fidl::Result<()> {
10157 decoder.debug_check_bounds::<Self>(offset);
10158 fidl::decode!(FlexibleBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
10160 Ok(())
10161 }
10162 }
10163
10164 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16Struct {
10165 type Borrowed<'a> = &'a Self;
10166 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10167 value
10168 }
10169 }
10170
10171 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16Struct {
10172 type Owned = Self;
10173
10174 #[inline(always)]
10175 fn inline_align(_context: fidl::encoding::Context) -> usize {
10176 2
10177 }
10178
10179 #[inline(always)]
10180 fn inline_size(_context: fidl::encoding::Context) -> usize {
10181 2
10182 }
10183 }
10184
10185 unsafe impl<D: fidl::encoding::ResourceDialect>
10186 fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for &FlexibleEnumInt16Struct
10187 {
10188 #[inline]
10189 unsafe fn encode(
10190 self,
10191 encoder: &mut fidl::encoding::Encoder<'_, D>,
10192 offset: usize,
10193 _depth: fidl::encoding::Depth,
10194 ) -> fidl::Result<()> {
10195 encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10196 fidl::encoding::Encode::<FlexibleEnumInt16Struct, D>::encode(
10198 (<FlexibleEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10199 encoder,
10200 offset,
10201 _depth,
10202 )
10203 }
10204 }
10205 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt16, D>>
10206 fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for (T0,)
10207 {
10208 #[inline]
10209 unsafe fn encode(
10210 self,
10211 encoder: &mut fidl::encoding::Encoder<'_, D>,
10212 offset: usize,
10213 depth: fidl::encoding::Depth,
10214 ) -> fidl::Result<()> {
10215 encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10216 self.0.encode(encoder, offset + 0, depth)?;
10220 Ok(())
10221 }
10222 }
10223
10224 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10225 for FlexibleEnumInt16Struct
10226 {
10227 #[inline(always)]
10228 fn new_empty() -> Self {
10229 Self { e: fidl::new_empty!(FlexibleEnumInt16, D) }
10230 }
10231
10232 #[inline]
10233 unsafe fn decode(
10234 &mut self,
10235 decoder: &mut fidl::encoding::Decoder<'_, D>,
10236 offset: usize,
10237 _depth: fidl::encoding::Depth,
10238 ) -> fidl::Result<()> {
10239 decoder.debug_check_bounds::<Self>(offset);
10240 fidl::decode!(FlexibleEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
10242 Ok(())
10243 }
10244 }
10245
10246 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32Struct {
10247 type Borrowed<'a> = &'a Self;
10248 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10249 value
10250 }
10251 }
10252
10253 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32Struct {
10254 type Owned = Self;
10255
10256 #[inline(always)]
10257 fn inline_align(_context: fidl::encoding::Context) -> usize {
10258 4
10259 }
10260
10261 #[inline(always)]
10262 fn inline_size(_context: fidl::encoding::Context) -> usize {
10263 4
10264 }
10265 }
10266
10267 unsafe impl<D: fidl::encoding::ResourceDialect>
10268 fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for &FlexibleEnumInt32Struct
10269 {
10270 #[inline]
10271 unsafe fn encode(
10272 self,
10273 encoder: &mut fidl::encoding::Encoder<'_, D>,
10274 offset: usize,
10275 _depth: fidl::encoding::Depth,
10276 ) -> fidl::Result<()> {
10277 encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10278 fidl::encoding::Encode::<FlexibleEnumInt32Struct, D>::encode(
10280 (<FlexibleEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10281 encoder,
10282 offset,
10283 _depth,
10284 )
10285 }
10286 }
10287 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt32, D>>
10288 fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for (T0,)
10289 {
10290 #[inline]
10291 unsafe fn encode(
10292 self,
10293 encoder: &mut fidl::encoding::Encoder<'_, D>,
10294 offset: usize,
10295 depth: fidl::encoding::Depth,
10296 ) -> fidl::Result<()> {
10297 encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10298 self.0.encode(encoder, offset + 0, depth)?;
10302 Ok(())
10303 }
10304 }
10305
10306 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10307 for FlexibleEnumInt32Struct
10308 {
10309 #[inline(always)]
10310 fn new_empty() -> Self {
10311 Self { e: fidl::new_empty!(FlexibleEnumInt32, D) }
10312 }
10313
10314 #[inline]
10315 unsafe fn decode(
10316 &mut self,
10317 decoder: &mut fidl::encoding::Decoder<'_, D>,
10318 offset: usize,
10319 _depth: fidl::encoding::Depth,
10320 ) -> fidl::Result<()> {
10321 decoder.debug_check_bounds::<Self>(offset);
10322 fidl::decode!(FlexibleEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
10324 Ok(())
10325 }
10326 }
10327
10328 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64Struct {
10329 type Borrowed<'a> = &'a Self;
10330 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10331 value
10332 }
10333 }
10334
10335 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64Struct {
10336 type Owned = Self;
10337
10338 #[inline(always)]
10339 fn inline_align(_context: fidl::encoding::Context) -> usize {
10340 8
10341 }
10342
10343 #[inline(always)]
10344 fn inline_size(_context: fidl::encoding::Context) -> usize {
10345 8
10346 }
10347 }
10348
10349 unsafe impl<D: fidl::encoding::ResourceDialect>
10350 fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for &FlexibleEnumInt64Struct
10351 {
10352 #[inline]
10353 unsafe fn encode(
10354 self,
10355 encoder: &mut fidl::encoding::Encoder<'_, D>,
10356 offset: usize,
10357 _depth: fidl::encoding::Depth,
10358 ) -> fidl::Result<()> {
10359 encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10360 fidl::encoding::Encode::<FlexibleEnumInt64Struct, D>::encode(
10362 (<FlexibleEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10363 encoder,
10364 offset,
10365 _depth,
10366 )
10367 }
10368 }
10369 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt64, D>>
10370 fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for (T0,)
10371 {
10372 #[inline]
10373 unsafe fn encode(
10374 self,
10375 encoder: &mut fidl::encoding::Encoder<'_, D>,
10376 offset: usize,
10377 depth: fidl::encoding::Depth,
10378 ) -> fidl::Result<()> {
10379 encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10380 self.0.encode(encoder, offset + 0, depth)?;
10384 Ok(())
10385 }
10386 }
10387
10388 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10389 for FlexibleEnumInt64Struct
10390 {
10391 #[inline(always)]
10392 fn new_empty() -> Self {
10393 Self { e: fidl::new_empty!(FlexibleEnumInt64, D) }
10394 }
10395
10396 #[inline]
10397 unsafe fn decode(
10398 &mut self,
10399 decoder: &mut fidl::encoding::Decoder<'_, D>,
10400 offset: usize,
10401 _depth: fidl::encoding::Depth,
10402 ) -> fidl::Result<()> {
10403 decoder.debug_check_bounds::<Self>(offset);
10404 fidl::decode!(FlexibleEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
10406 Ok(())
10407 }
10408 }
10409
10410 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8Struct {
10411 type Borrowed<'a> = &'a Self;
10412 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10413 value
10414 }
10415 }
10416
10417 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8Struct {
10418 type Owned = Self;
10419
10420 #[inline(always)]
10421 fn inline_align(_context: fidl::encoding::Context) -> usize {
10422 1
10423 }
10424
10425 #[inline(always)]
10426 fn inline_size(_context: fidl::encoding::Context) -> usize {
10427 1
10428 }
10429 }
10430
10431 unsafe impl<D: fidl::encoding::ResourceDialect>
10432 fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for &FlexibleEnumInt8Struct
10433 {
10434 #[inline]
10435 unsafe fn encode(
10436 self,
10437 encoder: &mut fidl::encoding::Encoder<'_, D>,
10438 offset: usize,
10439 _depth: fidl::encoding::Depth,
10440 ) -> fidl::Result<()> {
10441 encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10442 fidl::encoding::Encode::<FlexibleEnumInt8Struct, D>::encode(
10444 (<FlexibleEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10445 encoder,
10446 offset,
10447 _depth,
10448 )
10449 }
10450 }
10451 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt8, D>>
10452 fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for (T0,)
10453 {
10454 #[inline]
10455 unsafe fn encode(
10456 self,
10457 encoder: &mut fidl::encoding::Encoder<'_, D>,
10458 offset: usize,
10459 depth: fidl::encoding::Depth,
10460 ) -> fidl::Result<()> {
10461 encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10462 self.0.encode(encoder, offset + 0, depth)?;
10466 Ok(())
10467 }
10468 }
10469
10470 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10471 for FlexibleEnumInt8Struct
10472 {
10473 #[inline(always)]
10474 fn new_empty() -> Self {
10475 Self { e: fidl::new_empty!(FlexibleEnumInt8, D) }
10476 }
10477
10478 #[inline]
10479 unsafe fn decode(
10480 &mut self,
10481 decoder: &mut fidl::encoding::Decoder<'_, D>,
10482 offset: usize,
10483 _depth: fidl::encoding::Depth,
10484 ) -> fidl::Result<()> {
10485 decoder.debug_check_bounds::<Self>(offset);
10486 fidl::decode!(FlexibleEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
10488 Ok(())
10489 }
10490 }
10491
10492 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16Struct {
10493 type Borrowed<'a> = &'a Self;
10494 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10495 value
10496 }
10497 }
10498
10499 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16Struct {
10500 type Owned = Self;
10501
10502 #[inline(always)]
10503 fn inline_align(_context: fidl::encoding::Context) -> usize {
10504 2
10505 }
10506
10507 #[inline(always)]
10508 fn inline_size(_context: fidl::encoding::Context) -> usize {
10509 2
10510 }
10511 }
10512
10513 unsafe impl<D: fidl::encoding::ResourceDialect>
10514 fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for &FlexibleEnumUint16Struct
10515 {
10516 #[inline]
10517 unsafe fn encode(
10518 self,
10519 encoder: &mut fidl::encoding::Encoder<'_, D>,
10520 offset: usize,
10521 _depth: fidl::encoding::Depth,
10522 ) -> fidl::Result<()> {
10523 encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10524 fidl::encoding::Encode::<FlexibleEnumUint16Struct, D>::encode(
10526 (<FlexibleEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10527 encoder,
10528 offset,
10529 _depth,
10530 )
10531 }
10532 }
10533 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint16, D>>
10534 fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for (T0,)
10535 {
10536 #[inline]
10537 unsafe fn encode(
10538 self,
10539 encoder: &mut fidl::encoding::Encoder<'_, D>,
10540 offset: usize,
10541 depth: fidl::encoding::Depth,
10542 ) -> fidl::Result<()> {
10543 encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10544 self.0.encode(encoder, offset + 0, depth)?;
10548 Ok(())
10549 }
10550 }
10551
10552 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10553 for FlexibleEnumUint16Struct
10554 {
10555 #[inline(always)]
10556 fn new_empty() -> Self {
10557 Self { e: fidl::new_empty!(FlexibleEnumUint16, D) }
10558 }
10559
10560 #[inline]
10561 unsafe fn decode(
10562 &mut self,
10563 decoder: &mut fidl::encoding::Decoder<'_, D>,
10564 offset: usize,
10565 _depth: fidl::encoding::Depth,
10566 ) -> fidl::Result<()> {
10567 decoder.debug_check_bounds::<Self>(offset);
10568 fidl::decode!(FlexibleEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
10570 Ok(())
10571 }
10572 }
10573
10574 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32Struct {
10575 type Borrowed<'a> = &'a Self;
10576 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10577 value
10578 }
10579 }
10580
10581 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32Struct {
10582 type Owned = Self;
10583
10584 #[inline(always)]
10585 fn inline_align(_context: fidl::encoding::Context) -> usize {
10586 4
10587 }
10588
10589 #[inline(always)]
10590 fn inline_size(_context: fidl::encoding::Context) -> usize {
10591 4
10592 }
10593 }
10594
10595 unsafe impl<D: fidl::encoding::ResourceDialect>
10596 fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for &FlexibleEnumUint32Struct
10597 {
10598 #[inline]
10599 unsafe fn encode(
10600 self,
10601 encoder: &mut fidl::encoding::Encoder<'_, D>,
10602 offset: usize,
10603 _depth: fidl::encoding::Depth,
10604 ) -> fidl::Result<()> {
10605 encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10606 fidl::encoding::Encode::<FlexibleEnumUint32Struct, D>::encode(
10608 (<FlexibleEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10609 encoder,
10610 offset,
10611 _depth,
10612 )
10613 }
10614 }
10615 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint32, D>>
10616 fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for (T0,)
10617 {
10618 #[inline]
10619 unsafe fn encode(
10620 self,
10621 encoder: &mut fidl::encoding::Encoder<'_, D>,
10622 offset: usize,
10623 depth: fidl::encoding::Depth,
10624 ) -> fidl::Result<()> {
10625 encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10626 self.0.encode(encoder, offset + 0, depth)?;
10630 Ok(())
10631 }
10632 }
10633
10634 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10635 for FlexibleEnumUint32Struct
10636 {
10637 #[inline(always)]
10638 fn new_empty() -> Self {
10639 Self { e: fidl::new_empty!(FlexibleEnumUint32, D) }
10640 }
10641
10642 #[inline]
10643 unsafe fn decode(
10644 &mut self,
10645 decoder: &mut fidl::encoding::Decoder<'_, D>,
10646 offset: usize,
10647 _depth: fidl::encoding::Depth,
10648 ) -> fidl::Result<()> {
10649 decoder.debug_check_bounds::<Self>(offset);
10650 fidl::decode!(FlexibleEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
10652 Ok(())
10653 }
10654 }
10655
10656 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64Struct {
10657 type Borrowed<'a> = &'a Self;
10658 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10659 value
10660 }
10661 }
10662
10663 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64Struct {
10664 type Owned = Self;
10665
10666 #[inline(always)]
10667 fn inline_align(_context: fidl::encoding::Context) -> usize {
10668 8
10669 }
10670
10671 #[inline(always)]
10672 fn inline_size(_context: fidl::encoding::Context) -> usize {
10673 8
10674 }
10675 }
10676
10677 unsafe impl<D: fidl::encoding::ResourceDialect>
10678 fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for &FlexibleEnumUint64Struct
10679 {
10680 #[inline]
10681 unsafe fn encode(
10682 self,
10683 encoder: &mut fidl::encoding::Encoder<'_, D>,
10684 offset: usize,
10685 _depth: fidl::encoding::Depth,
10686 ) -> fidl::Result<()> {
10687 encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10688 fidl::encoding::Encode::<FlexibleEnumUint64Struct, D>::encode(
10690 (<FlexibleEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10691 encoder,
10692 offset,
10693 _depth,
10694 )
10695 }
10696 }
10697 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint64, D>>
10698 fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for (T0,)
10699 {
10700 #[inline]
10701 unsafe fn encode(
10702 self,
10703 encoder: &mut fidl::encoding::Encoder<'_, D>,
10704 offset: usize,
10705 depth: fidl::encoding::Depth,
10706 ) -> fidl::Result<()> {
10707 encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10708 self.0.encode(encoder, offset + 0, depth)?;
10712 Ok(())
10713 }
10714 }
10715
10716 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10717 for FlexibleEnumUint64Struct
10718 {
10719 #[inline(always)]
10720 fn new_empty() -> Self {
10721 Self { e: fidl::new_empty!(FlexibleEnumUint64, D) }
10722 }
10723
10724 #[inline]
10725 unsafe fn decode(
10726 &mut self,
10727 decoder: &mut fidl::encoding::Decoder<'_, D>,
10728 offset: usize,
10729 _depth: fidl::encoding::Depth,
10730 ) -> fidl::Result<()> {
10731 decoder.debug_check_bounds::<Self>(offset);
10732 fidl::decode!(FlexibleEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
10734 Ok(())
10735 }
10736 }
10737
10738 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8Struct {
10739 type Borrowed<'a> = &'a Self;
10740 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10741 value
10742 }
10743 }
10744
10745 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8Struct {
10746 type Owned = Self;
10747
10748 #[inline(always)]
10749 fn inline_align(_context: fidl::encoding::Context) -> usize {
10750 1
10751 }
10752
10753 #[inline(always)]
10754 fn inline_size(_context: fidl::encoding::Context) -> usize {
10755 1
10756 }
10757 }
10758
10759 unsafe impl<D: fidl::encoding::ResourceDialect>
10760 fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for &FlexibleEnumUint8Struct
10761 {
10762 #[inline]
10763 unsafe fn encode(
10764 self,
10765 encoder: &mut fidl::encoding::Encoder<'_, D>,
10766 offset: usize,
10767 _depth: fidl::encoding::Depth,
10768 ) -> fidl::Result<()> {
10769 encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10770 fidl::encoding::Encode::<FlexibleEnumUint8Struct, D>::encode(
10772 (<FlexibleEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10773 encoder,
10774 offset,
10775 _depth,
10776 )
10777 }
10778 }
10779 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint8, D>>
10780 fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for (T0,)
10781 {
10782 #[inline]
10783 unsafe fn encode(
10784 self,
10785 encoder: &mut fidl::encoding::Encoder<'_, D>,
10786 offset: usize,
10787 depth: fidl::encoding::Depth,
10788 ) -> fidl::Result<()> {
10789 encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10790 self.0.encode(encoder, offset + 0, depth)?;
10794 Ok(())
10795 }
10796 }
10797
10798 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10799 for FlexibleEnumUint8Struct
10800 {
10801 #[inline(always)]
10802 fn new_empty() -> Self {
10803 Self { e: fidl::new_empty!(FlexibleEnumUint8, D) }
10804 }
10805
10806 #[inline]
10807 unsafe fn decode(
10808 &mut self,
10809 decoder: &mut fidl::encoding::Decoder<'_, D>,
10810 offset: usize,
10811 _depth: fidl::encoding::Depth,
10812 ) -> fidl::Result<()> {
10813 decoder.debug_check_bounds::<Self>(offset);
10814 fidl::decode!(FlexibleEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
10816 Ok(())
10817 }
10818 }
10819
10820 impl fidl::encoding::ValueTypeMarker for GoldenBitsStruct {
10821 type Borrowed<'a> = &'a Self;
10822 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10823 value
10824 }
10825 }
10826
10827 unsafe impl fidl::encoding::TypeMarker for GoldenBitsStruct {
10828 type Owned = Self;
10829
10830 #[inline(always)]
10831 fn inline_align(_context: fidl::encoding::Context) -> usize {
10832 2
10833 }
10834
10835 #[inline(always)]
10836 fn inline_size(_context: fidl::encoding::Context) -> usize {
10837 2
10838 }
10839 }
10840
10841 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBitsStruct, D>
10842 for &GoldenBitsStruct
10843 {
10844 #[inline]
10845 unsafe fn encode(
10846 self,
10847 encoder: &mut fidl::encoding::Encoder<'_, D>,
10848 offset: usize,
10849 _depth: fidl::encoding::Depth,
10850 ) -> fidl::Result<()> {
10851 encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
10852 fidl::encoding::Encode::<GoldenBitsStruct, D>::encode(
10854 (<GoldenBits as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
10855 encoder,
10856 offset,
10857 _depth,
10858 )
10859 }
10860 }
10861 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenBits, D>>
10862 fidl::encoding::Encode<GoldenBitsStruct, D> for (T0,)
10863 {
10864 #[inline]
10865 unsafe fn encode(
10866 self,
10867 encoder: &mut fidl::encoding::Encoder<'_, D>,
10868 offset: usize,
10869 depth: fidl::encoding::Depth,
10870 ) -> fidl::Result<()> {
10871 encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
10872 self.0.encode(encoder, offset + 0, depth)?;
10876 Ok(())
10877 }
10878 }
10879
10880 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBitsStruct {
10881 #[inline(always)]
10882 fn new_empty() -> Self {
10883 Self { v: fidl::new_empty!(GoldenBits, D) }
10884 }
10885
10886 #[inline]
10887 unsafe fn decode(
10888 &mut self,
10889 decoder: &mut fidl::encoding::Decoder<'_, D>,
10890 offset: usize,
10891 _depth: fidl::encoding::Depth,
10892 ) -> fidl::Result<()> {
10893 decoder.debug_check_bounds::<Self>(offset);
10894 fidl::decode!(GoldenBits, D, &mut self.v, decoder, offset + 0, _depth)?;
10896 Ok(())
10897 }
10898 }
10899
10900 impl fidl::encoding::ValueTypeMarker for GoldenBoolStruct {
10901 type Borrowed<'a> = &'a Self;
10902 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10903 value
10904 }
10905 }
10906
10907 unsafe impl fidl::encoding::TypeMarker for GoldenBoolStruct {
10908 type Owned = Self;
10909
10910 #[inline(always)]
10911 fn inline_align(_context: fidl::encoding::Context) -> usize {
10912 1
10913 }
10914
10915 #[inline(always)]
10916 fn inline_size(_context: fidl::encoding::Context) -> usize {
10917 1
10918 }
10919 }
10920
10921 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBoolStruct, D>
10922 for &GoldenBoolStruct
10923 {
10924 #[inline]
10925 unsafe fn encode(
10926 self,
10927 encoder: &mut fidl::encoding::Encoder<'_, D>,
10928 offset: usize,
10929 _depth: fidl::encoding::Depth,
10930 ) -> fidl::Result<()> {
10931 encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
10932 fidl::encoding::Encode::<GoldenBoolStruct, D>::encode(
10934 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
10935 encoder,
10936 offset,
10937 _depth,
10938 )
10939 }
10940 }
10941 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
10942 fidl::encoding::Encode<GoldenBoolStruct, D> for (T0,)
10943 {
10944 #[inline]
10945 unsafe fn encode(
10946 self,
10947 encoder: &mut fidl::encoding::Encoder<'_, D>,
10948 offset: usize,
10949 depth: fidl::encoding::Depth,
10950 ) -> fidl::Result<()> {
10951 encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
10952 self.0.encode(encoder, offset + 0, depth)?;
10956 Ok(())
10957 }
10958 }
10959
10960 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBoolStruct {
10961 #[inline(always)]
10962 fn new_empty() -> Self {
10963 Self { v: fidl::new_empty!(bool, D) }
10964 }
10965
10966 #[inline]
10967 unsafe fn decode(
10968 &mut self,
10969 decoder: &mut fidl::encoding::Decoder<'_, D>,
10970 offset: usize,
10971 _depth: fidl::encoding::Depth,
10972 ) -> fidl::Result<()> {
10973 decoder.debug_check_bounds::<Self>(offset);
10974 fidl::decode!(bool, D, &mut self.v, decoder, offset + 0, _depth)?;
10976 Ok(())
10977 }
10978 }
10979
10980 impl fidl::encoding::ValueTypeMarker for GoldenByteArrayStruct {
10981 type Borrowed<'a> = &'a Self;
10982 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10983 value
10984 }
10985 }
10986
10987 unsafe impl fidl::encoding::TypeMarker for GoldenByteArrayStruct {
10988 type Owned = Self;
10989
10990 #[inline(always)]
10991 fn inline_align(_context: fidl::encoding::Context) -> usize {
10992 1
10993 }
10994
10995 #[inline(always)]
10996 fn inline_size(_context: fidl::encoding::Context) -> usize {
10997 4
10998 }
10999 #[inline(always)]
11000 fn encode_is_copy() -> bool {
11001 true
11002 }
11003
11004 #[inline(always)]
11005 fn decode_is_copy() -> bool {
11006 true
11007 }
11008 }
11009
11010 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenByteArrayStruct, D>
11011 for &GoldenByteArrayStruct
11012 {
11013 #[inline]
11014 unsafe fn encode(
11015 self,
11016 encoder: &mut fidl::encoding::Encoder<'_, D>,
11017 offset: usize,
11018 _depth: fidl::encoding::Depth,
11019 ) -> fidl::Result<()> {
11020 encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11021 unsafe {
11022 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11024 (buf_ptr as *mut GoldenByteArrayStruct)
11025 .write_unaligned((self as *const GoldenByteArrayStruct).read());
11026 }
11029 Ok(())
11030 }
11031 }
11032 unsafe impl<
11033 D: fidl::encoding::ResourceDialect,
11034 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 4>, D>,
11035 > fidl::encoding::Encode<GoldenByteArrayStruct, D> for (T0,)
11036 {
11037 #[inline]
11038 unsafe fn encode(
11039 self,
11040 encoder: &mut fidl::encoding::Encoder<'_, D>,
11041 offset: usize,
11042 depth: fidl::encoding::Depth,
11043 ) -> fidl::Result<()> {
11044 encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11045 self.0.encode(encoder, offset + 0, depth)?;
11049 Ok(())
11050 }
11051 }
11052
11053 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenByteArrayStruct {
11054 #[inline(always)]
11055 fn new_empty() -> Self {
11056 Self { v: fidl::new_empty!(fidl::encoding::Array<u8, 4>, D) }
11057 }
11058
11059 #[inline]
11060 unsafe fn decode(
11061 &mut self,
11062 decoder: &mut fidl::encoding::Decoder<'_, D>,
11063 offset: usize,
11064 _depth: fidl::encoding::Depth,
11065 ) -> fidl::Result<()> {
11066 decoder.debug_check_bounds::<Self>(offset);
11067 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11068 unsafe {
11071 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11072 }
11073 Ok(())
11074 }
11075 }
11076
11077 impl fidl::encoding::ValueTypeMarker for GoldenByteVectorStruct {
11078 type Borrowed<'a> = &'a Self;
11079 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11080 value
11081 }
11082 }
11083
11084 unsafe impl fidl::encoding::TypeMarker for GoldenByteVectorStruct {
11085 type Owned = Self;
11086
11087 #[inline(always)]
11088 fn inline_align(_context: fidl::encoding::Context) -> usize {
11089 8
11090 }
11091
11092 #[inline(always)]
11093 fn inline_size(_context: fidl::encoding::Context) -> usize {
11094 16
11095 }
11096 }
11097
11098 unsafe impl<D: fidl::encoding::ResourceDialect>
11099 fidl::encoding::Encode<GoldenByteVectorStruct, D> for &GoldenByteVectorStruct
11100 {
11101 #[inline]
11102 unsafe fn encode(
11103 self,
11104 encoder: &mut fidl::encoding::Encoder<'_, D>,
11105 offset: usize,
11106 _depth: fidl::encoding::Depth,
11107 ) -> fidl::Result<()> {
11108 encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11109 fidl::encoding::Encode::<GoldenByteVectorStruct, D>::encode(
11111 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
11112 &self.v,
11113 ),),
11114 encoder,
11115 offset,
11116 _depth,
11117 )
11118 }
11119 }
11120 unsafe impl<
11121 D: fidl::encoding::ResourceDialect,
11122 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
11123 > fidl::encoding::Encode<GoldenByteVectorStruct, D> for (T0,)
11124 {
11125 #[inline]
11126 unsafe fn encode(
11127 self,
11128 encoder: &mut fidl::encoding::Encoder<'_, D>,
11129 offset: usize,
11130 depth: fidl::encoding::Depth,
11131 ) -> fidl::Result<()> {
11132 encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11133 self.0.encode(encoder, offset + 0, depth)?;
11137 Ok(())
11138 }
11139 }
11140
11141 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11142 for GoldenByteVectorStruct
11143 {
11144 #[inline(always)]
11145 fn new_empty() -> Self {
11146 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
11147 }
11148
11149 #[inline]
11150 unsafe fn decode(
11151 &mut self,
11152 decoder: &mut fidl::encoding::Decoder<'_, D>,
11153 offset: usize,
11154 _depth: fidl::encoding::Depth,
11155 ) -> fidl::Result<()> {
11156 decoder.debug_check_bounds::<Self>(offset);
11157 fidl::decode!(
11159 fidl::encoding::UnboundedVector<u8>,
11160 D,
11161 &mut self.v,
11162 decoder,
11163 offset + 0,
11164 _depth
11165 )?;
11166 Ok(())
11167 }
11168 }
11169
11170 impl fidl::encoding::ValueTypeMarker for GoldenDoubleStruct {
11171 type Borrowed<'a> = &'a Self;
11172 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11173 value
11174 }
11175 }
11176
11177 unsafe impl fidl::encoding::TypeMarker for GoldenDoubleStruct {
11178 type Owned = Self;
11179
11180 #[inline(always)]
11181 fn inline_align(_context: fidl::encoding::Context) -> usize {
11182 8
11183 }
11184
11185 #[inline(always)]
11186 fn inline_size(_context: fidl::encoding::Context) -> usize {
11187 8
11188 }
11189 }
11190
11191 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenDoubleStruct, D>
11192 for &GoldenDoubleStruct
11193 {
11194 #[inline]
11195 unsafe fn encode(
11196 self,
11197 encoder: &mut fidl::encoding::Encoder<'_, D>,
11198 offset: usize,
11199 _depth: fidl::encoding::Depth,
11200 ) -> fidl::Result<()> {
11201 encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11202 fidl::encoding::Encode::<GoldenDoubleStruct, D>::encode(
11204 (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11205 encoder,
11206 offset,
11207 _depth,
11208 )
11209 }
11210 }
11211 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
11212 fidl::encoding::Encode<GoldenDoubleStruct, D> for (T0,)
11213 {
11214 #[inline]
11215 unsafe fn encode(
11216 self,
11217 encoder: &mut fidl::encoding::Encoder<'_, D>,
11218 offset: usize,
11219 depth: fidl::encoding::Depth,
11220 ) -> fidl::Result<()> {
11221 encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11222 self.0.encode(encoder, offset + 0, depth)?;
11226 Ok(())
11227 }
11228 }
11229
11230 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenDoubleStruct {
11231 #[inline(always)]
11232 fn new_empty() -> Self {
11233 Self { v: fidl::new_empty!(f64, D) }
11234 }
11235
11236 #[inline]
11237 unsafe fn decode(
11238 &mut self,
11239 decoder: &mut fidl::encoding::Decoder<'_, D>,
11240 offset: usize,
11241 _depth: fidl::encoding::Depth,
11242 ) -> fidl::Result<()> {
11243 decoder.debug_check_bounds::<Self>(offset);
11244 fidl::decode!(f64, D, &mut self.v, decoder, offset + 0, _depth)?;
11246 Ok(())
11247 }
11248 }
11249
11250 impl fidl::encoding::ValueTypeMarker for GoldenEnumStruct {
11251 type Borrowed<'a> = &'a Self;
11252 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11253 value
11254 }
11255 }
11256
11257 unsafe impl fidl::encoding::TypeMarker for GoldenEnumStruct {
11258 type Owned = Self;
11259
11260 #[inline(always)]
11261 fn inline_align(_context: fidl::encoding::Context) -> usize {
11262 2
11263 }
11264
11265 #[inline(always)]
11266 fn inline_size(_context: fidl::encoding::Context) -> usize {
11267 2
11268 }
11269 }
11270
11271 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenEnumStruct, D>
11272 for &GoldenEnumStruct
11273 {
11274 #[inline]
11275 unsafe fn encode(
11276 self,
11277 encoder: &mut fidl::encoding::Encoder<'_, D>,
11278 offset: usize,
11279 _depth: fidl::encoding::Depth,
11280 ) -> fidl::Result<()> {
11281 encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11282 fidl::encoding::Encode::<GoldenEnumStruct, D>::encode(
11284 (<GoldenEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11285 encoder,
11286 offset,
11287 _depth,
11288 )
11289 }
11290 }
11291 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenEnum, D>>
11292 fidl::encoding::Encode<GoldenEnumStruct, D> for (T0,)
11293 {
11294 #[inline]
11295 unsafe fn encode(
11296 self,
11297 encoder: &mut fidl::encoding::Encoder<'_, D>,
11298 offset: usize,
11299 depth: fidl::encoding::Depth,
11300 ) -> fidl::Result<()> {
11301 encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11302 self.0.encode(encoder, offset + 0, depth)?;
11306 Ok(())
11307 }
11308 }
11309
11310 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnumStruct {
11311 #[inline(always)]
11312 fn new_empty() -> Self {
11313 Self { v: fidl::new_empty!(GoldenEnum, D) }
11314 }
11315
11316 #[inline]
11317 unsafe fn decode(
11318 &mut self,
11319 decoder: &mut fidl::encoding::Decoder<'_, D>,
11320 offset: usize,
11321 _depth: fidl::encoding::Depth,
11322 ) -> fidl::Result<()> {
11323 decoder.debug_check_bounds::<Self>(offset);
11324 fidl::decode!(GoldenEnum, D, &mut self.v, decoder, offset + 0, _depth)?;
11326 Ok(())
11327 }
11328 }
11329
11330 impl fidl::encoding::ValueTypeMarker for GoldenFloatStruct {
11331 type Borrowed<'a> = &'a Self;
11332 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11333 value
11334 }
11335 }
11336
11337 unsafe impl fidl::encoding::TypeMarker for GoldenFloatStruct {
11338 type Owned = Self;
11339
11340 #[inline(always)]
11341 fn inline_align(_context: fidl::encoding::Context) -> usize {
11342 4
11343 }
11344
11345 #[inline(always)]
11346 fn inline_size(_context: fidl::encoding::Context) -> usize {
11347 4
11348 }
11349 }
11350
11351 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenFloatStruct, D>
11352 for &GoldenFloatStruct
11353 {
11354 #[inline]
11355 unsafe fn encode(
11356 self,
11357 encoder: &mut fidl::encoding::Encoder<'_, D>,
11358 offset: usize,
11359 _depth: fidl::encoding::Depth,
11360 ) -> fidl::Result<()> {
11361 encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11362 fidl::encoding::Encode::<GoldenFloatStruct, D>::encode(
11364 (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11365 encoder,
11366 offset,
11367 _depth,
11368 )
11369 }
11370 }
11371 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
11372 fidl::encoding::Encode<GoldenFloatStruct, D> for (T0,)
11373 {
11374 #[inline]
11375 unsafe fn encode(
11376 self,
11377 encoder: &mut fidl::encoding::Encoder<'_, D>,
11378 offset: usize,
11379 depth: fidl::encoding::Depth,
11380 ) -> fidl::Result<()> {
11381 encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11382 self.0.encode(encoder, offset + 0, depth)?;
11386 Ok(())
11387 }
11388 }
11389
11390 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenFloatStruct {
11391 #[inline(always)]
11392 fn new_empty() -> Self {
11393 Self { v: fidl::new_empty!(f32, D) }
11394 }
11395
11396 #[inline]
11397 unsafe fn decode(
11398 &mut self,
11399 decoder: &mut fidl::encoding::Decoder<'_, D>,
11400 offset: usize,
11401 _depth: fidl::encoding::Depth,
11402 ) -> fidl::Result<()> {
11403 decoder.debug_check_bounds::<Self>(offset);
11404 fidl::decode!(f32, D, &mut self.v, decoder, offset + 0, _depth)?;
11406 Ok(())
11407 }
11408 }
11409
11410 impl fidl::encoding::ValueTypeMarker for GoldenIntStruct {
11411 type Borrowed<'a> = &'a Self;
11412 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11413 value
11414 }
11415 }
11416
11417 unsafe impl fidl::encoding::TypeMarker for GoldenIntStruct {
11418 type Owned = Self;
11419
11420 #[inline(always)]
11421 fn inline_align(_context: fidl::encoding::Context) -> usize {
11422 2
11423 }
11424
11425 #[inline(always)]
11426 fn inline_size(_context: fidl::encoding::Context) -> usize {
11427 2
11428 }
11429 #[inline(always)]
11430 fn encode_is_copy() -> bool {
11431 true
11432 }
11433
11434 #[inline(always)]
11435 fn decode_is_copy() -> bool {
11436 true
11437 }
11438 }
11439
11440 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenIntStruct, D>
11441 for &GoldenIntStruct
11442 {
11443 #[inline]
11444 unsafe fn encode(
11445 self,
11446 encoder: &mut fidl::encoding::Encoder<'_, D>,
11447 offset: usize,
11448 _depth: fidl::encoding::Depth,
11449 ) -> fidl::Result<()> {
11450 encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11451 unsafe {
11452 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11454 (buf_ptr as *mut GoldenIntStruct)
11455 .write_unaligned((self as *const GoldenIntStruct).read());
11456 }
11459 Ok(())
11460 }
11461 }
11462 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11463 fidl::encoding::Encode<GoldenIntStruct, D> for (T0,)
11464 {
11465 #[inline]
11466 unsafe fn encode(
11467 self,
11468 encoder: &mut fidl::encoding::Encoder<'_, D>,
11469 offset: usize,
11470 depth: fidl::encoding::Depth,
11471 ) -> fidl::Result<()> {
11472 encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11473 self.0.encode(encoder, offset + 0, depth)?;
11477 Ok(())
11478 }
11479 }
11480
11481 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenIntStruct {
11482 #[inline(always)]
11483 fn new_empty() -> Self {
11484 Self { v: fidl::new_empty!(i16, D) }
11485 }
11486
11487 #[inline]
11488 unsafe fn decode(
11489 &mut self,
11490 decoder: &mut fidl::encoding::Decoder<'_, D>,
11491 offset: usize,
11492 _depth: fidl::encoding::Depth,
11493 ) -> fidl::Result<()> {
11494 decoder.debug_check_bounds::<Self>(offset);
11495 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11496 unsafe {
11499 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11500 }
11501 Ok(())
11502 }
11503 }
11504
11505 impl fidl::encoding::ValueTypeMarker for GoldenNullableByteVectorStruct {
11506 type Borrowed<'a> = &'a Self;
11507 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11508 value
11509 }
11510 }
11511
11512 unsafe impl fidl::encoding::TypeMarker for GoldenNullableByteVectorStruct {
11513 type Owned = Self;
11514
11515 #[inline(always)]
11516 fn inline_align(_context: fidl::encoding::Context) -> usize {
11517 8
11518 }
11519
11520 #[inline(always)]
11521 fn inline_size(_context: fidl::encoding::Context) -> usize {
11522 16
11523 }
11524 }
11525
11526 unsafe impl<D: fidl::encoding::ResourceDialect>
11527 fidl::encoding::Encode<GoldenNullableByteVectorStruct, D>
11528 for &GoldenNullableByteVectorStruct
11529 {
11530 #[inline]
11531 unsafe fn encode(
11532 self,
11533 encoder: &mut fidl::encoding::Encoder<'_, D>,
11534 offset: usize,
11535 _depth: fidl::encoding::Depth,
11536 ) -> fidl::Result<()> {
11537 encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11538 fidl::encoding::Encode::<GoldenNullableByteVectorStruct, D>::encode(
11540 (
11541 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11542 ),
11543 encoder, offset, _depth
11544 )
11545 }
11546 }
11547 unsafe impl<
11548 D: fidl::encoding::ResourceDialect,
11549 T0: fidl::encoding::Encode<
11550 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11551 D,
11552 >,
11553 > fidl::encoding::Encode<GoldenNullableByteVectorStruct, D> for (T0,)
11554 {
11555 #[inline]
11556 unsafe fn encode(
11557 self,
11558 encoder: &mut fidl::encoding::Encoder<'_, D>,
11559 offset: usize,
11560 depth: fidl::encoding::Depth,
11561 ) -> fidl::Result<()> {
11562 encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11563 self.0.encode(encoder, offset + 0, depth)?;
11567 Ok(())
11568 }
11569 }
11570
11571 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11572 for GoldenNullableByteVectorStruct
11573 {
11574 #[inline(always)]
11575 fn new_empty() -> Self {
11576 Self {
11577 v: fidl::new_empty!(
11578 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11579 D
11580 ),
11581 }
11582 }
11583
11584 #[inline]
11585 unsafe fn decode(
11586 &mut self,
11587 decoder: &mut fidl::encoding::Decoder<'_, D>,
11588 offset: usize,
11589 _depth: fidl::encoding::Depth,
11590 ) -> fidl::Result<()> {
11591 decoder.debug_check_bounds::<Self>(offset);
11592 fidl::decode!(
11594 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11595 D,
11596 &mut self.v,
11597 decoder,
11598 offset + 0,
11599 _depth
11600 )?;
11601 Ok(())
11602 }
11603 }
11604
11605 impl fidl::encoding::ValueTypeMarker for GoldenNullableStringStruct {
11606 type Borrowed<'a> = &'a Self;
11607 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11608 value
11609 }
11610 }
11611
11612 unsafe impl fidl::encoding::TypeMarker for GoldenNullableStringStruct {
11613 type Owned = Self;
11614
11615 #[inline(always)]
11616 fn inline_align(_context: fidl::encoding::Context) -> usize {
11617 8
11618 }
11619
11620 #[inline(always)]
11621 fn inline_size(_context: fidl::encoding::Context) -> usize {
11622 16
11623 }
11624 }
11625
11626 unsafe impl<D: fidl::encoding::ResourceDialect>
11627 fidl::encoding::Encode<GoldenNullableStringStruct, D> for &GoldenNullableStringStruct
11628 {
11629 #[inline]
11630 unsafe fn encode(
11631 self,
11632 encoder: &mut fidl::encoding::Encoder<'_, D>,
11633 offset: usize,
11634 _depth: fidl::encoding::Depth,
11635 ) -> fidl::Result<()> {
11636 encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11637 fidl::encoding::Encode::<GoldenNullableStringStruct, D>::encode(
11639 (
11640 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11641 ),
11642 encoder, offset, _depth
11643 )
11644 }
11645 }
11646 unsafe impl<
11647 D: fidl::encoding::ResourceDialect,
11648 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
11649 > fidl::encoding::Encode<GoldenNullableStringStruct, D> for (T0,)
11650 {
11651 #[inline]
11652 unsafe fn encode(
11653 self,
11654 encoder: &mut fidl::encoding::Encoder<'_, D>,
11655 offset: usize,
11656 depth: fidl::encoding::Depth,
11657 ) -> fidl::Result<()> {
11658 encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11659 self.0.encode(encoder, offset + 0, depth)?;
11663 Ok(())
11664 }
11665 }
11666
11667 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11668 for GoldenNullableStringStruct
11669 {
11670 #[inline(always)]
11671 fn new_empty() -> Self {
11672 Self {
11673 v: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
11674 }
11675 }
11676
11677 #[inline]
11678 unsafe fn decode(
11679 &mut self,
11680 decoder: &mut fidl::encoding::Decoder<'_, D>,
11681 offset: usize,
11682 _depth: fidl::encoding::Depth,
11683 ) -> fidl::Result<()> {
11684 decoder.debug_check_bounds::<Self>(offset);
11685 fidl::decode!(
11687 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
11688 D,
11689 &mut self.v,
11690 decoder,
11691 offset + 0,
11692 _depth
11693 )?;
11694 Ok(())
11695 }
11696 }
11697
11698 impl fidl::encoding::ValueTypeMarker for GoldenNullableStruct {
11699 type Borrowed<'a> = &'a Self;
11700 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11701 value
11702 }
11703 }
11704
11705 unsafe impl fidl::encoding::TypeMarker for GoldenNullableStruct {
11706 type Owned = Self;
11707
11708 #[inline(always)]
11709 fn inline_align(_context: fidl::encoding::Context) -> usize {
11710 8
11711 }
11712
11713 #[inline(always)]
11714 fn inline_size(_context: fidl::encoding::Context) -> usize {
11715 8
11716 }
11717 }
11718
11719 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenNullableStruct, D>
11720 for &GoldenNullableStruct
11721 {
11722 #[inline]
11723 unsafe fn encode(
11724 self,
11725 encoder: &mut fidl::encoding::Encoder<'_, D>,
11726 offset: usize,
11727 _depth: fidl::encoding::Depth,
11728 ) -> fidl::Result<()> {
11729 encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11730 fidl::encoding::Encode::<GoldenNullableStruct, D>::encode(
11732 (
11733 <fidl::encoding::Boxed<GoldenBoolStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11734 ),
11735 encoder, offset, _depth
11736 )
11737 }
11738 }
11739 unsafe impl<
11740 D: fidl::encoding::ResourceDialect,
11741 T0: fidl::encoding::Encode<fidl::encoding::Boxed<GoldenBoolStruct>, D>,
11742 > fidl::encoding::Encode<GoldenNullableStruct, D> for (T0,)
11743 {
11744 #[inline]
11745 unsafe fn encode(
11746 self,
11747 encoder: &mut fidl::encoding::Encoder<'_, D>,
11748 offset: usize,
11749 depth: fidl::encoding::Depth,
11750 ) -> fidl::Result<()> {
11751 encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11752 self.0.encode(encoder, offset + 0, depth)?;
11756 Ok(())
11757 }
11758 }
11759
11760 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenNullableStruct {
11761 #[inline(always)]
11762 fn new_empty() -> Self {
11763 Self { v: fidl::new_empty!(fidl::encoding::Boxed<GoldenBoolStruct>, D) }
11764 }
11765
11766 #[inline]
11767 unsafe fn decode(
11768 &mut self,
11769 decoder: &mut fidl::encoding::Decoder<'_, D>,
11770 offset: usize,
11771 _depth: fidl::encoding::Depth,
11772 ) -> fidl::Result<()> {
11773 decoder.debug_check_bounds::<Self>(offset);
11774 fidl::decode!(
11776 fidl::encoding::Boxed<GoldenBoolStruct>,
11777 D,
11778 &mut self.v,
11779 decoder,
11780 offset + 0,
11781 _depth
11782 )?;
11783 Ok(())
11784 }
11785 }
11786
11787 impl fidl::encoding::ValueTypeMarker for GoldenNullableUnionStruct {
11788 type Borrowed<'a> = &'a Self;
11789 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11790 value
11791 }
11792 }
11793
11794 unsafe impl fidl::encoding::TypeMarker for GoldenNullableUnionStruct {
11795 type Owned = Self;
11796
11797 #[inline(always)]
11798 fn inline_align(_context: fidl::encoding::Context) -> usize {
11799 8
11800 }
11801
11802 #[inline(always)]
11803 fn inline_size(_context: fidl::encoding::Context) -> usize {
11804 16
11805 }
11806 }
11807
11808 unsafe impl<D: fidl::encoding::ResourceDialect>
11809 fidl::encoding::Encode<GoldenNullableUnionStruct, D> for &GoldenNullableUnionStruct
11810 {
11811 #[inline]
11812 unsafe fn encode(
11813 self,
11814 encoder: &mut fidl::encoding::Encoder<'_, D>,
11815 offset: usize,
11816 _depth: fidl::encoding::Depth,
11817 ) -> fidl::Result<()> {
11818 encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
11819 fidl::encoding::Encode::<GoldenNullableUnionStruct, D>::encode(
11821 (
11822 <fidl::encoding::OptionalUnion<GoldenUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11823 ),
11824 encoder, offset, _depth
11825 )
11826 }
11827 }
11828 unsafe impl<
11829 D: fidl::encoding::ResourceDialect,
11830 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<GoldenUnion>, D>,
11831 > fidl::encoding::Encode<GoldenNullableUnionStruct, D> for (T0,)
11832 {
11833 #[inline]
11834 unsafe fn encode(
11835 self,
11836 encoder: &mut fidl::encoding::Encoder<'_, D>,
11837 offset: usize,
11838 depth: fidl::encoding::Depth,
11839 ) -> fidl::Result<()> {
11840 encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
11841 self.0.encode(encoder, offset + 0, depth)?;
11845 Ok(())
11846 }
11847 }
11848
11849 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11850 for GoldenNullableUnionStruct
11851 {
11852 #[inline(always)]
11853 fn new_empty() -> Self {
11854 Self { v: fidl::new_empty!(fidl::encoding::OptionalUnion<GoldenUnion>, D) }
11855 }
11856
11857 #[inline]
11858 unsafe fn decode(
11859 &mut self,
11860 decoder: &mut fidl::encoding::Decoder<'_, D>,
11861 offset: usize,
11862 _depth: fidl::encoding::Depth,
11863 ) -> fidl::Result<()> {
11864 decoder.debug_check_bounds::<Self>(offset);
11865 fidl::decode!(
11867 fidl::encoding::OptionalUnion<GoldenUnion>,
11868 D,
11869 &mut self.v,
11870 decoder,
11871 offset + 0,
11872 _depth
11873 )?;
11874 Ok(())
11875 }
11876 }
11877
11878 impl fidl::encoding::ValueTypeMarker for GoldenStringStruct {
11879 type Borrowed<'a> = &'a Self;
11880 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11881 value
11882 }
11883 }
11884
11885 unsafe impl fidl::encoding::TypeMarker for GoldenStringStruct {
11886 type Owned = Self;
11887
11888 #[inline(always)]
11889 fn inline_align(_context: fidl::encoding::Context) -> usize {
11890 8
11891 }
11892
11893 #[inline(always)]
11894 fn inline_size(_context: fidl::encoding::Context) -> usize {
11895 16
11896 }
11897 }
11898
11899 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenStringStruct, D>
11900 for &GoldenStringStruct
11901 {
11902 #[inline]
11903 unsafe fn encode(
11904 self,
11905 encoder: &mut fidl::encoding::Encoder<'_, D>,
11906 offset: usize,
11907 _depth: fidl::encoding::Depth,
11908 ) -> fidl::Result<()> {
11909 encoder.debug_check_bounds::<GoldenStringStruct>(offset);
11910 fidl::encoding::Encode::<GoldenStringStruct, D>::encode(
11912 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
11913 &self.v,
11914 ),),
11915 encoder,
11916 offset,
11917 _depth,
11918 )
11919 }
11920 }
11921 unsafe impl<
11922 D: fidl::encoding::ResourceDialect,
11923 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
11924 > fidl::encoding::Encode<GoldenStringStruct, D> for (T0,)
11925 {
11926 #[inline]
11927 unsafe fn encode(
11928 self,
11929 encoder: &mut fidl::encoding::Encoder<'_, D>,
11930 offset: usize,
11931 depth: fidl::encoding::Depth,
11932 ) -> fidl::Result<()> {
11933 encoder.debug_check_bounds::<GoldenStringStruct>(offset);
11934 self.0.encode(encoder, offset + 0, depth)?;
11938 Ok(())
11939 }
11940 }
11941
11942 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenStringStruct {
11943 #[inline(always)]
11944 fn new_empty() -> Self {
11945 Self { v: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
11946 }
11947
11948 #[inline]
11949 unsafe fn decode(
11950 &mut self,
11951 decoder: &mut fidl::encoding::Decoder<'_, D>,
11952 offset: usize,
11953 _depth: fidl::encoding::Depth,
11954 ) -> fidl::Result<()> {
11955 decoder.debug_check_bounds::<Self>(offset);
11956 fidl::decode!(
11958 fidl::encoding::UnboundedString,
11959 D,
11960 &mut self.v,
11961 decoder,
11962 offset + 0,
11963 _depth
11964 )?;
11965 Ok(())
11966 }
11967 }
11968
11969 impl fidl::encoding::ValueTypeMarker for GoldenStringWithMaxSize2 {
11970 type Borrowed<'a> = &'a Self;
11971 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11972 value
11973 }
11974 }
11975
11976 unsafe impl fidl::encoding::TypeMarker for GoldenStringWithMaxSize2 {
11977 type Owned = Self;
11978
11979 #[inline(always)]
11980 fn inline_align(_context: fidl::encoding::Context) -> usize {
11981 8
11982 }
11983
11984 #[inline(always)]
11985 fn inline_size(_context: fidl::encoding::Context) -> usize {
11986 16
11987 }
11988 }
11989
11990 unsafe impl<D: fidl::encoding::ResourceDialect>
11991 fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for &GoldenStringWithMaxSize2
11992 {
11993 #[inline]
11994 unsafe fn encode(
11995 self,
11996 encoder: &mut fidl::encoding::Encoder<'_, D>,
11997 offset: usize,
11998 _depth: fidl::encoding::Depth,
11999 ) -> fidl::Result<()> {
12000 encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12001 fidl::encoding::Encode::<GoldenStringWithMaxSize2, D>::encode(
12003 (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
12004 &self.s,
12005 ),),
12006 encoder,
12007 offset,
12008 _depth,
12009 )
12010 }
12011 }
12012 unsafe impl<
12013 D: fidl::encoding::ResourceDialect,
12014 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
12015 > fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for (T0,)
12016 {
12017 #[inline]
12018 unsafe fn encode(
12019 self,
12020 encoder: &mut fidl::encoding::Encoder<'_, D>,
12021 offset: usize,
12022 depth: fidl::encoding::Depth,
12023 ) -> fidl::Result<()> {
12024 encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12025 self.0.encode(encoder, offset + 0, depth)?;
12029 Ok(())
12030 }
12031 }
12032
12033 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12034 for GoldenStringWithMaxSize2
12035 {
12036 #[inline(always)]
12037 fn new_empty() -> Self {
12038 Self { s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
12039 }
12040
12041 #[inline]
12042 unsafe fn decode(
12043 &mut self,
12044 decoder: &mut fidl::encoding::Decoder<'_, D>,
12045 offset: usize,
12046 _depth: fidl::encoding::Depth,
12047 ) -> fidl::Result<()> {
12048 decoder.debug_check_bounds::<Self>(offset);
12049 fidl::decode!(
12051 fidl::encoding::BoundedString<2>,
12052 D,
12053 &mut self.s,
12054 decoder,
12055 offset + 0,
12056 _depth
12057 )?;
12058 Ok(())
12059 }
12060 }
12061
12062 impl fidl::encoding::ValueTypeMarker for GoldenStructArrayStruct {
12063 type Borrowed<'a> = &'a Self;
12064 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12065 value
12066 }
12067 }
12068
12069 unsafe impl fidl::encoding::TypeMarker for GoldenStructArrayStruct {
12070 type Owned = Self;
12071
12072 #[inline(always)]
12073 fn inline_align(_context: fidl::encoding::Context) -> usize {
12074 2
12075 }
12076
12077 #[inline(always)]
12078 fn inline_size(_context: fidl::encoding::Context) -> usize {
12079 4
12080 }
12081 #[inline(always)]
12082 fn encode_is_copy() -> bool {
12083 true
12084 }
12085
12086 #[inline(always)]
12087 fn decode_is_copy() -> bool {
12088 true
12089 }
12090 }
12091
12092 unsafe impl<D: fidl::encoding::ResourceDialect>
12093 fidl::encoding::Encode<GoldenStructArrayStruct, D> for &GoldenStructArrayStruct
12094 {
12095 #[inline]
12096 unsafe fn encode(
12097 self,
12098 encoder: &mut fidl::encoding::Encoder<'_, D>,
12099 offset: usize,
12100 _depth: fidl::encoding::Depth,
12101 ) -> fidl::Result<()> {
12102 encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12103 unsafe {
12104 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12106 (buf_ptr as *mut GoldenStructArrayStruct)
12107 .write_unaligned((self as *const GoldenStructArrayStruct).read());
12108 }
12111 Ok(())
12112 }
12113 }
12114 unsafe impl<
12115 D: fidl::encoding::ResourceDialect,
12116 T0: fidl::encoding::Encode<fidl::encoding::Array<GoldenIntStruct, 2>, D>,
12117 > fidl::encoding::Encode<GoldenStructArrayStruct, D> for (T0,)
12118 {
12119 #[inline]
12120 unsafe fn encode(
12121 self,
12122 encoder: &mut fidl::encoding::Encoder<'_, D>,
12123 offset: usize,
12124 depth: fidl::encoding::Depth,
12125 ) -> fidl::Result<()> {
12126 encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12127 self.0.encode(encoder, offset + 0, depth)?;
12131 Ok(())
12132 }
12133 }
12134
12135 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12136 for GoldenStructArrayStruct
12137 {
12138 #[inline(always)]
12139 fn new_empty() -> Self {
12140 Self { v: fidl::new_empty!(fidl::encoding::Array<GoldenIntStruct, 2>, D) }
12141 }
12142
12143 #[inline]
12144 unsafe fn decode(
12145 &mut self,
12146 decoder: &mut fidl::encoding::Decoder<'_, D>,
12147 offset: usize,
12148 _depth: fidl::encoding::Depth,
12149 ) -> fidl::Result<()> {
12150 decoder.debug_check_bounds::<Self>(offset);
12151 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12152 unsafe {
12155 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12156 }
12157 Ok(())
12158 }
12159 }
12160
12161 impl fidl::encoding::ValueTypeMarker for GoldenStructVectorStruct {
12162 type Borrowed<'a> = &'a Self;
12163 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12164 value
12165 }
12166 }
12167
12168 unsafe impl fidl::encoding::TypeMarker for GoldenStructVectorStruct {
12169 type Owned = Self;
12170
12171 #[inline(always)]
12172 fn inline_align(_context: fidl::encoding::Context) -> usize {
12173 8
12174 }
12175
12176 #[inline(always)]
12177 fn inline_size(_context: fidl::encoding::Context) -> usize {
12178 16
12179 }
12180 }
12181
12182 unsafe impl<D: fidl::encoding::ResourceDialect>
12183 fidl::encoding::Encode<GoldenStructVectorStruct, D> for &GoldenStructVectorStruct
12184 {
12185 #[inline]
12186 unsafe fn encode(
12187 self,
12188 encoder: &mut fidl::encoding::Encoder<'_, D>,
12189 offset: usize,
12190 _depth: fidl::encoding::Depth,
12191 ) -> fidl::Result<()> {
12192 encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12193 fidl::encoding::Encode::<GoldenStructVectorStruct, D>::encode(
12195 (
12196 <fidl::encoding::UnboundedVector<GoldenIntStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
12197 ),
12198 encoder, offset, _depth
12199 )
12200 }
12201 }
12202 unsafe impl<
12203 D: fidl::encoding::ResourceDialect,
12204 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<GoldenIntStruct>, D>,
12205 > fidl::encoding::Encode<GoldenStructVectorStruct, D> for (T0,)
12206 {
12207 #[inline]
12208 unsafe fn encode(
12209 self,
12210 encoder: &mut fidl::encoding::Encoder<'_, D>,
12211 offset: usize,
12212 depth: fidl::encoding::Depth,
12213 ) -> fidl::Result<()> {
12214 encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12215 self.0.encode(encoder, offset + 0, depth)?;
12219 Ok(())
12220 }
12221 }
12222
12223 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12224 for GoldenStructVectorStruct
12225 {
12226 #[inline(always)]
12227 fn new_empty() -> Self {
12228 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<GoldenIntStruct>, D) }
12229 }
12230
12231 #[inline]
12232 unsafe fn decode(
12233 &mut self,
12234 decoder: &mut fidl::encoding::Decoder<'_, D>,
12235 offset: usize,
12236 _depth: fidl::encoding::Depth,
12237 ) -> fidl::Result<()> {
12238 decoder.debug_check_bounds::<Self>(offset);
12239 fidl::decode!(
12241 fidl::encoding::UnboundedVector<GoldenIntStruct>,
12242 D,
12243 &mut self.v,
12244 decoder,
12245 offset + 0,
12246 _depth
12247 )?;
12248 Ok(())
12249 }
12250 }
12251
12252 impl fidl::encoding::ValueTypeMarker for GoldenTableStruct {
12253 type Borrowed<'a> = &'a Self;
12254 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12255 value
12256 }
12257 }
12258
12259 unsafe impl fidl::encoding::TypeMarker for GoldenTableStruct {
12260 type Owned = Self;
12261
12262 #[inline(always)]
12263 fn inline_align(_context: fidl::encoding::Context) -> usize {
12264 8
12265 }
12266
12267 #[inline(always)]
12268 fn inline_size(_context: fidl::encoding::Context) -> usize {
12269 16
12270 }
12271 }
12272
12273 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTableStruct, D>
12274 for &GoldenTableStruct
12275 {
12276 #[inline]
12277 unsafe fn encode(
12278 self,
12279 encoder: &mut fidl::encoding::Encoder<'_, D>,
12280 offset: usize,
12281 _depth: fidl::encoding::Depth,
12282 ) -> fidl::Result<()> {
12283 encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12284 fidl::encoding::Encode::<GoldenTableStruct, D>::encode(
12286 (<GoldenTable as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12287 encoder,
12288 offset,
12289 _depth,
12290 )
12291 }
12292 }
12293 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenTable, D>>
12294 fidl::encoding::Encode<GoldenTableStruct, D> for (T0,)
12295 {
12296 #[inline]
12297 unsafe fn encode(
12298 self,
12299 encoder: &mut fidl::encoding::Encoder<'_, D>,
12300 offset: usize,
12301 depth: fidl::encoding::Depth,
12302 ) -> fidl::Result<()> {
12303 encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12304 self.0.encode(encoder, offset + 0, depth)?;
12308 Ok(())
12309 }
12310 }
12311
12312 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTableStruct {
12313 #[inline(always)]
12314 fn new_empty() -> Self {
12315 Self { v: fidl::new_empty!(GoldenTable, D) }
12316 }
12317
12318 #[inline]
12319 unsafe fn decode(
12320 &mut self,
12321 decoder: &mut fidl::encoding::Decoder<'_, D>,
12322 offset: usize,
12323 _depth: fidl::encoding::Depth,
12324 ) -> fidl::Result<()> {
12325 decoder.debug_check_bounds::<Self>(offset);
12326 fidl::decode!(GoldenTable, D, &mut self.v, decoder, offset + 0, _depth)?;
12328 Ok(())
12329 }
12330 }
12331
12332 impl fidl::encoding::ValueTypeMarker for GoldenUintStruct {
12333 type Borrowed<'a> = &'a Self;
12334 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12335 value
12336 }
12337 }
12338
12339 unsafe impl fidl::encoding::TypeMarker for GoldenUintStruct {
12340 type Owned = Self;
12341
12342 #[inline(always)]
12343 fn inline_align(_context: fidl::encoding::Context) -> usize {
12344 2
12345 }
12346
12347 #[inline(always)]
12348 fn inline_size(_context: fidl::encoding::Context) -> usize {
12349 2
12350 }
12351 #[inline(always)]
12352 fn encode_is_copy() -> bool {
12353 true
12354 }
12355
12356 #[inline(always)]
12357 fn decode_is_copy() -> bool {
12358 true
12359 }
12360 }
12361
12362 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUintStruct, D>
12363 for &GoldenUintStruct
12364 {
12365 #[inline]
12366 unsafe fn encode(
12367 self,
12368 encoder: &mut fidl::encoding::Encoder<'_, D>,
12369 offset: usize,
12370 _depth: fidl::encoding::Depth,
12371 ) -> fidl::Result<()> {
12372 encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12373 unsafe {
12374 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12376 (buf_ptr as *mut GoldenUintStruct)
12377 .write_unaligned((self as *const GoldenUintStruct).read());
12378 }
12381 Ok(())
12382 }
12383 }
12384 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
12385 fidl::encoding::Encode<GoldenUintStruct, D> for (T0,)
12386 {
12387 #[inline]
12388 unsafe fn encode(
12389 self,
12390 encoder: &mut fidl::encoding::Encoder<'_, D>,
12391 offset: usize,
12392 depth: fidl::encoding::Depth,
12393 ) -> fidl::Result<()> {
12394 encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12395 self.0.encode(encoder, offset + 0, depth)?;
12399 Ok(())
12400 }
12401 }
12402
12403 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUintStruct {
12404 #[inline(always)]
12405 fn new_empty() -> Self {
12406 Self { v: fidl::new_empty!(u16, D) }
12407 }
12408
12409 #[inline]
12410 unsafe fn decode(
12411 &mut self,
12412 decoder: &mut fidl::encoding::Decoder<'_, D>,
12413 offset: usize,
12414 _depth: fidl::encoding::Depth,
12415 ) -> fidl::Result<()> {
12416 decoder.debug_check_bounds::<Self>(offset);
12417 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12418 unsafe {
12421 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
12422 }
12423 Ok(())
12424 }
12425 }
12426
12427 impl fidl::encoding::ValueTypeMarker for GoldenUnionStruct {
12428 type Borrowed<'a> = &'a Self;
12429 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12430 value
12431 }
12432 }
12433
12434 unsafe impl fidl::encoding::TypeMarker for GoldenUnionStruct {
12435 type Owned = Self;
12436
12437 #[inline(always)]
12438 fn inline_align(_context: fidl::encoding::Context) -> usize {
12439 8
12440 }
12441
12442 #[inline(always)]
12443 fn inline_size(_context: fidl::encoding::Context) -> usize {
12444 16
12445 }
12446 }
12447
12448 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnionStruct, D>
12449 for &GoldenUnionStruct
12450 {
12451 #[inline]
12452 unsafe fn encode(
12453 self,
12454 encoder: &mut fidl::encoding::Encoder<'_, D>,
12455 offset: usize,
12456 _depth: fidl::encoding::Depth,
12457 ) -> fidl::Result<()> {
12458 encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12459 fidl::encoding::Encode::<GoldenUnionStruct, D>::encode(
12461 (<GoldenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12462 encoder,
12463 offset,
12464 _depth,
12465 )
12466 }
12467 }
12468 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenUnion, D>>
12469 fidl::encoding::Encode<GoldenUnionStruct, D> for (T0,)
12470 {
12471 #[inline]
12472 unsafe fn encode(
12473 self,
12474 encoder: &mut fidl::encoding::Encoder<'_, D>,
12475 offset: usize,
12476 depth: fidl::encoding::Depth,
12477 ) -> fidl::Result<()> {
12478 encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12479 self.0.encode(encoder, offset + 0, depth)?;
12483 Ok(())
12484 }
12485 }
12486
12487 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnionStruct {
12488 #[inline(always)]
12489 fn new_empty() -> Self {
12490 Self { v: fidl::new_empty!(GoldenUnion, D) }
12491 }
12492
12493 #[inline]
12494 unsafe fn decode(
12495 &mut self,
12496 decoder: &mut fidl::encoding::Decoder<'_, D>,
12497 offset: usize,
12498 _depth: fidl::encoding::Depth,
12499 ) -> fidl::Result<()> {
12500 decoder.debug_check_bounds::<Self>(offset);
12501 fidl::decode!(GoldenUnion, D, &mut self.v, decoder, offset + 0, _depth)?;
12503 Ok(())
12504 }
12505 }
12506
12507 impl fidl::encoding::ValueTypeMarker for Int64Struct {
12508 type Borrowed<'a> = &'a Self;
12509 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12510 value
12511 }
12512 }
12513
12514 unsafe impl fidl::encoding::TypeMarker for Int64Struct {
12515 type Owned = Self;
12516
12517 #[inline(always)]
12518 fn inline_align(_context: fidl::encoding::Context) -> usize {
12519 8
12520 }
12521
12522 #[inline(always)]
12523 fn inline_size(_context: fidl::encoding::Context) -> usize {
12524 8
12525 }
12526 #[inline(always)]
12527 fn encode_is_copy() -> bool {
12528 true
12529 }
12530
12531 #[inline(always)]
12532 fn decode_is_copy() -> bool {
12533 true
12534 }
12535 }
12536
12537 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Int64Struct, D>
12538 for &Int64Struct
12539 {
12540 #[inline]
12541 unsafe fn encode(
12542 self,
12543 encoder: &mut fidl::encoding::Encoder<'_, D>,
12544 offset: usize,
12545 _depth: fidl::encoding::Depth,
12546 ) -> fidl::Result<()> {
12547 encoder.debug_check_bounds::<Int64Struct>(offset);
12548 unsafe {
12549 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12551 (buf_ptr as *mut Int64Struct).write_unaligned((self as *const Int64Struct).read());
12552 }
12555 Ok(())
12556 }
12557 }
12558 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
12559 fidl::encoding::Encode<Int64Struct, D> for (T0,)
12560 {
12561 #[inline]
12562 unsafe fn encode(
12563 self,
12564 encoder: &mut fidl::encoding::Encoder<'_, D>,
12565 offset: usize,
12566 depth: fidl::encoding::Depth,
12567 ) -> fidl::Result<()> {
12568 encoder.debug_check_bounds::<Int64Struct>(offset);
12569 self.0.encode(encoder, offset + 0, depth)?;
12573 Ok(())
12574 }
12575 }
12576
12577 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Int64Struct {
12578 #[inline(always)]
12579 fn new_empty() -> Self {
12580 Self { x: fidl::new_empty!(i64, D) }
12581 }
12582
12583 #[inline]
12584 unsafe fn decode(
12585 &mut self,
12586 decoder: &mut fidl::encoding::Decoder<'_, D>,
12587 offset: usize,
12588 _depth: fidl::encoding::Depth,
12589 ) -> fidl::Result<()> {
12590 decoder.debug_check_bounds::<Self>(offset);
12591 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12592 unsafe {
12595 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12596 }
12597 Ok(())
12598 }
12599 }
12600
12601 impl fidl::encoding::ValueTypeMarker for InterfaceConfig {
12602 type Borrowed<'a> = &'a Self;
12603 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12604 value
12605 }
12606 }
12607
12608 unsafe impl fidl::encoding::TypeMarker for InterfaceConfig {
12609 type Owned = Self;
12610
12611 #[inline(always)]
12612 fn inline_align(_context: fidl::encoding::Context) -> usize {
12613 8
12614 }
12615
12616 #[inline(always)]
12617 fn inline_size(_context: fidl::encoding::Context) -> usize {
12618 32
12619 }
12620 }
12621
12622 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceConfig, D>
12623 for &InterfaceConfig
12624 {
12625 #[inline]
12626 unsafe fn encode(
12627 self,
12628 encoder: &mut fidl::encoding::Encoder<'_, D>,
12629 offset: usize,
12630 _depth: fidl::encoding::Depth,
12631 ) -> fidl::Result<()> {
12632 encoder.debug_check_bounds::<InterfaceConfig>(offset);
12633 fidl::encoding::Encode::<InterfaceConfig, D>::encode(
12635 (
12636 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
12637 &self.name,
12638 ),
12639 <IpAddressConfig as fidl::encoding::ValueTypeMarker>::borrow(
12640 &self.ip_address_config,
12641 ),
12642 ),
12643 encoder,
12644 offset,
12645 _depth,
12646 )
12647 }
12648 }
12649 unsafe impl<
12650 D: fidl::encoding::ResourceDialect,
12651 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
12652 T1: fidl::encoding::Encode<IpAddressConfig, D>,
12653 > fidl::encoding::Encode<InterfaceConfig, D> for (T0, T1)
12654 {
12655 #[inline]
12656 unsafe fn encode(
12657 self,
12658 encoder: &mut fidl::encoding::Encoder<'_, D>,
12659 offset: usize,
12660 depth: fidl::encoding::Depth,
12661 ) -> fidl::Result<()> {
12662 encoder.debug_check_bounds::<InterfaceConfig>(offset);
12663 self.0.encode(encoder, offset + 0, depth)?;
12667 self.1.encode(encoder, offset + 16, depth)?;
12668 Ok(())
12669 }
12670 }
12671
12672 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceConfig {
12673 #[inline(always)]
12674 fn new_empty() -> Self {
12675 Self {
12676 name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
12677 ip_address_config: fidl::new_empty!(IpAddressConfig, D),
12678 }
12679 }
12680
12681 #[inline]
12682 unsafe fn decode(
12683 &mut self,
12684 decoder: &mut fidl::encoding::Decoder<'_, D>,
12685 offset: usize,
12686 _depth: fidl::encoding::Depth,
12687 ) -> fidl::Result<()> {
12688 decoder.debug_check_bounds::<Self>(offset);
12689 fidl::decode!(
12691 fidl::encoding::UnboundedString,
12692 D,
12693 &mut self.name,
12694 decoder,
12695 offset + 0,
12696 _depth
12697 )?;
12698 fidl::decode!(
12699 IpAddressConfig,
12700 D,
12701 &mut self.ip_address_config,
12702 decoder,
12703 offset + 16,
12704 _depth
12705 )?;
12706 Ok(())
12707 }
12708 }
12709
12710 impl fidl::encoding::ValueTypeMarker for LargeArrays {
12711 type Borrowed<'a> = &'a Self;
12712 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12713 value
12714 }
12715 }
12716
12717 unsafe impl fidl::encoding::TypeMarker for LargeArrays {
12718 type Owned = Self;
12719
12720 #[inline(always)]
12721 fn inline_align(_context: fidl::encoding::Context) -> usize {
12722 8
12723 }
12724
12725 #[inline(always)]
12726 fn inline_size(_context: fidl::encoding::Context) -> usize {
12727 648
12728 }
12729 }
12730
12731 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LargeArrays, D>
12732 for &LargeArrays
12733 {
12734 #[inline]
12735 unsafe fn encode(
12736 self,
12737 encoder: &mut fidl::encoding::Encoder<'_, D>,
12738 offset: usize,
12739 _depth: fidl::encoding::Depth,
12740 ) -> fidl::Result<()> {
12741 encoder.debug_check_bounds::<LargeArrays>(offset);
12742 fidl::encoding::Encode::<LargeArrays, D>::encode(
12744 (
12745 <fidl::encoding::Array<
12746 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12747 33,
12748 > as fidl::encoding::ValueTypeMarker>::borrow(&self.a33),
12749 <fidl::encoding::Array<u8, 100> as fidl::encoding::ValueTypeMarker>::borrow(
12750 &self.a100,
12751 ),
12752 <fidl::encoding::UnboundedVector<
12753 fidl::encoding::Array<
12754 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12755 200,
12756 >,
12757 > as fidl::encoding::ValueTypeMarker>::borrow(&self.nested),
12758 ),
12759 encoder,
12760 offset,
12761 _depth,
12762 )
12763 }
12764 }
12765 unsafe impl<
12766 D: fidl::encoding::ResourceDialect,
12767 T0: fidl::encoding::Encode<
12768 fidl::encoding::Array<
12769 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12770 33,
12771 >,
12772 D,
12773 >,
12774 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 100>, D>,
12775 T2: fidl::encoding::Encode<
12776 fidl::encoding::UnboundedVector<
12777 fidl::encoding::Array<
12778 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12779 200,
12780 >,
12781 >,
12782 D,
12783 >,
12784 > fidl::encoding::Encode<LargeArrays, D> for (T0, T1, T2)
12785 {
12786 #[inline]
12787 unsafe fn encode(
12788 self,
12789 encoder: &mut fidl::encoding::Encoder<'_, D>,
12790 offset: usize,
12791 depth: fidl::encoding::Depth,
12792 ) -> fidl::Result<()> {
12793 encoder.debug_check_bounds::<LargeArrays>(offset);
12794 unsafe {
12797 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(624);
12798 (ptr as *mut u64).write_unaligned(0);
12799 }
12800 self.0.encode(encoder, offset + 0, depth)?;
12802 self.1.encode(encoder, offset + 528, depth)?;
12803 self.2.encode(encoder, offset + 632, depth)?;
12804 Ok(())
12805 }
12806 }
12807
12808 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LargeArrays {
12809 #[inline(always)]
12810 fn new_empty() -> Self {
12811 Self {
12812 a33: fidl::new_empty!(
12813 fidl::encoding::Array<
12814 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12815 33,
12816 >,
12817 D
12818 ),
12819 a100: fidl::new_empty!(fidl::encoding::Array<u8, 100>, D),
12820 nested: fidl::new_empty!(
12821 fidl::encoding::UnboundedVector<
12822 fidl::encoding::Array<
12823 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12824 200,
12825 >,
12826 >,
12827 D
12828 ),
12829 }
12830 }
12831
12832 #[inline]
12833 unsafe fn decode(
12834 &mut self,
12835 decoder: &mut fidl::encoding::Decoder<'_, D>,
12836 offset: usize,
12837 _depth: fidl::encoding::Depth,
12838 ) -> fidl::Result<()> {
12839 decoder.debug_check_bounds::<Self>(offset);
12840 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(624) };
12842 let padval = unsafe { (ptr as *const u64).read_unaligned() };
12843 let mask = 0xffffffff00000000u64;
12844 let maskedval = padval & mask;
12845 if maskedval != 0 {
12846 return Err(fidl::Error::NonZeroPadding {
12847 padding_start: offset + 624 + ((mask as u64).trailing_zeros() / 8) as usize,
12848 });
12849 }
12850 fidl::decode!(
12851 fidl::encoding::Array<
12852 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12853 33,
12854 >,
12855 D,
12856 &mut self.a33,
12857 decoder,
12858 offset + 0,
12859 _depth
12860 )?;
12861 fidl::decode!(fidl::encoding::Array<u8, 100>, D, &mut self.a100, decoder, offset + 528, _depth)?;
12862 fidl::decode!(
12863 fidl::encoding::UnboundedVector<
12864 fidl::encoding::Array<
12865 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12866 200,
12867 >,
12868 >,
12869 D,
12870 &mut self.nested,
12871 decoder,
12872 offset + 632,
12873 _depth
12874 )?;
12875 Ok(())
12876 }
12877 }
12878
12879 impl fidl::encoding::ValueTypeMarker for Length2StringWrapper {
12880 type Borrowed<'a> = &'a Self;
12881 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12882 value
12883 }
12884 }
12885
12886 unsafe impl fidl::encoding::TypeMarker for Length2StringWrapper {
12887 type Owned = Self;
12888
12889 #[inline(always)]
12890 fn inline_align(_context: fidl::encoding::Context) -> usize {
12891 8
12892 }
12893
12894 #[inline(always)]
12895 fn inline_size(_context: fidl::encoding::Context) -> usize {
12896 16
12897 }
12898 }
12899
12900 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Length2StringWrapper, D>
12901 for &Length2StringWrapper
12902 {
12903 #[inline]
12904 unsafe fn encode(
12905 self,
12906 encoder: &mut fidl::encoding::Encoder<'_, D>,
12907 offset: usize,
12908 _depth: fidl::encoding::Depth,
12909 ) -> fidl::Result<()> {
12910 encoder.debug_check_bounds::<Length2StringWrapper>(offset);
12911 fidl::encoding::Encode::<Length2StringWrapper, D>::encode(
12913 (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
12914 &self.length_2_string,
12915 ),),
12916 encoder,
12917 offset,
12918 _depth,
12919 )
12920 }
12921 }
12922 unsafe impl<
12923 D: fidl::encoding::ResourceDialect,
12924 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
12925 > fidl::encoding::Encode<Length2StringWrapper, D> for (T0,)
12926 {
12927 #[inline]
12928 unsafe fn encode(
12929 self,
12930 encoder: &mut fidl::encoding::Encoder<'_, D>,
12931 offset: usize,
12932 depth: fidl::encoding::Depth,
12933 ) -> fidl::Result<()> {
12934 encoder.debug_check_bounds::<Length2StringWrapper>(offset);
12935 self.0.encode(encoder, offset + 0, depth)?;
12939 Ok(())
12940 }
12941 }
12942
12943 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Length2StringWrapper {
12944 #[inline(always)]
12945 fn new_empty() -> Self {
12946 Self { length_2_string: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
12947 }
12948
12949 #[inline]
12950 unsafe fn decode(
12951 &mut self,
12952 decoder: &mut fidl::encoding::Decoder<'_, D>,
12953 offset: usize,
12954 _depth: fidl::encoding::Depth,
12955 ) -> fidl::Result<()> {
12956 decoder.debug_check_bounds::<Self>(offset);
12957 fidl::decode!(
12959 fidl::encoding::BoundedString<2>,
12960 D,
12961 &mut self.length_2_string,
12962 decoder,
12963 offset + 0,
12964 _depth
12965 )?;
12966 Ok(())
12967 }
12968 }
12969
12970 impl fidl::encoding::ValueTypeMarker for LotsOfVectors {
12971 type Borrowed<'a> = &'a Self;
12972 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12973 value
12974 }
12975 }
12976
12977 unsafe impl fidl::encoding::TypeMarker for LotsOfVectors {
12978 type Owned = Self;
12979
12980 #[inline(always)]
12981 fn inline_align(_context: fidl::encoding::Context) -> usize {
12982 8
12983 }
12984
12985 #[inline(always)]
12986 fn inline_size(_context: fidl::encoding::Context) -> usize {
12987 144
12988 }
12989 }
12990
12991 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LotsOfVectors, D>
12992 for &LotsOfVectors
12993 {
12994 #[inline]
12995 unsafe fn encode(
12996 self,
12997 encoder: &mut fidl::encoding::Encoder<'_, D>,
12998 offset: usize,
12999 _depth: fidl::encoding::Depth,
13000 ) -> fidl::Result<()> {
13001 encoder.debug_check_bounds::<LotsOfVectors>(offset);
13002 fidl::encoding::Encode::<LotsOfVectors, D>::encode(
13004 (
13005 <fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v1),
13006 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v2),
13007 <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v3),
13008 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v4),
13009 <fidl::encoding::UnboundedVector<i8> as fidl::encoding::ValueTypeMarker>::borrow(&self.v5),
13010 <fidl::encoding::UnboundedVector<i16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v6),
13011 <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v7),
13012 <fidl::encoding::UnboundedVector<i64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v8),
13013 <fidl::encoding::UnboundedVector<bool> as fidl::encoding::ValueTypeMarker>::borrow(&self.v9),
13014 ),
13015 encoder, offset, _depth
13016 )
13017 }
13018 }
13019 unsafe impl<
13020 D: fidl::encoding::ResourceDialect,
13021 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>, D>,
13022 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13023 T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
13024 T3: fidl::encoding::Encode<
13025 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13026 D,
13027 >,
13028 T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i8>, D>,
13029 T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i16>, D>,
13030 T6: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
13031 T7: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i64>, D>,
13032 T8: fidl::encoding::Encode<fidl::encoding::UnboundedVector<bool>, D>,
13033 > fidl::encoding::Encode<LotsOfVectors, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
13034 {
13035 #[inline]
13036 unsafe fn encode(
13037 self,
13038 encoder: &mut fidl::encoding::Encoder<'_, D>,
13039 offset: usize,
13040 depth: fidl::encoding::Depth,
13041 ) -> fidl::Result<()> {
13042 encoder.debug_check_bounds::<LotsOfVectors>(offset);
13043 self.0.encode(encoder, offset + 0, depth)?;
13047 self.1.encode(encoder, offset + 16, depth)?;
13048 self.2.encode(encoder, offset + 32, depth)?;
13049 self.3.encode(encoder, offset + 48, depth)?;
13050 self.4.encode(encoder, offset + 64, depth)?;
13051 self.5.encode(encoder, offset + 80, depth)?;
13052 self.6.encode(encoder, offset + 96, depth)?;
13053 self.7.encode(encoder, offset + 112, depth)?;
13054 self.8.encode(encoder, offset + 128, depth)?;
13055 Ok(())
13056 }
13057 }
13058
13059 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LotsOfVectors {
13060 #[inline(always)]
13061 fn new_empty() -> Self {
13062 Self {
13063 v1: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>, D),
13064 v2: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13065 v3: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
13066 v4: fidl::new_empty!(
13067 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13068 D
13069 ),
13070 v5: fidl::new_empty!(fidl::encoding::UnboundedVector<i8>, D),
13071 v6: fidl::new_empty!(fidl::encoding::UnboundedVector<i16>, D),
13072 v7: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
13073 v8: fidl::new_empty!(fidl::encoding::UnboundedVector<i64>, D),
13074 v9: fidl::new_empty!(fidl::encoding::UnboundedVector<bool>, D),
13075 }
13076 }
13077
13078 #[inline]
13079 unsafe fn decode(
13080 &mut self,
13081 decoder: &mut fidl::encoding::Decoder<'_, D>,
13082 offset: usize,
13083 _depth: fidl::encoding::Depth,
13084 ) -> fidl::Result<()> {
13085 decoder.debug_check_bounds::<Self>(offset);
13086 fidl::decode!(
13088 fidl::encoding::UnboundedVector<u16>,
13089 D,
13090 &mut self.v1,
13091 decoder,
13092 offset + 0,
13093 _depth
13094 )?;
13095 fidl::decode!(
13096 fidl::encoding::UnboundedVector<u32>,
13097 D,
13098 &mut self.v2,
13099 decoder,
13100 offset + 16,
13101 _depth
13102 )?;
13103 fidl::decode!(
13104 fidl::encoding::UnboundedVector<u64>,
13105 D,
13106 &mut self.v3,
13107 decoder,
13108 offset + 32,
13109 _depth
13110 )?;
13111 fidl::decode!(
13112 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13113 D,
13114 &mut self.v4,
13115 decoder,
13116 offset + 48,
13117 _depth
13118 )?;
13119 fidl::decode!(
13120 fidl::encoding::UnboundedVector<i8>,
13121 D,
13122 &mut self.v5,
13123 decoder,
13124 offset + 64,
13125 _depth
13126 )?;
13127 fidl::decode!(
13128 fidl::encoding::UnboundedVector<i16>,
13129 D,
13130 &mut self.v6,
13131 decoder,
13132 offset + 80,
13133 _depth
13134 )?;
13135 fidl::decode!(
13136 fidl::encoding::UnboundedVector<i32>,
13137 D,
13138 &mut self.v7,
13139 decoder,
13140 offset + 96,
13141 _depth
13142 )?;
13143 fidl::decode!(
13144 fidl::encoding::UnboundedVector<i64>,
13145 D,
13146 &mut self.v8,
13147 decoder,
13148 offset + 112,
13149 _depth
13150 )?;
13151 fidl::decode!(
13152 fidl::encoding::UnboundedVector<bool>,
13153 D,
13154 &mut self.v9,
13155 decoder,
13156 offset + 128,
13157 _depth
13158 )?;
13159 Ok(())
13160 }
13161 }
13162
13163 impl fidl::encoding::ValueTypeMarker for MixedFieldsBody {
13164 type Borrowed<'a> = &'a Self;
13165 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13166 value
13167 }
13168 }
13169
13170 unsafe impl fidl::encoding::TypeMarker for MixedFieldsBody {
13171 type Owned = Self;
13172
13173 #[inline(always)]
13174 fn inline_align(_context: fidl::encoding::Context) -> usize {
13175 8
13176 }
13177
13178 #[inline(always)]
13179 fn inline_size(_context: fidl::encoding::Context) -> usize {
13180 64
13181 }
13182 }
13183
13184 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsBody, D>
13185 for &MixedFieldsBody
13186 {
13187 #[inline]
13188 unsafe fn encode(
13189 self,
13190 encoder: &mut fidl::encoding::Encoder<'_, D>,
13191 offset: usize,
13192 _depth: fidl::encoding::Depth,
13193 ) -> fidl::Result<()> {
13194 encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13195 fidl::encoding::Encode::<MixedFieldsBody, D>::encode(
13197 (
13198 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
13199 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13200 &self.first_union,
13201 ),
13202 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_start),
13203 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_end),
13204 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13205 &self.second_union,
13206 ),
13207 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
13208 ),
13209 encoder,
13210 offset,
13211 _depth,
13212 )
13213 }
13214 }
13215 unsafe impl<
13216 D: fidl::encoding::ResourceDialect,
13217 T0: fidl::encoding::Encode<u32, D>,
13218 T1: fidl::encoding::Encode<UnionSize8Align4, D>,
13219 T2: fidl::encoding::Encode<u16, D>,
13220 T3: fidl::encoding::Encode<u64, D>,
13221 T4: fidl::encoding::Encode<UnionSize8Align4, D>,
13222 T5: fidl::encoding::Encode<u32, D>,
13223 > fidl::encoding::Encode<MixedFieldsBody, D> for (T0, T1, T2, T3, T4, T5)
13224 {
13225 #[inline]
13226 unsafe fn encode(
13227 self,
13228 encoder: &mut fidl::encoding::Encoder<'_, D>,
13229 offset: usize,
13230 depth: fidl::encoding::Depth,
13231 ) -> fidl::Result<()> {
13232 encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13233 unsafe {
13236 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
13237 (ptr as *mut u64).write_unaligned(0);
13238 }
13239 unsafe {
13240 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
13241 (ptr as *mut u64).write_unaligned(0);
13242 }
13243 unsafe {
13244 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
13245 (ptr as *mut u64).write_unaligned(0);
13246 }
13247 self.0.encode(encoder, offset + 0, depth)?;
13249 self.1.encode(encoder, offset + 8, depth)?;
13250 self.2.encode(encoder, offset + 24, depth)?;
13251 self.3.encode(encoder, offset + 32, depth)?;
13252 self.4.encode(encoder, offset + 40, depth)?;
13253 self.5.encode(encoder, offset + 56, depth)?;
13254 Ok(())
13255 }
13256 }
13257
13258 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsBody {
13259 #[inline(always)]
13260 fn new_empty() -> Self {
13261 Self {
13262 before: fidl::new_empty!(u32, D),
13263 first_union: fidl::new_empty!(UnionSize8Align4, D),
13264 middle_start: fidl::new_empty!(u16, D),
13265 middle_end: fidl::new_empty!(u64, D),
13266 second_union: fidl::new_empty!(UnionSize8Align4, D),
13267 after: fidl::new_empty!(u32, D),
13268 }
13269 }
13270
13271 #[inline]
13272 unsafe fn decode(
13273 &mut self,
13274 decoder: &mut fidl::encoding::Decoder<'_, D>,
13275 offset: usize,
13276 _depth: fidl::encoding::Depth,
13277 ) -> fidl::Result<()> {
13278 decoder.debug_check_bounds::<Self>(offset);
13279 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
13281 let padval = unsafe { (ptr as *const u64).read_unaligned() };
13282 let mask = 0xffffffff00000000u64;
13283 let maskedval = padval & mask;
13284 if maskedval != 0 {
13285 return Err(fidl::Error::NonZeroPadding {
13286 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
13287 });
13288 }
13289 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
13290 let padval = unsafe { (ptr as *const u64).read_unaligned() };
13291 let mask = 0xffffffffffff0000u64;
13292 let maskedval = padval & mask;
13293 if maskedval != 0 {
13294 return Err(fidl::Error::NonZeroPadding {
13295 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
13296 });
13297 }
13298 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
13299 let padval = unsafe { (ptr as *const u64).read_unaligned() };
13300 let mask = 0xffffffff00000000u64;
13301 let maskedval = padval & mask;
13302 if maskedval != 0 {
13303 return Err(fidl::Error::NonZeroPadding {
13304 padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
13305 });
13306 }
13307 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
13308 fidl::decode!(UnionSize8Align4, D, &mut self.first_union, decoder, offset + 8, _depth)?;
13309 fidl::decode!(u16, D, &mut self.middle_start, decoder, offset + 24, _depth)?;
13310 fidl::decode!(u64, D, &mut self.middle_end, decoder, offset + 32, _depth)?;
13311 fidl::decode!(
13312 UnionSize8Align4,
13313 D,
13314 &mut self.second_union,
13315 decoder,
13316 offset + 40,
13317 _depth
13318 )?;
13319 fidl::decode!(u32, D, &mut self.after, decoder, offset + 56, _depth)?;
13320 Ok(())
13321 }
13322 }
13323
13324 impl fidl::encoding::ValueTypeMarker for MixedFieldsMessage {
13325 type Borrowed<'a> = &'a Self;
13326 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13327 value
13328 }
13329 }
13330
13331 unsafe impl fidl::encoding::TypeMarker for MixedFieldsMessage {
13332 type Owned = Self;
13333
13334 #[inline(always)]
13335 fn inline_align(_context: fidl::encoding::Context) -> usize {
13336 8
13337 }
13338
13339 #[inline(always)]
13340 fn inline_size(_context: fidl::encoding::Context) -> usize {
13341 80
13342 }
13343 }
13344
13345 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsMessage, D>
13346 for &MixedFieldsMessage
13347 {
13348 #[inline]
13349 unsafe fn encode(
13350 self,
13351 encoder: &mut fidl::encoding::Encoder<'_, D>,
13352 offset: usize,
13353 _depth: fidl::encoding::Depth,
13354 ) -> fidl::Result<()> {
13355 encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13356 fidl::encoding::Encode::<MixedFieldsMessage, D>::encode(
13358 (
13359 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
13360 <MixedFieldsBody as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
13361 ),
13362 encoder,
13363 offset,
13364 _depth,
13365 )
13366 }
13367 }
13368 unsafe impl<
13369 D: fidl::encoding::ResourceDialect,
13370 T0: fidl::encoding::Encode<TransactionHeader, D>,
13371 T1: fidl::encoding::Encode<MixedFieldsBody, D>,
13372 > fidl::encoding::Encode<MixedFieldsMessage, D> for (T0, T1)
13373 {
13374 #[inline]
13375 unsafe fn encode(
13376 self,
13377 encoder: &mut fidl::encoding::Encoder<'_, D>,
13378 offset: usize,
13379 depth: fidl::encoding::Depth,
13380 ) -> fidl::Result<()> {
13381 encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13382 self.0.encode(encoder, offset + 0, depth)?;
13386 self.1.encode(encoder, offset + 16, depth)?;
13387 Ok(())
13388 }
13389 }
13390
13391 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsMessage {
13392 #[inline(always)]
13393 fn new_empty() -> Self {
13394 Self {
13395 header: fidl::new_empty!(TransactionHeader, D),
13396 body: fidl::new_empty!(MixedFieldsBody, D),
13397 }
13398 }
13399
13400 #[inline]
13401 unsafe fn decode(
13402 &mut self,
13403 decoder: &mut fidl::encoding::Decoder<'_, D>,
13404 offset: usize,
13405 _depth: fidl::encoding::Depth,
13406 ) -> fidl::Result<()> {
13407 decoder.debug_check_bounds::<Self>(offset);
13408 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
13410 fidl::decode!(MixedFieldsBody, D, &mut self.body, decoder, offset + 16, _depth)?;
13411 Ok(())
13412 }
13413 }
13414
13415 impl fidl::encoding::ValueTypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13416 type Borrowed<'a> = &'a Self;
13417 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13418 value
13419 }
13420 }
13421
13422 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13423 type Owned = Self;
13424
13425 #[inline(always)]
13426 fn inline_align(_context: fidl::encoding::Context) -> usize {
13427 8
13428 }
13429
13430 #[inline(always)]
13431 fn inline_size(_context: fidl::encoding::Context) -> usize {
13432 32
13433 }
13434 }
13435
13436 unsafe impl<D: fidl::encoding::ResourceDialect>
13437 fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D>
13438 for &MultipleBoundedNonnullableVectorsOfUint32s
13439 {
13440 #[inline]
13441 unsafe fn encode(
13442 self,
13443 encoder: &mut fidl::encoding::Encoder<'_, D>,
13444 offset: usize,
13445 _depth: fidl::encoding::Depth,
13446 ) -> fidl::Result<()> {
13447 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13448 fidl::encoding::Encode::<MultipleBoundedNonnullableVectorsOfUint32s, D>::encode(
13450 (
13451 <fidl::encoding::Vector<u32, 2> as fidl::encoding::ValueTypeMarker>::borrow(
13452 &self.vu0,
13453 ),
13454 <fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
13455 &self.vu1,
13456 ),
13457 ),
13458 encoder,
13459 offset,
13460 _depth,
13461 )
13462 }
13463 }
13464 unsafe impl<
13465 D: fidl::encoding::ResourceDialect,
13466 T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 2>, D>,
13467 T1: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
13468 > fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D> for (T0, T1)
13469 {
13470 #[inline]
13471 unsafe fn encode(
13472 self,
13473 encoder: &mut fidl::encoding::Encoder<'_, D>,
13474 offset: usize,
13475 depth: fidl::encoding::Depth,
13476 ) -> fidl::Result<()> {
13477 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13478 self.0.encode(encoder, offset + 0, depth)?;
13482 self.1.encode(encoder, offset + 16, depth)?;
13483 Ok(())
13484 }
13485 }
13486
13487 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13488 for MultipleBoundedNonnullableVectorsOfUint32s
13489 {
13490 #[inline(always)]
13491 fn new_empty() -> Self {
13492 Self {
13493 vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 2>, D),
13494 vu1: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D),
13495 }
13496 }
13497
13498 #[inline]
13499 unsafe fn decode(
13500 &mut self,
13501 decoder: &mut fidl::encoding::Decoder<'_, D>,
13502 offset: usize,
13503 _depth: fidl::encoding::Depth,
13504 ) -> fidl::Result<()> {
13505 decoder.debug_check_bounds::<Self>(offset);
13506 fidl::decode!(fidl::encoding::Vector<u32, 2>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
13508 fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu1, decoder, offset + 16, _depth)?;
13509 Ok(())
13510 }
13511 }
13512
13513 impl fidl::encoding::ValueTypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13514 type Borrowed<'a> = &'a Self;
13515 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13516 value
13517 }
13518 }
13519
13520 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13521 type Owned = Self;
13522
13523 #[inline(always)]
13524 fn inline_align(_context: fidl::encoding::Context) -> usize {
13525 8
13526 }
13527
13528 #[inline(always)]
13529 fn inline_size(_context: fidl::encoding::Context) -> usize {
13530 32
13531 }
13532 }
13533
13534 unsafe impl<D: fidl::encoding::ResourceDialect>
13535 fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D>
13536 for &MultipleBoundedNullableVectorsOfUint32s
13537 {
13538 #[inline]
13539 unsafe fn encode(
13540 self,
13541 encoder: &mut fidl::encoding::Encoder<'_, D>,
13542 offset: usize,
13543 _depth: fidl::encoding::Depth,
13544 ) -> fidl::Result<()> {
13545 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13546 fidl::encoding::Encode::<MultipleBoundedNullableVectorsOfUint32s, D>::encode(
13548 (
13549 <fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13550 <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13551 ),
13552 encoder, offset, _depth
13553 )
13554 }
13555 }
13556 unsafe impl<
13557 D: fidl::encoding::ResourceDialect,
13558 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D>,
13559 T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
13560 > fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D> for (T0, T1)
13561 {
13562 #[inline]
13563 unsafe fn encode(
13564 self,
13565 encoder: &mut fidl::encoding::Encoder<'_, D>,
13566 offset: usize,
13567 depth: fidl::encoding::Depth,
13568 ) -> fidl::Result<()> {
13569 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13570 self.0.encode(encoder, offset + 0, depth)?;
13574 self.1.encode(encoder, offset + 16, depth)?;
13575 Ok(())
13576 }
13577 }
13578
13579 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13580 for MultipleBoundedNullableVectorsOfUint32s
13581 {
13582 #[inline(always)]
13583 fn new_empty() -> Self {
13584 Self {
13585 vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D),
13586 vu1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
13587 }
13588 }
13589
13590 #[inline]
13591 unsafe fn decode(
13592 &mut self,
13593 decoder: &mut fidl::encoding::Decoder<'_, D>,
13594 offset: usize,
13595 _depth: fidl::encoding::Depth,
13596 ) -> fidl::Result<()> {
13597 decoder.debug_check_bounds::<Self>(offset);
13598 fidl::decode!(
13600 fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>,
13601 D,
13602 &mut self.vu0,
13603 decoder,
13604 offset + 0,
13605 _depth
13606 )?;
13607 fidl::decode!(
13608 fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
13609 D,
13610 &mut self.vu1,
13611 decoder,
13612 offset + 16,
13613 _depth
13614 )?;
13615 Ok(())
13616 }
13617 }
13618
13619 impl fidl::encoding::ValueTypeMarker for MultipleNonnullableStrings {
13620 type Borrowed<'a> = &'a Self;
13621 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13622 value
13623 }
13624 }
13625
13626 unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableStrings {
13627 type Owned = Self;
13628
13629 #[inline(always)]
13630 fn inline_align(_context: fidl::encoding::Context) -> usize {
13631 8
13632 }
13633
13634 #[inline(always)]
13635 fn inline_size(_context: fidl::encoding::Context) -> usize {
13636 32
13637 }
13638 }
13639
13640 unsafe impl<D: fidl::encoding::ResourceDialect>
13641 fidl::encoding::Encode<MultipleNonnullableStrings, D> for &MultipleNonnullableStrings
13642 {
13643 #[inline]
13644 unsafe fn encode(
13645 self,
13646 encoder: &mut fidl::encoding::Encoder<'_, D>,
13647 offset: usize,
13648 _depth: fidl::encoding::Depth,
13649 ) -> fidl::Result<()> {
13650 encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13651 fidl::encoding::Encode::<MultipleNonnullableStrings, D>::encode(
13653 (
13654 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13655 &self.s0,
13656 ),
13657 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13658 &self.s1,
13659 ),
13660 ),
13661 encoder,
13662 offset,
13663 _depth,
13664 )
13665 }
13666 }
13667 unsafe impl<
13668 D: fidl::encoding::ResourceDialect,
13669 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13670 T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13671 > fidl::encoding::Encode<MultipleNonnullableStrings, D> for (T0, T1)
13672 {
13673 #[inline]
13674 unsafe fn encode(
13675 self,
13676 encoder: &mut fidl::encoding::Encoder<'_, D>,
13677 offset: usize,
13678 depth: fidl::encoding::Depth,
13679 ) -> fidl::Result<()> {
13680 encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13681 self.0.encode(encoder, offset + 0, depth)?;
13685 self.1.encode(encoder, offset + 16, depth)?;
13686 Ok(())
13687 }
13688 }
13689
13690 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13691 for MultipleNonnullableStrings
13692 {
13693 #[inline(always)]
13694 fn new_empty() -> Self {
13695 Self {
13696 s0: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13697 s1: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13698 }
13699 }
13700
13701 #[inline]
13702 unsafe fn decode(
13703 &mut self,
13704 decoder: &mut fidl::encoding::Decoder<'_, D>,
13705 offset: usize,
13706 _depth: fidl::encoding::Depth,
13707 ) -> fidl::Result<()> {
13708 decoder.debug_check_bounds::<Self>(offset);
13709 fidl::decode!(
13711 fidl::encoding::UnboundedString,
13712 D,
13713 &mut self.s0,
13714 decoder,
13715 offset + 0,
13716 _depth
13717 )?;
13718 fidl::decode!(
13719 fidl::encoding::UnboundedString,
13720 D,
13721 &mut self.s1,
13722 decoder,
13723 offset + 16,
13724 _depth
13725 )?;
13726 Ok(())
13727 }
13728 }
13729
13730 impl fidl::encoding::ValueTypeMarker for MultipleNonnullableVectorsOfUint32s {
13731 type Borrowed<'a> = &'a Self;
13732 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13733 value
13734 }
13735 }
13736
13737 unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableVectorsOfUint32s {
13738 type Owned = Self;
13739
13740 #[inline(always)]
13741 fn inline_align(_context: fidl::encoding::Context) -> usize {
13742 8
13743 }
13744
13745 #[inline(always)]
13746 fn inline_size(_context: fidl::encoding::Context) -> usize {
13747 32
13748 }
13749 }
13750
13751 unsafe impl<D: fidl::encoding::ResourceDialect>
13752 fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D>
13753 for &MultipleNonnullableVectorsOfUint32s
13754 {
13755 #[inline]
13756 unsafe fn encode(
13757 self,
13758 encoder: &mut fidl::encoding::Encoder<'_, D>,
13759 offset: usize,
13760 _depth: fidl::encoding::Depth,
13761 ) -> fidl::Result<()> {
13762 encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13763 fidl::encoding::Encode::<MultipleNonnullableVectorsOfUint32s, D>::encode(
13765 (
13766 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13767 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13768 ),
13769 encoder, offset, _depth
13770 )
13771 }
13772 }
13773 unsafe impl<
13774 D: fidl::encoding::ResourceDialect,
13775 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13776 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13777 > fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D> for (T0, T1)
13778 {
13779 #[inline]
13780 unsafe fn encode(
13781 self,
13782 encoder: &mut fidl::encoding::Encoder<'_, D>,
13783 offset: usize,
13784 depth: fidl::encoding::Depth,
13785 ) -> fidl::Result<()> {
13786 encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13787 self.0.encode(encoder, offset + 0, depth)?;
13791 self.1.encode(encoder, offset + 16, depth)?;
13792 Ok(())
13793 }
13794 }
13795
13796 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13797 for MultipleNonnullableVectorsOfUint32s
13798 {
13799 #[inline(always)]
13800 fn new_empty() -> Self {
13801 Self {
13802 vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13803 vu1: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13804 }
13805 }
13806
13807 #[inline]
13808 unsafe fn decode(
13809 &mut self,
13810 decoder: &mut fidl::encoding::Decoder<'_, D>,
13811 offset: usize,
13812 _depth: fidl::encoding::Depth,
13813 ) -> fidl::Result<()> {
13814 decoder.debug_check_bounds::<Self>(offset);
13815 fidl::decode!(
13817 fidl::encoding::UnboundedVector<u32>,
13818 D,
13819 &mut self.vu0,
13820 decoder,
13821 offset + 0,
13822 _depth
13823 )?;
13824 fidl::decode!(
13825 fidl::encoding::UnboundedVector<u32>,
13826 D,
13827 &mut self.vu1,
13828 decoder,
13829 offset + 16,
13830 _depth
13831 )?;
13832 Ok(())
13833 }
13834 }
13835
13836 impl fidl::encoding::ValueTypeMarker for MultipleNullableStrings {
13837 type Borrowed<'a> = &'a Self;
13838 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13839 value
13840 }
13841 }
13842
13843 unsafe impl fidl::encoding::TypeMarker for MultipleNullableStrings {
13844 type Owned = Self;
13845
13846 #[inline(always)]
13847 fn inline_align(_context: fidl::encoding::Context) -> usize {
13848 8
13849 }
13850
13851 #[inline(always)]
13852 fn inline_size(_context: fidl::encoding::Context) -> usize {
13853 32
13854 }
13855 }
13856
13857 unsafe impl<D: fidl::encoding::ResourceDialect>
13858 fidl::encoding::Encode<MultipleNullableStrings, D> for &MultipleNullableStrings
13859 {
13860 #[inline]
13861 unsafe fn encode(
13862 self,
13863 encoder: &mut fidl::encoding::Encoder<'_, D>,
13864 offset: usize,
13865 _depth: fidl::encoding::Depth,
13866 ) -> fidl::Result<()> {
13867 encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
13868 fidl::encoding::Encode::<MultipleNullableStrings, D>::encode(
13870 (
13871 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
13872 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s1),
13873 ),
13874 encoder, offset, _depth
13875 )
13876 }
13877 }
13878 unsafe impl<
13879 D: fidl::encoding::ResourceDialect,
13880 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
13881 T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
13882 > fidl::encoding::Encode<MultipleNullableStrings, D> for (T0, T1)
13883 {
13884 #[inline]
13885 unsafe fn encode(
13886 self,
13887 encoder: &mut fidl::encoding::Encoder<'_, D>,
13888 offset: usize,
13889 depth: fidl::encoding::Depth,
13890 ) -> fidl::Result<()> {
13891 encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
13892 self.0.encode(encoder, offset + 0, depth)?;
13896 self.1.encode(encoder, offset + 16, depth)?;
13897 Ok(())
13898 }
13899 }
13900
13901 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13902 for MultipleNullableStrings
13903 {
13904 #[inline(always)]
13905 fn new_empty() -> Self {
13906 Self {
13907 s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
13908 s1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
13909 }
13910 }
13911
13912 #[inline]
13913 unsafe fn decode(
13914 &mut self,
13915 decoder: &mut fidl::encoding::Decoder<'_, D>,
13916 offset: usize,
13917 _depth: fidl::encoding::Depth,
13918 ) -> fidl::Result<()> {
13919 decoder.debug_check_bounds::<Self>(offset);
13920 fidl::decode!(
13922 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13923 D,
13924 &mut self.s0,
13925 decoder,
13926 offset + 0,
13927 _depth
13928 )?;
13929 fidl::decode!(
13930 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13931 D,
13932 &mut self.s1,
13933 decoder,
13934 offset + 16,
13935 _depth
13936 )?;
13937 Ok(())
13938 }
13939 }
13940
13941 impl fidl::encoding::ValueTypeMarker for MultipleShortNonnullableStrings {
13942 type Borrowed<'a> = &'a Self;
13943 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13944 value
13945 }
13946 }
13947
13948 unsafe impl fidl::encoding::TypeMarker for MultipleShortNonnullableStrings {
13949 type Owned = Self;
13950
13951 #[inline(always)]
13952 fn inline_align(_context: fidl::encoding::Context) -> usize {
13953 8
13954 }
13955
13956 #[inline(always)]
13957 fn inline_size(_context: fidl::encoding::Context) -> usize {
13958 32
13959 }
13960 }
13961
13962 unsafe impl<D: fidl::encoding::ResourceDialect>
13963 fidl::encoding::Encode<MultipleShortNonnullableStrings, D>
13964 for &MultipleShortNonnullableStrings
13965 {
13966 #[inline]
13967 unsafe fn encode(
13968 self,
13969 encoder: &mut fidl::encoding::Encoder<'_, D>,
13970 offset: usize,
13971 _depth: fidl::encoding::Depth,
13972 ) -> fidl::Result<()> {
13973 encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
13974 fidl::encoding::Encode::<MultipleShortNonnullableStrings, D>::encode(
13976 (
13977 <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
13978 &self.s0,
13979 ),
13980 <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
13981 &self.s1,
13982 ),
13983 ),
13984 encoder,
13985 offset,
13986 _depth,
13987 )
13988 }
13989 }
13990 unsafe impl<
13991 D: fidl::encoding::ResourceDialect,
13992 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
13993 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
13994 > fidl::encoding::Encode<MultipleShortNonnullableStrings, D> for (T0, T1)
13995 {
13996 #[inline]
13997 unsafe fn encode(
13998 self,
13999 encoder: &mut fidl::encoding::Encoder<'_, D>,
14000 offset: usize,
14001 depth: fidl::encoding::Depth,
14002 ) -> fidl::Result<()> {
14003 encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
14004 self.0.encode(encoder, offset + 0, depth)?;
14008 self.1.encode(encoder, offset + 16, depth)?;
14009 Ok(())
14010 }
14011 }
14012
14013 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14014 for MultipleShortNonnullableStrings
14015 {
14016 #[inline(always)]
14017 fn new_empty() -> Self {
14018 Self {
14019 s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14020 s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14021 }
14022 }
14023
14024 #[inline]
14025 unsafe fn decode(
14026 &mut self,
14027 decoder: &mut fidl::encoding::Decoder<'_, D>,
14028 offset: usize,
14029 _depth: fidl::encoding::Depth,
14030 ) -> fidl::Result<()> {
14031 decoder.debug_check_bounds::<Self>(offset);
14032 fidl::decode!(
14034 fidl::encoding::BoundedString<4>,
14035 D,
14036 &mut self.s0,
14037 decoder,
14038 offset + 0,
14039 _depth
14040 )?;
14041 fidl::decode!(
14042 fidl::encoding::BoundedString<32>,
14043 D,
14044 &mut self.s1,
14045 decoder,
14046 offset + 16,
14047 _depth
14048 )?;
14049 Ok(())
14050 }
14051 }
14052
14053 impl fidl::encoding::ValueTypeMarker for MultipleShortNullableStrings {
14054 type Borrowed<'a> = &'a Self;
14055 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14056 value
14057 }
14058 }
14059
14060 unsafe impl fidl::encoding::TypeMarker for MultipleShortNullableStrings {
14061 type Owned = Self;
14062
14063 #[inline(always)]
14064 fn inline_align(_context: fidl::encoding::Context) -> usize {
14065 8
14066 }
14067
14068 #[inline(always)]
14069 fn inline_size(_context: fidl::encoding::Context) -> usize {
14070 32
14071 }
14072 }
14073
14074 unsafe impl<D: fidl::encoding::ResourceDialect>
14075 fidl::encoding::Encode<MultipleShortNullableStrings, D> for &MultipleShortNullableStrings
14076 {
14077 #[inline]
14078 unsafe fn encode(
14079 self,
14080 encoder: &mut fidl::encoding::Encoder<'_, D>,
14081 offset: usize,
14082 _depth: fidl::encoding::Depth,
14083 ) -> fidl::Result<()> {
14084 encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14085 fidl::encoding::Encode::<MultipleShortNullableStrings, D>::encode(
14087 (
14088 <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
14089 &self.s0,
14090 ),
14091 <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
14092 &self.s1,
14093 ),
14094 ),
14095 encoder,
14096 offset,
14097 _depth,
14098 )
14099 }
14100 }
14101 unsafe impl<
14102 D: fidl::encoding::ResourceDialect,
14103 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
14104 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
14105 > fidl::encoding::Encode<MultipleShortNullableStrings, D> for (T0, T1)
14106 {
14107 #[inline]
14108 unsafe fn encode(
14109 self,
14110 encoder: &mut fidl::encoding::Encoder<'_, D>,
14111 offset: usize,
14112 depth: fidl::encoding::Depth,
14113 ) -> fidl::Result<()> {
14114 encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14115 self.0.encode(encoder, offset + 0, depth)?;
14119 self.1.encode(encoder, offset + 16, depth)?;
14120 Ok(())
14121 }
14122 }
14123
14124 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14125 for MultipleShortNullableStrings
14126 {
14127 #[inline(always)]
14128 fn new_empty() -> Self {
14129 Self {
14130 s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14131 s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14132 }
14133 }
14134
14135 #[inline]
14136 unsafe fn decode(
14137 &mut self,
14138 decoder: &mut fidl::encoding::Decoder<'_, D>,
14139 offset: usize,
14140 _depth: fidl::encoding::Depth,
14141 ) -> fidl::Result<()> {
14142 decoder.debug_check_bounds::<Self>(offset);
14143 fidl::decode!(
14145 fidl::encoding::BoundedString<4>,
14146 D,
14147 &mut self.s0,
14148 decoder,
14149 offset + 0,
14150 _depth
14151 )?;
14152 fidl::decode!(
14153 fidl::encoding::BoundedString<32>,
14154 D,
14155 &mut self.s1,
14156 decoder,
14157 offset + 16,
14158 _depth
14159 )?;
14160 Ok(())
14161 }
14162 }
14163
14164 impl fidl::encoding::ValueTypeMarker for MutualRecursionUnionStruct {
14165 type Borrowed<'a> = &'a Self;
14166 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14167 value
14168 }
14169 }
14170
14171 unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnionStruct {
14172 type Owned = Self;
14173
14174 #[inline(always)]
14175 fn inline_align(_context: fidl::encoding::Context) -> usize {
14176 8
14177 }
14178
14179 #[inline(always)]
14180 fn inline_size(_context: fidl::encoding::Context) -> usize {
14181 16
14182 }
14183 }
14184
14185 unsafe impl<D: fidl::encoding::ResourceDialect>
14186 fidl::encoding::Encode<MutualRecursionUnionStruct, D> for &MutualRecursionUnionStruct
14187 {
14188 #[inline]
14189 unsafe fn encode(
14190 self,
14191 encoder: &mut fidl::encoding::Encoder<'_, D>,
14192 offset: usize,
14193 _depth: fidl::encoding::Depth,
14194 ) -> fidl::Result<()> {
14195 encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14196 fidl::encoding::Encode::<MutualRecursionUnionStruct, D>::encode(
14198 (
14199 <fidl::encoding::OptionalUnion<MutualRecursionUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
14200 ),
14201 encoder, offset, _depth
14202 )
14203 }
14204 }
14205 unsafe impl<
14206 D: fidl::encoding::ResourceDialect,
14207 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<MutualRecursionUnion>, D>,
14208 > fidl::encoding::Encode<MutualRecursionUnionStruct, D> for (T0,)
14209 {
14210 #[inline]
14211 unsafe fn encode(
14212 self,
14213 encoder: &mut fidl::encoding::Encoder<'_, D>,
14214 offset: usize,
14215 depth: fidl::encoding::Depth,
14216 ) -> fidl::Result<()> {
14217 encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14218 self.0.encode(encoder, offset + 0, depth)?;
14222 Ok(())
14223 }
14224 }
14225
14226 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14227 for MutualRecursionUnionStruct
14228 {
14229 #[inline(always)]
14230 fn new_empty() -> Self {
14231 Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<MutualRecursionUnion>, D) }
14232 }
14233
14234 #[inline]
14235 unsafe fn decode(
14236 &mut self,
14237 decoder: &mut fidl::encoding::Decoder<'_, D>,
14238 offset: usize,
14239 _depth: fidl::encoding::Depth,
14240 ) -> fidl::Result<()> {
14241 decoder.debug_check_bounds::<Self>(offset);
14242 fidl::decode!(
14244 fidl::encoding::OptionalUnion<MutualRecursionUnion>,
14245 D,
14246 &mut self.u,
14247 decoder,
14248 offset + 0,
14249 _depth
14250 )?;
14251 Ok(())
14252 }
14253 }
14254
14255 impl fidl::encoding::ValueTypeMarker for MyBool {
14256 type Borrowed<'a> = &'a Self;
14257 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14258 value
14259 }
14260 }
14261
14262 unsafe impl fidl::encoding::TypeMarker for MyBool {
14263 type Owned = Self;
14264
14265 #[inline(always)]
14266 fn inline_align(_context: fidl::encoding::Context) -> usize {
14267 1
14268 }
14269
14270 #[inline(always)]
14271 fn inline_size(_context: fidl::encoding::Context) -> usize {
14272 1
14273 }
14274 }
14275
14276 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyBool, D> for &MyBool {
14277 #[inline]
14278 unsafe fn encode(
14279 self,
14280 encoder: &mut fidl::encoding::Encoder<'_, D>,
14281 offset: usize,
14282 _depth: fidl::encoding::Depth,
14283 ) -> fidl::Result<()> {
14284 encoder.debug_check_bounds::<MyBool>(offset);
14285 fidl::encoding::Encode::<MyBool, D>::encode(
14287 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14288 encoder,
14289 offset,
14290 _depth,
14291 )
14292 }
14293 }
14294 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
14295 fidl::encoding::Encode<MyBool, D> for (T0,)
14296 {
14297 #[inline]
14298 unsafe fn encode(
14299 self,
14300 encoder: &mut fidl::encoding::Encoder<'_, D>,
14301 offset: usize,
14302 depth: fidl::encoding::Depth,
14303 ) -> fidl::Result<()> {
14304 encoder.debug_check_bounds::<MyBool>(offset);
14305 self.0.encode(encoder, offset + 0, depth)?;
14309 Ok(())
14310 }
14311 }
14312
14313 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyBool {
14314 #[inline(always)]
14315 fn new_empty() -> Self {
14316 Self { value: fidl::new_empty!(bool, D) }
14317 }
14318
14319 #[inline]
14320 unsafe fn decode(
14321 &mut self,
14322 decoder: &mut fidl::encoding::Decoder<'_, D>,
14323 offset: usize,
14324 _depth: fidl::encoding::Depth,
14325 ) -> fidl::Result<()> {
14326 decoder.debug_check_bounds::<Self>(offset);
14327 fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
14329 Ok(())
14330 }
14331 }
14332
14333 impl fidl::encoding::ValueTypeMarker for MyByte {
14334 type Borrowed<'a> = &'a Self;
14335 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14336 value
14337 }
14338 }
14339
14340 unsafe impl fidl::encoding::TypeMarker for MyByte {
14341 type Owned = Self;
14342
14343 #[inline(always)]
14344 fn inline_align(_context: fidl::encoding::Context) -> usize {
14345 1
14346 }
14347
14348 #[inline(always)]
14349 fn inline_size(_context: fidl::encoding::Context) -> usize {
14350 1
14351 }
14352 #[inline(always)]
14353 fn encode_is_copy() -> bool {
14354 true
14355 }
14356
14357 #[inline(always)]
14358 fn decode_is_copy() -> bool {
14359 true
14360 }
14361 }
14362
14363 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyByte, D> for &MyByte {
14364 #[inline]
14365 unsafe fn encode(
14366 self,
14367 encoder: &mut fidl::encoding::Encoder<'_, D>,
14368 offset: usize,
14369 _depth: fidl::encoding::Depth,
14370 ) -> fidl::Result<()> {
14371 encoder.debug_check_bounds::<MyByte>(offset);
14372 unsafe {
14373 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14375 (buf_ptr as *mut MyByte).write_unaligned((self as *const MyByte).read());
14376 }
14379 Ok(())
14380 }
14381 }
14382 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
14383 fidl::encoding::Encode<MyByte, D> for (T0,)
14384 {
14385 #[inline]
14386 unsafe fn encode(
14387 self,
14388 encoder: &mut fidl::encoding::Encoder<'_, D>,
14389 offset: usize,
14390 depth: fidl::encoding::Depth,
14391 ) -> fidl::Result<()> {
14392 encoder.debug_check_bounds::<MyByte>(offset);
14393 self.0.encode(encoder, offset + 0, depth)?;
14397 Ok(())
14398 }
14399 }
14400
14401 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyByte {
14402 #[inline(always)]
14403 fn new_empty() -> Self {
14404 Self { value: fidl::new_empty!(u8, D) }
14405 }
14406
14407 #[inline]
14408 unsafe fn decode(
14409 &mut self,
14410 decoder: &mut fidl::encoding::Decoder<'_, D>,
14411 offset: usize,
14412 _depth: fidl::encoding::Depth,
14413 ) -> fidl::Result<()> {
14414 decoder.debug_check_bounds::<Self>(offset);
14415 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14416 unsafe {
14419 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
14420 }
14421 Ok(())
14422 }
14423 }
14424
14425 impl fidl::encoding::ValueTypeMarker for MyFloat32 {
14426 type Borrowed<'a> = &'a Self;
14427 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14428 value
14429 }
14430 }
14431
14432 unsafe impl fidl::encoding::TypeMarker for MyFloat32 {
14433 type Owned = Self;
14434
14435 #[inline(always)]
14436 fn inline_align(_context: fidl::encoding::Context) -> usize {
14437 4
14438 }
14439
14440 #[inline(always)]
14441 fn inline_size(_context: fidl::encoding::Context) -> usize {
14442 4
14443 }
14444 }
14445
14446 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat32, D>
14447 for &MyFloat32
14448 {
14449 #[inline]
14450 unsafe fn encode(
14451 self,
14452 encoder: &mut fidl::encoding::Encoder<'_, D>,
14453 offset: usize,
14454 _depth: fidl::encoding::Depth,
14455 ) -> fidl::Result<()> {
14456 encoder.debug_check_bounds::<MyFloat32>(offset);
14457 fidl::encoding::Encode::<MyFloat32, D>::encode(
14459 (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14460 encoder,
14461 offset,
14462 _depth,
14463 )
14464 }
14465 }
14466 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
14467 fidl::encoding::Encode<MyFloat32, D> for (T0,)
14468 {
14469 #[inline]
14470 unsafe fn encode(
14471 self,
14472 encoder: &mut fidl::encoding::Encoder<'_, D>,
14473 offset: usize,
14474 depth: fidl::encoding::Depth,
14475 ) -> fidl::Result<()> {
14476 encoder.debug_check_bounds::<MyFloat32>(offset);
14477 self.0.encode(encoder, offset + 0, depth)?;
14481 Ok(())
14482 }
14483 }
14484
14485 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat32 {
14486 #[inline(always)]
14487 fn new_empty() -> Self {
14488 Self { value: fidl::new_empty!(f32, D) }
14489 }
14490
14491 #[inline]
14492 unsafe fn decode(
14493 &mut self,
14494 decoder: &mut fidl::encoding::Decoder<'_, D>,
14495 offset: usize,
14496 _depth: fidl::encoding::Depth,
14497 ) -> fidl::Result<()> {
14498 decoder.debug_check_bounds::<Self>(offset);
14499 fidl::decode!(f32, D, &mut self.value, decoder, offset + 0, _depth)?;
14501 Ok(())
14502 }
14503 }
14504
14505 impl fidl::encoding::ValueTypeMarker for MyFloat64 {
14506 type Borrowed<'a> = &'a Self;
14507 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14508 value
14509 }
14510 }
14511
14512 unsafe impl fidl::encoding::TypeMarker for MyFloat64 {
14513 type Owned = Self;
14514
14515 #[inline(always)]
14516 fn inline_align(_context: fidl::encoding::Context) -> usize {
14517 8
14518 }
14519
14520 #[inline(always)]
14521 fn inline_size(_context: fidl::encoding::Context) -> usize {
14522 8
14523 }
14524 }
14525
14526 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat64, D>
14527 for &MyFloat64
14528 {
14529 #[inline]
14530 unsafe fn encode(
14531 self,
14532 encoder: &mut fidl::encoding::Encoder<'_, D>,
14533 offset: usize,
14534 _depth: fidl::encoding::Depth,
14535 ) -> fidl::Result<()> {
14536 encoder.debug_check_bounds::<MyFloat64>(offset);
14537 fidl::encoding::Encode::<MyFloat64, D>::encode(
14539 (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14540 encoder,
14541 offset,
14542 _depth,
14543 )
14544 }
14545 }
14546 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
14547 fidl::encoding::Encode<MyFloat64, D> for (T0,)
14548 {
14549 #[inline]
14550 unsafe fn encode(
14551 self,
14552 encoder: &mut fidl::encoding::Encoder<'_, D>,
14553 offset: usize,
14554 depth: fidl::encoding::Depth,
14555 ) -> fidl::Result<()> {
14556 encoder.debug_check_bounds::<MyFloat64>(offset);
14557 self.0.encode(encoder, offset + 0, depth)?;
14561 Ok(())
14562 }
14563 }
14564
14565 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat64 {
14566 #[inline(always)]
14567 fn new_empty() -> Self {
14568 Self { value: fidl::new_empty!(f64, D) }
14569 }
14570
14571 #[inline]
14572 unsafe fn decode(
14573 &mut self,
14574 decoder: &mut fidl::encoding::Decoder<'_, D>,
14575 offset: usize,
14576 _depth: fidl::encoding::Depth,
14577 ) -> fidl::Result<()> {
14578 decoder.debug_check_bounds::<Self>(offset);
14579 fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
14581 Ok(())
14582 }
14583 }
14584
14585 impl fidl::encoding::ValueTypeMarker for MyInt16 {
14586 type Borrowed<'a> = &'a Self;
14587 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14588 value
14589 }
14590 }
14591
14592 unsafe impl fidl::encoding::TypeMarker for MyInt16 {
14593 type Owned = Self;
14594
14595 #[inline(always)]
14596 fn inline_align(_context: fidl::encoding::Context) -> usize {
14597 2
14598 }
14599
14600 #[inline(always)]
14601 fn inline_size(_context: fidl::encoding::Context) -> usize {
14602 2
14603 }
14604 #[inline(always)]
14605 fn encode_is_copy() -> bool {
14606 true
14607 }
14608
14609 #[inline(always)]
14610 fn decode_is_copy() -> bool {
14611 true
14612 }
14613 }
14614
14615 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt16, D> for &MyInt16 {
14616 #[inline]
14617 unsafe fn encode(
14618 self,
14619 encoder: &mut fidl::encoding::Encoder<'_, D>,
14620 offset: usize,
14621 _depth: fidl::encoding::Depth,
14622 ) -> fidl::Result<()> {
14623 encoder.debug_check_bounds::<MyInt16>(offset);
14624 unsafe {
14625 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14627 (buf_ptr as *mut MyInt16).write_unaligned((self as *const MyInt16).read());
14628 }
14631 Ok(())
14632 }
14633 }
14634 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
14635 fidl::encoding::Encode<MyInt16, D> for (T0,)
14636 {
14637 #[inline]
14638 unsafe fn encode(
14639 self,
14640 encoder: &mut fidl::encoding::Encoder<'_, D>,
14641 offset: usize,
14642 depth: fidl::encoding::Depth,
14643 ) -> fidl::Result<()> {
14644 encoder.debug_check_bounds::<MyInt16>(offset);
14645 self.0.encode(encoder, offset + 0, depth)?;
14649 Ok(())
14650 }
14651 }
14652
14653 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt16 {
14654 #[inline(always)]
14655 fn new_empty() -> Self {
14656 Self { value: fidl::new_empty!(i16, D) }
14657 }
14658
14659 #[inline]
14660 unsafe fn decode(
14661 &mut self,
14662 decoder: &mut fidl::encoding::Decoder<'_, D>,
14663 offset: usize,
14664 _depth: fidl::encoding::Depth,
14665 ) -> fidl::Result<()> {
14666 decoder.debug_check_bounds::<Self>(offset);
14667 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14668 unsafe {
14671 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
14672 }
14673 Ok(())
14674 }
14675 }
14676
14677 impl fidl::encoding::ValueTypeMarker for MyInt32 {
14678 type Borrowed<'a> = &'a Self;
14679 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14680 value
14681 }
14682 }
14683
14684 unsafe impl fidl::encoding::TypeMarker for MyInt32 {
14685 type Owned = Self;
14686
14687 #[inline(always)]
14688 fn inline_align(_context: fidl::encoding::Context) -> usize {
14689 4
14690 }
14691
14692 #[inline(always)]
14693 fn inline_size(_context: fidl::encoding::Context) -> usize {
14694 4
14695 }
14696 #[inline(always)]
14697 fn encode_is_copy() -> bool {
14698 true
14699 }
14700
14701 #[inline(always)]
14702 fn decode_is_copy() -> bool {
14703 true
14704 }
14705 }
14706
14707 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt32, D> for &MyInt32 {
14708 #[inline]
14709 unsafe fn encode(
14710 self,
14711 encoder: &mut fidl::encoding::Encoder<'_, D>,
14712 offset: usize,
14713 _depth: fidl::encoding::Depth,
14714 ) -> fidl::Result<()> {
14715 encoder.debug_check_bounds::<MyInt32>(offset);
14716 unsafe {
14717 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14719 (buf_ptr as *mut MyInt32).write_unaligned((self as *const MyInt32).read());
14720 }
14723 Ok(())
14724 }
14725 }
14726 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
14727 fidl::encoding::Encode<MyInt32, D> for (T0,)
14728 {
14729 #[inline]
14730 unsafe fn encode(
14731 self,
14732 encoder: &mut fidl::encoding::Encoder<'_, D>,
14733 offset: usize,
14734 depth: fidl::encoding::Depth,
14735 ) -> fidl::Result<()> {
14736 encoder.debug_check_bounds::<MyInt32>(offset);
14737 self.0.encode(encoder, offset + 0, depth)?;
14741 Ok(())
14742 }
14743 }
14744
14745 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt32 {
14746 #[inline(always)]
14747 fn new_empty() -> Self {
14748 Self { value: fidl::new_empty!(i32, D) }
14749 }
14750
14751 #[inline]
14752 unsafe fn decode(
14753 &mut self,
14754 decoder: &mut fidl::encoding::Decoder<'_, D>,
14755 offset: usize,
14756 _depth: fidl::encoding::Depth,
14757 ) -> fidl::Result<()> {
14758 decoder.debug_check_bounds::<Self>(offset);
14759 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14760 unsafe {
14763 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14764 }
14765 Ok(())
14766 }
14767 }
14768
14769 impl fidl::encoding::ValueTypeMarker for MyInt64 {
14770 type Borrowed<'a> = &'a Self;
14771 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14772 value
14773 }
14774 }
14775
14776 unsafe impl fidl::encoding::TypeMarker for MyInt64 {
14777 type Owned = Self;
14778
14779 #[inline(always)]
14780 fn inline_align(_context: fidl::encoding::Context) -> usize {
14781 8
14782 }
14783
14784 #[inline(always)]
14785 fn inline_size(_context: fidl::encoding::Context) -> usize {
14786 8
14787 }
14788 #[inline(always)]
14789 fn encode_is_copy() -> bool {
14790 true
14791 }
14792
14793 #[inline(always)]
14794 fn decode_is_copy() -> bool {
14795 true
14796 }
14797 }
14798
14799 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt64, D> for &MyInt64 {
14800 #[inline]
14801 unsafe fn encode(
14802 self,
14803 encoder: &mut fidl::encoding::Encoder<'_, D>,
14804 offset: usize,
14805 _depth: fidl::encoding::Depth,
14806 ) -> fidl::Result<()> {
14807 encoder.debug_check_bounds::<MyInt64>(offset);
14808 unsafe {
14809 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14811 (buf_ptr as *mut MyInt64).write_unaligned((self as *const MyInt64).read());
14812 }
14815 Ok(())
14816 }
14817 }
14818 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14819 fidl::encoding::Encode<MyInt64, D> for (T0,)
14820 {
14821 #[inline]
14822 unsafe fn encode(
14823 self,
14824 encoder: &mut fidl::encoding::Encoder<'_, D>,
14825 offset: usize,
14826 depth: fidl::encoding::Depth,
14827 ) -> fidl::Result<()> {
14828 encoder.debug_check_bounds::<MyInt64>(offset);
14829 self.0.encode(encoder, offset + 0, depth)?;
14833 Ok(())
14834 }
14835 }
14836
14837 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt64 {
14838 #[inline(always)]
14839 fn new_empty() -> Self {
14840 Self { value: fidl::new_empty!(i64, D) }
14841 }
14842
14843 #[inline]
14844 unsafe fn decode(
14845 &mut self,
14846 decoder: &mut fidl::encoding::Decoder<'_, D>,
14847 offset: usize,
14848 _depth: fidl::encoding::Depth,
14849 ) -> fidl::Result<()> {
14850 decoder.debug_check_bounds::<Self>(offset);
14851 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14852 unsafe {
14855 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14856 }
14857 Ok(())
14858 }
14859 }
14860
14861 impl fidl::encoding::ValueTypeMarker for MyInt8 {
14862 type Borrowed<'a> = &'a Self;
14863 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14864 value
14865 }
14866 }
14867
14868 unsafe impl fidl::encoding::TypeMarker for MyInt8 {
14869 type Owned = Self;
14870
14871 #[inline(always)]
14872 fn inline_align(_context: fidl::encoding::Context) -> usize {
14873 1
14874 }
14875
14876 #[inline(always)]
14877 fn inline_size(_context: fidl::encoding::Context) -> usize {
14878 1
14879 }
14880 #[inline(always)]
14881 fn encode_is_copy() -> bool {
14882 true
14883 }
14884
14885 #[inline(always)]
14886 fn decode_is_copy() -> bool {
14887 true
14888 }
14889 }
14890
14891 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt8, D> for &MyInt8 {
14892 #[inline]
14893 unsafe fn encode(
14894 self,
14895 encoder: &mut fidl::encoding::Encoder<'_, D>,
14896 offset: usize,
14897 _depth: fidl::encoding::Depth,
14898 ) -> fidl::Result<()> {
14899 encoder.debug_check_bounds::<MyInt8>(offset);
14900 unsafe {
14901 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14903 (buf_ptr as *mut MyInt8).write_unaligned((self as *const MyInt8).read());
14904 }
14907 Ok(())
14908 }
14909 }
14910 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
14911 fidl::encoding::Encode<MyInt8, D> for (T0,)
14912 {
14913 #[inline]
14914 unsafe fn encode(
14915 self,
14916 encoder: &mut fidl::encoding::Encoder<'_, D>,
14917 offset: usize,
14918 depth: fidl::encoding::Depth,
14919 ) -> fidl::Result<()> {
14920 encoder.debug_check_bounds::<MyInt8>(offset);
14921 self.0.encode(encoder, offset + 0, depth)?;
14925 Ok(())
14926 }
14927 }
14928
14929 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt8 {
14930 #[inline(always)]
14931 fn new_empty() -> Self {
14932 Self { value: fidl::new_empty!(i8, D) }
14933 }
14934
14935 #[inline]
14936 unsafe fn decode(
14937 &mut self,
14938 decoder: &mut fidl::encoding::Decoder<'_, D>,
14939 offset: usize,
14940 _depth: fidl::encoding::Depth,
14941 ) -> fidl::Result<()> {
14942 decoder.debug_check_bounds::<Self>(offset);
14943 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14944 unsafe {
14947 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
14948 }
14949 Ok(())
14950 }
14951 }
14952
14953 impl fidl::encoding::ValueTypeMarker for MyUint16 {
14954 type Borrowed<'a> = &'a Self;
14955 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14956 value
14957 }
14958 }
14959
14960 unsafe impl fidl::encoding::TypeMarker for MyUint16 {
14961 type Owned = Self;
14962
14963 #[inline(always)]
14964 fn inline_align(_context: fidl::encoding::Context) -> usize {
14965 2
14966 }
14967
14968 #[inline(always)]
14969 fn inline_size(_context: fidl::encoding::Context) -> usize {
14970 2
14971 }
14972 #[inline(always)]
14973 fn encode_is_copy() -> bool {
14974 true
14975 }
14976
14977 #[inline(always)]
14978 fn decode_is_copy() -> bool {
14979 true
14980 }
14981 }
14982
14983 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint16, D> for &MyUint16 {
14984 #[inline]
14985 unsafe fn encode(
14986 self,
14987 encoder: &mut fidl::encoding::Encoder<'_, D>,
14988 offset: usize,
14989 _depth: fidl::encoding::Depth,
14990 ) -> fidl::Result<()> {
14991 encoder.debug_check_bounds::<MyUint16>(offset);
14992 unsafe {
14993 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14995 (buf_ptr as *mut MyUint16).write_unaligned((self as *const MyUint16).read());
14996 }
14999 Ok(())
15000 }
15001 }
15002 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
15003 fidl::encoding::Encode<MyUint16, D> for (T0,)
15004 {
15005 #[inline]
15006 unsafe fn encode(
15007 self,
15008 encoder: &mut fidl::encoding::Encoder<'_, D>,
15009 offset: usize,
15010 depth: fidl::encoding::Depth,
15011 ) -> fidl::Result<()> {
15012 encoder.debug_check_bounds::<MyUint16>(offset);
15013 self.0.encode(encoder, offset + 0, depth)?;
15017 Ok(())
15018 }
15019 }
15020
15021 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint16 {
15022 #[inline(always)]
15023 fn new_empty() -> Self {
15024 Self { value: fidl::new_empty!(u16, D) }
15025 }
15026
15027 #[inline]
15028 unsafe fn decode(
15029 &mut self,
15030 decoder: &mut fidl::encoding::Decoder<'_, D>,
15031 offset: usize,
15032 _depth: fidl::encoding::Depth,
15033 ) -> fidl::Result<()> {
15034 decoder.debug_check_bounds::<Self>(offset);
15035 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15036 unsafe {
15039 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
15040 }
15041 Ok(())
15042 }
15043 }
15044
15045 impl fidl::encoding::ValueTypeMarker for MyUint32 {
15046 type Borrowed<'a> = &'a Self;
15047 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15048 value
15049 }
15050 }
15051
15052 unsafe impl fidl::encoding::TypeMarker for MyUint32 {
15053 type Owned = Self;
15054
15055 #[inline(always)]
15056 fn inline_align(_context: fidl::encoding::Context) -> usize {
15057 4
15058 }
15059
15060 #[inline(always)]
15061 fn inline_size(_context: fidl::encoding::Context) -> usize {
15062 4
15063 }
15064 #[inline(always)]
15065 fn encode_is_copy() -> bool {
15066 true
15067 }
15068
15069 #[inline(always)]
15070 fn decode_is_copy() -> bool {
15071 true
15072 }
15073 }
15074
15075 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint32, D> for &MyUint32 {
15076 #[inline]
15077 unsafe fn encode(
15078 self,
15079 encoder: &mut fidl::encoding::Encoder<'_, D>,
15080 offset: usize,
15081 _depth: fidl::encoding::Depth,
15082 ) -> fidl::Result<()> {
15083 encoder.debug_check_bounds::<MyUint32>(offset);
15084 unsafe {
15085 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15087 (buf_ptr as *mut MyUint32).write_unaligned((self as *const MyUint32).read());
15088 }
15091 Ok(())
15092 }
15093 }
15094 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
15095 fidl::encoding::Encode<MyUint32, D> for (T0,)
15096 {
15097 #[inline]
15098 unsafe fn encode(
15099 self,
15100 encoder: &mut fidl::encoding::Encoder<'_, D>,
15101 offset: usize,
15102 depth: fidl::encoding::Depth,
15103 ) -> fidl::Result<()> {
15104 encoder.debug_check_bounds::<MyUint32>(offset);
15105 self.0.encode(encoder, offset + 0, depth)?;
15109 Ok(())
15110 }
15111 }
15112
15113 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint32 {
15114 #[inline(always)]
15115 fn new_empty() -> Self {
15116 Self { value: fidl::new_empty!(u32, D) }
15117 }
15118
15119 #[inline]
15120 unsafe fn decode(
15121 &mut self,
15122 decoder: &mut fidl::encoding::Decoder<'_, D>,
15123 offset: usize,
15124 _depth: fidl::encoding::Depth,
15125 ) -> fidl::Result<()> {
15126 decoder.debug_check_bounds::<Self>(offset);
15127 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15128 unsafe {
15131 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
15132 }
15133 Ok(())
15134 }
15135 }
15136
15137 impl fidl::encoding::ValueTypeMarker for MyUint64 {
15138 type Borrowed<'a> = &'a Self;
15139 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15140 value
15141 }
15142 }
15143
15144 unsafe impl fidl::encoding::TypeMarker for MyUint64 {
15145 type Owned = Self;
15146
15147 #[inline(always)]
15148 fn inline_align(_context: fidl::encoding::Context) -> usize {
15149 8
15150 }
15151
15152 #[inline(always)]
15153 fn inline_size(_context: fidl::encoding::Context) -> usize {
15154 8
15155 }
15156 #[inline(always)]
15157 fn encode_is_copy() -> bool {
15158 true
15159 }
15160
15161 #[inline(always)]
15162 fn decode_is_copy() -> bool {
15163 true
15164 }
15165 }
15166
15167 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint64, D> for &MyUint64 {
15168 #[inline]
15169 unsafe fn encode(
15170 self,
15171 encoder: &mut fidl::encoding::Encoder<'_, D>,
15172 offset: usize,
15173 _depth: fidl::encoding::Depth,
15174 ) -> fidl::Result<()> {
15175 encoder.debug_check_bounds::<MyUint64>(offset);
15176 unsafe {
15177 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15179 (buf_ptr as *mut MyUint64).write_unaligned((self as *const MyUint64).read());
15180 }
15183 Ok(())
15184 }
15185 }
15186 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
15187 fidl::encoding::Encode<MyUint64, D> for (T0,)
15188 {
15189 #[inline]
15190 unsafe fn encode(
15191 self,
15192 encoder: &mut fidl::encoding::Encoder<'_, D>,
15193 offset: usize,
15194 depth: fidl::encoding::Depth,
15195 ) -> fidl::Result<()> {
15196 encoder.debug_check_bounds::<MyUint64>(offset);
15197 self.0.encode(encoder, offset + 0, depth)?;
15201 Ok(())
15202 }
15203 }
15204
15205 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint64 {
15206 #[inline(always)]
15207 fn new_empty() -> Self {
15208 Self { value: fidl::new_empty!(u64, D) }
15209 }
15210
15211 #[inline]
15212 unsafe fn decode(
15213 &mut self,
15214 decoder: &mut fidl::encoding::Decoder<'_, D>,
15215 offset: usize,
15216 _depth: fidl::encoding::Depth,
15217 ) -> fidl::Result<()> {
15218 decoder.debug_check_bounds::<Self>(offset);
15219 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15220 unsafe {
15223 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15224 }
15225 Ok(())
15226 }
15227 }
15228
15229 impl fidl::encoding::ValueTypeMarker for MyUint8 {
15230 type Borrowed<'a> = &'a Self;
15231 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15232 value
15233 }
15234 }
15235
15236 unsafe impl fidl::encoding::TypeMarker for MyUint8 {
15237 type Owned = Self;
15238
15239 #[inline(always)]
15240 fn inline_align(_context: fidl::encoding::Context) -> usize {
15241 1
15242 }
15243
15244 #[inline(always)]
15245 fn inline_size(_context: fidl::encoding::Context) -> usize {
15246 1
15247 }
15248 #[inline(always)]
15249 fn encode_is_copy() -> bool {
15250 true
15251 }
15252
15253 #[inline(always)]
15254 fn decode_is_copy() -> bool {
15255 true
15256 }
15257 }
15258
15259 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint8, D> for &MyUint8 {
15260 #[inline]
15261 unsafe fn encode(
15262 self,
15263 encoder: &mut fidl::encoding::Encoder<'_, D>,
15264 offset: usize,
15265 _depth: fidl::encoding::Depth,
15266 ) -> fidl::Result<()> {
15267 encoder.debug_check_bounds::<MyUint8>(offset);
15268 unsafe {
15269 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15271 (buf_ptr as *mut MyUint8).write_unaligned((self as *const MyUint8).read());
15272 }
15275 Ok(())
15276 }
15277 }
15278 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
15279 fidl::encoding::Encode<MyUint8, D> for (T0,)
15280 {
15281 #[inline]
15282 unsafe fn encode(
15283 self,
15284 encoder: &mut fidl::encoding::Encoder<'_, D>,
15285 offset: usize,
15286 depth: fidl::encoding::Depth,
15287 ) -> fidl::Result<()> {
15288 encoder.debug_check_bounds::<MyUint8>(offset);
15289 self.0.encode(encoder, offset + 0, depth)?;
15293 Ok(())
15294 }
15295 }
15296
15297 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint8 {
15298 #[inline(always)]
15299 fn new_empty() -> Self {
15300 Self { value: fidl::new_empty!(u8, D) }
15301 }
15302
15303 #[inline]
15304 unsafe fn decode(
15305 &mut self,
15306 decoder: &mut fidl::encoding::Decoder<'_, D>,
15307 offset: usize,
15308 _depth: fidl::encoding::Depth,
15309 ) -> fidl::Result<()> {
15310 decoder.debug_check_bounds::<Self>(offset);
15311 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15312 unsafe {
15315 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
15316 }
15317 Ok(())
15318 }
15319 }
15320
15321 impl fidl::encoding::ValueTypeMarker for NoCodingTablesStressor {
15322 type Borrowed<'a> = &'a Self;
15323 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15324 value
15325 }
15326 }
15327
15328 unsafe impl fidl::encoding::TypeMarker for NoCodingTablesStressor {
15329 type Owned = Self;
15330
15331 #[inline(always)]
15332 fn inline_align(_context: fidl::encoding::Context) -> usize {
15333 8
15334 }
15335
15336 #[inline(always)]
15337 fn inline_size(_context: fidl::encoding::Context) -> usize {
15338 136
15339 }
15340 }
15341
15342 unsafe impl<D: fidl::encoding::ResourceDialect>
15343 fidl::encoding::Encode<NoCodingTablesStressor, D> for &NoCodingTablesStressor
15344 {
15345 #[inline]
15346 unsafe fn encode(
15347 self,
15348 encoder: &mut fidl::encoding::Encoder<'_, D>,
15349 offset: usize,
15350 _depth: fidl::encoding::Depth,
15351 ) -> fidl::Result<()> {
15352 encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15353 fidl::encoding::Encode::<NoCodingTablesStressor, D>::encode(
15355 (
15356 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
15357 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
15358 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u1),
15359 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
15360 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
15361 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
15362 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
15363 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
15364 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u3),
15365 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
15366 <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15367 &self.p1,
15368 ),
15369 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
15370 <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15371 &self.p2,
15372 ),
15373 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
15374 ),
15375 encoder,
15376 offset,
15377 _depth,
15378 )
15379 }
15380 }
15381 unsafe impl<
15382 D: fidl::encoding::ResourceDialect,
15383 T0: fidl::encoding::Encode<u64, D>,
15384 T1: fidl::encoding::Encode<u64, D>,
15385 T2: fidl::encoding::Encode<UnionSize36Align4, D>,
15386 T3: fidl::encoding::Encode<u64, D>,
15387 T4: fidl::encoding::Encode<u64, D>,
15388 T5: fidl::encoding::Encode<UnionSize36Align4, D>,
15389 T6: fidl::encoding::Encode<u64, D>,
15390 T7: fidl::encoding::Encode<u64, D>,
15391 T8: fidl::encoding::Encode<UnionSize36Align4, D>,
15392 T9: fidl::encoding::Encode<u64, D>,
15393 T10: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15394 T11: fidl::encoding::Encode<u64, D>,
15395 T12: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15396 T13: fidl::encoding::Encode<u64, D>,
15397 > fidl::encoding::Encode<NoCodingTablesStressor, D>
15398 for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
15399 {
15400 #[inline]
15401 unsafe fn encode(
15402 self,
15403 encoder: &mut fidl::encoding::Encoder<'_, D>,
15404 offset: usize,
15405 depth: fidl::encoding::Depth,
15406 ) -> fidl::Result<()> {
15407 encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15408 self.0.encode(encoder, offset + 0, depth)?;
15412 self.1.encode(encoder, offset + 8, depth)?;
15413 self.2.encode(encoder, offset + 16, depth)?;
15414 self.3.encode(encoder, offset + 32, depth)?;
15415 self.4.encode(encoder, offset + 40, depth)?;
15416 self.5.encode(encoder, offset + 48, depth)?;
15417 self.6.encode(encoder, offset + 64, depth)?;
15418 self.7.encode(encoder, offset + 72, depth)?;
15419 self.8.encode(encoder, offset + 80, depth)?;
15420 self.9.encode(encoder, offset + 96, depth)?;
15421 self.10.encode(encoder, offset + 104, depth)?;
15422 self.11.encode(encoder, offset + 112, depth)?;
15423 self.12.encode(encoder, offset + 120, depth)?;
15424 self.13.encode(encoder, offset + 128, depth)?;
15425 Ok(())
15426 }
15427 }
15428
15429 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15430 for NoCodingTablesStressor
15431 {
15432 #[inline(always)]
15433 fn new_empty() -> Self {
15434 Self {
15435 f1: fidl::new_empty!(u64, D),
15436 f2: fidl::new_empty!(u64, D),
15437 u1: fidl::new_empty!(UnionSize36Align4, D),
15438 f3: fidl::new_empty!(u64, D),
15439 f4: fidl::new_empty!(u64, D),
15440 u2: fidl::new_empty!(UnionSize36Align4, D),
15441 f5: fidl::new_empty!(u64, D),
15442 f6: fidl::new_empty!(u64, D),
15443 u3: fidl::new_empty!(UnionSize36Align4, D),
15444 f7: fidl::new_empty!(u64, D),
15445 p1: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15446 f8: fidl::new_empty!(u64, D),
15447 p2: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15448 f9: fidl::new_empty!(u64, D),
15449 }
15450 }
15451
15452 #[inline]
15453 unsafe fn decode(
15454 &mut self,
15455 decoder: &mut fidl::encoding::Decoder<'_, D>,
15456 offset: usize,
15457 _depth: fidl::encoding::Depth,
15458 ) -> fidl::Result<()> {
15459 decoder.debug_check_bounds::<Self>(offset);
15460 fidl::decode!(u64, D, &mut self.f1, decoder, offset + 0, _depth)?;
15462 fidl::decode!(u64, D, &mut self.f2, decoder, offset + 8, _depth)?;
15463 fidl::decode!(UnionSize36Align4, D, &mut self.u1, decoder, offset + 16, _depth)?;
15464 fidl::decode!(u64, D, &mut self.f3, decoder, offset + 32, _depth)?;
15465 fidl::decode!(u64, D, &mut self.f4, decoder, offset + 40, _depth)?;
15466 fidl::decode!(UnionSize36Align4, D, &mut self.u2, decoder, offset + 48, _depth)?;
15467 fidl::decode!(u64, D, &mut self.f5, decoder, offset + 64, _depth)?;
15468 fidl::decode!(u64, D, &mut self.f6, decoder, offset + 72, _depth)?;
15469 fidl::decode!(UnionSize36Align4, D, &mut self.u3, decoder, offset + 80, _depth)?;
15470 fidl::decode!(u64, D, &mut self.f7, decoder, offset + 96, _depth)?;
15471 fidl::decode!(
15472 fidl::encoding::Boxed<Size8Align8>,
15473 D,
15474 &mut self.p1,
15475 decoder,
15476 offset + 104,
15477 _depth
15478 )?;
15479 fidl::decode!(u64, D, &mut self.f8, decoder, offset + 112, _depth)?;
15480 fidl::decode!(
15481 fidl::encoding::Boxed<Size8Align8>,
15482 D,
15483 &mut self.p2,
15484 decoder,
15485 offset + 120,
15486 _depth
15487 )?;
15488 fidl::decode!(u64, D, &mut self.f9, decoder, offset + 128, _depth)?;
15489 Ok(())
15490 }
15491 }
15492
15493 impl fidl::encoding::ValueTypeMarker for NodeAttributes {
15494 type Borrowed<'a> = &'a Self;
15495 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15496 value
15497 }
15498 }
15499
15500 unsafe impl fidl::encoding::TypeMarker for NodeAttributes {
15501 type Owned = Self;
15502
15503 #[inline(always)]
15504 fn inline_align(_context: fidl::encoding::Context) -> usize {
15505 8
15506 }
15507
15508 #[inline(always)]
15509 fn inline_size(_context: fidl::encoding::Context) -> usize {
15510 56
15511 }
15512 }
15513
15514 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NodeAttributes, D>
15515 for &NodeAttributes
15516 {
15517 #[inline]
15518 unsafe fn encode(
15519 self,
15520 encoder: &mut fidl::encoding::Encoder<'_, D>,
15521 offset: usize,
15522 _depth: fidl::encoding::Depth,
15523 ) -> fidl::Result<()> {
15524 encoder.debug_check_bounds::<NodeAttributes>(offset);
15525 unsafe {
15526 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15528 (buf_ptr as *mut NodeAttributes)
15529 .write_unaligned((self as *const NodeAttributes).read());
15530 let padding_ptr = buf_ptr.offset(0) as *mut u64;
15533 let padding_mask = 0xffffffff00000000u64;
15534 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
15535 }
15536 Ok(())
15537 }
15538 }
15539 unsafe impl<
15540 D: fidl::encoding::ResourceDialect,
15541 T0: fidl::encoding::Encode<u32, D>,
15542 T1: fidl::encoding::Encode<u64, D>,
15543 T2: fidl::encoding::Encode<u64, D>,
15544 T3: fidl::encoding::Encode<u64, D>,
15545 T4: fidl::encoding::Encode<u64, D>,
15546 T5: fidl::encoding::Encode<u64, D>,
15547 T6: fidl::encoding::Encode<u64, D>,
15548 > fidl::encoding::Encode<NodeAttributes, D> for (T0, T1, T2, T3, T4, T5, T6)
15549 {
15550 #[inline]
15551 unsafe fn encode(
15552 self,
15553 encoder: &mut fidl::encoding::Encoder<'_, D>,
15554 offset: usize,
15555 depth: fidl::encoding::Depth,
15556 ) -> fidl::Result<()> {
15557 encoder.debug_check_bounds::<NodeAttributes>(offset);
15558 unsafe {
15561 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
15562 (ptr as *mut u64).write_unaligned(0);
15563 }
15564 self.0.encode(encoder, offset + 0, depth)?;
15566 self.1.encode(encoder, offset + 8, depth)?;
15567 self.2.encode(encoder, offset + 16, depth)?;
15568 self.3.encode(encoder, offset + 24, depth)?;
15569 self.4.encode(encoder, offset + 32, depth)?;
15570 self.5.encode(encoder, offset + 40, depth)?;
15571 self.6.encode(encoder, offset + 48, depth)?;
15572 Ok(())
15573 }
15574 }
15575
15576 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeAttributes {
15577 #[inline(always)]
15578 fn new_empty() -> Self {
15579 Self {
15580 mode: fidl::new_empty!(u32, D),
15581 id: fidl::new_empty!(u64, D),
15582 content_size: fidl::new_empty!(u64, D),
15583 storage_size: fidl::new_empty!(u64, D),
15584 link_count: fidl::new_empty!(u64, D),
15585 creation_time: fidl::new_empty!(u64, D),
15586 modification_time: fidl::new_empty!(u64, D),
15587 }
15588 }
15589
15590 #[inline]
15591 unsafe fn decode(
15592 &mut self,
15593 decoder: &mut fidl::encoding::Decoder<'_, D>,
15594 offset: usize,
15595 _depth: fidl::encoding::Depth,
15596 ) -> fidl::Result<()> {
15597 decoder.debug_check_bounds::<Self>(offset);
15598 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15599 let ptr = unsafe { buf_ptr.offset(0) };
15601 let padval = unsafe { (ptr as *const u64).read_unaligned() };
15602 let mask = 0xffffffff00000000u64;
15603 let maskedval = padval & mask;
15604 if maskedval != 0 {
15605 return Err(fidl::Error::NonZeroPadding {
15606 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
15607 });
15608 }
15609 unsafe {
15611 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 56);
15612 }
15613 Ok(())
15614 }
15615 }
15616
15617 impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign4 {
15618 type Borrowed<'a> = &'a Self;
15619 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15620 value
15621 }
15622 }
15623
15624 unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign4 {
15625 type Owned = Self;
15626
15627 #[inline(always)]
15628 fn inline_align(_context: fidl::encoding::Context) -> usize {
15629 4
15630 }
15631
15632 #[inline(always)]
15633 fn inline_size(_context: fidl::encoding::Context) -> usize {
15634 8
15635 }
15636 #[inline(always)]
15637 fn encode_is_copy() -> bool {
15638 true
15639 }
15640
15641 #[inline(always)]
15642 fn decode_is_copy() -> bool {
15643 true
15644 }
15645 }
15646
15647 unsafe impl<D: fidl::encoding::ResourceDialect>
15648 fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>
15649 for &OneLayerStructNoPaddingAlign4
15650 {
15651 #[inline]
15652 unsafe fn encode(
15653 self,
15654 encoder: &mut fidl::encoding::Encoder<'_, D>,
15655 offset: usize,
15656 _depth: fidl::encoding::Depth,
15657 ) -> fidl::Result<()> {
15658 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15659 unsafe {
15660 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15662 (buf_ptr as *mut OneLayerStructNoPaddingAlign4)
15663 .write_unaligned((self as *const OneLayerStructNoPaddingAlign4).read());
15664 }
15667 Ok(())
15668 }
15669 }
15670 unsafe impl<
15671 D: fidl::encoding::ResourceDialect,
15672 T0: fidl::encoding::Encode<u16, D>,
15673 T1: fidl::encoding::Encode<u8, D>,
15674 T2: fidl::encoding::Encode<u8, D>,
15675 T3: fidl::encoding::Encode<u32, D>,
15676 > fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D> for (T0, T1, T2, T3)
15677 {
15678 #[inline]
15679 unsafe fn encode(
15680 self,
15681 encoder: &mut fidl::encoding::Encoder<'_, D>,
15682 offset: usize,
15683 depth: fidl::encoding::Depth,
15684 ) -> fidl::Result<()> {
15685 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15686 self.0.encode(encoder, offset + 0, depth)?;
15690 self.1.encode(encoder, offset + 2, depth)?;
15691 self.2.encode(encoder, offset + 3, depth)?;
15692 self.3.encode(encoder, offset + 4, depth)?;
15693 Ok(())
15694 }
15695 }
15696
15697 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15698 for OneLayerStructNoPaddingAlign4
15699 {
15700 #[inline(always)]
15701 fn new_empty() -> Self {
15702 Self {
15703 a: fidl::new_empty!(u16, D),
15704 b: fidl::new_empty!(u8, D),
15705 c: fidl::new_empty!(u8, D),
15706 d: fidl::new_empty!(u32, D),
15707 }
15708 }
15709
15710 #[inline]
15711 unsafe fn decode(
15712 &mut self,
15713 decoder: &mut fidl::encoding::Decoder<'_, D>,
15714 offset: usize,
15715 _depth: fidl::encoding::Depth,
15716 ) -> fidl::Result<()> {
15717 decoder.debug_check_bounds::<Self>(offset);
15718 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15719 unsafe {
15722 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15723 }
15724 Ok(())
15725 }
15726 }
15727
15728 impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign8 {
15729 type Borrowed<'a> = &'a Self;
15730 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15731 value
15732 }
15733 }
15734
15735 unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign8 {
15736 type Owned = Self;
15737
15738 #[inline(always)]
15739 fn inline_align(_context: fidl::encoding::Context) -> usize {
15740 8
15741 }
15742
15743 #[inline(always)]
15744 fn inline_size(_context: fidl::encoding::Context) -> usize {
15745 16
15746 }
15747 #[inline(always)]
15748 fn encode_is_copy() -> bool {
15749 true
15750 }
15751
15752 #[inline(always)]
15753 fn decode_is_copy() -> bool {
15754 true
15755 }
15756 }
15757
15758 unsafe impl<D: fidl::encoding::ResourceDialect>
15759 fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>
15760 for &OneLayerStructNoPaddingAlign8
15761 {
15762 #[inline]
15763 unsafe fn encode(
15764 self,
15765 encoder: &mut fidl::encoding::Encoder<'_, D>,
15766 offset: usize,
15767 _depth: fidl::encoding::Depth,
15768 ) -> fidl::Result<()> {
15769 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15770 unsafe {
15771 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15773 (buf_ptr as *mut OneLayerStructNoPaddingAlign8)
15774 .write_unaligned((self as *const OneLayerStructNoPaddingAlign8).read());
15775 }
15778 Ok(())
15779 }
15780 }
15781 unsafe impl<
15782 D: fidl::encoding::ResourceDialect,
15783 T0: fidl::encoding::Encode<u32, D>,
15784 T1: fidl::encoding::Encode<u16, D>,
15785 T2: fidl::encoding::Encode<u16, D>,
15786 T3: fidl::encoding::Encode<u64, D>,
15787 > fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D> for (T0, T1, T2, T3)
15788 {
15789 #[inline]
15790 unsafe fn encode(
15791 self,
15792 encoder: &mut fidl::encoding::Encoder<'_, D>,
15793 offset: usize,
15794 depth: fidl::encoding::Depth,
15795 ) -> fidl::Result<()> {
15796 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15797 self.0.encode(encoder, offset + 0, depth)?;
15801 self.1.encode(encoder, offset + 4, depth)?;
15802 self.2.encode(encoder, offset + 6, depth)?;
15803 self.3.encode(encoder, offset + 8, depth)?;
15804 Ok(())
15805 }
15806 }
15807
15808 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15809 for OneLayerStructNoPaddingAlign8
15810 {
15811 #[inline(always)]
15812 fn new_empty() -> Self {
15813 Self {
15814 a: fidl::new_empty!(u32, D),
15815 b: fidl::new_empty!(u16, D),
15816 c: fidl::new_empty!(u16, D),
15817 d: fidl::new_empty!(u64, D),
15818 }
15819 }
15820
15821 #[inline]
15822 unsafe fn decode(
15823 &mut self,
15824 decoder: &mut fidl::encoding::Decoder<'_, D>,
15825 offset: usize,
15826 _depth: fidl::encoding::Depth,
15827 ) -> fidl::Result<()> {
15828 decoder.debug_check_bounds::<Self>(offset);
15829 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15830 unsafe {
15833 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
15834 }
15835 Ok(())
15836 }
15837 }
15838
15839 impl fidl::encoding::ValueTypeMarker for OneLayerStructWithBool {
15840 type Borrowed<'a> = &'a Self;
15841 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15842 value
15843 }
15844 }
15845
15846 unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithBool {
15847 type Owned = Self;
15848
15849 #[inline(always)]
15850 fn inline_align(_context: fidl::encoding::Context) -> usize {
15851 4
15852 }
15853
15854 #[inline(always)]
15855 fn inline_size(_context: fidl::encoding::Context) -> usize {
15856 8
15857 }
15858 }
15859
15860 unsafe impl<D: fidl::encoding::ResourceDialect>
15861 fidl::encoding::Encode<OneLayerStructWithBool, D> for &OneLayerStructWithBool
15862 {
15863 #[inline]
15864 unsafe fn encode(
15865 self,
15866 encoder: &mut fidl::encoding::Encoder<'_, D>,
15867 offset: usize,
15868 _depth: fidl::encoding::Depth,
15869 ) -> fidl::Result<()> {
15870 encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
15871 fidl::encoding::Encode::<OneLayerStructWithBool, D>::encode(
15873 (
15874 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
15875 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
15876 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.c),
15877 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.d),
15878 ),
15879 encoder,
15880 offset,
15881 _depth,
15882 )
15883 }
15884 }
15885 unsafe impl<
15886 D: fidl::encoding::ResourceDialect,
15887 T0: fidl::encoding::Encode<bool, D>,
15888 T1: fidl::encoding::Encode<u8, D>,
15889 T2: fidl::encoding::Encode<u16, D>,
15890 T3: fidl::encoding::Encode<u32, D>,
15891 > fidl::encoding::Encode<OneLayerStructWithBool, D> for (T0, T1, T2, T3)
15892 {
15893 #[inline]
15894 unsafe fn encode(
15895 self,
15896 encoder: &mut fidl::encoding::Encoder<'_, D>,
15897 offset: usize,
15898 depth: fidl::encoding::Depth,
15899 ) -> fidl::Result<()> {
15900 encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
15901 self.0.encode(encoder, offset + 0, depth)?;
15905 self.1.encode(encoder, offset + 1, depth)?;
15906 self.2.encode(encoder, offset + 2, depth)?;
15907 self.3.encode(encoder, offset + 4, depth)?;
15908 Ok(())
15909 }
15910 }
15911
15912 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15913 for OneLayerStructWithBool
15914 {
15915 #[inline(always)]
15916 fn new_empty() -> Self {
15917 Self {
15918 a: fidl::new_empty!(bool, D),
15919 b: fidl::new_empty!(u8, D),
15920 c: fidl::new_empty!(u16, D),
15921 d: fidl::new_empty!(u32, D),
15922 }
15923 }
15924
15925 #[inline]
15926 unsafe fn decode(
15927 &mut self,
15928 decoder: &mut fidl::encoding::Decoder<'_, D>,
15929 offset: usize,
15930 _depth: fidl::encoding::Depth,
15931 ) -> fidl::Result<()> {
15932 decoder.debug_check_bounds::<Self>(offset);
15933 fidl::decode!(bool, D, &mut self.a, decoder, offset + 0, _depth)?;
15935 fidl::decode!(u8, D, &mut self.b, decoder, offset + 1, _depth)?;
15936 fidl::decode!(u16, D, &mut self.c, decoder, offset + 2, _depth)?;
15937 fidl::decode!(u32, D, &mut self.d, decoder, offset + 4, _depth)?;
15938 Ok(())
15939 }
15940 }
15941
15942 impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign4 {
15943 type Borrowed<'a> = &'a Self;
15944 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15945 value
15946 }
15947 }
15948
15949 unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign4 {
15950 type Owned = Self;
15951
15952 #[inline(always)]
15953 fn inline_align(_context: fidl::encoding::Context) -> usize {
15954 4
15955 }
15956
15957 #[inline(always)]
15958 fn inline_size(_context: fidl::encoding::Context) -> usize {
15959 8
15960 }
15961 }
15962
15963 unsafe impl<D: fidl::encoding::ResourceDialect>
15964 fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>
15965 for &OneLayerStructWithPaddingAlign4
15966 {
15967 #[inline]
15968 unsafe fn encode(
15969 self,
15970 encoder: &mut fidl::encoding::Encoder<'_, D>,
15971 offset: usize,
15972 _depth: fidl::encoding::Depth,
15973 ) -> fidl::Result<()> {
15974 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
15975 unsafe {
15976 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15978 (buf_ptr as *mut OneLayerStructWithPaddingAlign4)
15979 .write_unaligned((self as *const OneLayerStructWithPaddingAlign4).read());
15980 let padding_ptr = buf_ptr.offset(0) as *mut u32;
15983 let padding_mask = 0xff000000u32;
15984 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
15985 }
15986 Ok(())
15987 }
15988 }
15989 unsafe impl<
15990 D: fidl::encoding::ResourceDialect,
15991 T0: fidl::encoding::Encode<u16, D>,
15992 T1: fidl::encoding::Encode<u8, D>,
15993 T2: fidl::encoding::Encode<u32, D>,
15994 > fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D> for (T0, T1, T2)
15995 {
15996 #[inline]
15997 unsafe fn encode(
15998 self,
15999 encoder: &mut fidl::encoding::Encoder<'_, D>,
16000 offset: usize,
16001 depth: fidl::encoding::Depth,
16002 ) -> fidl::Result<()> {
16003 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
16004 unsafe {
16007 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16008 (ptr as *mut u32).write_unaligned(0);
16009 }
16010 self.0.encode(encoder, offset + 0, depth)?;
16012 self.1.encode(encoder, offset + 2, depth)?;
16013 self.2.encode(encoder, offset + 4, depth)?;
16014 Ok(())
16015 }
16016 }
16017
16018 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16019 for OneLayerStructWithPaddingAlign4
16020 {
16021 #[inline(always)]
16022 fn new_empty() -> Self {
16023 Self {
16024 a: fidl::new_empty!(u16, D),
16025 b: fidl::new_empty!(u8, D),
16026 c: fidl::new_empty!(u32, D),
16027 }
16028 }
16029
16030 #[inline]
16031 unsafe fn decode(
16032 &mut self,
16033 decoder: &mut fidl::encoding::Decoder<'_, D>,
16034 offset: usize,
16035 _depth: fidl::encoding::Depth,
16036 ) -> fidl::Result<()> {
16037 decoder.debug_check_bounds::<Self>(offset);
16038 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16039 let ptr = unsafe { buf_ptr.offset(0) };
16041 let padval = unsafe { (ptr as *const u32).read_unaligned() };
16042 let mask = 0xff000000u32;
16043 let maskedval = padval & mask;
16044 if maskedval != 0 {
16045 return Err(fidl::Error::NonZeroPadding {
16046 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16047 });
16048 }
16049 unsafe {
16051 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
16052 }
16053 Ok(())
16054 }
16055 }
16056
16057 impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign8 {
16058 type Borrowed<'a> = &'a Self;
16059 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16060 value
16061 }
16062 }
16063
16064 unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign8 {
16065 type Owned = Self;
16066
16067 #[inline(always)]
16068 fn inline_align(_context: fidl::encoding::Context) -> usize {
16069 8
16070 }
16071
16072 #[inline(always)]
16073 fn inline_size(_context: fidl::encoding::Context) -> usize {
16074 16
16075 }
16076 }
16077
16078 unsafe impl<D: fidl::encoding::ResourceDialect>
16079 fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>
16080 for &OneLayerStructWithPaddingAlign8
16081 {
16082 #[inline]
16083 unsafe fn encode(
16084 self,
16085 encoder: &mut fidl::encoding::Encoder<'_, D>,
16086 offset: usize,
16087 _depth: fidl::encoding::Depth,
16088 ) -> fidl::Result<()> {
16089 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16090 unsafe {
16091 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
16093 (buf_ptr as *mut OneLayerStructWithPaddingAlign8)
16094 .write_unaligned((self as *const OneLayerStructWithPaddingAlign8).read());
16095 let padding_ptr = buf_ptr.offset(0) as *mut u64;
16098 let padding_mask = 0xffff000000000000u64;
16099 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
16100 }
16101 Ok(())
16102 }
16103 }
16104 unsafe impl<
16105 D: fidl::encoding::ResourceDialect,
16106 T0: fidl::encoding::Encode<u32, D>,
16107 T1: fidl::encoding::Encode<u16, D>,
16108 T2: fidl::encoding::Encode<u64, D>,
16109 > fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D> for (T0, T1, T2)
16110 {
16111 #[inline]
16112 unsafe fn encode(
16113 self,
16114 encoder: &mut fidl::encoding::Encoder<'_, D>,
16115 offset: usize,
16116 depth: fidl::encoding::Depth,
16117 ) -> fidl::Result<()> {
16118 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16119 unsafe {
16122 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16123 (ptr as *mut u64).write_unaligned(0);
16124 }
16125 self.0.encode(encoder, offset + 0, depth)?;
16127 self.1.encode(encoder, offset + 4, depth)?;
16128 self.2.encode(encoder, offset + 8, depth)?;
16129 Ok(())
16130 }
16131 }
16132
16133 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16134 for OneLayerStructWithPaddingAlign8
16135 {
16136 #[inline(always)]
16137 fn new_empty() -> Self {
16138 Self {
16139 a: fidl::new_empty!(u32, D),
16140 b: fidl::new_empty!(u16, D),
16141 c: fidl::new_empty!(u64, D),
16142 }
16143 }
16144
16145 #[inline]
16146 unsafe fn decode(
16147 &mut self,
16148 decoder: &mut fidl::encoding::Decoder<'_, D>,
16149 offset: usize,
16150 _depth: fidl::encoding::Depth,
16151 ) -> fidl::Result<()> {
16152 decoder.debug_check_bounds::<Self>(offset);
16153 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16154 let ptr = unsafe { buf_ptr.offset(0) };
16156 let padval = unsafe { (ptr as *const u64).read_unaligned() };
16157 let mask = 0xffff000000000000u64;
16158 let maskedval = padval & mask;
16159 if maskedval != 0 {
16160 return Err(fidl::Error::NonZeroPadding {
16161 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16162 });
16163 }
16164 unsafe {
16166 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
16167 }
16168 Ok(())
16169 }
16170 }
16171
16172 impl fidl::encoding::ValueTypeMarker for OptionalEmptyStructWrapper {
16173 type Borrowed<'a> = &'a Self;
16174 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16175 value
16176 }
16177 }
16178
16179 unsafe impl fidl::encoding::TypeMarker for OptionalEmptyStructWrapper {
16180 type Owned = Self;
16181
16182 #[inline(always)]
16183 fn inline_align(_context: fidl::encoding::Context) -> usize {
16184 8
16185 }
16186
16187 #[inline(always)]
16188 fn inline_size(_context: fidl::encoding::Context) -> usize {
16189 8
16190 }
16191 }
16192
16193 unsafe impl<D: fidl::encoding::ResourceDialect>
16194 fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for &OptionalEmptyStructWrapper
16195 {
16196 #[inline]
16197 unsafe fn encode(
16198 self,
16199 encoder: &mut fidl::encoding::Encoder<'_, D>,
16200 offset: usize,
16201 _depth: fidl::encoding::Depth,
16202 ) -> fidl::Result<()> {
16203 encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16204 fidl::encoding::Encode::<OptionalEmptyStructWrapper, D>::encode(
16206 (<fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(
16207 &self.s,
16208 ),),
16209 encoder,
16210 offset,
16211 _depth,
16212 )
16213 }
16214 }
16215 unsafe impl<
16216 D: fidl::encoding::ResourceDialect,
16217 T0: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
16218 > fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for (T0,)
16219 {
16220 #[inline]
16221 unsafe fn encode(
16222 self,
16223 encoder: &mut fidl::encoding::Encoder<'_, D>,
16224 offset: usize,
16225 depth: fidl::encoding::Depth,
16226 ) -> fidl::Result<()> {
16227 encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16228 self.0.encode(encoder, offset + 0, depth)?;
16232 Ok(())
16233 }
16234 }
16235
16236 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16237 for OptionalEmptyStructWrapper
16238 {
16239 #[inline(always)]
16240 fn new_empty() -> Self {
16241 Self { s: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D) }
16242 }
16243
16244 #[inline]
16245 unsafe fn decode(
16246 &mut self,
16247 decoder: &mut fidl::encoding::Decoder<'_, D>,
16248 offset: usize,
16249 _depth: fidl::encoding::Depth,
16250 ) -> fidl::Result<()> {
16251 decoder.debug_check_bounds::<Self>(offset);
16252 fidl::decode!(
16254 fidl::encoding::Boxed<EmptyStruct>,
16255 D,
16256 &mut self.s,
16257 decoder,
16258 offset + 0,
16259 _depth
16260 )?;
16261 Ok(())
16262 }
16263 }
16264
16265 impl fidl::encoding::ValueTypeMarker for OptionalStringWrapper {
16266 type Borrowed<'a> = &'a Self;
16267 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16268 value
16269 }
16270 }
16271
16272 unsafe impl fidl::encoding::TypeMarker for OptionalStringWrapper {
16273 type Owned = Self;
16274
16275 #[inline(always)]
16276 fn inline_align(_context: fidl::encoding::Context) -> usize {
16277 8
16278 }
16279
16280 #[inline(always)]
16281 fn inline_size(_context: fidl::encoding::Context) -> usize {
16282 16
16283 }
16284 }
16285
16286 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalStringWrapper, D>
16287 for &OptionalStringWrapper
16288 {
16289 #[inline]
16290 unsafe fn encode(
16291 self,
16292 encoder: &mut fidl::encoding::Encoder<'_, D>,
16293 offset: usize,
16294 _depth: fidl::encoding::Depth,
16295 ) -> fidl::Result<()> {
16296 encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16297 fidl::encoding::Encode::<OptionalStringWrapper, D>::encode(
16299 (
16300 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
16301 ),
16302 encoder, offset, _depth
16303 )
16304 }
16305 }
16306 unsafe impl<
16307 D: fidl::encoding::ResourceDialect,
16308 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
16309 > fidl::encoding::Encode<OptionalStringWrapper, D> for (T0,)
16310 {
16311 #[inline]
16312 unsafe fn encode(
16313 self,
16314 encoder: &mut fidl::encoding::Encoder<'_, D>,
16315 offset: usize,
16316 depth: fidl::encoding::Depth,
16317 ) -> fidl::Result<()> {
16318 encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16319 self.0.encode(encoder, offset + 0, depth)?;
16323 Ok(())
16324 }
16325 }
16326
16327 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalStringWrapper {
16328 #[inline(always)]
16329 fn new_empty() -> Self {
16330 Self {
16331 str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
16332 }
16333 }
16334
16335 #[inline]
16336 unsafe fn decode(
16337 &mut self,
16338 decoder: &mut fidl::encoding::Decoder<'_, D>,
16339 offset: usize,
16340 _depth: fidl::encoding::Depth,
16341 ) -> fidl::Result<()> {
16342 decoder.debug_check_bounds::<Self>(offset);
16343 fidl::decode!(
16345 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
16346 D,
16347 &mut self.str,
16348 decoder,
16349 offset + 0,
16350 _depth
16351 )?;
16352 Ok(())
16353 }
16354 }
16355
16356 impl fidl::encoding::ValueTypeMarker for OptionalVectorWrapper {
16357 type Borrowed<'a> = &'a Self;
16358 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16359 value
16360 }
16361 }
16362
16363 unsafe impl fidl::encoding::TypeMarker for OptionalVectorWrapper {
16364 type Owned = Self;
16365
16366 #[inline(always)]
16367 fn inline_align(_context: fidl::encoding::Context) -> usize {
16368 8
16369 }
16370
16371 #[inline(always)]
16372 fn inline_size(_context: fidl::encoding::Context) -> usize {
16373 16
16374 }
16375 }
16376
16377 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalVectorWrapper, D>
16378 for &OptionalVectorWrapper
16379 {
16380 #[inline]
16381 unsafe fn encode(
16382 self,
16383 encoder: &mut fidl::encoding::Encoder<'_, D>,
16384 offset: usize,
16385 _depth: fidl::encoding::Depth,
16386 ) -> fidl::Result<()> {
16387 encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16388 fidl::encoding::Encode::<OptionalVectorWrapper, D>::encode(
16390 (
16391 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16392 ),
16393 encoder, offset, _depth
16394 )
16395 }
16396 }
16397 unsafe impl<
16398 D: fidl::encoding::ResourceDialect,
16399 T0: fidl::encoding::Encode<
16400 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16401 D,
16402 >,
16403 > fidl::encoding::Encode<OptionalVectorWrapper, D> for (T0,)
16404 {
16405 #[inline]
16406 unsafe fn encode(
16407 self,
16408 encoder: &mut fidl::encoding::Encoder<'_, D>,
16409 offset: usize,
16410 depth: fidl::encoding::Depth,
16411 ) -> fidl::Result<()> {
16412 encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16413 self.0.encode(encoder, offset + 0, depth)?;
16417 Ok(())
16418 }
16419 }
16420
16421 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalVectorWrapper {
16422 #[inline(always)]
16423 fn new_empty() -> Self {
16424 Self {
16425 v: fidl::new_empty!(
16426 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16427 D
16428 ),
16429 }
16430 }
16431
16432 #[inline]
16433 unsafe fn decode(
16434 &mut self,
16435 decoder: &mut fidl::encoding::Decoder<'_, D>,
16436 offset: usize,
16437 _depth: fidl::encoding::Depth,
16438 ) -> fidl::Result<()> {
16439 decoder.debug_check_bounds::<Self>(offset);
16440 fidl::decode!(
16442 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16443 D,
16444 &mut self.v,
16445 decoder,
16446 offset + 0,
16447 _depth
16448 )?;
16449 Ok(())
16450 }
16451 }
16452
16453 impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed4 {
16454 type Borrowed<'a> = &'a Self;
16455 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16456 value
16457 }
16458 }
16459
16460 unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed4 {
16461 type Owned = Self;
16462
16463 #[inline(always)]
16464 fn inline_align(_context: fidl::encoding::Context) -> usize {
16465 8
16466 }
16467
16468 #[inline(always)]
16469 fn inline_size(_context: fidl::encoding::Context) -> usize {
16470 16
16471 }
16472 }
16473
16474 unsafe impl<D: fidl::encoding::ResourceDialect>
16475 fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for &OutOfLinePaddingZeroed4
16476 {
16477 #[inline]
16478 unsafe fn encode(
16479 self,
16480 encoder: &mut fidl::encoding::Encoder<'_, D>,
16481 offset: usize,
16482 _depth: fidl::encoding::Depth,
16483 ) -> fidl::Result<()> {
16484 encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16485 fidl::encoding::Encode::<OutOfLinePaddingZeroed4, D>::encode(
16487 (
16488 <fidl::encoding::Boxed<Uint32Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16489 <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16490 ),
16491 encoder, offset, _depth
16492 )
16493 }
16494 }
16495 unsafe impl<
16496 D: fidl::encoding::ResourceDialect,
16497 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint32Struct>, D>,
16498 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16499 > fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for (T0, T1)
16500 {
16501 #[inline]
16502 unsafe fn encode(
16503 self,
16504 encoder: &mut fidl::encoding::Encoder<'_, D>,
16505 offset: usize,
16506 depth: fidl::encoding::Depth,
16507 ) -> fidl::Result<()> {
16508 encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16509 self.0.encode(encoder, offset + 0, depth)?;
16513 self.1.encode(encoder, offset + 8, depth)?;
16514 Ok(())
16515 }
16516 }
16517
16518 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16519 for OutOfLinePaddingZeroed4
16520 {
16521 #[inline(always)]
16522 fn new_empty() -> Self {
16523 Self {
16524 a: fidl::new_empty!(fidl::encoding::Boxed<Uint32Struct>, D),
16525 b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16526 }
16527 }
16528
16529 #[inline]
16530 unsafe fn decode(
16531 &mut self,
16532 decoder: &mut fidl::encoding::Decoder<'_, D>,
16533 offset: usize,
16534 _depth: fidl::encoding::Depth,
16535 ) -> fidl::Result<()> {
16536 decoder.debug_check_bounds::<Self>(offset);
16537 fidl::decode!(
16539 fidl::encoding::Boxed<Uint32Struct>,
16540 D,
16541 &mut self.a,
16542 decoder,
16543 offset + 0,
16544 _depth
16545 )?;
16546 fidl::decode!(
16547 fidl::encoding::Boxed<Uint64Struct>,
16548 D,
16549 &mut self.b,
16550 decoder,
16551 offset + 8,
16552 _depth
16553 )?;
16554 Ok(())
16555 }
16556 }
16557
16558 impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed6 {
16559 type Borrowed<'a> = &'a Self;
16560 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16561 value
16562 }
16563 }
16564
16565 unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed6 {
16566 type Owned = Self;
16567
16568 #[inline(always)]
16569 fn inline_align(_context: fidl::encoding::Context) -> usize {
16570 8
16571 }
16572
16573 #[inline(always)]
16574 fn inline_size(_context: fidl::encoding::Context) -> usize {
16575 16
16576 }
16577 }
16578
16579 unsafe impl<D: fidl::encoding::ResourceDialect>
16580 fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for &OutOfLinePaddingZeroed6
16581 {
16582 #[inline]
16583 unsafe fn encode(
16584 self,
16585 encoder: &mut fidl::encoding::Encoder<'_, D>,
16586 offset: usize,
16587 _depth: fidl::encoding::Depth,
16588 ) -> fidl::Result<()> {
16589 encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16590 fidl::encoding::Encode::<OutOfLinePaddingZeroed6, D>::encode(
16592 (
16593 <fidl::encoding::Boxed<Uint16Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16594 <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16595 ),
16596 encoder, offset, _depth
16597 )
16598 }
16599 }
16600 unsafe impl<
16601 D: fidl::encoding::ResourceDialect,
16602 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint16Struct>, D>,
16603 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16604 > fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for (T0, T1)
16605 {
16606 #[inline]
16607 unsafe fn encode(
16608 self,
16609 encoder: &mut fidl::encoding::Encoder<'_, D>,
16610 offset: usize,
16611 depth: fidl::encoding::Depth,
16612 ) -> fidl::Result<()> {
16613 encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16614 self.0.encode(encoder, offset + 0, depth)?;
16618 self.1.encode(encoder, offset + 8, depth)?;
16619 Ok(())
16620 }
16621 }
16622
16623 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16624 for OutOfLinePaddingZeroed6
16625 {
16626 #[inline(always)]
16627 fn new_empty() -> Self {
16628 Self {
16629 a: fidl::new_empty!(fidl::encoding::Boxed<Uint16Struct>, D),
16630 b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16631 }
16632 }
16633
16634 #[inline]
16635 unsafe fn decode(
16636 &mut self,
16637 decoder: &mut fidl::encoding::Decoder<'_, D>,
16638 offset: usize,
16639 _depth: fidl::encoding::Depth,
16640 ) -> fidl::Result<()> {
16641 decoder.debug_check_bounds::<Self>(offset);
16642 fidl::decode!(
16644 fidl::encoding::Boxed<Uint16Struct>,
16645 D,
16646 &mut self.a,
16647 decoder,
16648 offset + 0,
16649 _depth
16650 )?;
16651 fidl::decode!(
16652 fidl::encoding::Boxed<Uint64Struct>,
16653 D,
16654 &mut self.b,
16655 decoder,
16656 offset + 8,
16657 _depth
16658 )?;
16659 Ok(())
16660 }
16661 }
16662
16663 impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed7 {
16664 type Borrowed<'a> = &'a Self;
16665 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16666 value
16667 }
16668 }
16669
16670 unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed7 {
16671 type Owned = Self;
16672
16673 #[inline(always)]
16674 fn inline_align(_context: fidl::encoding::Context) -> usize {
16675 8
16676 }
16677
16678 #[inline(always)]
16679 fn inline_size(_context: fidl::encoding::Context) -> usize {
16680 16
16681 }
16682 }
16683
16684 unsafe impl<D: fidl::encoding::ResourceDialect>
16685 fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for &OutOfLinePaddingZeroed7
16686 {
16687 #[inline]
16688 unsafe fn encode(
16689 self,
16690 encoder: &mut fidl::encoding::Encoder<'_, D>,
16691 offset: usize,
16692 _depth: fidl::encoding::Depth,
16693 ) -> fidl::Result<()> {
16694 encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16695 fidl::encoding::Encode::<OutOfLinePaddingZeroed7, D>::encode(
16697 (
16698 <fidl::encoding::Boxed<Uint8Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16699 <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16700 ),
16701 encoder, offset, _depth
16702 )
16703 }
16704 }
16705 unsafe impl<
16706 D: fidl::encoding::ResourceDialect,
16707 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint8Struct>, D>,
16708 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16709 > fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for (T0, T1)
16710 {
16711 #[inline]
16712 unsafe fn encode(
16713 self,
16714 encoder: &mut fidl::encoding::Encoder<'_, D>,
16715 offset: usize,
16716 depth: fidl::encoding::Depth,
16717 ) -> fidl::Result<()> {
16718 encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16719 self.0.encode(encoder, offset + 0, depth)?;
16723 self.1.encode(encoder, offset + 8, depth)?;
16724 Ok(())
16725 }
16726 }
16727
16728 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16729 for OutOfLinePaddingZeroed7
16730 {
16731 #[inline(always)]
16732 fn new_empty() -> Self {
16733 Self {
16734 a: fidl::new_empty!(fidl::encoding::Boxed<Uint8Struct>, D),
16735 b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16736 }
16737 }
16738
16739 #[inline]
16740 unsafe fn decode(
16741 &mut self,
16742 decoder: &mut fidl::encoding::Decoder<'_, D>,
16743 offset: usize,
16744 _depth: fidl::encoding::Depth,
16745 ) -> fidl::Result<()> {
16746 decoder.debug_check_bounds::<Self>(offset);
16747 fidl::decode!(
16749 fidl::encoding::Boxed<Uint8Struct>,
16750 D,
16751 &mut self.a,
16752 decoder,
16753 offset + 0,
16754 _depth
16755 )?;
16756 fidl::decode!(
16757 fidl::encoding::Boxed<Uint64Struct>,
16758 D,
16759 &mut self.b,
16760 decoder,
16761 offset + 8,
16762 _depth
16763 )?;
16764 Ok(())
16765 }
16766 }
16767
16768 impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1 {
16769 type Borrowed<'a> = &'a Self;
16770 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16771 value
16772 }
16773 }
16774
16775 unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1 {
16776 type Owned = Self;
16777
16778 #[inline(always)]
16779 fn inline_align(_context: fidl::encoding::Context) -> usize {
16780 8
16781 }
16782
16783 #[inline(always)]
16784 fn inline_size(_context: fidl::encoding::Context) -> usize {
16785 48
16786 }
16787 }
16788
16789 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OutOfLineSandwich1, D>
16790 for &OutOfLineSandwich1
16791 {
16792 #[inline]
16793 unsafe fn encode(
16794 self,
16795 encoder: &mut fidl::encoding::Encoder<'_, D>,
16796 offset: usize,
16797 _depth: fidl::encoding::Depth,
16798 ) -> fidl::Result<()> {
16799 encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
16800 fidl::encoding::Encode::<OutOfLineSandwich1, D>::encode(
16802 (
16803 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
16804 <fidl::encoding::Vector<Sandwich1, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16805 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
16806 ),
16807 encoder, offset, _depth
16808 )
16809 }
16810 }
16811 unsafe impl<
16812 D: fidl::encoding::ResourceDialect,
16813 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16814 T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1, 1>, D>,
16815 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16816 > fidl::encoding::Encode<OutOfLineSandwich1, D> for (T0, T1, T2)
16817 {
16818 #[inline]
16819 unsafe fn encode(
16820 self,
16821 encoder: &mut fidl::encoding::Encoder<'_, D>,
16822 offset: usize,
16823 depth: fidl::encoding::Depth,
16824 ) -> fidl::Result<()> {
16825 encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
16826 self.0.encode(encoder, offset + 0, depth)?;
16830 self.1.encode(encoder, offset + 16, depth)?;
16831 self.2.encode(encoder, offset + 32, depth)?;
16832 Ok(())
16833 }
16834 }
16835
16836 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfLineSandwich1 {
16837 #[inline(always)]
16838 fn new_empty() -> Self {
16839 Self {
16840 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16841 v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1, 1>, D),
16842 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16843 }
16844 }
16845
16846 #[inline]
16847 unsafe fn decode(
16848 &mut self,
16849 decoder: &mut fidl::encoding::Decoder<'_, D>,
16850 offset: usize,
16851 _depth: fidl::encoding::Depth,
16852 ) -> fidl::Result<()> {
16853 decoder.debug_check_bounds::<Self>(offset);
16854 fidl::decode!(
16856 fidl::encoding::UnboundedString,
16857 D,
16858 &mut self.before,
16859 decoder,
16860 offset + 0,
16861 _depth
16862 )?;
16863 fidl::decode!(fidl::encoding::Vector<Sandwich1, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
16864 fidl::decode!(
16865 fidl::encoding::UnboundedString,
16866 D,
16867 &mut self.after,
16868 decoder,
16869 offset + 32,
16870 _depth
16871 )?;
16872 Ok(())
16873 }
16874 }
16875
16876 impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1WithOptUnion {
16877 type Borrowed<'a> = &'a Self;
16878 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16879 value
16880 }
16881 }
16882
16883 unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1WithOptUnion {
16884 type Owned = Self;
16885
16886 #[inline(always)]
16887 fn inline_align(_context: fidl::encoding::Context) -> usize {
16888 8
16889 }
16890
16891 #[inline(always)]
16892 fn inline_size(_context: fidl::encoding::Context) -> usize {
16893 48
16894 }
16895 }
16896
16897 unsafe impl<D: fidl::encoding::ResourceDialect>
16898 fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D>
16899 for &OutOfLineSandwich1WithOptUnion
16900 {
16901 #[inline]
16902 unsafe fn encode(
16903 self,
16904 encoder: &mut fidl::encoding::Encoder<'_, D>,
16905 offset: usize,
16906 _depth: fidl::encoding::Depth,
16907 ) -> fidl::Result<()> {
16908 encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
16909 fidl::encoding::Encode::<OutOfLineSandwich1WithOptUnion, D>::encode(
16911 (
16912 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
16913 <fidl::encoding::Vector<Sandwich1WithOptUnion, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16914 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
16915 ),
16916 encoder, offset, _depth
16917 )
16918 }
16919 }
16920 unsafe impl<
16921 D: fidl::encoding::ResourceDialect,
16922 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16923 T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D>,
16924 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16925 > fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D> for (T0, T1, T2)
16926 {
16927 #[inline]
16928 unsafe fn encode(
16929 self,
16930 encoder: &mut fidl::encoding::Encoder<'_, D>,
16931 offset: usize,
16932 depth: fidl::encoding::Depth,
16933 ) -> fidl::Result<()> {
16934 encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
16935 self.0.encode(encoder, offset + 0, depth)?;
16939 self.1.encode(encoder, offset + 16, depth)?;
16940 self.2.encode(encoder, offset + 32, depth)?;
16941 Ok(())
16942 }
16943 }
16944
16945 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16946 for OutOfLineSandwich1WithOptUnion
16947 {
16948 #[inline(always)]
16949 fn new_empty() -> Self {
16950 Self {
16951 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16952 v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D),
16953 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16954 }
16955 }
16956
16957 #[inline]
16958 unsafe fn decode(
16959 &mut self,
16960 decoder: &mut fidl::encoding::Decoder<'_, D>,
16961 offset: usize,
16962 _depth: fidl::encoding::Depth,
16963 ) -> fidl::Result<()> {
16964 decoder.debug_check_bounds::<Self>(offset);
16965 fidl::decode!(
16967 fidl::encoding::UnboundedString,
16968 D,
16969 &mut self.before,
16970 decoder,
16971 offset + 0,
16972 _depth
16973 )?;
16974 fidl::decode!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
16975 fidl::decode!(
16976 fidl::encoding::UnboundedString,
16977 D,
16978 &mut self.after,
16979 decoder,
16980 offset + 32,
16981 _depth
16982 )?;
16983 Ok(())
16984 }
16985 }
16986
16987 impl fidl::encoding::ValueTypeMarker for PaddedTableStruct {
16988 type Borrowed<'a> = &'a Self;
16989 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16990 value
16991 }
16992 }
16993
16994 unsafe impl fidl::encoding::TypeMarker for PaddedTableStruct {
16995 type Owned = Self;
16996
16997 #[inline(always)]
16998 fn inline_align(_context: fidl::encoding::Context) -> usize {
16999 8
17000 }
17001
17002 #[inline(always)]
17003 fn inline_size(_context: fidl::encoding::Context) -> usize {
17004 16
17005 }
17006 }
17007
17008 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTableStruct, D>
17009 for &PaddedTableStruct
17010 {
17011 #[inline]
17012 unsafe fn encode(
17013 self,
17014 encoder: &mut fidl::encoding::Encoder<'_, D>,
17015 offset: usize,
17016 _depth: fidl::encoding::Depth,
17017 ) -> fidl::Result<()> {
17018 encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17019 fidl::encoding::Encode::<PaddedTableStruct, D>::encode(
17021 (<PaddedTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
17022 encoder,
17023 offset,
17024 _depth,
17025 )
17026 }
17027 }
17028 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedTable, D>>
17029 fidl::encoding::Encode<PaddedTableStruct, D> for (T0,)
17030 {
17031 #[inline]
17032 unsafe fn encode(
17033 self,
17034 encoder: &mut fidl::encoding::Encoder<'_, D>,
17035 offset: usize,
17036 depth: fidl::encoding::Depth,
17037 ) -> fidl::Result<()> {
17038 encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17039 self.0.encode(encoder, offset + 0, depth)?;
17043 Ok(())
17044 }
17045 }
17046
17047 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTableStruct {
17048 #[inline(always)]
17049 fn new_empty() -> Self {
17050 Self { t: fidl::new_empty!(PaddedTable, D) }
17051 }
17052
17053 #[inline]
17054 unsafe fn decode(
17055 &mut self,
17056 decoder: &mut fidl::encoding::Decoder<'_, D>,
17057 offset: usize,
17058 _depth: fidl::encoding::Depth,
17059 ) -> fidl::Result<()> {
17060 decoder.debug_check_bounds::<Self>(offset);
17061 fidl::decode!(PaddedTable, D, &mut self.t, decoder, offset + 0, _depth)?;
17063 Ok(())
17064 }
17065 }
17066
17067 impl fidl::encoding::ValueTypeMarker for PaddedUnionStruct {
17068 type Borrowed<'a> = &'a Self;
17069 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17070 value
17071 }
17072 }
17073
17074 unsafe impl fidl::encoding::TypeMarker for PaddedUnionStruct {
17075 type Owned = Self;
17076
17077 #[inline(always)]
17078 fn inline_align(_context: fidl::encoding::Context) -> usize {
17079 8
17080 }
17081
17082 #[inline(always)]
17083 fn inline_size(_context: fidl::encoding::Context) -> usize {
17084 16
17085 }
17086 }
17087
17088 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnionStruct, D>
17089 for &PaddedUnionStruct
17090 {
17091 #[inline]
17092 unsafe fn encode(
17093 self,
17094 encoder: &mut fidl::encoding::Encoder<'_, D>,
17095 offset: usize,
17096 _depth: fidl::encoding::Depth,
17097 ) -> fidl::Result<()> {
17098 encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17099 fidl::encoding::Encode::<PaddedUnionStruct, D>::encode(
17101 (<PaddedUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
17102 encoder,
17103 offset,
17104 _depth,
17105 )
17106 }
17107 }
17108 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedUnion, D>>
17109 fidl::encoding::Encode<PaddedUnionStruct, D> for (T0,)
17110 {
17111 #[inline]
17112 unsafe fn encode(
17113 self,
17114 encoder: &mut fidl::encoding::Encoder<'_, D>,
17115 offset: usize,
17116 depth: fidl::encoding::Depth,
17117 ) -> fidl::Result<()> {
17118 encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17119 self.0.encode(encoder, offset + 0, depth)?;
17123 Ok(())
17124 }
17125 }
17126
17127 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnionStruct {
17128 #[inline(always)]
17129 fn new_empty() -> Self {
17130 Self { u: fidl::new_empty!(PaddedUnion, D) }
17131 }
17132
17133 #[inline]
17134 unsafe fn decode(
17135 &mut self,
17136 decoder: &mut fidl::encoding::Decoder<'_, D>,
17137 offset: usize,
17138 _depth: fidl::encoding::Depth,
17139 ) -> fidl::Result<()> {
17140 decoder.debug_check_bounds::<Self>(offset);
17141 fidl::decode!(PaddedUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
17143 Ok(())
17144 }
17145 }
17146
17147 impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17148 type Borrowed<'a> = &'a Self;
17149 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17150 value
17151 }
17152 }
17153
17154 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17155 type Owned = Self;
17156
17157 #[inline(always)]
17158 fn inline_align(_context: fidl::encoding::Context) -> usize {
17159 2
17160 }
17161
17162 #[inline(always)]
17163 fn inline_size(_context: fidl::encoding::Context) -> usize {
17164 6
17165 }
17166 }
17167
17168 unsafe impl<D: fidl::encoding::ResourceDialect>
17169 fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D>
17170 for &PaddingAlignment2MaskMayBe4Bytes
17171 {
17172 #[inline]
17173 unsafe fn encode(
17174 self,
17175 encoder: &mut fidl::encoding::Encoder<'_, D>,
17176 offset: usize,
17177 _depth: fidl::encoding::Depth,
17178 ) -> fidl::Result<()> {
17179 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17180 unsafe {
17181 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17183 (buf_ptr as *mut PaddingAlignment2MaskMayBe4Bytes)
17184 .write_unaligned((self as *const PaddingAlignment2MaskMayBe4Bytes).read());
17185 let padding_ptr = buf_ptr.offset(0) as *mut u16;
17188 let padding_mask = 0xff00u16;
17189 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17190 }
17191 Ok(())
17192 }
17193 }
17194 unsafe impl<
17195 D: fidl::encoding::ResourceDialect,
17196 T0: fidl::encoding::Encode<u8, D>,
17197 T1: fidl::encoding::Encode<u16, D>,
17198 T2: fidl::encoding::Encode<u16, D>,
17199 > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D> for (T0, T1, T2)
17200 {
17201 #[inline]
17202 unsafe fn encode(
17203 self,
17204 encoder: &mut fidl::encoding::Encoder<'_, D>,
17205 offset: usize,
17206 depth: fidl::encoding::Depth,
17207 ) -> fidl::Result<()> {
17208 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17209 unsafe {
17212 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17213 (ptr as *mut u16).write_unaligned(0);
17214 }
17215 self.0.encode(encoder, offset + 0, depth)?;
17217 self.1.encode(encoder, offset + 2, depth)?;
17218 self.2.encode(encoder, offset + 4, depth)?;
17219 Ok(())
17220 }
17221 }
17222
17223 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17224 for PaddingAlignment2MaskMayBe4Bytes
17225 {
17226 #[inline(always)]
17227 fn new_empty() -> Self {
17228 Self {
17229 a: fidl::new_empty!(u8, D),
17230 b: fidl::new_empty!(u16, D),
17231 c: fidl::new_empty!(u16, D),
17232 }
17233 }
17234
17235 #[inline]
17236 unsafe fn decode(
17237 &mut self,
17238 decoder: &mut fidl::encoding::Decoder<'_, D>,
17239 offset: usize,
17240 _depth: fidl::encoding::Depth,
17241 ) -> fidl::Result<()> {
17242 decoder.debug_check_bounds::<Self>(offset);
17243 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17244 let ptr = unsafe { buf_ptr.offset(0) };
17246 let padval = unsafe { (ptr as *const u16).read_unaligned() };
17247 let mask = 0xff00u16;
17248 let maskedval = padval & mask;
17249 if maskedval != 0 {
17250 return Err(fidl::Error::NonZeroPadding {
17251 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17252 });
17253 }
17254 unsafe {
17256 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
17257 }
17258 Ok(())
17259 }
17260 }
17261
17262 impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17263 type Borrowed<'a> = &'a Self;
17264 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17265 value
17266 }
17267 }
17268
17269 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17270 type Owned = Self;
17271
17272 #[inline(always)]
17273 fn inline_align(_context: fidl::encoding::Context) -> usize {
17274 8
17275 }
17276
17277 #[inline(always)]
17278 fn inline_size(_context: fidl::encoding::Context) -> usize {
17279 16
17280 }
17281 }
17282
17283 unsafe impl<D: fidl::encoding::ResourceDialect>
17284 fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D>
17285 for &PaddingAlignment2MaskMayBe4BytesVector
17286 {
17287 #[inline]
17288 unsafe fn encode(
17289 self,
17290 encoder: &mut fidl::encoding::Encoder<'_, D>,
17291 offset: usize,
17292 _depth: fidl::encoding::Depth,
17293 ) -> fidl::Result<()> {
17294 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17295 fidl::encoding::Encode::<PaddingAlignment2MaskMayBe4BytesVector, D>::encode(
17297 (
17298 <fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17299 ),
17300 encoder, offset, _depth
17301 )
17302 }
17303 }
17304 unsafe impl<
17305 D: fidl::encoding::ResourceDialect,
17306 T0: fidl::encoding::Encode<
17307 fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17308 D,
17309 >,
17310 > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D> for (T0,)
17311 {
17312 #[inline]
17313 unsafe fn encode(
17314 self,
17315 encoder: &mut fidl::encoding::Encoder<'_, D>,
17316 offset: usize,
17317 depth: fidl::encoding::Depth,
17318 ) -> fidl::Result<()> {
17319 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17320 self.0.encode(encoder, offset + 0, depth)?;
17324 Ok(())
17325 }
17326 }
17327
17328 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17329 for PaddingAlignment2MaskMayBe4BytesVector
17330 {
17331 #[inline(always)]
17332 fn new_empty() -> Self {
17333 Self {
17334 v: fidl::new_empty!(
17335 fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17336 D
17337 ),
17338 }
17339 }
17340
17341 #[inline]
17342 unsafe fn decode(
17343 &mut self,
17344 decoder: &mut fidl::encoding::Decoder<'_, D>,
17345 offset: usize,
17346 _depth: fidl::encoding::Depth,
17347 ) -> fidl::Result<()> {
17348 decoder.debug_check_bounds::<Self>(offset);
17349 fidl::decode!(
17351 fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17352 D,
17353 &mut self.v,
17354 decoder,
17355 offset + 0,
17356 _depth
17357 )?;
17358 Ok(())
17359 }
17360 }
17361
17362 impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17363 type Borrowed<'a> = &'a Self;
17364 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17365 value
17366 }
17367 }
17368
17369 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17370 type Owned = Self;
17371
17372 #[inline(always)]
17373 fn inline_align(_context: fidl::encoding::Context) -> usize {
17374 4
17375 }
17376
17377 #[inline(always)]
17378 fn inline_size(_context: fidl::encoding::Context) -> usize {
17379 12
17380 }
17381 }
17382
17383 unsafe impl<D: fidl::encoding::ResourceDialect>
17384 fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D>
17385 for &PaddingAlignment4MaskMayBe8Bytes
17386 {
17387 #[inline]
17388 unsafe fn encode(
17389 self,
17390 encoder: &mut fidl::encoding::Encoder<'_, D>,
17391 offset: usize,
17392 _depth: fidl::encoding::Depth,
17393 ) -> fidl::Result<()> {
17394 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17395 unsafe {
17396 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17398 (buf_ptr as *mut PaddingAlignment4MaskMayBe8Bytes)
17399 .write_unaligned((self as *const PaddingAlignment4MaskMayBe8Bytes).read());
17400 let padding_ptr = buf_ptr.offset(0) as *mut u32;
17403 let padding_mask = 0xffffff00u32;
17404 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17405 }
17406 Ok(())
17407 }
17408 }
17409 unsafe impl<
17410 D: fidl::encoding::ResourceDialect,
17411 T0: fidl::encoding::Encode<u8, D>,
17412 T1: fidl::encoding::Encode<u32, D>,
17413 T2: fidl::encoding::Encode<u32, D>,
17414 > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D> for (T0, T1, T2)
17415 {
17416 #[inline]
17417 unsafe fn encode(
17418 self,
17419 encoder: &mut fidl::encoding::Encoder<'_, D>,
17420 offset: usize,
17421 depth: fidl::encoding::Depth,
17422 ) -> fidl::Result<()> {
17423 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17424 unsafe {
17427 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17428 (ptr as *mut u32).write_unaligned(0);
17429 }
17430 self.0.encode(encoder, offset + 0, depth)?;
17432 self.1.encode(encoder, offset + 4, depth)?;
17433 self.2.encode(encoder, offset + 8, depth)?;
17434 Ok(())
17435 }
17436 }
17437
17438 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17439 for PaddingAlignment4MaskMayBe8Bytes
17440 {
17441 #[inline(always)]
17442 fn new_empty() -> Self {
17443 Self {
17444 a: fidl::new_empty!(u8, D),
17445 b: fidl::new_empty!(u32, D),
17446 c: fidl::new_empty!(u32, D),
17447 }
17448 }
17449
17450 #[inline]
17451 unsafe fn decode(
17452 &mut self,
17453 decoder: &mut fidl::encoding::Decoder<'_, D>,
17454 offset: usize,
17455 _depth: fidl::encoding::Depth,
17456 ) -> fidl::Result<()> {
17457 decoder.debug_check_bounds::<Self>(offset);
17458 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17459 let ptr = unsafe { buf_ptr.offset(0) };
17461 let padval = unsafe { (ptr as *const u32).read_unaligned() };
17462 let mask = 0xffffff00u32;
17463 let maskedval = padval & mask;
17464 if maskedval != 0 {
17465 return Err(fidl::Error::NonZeroPadding {
17466 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17467 });
17468 }
17469 unsafe {
17471 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
17472 }
17473 Ok(())
17474 }
17475 }
17476
17477 impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17478 type Borrowed<'a> = &'a Self;
17479 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17480 value
17481 }
17482 }
17483
17484 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17485 type Owned = Self;
17486
17487 #[inline(always)]
17488 fn inline_align(_context: fidl::encoding::Context) -> usize {
17489 8
17490 }
17491
17492 #[inline(always)]
17493 fn inline_size(_context: fidl::encoding::Context) -> usize {
17494 16
17495 }
17496 }
17497
17498 unsafe impl<D: fidl::encoding::ResourceDialect>
17499 fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D>
17500 for &PaddingAlignment4MaskMayBe8BytesVector
17501 {
17502 #[inline]
17503 unsafe fn encode(
17504 self,
17505 encoder: &mut fidl::encoding::Encoder<'_, D>,
17506 offset: usize,
17507 _depth: fidl::encoding::Depth,
17508 ) -> fidl::Result<()> {
17509 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17510 fidl::encoding::Encode::<PaddingAlignment4MaskMayBe8BytesVector, D>::encode(
17512 (
17513 <fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17514 ),
17515 encoder, offset, _depth
17516 )
17517 }
17518 }
17519 unsafe impl<
17520 D: fidl::encoding::ResourceDialect,
17521 T0: fidl::encoding::Encode<
17522 fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17523 D,
17524 >,
17525 > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D> for (T0,)
17526 {
17527 #[inline]
17528 unsafe fn encode(
17529 self,
17530 encoder: &mut fidl::encoding::Encoder<'_, D>,
17531 offset: usize,
17532 depth: fidl::encoding::Depth,
17533 ) -> fidl::Result<()> {
17534 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17535 self.0.encode(encoder, offset + 0, depth)?;
17539 Ok(())
17540 }
17541 }
17542
17543 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17544 for PaddingAlignment4MaskMayBe8BytesVector
17545 {
17546 #[inline(always)]
17547 fn new_empty() -> Self {
17548 Self {
17549 v: fidl::new_empty!(
17550 fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17551 D
17552 ),
17553 }
17554 }
17555
17556 #[inline]
17557 unsafe fn decode(
17558 &mut self,
17559 decoder: &mut fidl::encoding::Decoder<'_, D>,
17560 offset: usize,
17561 _depth: fidl::encoding::Depth,
17562 ) -> fidl::Result<()> {
17563 decoder.debug_check_bounds::<Self>(offset);
17564 fidl::decode!(
17566 fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17567 D,
17568 &mut self.v,
17569 decoder,
17570 offset + 0,
17571 _depth
17572 )?;
17573 Ok(())
17574 }
17575 }
17576
17577 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int32 {
17578 type Borrowed<'a> = &'a Self;
17579 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17580 value
17581 }
17582 }
17583
17584 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int32 {
17585 type Owned = Self;
17586
17587 #[inline(always)]
17588 fn inline_align(_context: fidl::encoding::Context) -> usize {
17589 4
17590 }
17591
17592 #[inline(always)]
17593 fn inline_size(_context: fidl::encoding::Context) -> usize {
17594 8
17595 }
17596 }
17597
17598 unsafe impl<D: fidl::encoding::ResourceDialect>
17599 fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D>
17600 for &PaddingBetweenFieldsInt16Int32
17601 {
17602 #[inline]
17603 unsafe fn encode(
17604 self,
17605 encoder: &mut fidl::encoding::Encoder<'_, D>,
17606 offset: usize,
17607 _depth: fidl::encoding::Depth,
17608 ) -> fidl::Result<()> {
17609 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17610 unsafe {
17611 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17613 (buf_ptr as *mut PaddingBetweenFieldsInt16Int32)
17614 .write_unaligned((self as *const PaddingBetweenFieldsInt16Int32).read());
17615 let padding_ptr = buf_ptr.offset(0) as *mut u32;
17618 let padding_mask = 0xffff0000u32;
17619 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17620 }
17621 Ok(())
17622 }
17623 }
17624 unsafe impl<
17625 D: fidl::encoding::ResourceDialect,
17626 T0: fidl::encoding::Encode<i16, D>,
17627 T1: fidl::encoding::Encode<i32, D>,
17628 > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D> for (T0, T1)
17629 {
17630 #[inline]
17631 unsafe fn encode(
17632 self,
17633 encoder: &mut fidl::encoding::Encoder<'_, D>,
17634 offset: usize,
17635 depth: fidl::encoding::Depth,
17636 ) -> fidl::Result<()> {
17637 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17638 unsafe {
17641 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17642 (ptr as *mut u32).write_unaligned(0);
17643 }
17644 self.0.encode(encoder, offset + 0, depth)?;
17646 self.1.encode(encoder, offset + 4, depth)?;
17647 Ok(())
17648 }
17649 }
17650
17651 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17652 for PaddingBetweenFieldsInt16Int32
17653 {
17654 #[inline(always)]
17655 fn new_empty() -> Self {
17656 Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i32, D) }
17657 }
17658
17659 #[inline]
17660 unsafe fn decode(
17661 &mut self,
17662 decoder: &mut fidl::encoding::Decoder<'_, D>,
17663 offset: usize,
17664 _depth: fidl::encoding::Depth,
17665 ) -> fidl::Result<()> {
17666 decoder.debug_check_bounds::<Self>(offset);
17667 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17668 let ptr = unsafe { buf_ptr.offset(0) };
17670 let padval = unsafe { (ptr as *const u32).read_unaligned() };
17671 let mask = 0xffff0000u32;
17672 let maskedval = padval & mask;
17673 if maskedval != 0 {
17674 return Err(fidl::Error::NonZeroPadding {
17675 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17676 });
17677 }
17678 unsafe {
17680 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
17681 }
17682 Ok(())
17683 }
17684 }
17685
17686 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int64 {
17687 type Borrowed<'a> = &'a Self;
17688 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17689 value
17690 }
17691 }
17692
17693 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int64 {
17694 type Owned = Self;
17695
17696 #[inline(always)]
17697 fn inline_align(_context: fidl::encoding::Context) -> usize {
17698 8
17699 }
17700
17701 #[inline(always)]
17702 fn inline_size(_context: fidl::encoding::Context) -> usize {
17703 16
17704 }
17705 }
17706
17707 unsafe impl<D: fidl::encoding::ResourceDialect>
17708 fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D>
17709 for &PaddingBetweenFieldsInt16Int64
17710 {
17711 #[inline]
17712 unsafe fn encode(
17713 self,
17714 encoder: &mut fidl::encoding::Encoder<'_, D>,
17715 offset: usize,
17716 _depth: fidl::encoding::Depth,
17717 ) -> fidl::Result<()> {
17718 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17719 unsafe {
17720 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17722 (buf_ptr as *mut PaddingBetweenFieldsInt16Int64)
17723 .write_unaligned((self as *const PaddingBetweenFieldsInt16Int64).read());
17724 let padding_ptr = buf_ptr.offset(0) as *mut u64;
17727 let padding_mask = 0xffffffffffff0000u64;
17728 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17729 }
17730 Ok(())
17731 }
17732 }
17733 unsafe impl<
17734 D: fidl::encoding::ResourceDialect,
17735 T0: fidl::encoding::Encode<i16, D>,
17736 T1: fidl::encoding::Encode<i64, D>,
17737 > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D> for (T0, T1)
17738 {
17739 #[inline]
17740 unsafe fn encode(
17741 self,
17742 encoder: &mut fidl::encoding::Encoder<'_, D>,
17743 offset: usize,
17744 depth: fidl::encoding::Depth,
17745 ) -> fidl::Result<()> {
17746 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17747 unsafe {
17750 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17751 (ptr as *mut u64).write_unaligned(0);
17752 }
17753 self.0.encode(encoder, offset + 0, depth)?;
17755 self.1.encode(encoder, offset + 8, depth)?;
17756 Ok(())
17757 }
17758 }
17759
17760 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17761 for PaddingBetweenFieldsInt16Int64
17762 {
17763 #[inline(always)]
17764 fn new_empty() -> Self {
17765 Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i64, D) }
17766 }
17767
17768 #[inline]
17769 unsafe fn decode(
17770 &mut self,
17771 decoder: &mut fidl::encoding::Decoder<'_, D>,
17772 offset: usize,
17773 _depth: fidl::encoding::Depth,
17774 ) -> fidl::Result<()> {
17775 decoder.debug_check_bounds::<Self>(offset);
17776 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17777 let ptr = unsafe { buf_ptr.offset(0) };
17779 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17780 let mask = 0xffffffffffff0000u64;
17781 let maskedval = padval & mask;
17782 if maskedval != 0 {
17783 return Err(fidl::Error::NonZeroPadding {
17784 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17785 });
17786 }
17787 unsafe {
17789 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
17790 }
17791 Ok(())
17792 }
17793 }
17794
17795 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt32Int64 {
17796 type Borrowed<'a> = &'a Self;
17797 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17798 value
17799 }
17800 }
17801
17802 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt32Int64 {
17803 type Owned = Self;
17804
17805 #[inline(always)]
17806 fn inline_align(_context: fidl::encoding::Context) -> usize {
17807 8
17808 }
17809
17810 #[inline(always)]
17811 fn inline_size(_context: fidl::encoding::Context) -> usize {
17812 16
17813 }
17814 }
17815
17816 unsafe impl<D: fidl::encoding::ResourceDialect>
17817 fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D>
17818 for &PaddingBetweenFieldsInt32Int64
17819 {
17820 #[inline]
17821 unsafe fn encode(
17822 self,
17823 encoder: &mut fidl::encoding::Encoder<'_, D>,
17824 offset: usize,
17825 _depth: fidl::encoding::Depth,
17826 ) -> fidl::Result<()> {
17827 encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
17828 unsafe {
17829 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17831 (buf_ptr as *mut PaddingBetweenFieldsInt32Int64)
17832 .write_unaligned((self as *const PaddingBetweenFieldsInt32Int64).read());
17833 let padding_ptr = buf_ptr.offset(0) as *mut u64;
17836 let padding_mask = 0xffffffff00000000u64;
17837 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17838 }
17839 Ok(())
17840 }
17841 }
17842 unsafe impl<
17843 D: fidl::encoding::ResourceDialect,
17844 T0: fidl::encoding::Encode<i32, D>,
17845 T1: fidl::encoding::Encode<i64, D>,
17846 > fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D> for (T0, T1)
17847 {
17848 #[inline]
17849 unsafe fn encode(
17850 self,
17851 encoder: &mut fidl::encoding::Encoder<'_, D>,
17852 offset: usize,
17853 depth: fidl::encoding::Depth,
17854 ) -> fidl::Result<()> {
17855 encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
17856 unsafe {
17859 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17860 (ptr as *mut u64).write_unaligned(0);
17861 }
17862 self.0.encode(encoder, offset + 0, depth)?;
17864 self.1.encode(encoder, offset + 8, depth)?;
17865 Ok(())
17866 }
17867 }
17868
17869 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17870 for PaddingBetweenFieldsInt32Int64
17871 {
17872 #[inline(always)]
17873 fn new_empty() -> Self {
17874 Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i64, D) }
17875 }
17876
17877 #[inline]
17878 unsafe fn decode(
17879 &mut self,
17880 decoder: &mut fidl::encoding::Decoder<'_, D>,
17881 offset: usize,
17882 _depth: fidl::encoding::Depth,
17883 ) -> fidl::Result<()> {
17884 decoder.debug_check_bounds::<Self>(offset);
17885 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17886 let ptr = unsafe { buf_ptr.offset(0) };
17888 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17889 let mask = 0xffffffff00000000u64;
17890 let maskedval = padval & mask;
17891 if maskedval != 0 {
17892 return Err(fidl::Error::NonZeroPadding {
17893 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17894 });
17895 }
17896 unsafe {
17898 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
17899 }
17900 Ok(())
17901 }
17902 }
17903
17904 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int16 {
17905 type Borrowed<'a> = &'a Self;
17906 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17907 value
17908 }
17909 }
17910
17911 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int16 {
17912 type Owned = Self;
17913
17914 #[inline(always)]
17915 fn inline_align(_context: fidl::encoding::Context) -> usize {
17916 2
17917 }
17918
17919 #[inline(always)]
17920 fn inline_size(_context: fidl::encoding::Context) -> usize {
17921 4
17922 }
17923 }
17924
17925 unsafe impl<D: fidl::encoding::ResourceDialect>
17926 fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D>
17927 for &PaddingBetweenFieldsInt8Int16
17928 {
17929 #[inline]
17930 unsafe fn encode(
17931 self,
17932 encoder: &mut fidl::encoding::Encoder<'_, D>,
17933 offset: usize,
17934 _depth: fidl::encoding::Depth,
17935 ) -> fidl::Result<()> {
17936 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
17937 unsafe {
17938 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17940 (buf_ptr as *mut PaddingBetweenFieldsInt8Int16)
17941 .write_unaligned((self as *const PaddingBetweenFieldsInt8Int16).read());
17942 let padding_ptr = buf_ptr.offset(0) as *mut u16;
17945 let padding_mask = 0xff00u16;
17946 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17947 }
17948 Ok(())
17949 }
17950 }
17951 unsafe impl<
17952 D: fidl::encoding::ResourceDialect,
17953 T0: fidl::encoding::Encode<i8, D>,
17954 T1: fidl::encoding::Encode<i16, D>,
17955 > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D> for (T0, T1)
17956 {
17957 #[inline]
17958 unsafe fn encode(
17959 self,
17960 encoder: &mut fidl::encoding::Encoder<'_, D>,
17961 offset: usize,
17962 depth: fidl::encoding::Depth,
17963 ) -> fidl::Result<()> {
17964 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
17965 unsafe {
17968 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17969 (ptr as *mut u16).write_unaligned(0);
17970 }
17971 self.0.encode(encoder, offset + 0, depth)?;
17973 self.1.encode(encoder, offset + 2, depth)?;
17974 Ok(())
17975 }
17976 }
17977
17978 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17979 for PaddingBetweenFieldsInt8Int16
17980 {
17981 #[inline(always)]
17982 fn new_empty() -> Self {
17983 Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i16, D) }
17984 }
17985
17986 #[inline]
17987 unsafe fn decode(
17988 &mut self,
17989 decoder: &mut fidl::encoding::Decoder<'_, D>,
17990 offset: usize,
17991 _depth: fidl::encoding::Depth,
17992 ) -> fidl::Result<()> {
17993 decoder.debug_check_bounds::<Self>(offset);
17994 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17995 let ptr = unsafe { buf_ptr.offset(0) };
17997 let padval = unsafe { (ptr as *const u16).read_unaligned() };
17998 let mask = 0xff00u16;
17999 let maskedval = padval & mask;
18000 if maskedval != 0 {
18001 return Err(fidl::Error::NonZeroPadding {
18002 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18003 });
18004 }
18005 unsafe {
18007 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18008 }
18009 Ok(())
18010 }
18011 }
18012
18013 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int32 {
18014 type Borrowed<'a> = &'a Self;
18015 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18016 value
18017 }
18018 }
18019
18020 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int32 {
18021 type Owned = Self;
18022
18023 #[inline(always)]
18024 fn inline_align(_context: fidl::encoding::Context) -> usize {
18025 4
18026 }
18027
18028 #[inline(always)]
18029 fn inline_size(_context: fidl::encoding::Context) -> usize {
18030 8
18031 }
18032 }
18033
18034 unsafe impl<D: fidl::encoding::ResourceDialect>
18035 fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D>
18036 for &PaddingBetweenFieldsInt8Int32
18037 {
18038 #[inline]
18039 unsafe fn encode(
18040 self,
18041 encoder: &mut fidl::encoding::Encoder<'_, D>,
18042 offset: usize,
18043 _depth: fidl::encoding::Depth,
18044 ) -> fidl::Result<()> {
18045 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18046 unsafe {
18047 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18049 (buf_ptr as *mut PaddingBetweenFieldsInt8Int32)
18050 .write_unaligned((self as *const PaddingBetweenFieldsInt8Int32).read());
18051 let padding_ptr = buf_ptr.offset(0) as *mut u32;
18054 let padding_mask = 0xffffff00u32;
18055 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18056 }
18057 Ok(())
18058 }
18059 }
18060 unsafe impl<
18061 D: fidl::encoding::ResourceDialect,
18062 T0: fidl::encoding::Encode<i8, D>,
18063 T1: fidl::encoding::Encode<i32, D>,
18064 > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D> for (T0, T1)
18065 {
18066 #[inline]
18067 unsafe fn encode(
18068 self,
18069 encoder: &mut fidl::encoding::Encoder<'_, D>,
18070 offset: usize,
18071 depth: fidl::encoding::Depth,
18072 ) -> fidl::Result<()> {
18073 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18074 unsafe {
18077 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18078 (ptr as *mut u32).write_unaligned(0);
18079 }
18080 self.0.encode(encoder, offset + 0, depth)?;
18082 self.1.encode(encoder, offset + 4, depth)?;
18083 Ok(())
18084 }
18085 }
18086
18087 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18088 for PaddingBetweenFieldsInt8Int32
18089 {
18090 #[inline(always)]
18091 fn new_empty() -> Self {
18092 Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i32, D) }
18093 }
18094
18095 #[inline]
18096 unsafe fn decode(
18097 &mut self,
18098 decoder: &mut fidl::encoding::Decoder<'_, D>,
18099 offset: usize,
18100 _depth: fidl::encoding::Depth,
18101 ) -> fidl::Result<()> {
18102 decoder.debug_check_bounds::<Self>(offset);
18103 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18104 let ptr = unsafe { buf_ptr.offset(0) };
18106 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18107 let mask = 0xffffff00u32;
18108 let maskedval = padval & mask;
18109 if maskedval != 0 {
18110 return Err(fidl::Error::NonZeroPadding {
18111 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18112 });
18113 }
18114 unsafe {
18116 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18117 }
18118 Ok(())
18119 }
18120 }
18121
18122 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int64 {
18123 type Borrowed<'a> = &'a Self;
18124 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18125 value
18126 }
18127 }
18128
18129 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int64 {
18130 type Owned = Self;
18131
18132 #[inline(always)]
18133 fn inline_align(_context: fidl::encoding::Context) -> usize {
18134 8
18135 }
18136
18137 #[inline(always)]
18138 fn inline_size(_context: fidl::encoding::Context) -> usize {
18139 16
18140 }
18141 }
18142
18143 unsafe impl<D: fidl::encoding::ResourceDialect>
18144 fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D>
18145 for &PaddingBetweenFieldsInt8Int64
18146 {
18147 #[inline]
18148 unsafe fn encode(
18149 self,
18150 encoder: &mut fidl::encoding::Encoder<'_, D>,
18151 offset: usize,
18152 _depth: fidl::encoding::Depth,
18153 ) -> fidl::Result<()> {
18154 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18155 unsafe {
18156 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18158 (buf_ptr as *mut PaddingBetweenFieldsInt8Int64)
18159 .write_unaligned((self as *const PaddingBetweenFieldsInt8Int64).read());
18160 let padding_ptr = buf_ptr.offset(0) as *mut u64;
18163 let padding_mask = 0xffffffffffffff00u64;
18164 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18165 }
18166 Ok(())
18167 }
18168 }
18169 unsafe impl<
18170 D: fidl::encoding::ResourceDialect,
18171 T0: fidl::encoding::Encode<i8, D>,
18172 T1: fidl::encoding::Encode<i64, D>,
18173 > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D> for (T0, T1)
18174 {
18175 #[inline]
18176 unsafe fn encode(
18177 self,
18178 encoder: &mut fidl::encoding::Encoder<'_, D>,
18179 offset: usize,
18180 depth: fidl::encoding::Depth,
18181 ) -> fidl::Result<()> {
18182 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18183 unsafe {
18186 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18187 (ptr as *mut u64).write_unaligned(0);
18188 }
18189 self.0.encode(encoder, offset + 0, depth)?;
18191 self.1.encode(encoder, offset + 8, depth)?;
18192 Ok(())
18193 }
18194 }
18195
18196 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18197 for PaddingBetweenFieldsInt8Int64
18198 {
18199 #[inline(always)]
18200 fn new_empty() -> Self {
18201 Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i64, D) }
18202 }
18203
18204 #[inline]
18205 unsafe fn decode(
18206 &mut self,
18207 decoder: &mut fidl::encoding::Decoder<'_, D>,
18208 offset: usize,
18209 _depth: fidl::encoding::Depth,
18210 ) -> fidl::Result<()> {
18211 decoder.debug_check_bounds::<Self>(offset);
18212 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18213 let ptr = unsafe { buf_ptr.offset(0) };
18215 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18216 let mask = 0xffffffffffffff00u64;
18217 let maskedval = padval & mask;
18218 if maskedval != 0 {
18219 return Err(fidl::Error::NonZeroPadding {
18220 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18221 });
18222 }
18223 unsafe {
18225 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
18226 }
18227 Ok(())
18228 }
18229 }
18230
18231 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject1Byte {
18232 type Borrowed<'a> = &'a Self;
18233 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18234 value
18235 }
18236 }
18237
18238 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject1Byte {
18239 type Owned = Self;
18240
18241 #[inline(always)]
18242 fn inline_align(_context: fidl::encoding::Context) -> usize {
18243 1
18244 }
18245
18246 #[inline(always)]
18247 fn inline_size(_context: fidl::encoding::Context) -> usize {
18248 1
18249 }
18250 #[inline(always)]
18251 fn encode_is_copy() -> bool {
18252 true
18253 }
18254
18255 #[inline(always)]
18256 fn decode_is_copy() -> bool {
18257 true
18258 }
18259 }
18260
18261 unsafe impl<D: fidl::encoding::ResourceDialect>
18262 fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D>
18263 for &PaddingEndOfInlineObject1Byte
18264 {
18265 #[inline]
18266 unsafe fn encode(
18267 self,
18268 encoder: &mut fidl::encoding::Encoder<'_, D>,
18269 offset: usize,
18270 _depth: fidl::encoding::Depth,
18271 ) -> fidl::Result<()> {
18272 encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18273 unsafe {
18274 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18276 (buf_ptr as *mut PaddingEndOfInlineObject1Byte)
18277 .write_unaligned((self as *const PaddingEndOfInlineObject1Byte).read());
18278 }
18281 Ok(())
18282 }
18283 }
18284 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct1Byte, D>>
18285 fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D> for (T0,)
18286 {
18287 #[inline]
18288 unsafe fn encode(
18289 self,
18290 encoder: &mut fidl::encoding::Encoder<'_, D>,
18291 offset: usize,
18292 depth: fidl::encoding::Depth,
18293 ) -> fidl::Result<()> {
18294 encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18295 self.0.encode(encoder, offset + 0, depth)?;
18299 Ok(())
18300 }
18301 }
18302
18303 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18304 for PaddingEndOfInlineObject1Byte
18305 {
18306 #[inline(always)]
18307 fn new_empty() -> Self {
18308 Self { a: fidl::new_empty!(Struct1Byte, D) }
18309 }
18310
18311 #[inline]
18312 unsafe fn decode(
18313 &mut self,
18314 decoder: &mut fidl::encoding::Decoder<'_, D>,
18315 offset: usize,
18316 _depth: fidl::encoding::Depth,
18317 ) -> fidl::Result<()> {
18318 decoder.debug_check_bounds::<Self>(offset);
18319 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18320 unsafe {
18323 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
18324 }
18325 Ok(())
18326 }
18327 }
18328
18329 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject2Byte {
18330 type Borrowed<'a> = &'a Self;
18331 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18332 value
18333 }
18334 }
18335
18336 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject2Byte {
18337 type Owned = Self;
18338
18339 #[inline(always)]
18340 fn inline_align(_context: fidl::encoding::Context) -> usize {
18341 2
18342 }
18343
18344 #[inline(always)]
18345 fn inline_size(_context: fidl::encoding::Context) -> usize {
18346 2
18347 }
18348 #[inline(always)]
18349 fn encode_is_copy() -> bool {
18350 true
18351 }
18352
18353 #[inline(always)]
18354 fn decode_is_copy() -> bool {
18355 true
18356 }
18357 }
18358
18359 unsafe impl<D: fidl::encoding::ResourceDialect>
18360 fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D>
18361 for &PaddingEndOfInlineObject2Byte
18362 {
18363 #[inline]
18364 unsafe fn encode(
18365 self,
18366 encoder: &mut fidl::encoding::Encoder<'_, D>,
18367 offset: usize,
18368 _depth: fidl::encoding::Depth,
18369 ) -> fidl::Result<()> {
18370 encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18371 unsafe {
18372 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18374 (buf_ptr as *mut PaddingEndOfInlineObject2Byte)
18375 .write_unaligned((self as *const PaddingEndOfInlineObject2Byte).read());
18376 }
18379 Ok(())
18380 }
18381 }
18382 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct2Byte, D>>
18383 fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D> for (T0,)
18384 {
18385 #[inline]
18386 unsafe fn encode(
18387 self,
18388 encoder: &mut fidl::encoding::Encoder<'_, D>,
18389 offset: usize,
18390 depth: fidl::encoding::Depth,
18391 ) -> fidl::Result<()> {
18392 encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18393 self.0.encode(encoder, offset + 0, depth)?;
18397 Ok(())
18398 }
18399 }
18400
18401 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18402 for PaddingEndOfInlineObject2Byte
18403 {
18404 #[inline(always)]
18405 fn new_empty() -> Self {
18406 Self { a: fidl::new_empty!(Struct2Byte, D) }
18407 }
18408
18409 #[inline]
18410 unsafe fn decode(
18411 &mut self,
18412 decoder: &mut fidl::encoding::Decoder<'_, D>,
18413 offset: usize,
18414 _depth: fidl::encoding::Depth,
18415 ) -> fidl::Result<()> {
18416 decoder.debug_check_bounds::<Self>(offset);
18417 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18418 unsafe {
18421 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
18422 }
18423 Ok(())
18424 }
18425 }
18426
18427 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject3Byte {
18428 type Borrowed<'a> = &'a Self;
18429 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18430 value
18431 }
18432 }
18433
18434 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject3Byte {
18435 type Owned = Self;
18436
18437 #[inline(always)]
18438 fn inline_align(_context: fidl::encoding::Context) -> usize {
18439 2
18440 }
18441
18442 #[inline(always)]
18443 fn inline_size(_context: fidl::encoding::Context) -> usize {
18444 4
18445 }
18446 }
18447
18448 unsafe impl<D: fidl::encoding::ResourceDialect>
18449 fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D>
18450 for &PaddingEndOfInlineObject3Byte
18451 {
18452 #[inline]
18453 unsafe fn encode(
18454 self,
18455 encoder: &mut fidl::encoding::Encoder<'_, D>,
18456 offset: usize,
18457 _depth: fidl::encoding::Depth,
18458 ) -> fidl::Result<()> {
18459 encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18460 unsafe {
18461 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18463 (buf_ptr as *mut PaddingEndOfInlineObject3Byte)
18464 .write_unaligned((self as *const PaddingEndOfInlineObject3Byte).read());
18465 let padding_ptr = buf_ptr.offset(2) as *mut u16;
18468 let padding_mask = 0xff00u16;
18469 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18470 }
18471 Ok(())
18472 }
18473 }
18474 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct3Byte, D>>
18475 fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D> for (T0,)
18476 {
18477 #[inline]
18478 unsafe fn encode(
18479 self,
18480 encoder: &mut fidl::encoding::Encoder<'_, D>,
18481 offset: usize,
18482 depth: fidl::encoding::Depth,
18483 ) -> fidl::Result<()> {
18484 encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18485 self.0.encode(encoder, offset + 0, depth)?;
18489 Ok(())
18490 }
18491 }
18492
18493 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18494 for PaddingEndOfInlineObject3Byte
18495 {
18496 #[inline(always)]
18497 fn new_empty() -> Self {
18498 Self { a: fidl::new_empty!(Struct3Byte, D) }
18499 }
18500
18501 #[inline]
18502 unsafe fn decode(
18503 &mut self,
18504 decoder: &mut fidl::encoding::Decoder<'_, D>,
18505 offset: usize,
18506 _depth: fidl::encoding::Depth,
18507 ) -> fidl::Result<()> {
18508 decoder.debug_check_bounds::<Self>(offset);
18509 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18510 let ptr = unsafe { buf_ptr.offset(2) };
18512 let padval = unsafe { (ptr as *const u16).read_unaligned() };
18513 let mask = 0xff00u16;
18514 let maskedval = padval & mask;
18515 if maskedval != 0 {
18516 return Err(fidl::Error::NonZeroPadding {
18517 padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
18518 });
18519 }
18520 unsafe {
18522 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18523 }
18524 Ok(())
18525 }
18526 }
18527
18528 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject4Byte {
18529 type Borrowed<'a> = &'a Self;
18530 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18531 value
18532 }
18533 }
18534
18535 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject4Byte {
18536 type Owned = Self;
18537
18538 #[inline(always)]
18539 fn inline_align(_context: fidl::encoding::Context) -> usize {
18540 4
18541 }
18542
18543 #[inline(always)]
18544 fn inline_size(_context: fidl::encoding::Context) -> usize {
18545 4
18546 }
18547 #[inline(always)]
18548 fn encode_is_copy() -> bool {
18549 true
18550 }
18551
18552 #[inline(always)]
18553 fn decode_is_copy() -> bool {
18554 true
18555 }
18556 }
18557
18558 unsafe impl<D: fidl::encoding::ResourceDialect>
18559 fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D>
18560 for &PaddingEndOfInlineObject4Byte
18561 {
18562 #[inline]
18563 unsafe fn encode(
18564 self,
18565 encoder: &mut fidl::encoding::Encoder<'_, D>,
18566 offset: usize,
18567 _depth: fidl::encoding::Depth,
18568 ) -> fidl::Result<()> {
18569 encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18570 unsafe {
18571 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18573 (buf_ptr as *mut PaddingEndOfInlineObject4Byte)
18574 .write_unaligned((self as *const PaddingEndOfInlineObject4Byte).read());
18575 }
18578 Ok(())
18579 }
18580 }
18581 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct4Byte, D>>
18582 fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D> for (T0,)
18583 {
18584 #[inline]
18585 unsafe fn encode(
18586 self,
18587 encoder: &mut fidl::encoding::Encoder<'_, D>,
18588 offset: usize,
18589 depth: fidl::encoding::Depth,
18590 ) -> fidl::Result<()> {
18591 encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18592 self.0.encode(encoder, offset + 0, depth)?;
18596 Ok(())
18597 }
18598 }
18599
18600 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18601 for PaddingEndOfInlineObject4Byte
18602 {
18603 #[inline(always)]
18604 fn new_empty() -> Self {
18605 Self { a: fidl::new_empty!(Struct4Byte, D) }
18606 }
18607
18608 #[inline]
18609 unsafe fn decode(
18610 &mut self,
18611 decoder: &mut fidl::encoding::Decoder<'_, D>,
18612 offset: usize,
18613 _depth: fidl::encoding::Depth,
18614 ) -> fidl::Result<()> {
18615 decoder.debug_check_bounds::<Self>(offset);
18616 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18617 unsafe {
18620 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18621 }
18622 Ok(())
18623 }
18624 }
18625
18626 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject5Byte {
18627 type Borrowed<'a> = &'a Self;
18628 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18629 value
18630 }
18631 }
18632
18633 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject5Byte {
18634 type Owned = Self;
18635
18636 #[inline(always)]
18637 fn inline_align(_context: fidl::encoding::Context) -> usize {
18638 4
18639 }
18640
18641 #[inline(always)]
18642 fn inline_size(_context: fidl::encoding::Context) -> usize {
18643 8
18644 }
18645 }
18646
18647 unsafe impl<D: fidl::encoding::ResourceDialect>
18648 fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D>
18649 for &PaddingEndOfInlineObject5Byte
18650 {
18651 #[inline]
18652 unsafe fn encode(
18653 self,
18654 encoder: &mut fidl::encoding::Encoder<'_, D>,
18655 offset: usize,
18656 _depth: fidl::encoding::Depth,
18657 ) -> fidl::Result<()> {
18658 encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18659 unsafe {
18660 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18662 (buf_ptr as *mut PaddingEndOfInlineObject5Byte)
18663 .write_unaligned((self as *const PaddingEndOfInlineObject5Byte).read());
18664 let padding_ptr = buf_ptr.offset(4) as *mut u32;
18667 let padding_mask = 0xffffff00u32;
18668 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18669 }
18670 Ok(())
18671 }
18672 }
18673 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct5Byte, D>>
18674 fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D> for (T0,)
18675 {
18676 #[inline]
18677 unsafe fn encode(
18678 self,
18679 encoder: &mut fidl::encoding::Encoder<'_, D>,
18680 offset: usize,
18681 depth: fidl::encoding::Depth,
18682 ) -> fidl::Result<()> {
18683 encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18684 self.0.encode(encoder, offset + 0, depth)?;
18688 Ok(())
18689 }
18690 }
18691
18692 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18693 for PaddingEndOfInlineObject5Byte
18694 {
18695 #[inline(always)]
18696 fn new_empty() -> Self {
18697 Self { a: fidl::new_empty!(Struct5Byte, D) }
18698 }
18699
18700 #[inline]
18701 unsafe fn decode(
18702 &mut self,
18703 decoder: &mut fidl::encoding::Decoder<'_, D>,
18704 offset: usize,
18705 _depth: fidl::encoding::Depth,
18706 ) -> fidl::Result<()> {
18707 decoder.debug_check_bounds::<Self>(offset);
18708 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18709 let ptr = unsafe { buf_ptr.offset(4) };
18711 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18712 let mask = 0xffffff00u32;
18713 let maskedval = padval & mask;
18714 if maskedval != 0 {
18715 return Err(fidl::Error::NonZeroPadding {
18716 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18717 });
18718 }
18719 unsafe {
18721 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18722 }
18723 Ok(())
18724 }
18725 }
18726
18727 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject6Byte {
18728 type Borrowed<'a> = &'a Self;
18729 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18730 value
18731 }
18732 }
18733
18734 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject6Byte {
18735 type Owned = Self;
18736
18737 #[inline(always)]
18738 fn inline_align(_context: fidl::encoding::Context) -> usize {
18739 4
18740 }
18741
18742 #[inline(always)]
18743 fn inline_size(_context: fidl::encoding::Context) -> usize {
18744 8
18745 }
18746 }
18747
18748 unsafe impl<D: fidl::encoding::ResourceDialect>
18749 fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D>
18750 for &PaddingEndOfInlineObject6Byte
18751 {
18752 #[inline]
18753 unsafe fn encode(
18754 self,
18755 encoder: &mut fidl::encoding::Encoder<'_, D>,
18756 offset: usize,
18757 _depth: fidl::encoding::Depth,
18758 ) -> fidl::Result<()> {
18759 encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18760 unsafe {
18761 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18763 (buf_ptr as *mut PaddingEndOfInlineObject6Byte)
18764 .write_unaligned((self as *const PaddingEndOfInlineObject6Byte).read());
18765 let padding_ptr = buf_ptr.offset(4) as *mut u32;
18768 let padding_mask = 0xffff0000u32;
18769 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18770 }
18771 Ok(())
18772 }
18773 }
18774 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct6Byte, D>>
18775 fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D> for (T0,)
18776 {
18777 #[inline]
18778 unsafe fn encode(
18779 self,
18780 encoder: &mut fidl::encoding::Encoder<'_, D>,
18781 offset: usize,
18782 depth: fidl::encoding::Depth,
18783 ) -> fidl::Result<()> {
18784 encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18785 self.0.encode(encoder, offset + 0, depth)?;
18789 Ok(())
18790 }
18791 }
18792
18793 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18794 for PaddingEndOfInlineObject6Byte
18795 {
18796 #[inline(always)]
18797 fn new_empty() -> Self {
18798 Self { a: fidl::new_empty!(Struct6Byte, D) }
18799 }
18800
18801 #[inline]
18802 unsafe fn decode(
18803 &mut self,
18804 decoder: &mut fidl::encoding::Decoder<'_, D>,
18805 offset: usize,
18806 _depth: fidl::encoding::Depth,
18807 ) -> fidl::Result<()> {
18808 decoder.debug_check_bounds::<Self>(offset);
18809 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18810 let ptr = unsafe { buf_ptr.offset(4) };
18812 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18813 let mask = 0xffff0000u32;
18814 let maskedval = padval & mask;
18815 if maskedval != 0 {
18816 return Err(fidl::Error::NonZeroPadding {
18817 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18818 });
18819 }
18820 unsafe {
18822 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18823 }
18824 Ok(())
18825 }
18826 }
18827
18828 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject7Byte {
18829 type Borrowed<'a> = &'a Self;
18830 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18831 value
18832 }
18833 }
18834
18835 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject7Byte {
18836 type Owned = Self;
18837
18838 #[inline(always)]
18839 fn inline_align(_context: fidl::encoding::Context) -> usize {
18840 4
18841 }
18842
18843 #[inline(always)]
18844 fn inline_size(_context: fidl::encoding::Context) -> usize {
18845 8
18846 }
18847 }
18848
18849 unsafe impl<D: fidl::encoding::ResourceDialect>
18850 fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D>
18851 for &PaddingEndOfInlineObject7Byte
18852 {
18853 #[inline]
18854 unsafe fn encode(
18855 self,
18856 encoder: &mut fidl::encoding::Encoder<'_, D>,
18857 offset: usize,
18858 _depth: fidl::encoding::Depth,
18859 ) -> fidl::Result<()> {
18860 encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
18861 unsafe {
18862 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18864 (buf_ptr as *mut PaddingEndOfInlineObject7Byte)
18865 .write_unaligned((self as *const PaddingEndOfInlineObject7Byte).read());
18866 let padding_ptr = buf_ptr.offset(4) as *mut u32;
18869 let padding_mask = 0xff000000u32;
18870 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18871 }
18872 Ok(())
18873 }
18874 }
18875 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct7Byte, D>>
18876 fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D> for (T0,)
18877 {
18878 #[inline]
18879 unsafe fn encode(
18880 self,
18881 encoder: &mut fidl::encoding::Encoder<'_, D>,
18882 offset: usize,
18883 depth: fidl::encoding::Depth,
18884 ) -> fidl::Result<()> {
18885 encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
18886 self.0.encode(encoder, offset + 0, depth)?;
18890 Ok(())
18891 }
18892 }
18893
18894 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18895 for PaddingEndOfInlineObject7Byte
18896 {
18897 #[inline(always)]
18898 fn new_empty() -> Self {
18899 Self { a: fidl::new_empty!(Struct7Byte, D) }
18900 }
18901
18902 #[inline]
18903 unsafe fn decode(
18904 &mut self,
18905 decoder: &mut fidl::encoding::Decoder<'_, D>,
18906 offset: usize,
18907 _depth: fidl::encoding::Depth,
18908 ) -> fidl::Result<()> {
18909 decoder.debug_check_bounds::<Self>(offset);
18910 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18911 let ptr = unsafe { buf_ptr.offset(4) };
18913 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18914 let mask = 0xff000000u32;
18915 let maskedval = padval & mask;
18916 if maskedval != 0 {
18917 return Err(fidl::Error::NonZeroPadding {
18918 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18919 });
18920 }
18921 unsafe {
18923 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18924 }
18925 Ok(())
18926 }
18927 }
18928
18929 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
18930 type Borrowed<'a> = &'a Self;
18931 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18932 value
18933 }
18934 }
18935
18936 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
18937 type Owned = Self;
18938
18939 #[inline(always)]
18940 fn inline_align(_context: fidl::encoding::Context) -> usize {
18941 8
18942 }
18943
18944 #[inline(always)]
18945 fn inline_size(_context: fidl::encoding::Context) -> usize {
18946 16
18947 }
18948 }
18949
18950 unsafe impl<D: fidl::encoding::ResourceDialect>
18951 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>
18952 for &PaddingEndOfInlineObjectBeforeNextObject1Byte
18953 {
18954 #[inline]
18955 unsafe fn encode(
18956 self,
18957 encoder: &mut fidl::encoding::Encoder<'_, D>,
18958 offset: usize,
18959 _depth: fidl::encoding::Depth,
18960 ) -> fidl::Result<()> {
18961 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
18962 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>::encode(
18964 (
18965 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
18966 &self.out_of_line,
18967 ),
18968 <Struct1Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
18969 ),
18970 encoder,
18971 offset,
18972 _depth,
18973 )
18974 }
18975 }
18976 unsafe impl<
18977 D: fidl::encoding::ResourceDialect,
18978 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
18979 T1: fidl::encoding::Encode<Struct1Byte, D>,
18980 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D> for (T0, T1)
18981 {
18982 #[inline]
18983 unsafe fn encode(
18984 self,
18985 encoder: &mut fidl::encoding::Encoder<'_, D>,
18986 offset: usize,
18987 depth: fidl::encoding::Depth,
18988 ) -> fidl::Result<()> {
18989 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
18990 unsafe {
18993 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
18994 (ptr as *mut u64).write_unaligned(0);
18995 }
18996 self.0.encode(encoder, offset + 0, depth)?;
18998 self.1.encode(encoder, offset + 8, depth)?;
18999 Ok(())
19000 }
19001 }
19002
19003 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19004 for PaddingEndOfInlineObjectBeforeNextObject1Byte
19005 {
19006 #[inline(always)]
19007 fn new_empty() -> Self {
19008 Self {
19009 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19010 in_line: fidl::new_empty!(Struct1Byte, D),
19011 }
19012 }
19013
19014 #[inline]
19015 unsafe fn decode(
19016 &mut self,
19017 decoder: &mut fidl::encoding::Decoder<'_, D>,
19018 offset: usize,
19019 _depth: fidl::encoding::Depth,
19020 ) -> fidl::Result<()> {
19021 decoder.debug_check_bounds::<Self>(offset);
19022 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19024 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19025 let mask = 0xffffffffffffff00u64;
19026 let maskedval = padval & mask;
19027 if maskedval != 0 {
19028 return Err(fidl::Error::NonZeroPadding {
19029 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19030 });
19031 }
19032 fidl::decode!(
19033 fidl::encoding::Boxed<Struct8Byte>,
19034 D,
19035 &mut self.out_of_line,
19036 decoder,
19037 offset + 0,
19038 _depth
19039 )?;
19040 fidl::decode!(Struct1Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19041 Ok(())
19042 }
19043 }
19044
19045 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19046 type Borrowed<'a> = &'a Self;
19047 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19048 value
19049 }
19050 }
19051
19052 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19053 type Owned = Self;
19054
19055 #[inline(always)]
19056 fn inline_align(_context: fidl::encoding::Context) -> usize {
19057 8
19058 }
19059
19060 #[inline(always)]
19061 fn inline_size(_context: fidl::encoding::Context) -> usize {
19062 16
19063 }
19064 }
19065
19066 unsafe impl<D: fidl::encoding::ResourceDialect>
19067 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>
19068 for &PaddingEndOfInlineObjectBeforeNextObject2Byte
19069 {
19070 #[inline]
19071 unsafe fn encode(
19072 self,
19073 encoder: &mut fidl::encoding::Encoder<'_, D>,
19074 offset: usize,
19075 _depth: fidl::encoding::Depth,
19076 ) -> fidl::Result<()> {
19077 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19078 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>::encode(
19080 (
19081 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19082 &self.out_of_line,
19083 ),
19084 <Struct2Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19085 ),
19086 encoder,
19087 offset,
19088 _depth,
19089 )
19090 }
19091 }
19092 unsafe impl<
19093 D: fidl::encoding::ResourceDialect,
19094 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19095 T1: fidl::encoding::Encode<Struct2Byte, D>,
19096 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D> for (T0, T1)
19097 {
19098 #[inline]
19099 unsafe fn encode(
19100 self,
19101 encoder: &mut fidl::encoding::Encoder<'_, D>,
19102 offset: usize,
19103 depth: fidl::encoding::Depth,
19104 ) -> fidl::Result<()> {
19105 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19106 unsafe {
19109 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19110 (ptr as *mut u64).write_unaligned(0);
19111 }
19112 self.0.encode(encoder, offset + 0, depth)?;
19114 self.1.encode(encoder, offset + 8, depth)?;
19115 Ok(())
19116 }
19117 }
19118
19119 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19120 for PaddingEndOfInlineObjectBeforeNextObject2Byte
19121 {
19122 #[inline(always)]
19123 fn new_empty() -> Self {
19124 Self {
19125 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19126 in_line: fidl::new_empty!(Struct2Byte, D),
19127 }
19128 }
19129
19130 #[inline]
19131 unsafe fn decode(
19132 &mut self,
19133 decoder: &mut fidl::encoding::Decoder<'_, D>,
19134 offset: usize,
19135 _depth: fidl::encoding::Depth,
19136 ) -> fidl::Result<()> {
19137 decoder.debug_check_bounds::<Self>(offset);
19138 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19140 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19141 let mask = 0xffffffffffff0000u64;
19142 let maskedval = padval & mask;
19143 if maskedval != 0 {
19144 return Err(fidl::Error::NonZeroPadding {
19145 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19146 });
19147 }
19148 fidl::decode!(
19149 fidl::encoding::Boxed<Struct8Byte>,
19150 D,
19151 &mut self.out_of_line,
19152 decoder,
19153 offset + 0,
19154 _depth
19155 )?;
19156 fidl::decode!(Struct2Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19157 Ok(())
19158 }
19159 }
19160
19161 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19162 type Borrowed<'a> = &'a Self;
19163 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19164 value
19165 }
19166 }
19167
19168 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19169 type Owned = Self;
19170
19171 #[inline(always)]
19172 fn inline_align(_context: fidl::encoding::Context) -> usize {
19173 8
19174 }
19175
19176 #[inline(always)]
19177 fn inline_size(_context: fidl::encoding::Context) -> usize {
19178 16
19179 }
19180 }
19181
19182 unsafe impl<D: fidl::encoding::ResourceDialect>
19183 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>
19184 for &PaddingEndOfInlineObjectBeforeNextObject3Byte
19185 {
19186 #[inline]
19187 unsafe fn encode(
19188 self,
19189 encoder: &mut fidl::encoding::Encoder<'_, D>,
19190 offset: usize,
19191 _depth: fidl::encoding::Depth,
19192 ) -> fidl::Result<()> {
19193 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19194 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>::encode(
19196 (
19197 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19198 &self.out_of_line,
19199 ),
19200 <Struct3Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19201 ),
19202 encoder,
19203 offset,
19204 _depth,
19205 )
19206 }
19207 }
19208 unsafe impl<
19209 D: fidl::encoding::ResourceDialect,
19210 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19211 T1: fidl::encoding::Encode<Struct3Byte, D>,
19212 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D> for (T0, T1)
19213 {
19214 #[inline]
19215 unsafe fn encode(
19216 self,
19217 encoder: &mut fidl::encoding::Encoder<'_, D>,
19218 offset: usize,
19219 depth: fidl::encoding::Depth,
19220 ) -> fidl::Result<()> {
19221 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19222 unsafe {
19225 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19226 (ptr as *mut u64).write_unaligned(0);
19227 }
19228 self.0.encode(encoder, offset + 0, depth)?;
19230 self.1.encode(encoder, offset + 8, depth)?;
19231 Ok(())
19232 }
19233 }
19234
19235 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19236 for PaddingEndOfInlineObjectBeforeNextObject3Byte
19237 {
19238 #[inline(always)]
19239 fn new_empty() -> Self {
19240 Self {
19241 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19242 in_line: fidl::new_empty!(Struct3Byte, D),
19243 }
19244 }
19245
19246 #[inline]
19247 unsafe fn decode(
19248 &mut self,
19249 decoder: &mut fidl::encoding::Decoder<'_, D>,
19250 offset: usize,
19251 _depth: fidl::encoding::Depth,
19252 ) -> fidl::Result<()> {
19253 decoder.debug_check_bounds::<Self>(offset);
19254 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19256 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19257 let mask = 0xffffffff00000000u64;
19258 let maskedval = padval & mask;
19259 if maskedval != 0 {
19260 return Err(fidl::Error::NonZeroPadding {
19261 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19262 });
19263 }
19264 fidl::decode!(
19265 fidl::encoding::Boxed<Struct8Byte>,
19266 D,
19267 &mut self.out_of_line,
19268 decoder,
19269 offset + 0,
19270 _depth
19271 )?;
19272 fidl::decode!(Struct3Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19273 Ok(())
19274 }
19275 }
19276
19277 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19278 type Borrowed<'a> = &'a Self;
19279 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19280 value
19281 }
19282 }
19283
19284 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19285 type Owned = Self;
19286
19287 #[inline(always)]
19288 fn inline_align(_context: fidl::encoding::Context) -> usize {
19289 8
19290 }
19291
19292 #[inline(always)]
19293 fn inline_size(_context: fidl::encoding::Context) -> usize {
19294 16
19295 }
19296 }
19297
19298 unsafe impl<D: fidl::encoding::ResourceDialect>
19299 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>
19300 for &PaddingEndOfInlineObjectBeforeNextObject4Byte
19301 {
19302 #[inline]
19303 unsafe fn encode(
19304 self,
19305 encoder: &mut fidl::encoding::Encoder<'_, D>,
19306 offset: usize,
19307 _depth: fidl::encoding::Depth,
19308 ) -> fidl::Result<()> {
19309 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19310 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>::encode(
19312 (
19313 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19314 &self.out_of_line,
19315 ),
19316 <Struct4Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19317 ),
19318 encoder,
19319 offset,
19320 _depth,
19321 )
19322 }
19323 }
19324 unsafe impl<
19325 D: fidl::encoding::ResourceDialect,
19326 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19327 T1: fidl::encoding::Encode<Struct4Byte, D>,
19328 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D> for (T0, T1)
19329 {
19330 #[inline]
19331 unsafe fn encode(
19332 self,
19333 encoder: &mut fidl::encoding::Encoder<'_, D>,
19334 offset: usize,
19335 depth: fidl::encoding::Depth,
19336 ) -> fidl::Result<()> {
19337 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19338 unsafe {
19341 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19342 (ptr as *mut u64).write_unaligned(0);
19343 }
19344 self.0.encode(encoder, offset + 0, depth)?;
19346 self.1.encode(encoder, offset + 8, depth)?;
19347 Ok(())
19348 }
19349 }
19350
19351 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19352 for PaddingEndOfInlineObjectBeforeNextObject4Byte
19353 {
19354 #[inline(always)]
19355 fn new_empty() -> Self {
19356 Self {
19357 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19358 in_line: fidl::new_empty!(Struct4Byte, D),
19359 }
19360 }
19361
19362 #[inline]
19363 unsafe fn decode(
19364 &mut self,
19365 decoder: &mut fidl::encoding::Decoder<'_, D>,
19366 offset: usize,
19367 _depth: fidl::encoding::Depth,
19368 ) -> fidl::Result<()> {
19369 decoder.debug_check_bounds::<Self>(offset);
19370 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19372 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19373 let mask = 0xffffffff00000000u64;
19374 let maskedval = padval & mask;
19375 if maskedval != 0 {
19376 return Err(fidl::Error::NonZeroPadding {
19377 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19378 });
19379 }
19380 fidl::decode!(
19381 fidl::encoding::Boxed<Struct8Byte>,
19382 D,
19383 &mut self.out_of_line,
19384 decoder,
19385 offset + 0,
19386 _depth
19387 )?;
19388 fidl::decode!(Struct4Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19389 Ok(())
19390 }
19391 }
19392
19393 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19394 type Borrowed<'a> = &'a Self;
19395 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19396 value
19397 }
19398 }
19399
19400 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19401 type Owned = Self;
19402
19403 #[inline(always)]
19404 fn inline_align(_context: fidl::encoding::Context) -> usize {
19405 8
19406 }
19407
19408 #[inline(always)]
19409 fn inline_size(_context: fidl::encoding::Context) -> usize {
19410 16
19411 }
19412 }
19413
19414 unsafe impl<D: fidl::encoding::ResourceDialect>
19415 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>
19416 for &PaddingEndOfInlineObjectBeforeNextObject5Byte
19417 {
19418 #[inline]
19419 unsafe fn encode(
19420 self,
19421 encoder: &mut fidl::encoding::Encoder<'_, D>,
19422 offset: usize,
19423 _depth: fidl::encoding::Depth,
19424 ) -> fidl::Result<()> {
19425 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19426 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>::encode(
19428 (
19429 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19430 &self.out_of_line,
19431 ),
19432 <Struct5Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19433 ),
19434 encoder,
19435 offset,
19436 _depth,
19437 )
19438 }
19439 }
19440 unsafe impl<
19441 D: fidl::encoding::ResourceDialect,
19442 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19443 T1: fidl::encoding::Encode<Struct5Byte, D>,
19444 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D> for (T0, T1)
19445 {
19446 #[inline]
19447 unsafe fn encode(
19448 self,
19449 encoder: &mut fidl::encoding::Encoder<'_, D>,
19450 offset: usize,
19451 depth: fidl::encoding::Depth,
19452 ) -> fidl::Result<()> {
19453 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19454 self.0.encode(encoder, offset + 0, depth)?;
19458 self.1.encode(encoder, offset + 8, depth)?;
19459 Ok(())
19460 }
19461 }
19462
19463 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19464 for PaddingEndOfInlineObjectBeforeNextObject5Byte
19465 {
19466 #[inline(always)]
19467 fn new_empty() -> Self {
19468 Self {
19469 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19470 in_line: fidl::new_empty!(Struct5Byte, D),
19471 }
19472 }
19473
19474 #[inline]
19475 unsafe fn decode(
19476 &mut self,
19477 decoder: &mut fidl::encoding::Decoder<'_, D>,
19478 offset: usize,
19479 _depth: fidl::encoding::Depth,
19480 ) -> fidl::Result<()> {
19481 decoder.debug_check_bounds::<Self>(offset);
19482 fidl::decode!(
19484 fidl::encoding::Boxed<Struct8Byte>,
19485 D,
19486 &mut self.out_of_line,
19487 decoder,
19488 offset + 0,
19489 _depth
19490 )?;
19491 fidl::decode!(Struct5Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19492 Ok(())
19493 }
19494 }
19495
19496 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19497 type Borrowed<'a> = &'a Self;
19498 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19499 value
19500 }
19501 }
19502
19503 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19504 type Owned = Self;
19505
19506 #[inline(always)]
19507 fn inline_align(_context: fidl::encoding::Context) -> usize {
19508 8
19509 }
19510
19511 #[inline(always)]
19512 fn inline_size(_context: fidl::encoding::Context) -> usize {
19513 16
19514 }
19515 }
19516
19517 unsafe impl<D: fidl::encoding::ResourceDialect>
19518 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>
19519 for &PaddingEndOfInlineObjectBeforeNextObject6Byte
19520 {
19521 #[inline]
19522 unsafe fn encode(
19523 self,
19524 encoder: &mut fidl::encoding::Encoder<'_, D>,
19525 offset: usize,
19526 _depth: fidl::encoding::Depth,
19527 ) -> fidl::Result<()> {
19528 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19529 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>::encode(
19531 (
19532 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19533 &self.out_of_line,
19534 ),
19535 <Struct6Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19536 ),
19537 encoder,
19538 offset,
19539 _depth,
19540 )
19541 }
19542 }
19543 unsafe impl<
19544 D: fidl::encoding::ResourceDialect,
19545 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19546 T1: fidl::encoding::Encode<Struct6Byte, D>,
19547 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D> for (T0, T1)
19548 {
19549 #[inline]
19550 unsafe fn encode(
19551 self,
19552 encoder: &mut fidl::encoding::Encoder<'_, D>,
19553 offset: usize,
19554 depth: fidl::encoding::Depth,
19555 ) -> fidl::Result<()> {
19556 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19557 self.0.encode(encoder, offset + 0, depth)?;
19561 self.1.encode(encoder, offset + 8, depth)?;
19562 Ok(())
19563 }
19564 }
19565
19566 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19567 for PaddingEndOfInlineObjectBeforeNextObject6Byte
19568 {
19569 #[inline(always)]
19570 fn new_empty() -> Self {
19571 Self {
19572 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19573 in_line: fidl::new_empty!(Struct6Byte, D),
19574 }
19575 }
19576
19577 #[inline]
19578 unsafe fn decode(
19579 &mut self,
19580 decoder: &mut fidl::encoding::Decoder<'_, D>,
19581 offset: usize,
19582 _depth: fidl::encoding::Depth,
19583 ) -> fidl::Result<()> {
19584 decoder.debug_check_bounds::<Self>(offset);
19585 fidl::decode!(
19587 fidl::encoding::Boxed<Struct8Byte>,
19588 D,
19589 &mut self.out_of_line,
19590 decoder,
19591 offset + 0,
19592 _depth
19593 )?;
19594 fidl::decode!(Struct6Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19595 Ok(())
19596 }
19597 }
19598
19599 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19600 type Borrowed<'a> = &'a Self;
19601 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19602 value
19603 }
19604 }
19605
19606 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19607 type Owned = Self;
19608
19609 #[inline(always)]
19610 fn inline_align(_context: fidl::encoding::Context) -> usize {
19611 8
19612 }
19613
19614 #[inline(always)]
19615 fn inline_size(_context: fidl::encoding::Context) -> usize {
19616 16
19617 }
19618 }
19619
19620 unsafe impl<D: fidl::encoding::ResourceDialect>
19621 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>
19622 for &PaddingEndOfInlineObjectBeforeNextObject7Byte
19623 {
19624 #[inline]
19625 unsafe fn encode(
19626 self,
19627 encoder: &mut fidl::encoding::Encoder<'_, D>,
19628 offset: usize,
19629 _depth: fidl::encoding::Depth,
19630 ) -> fidl::Result<()> {
19631 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19632 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>::encode(
19634 (
19635 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19636 &self.out_of_line,
19637 ),
19638 <Struct7Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19639 ),
19640 encoder,
19641 offset,
19642 _depth,
19643 )
19644 }
19645 }
19646 unsafe impl<
19647 D: fidl::encoding::ResourceDialect,
19648 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19649 T1: fidl::encoding::Encode<Struct7Byte, D>,
19650 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D> for (T0, T1)
19651 {
19652 #[inline]
19653 unsafe fn encode(
19654 self,
19655 encoder: &mut fidl::encoding::Encoder<'_, D>,
19656 offset: usize,
19657 depth: fidl::encoding::Depth,
19658 ) -> fidl::Result<()> {
19659 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19660 self.0.encode(encoder, offset + 0, depth)?;
19664 self.1.encode(encoder, offset + 8, depth)?;
19665 Ok(())
19666 }
19667 }
19668
19669 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19670 for PaddingEndOfInlineObjectBeforeNextObject7Byte
19671 {
19672 #[inline(always)]
19673 fn new_empty() -> Self {
19674 Self {
19675 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19676 in_line: fidl::new_empty!(Struct7Byte, D),
19677 }
19678 }
19679
19680 #[inline]
19681 unsafe fn decode(
19682 &mut self,
19683 decoder: &mut fidl::encoding::Decoder<'_, D>,
19684 offset: usize,
19685 _depth: fidl::encoding::Depth,
19686 ) -> fidl::Result<()> {
19687 decoder.debug_check_bounds::<Self>(offset);
19688 fidl::decode!(
19690 fidl::encoding::Boxed<Struct8Byte>,
19691 D,
19692 &mut self.out_of_line,
19693 decoder,
19694 offset + 0,
19695 _depth
19696 )?;
19697 fidl::decode!(Struct7Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19698 Ok(())
19699 }
19700 }
19701
19702 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject1Byte {
19703 type Borrowed<'a> = &'a Self;
19704 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19705 value
19706 }
19707 }
19708
19709 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject1Byte {
19710 type Owned = Self;
19711
19712 #[inline(always)]
19713 fn inline_align(_context: fidl::encoding::Context) -> usize {
19714 8
19715 }
19716
19717 #[inline(always)]
19718 fn inline_size(_context: fidl::encoding::Context) -> usize {
19719 8
19720 }
19721 }
19722
19723 unsafe impl<D: fidl::encoding::ResourceDialect>
19724 fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D>
19725 for &PaddingEndOfOutOfLineObject1Byte
19726 {
19727 #[inline]
19728 unsafe fn encode(
19729 self,
19730 encoder: &mut fidl::encoding::Encoder<'_, D>,
19731 offset: usize,
19732 _depth: fidl::encoding::Depth,
19733 ) -> fidl::Result<()> {
19734 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19735 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject1Byte, D>::encode(
19737 (<fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19738 &self.out_of_line,
19739 ),),
19740 encoder,
19741 offset,
19742 _depth,
19743 )
19744 }
19745 }
19746 unsafe impl<
19747 D: fidl::encoding::ResourceDialect,
19748 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
19749 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D> for (T0,)
19750 {
19751 #[inline]
19752 unsafe fn encode(
19753 self,
19754 encoder: &mut fidl::encoding::Encoder<'_, D>,
19755 offset: usize,
19756 depth: fidl::encoding::Depth,
19757 ) -> fidl::Result<()> {
19758 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19759 self.0.encode(encoder, offset + 0, depth)?;
19763 Ok(())
19764 }
19765 }
19766
19767 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19768 for PaddingEndOfOutOfLineObject1Byte
19769 {
19770 #[inline(always)]
19771 fn new_empty() -> Self {
19772 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D) }
19773 }
19774
19775 #[inline]
19776 unsafe fn decode(
19777 &mut self,
19778 decoder: &mut fidl::encoding::Decoder<'_, D>,
19779 offset: usize,
19780 _depth: fidl::encoding::Depth,
19781 ) -> fidl::Result<()> {
19782 decoder.debug_check_bounds::<Self>(offset);
19783 fidl::decode!(
19785 fidl::encoding::Boxed<Struct1Byte>,
19786 D,
19787 &mut self.out_of_line,
19788 decoder,
19789 offset + 0,
19790 _depth
19791 )?;
19792 Ok(())
19793 }
19794 }
19795
19796 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject2Byte {
19797 type Borrowed<'a> = &'a Self;
19798 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19799 value
19800 }
19801 }
19802
19803 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject2Byte {
19804 type Owned = Self;
19805
19806 #[inline(always)]
19807 fn inline_align(_context: fidl::encoding::Context) -> usize {
19808 8
19809 }
19810
19811 #[inline(always)]
19812 fn inline_size(_context: fidl::encoding::Context) -> usize {
19813 8
19814 }
19815 }
19816
19817 unsafe impl<D: fidl::encoding::ResourceDialect>
19818 fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D>
19819 for &PaddingEndOfOutOfLineObject2Byte
19820 {
19821 #[inline]
19822 unsafe fn encode(
19823 self,
19824 encoder: &mut fidl::encoding::Encoder<'_, D>,
19825 offset: usize,
19826 _depth: fidl::encoding::Depth,
19827 ) -> fidl::Result<()> {
19828 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
19829 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject2Byte, D>::encode(
19831 (<fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19832 &self.out_of_line,
19833 ),),
19834 encoder,
19835 offset,
19836 _depth,
19837 )
19838 }
19839 }
19840 unsafe impl<
19841 D: fidl::encoding::ResourceDialect,
19842 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
19843 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D> for (T0,)
19844 {
19845 #[inline]
19846 unsafe fn encode(
19847 self,
19848 encoder: &mut fidl::encoding::Encoder<'_, D>,
19849 offset: usize,
19850 depth: fidl::encoding::Depth,
19851 ) -> fidl::Result<()> {
19852 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
19853 self.0.encode(encoder, offset + 0, depth)?;
19857 Ok(())
19858 }
19859 }
19860
19861 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19862 for PaddingEndOfOutOfLineObject2Byte
19863 {
19864 #[inline(always)]
19865 fn new_empty() -> Self {
19866 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D) }
19867 }
19868
19869 #[inline]
19870 unsafe fn decode(
19871 &mut self,
19872 decoder: &mut fidl::encoding::Decoder<'_, D>,
19873 offset: usize,
19874 _depth: fidl::encoding::Depth,
19875 ) -> fidl::Result<()> {
19876 decoder.debug_check_bounds::<Self>(offset);
19877 fidl::decode!(
19879 fidl::encoding::Boxed<Struct2Byte>,
19880 D,
19881 &mut self.out_of_line,
19882 decoder,
19883 offset + 0,
19884 _depth
19885 )?;
19886 Ok(())
19887 }
19888 }
19889
19890 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject3Byte {
19891 type Borrowed<'a> = &'a Self;
19892 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19893 value
19894 }
19895 }
19896
19897 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject3Byte {
19898 type Owned = Self;
19899
19900 #[inline(always)]
19901 fn inline_align(_context: fidl::encoding::Context) -> usize {
19902 8
19903 }
19904
19905 #[inline(always)]
19906 fn inline_size(_context: fidl::encoding::Context) -> usize {
19907 8
19908 }
19909 }
19910
19911 unsafe impl<D: fidl::encoding::ResourceDialect>
19912 fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D>
19913 for &PaddingEndOfOutOfLineObject3Byte
19914 {
19915 #[inline]
19916 unsafe fn encode(
19917 self,
19918 encoder: &mut fidl::encoding::Encoder<'_, D>,
19919 offset: usize,
19920 _depth: fidl::encoding::Depth,
19921 ) -> fidl::Result<()> {
19922 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
19923 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject3Byte, D>::encode(
19925 (<fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19926 &self.out_of_line,
19927 ),),
19928 encoder,
19929 offset,
19930 _depth,
19931 )
19932 }
19933 }
19934 unsafe impl<
19935 D: fidl::encoding::ResourceDialect,
19936 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
19937 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D> for (T0,)
19938 {
19939 #[inline]
19940 unsafe fn encode(
19941 self,
19942 encoder: &mut fidl::encoding::Encoder<'_, D>,
19943 offset: usize,
19944 depth: fidl::encoding::Depth,
19945 ) -> fidl::Result<()> {
19946 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
19947 self.0.encode(encoder, offset + 0, depth)?;
19951 Ok(())
19952 }
19953 }
19954
19955 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19956 for PaddingEndOfOutOfLineObject3Byte
19957 {
19958 #[inline(always)]
19959 fn new_empty() -> Self {
19960 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D) }
19961 }
19962
19963 #[inline]
19964 unsafe fn decode(
19965 &mut self,
19966 decoder: &mut fidl::encoding::Decoder<'_, D>,
19967 offset: usize,
19968 _depth: fidl::encoding::Depth,
19969 ) -> fidl::Result<()> {
19970 decoder.debug_check_bounds::<Self>(offset);
19971 fidl::decode!(
19973 fidl::encoding::Boxed<Struct3Byte>,
19974 D,
19975 &mut self.out_of_line,
19976 decoder,
19977 offset + 0,
19978 _depth
19979 )?;
19980 Ok(())
19981 }
19982 }
19983
19984 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject4Byte {
19985 type Borrowed<'a> = &'a Self;
19986 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19987 value
19988 }
19989 }
19990
19991 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject4Byte {
19992 type Owned = Self;
19993
19994 #[inline(always)]
19995 fn inline_align(_context: fidl::encoding::Context) -> usize {
19996 8
19997 }
19998
19999 #[inline(always)]
20000 fn inline_size(_context: fidl::encoding::Context) -> usize {
20001 8
20002 }
20003 }
20004
20005 unsafe impl<D: fidl::encoding::ResourceDialect>
20006 fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D>
20007 for &PaddingEndOfOutOfLineObject4Byte
20008 {
20009 #[inline]
20010 unsafe fn encode(
20011 self,
20012 encoder: &mut fidl::encoding::Encoder<'_, D>,
20013 offset: usize,
20014 _depth: fidl::encoding::Depth,
20015 ) -> fidl::Result<()> {
20016 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20017 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject4Byte, D>::encode(
20019 (<fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20020 &self.out_of_line,
20021 ),),
20022 encoder,
20023 offset,
20024 _depth,
20025 )
20026 }
20027 }
20028 unsafe impl<
20029 D: fidl::encoding::ResourceDialect,
20030 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20031 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D> for (T0,)
20032 {
20033 #[inline]
20034 unsafe fn encode(
20035 self,
20036 encoder: &mut fidl::encoding::Encoder<'_, D>,
20037 offset: usize,
20038 depth: fidl::encoding::Depth,
20039 ) -> fidl::Result<()> {
20040 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20041 self.0.encode(encoder, offset + 0, depth)?;
20045 Ok(())
20046 }
20047 }
20048
20049 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20050 for PaddingEndOfOutOfLineObject4Byte
20051 {
20052 #[inline(always)]
20053 fn new_empty() -> Self {
20054 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D) }
20055 }
20056
20057 #[inline]
20058 unsafe fn decode(
20059 &mut self,
20060 decoder: &mut fidl::encoding::Decoder<'_, D>,
20061 offset: usize,
20062 _depth: fidl::encoding::Depth,
20063 ) -> fidl::Result<()> {
20064 decoder.debug_check_bounds::<Self>(offset);
20065 fidl::decode!(
20067 fidl::encoding::Boxed<Struct4Byte>,
20068 D,
20069 &mut self.out_of_line,
20070 decoder,
20071 offset + 0,
20072 _depth
20073 )?;
20074 Ok(())
20075 }
20076 }
20077
20078 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject5Byte {
20079 type Borrowed<'a> = &'a Self;
20080 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20081 value
20082 }
20083 }
20084
20085 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject5Byte {
20086 type Owned = Self;
20087
20088 #[inline(always)]
20089 fn inline_align(_context: fidl::encoding::Context) -> usize {
20090 8
20091 }
20092
20093 #[inline(always)]
20094 fn inline_size(_context: fidl::encoding::Context) -> usize {
20095 8
20096 }
20097 }
20098
20099 unsafe impl<D: fidl::encoding::ResourceDialect>
20100 fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D>
20101 for &PaddingEndOfOutOfLineObject5Byte
20102 {
20103 #[inline]
20104 unsafe fn encode(
20105 self,
20106 encoder: &mut fidl::encoding::Encoder<'_, D>,
20107 offset: usize,
20108 _depth: fidl::encoding::Depth,
20109 ) -> fidl::Result<()> {
20110 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20111 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject5Byte, D>::encode(
20113 (<fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20114 &self.out_of_line,
20115 ),),
20116 encoder,
20117 offset,
20118 _depth,
20119 )
20120 }
20121 }
20122 unsafe impl<
20123 D: fidl::encoding::ResourceDialect,
20124 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
20125 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D> for (T0,)
20126 {
20127 #[inline]
20128 unsafe fn encode(
20129 self,
20130 encoder: &mut fidl::encoding::Encoder<'_, D>,
20131 offset: usize,
20132 depth: fidl::encoding::Depth,
20133 ) -> fidl::Result<()> {
20134 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20135 self.0.encode(encoder, offset + 0, depth)?;
20139 Ok(())
20140 }
20141 }
20142
20143 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20144 for PaddingEndOfOutOfLineObject5Byte
20145 {
20146 #[inline(always)]
20147 fn new_empty() -> Self {
20148 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D) }
20149 }
20150
20151 #[inline]
20152 unsafe fn decode(
20153 &mut self,
20154 decoder: &mut fidl::encoding::Decoder<'_, D>,
20155 offset: usize,
20156 _depth: fidl::encoding::Depth,
20157 ) -> fidl::Result<()> {
20158 decoder.debug_check_bounds::<Self>(offset);
20159 fidl::decode!(
20161 fidl::encoding::Boxed<Struct5Byte>,
20162 D,
20163 &mut self.out_of_line,
20164 decoder,
20165 offset + 0,
20166 _depth
20167 )?;
20168 Ok(())
20169 }
20170 }
20171
20172 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject6Byte {
20173 type Borrowed<'a> = &'a Self;
20174 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20175 value
20176 }
20177 }
20178
20179 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject6Byte {
20180 type Owned = Self;
20181
20182 #[inline(always)]
20183 fn inline_align(_context: fidl::encoding::Context) -> usize {
20184 8
20185 }
20186
20187 #[inline(always)]
20188 fn inline_size(_context: fidl::encoding::Context) -> usize {
20189 8
20190 }
20191 }
20192
20193 unsafe impl<D: fidl::encoding::ResourceDialect>
20194 fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D>
20195 for &PaddingEndOfOutOfLineObject6Byte
20196 {
20197 #[inline]
20198 unsafe fn encode(
20199 self,
20200 encoder: &mut fidl::encoding::Encoder<'_, D>,
20201 offset: usize,
20202 _depth: fidl::encoding::Depth,
20203 ) -> fidl::Result<()> {
20204 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20205 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject6Byte, D>::encode(
20207 (<fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20208 &self.out_of_line,
20209 ),),
20210 encoder,
20211 offset,
20212 _depth,
20213 )
20214 }
20215 }
20216 unsafe impl<
20217 D: fidl::encoding::ResourceDialect,
20218 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
20219 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D> for (T0,)
20220 {
20221 #[inline]
20222 unsafe fn encode(
20223 self,
20224 encoder: &mut fidl::encoding::Encoder<'_, D>,
20225 offset: usize,
20226 depth: fidl::encoding::Depth,
20227 ) -> fidl::Result<()> {
20228 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20229 self.0.encode(encoder, offset + 0, depth)?;
20233 Ok(())
20234 }
20235 }
20236
20237 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20238 for PaddingEndOfOutOfLineObject6Byte
20239 {
20240 #[inline(always)]
20241 fn new_empty() -> Self {
20242 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D) }
20243 }
20244
20245 #[inline]
20246 unsafe fn decode(
20247 &mut self,
20248 decoder: &mut fidl::encoding::Decoder<'_, D>,
20249 offset: usize,
20250 _depth: fidl::encoding::Depth,
20251 ) -> fidl::Result<()> {
20252 decoder.debug_check_bounds::<Self>(offset);
20253 fidl::decode!(
20255 fidl::encoding::Boxed<Struct6Byte>,
20256 D,
20257 &mut self.out_of_line,
20258 decoder,
20259 offset + 0,
20260 _depth
20261 )?;
20262 Ok(())
20263 }
20264 }
20265
20266 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject7Byte {
20267 type Borrowed<'a> = &'a Self;
20268 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20269 value
20270 }
20271 }
20272
20273 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject7Byte {
20274 type Owned = Self;
20275
20276 #[inline(always)]
20277 fn inline_align(_context: fidl::encoding::Context) -> usize {
20278 8
20279 }
20280
20281 #[inline(always)]
20282 fn inline_size(_context: fidl::encoding::Context) -> usize {
20283 8
20284 }
20285 }
20286
20287 unsafe impl<D: fidl::encoding::ResourceDialect>
20288 fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D>
20289 for &PaddingEndOfOutOfLineObject7Byte
20290 {
20291 #[inline]
20292 unsafe fn encode(
20293 self,
20294 encoder: &mut fidl::encoding::Encoder<'_, D>,
20295 offset: usize,
20296 _depth: fidl::encoding::Depth,
20297 ) -> fidl::Result<()> {
20298 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20299 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject7Byte, D>::encode(
20301 (<fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20302 &self.out_of_line,
20303 ),),
20304 encoder,
20305 offset,
20306 _depth,
20307 )
20308 }
20309 }
20310 unsafe impl<
20311 D: fidl::encoding::ResourceDialect,
20312 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
20313 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D> for (T0,)
20314 {
20315 #[inline]
20316 unsafe fn encode(
20317 self,
20318 encoder: &mut fidl::encoding::Encoder<'_, D>,
20319 offset: usize,
20320 depth: fidl::encoding::Depth,
20321 ) -> fidl::Result<()> {
20322 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20323 self.0.encode(encoder, offset + 0, depth)?;
20327 Ok(())
20328 }
20329 }
20330
20331 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20332 for PaddingEndOfOutOfLineObject7Byte
20333 {
20334 #[inline(always)]
20335 fn new_empty() -> Self {
20336 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D) }
20337 }
20338
20339 #[inline]
20340 unsafe fn decode(
20341 &mut self,
20342 decoder: &mut fidl::encoding::Decoder<'_, D>,
20343 offset: usize,
20344 _depth: fidl::encoding::Depth,
20345 ) -> fidl::Result<()> {
20346 decoder.debug_check_bounds::<Self>(offset);
20347 fidl::decode!(
20349 fidl::encoding::Boxed<Struct7Byte>,
20350 D,
20351 &mut self.out_of_line,
20352 decoder,
20353 offset + 0,
20354 _depth
20355 )?;
20356 Ok(())
20357 }
20358 }
20359
20360 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20361 type Borrowed<'a> = &'a Self;
20362 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20363 value
20364 }
20365 }
20366
20367 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20368 type Owned = Self;
20369
20370 #[inline(always)]
20371 fn inline_align(_context: fidl::encoding::Context) -> usize {
20372 8
20373 }
20374
20375 #[inline(always)]
20376 fn inline_size(_context: fidl::encoding::Context) -> usize {
20377 16
20378 }
20379 }
20380
20381 unsafe impl<D: fidl::encoding::ResourceDialect>
20382 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D>
20383 for &PaddingInBetweenOutOfLineObjects1Byte
20384 {
20385 #[inline]
20386 unsafe fn encode(
20387 self,
20388 encoder: &mut fidl::encoding::Encoder<'_, D>,
20389 offset: usize,
20390 _depth: fidl::encoding::Depth,
20391 ) -> fidl::Result<()> {
20392 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20393 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects1Byte, D>::encode(
20395 (
20396 <fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20397 &self.first,
20398 ),
20399 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20400 &self.second,
20401 ),
20402 ),
20403 encoder,
20404 offset,
20405 _depth,
20406 )
20407 }
20408 }
20409 unsafe impl<
20410 D: fidl::encoding::ResourceDialect,
20411 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
20412 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20413 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D> for (T0, T1)
20414 {
20415 #[inline]
20416 unsafe fn encode(
20417 self,
20418 encoder: &mut fidl::encoding::Encoder<'_, D>,
20419 offset: usize,
20420 depth: fidl::encoding::Depth,
20421 ) -> fidl::Result<()> {
20422 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20423 self.0.encode(encoder, offset + 0, depth)?;
20427 self.1.encode(encoder, offset + 8, depth)?;
20428 Ok(())
20429 }
20430 }
20431
20432 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20433 for PaddingInBetweenOutOfLineObjects1Byte
20434 {
20435 #[inline(always)]
20436 fn new_empty() -> Self {
20437 Self {
20438 first: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D),
20439 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20440 }
20441 }
20442
20443 #[inline]
20444 unsafe fn decode(
20445 &mut self,
20446 decoder: &mut fidl::encoding::Decoder<'_, D>,
20447 offset: usize,
20448 _depth: fidl::encoding::Depth,
20449 ) -> fidl::Result<()> {
20450 decoder.debug_check_bounds::<Self>(offset);
20451 fidl::decode!(
20453 fidl::encoding::Boxed<Struct1Byte>,
20454 D,
20455 &mut self.first,
20456 decoder,
20457 offset + 0,
20458 _depth
20459 )?;
20460 fidl::decode!(
20461 fidl::encoding::Boxed<Struct8Byte>,
20462 D,
20463 &mut self.second,
20464 decoder,
20465 offset + 8,
20466 _depth
20467 )?;
20468 Ok(())
20469 }
20470 }
20471
20472 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20473 type Borrowed<'a> = &'a Self;
20474 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20475 value
20476 }
20477 }
20478
20479 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20480 type Owned = Self;
20481
20482 #[inline(always)]
20483 fn inline_align(_context: fidl::encoding::Context) -> usize {
20484 8
20485 }
20486
20487 #[inline(always)]
20488 fn inline_size(_context: fidl::encoding::Context) -> usize {
20489 16
20490 }
20491 }
20492
20493 unsafe impl<D: fidl::encoding::ResourceDialect>
20494 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D>
20495 for &PaddingInBetweenOutOfLineObjects2Byte
20496 {
20497 #[inline]
20498 unsafe fn encode(
20499 self,
20500 encoder: &mut fidl::encoding::Encoder<'_, D>,
20501 offset: usize,
20502 _depth: fidl::encoding::Depth,
20503 ) -> fidl::Result<()> {
20504 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20505 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects2Byte, D>::encode(
20507 (
20508 <fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20509 &self.first,
20510 ),
20511 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20512 &self.second,
20513 ),
20514 ),
20515 encoder,
20516 offset,
20517 _depth,
20518 )
20519 }
20520 }
20521 unsafe impl<
20522 D: fidl::encoding::ResourceDialect,
20523 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
20524 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20525 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D> for (T0, T1)
20526 {
20527 #[inline]
20528 unsafe fn encode(
20529 self,
20530 encoder: &mut fidl::encoding::Encoder<'_, D>,
20531 offset: usize,
20532 depth: fidl::encoding::Depth,
20533 ) -> fidl::Result<()> {
20534 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20535 self.0.encode(encoder, offset + 0, depth)?;
20539 self.1.encode(encoder, offset + 8, depth)?;
20540 Ok(())
20541 }
20542 }
20543
20544 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20545 for PaddingInBetweenOutOfLineObjects2Byte
20546 {
20547 #[inline(always)]
20548 fn new_empty() -> Self {
20549 Self {
20550 first: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D),
20551 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20552 }
20553 }
20554
20555 #[inline]
20556 unsafe fn decode(
20557 &mut self,
20558 decoder: &mut fidl::encoding::Decoder<'_, D>,
20559 offset: usize,
20560 _depth: fidl::encoding::Depth,
20561 ) -> fidl::Result<()> {
20562 decoder.debug_check_bounds::<Self>(offset);
20563 fidl::decode!(
20565 fidl::encoding::Boxed<Struct2Byte>,
20566 D,
20567 &mut self.first,
20568 decoder,
20569 offset + 0,
20570 _depth
20571 )?;
20572 fidl::decode!(
20573 fidl::encoding::Boxed<Struct8Byte>,
20574 D,
20575 &mut self.second,
20576 decoder,
20577 offset + 8,
20578 _depth
20579 )?;
20580 Ok(())
20581 }
20582 }
20583
20584 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20585 type Borrowed<'a> = &'a Self;
20586 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20587 value
20588 }
20589 }
20590
20591 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20592 type Owned = Self;
20593
20594 #[inline(always)]
20595 fn inline_align(_context: fidl::encoding::Context) -> usize {
20596 8
20597 }
20598
20599 #[inline(always)]
20600 fn inline_size(_context: fidl::encoding::Context) -> usize {
20601 16
20602 }
20603 }
20604
20605 unsafe impl<D: fidl::encoding::ResourceDialect>
20606 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D>
20607 for &PaddingInBetweenOutOfLineObjects3Byte
20608 {
20609 #[inline]
20610 unsafe fn encode(
20611 self,
20612 encoder: &mut fidl::encoding::Encoder<'_, D>,
20613 offset: usize,
20614 _depth: fidl::encoding::Depth,
20615 ) -> fidl::Result<()> {
20616 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20617 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects3Byte, D>::encode(
20619 (
20620 <fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20621 &self.first,
20622 ),
20623 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20624 &self.second,
20625 ),
20626 ),
20627 encoder,
20628 offset,
20629 _depth,
20630 )
20631 }
20632 }
20633 unsafe impl<
20634 D: fidl::encoding::ResourceDialect,
20635 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
20636 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20637 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D> for (T0, T1)
20638 {
20639 #[inline]
20640 unsafe fn encode(
20641 self,
20642 encoder: &mut fidl::encoding::Encoder<'_, D>,
20643 offset: usize,
20644 depth: fidl::encoding::Depth,
20645 ) -> fidl::Result<()> {
20646 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20647 self.0.encode(encoder, offset + 0, depth)?;
20651 self.1.encode(encoder, offset + 8, depth)?;
20652 Ok(())
20653 }
20654 }
20655
20656 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20657 for PaddingInBetweenOutOfLineObjects3Byte
20658 {
20659 #[inline(always)]
20660 fn new_empty() -> Self {
20661 Self {
20662 first: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D),
20663 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20664 }
20665 }
20666
20667 #[inline]
20668 unsafe fn decode(
20669 &mut self,
20670 decoder: &mut fidl::encoding::Decoder<'_, D>,
20671 offset: usize,
20672 _depth: fidl::encoding::Depth,
20673 ) -> fidl::Result<()> {
20674 decoder.debug_check_bounds::<Self>(offset);
20675 fidl::decode!(
20677 fidl::encoding::Boxed<Struct3Byte>,
20678 D,
20679 &mut self.first,
20680 decoder,
20681 offset + 0,
20682 _depth
20683 )?;
20684 fidl::decode!(
20685 fidl::encoding::Boxed<Struct8Byte>,
20686 D,
20687 &mut self.second,
20688 decoder,
20689 offset + 8,
20690 _depth
20691 )?;
20692 Ok(())
20693 }
20694 }
20695
20696 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20697 type Borrowed<'a> = &'a Self;
20698 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20699 value
20700 }
20701 }
20702
20703 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20704 type Owned = Self;
20705
20706 #[inline(always)]
20707 fn inline_align(_context: fidl::encoding::Context) -> usize {
20708 8
20709 }
20710
20711 #[inline(always)]
20712 fn inline_size(_context: fidl::encoding::Context) -> usize {
20713 16
20714 }
20715 }
20716
20717 unsafe impl<D: fidl::encoding::ResourceDialect>
20718 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D>
20719 for &PaddingInBetweenOutOfLineObjects4Byte
20720 {
20721 #[inline]
20722 unsafe fn encode(
20723 self,
20724 encoder: &mut fidl::encoding::Encoder<'_, D>,
20725 offset: usize,
20726 _depth: fidl::encoding::Depth,
20727 ) -> fidl::Result<()> {
20728 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20729 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects4Byte, D>::encode(
20731 (
20732 <fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20733 &self.first,
20734 ),
20735 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20736 &self.second,
20737 ),
20738 ),
20739 encoder,
20740 offset,
20741 _depth,
20742 )
20743 }
20744 }
20745 unsafe impl<
20746 D: fidl::encoding::ResourceDialect,
20747 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20748 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20749 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D> for (T0, T1)
20750 {
20751 #[inline]
20752 unsafe fn encode(
20753 self,
20754 encoder: &mut fidl::encoding::Encoder<'_, D>,
20755 offset: usize,
20756 depth: fidl::encoding::Depth,
20757 ) -> fidl::Result<()> {
20758 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20759 self.0.encode(encoder, offset + 0, depth)?;
20763 self.1.encode(encoder, offset + 8, depth)?;
20764 Ok(())
20765 }
20766 }
20767
20768 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20769 for PaddingInBetweenOutOfLineObjects4Byte
20770 {
20771 #[inline(always)]
20772 fn new_empty() -> Self {
20773 Self {
20774 first: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D),
20775 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20776 }
20777 }
20778
20779 #[inline]
20780 unsafe fn decode(
20781 &mut self,
20782 decoder: &mut fidl::encoding::Decoder<'_, D>,
20783 offset: usize,
20784 _depth: fidl::encoding::Depth,
20785 ) -> fidl::Result<()> {
20786 decoder.debug_check_bounds::<Self>(offset);
20787 fidl::decode!(
20789 fidl::encoding::Boxed<Struct4Byte>,
20790 D,
20791 &mut self.first,
20792 decoder,
20793 offset + 0,
20794 _depth
20795 )?;
20796 fidl::decode!(
20797 fidl::encoding::Boxed<Struct8Byte>,
20798 D,
20799 &mut self.second,
20800 decoder,
20801 offset + 8,
20802 _depth
20803 )?;
20804 Ok(())
20805 }
20806 }
20807
20808 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
20809 type Borrowed<'a> = &'a Self;
20810 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20811 value
20812 }
20813 }
20814
20815 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
20816 type Owned = Self;
20817
20818 #[inline(always)]
20819 fn inline_align(_context: fidl::encoding::Context) -> usize {
20820 8
20821 }
20822
20823 #[inline(always)]
20824 fn inline_size(_context: fidl::encoding::Context) -> usize {
20825 16
20826 }
20827 }
20828
20829 unsafe impl<D: fidl::encoding::ResourceDialect>
20830 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D>
20831 for &PaddingInBetweenOutOfLineObjects5Byte
20832 {
20833 #[inline]
20834 unsafe fn encode(
20835 self,
20836 encoder: &mut fidl::encoding::Encoder<'_, D>,
20837 offset: usize,
20838 _depth: fidl::encoding::Depth,
20839 ) -> fidl::Result<()> {
20840 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
20841 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects5Byte, D>::encode(
20843 (
20844 <fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20845 &self.first,
20846 ),
20847 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20848 &self.second,
20849 ),
20850 ),
20851 encoder,
20852 offset,
20853 _depth,
20854 )
20855 }
20856 }
20857 unsafe impl<
20858 D: fidl::encoding::ResourceDialect,
20859 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
20860 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20861 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D> for (T0, T1)
20862 {
20863 #[inline]
20864 unsafe fn encode(
20865 self,
20866 encoder: &mut fidl::encoding::Encoder<'_, D>,
20867 offset: usize,
20868 depth: fidl::encoding::Depth,
20869 ) -> fidl::Result<()> {
20870 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
20871 self.0.encode(encoder, offset + 0, depth)?;
20875 self.1.encode(encoder, offset + 8, depth)?;
20876 Ok(())
20877 }
20878 }
20879
20880 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20881 for PaddingInBetweenOutOfLineObjects5Byte
20882 {
20883 #[inline(always)]
20884 fn new_empty() -> Self {
20885 Self {
20886 first: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D),
20887 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20888 }
20889 }
20890
20891 #[inline]
20892 unsafe fn decode(
20893 &mut self,
20894 decoder: &mut fidl::encoding::Decoder<'_, D>,
20895 offset: usize,
20896 _depth: fidl::encoding::Depth,
20897 ) -> fidl::Result<()> {
20898 decoder.debug_check_bounds::<Self>(offset);
20899 fidl::decode!(
20901 fidl::encoding::Boxed<Struct5Byte>,
20902 D,
20903 &mut self.first,
20904 decoder,
20905 offset + 0,
20906 _depth
20907 )?;
20908 fidl::decode!(
20909 fidl::encoding::Boxed<Struct8Byte>,
20910 D,
20911 &mut self.second,
20912 decoder,
20913 offset + 8,
20914 _depth
20915 )?;
20916 Ok(())
20917 }
20918 }
20919
20920 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
20921 type Borrowed<'a> = &'a Self;
20922 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20923 value
20924 }
20925 }
20926
20927 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
20928 type Owned = Self;
20929
20930 #[inline(always)]
20931 fn inline_align(_context: fidl::encoding::Context) -> usize {
20932 8
20933 }
20934
20935 #[inline(always)]
20936 fn inline_size(_context: fidl::encoding::Context) -> usize {
20937 16
20938 }
20939 }
20940
20941 unsafe impl<D: fidl::encoding::ResourceDialect>
20942 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D>
20943 for &PaddingInBetweenOutOfLineObjects6Byte
20944 {
20945 #[inline]
20946 unsafe fn encode(
20947 self,
20948 encoder: &mut fidl::encoding::Encoder<'_, D>,
20949 offset: usize,
20950 _depth: fidl::encoding::Depth,
20951 ) -> fidl::Result<()> {
20952 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
20953 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects6Byte, D>::encode(
20955 (
20956 <fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20957 &self.first,
20958 ),
20959 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20960 &self.second,
20961 ),
20962 ),
20963 encoder,
20964 offset,
20965 _depth,
20966 )
20967 }
20968 }
20969 unsafe impl<
20970 D: fidl::encoding::ResourceDialect,
20971 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
20972 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20973 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D> for (T0, T1)
20974 {
20975 #[inline]
20976 unsafe fn encode(
20977 self,
20978 encoder: &mut fidl::encoding::Encoder<'_, D>,
20979 offset: usize,
20980 depth: fidl::encoding::Depth,
20981 ) -> fidl::Result<()> {
20982 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
20983 self.0.encode(encoder, offset + 0, depth)?;
20987 self.1.encode(encoder, offset + 8, depth)?;
20988 Ok(())
20989 }
20990 }
20991
20992 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20993 for PaddingInBetweenOutOfLineObjects6Byte
20994 {
20995 #[inline(always)]
20996 fn new_empty() -> Self {
20997 Self {
20998 first: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D),
20999 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21000 }
21001 }
21002
21003 #[inline]
21004 unsafe fn decode(
21005 &mut self,
21006 decoder: &mut fidl::encoding::Decoder<'_, D>,
21007 offset: usize,
21008 _depth: fidl::encoding::Depth,
21009 ) -> fidl::Result<()> {
21010 decoder.debug_check_bounds::<Self>(offset);
21011 fidl::decode!(
21013 fidl::encoding::Boxed<Struct6Byte>,
21014 D,
21015 &mut self.first,
21016 decoder,
21017 offset + 0,
21018 _depth
21019 )?;
21020 fidl::decode!(
21021 fidl::encoding::Boxed<Struct8Byte>,
21022 D,
21023 &mut self.second,
21024 decoder,
21025 offset + 8,
21026 _depth
21027 )?;
21028 Ok(())
21029 }
21030 }
21031
21032 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21033 type Borrowed<'a> = &'a Self;
21034 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21035 value
21036 }
21037 }
21038
21039 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21040 type Owned = Self;
21041
21042 #[inline(always)]
21043 fn inline_align(_context: fidl::encoding::Context) -> usize {
21044 8
21045 }
21046
21047 #[inline(always)]
21048 fn inline_size(_context: fidl::encoding::Context) -> usize {
21049 16
21050 }
21051 }
21052
21053 unsafe impl<D: fidl::encoding::ResourceDialect>
21054 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D>
21055 for &PaddingInBetweenOutOfLineObjects7Byte
21056 {
21057 #[inline]
21058 unsafe fn encode(
21059 self,
21060 encoder: &mut fidl::encoding::Encoder<'_, D>,
21061 offset: usize,
21062 _depth: fidl::encoding::Depth,
21063 ) -> fidl::Result<()> {
21064 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21065 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects7Byte, D>::encode(
21067 (
21068 <fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21069 &self.first,
21070 ),
21071 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21072 &self.second,
21073 ),
21074 ),
21075 encoder,
21076 offset,
21077 _depth,
21078 )
21079 }
21080 }
21081 unsafe impl<
21082 D: fidl::encoding::ResourceDialect,
21083 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
21084 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21085 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D> for (T0, T1)
21086 {
21087 #[inline]
21088 unsafe fn encode(
21089 self,
21090 encoder: &mut fidl::encoding::Encoder<'_, D>,
21091 offset: usize,
21092 depth: fidl::encoding::Depth,
21093 ) -> fidl::Result<()> {
21094 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21095 self.0.encode(encoder, offset + 0, depth)?;
21099 self.1.encode(encoder, offset + 8, depth)?;
21100 Ok(())
21101 }
21102 }
21103
21104 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21105 for PaddingInBetweenOutOfLineObjects7Byte
21106 {
21107 #[inline(always)]
21108 fn new_empty() -> Self {
21109 Self {
21110 first: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D),
21111 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21112 }
21113 }
21114
21115 #[inline]
21116 unsafe fn decode(
21117 &mut self,
21118 decoder: &mut fidl::encoding::Decoder<'_, D>,
21119 offset: usize,
21120 _depth: fidl::encoding::Depth,
21121 ) -> fidl::Result<()> {
21122 decoder.debug_check_bounds::<Self>(offset);
21123 fidl::decode!(
21125 fidl::encoding::Boxed<Struct7Byte>,
21126 D,
21127 &mut self.first,
21128 decoder,
21129 offset + 0,
21130 _depth
21131 )?;
21132 fidl::decode!(
21133 fidl::encoding::Boxed<Struct8Byte>,
21134 D,
21135 &mut self.second,
21136 decoder,
21137 offset + 8,
21138 _depth
21139 )?;
21140 Ok(())
21141 }
21142 }
21143
21144 impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStruct {
21145 type Borrowed<'a> = &'a Self;
21146 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21147 value
21148 }
21149 }
21150
21151 unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStruct {
21152 type Owned = Self;
21153
21154 #[inline(always)]
21155 fn inline_align(_context: fidl::encoding::Context) -> usize {
21156 8
21157 }
21158
21159 #[inline(always)]
21160 fn inline_size(_context: fidl::encoding::Context) -> usize {
21161 8
21162 }
21163 }
21164
21165 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveEmptyStruct, D>
21166 for &RecursiveEmptyStruct
21167 {
21168 #[inline]
21169 unsafe fn encode(
21170 self,
21171 encoder: &mut fidl::encoding::Encoder<'_, D>,
21172 offset: usize,
21173 _depth: fidl::encoding::Depth,
21174 ) -> fidl::Result<()> {
21175 encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21176 fidl::encoding::Encode::<RecursiveEmptyStruct, D>::encode(
21178 (
21179 <fidl::encoding::Boxed<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21180 ),
21181 encoder, offset, _depth
21182 )
21183 }
21184 }
21185 unsafe impl<
21186 D: fidl::encoding::ResourceDialect,
21187 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveEmptyStruct>, D>,
21188 > fidl::encoding::Encode<RecursiveEmptyStruct, D> for (T0,)
21189 {
21190 #[inline]
21191 unsafe fn encode(
21192 self,
21193 encoder: &mut fidl::encoding::Encoder<'_, D>,
21194 offset: usize,
21195 depth: fidl::encoding::Depth,
21196 ) -> fidl::Result<()> {
21197 encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21198 self.0.encode(encoder, offset + 0, depth)?;
21202 Ok(())
21203 }
21204 }
21205
21206 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveEmptyStruct {
21207 #[inline(always)]
21208 fn new_empty() -> Self {
21209 Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveEmptyStruct>, D) }
21210 }
21211
21212 #[inline]
21213 unsafe fn decode(
21214 &mut self,
21215 decoder: &mut fidl::encoding::Decoder<'_, D>,
21216 offset: usize,
21217 _depth: fidl::encoding::Depth,
21218 ) -> fidl::Result<()> {
21219 decoder.debug_check_bounds::<Self>(offset);
21220 fidl::decode!(
21222 fidl::encoding::Boxed<RecursiveEmptyStruct>,
21223 D,
21224 &mut self.inner,
21225 decoder,
21226 offset + 0,
21227 _depth
21228 )?;
21229 Ok(())
21230 }
21231 }
21232
21233 impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructArrayWrapper {
21234 type Borrowed<'a> = &'a Self;
21235 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21236 value
21237 }
21238 }
21239
21240 unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructArrayWrapper {
21241 type Owned = Self;
21242
21243 #[inline(always)]
21244 fn inline_align(_context: fidl::encoding::Context) -> usize {
21245 8
21246 }
21247
21248 #[inline(always)]
21249 fn inline_size(_context: fidl::encoding::Context) -> usize {
21250 8
21251 }
21252 }
21253
21254 unsafe impl<D: fidl::encoding::ResourceDialect>
21255 fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D>
21256 for &RecursiveEmptyStructArrayWrapper
21257 {
21258 #[inline]
21259 unsafe fn encode(
21260 self,
21261 encoder: &mut fidl::encoding::Encoder<'_, D>,
21262 offset: usize,
21263 _depth: fidl::encoding::Depth,
21264 ) -> fidl::Result<()> {
21265 encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21266 fidl::encoding::Encode::<RecursiveEmptyStructArrayWrapper, D>::encode(
21268 (
21269 <fidl::encoding::Array<RecursiveEmptyStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
21270 ),
21271 encoder, offset, _depth
21272 )
21273 }
21274 }
21275 unsafe impl<
21276 D: fidl::encoding::ResourceDialect,
21277 T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveEmptyStruct, 1>, D>,
21278 > fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D> for (T0,)
21279 {
21280 #[inline]
21281 unsafe fn encode(
21282 self,
21283 encoder: &mut fidl::encoding::Encoder<'_, D>,
21284 offset: usize,
21285 depth: fidl::encoding::Depth,
21286 ) -> fidl::Result<()> {
21287 encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21288 self.0.encode(encoder, offset + 0, depth)?;
21292 Ok(())
21293 }
21294 }
21295
21296 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21297 for RecursiveEmptyStructArrayWrapper
21298 {
21299 #[inline(always)]
21300 fn new_empty() -> Self {
21301 Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D) }
21302 }
21303
21304 #[inline]
21305 unsafe fn decode(
21306 &mut self,
21307 decoder: &mut fidl::encoding::Decoder<'_, D>,
21308 offset: usize,
21309 _depth: fidl::encoding::Depth,
21310 ) -> fidl::Result<()> {
21311 decoder.debug_check_bounds::<Self>(offset);
21312 fidl::decode!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
21314 Ok(())
21315 }
21316 }
21317
21318 impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructVectorWrapper {
21319 type Borrowed<'a> = &'a Self;
21320 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21321 value
21322 }
21323 }
21324
21325 unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructVectorWrapper {
21326 type Owned = Self;
21327
21328 #[inline(always)]
21329 fn inline_align(_context: fidl::encoding::Context) -> usize {
21330 8
21331 }
21332
21333 #[inline(always)]
21334 fn inline_size(_context: fidl::encoding::Context) -> usize {
21335 16
21336 }
21337 }
21338
21339 unsafe impl<D: fidl::encoding::ResourceDialect>
21340 fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D>
21341 for &RecursiveEmptyStructVectorWrapper
21342 {
21343 #[inline]
21344 unsafe fn encode(
21345 self,
21346 encoder: &mut fidl::encoding::Encoder<'_, D>,
21347 offset: usize,
21348 _depth: fidl::encoding::Depth,
21349 ) -> fidl::Result<()> {
21350 encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21351 fidl::encoding::Encode::<RecursiveEmptyStructVectorWrapper, D>::encode(
21353 (
21354 <fidl::encoding::UnboundedVector<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21355 ),
21356 encoder, offset, _depth
21357 )
21358 }
21359 }
21360 unsafe impl<
21361 D: fidl::encoding::ResourceDialect,
21362 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D>,
21363 > fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D> for (T0,)
21364 {
21365 #[inline]
21366 unsafe fn encode(
21367 self,
21368 encoder: &mut fidl::encoding::Encoder<'_, D>,
21369 offset: usize,
21370 depth: fidl::encoding::Depth,
21371 ) -> fidl::Result<()> {
21372 encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21373 self.0.encode(encoder, offset + 0, depth)?;
21377 Ok(())
21378 }
21379 }
21380
21381 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21382 for RecursiveEmptyStructVectorWrapper
21383 {
21384 #[inline(always)]
21385 fn new_empty() -> Self {
21386 Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D) }
21387 }
21388
21389 #[inline]
21390 unsafe fn decode(
21391 &mut self,
21392 decoder: &mut fidl::encoding::Decoder<'_, D>,
21393 offset: usize,
21394 _depth: fidl::encoding::Depth,
21395 ) -> fidl::Result<()> {
21396 decoder.debug_check_bounds::<Self>(offset);
21397 fidl::decode!(
21399 fidl::encoding::UnboundedVector<RecursiveEmptyStruct>,
21400 D,
21401 &mut self.vec,
21402 decoder,
21403 offset + 0,
21404 _depth
21405 )?;
21406 Ok(())
21407 }
21408 }
21409
21410 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTableStruct {
21411 type Borrowed<'a> = &'a Self;
21412 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21413 value
21414 }
21415 }
21416
21417 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTableStruct {
21418 type Owned = Self;
21419
21420 #[inline(always)]
21421 fn inline_align(_context: fidl::encoding::Context) -> usize {
21422 8
21423 }
21424
21425 #[inline(always)]
21426 fn inline_size(_context: fidl::encoding::Context) -> usize {
21427 16
21428 }
21429 }
21430
21431 unsafe impl<D: fidl::encoding::ResourceDialect>
21432 fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D>
21433 for &RecursiveOptionalAndTableStruct
21434 {
21435 #[inline]
21436 unsafe fn encode(
21437 self,
21438 encoder: &mut fidl::encoding::Encoder<'_, D>,
21439 offset: usize,
21440 _depth: fidl::encoding::Depth,
21441 ) -> fidl::Result<()> {
21442 encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21443 fidl::encoding::Encode::<RecursiveOptionalAndTableStruct, D>::encode(
21445 (<RecursiveOptionalAndTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
21446 encoder,
21447 offset,
21448 _depth,
21449 )
21450 }
21451 }
21452 unsafe impl<
21453 D: fidl::encoding::ResourceDialect,
21454 T0: fidl::encoding::Encode<RecursiveOptionalAndTable, D>,
21455 > fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D> for (T0,)
21456 {
21457 #[inline]
21458 unsafe fn encode(
21459 self,
21460 encoder: &mut fidl::encoding::Encoder<'_, D>,
21461 offset: usize,
21462 depth: fidl::encoding::Depth,
21463 ) -> fidl::Result<()> {
21464 encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21465 self.0.encode(encoder, offset + 0, depth)?;
21469 Ok(())
21470 }
21471 }
21472
21473 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21474 for RecursiveOptionalAndTableStruct
21475 {
21476 #[inline(always)]
21477 fn new_empty() -> Self {
21478 Self { t: fidl::new_empty!(RecursiveOptionalAndTable, D) }
21479 }
21480
21481 #[inline]
21482 unsafe fn decode(
21483 &mut self,
21484 decoder: &mut fidl::encoding::Decoder<'_, D>,
21485 offset: usize,
21486 _depth: fidl::encoding::Depth,
21487 ) -> fidl::Result<()> {
21488 decoder.debug_check_bounds::<Self>(offset);
21489 fidl::decode!(RecursiveOptionalAndTable, D, &mut self.t, decoder, offset + 0, _depth)?;
21491 Ok(())
21492 }
21493 }
21494
21495 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnionStruct {
21496 type Borrowed<'a> = &'a Self;
21497 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21498 value
21499 }
21500 }
21501
21502 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnionStruct {
21503 type Owned = Self;
21504
21505 #[inline(always)]
21506 fn inline_align(_context: fidl::encoding::Context) -> usize {
21507 8
21508 }
21509
21510 #[inline(always)]
21511 fn inline_size(_context: fidl::encoding::Context) -> usize {
21512 16
21513 }
21514 }
21515
21516 unsafe impl<D: fidl::encoding::ResourceDialect>
21517 fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D>
21518 for &RecursiveOptionalAndUnionStruct
21519 {
21520 #[inline]
21521 unsafe fn encode(
21522 self,
21523 encoder: &mut fidl::encoding::Encoder<'_, D>,
21524 offset: usize,
21525 _depth: fidl::encoding::Depth,
21526 ) -> fidl::Result<()> {
21527 encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21528 fidl::encoding::Encode::<RecursiveOptionalAndUnionStruct, D>::encode(
21530 (<RecursiveOptionalAndUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
21531 encoder,
21532 offset,
21533 _depth,
21534 )
21535 }
21536 }
21537 unsafe impl<
21538 D: fidl::encoding::ResourceDialect,
21539 T0: fidl::encoding::Encode<RecursiveOptionalAndUnion, D>,
21540 > fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D> for (T0,)
21541 {
21542 #[inline]
21543 unsafe fn encode(
21544 self,
21545 encoder: &mut fidl::encoding::Encoder<'_, D>,
21546 offset: usize,
21547 depth: fidl::encoding::Depth,
21548 ) -> fidl::Result<()> {
21549 encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21550 self.0.encode(encoder, offset + 0, depth)?;
21554 Ok(())
21555 }
21556 }
21557
21558 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21559 for RecursiveOptionalAndUnionStruct
21560 {
21561 #[inline(always)]
21562 fn new_empty() -> Self {
21563 Self { u: fidl::new_empty!(RecursiveOptionalAndUnion, D) }
21564 }
21565
21566 #[inline]
21567 unsafe fn decode(
21568 &mut self,
21569 decoder: &mut fidl::encoding::Decoder<'_, D>,
21570 offset: usize,
21571 _depth: fidl::encoding::Depth,
21572 ) -> fidl::Result<()> {
21573 decoder.debug_check_bounds::<Self>(offset);
21574 fidl::decode!(RecursiveOptionalAndUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
21576 Ok(())
21577 }
21578 }
21579
21580 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndVectorStruct {
21581 type Borrowed<'a> = &'a Self;
21582 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21583 value
21584 }
21585 }
21586
21587 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndVectorStruct {
21588 type Owned = Self;
21589
21590 #[inline(always)]
21591 fn inline_align(_context: fidl::encoding::Context) -> usize {
21592 8
21593 }
21594
21595 #[inline(always)]
21596 fn inline_size(_context: fidl::encoding::Context) -> usize {
21597 16
21598 }
21599 }
21600
21601 unsafe impl<D: fidl::encoding::ResourceDialect>
21602 fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D>
21603 for &RecursiveOptionalAndVectorStruct
21604 {
21605 #[inline]
21606 unsafe fn encode(
21607 self,
21608 encoder: &mut fidl::encoding::Encoder<'_, D>,
21609 offset: usize,
21610 _depth: fidl::encoding::Depth,
21611 ) -> fidl::Result<()> {
21612 encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21613 fidl::encoding::Encode::<RecursiveOptionalAndVectorStruct, D>::encode(
21615 (
21616 <fidl::encoding::UnboundedVector<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21617 ),
21618 encoder, offset, _depth
21619 )
21620 }
21621 }
21622 unsafe impl<
21623 D: fidl::encoding::ResourceDialect,
21624 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D>,
21625 > fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D> for (T0,)
21626 {
21627 #[inline]
21628 unsafe fn encode(
21629 self,
21630 encoder: &mut fidl::encoding::Encoder<'_, D>,
21631 offset: usize,
21632 depth: fidl::encoding::Depth,
21633 ) -> fidl::Result<()> {
21634 encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21635 self.0.encode(encoder, offset + 0, depth)?;
21639 Ok(())
21640 }
21641 }
21642
21643 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21644 for RecursiveOptionalAndVectorStruct
21645 {
21646 #[inline(always)]
21647 fn new_empty() -> Self {
21648 Self {
21649 vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D),
21650 }
21651 }
21652
21653 #[inline]
21654 unsafe fn decode(
21655 &mut self,
21656 decoder: &mut fidl::encoding::Decoder<'_, D>,
21657 offset: usize,
21658 _depth: fidl::encoding::Depth,
21659 ) -> fidl::Result<()> {
21660 decoder.debug_check_bounds::<Self>(offset);
21661 fidl::decode!(
21663 fidl::encoding::UnboundedVector<RecursiveOptionalStruct>,
21664 D,
21665 &mut self.vec,
21666 decoder,
21667 offset + 0,
21668 _depth
21669 )?;
21670 Ok(())
21671 }
21672 }
21673
21674 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalBasicStruct {
21675 type Borrowed<'a> = &'a Self;
21676 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21677 value
21678 }
21679 }
21680
21681 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalBasicStruct {
21682 type Owned = Self;
21683
21684 #[inline(always)]
21685 fn inline_align(_context: fidl::encoding::Context) -> usize {
21686 8
21687 }
21688
21689 #[inline(always)]
21690 fn inline_size(_context: fidl::encoding::Context) -> usize {
21691 8
21692 }
21693 }
21694
21695 unsafe impl<D: fidl::encoding::ResourceDialect>
21696 fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for &RecursiveOptionalBasicStruct
21697 {
21698 #[inline]
21699 unsafe fn encode(
21700 self,
21701 encoder: &mut fidl::encoding::Encoder<'_, D>,
21702 offset: usize,
21703 _depth: fidl::encoding::Depth,
21704 ) -> fidl::Result<()> {
21705 encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21706 fidl::encoding::Encode::<RecursiveOptionalBasicStruct, D>::encode(
21708 (
21709 <fidl::encoding::Boxed<RecursiveOptionalBasicStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21710 ),
21711 encoder, offset, _depth
21712 )
21713 }
21714 }
21715 unsafe impl<
21716 D: fidl::encoding::ResourceDialect,
21717 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D>,
21718 > fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for (T0,)
21719 {
21720 #[inline]
21721 unsafe fn encode(
21722 self,
21723 encoder: &mut fidl::encoding::Encoder<'_, D>,
21724 offset: usize,
21725 depth: fidl::encoding::Depth,
21726 ) -> fidl::Result<()> {
21727 encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21728 self.0.encode(encoder, offset + 0, depth)?;
21732 Ok(())
21733 }
21734 }
21735
21736 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21737 for RecursiveOptionalBasicStruct
21738 {
21739 #[inline(always)]
21740 fn new_empty() -> Self {
21741 Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D) }
21742 }
21743
21744 #[inline]
21745 unsafe fn decode(
21746 &mut self,
21747 decoder: &mut fidl::encoding::Decoder<'_, D>,
21748 offset: usize,
21749 _depth: fidl::encoding::Depth,
21750 ) -> fidl::Result<()> {
21751 decoder.debug_check_bounds::<Self>(offset);
21752 fidl::decode!(
21754 fidl::encoding::Boxed<RecursiveOptionalBasicStruct>,
21755 D,
21756 &mut self.inner,
21757 decoder,
21758 offset + 0,
21759 _depth
21760 )?;
21761 Ok(())
21762 }
21763 }
21764
21765 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStruct {
21766 type Borrowed<'a> = &'a Self;
21767 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21768 value
21769 }
21770 }
21771
21772 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStruct {
21773 type Owned = Self;
21774
21775 #[inline(always)]
21776 fn inline_align(_context: fidl::encoding::Context) -> usize {
21777 8
21778 }
21779
21780 #[inline(always)]
21781 fn inline_size(_context: fidl::encoding::Context) -> usize {
21782 8
21783 }
21784 }
21785
21786 unsafe impl<D: fidl::encoding::ResourceDialect>
21787 fidl::encoding::Encode<RecursiveOptionalStruct, D> for &RecursiveOptionalStruct
21788 {
21789 #[inline]
21790 unsafe fn encode(
21791 self,
21792 encoder: &mut fidl::encoding::Encoder<'_, D>,
21793 offset: usize,
21794 _depth: fidl::encoding::Depth,
21795 ) -> fidl::Result<()> {
21796 encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
21797 fidl::encoding::Encode::<RecursiveOptionalStruct, D>::encode(
21799 (
21800 <fidl::encoding::Boxed<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21801 ),
21802 encoder, offset, _depth
21803 )
21804 }
21805 }
21806 unsafe impl<
21807 D: fidl::encoding::ResourceDialect,
21808 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStruct>, D>,
21809 > fidl::encoding::Encode<RecursiveOptionalStruct, D> for (T0,)
21810 {
21811 #[inline]
21812 unsafe fn encode(
21813 self,
21814 encoder: &mut fidl::encoding::Encoder<'_, D>,
21815 offset: usize,
21816 depth: fidl::encoding::Depth,
21817 ) -> fidl::Result<()> {
21818 encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
21819 self.0.encode(encoder, offset + 0, depth)?;
21823 Ok(())
21824 }
21825 }
21826
21827 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21828 for RecursiveOptionalStruct
21829 {
21830 #[inline(always)]
21831 fn new_empty() -> Self {
21832 Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalStruct>, D) }
21833 }
21834
21835 #[inline]
21836 unsafe fn decode(
21837 &mut self,
21838 decoder: &mut fidl::encoding::Decoder<'_, D>,
21839 offset: usize,
21840 _depth: fidl::encoding::Depth,
21841 ) -> fidl::Result<()> {
21842 decoder.debug_check_bounds::<Self>(offset);
21843 fidl::decode!(
21845 fidl::encoding::Boxed<RecursiveOptionalStruct>,
21846 D,
21847 &mut self.inner,
21848 decoder,
21849 offset + 0,
21850 _depth
21851 )?;
21852 Ok(())
21853 }
21854 }
21855
21856 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructArrayWrapper {
21857 type Borrowed<'a> = &'a Self;
21858 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21859 value
21860 }
21861 }
21862
21863 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructArrayWrapper {
21864 type Owned = Self;
21865
21866 #[inline(always)]
21867 fn inline_align(_context: fidl::encoding::Context) -> usize {
21868 8
21869 }
21870
21871 #[inline(always)]
21872 fn inline_size(_context: fidl::encoding::Context) -> usize {
21873 8
21874 }
21875 }
21876
21877 unsafe impl<D: fidl::encoding::ResourceDialect>
21878 fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D>
21879 for &RecursiveOptionalStructArrayWrapper
21880 {
21881 #[inline]
21882 unsafe fn encode(
21883 self,
21884 encoder: &mut fidl::encoding::Encoder<'_, D>,
21885 offset: usize,
21886 _depth: fidl::encoding::Depth,
21887 ) -> fidl::Result<()> {
21888 encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
21889 fidl::encoding::Encode::<RecursiveOptionalStructArrayWrapper, D>::encode(
21891 (
21892 <fidl::encoding::Array<RecursiveOptionalStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
21893 ),
21894 encoder, offset, _depth
21895 )
21896 }
21897 }
21898 unsafe impl<
21899 D: fidl::encoding::ResourceDialect,
21900 T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveOptionalStruct, 1>, D>,
21901 > fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D> for (T0,)
21902 {
21903 #[inline]
21904 unsafe fn encode(
21905 self,
21906 encoder: &mut fidl::encoding::Encoder<'_, D>,
21907 offset: usize,
21908 depth: fidl::encoding::Depth,
21909 ) -> fidl::Result<()> {
21910 encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
21911 self.0.encode(encoder, offset + 0, depth)?;
21915 Ok(())
21916 }
21917 }
21918
21919 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21920 for RecursiveOptionalStructArrayWrapper
21921 {
21922 #[inline(always)]
21923 fn new_empty() -> Self {
21924 Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D) }
21925 }
21926
21927 #[inline]
21928 unsafe fn decode(
21929 &mut self,
21930 decoder: &mut fidl::encoding::Decoder<'_, D>,
21931 offset: usize,
21932 _depth: fidl::encoding::Depth,
21933 ) -> fidl::Result<()> {
21934 decoder.debug_check_bounds::<Self>(offset);
21935 fidl::decode!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
21937 Ok(())
21938 }
21939 }
21940
21941 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructWithString {
21942 type Borrowed<'a> = &'a Self;
21943 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21944 value
21945 }
21946 }
21947
21948 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructWithString {
21949 type Owned = Self;
21950
21951 #[inline(always)]
21952 fn inline_align(_context: fidl::encoding::Context) -> usize {
21953 8
21954 }
21955
21956 #[inline(always)]
21957 fn inline_size(_context: fidl::encoding::Context) -> usize {
21958 24
21959 }
21960 }
21961
21962 unsafe impl<D: fidl::encoding::ResourceDialect>
21963 fidl::encoding::Encode<RecursiveOptionalStructWithString, D>
21964 for &RecursiveOptionalStructWithString
21965 {
21966 #[inline]
21967 unsafe fn encode(
21968 self,
21969 encoder: &mut fidl::encoding::Encoder<'_, D>,
21970 offset: usize,
21971 _depth: fidl::encoding::Depth,
21972 ) -> fidl::Result<()> {
21973 encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
21974 fidl::encoding::Encode::<RecursiveOptionalStructWithString, D>::encode(
21976 (
21977 <fidl::encoding::Boxed<RecursiveOptionalStructWithString> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21978 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
21979 ),
21980 encoder, offset, _depth
21981 )
21982 }
21983 }
21984 unsafe impl<
21985 D: fidl::encoding::ResourceDialect,
21986 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStructWithString>, D>,
21987 T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
21988 > fidl::encoding::Encode<RecursiveOptionalStructWithString, D> for (T0, T1)
21989 {
21990 #[inline]
21991 unsafe fn encode(
21992 self,
21993 encoder: &mut fidl::encoding::Encoder<'_, D>,
21994 offset: usize,
21995 depth: fidl::encoding::Depth,
21996 ) -> fidl::Result<()> {
21997 encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
21998 self.0.encode(encoder, offset + 0, depth)?;
22002 self.1.encode(encoder, offset + 8, depth)?;
22003 Ok(())
22004 }
22005 }
22006
22007 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22008 for RecursiveOptionalStructWithString
22009 {
22010 #[inline(always)]
22011 fn new_empty() -> Self {
22012 Self {
22013 inner: fidl::new_empty!(
22014 fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22015 D
22016 ),
22017 str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
22018 }
22019 }
22020
22021 #[inline]
22022 unsafe fn decode(
22023 &mut self,
22024 decoder: &mut fidl::encoding::Decoder<'_, D>,
22025 offset: usize,
22026 _depth: fidl::encoding::Depth,
22027 ) -> fidl::Result<()> {
22028 decoder.debug_check_bounds::<Self>(offset);
22029 fidl::decode!(
22031 fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22032 D,
22033 &mut self.inner,
22034 decoder,
22035 offset + 0,
22036 _depth
22037 )?;
22038 fidl::decode!(
22039 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
22040 D,
22041 &mut self.str,
22042 decoder,
22043 offset + 8,
22044 _depth
22045 )?;
22046 Ok(())
22047 }
22048 }
22049
22050 impl fidl::encoding::ValueTypeMarker for RecursiveTableHolder {
22051 type Borrowed<'a> = &'a Self;
22052 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22053 value
22054 }
22055 }
22056
22057 unsafe impl fidl::encoding::TypeMarker for RecursiveTableHolder {
22058 type Owned = Self;
22059
22060 #[inline(always)]
22061 fn inline_align(_context: fidl::encoding::Context) -> usize {
22062 8
22063 }
22064
22065 #[inline(always)]
22066 fn inline_size(_context: fidl::encoding::Context) -> usize {
22067 16
22068 }
22069 }
22070
22071 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTableHolder, D>
22072 for &RecursiveTableHolder
22073 {
22074 #[inline]
22075 unsafe fn encode(
22076 self,
22077 encoder: &mut fidl::encoding::Encoder<'_, D>,
22078 offset: usize,
22079 _depth: fidl::encoding::Depth,
22080 ) -> fidl::Result<()> {
22081 encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22082 fidl::encoding::Encode::<RecursiveTableHolder, D>::encode(
22084 (<RecursiveTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
22085 encoder,
22086 offset,
22087 _depth,
22088 )
22089 }
22090 }
22091 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RecursiveTable, D>>
22092 fidl::encoding::Encode<RecursiveTableHolder, D> for (T0,)
22093 {
22094 #[inline]
22095 unsafe fn encode(
22096 self,
22097 encoder: &mut fidl::encoding::Encoder<'_, D>,
22098 offset: usize,
22099 depth: fidl::encoding::Depth,
22100 ) -> fidl::Result<()> {
22101 encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22102 self.0.encode(encoder, offset + 0, depth)?;
22106 Ok(())
22107 }
22108 }
22109
22110 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTableHolder {
22111 #[inline(always)]
22112 fn new_empty() -> Self {
22113 Self { t: fidl::new_empty!(RecursiveTable, D) }
22114 }
22115
22116 #[inline]
22117 unsafe fn decode(
22118 &mut self,
22119 decoder: &mut fidl::encoding::Decoder<'_, D>,
22120 offset: usize,
22121 _depth: fidl::encoding::Depth,
22122 ) -> fidl::Result<()> {
22123 decoder.debug_check_bounds::<Self>(offset);
22124 fidl::decode!(RecursiveTable, D, &mut self.t, decoder, offset + 0, _depth)?;
22126 Ok(())
22127 }
22128 }
22129
22130 impl fidl::encoding::ValueTypeMarker for RecursiveTableOptionalHolder {
22131 type Borrowed<'a> = &'a Self;
22132 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22133 value
22134 }
22135 }
22136
22137 unsafe impl fidl::encoding::TypeMarker for RecursiveTableOptionalHolder {
22138 type Owned = Self;
22139
22140 #[inline(always)]
22141 fn inline_align(_context: fidl::encoding::Context) -> usize {
22142 8
22143 }
22144
22145 #[inline(always)]
22146 fn inline_size(_context: fidl::encoding::Context) -> usize {
22147 8
22148 }
22149 }
22150
22151 unsafe impl<D: fidl::encoding::ResourceDialect>
22152 fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for &RecursiveTableOptionalHolder
22153 {
22154 #[inline]
22155 unsafe fn encode(
22156 self,
22157 encoder: &mut fidl::encoding::Encoder<'_, D>,
22158 offset: usize,
22159 _depth: fidl::encoding::Depth,
22160 ) -> fidl::Result<()> {
22161 encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22162 fidl::encoding::Encode::<RecursiveTableOptionalHolder, D>::encode(
22164 (
22165 <fidl::encoding::Boxed<RecursiveTableHolder> as fidl::encoding::ValueTypeMarker>::borrow(&self.o),
22166 ),
22167 encoder, offset, _depth
22168 )
22169 }
22170 }
22171 unsafe impl<
22172 D: fidl::encoding::ResourceDialect,
22173 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveTableHolder>, D>,
22174 > fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for (T0,)
22175 {
22176 #[inline]
22177 unsafe fn encode(
22178 self,
22179 encoder: &mut fidl::encoding::Encoder<'_, D>,
22180 offset: usize,
22181 depth: fidl::encoding::Depth,
22182 ) -> fidl::Result<()> {
22183 encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22184 self.0.encode(encoder, offset + 0, depth)?;
22188 Ok(())
22189 }
22190 }
22191
22192 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22193 for RecursiveTableOptionalHolder
22194 {
22195 #[inline(always)]
22196 fn new_empty() -> Self {
22197 Self { o: fidl::new_empty!(fidl::encoding::Boxed<RecursiveTableHolder>, D) }
22198 }
22199
22200 #[inline]
22201 unsafe fn decode(
22202 &mut self,
22203 decoder: &mut fidl::encoding::Decoder<'_, D>,
22204 offset: usize,
22205 _depth: fidl::encoding::Depth,
22206 ) -> fidl::Result<()> {
22207 decoder.debug_check_bounds::<Self>(offset);
22208 fidl::decode!(
22210 fidl::encoding::Boxed<RecursiveTableHolder>,
22211 D,
22212 &mut self.o,
22213 decoder,
22214 offset + 0,
22215 _depth
22216 )?;
22217 Ok(())
22218 }
22219 }
22220
22221 impl fidl::encoding::ValueTypeMarker for RecursiveUnionStruct {
22222 type Borrowed<'a> = &'a Self;
22223 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22224 value
22225 }
22226 }
22227
22228 unsafe impl fidl::encoding::TypeMarker for RecursiveUnionStruct {
22229 type Owned = Self;
22230
22231 #[inline(always)]
22232 fn inline_align(_context: fidl::encoding::Context) -> usize {
22233 8
22234 }
22235
22236 #[inline(always)]
22237 fn inline_size(_context: fidl::encoding::Context) -> usize {
22238 16
22239 }
22240 }
22241
22242 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnionStruct, D>
22243 for &RecursiveUnionStruct
22244 {
22245 #[inline]
22246 unsafe fn encode(
22247 self,
22248 encoder: &mut fidl::encoding::Encoder<'_, D>,
22249 offset: usize,
22250 _depth: fidl::encoding::Depth,
22251 ) -> fidl::Result<()> {
22252 encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22253 fidl::encoding::Encode::<RecursiveUnionStruct, D>::encode(
22255 (
22256 <fidl::encoding::OptionalUnion<RecursiveUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
22257 ),
22258 encoder, offset, _depth
22259 )
22260 }
22261 }
22262 unsafe impl<
22263 D: fidl::encoding::ResourceDialect,
22264 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<RecursiveUnion>, D>,
22265 > fidl::encoding::Encode<RecursiveUnionStruct, D> for (T0,)
22266 {
22267 #[inline]
22268 unsafe fn encode(
22269 self,
22270 encoder: &mut fidl::encoding::Encoder<'_, D>,
22271 offset: usize,
22272 depth: fidl::encoding::Depth,
22273 ) -> fidl::Result<()> {
22274 encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22275 self.0.encode(encoder, offset + 0, depth)?;
22279 Ok(())
22280 }
22281 }
22282
22283 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnionStruct {
22284 #[inline(always)]
22285 fn new_empty() -> Self {
22286 Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<RecursiveUnion>, D) }
22287 }
22288
22289 #[inline]
22290 unsafe fn decode(
22291 &mut self,
22292 decoder: &mut fidl::encoding::Decoder<'_, D>,
22293 offset: usize,
22294 _depth: fidl::encoding::Depth,
22295 ) -> fidl::Result<()> {
22296 decoder.debug_check_bounds::<Self>(offset);
22297 fidl::decode!(
22299 fidl::encoding::OptionalUnion<RecursiveUnion>,
22300 D,
22301 &mut self.u,
22302 decoder,
22303 offset + 0,
22304 _depth
22305 )?;
22306 Ok(())
22307 }
22308 }
22309
22310 impl fidl::encoding::ValueTypeMarker for RecursiveVectorStruct {
22311 type Borrowed<'a> = &'a Self;
22312 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22313 value
22314 }
22315 }
22316
22317 unsafe impl fidl::encoding::TypeMarker for RecursiveVectorStruct {
22318 type Owned = Self;
22319
22320 #[inline(always)]
22321 fn inline_align(_context: fidl::encoding::Context) -> usize {
22322 8
22323 }
22324
22325 #[inline(always)]
22326 fn inline_size(_context: fidl::encoding::Context) -> usize {
22327 16
22328 }
22329 }
22330
22331 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorStruct, D>
22332 for &RecursiveVectorStruct
22333 {
22334 #[inline]
22335 unsafe fn encode(
22336 self,
22337 encoder: &mut fidl::encoding::Encoder<'_, D>,
22338 offset: usize,
22339 _depth: fidl::encoding::Depth,
22340 ) -> fidl::Result<()> {
22341 encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22342 fidl::encoding::Encode::<RecursiveVectorStruct, D>::encode(
22344 (
22345 <fidl::encoding::Optional<
22346 fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22347 > as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
22348 ),
22349 encoder,
22350 offset,
22351 _depth,
22352 )
22353 }
22354 }
22355 unsafe impl<
22356 D: fidl::encoding::ResourceDialect,
22357 T0: fidl::encoding::Encode<
22358 fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22359 D,
22360 >,
22361 > fidl::encoding::Encode<RecursiveVectorStruct, D> for (T0,)
22362 {
22363 #[inline]
22364 unsafe fn encode(
22365 self,
22366 encoder: &mut fidl::encoding::Encoder<'_, D>,
22367 offset: usize,
22368 depth: fidl::encoding::Depth,
22369 ) -> fidl::Result<()> {
22370 encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22371 self.0.encode(encoder, offset + 0, depth)?;
22375 Ok(())
22376 }
22377 }
22378
22379 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorStruct {
22380 #[inline(always)]
22381 fn new_empty() -> Self {
22382 Self {
22383 vec: fidl::new_empty!(
22384 fidl::encoding::Optional<
22385 fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22386 >,
22387 D
22388 ),
22389 }
22390 }
22391
22392 #[inline]
22393 unsafe fn decode(
22394 &mut self,
22395 decoder: &mut fidl::encoding::Decoder<'_, D>,
22396 offset: usize,
22397 _depth: fidl::encoding::Depth,
22398 ) -> fidl::Result<()> {
22399 decoder.debug_check_bounds::<Self>(offset);
22400 fidl::decode!(
22402 fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22403 D,
22404 &mut self.vec,
22405 decoder,
22406 offset + 0,
22407 _depth
22408 )?;
22409 Ok(())
22410 }
22411 }
22412
22413 impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnionStruct {
22414 type Borrowed<'a> = &'a Self;
22415 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22416 value
22417 }
22418 }
22419
22420 unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnionStruct {
22421 type Owned = Self;
22422
22423 #[inline(always)]
22424 fn inline_align(_context: fidl::encoding::Context) -> usize {
22425 8
22426 }
22427
22428 #[inline(always)]
22429 fn inline_size(_context: fidl::encoding::Context) -> usize {
22430 16
22431 }
22432 }
22433
22434 unsafe impl<D: fidl::encoding::ResourceDialect>
22435 fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for &RecursiveVectorUnionStruct
22436 {
22437 #[inline]
22438 unsafe fn encode(
22439 self,
22440 encoder: &mut fidl::encoding::Encoder<'_, D>,
22441 offset: usize,
22442 _depth: fidl::encoding::Depth,
22443 ) -> fidl::Result<()> {
22444 encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22445 fidl::encoding::Encode::<RecursiveVectorUnionStruct, D>::encode(
22447 (<RecursiveVectorUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
22448 encoder,
22449 offset,
22450 _depth,
22451 )
22452 }
22453 }
22454 unsafe impl<
22455 D: fidl::encoding::ResourceDialect,
22456 T0: fidl::encoding::Encode<RecursiveVectorUnion, D>,
22457 > fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for (T0,)
22458 {
22459 #[inline]
22460 unsafe fn encode(
22461 self,
22462 encoder: &mut fidl::encoding::Encoder<'_, D>,
22463 offset: usize,
22464 depth: fidl::encoding::Depth,
22465 ) -> fidl::Result<()> {
22466 encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22467 self.0.encode(encoder, offset + 0, depth)?;
22471 Ok(())
22472 }
22473 }
22474
22475 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22476 for RecursiveVectorUnionStruct
22477 {
22478 #[inline(always)]
22479 fn new_empty() -> Self {
22480 Self { u: fidl::new_empty!(RecursiveVectorUnion, D) }
22481 }
22482
22483 #[inline]
22484 unsafe fn decode(
22485 &mut self,
22486 decoder: &mut fidl::encoding::Decoder<'_, D>,
22487 offset: usize,
22488 _depth: fidl::encoding::Depth,
22489 ) -> fidl::Result<()> {
22490 decoder.debug_check_bounds::<Self>(offset);
22491 fidl::decode!(RecursiveVectorUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
22493 Ok(())
22494 }
22495 }
22496
22497 impl fidl::encoding::ValueTypeMarker for Regression1 {
22498 type Borrowed<'a> = &'a Self;
22499 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22500 value
22501 }
22502 }
22503
22504 unsafe impl fidl::encoding::TypeMarker for Regression1 {
22505 type Owned = Self;
22506
22507 #[inline(always)]
22508 fn inline_align(_context: fidl::encoding::Context) -> usize {
22509 8
22510 }
22511
22512 #[inline(always)]
22513 fn inline_size(_context: fidl::encoding::Context) -> usize {
22514 32
22515 }
22516 }
22517
22518 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression1, D>
22519 for &Regression1
22520 {
22521 #[inline]
22522 unsafe fn encode(
22523 self,
22524 encoder: &mut fidl::encoding::Encoder<'_, D>,
22525 offset: usize,
22526 _depth: fidl::encoding::Depth,
22527 ) -> fidl::Result<()> {
22528 encoder.debug_check_bounds::<Regression1>(offset);
22529 unsafe {
22530 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
22532 (buf_ptr as *mut Regression1).write_unaligned((self as *const Regression1).read());
22533 let padding_ptr = buf_ptr.offset(0) as *mut u64;
22536 let padding_mask = 0xffffff00u64;
22537 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22538 let padding_ptr = buf_ptr.offset(8) as *mut u64;
22539 let padding_mask = 0xffffffff0000ff00u64;
22540 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22541 let padding_ptr = buf_ptr.offset(24) as *mut u64;
22542 let padding_mask = 0xffffffffffffff00u64;
22543 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22544 }
22545 Ok(())
22546 }
22547 }
22548 unsafe impl<
22549 D: fidl::encoding::ResourceDialect,
22550 T0: fidl::encoding::Encode<u8, D>,
22551 T1: fidl::encoding::Encode<u32, D>,
22552 T2: fidl::encoding::Encode<u8, D>,
22553 T3: fidl::encoding::Encode<u16, D>,
22554 T4: fidl::encoding::Encode<u64, D>,
22555 T5: fidl::encoding::Encode<u8, D>,
22556 > fidl::encoding::Encode<Regression1, D> for (T0, T1, T2, T3, T4, T5)
22557 {
22558 #[inline]
22559 unsafe fn encode(
22560 self,
22561 encoder: &mut fidl::encoding::Encoder<'_, D>,
22562 offset: usize,
22563 depth: fidl::encoding::Depth,
22564 ) -> fidl::Result<()> {
22565 encoder.debug_check_bounds::<Regression1>(offset);
22566 unsafe {
22569 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22570 (ptr as *mut u64).write_unaligned(0);
22571 }
22572 unsafe {
22573 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
22574 (ptr as *mut u64).write_unaligned(0);
22575 }
22576 unsafe {
22577 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
22578 (ptr as *mut u64).write_unaligned(0);
22579 }
22580 self.0.encode(encoder, offset + 0, depth)?;
22582 self.1.encode(encoder, offset + 4, depth)?;
22583 self.2.encode(encoder, offset + 8, depth)?;
22584 self.3.encode(encoder, offset + 10, depth)?;
22585 self.4.encode(encoder, offset + 16, depth)?;
22586 self.5.encode(encoder, offset + 24, depth)?;
22587 Ok(())
22588 }
22589 }
22590
22591 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression1 {
22592 #[inline(always)]
22593 fn new_empty() -> Self {
22594 Self {
22595 f1: fidl::new_empty!(u8, D),
22596 f2: fidl::new_empty!(u32, D),
22597 f3: fidl::new_empty!(u8, D),
22598 f4: fidl::new_empty!(u16, D),
22599 f5: fidl::new_empty!(u64, D),
22600 f6: fidl::new_empty!(u8, D),
22601 }
22602 }
22603
22604 #[inline]
22605 unsafe fn decode(
22606 &mut self,
22607 decoder: &mut fidl::encoding::Decoder<'_, D>,
22608 offset: usize,
22609 _depth: fidl::encoding::Depth,
22610 ) -> fidl::Result<()> {
22611 decoder.debug_check_bounds::<Self>(offset);
22612 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
22613 let ptr = unsafe { buf_ptr.offset(0) };
22615 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22616 let mask = 0xffffff00u64;
22617 let maskedval = padval & mask;
22618 if maskedval != 0 {
22619 return Err(fidl::Error::NonZeroPadding {
22620 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22621 });
22622 }
22623 let ptr = unsafe { buf_ptr.offset(8) };
22624 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22625 let mask = 0xffffffff0000ff00u64;
22626 let maskedval = padval & mask;
22627 if maskedval != 0 {
22628 return Err(fidl::Error::NonZeroPadding {
22629 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
22630 });
22631 }
22632 let ptr = unsafe { buf_ptr.offset(24) };
22633 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22634 let mask = 0xffffffffffffff00u64;
22635 let maskedval = padval & mask;
22636 if maskedval != 0 {
22637 return Err(fidl::Error::NonZeroPadding {
22638 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
22639 });
22640 }
22641 unsafe {
22643 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
22644 }
22645 Ok(())
22646 }
22647 }
22648
22649 impl fidl::encoding::ValueTypeMarker for Regression10V1 {
22650 type Borrowed<'a> = &'a Self;
22651 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22652 value
22653 }
22654 }
22655
22656 unsafe impl fidl::encoding::TypeMarker for Regression10V1 {
22657 type Owned = Self;
22658
22659 #[inline(always)]
22660 fn inline_align(_context: fidl::encoding::Context) -> usize {
22661 8
22662 }
22663
22664 #[inline(always)]
22665 fn inline_size(_context: fidl::encoding::Context) -> usize {
22666 16
22667 }
22668 }
22669
22670 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V1, D>
22671 for &Regression10V1
22672 {
22673 #[inline]
22674 unsafe fn encode(
22675 self,
22676 encoder: &mut fidl::encoding::Encoder<'_, D>,
22677 offset: usize,
22678 _depth: fidl::encoding::Depth,
22679 ) -> fidl::Result<()> {
22680 encoder.debug_check_bounds::<Regression10V1>(offset);
22681 fidl::encoding::Encode::<Regression10V1, D>::encode(
22683 (<Regression10TableV1 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22684 encoder,
22685 offset,
22686 _depth,
22687 )
22688 }
22689 }
22690 unsafe impl<
22691 D: fidl::encoding::ResourceDialect,
22692 T0: fidl::encoding::Encode<Regression10TableV1, D>,
22693 > fidl::encoding::Encode<Regression10V1, D> for (T0,)
22694 {
22695 #[inline]
22696 unsafe fn encode(
22697 self,
22698 encoder: &mut fidl::encoding::Encoder<'_, D>,
22699 offset: usize,
22700 depth: fidl::encoding::Depth,
22701 ) -> fidl::Result<()> {
22702 encoder.debug_check_bounds::<Regression10V1>(offset);
22703 self.0.encode(encoder, offset + 0, depth)?;
22707 Ok(())
22708 }
22709 }
22710
22711 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V1 {
22712 #[inline(always)]
22713 fn new_empty() -> Self {
22714 Self { table: fidl::new_empty!(Regression10TableV1, D) }
22715 }
22716
22717 #[inline]
22718 unsafe fn decode(
22719 &mut self,
22720 decoder: &mut fidl::encoding::Decoder<'_, D>,
22721 offset: usize,
22722 _depth: fidl::encoding::Depth,
22723 ) -> fidl::Result<()> {
22724 decoder.debug_check_bounds::<Self>(offset);
22725 fidl::decode!(Regression10TableV1, D, &mut self.table, decoder, offset + 0, _depth)?;
22727 Ok(())
22728 }
22729 }
22730
22731 impl fidl::encoding::ValueTypeMarker for Regression10V2 {
22732 type Borrowed<'a> = &'a Self;
22733 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22734 value
22735 }
22736 }
22737
22738 unsafe impl fidl::encoding::TypeMarker for Regression10V2 {
22739 type Owned = Self;
22740
22741 #[inline(always)]
22742 fn inline_align(_context: fidl::encoding::Context) -> usize {
22743 8
22744 }
22745
22746 #[inline(always)]
22747 fn inline_size(_context: fidl::encoding::Context) -> usize {
22748 16
22749 }
22750 }
22751
22752 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V2, D>
22753 for &Regression10V2
22754 {
22755 #[inline]
22756 unsafe fn encode(
22757 self,
22758 encoder: &mut fidl::encoding::Encoder<'_, D>,
22759 offset: usize,
22760 _depth: fidl::encoding::Depth,
22761 ) -> fidl::Result<()> {
22762 encoder.debug_check_bounds::<Regression10V2>(offset);
22763 fidl::encoding::Encode::<Regression10V2, D>::encode(
22765 (<Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22766 encoder,
22767 offset,
22768 _depth,
22769 )
22770 }
22771 }
22772 unsafe impl<
22773 D: fidl::encoding::ResourceDialect,
22774 T0: fidl::encoding::Encode<Regression10TableV2, D>,
22775 > fidl::encoding::Encode<Regression10V2, D> for (T0,)
22776 {
22777 #[inline]
22778 unsafe fn encode(
22779 self,
22780 encoder: &mut fidl::encoding::Encoder<'_, D>,
22781 offset: usize,
22782 depth: fidl::encoding::Depth,
22783 ) -> fidl::Result<()> {
22784 encoder.debug_check_bounds::<Regression10V2>(offset);
22785 self.0.encode(encoder, offset + 0, depth)?;
22789 Ok(())
22790 }
22791 }
22792
22793 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V2 {
22794 #[inline(always)]
22795 fn new_empty() -> Self {
22796 Self { table: fidl::new_empty!(Regression10TableV2, D) }
22797 }
22798
22799 #[inline]
22800 unsafe fn decode(
22801 &mut self,
22802 decoder: &mut fidl::encoding::Decoder<'_, D>,
22803 offset: usize,
22804 _depth: fidl::encoding::Depth,
22805 ) -> fidl::Result<()> {
22806 decoder.debug_check_bounds::<Self>(offset);
22807 fidl::decode!(Regression10TableV2, D, &mut self.table, decoder, offset + 0, _depth)?;
22809 Ok(())
22810 }
22811 }
22812
22813 impl fidl::encoding::ValueTypeMarker for Regression10V3 {
22814 type Borrowed<'a> = &'a Self;
22815 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22816 value
22817 }
22818 }
22819
22820 unsafe impl fidl::encoding::TypeMarker for Regression10V3 {
22821 type Owned = Self;
22822
22823 #[inline(always)]
22824 fn inline_align(_context: fidl::encoding::Context) -> usize {
22825 8
22826 }
22827
22828 #[inline(always)]
22829 fn inline_size(_context: fidl::encoding::Context) -> usize {
22830 16
22831 }
22832 }
22833
22834 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V3, D>
22835 for &Regression10V3
22836 {
22837 #[inline]
22838 unsafe fn encode(
22839 self,
22840 encoder: &mut fidl::encoding::Encoder<'_, D>,
22841 offset: usize,
22842 _depth: fidl::encoding::Depth,
22843 ) -> fidl::Result<()> {
22844 encoder.debug_check_bounds::<Regression10V3>(offset);
22845 fidl::encoding::Encode::<Regression10V3, D>::encode(
22847 (<Regression10TableV3 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22848 encoder,
22849 offset,
22850 _depth,
22851 )
22852 }
22853 }
22854 unsafe impl<
22855 D: fidl::encoding::ResourceDialect,
22856 T0: fidl::encoding::Encode<Regression10TableV3, D>,
22857 > fidl::encoding::Encode<Regression10V3, D> for (T0,)
22858 {
22859 #[inline]
22860 unsafe fn encode(
22861 self,
22862 encoder: &mut fidl::encoding::Encoder<'_, D>,
22863 offset: usize,
22864 depth: fidl::encoding::Depth,
22865 ) -> fidl::Result<()> {
22866 encoder.debug_check_bounds::<Regression10V3>(offset);
22867 self.0.encode(encoder, offset + 0, depth)?;
22871 Ok(())
22872 }
22873 }
22874
22875 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V3 {
22876 #[inline(always)]
22877 fn new_empty() -> Self {
22878 Self { table: fidl::new_empty!(Regression10TableV3, D) }
22879 }
22880
22881 #[inline]
22882 unsafe fn decode(
22883 &mut self,
22884 decoder: &mut fidl::encoding::Decoder<'_, D>,
22885 offset: usize,
22886 _depth: fidl::encoding::Depth,
22887 ) -> fidl::Result<()> {
22888 decoder.debug_check_bounds::<Self>(offset);
22889 fidl::decode!(Regression10TableV3, D, &mut self.table, decoder, offset + 0, _depth)?;
22891 Ok(())
22892 }
22893 }
22894
22895 impl fidl::encoding::ValueTypeMarker for Regression11 {
22896 type Borrowed<'a> = &'a Self;
22897 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22898 value
22899 }
22900 }
22901
22902 unsafe impl fidl::encoding::TypeMarker for Regression11 {
22903 type Owned = Self;
22904
22905 #[inline(always)]
22906 fn inline_align(_context: fidl::encoding::Context) -> usize {
22907 8
22908 }
22909
22910 #[inline(always)]
22911 fn inline_size(_context: fidl::encoding::Context) -> usize {
22912 16
22913 }
22914 }
22915
22916 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression11, D>
22917 for &Regression11
22918 {
22919 #[inline]
22920 unsafe fn encode(
22921 self,
22922 encoder: &mut fidl::encoding::Encoder<'_, D>,
22923 offset: usize,
22924 _depth: fidl::encoding::Depth,
22925 ) -> fidl::Result<()> {
22926 encoder.debug_check_bounds::<Regression11>(offset);
22927 fidl::encoding::Encode::<Regression11, D>::encode(
22929 (<UnionWithRegression10Table as fidl::encoding::ValueTypeMarker>::borrow(
22930 &self.table_of_table,
22931 ),),
22932 encoder,
22933 offset,
22934 _depth,
22935 )
22936 }
22937 }
22938 unsafe impl<
22939 D: fidl::encoding::ResourceDialect,
22940 T0: fidl::encoding::Encode<UnionWithRegression10Table, D>,
22941 > fidl::encoding::Encode<Regression11, D> for (T0,)
22942 {
22943 #[inline]
22944 unsafe fn encode(
22945 self,
22946 encoder: &mut fidl::encoding::Encoder<'_, D>,
22947 offset: usize,
22948 depth: fidl::encoding::Depth,
22949 ) -> fidl::Result<()> {
22950 encoder.debug_check_bounds::<Regression11>(offset);
22951 self.0.encode(encoder, offset + 0, depth)?;
22955 Ok(())
22956 }
22957 }
22958
22959 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression11 {
22960 #[inline(always)]
22961 fn new_empty() -> Self {
22962 Self { table_of_table: fidl::new_empty!(UnionWithRegression10Table, D) }
22963 }
22964
22965 #[inline]
22966 unsafe fn decode(
22967 &mut self,
22968 decoder: &mut fidl::encoding::Decoder<'_, D>,
22969 offset: usize,
22970 _depth: fidl::encoding::Depth,
22971 ) -> fidl::Result<()> {
22972 decoder.debug_check_bounds::<Self>(offset);
22973 fidl::decode!(
22975 UnionWithRegression10Table,
22976 D,
22977 &mut self.table_of_table,
22978 decoder,
22979 offset + 0,
22980 _depth
22981 )?;
22982 Ok(())
22983 }
22984 }
22985
22986 impl fidl::encoding::ValueTypeMarker for Regression2 {
22987 type Borrowed<'a> = &'a Self;
22988 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22989 value
22990 }
22991 }
22992
22993 unsafe impl fidl::encoding::TypeMarker for Regression2 {
22994 type Owned = Self;
22995
22996 #[inline(always)]
22997 fn inline_align(_context: fidl::encoding::Context) -> usize {
22998 8
22999 }
23000
23001 #[inline(always)]
23002 fn inline_size(_context: fidl::encoding::Context) -> usize {
23003 40
23004 }
23005 }
23006
23007 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression2, D>
23008 for &Regression2
23009 {
23010 #[inline]
23011 unsafe fn encode(
23012 self,
23013 encoder: &mut fidl::encoding::Encoder<'_, D>,
23014 offset: usize,
23015 _depth: fidl::encoding::Depth,
23016 ) -> fidl::Result<()> {
23017 encoder.debug_check_bounds::<Regression2>(offset);
23018 unsafe {
23019 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23021 (buf_ptr as *mut Regression2).write_unaligned((self as *const Regression2).read());
23022 let padding_ptr = buf_ptr.offset(0) as *mut u64;
23025 let padding_mask = 0xffffff00u64;
23026 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23027 let padding_ptr = buf_ptr.offset(8) as *mut u64;
23028 let padding_mask = 0xffffffff0000ff00u64;
23029 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23030 let padding_ptr = buf_ptr.offset(24) as *mut u64;
23031 let padding_mask = 0xffffffffffffff00u64;
23032 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23033 let padding_ptr = buf_ptr.offset(32) as *mut u64;
23034 let padding_mask = 0xffffffffffffff00u64;
23035 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23036 }
23037 Ok(())
23038 }
23039 }
23040 unsafe impl<
23041 D: fidl::encoding::ResourceDialect,
23042 T0: fidl::encoding::Encode<Regression1, D>,
23043 T1: fidl::encoding::Encode<u8, D>,
23044 > fidl::encoding::Encode<Regression2, D> for (T0, T1)
23045 {
23046 #[inline]
23047 unsafe fn encode(
23048 self,
23049 encoder: &mut fidl::encoding::Encoder<'_, D>,
23050 offset: usize,
23051 depth: fidl::encoding::Depth,
23052 ) -> fidl::Result<()> {
23053 encoder.debug_check_bounds::<Regression2>(offset);
23054 unsafe {
23057 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
23058 (ptr as *mut u64).write_unaligned(0);
23059 }
23060 self.0.encode(encoder, offset + 0, depth)?;
23062 self.1.encode(encoder, offset + 32, depth)?;
23063 Ok(())
23064 }
23065 }
23066
23067 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression2 {
23068 #[inline(always)]
23069 fn new_empty() -> Self {
23070 Self { head: fidl::new_empty!(Regression1, D), f7: fidl::new_empty!(u8, D) }
23071 }
23072
23073 #[inline]
23074 unsafe fn decode(
23075 &mut self,
23076 decoder: &mut fidl::encoding::Decoder<'_, D>,
23077 offset: usize,
23078 _depth: fidl::encoding::Depth,
23079 ) -> fidl::Result<()> {
23080 decoder.debug_check_bounds::<Self>(offset);
23081 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23082 let ptr = unsafe { buf_ptr.offset(0) };
23084 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23085 let mask = 0xffffff00u64;
23086 let maskedval = padval & mask;
23087 if maskedval != 0 {
23088 return Err(fidl::Error::NonZeroPadding {
23089 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23090 });
23091 }
23092 let ptr = unsafe { buf_ptr.offset(8) };
23093 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23094 let mask = 0xffffffff0000ff00u64;
23095 let maskedval = padval & mask;
23096 if maskedval != 0 {
23097 return Err(fidl::Error::NonZeroPadding {
23098 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23099 });
23100 }
23101 let ptr = unsafe { buf_ptr.offset(24) };
23102 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23103 let mask = 0xffffffffffffff00u64;
23104 let maskedval = padval & mask;
23105 if maskedval != 0 {
23106 return Err(fidl::Error::NonZeroPadding {
23107 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23108 });
23109 }
23110 let ptr = unsafe { buf_ptr.offset(32) };
23111 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23112 let mask = 0xffffffffffffff00u64;
23113 let maskedval = padval & mask;
23114 if maskedval != 0 {
23115 return Err(fidl::Error::NonZeroPadding {
23116 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
23117 });
23118 }
23119 unsafe {
23121 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 40);
23122 }
23123 Ok(())
23124 }
23125 }
23126
23127 impl fidl::encoding::ValueTypeMarker for Regression3 {
23128 type Borrowed<'a> = &'a Self;
23129 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23130 value
23131 }
23132 }
23133
23134 unsafe impl fidl::encoding::TypeMarker for Regression3 {
23135 type Owned = Self;
23136
23137 #[inline(always)]
23138 fn inline_align(_context: fidl::encoding::Context) -> usize {
23139 8
23140 }
23141
23142 #[inline(always)]
23143 fn inline_size(_context: fidl::encoding::Context) -> usize {
23144 8
23145 }
23146 }
23147
23148 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression3, D>
23149 for &Regression3
23150 {
23151 #[inline]
23152 unsafe fn encode(
23153 self,
23154 encoder: &mut fidl::encoding::Encoder<'_, D>,
23155 offset: usize,
23156 _depth: fidl::encoding::Depth,
23157 ) -> fidl::Result<()> {
23158 encoder.debug_check_bounds::<Regression3>(offset);
23159 fidl::encoding::Encode::<Regression3, D>::encode(
23161 (<fidl::encoding::Boxed<Regression2> as fidl::encoding::ValueTypeMarker>::borrow(
23162 &self.opt_value,
23163 ),),
23164 encoder,
23165 offset,
23166 _depth,
23167 )
23168 }
23169 }
23170 unsafe impl<
23171 D: fidl::encoding::ResourceDialect,
23172 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Regression2>, D>,
23173 > fidl::encoding::Encode<Regression3, D> for (T0,)
23174 {
23175 #[inline]
23176 unsafe fn encode(
23177 self,
23178 encoder: &mut fidl::encoding::Encoder<'_, D>,
23179 offset: usize,
23180 depth: fidl::encoding::Depth,
23181 ) -> fidl::Result<()> {
23182 encoder.debug_check_bounds::<Regression3>(offset);
23183 self.0.encode(encoder, offset + 0, depth)?;
23187 Ok(())
23188 }
23189 }
23190
23191 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression3 {
23192 #[inline(always)]
23193 fn new_empty() -> Self {
23194 Self { opt_value: fidl::new_empty!(fidl::encoding::Boxed<Regression2>, D) }
23195 }
23196
23197 #[inline]
23198 unsafe fn decode(
23199 &mut self,
23200 decoder: &mut fidl::encoding::Decoder<'_, D>,
23201 offset: usize,
23202 _depth: fidl::encoding::Depth,
23203 ) -> fidl::Result<()> {
23204 decoder.debug_check_bounds::<Self>(offset);
23205 fidl::decode!(
23207 fidl::encoding::Boxed<Regression2>,
23208 D,
23209 &mut self.opt_value,
23210 decoder,
23211 offset + 0,
23212 _depth
23213 )?;
23214 Ok(())
23215 }
23216 }
23217
23218 impl fidl::encoding::ValueTypeMarker for Regression4 {
23219 type Borrowed<'a> = &'a Self;
23220 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23221 value
23222 }
23223 }
23224
23225 unsafe impl fidl::encoding::TypeMarker for Regression4 {
23226 type Owned = Self;
23227
23228 #[inline(always)]
23229 fn inline_align(_context: fidl::encoding::Context) -> usize {
23230 8
23231 }
23232
23233 #[inline(always)]
23234 fn inline_size(_context: fidl::encoding::Context) -> usize {
23235 32
23236 }
23237 }
23238
23239 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression4, D>
23240 for &Regression4
23241 {
23242 #[inline]
23243 unsafe fn encode(
23244 self,
23245 encoder: &mut fidl::encoding::Encoder<'_, D>,
23246 offset: usize,
23247 _depth: fidl::encoding::Depth,
23248 ) -> fidl::Result<()> {
23249 encoder.debug_check_bounds::<Regression4>(offset);
23250 unsafe {
23251 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23253 (buf_ptr as *mut Regression4).write_unaligned((self as *const Regression4).read());
23254 let padding_ptr = buf_ptr.offset(0) as *mut u64;
23257 let padding_mask = 0xffffff00u64;
23258 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23259 let padding_ptr = buf_ptr.offset(8) as *mut u64;
23260 let padding_mask = 0xffff000000000000u64;
23261 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23262 let padding_ptr = buf_ptr.offset(24) as *mut u64;
23263 let padding_mask = 0xffffffffffffff00u64;
23264 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23265 }
23266 Ok(())
23267 }
23268 }
23269 unsafe impl<
23270 D: fidl::encoding::ResourceDialect,
23271 T0: fidl::encoding::Encode<u8, D>,
23272 T1: fidl::encoding::Encode<u32, D>,
23273 T2: fidl::encoding::Encode<StructSize3Align1, D>,
23274 T3: fidl::encoding::Encode<u8, D>,
23275 T4: fidl::encoding::Encode<u16, D>,
23276 T5: fidl::encoding::Encode<u64, D>,
23277 T6: fidl::encoding::Encode<u8, D>,
23278 > fidl::encoding::Encode<Regression4, D> for (T0, T1, T2, T3, T4, T5, T6)
23279 {
23280 #[inline]
23281 unsafe fn encode(
23282 self,
23283 encoder: &mut fidl::encoding::Encoder<'_, D>,
23284 offset: usize,
23285 depth: fidl::encoding::Depth,
23286 ) -> fidl::Result<()> {
23287 encoder.debug_check_bounds::<Regression4>(offset);
23288 unsafe {
23291 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23292 (ptr as *mut u64).write_unaligned(0);
23293 }
23294 unsafe {
23295 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23296 (ptr as *mut u64).write_unaligned(0);
23297 }
23298 unsafe {
23299 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23300 (ptr as *mut u64).write_unaligned(0);
23301 }
23302 self.0.encode(encoder, offset + 0, depth)?;
23304 self.1.encode(encoder, offset + 4, depth)?;
23305 self.2.encode(encoder, offset + 8, depth)?;
23306 self.3.encode(encoder, offset + 11, depth)?;
23307 self.4.encode(encoder, offset + 12, depth)?;
23308 self.5.encode(encoder, offset + 16, depth)?;
23309 self.6.encode(encoder, offset + 24, depth)?;
23310 Ok(())
23311 }
23312 }
23313
23314 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression4 {
23315 #[inline(always)]
23316 fn new_empty() -> Self {
23317 Self {
23318 f1: fidl::new_empty!(u8, D),
23319 f2: fidl::new_empty!(u32, D),
23320 s1: fidl::new_empty!(StructSize3Align1, D),
23321 f3: fidl::new_empty!(u8, D),
23322 f4: fidl::new_empty!(u16, D),
23323 f5: fidl::new_empty!(u64, D),
23324 f6: fidl::new_empty!(u8, D),
23325 }
23326 }
23327
23328 #[inline]
23329 unsafe fn decode(
23330 &mut self,
23331 decoder: &mut fidl::encoding::Decoder<'_, D>,
23332 offset: usize,
23333 _depth: fidl::encoding::Depth,
23334 ) -> fidl::Result<()> {
23335 decoder.debug_check_bounds::<Self>(offset);
23336 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23337 let ptr = unsafe { buf_ptr.offset(0) };
23339 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23340 let mask = 0xffffff00u64;
23341 let maskedval = padval & mask;
23342 if maskedval != 0 {
23343 return Err(fidl::Error::NonZeroPadding {
23344 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23345 });
23346 }
23347 let ptr = unsafe { buf_ptr.offset(8) };
23348 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23349 let mask = 0xffff000000000000u64;
23350 let maskedval = padval & mask;
23351 if maskedval != 0 {
23352 return Err(fidl::Error::NonZeroPadding {
23353 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23354 });
23355 }
23356 let ptr = unsafe { buf_ptr.offset(24) };
23357 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23358 let mask = 0xffffffffffffff00u64;
23359 let maskedval = padval & mask;
23360 if maskedval != 0 {
23361 return Err(fidl::Error::NonZeroPadding {
23362 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23363 });
23364 }
23365 unsafe {
23367 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
23368 }
23369 Ok(())
23370 }
23371 }
23372
23373 impl fidl::encoding::ValueTypeMarker for Regression5 {
23374 type Borrowed<'a> = &'a Self;
23375 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23376 value
23377 }
23378 }
23379
23380 unsafe impl fidl::encoding::TypeMarker for Regression5 {
23381 type Owned = Self;
23382
23383 #[inline(always)]
23384 fn inline_align(_context: fidl::encoding::Context) -> usize {
23385 8
23386 }
23387
23388 #[inline(always)]
23389 fn inline_size(_context: fidl::encoding::Context) -> usize {
23390 32
23391 }
23392 }
23393
23394 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression5, D>
23395 for &Regression5
23396 {
23397 #[inline]
23398 unsafe fn encode(
23399 self,
23400 encoder: &mut fidl::encoding::Encoder<'_, D>,
23401 offset: usize,
23402 _depth: fidl::encoding::Depth,
23403 ) -> fidl::Result<()> {
23404 encoder.debug_check_bounds::<Regression5>(offset);
23405 fidl::encoding::Encode::<Regression5, D>::encode(
23407 (
23408 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23409 <EnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23410 <EnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23411 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23412 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23413 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23414 ),
23415 encoder,
23416 offset,
23417 _depth,
23418 )
23419 }
23420 }
23421 unsafe impl<
23422 D: fidl::encoding::ResourceDialect,
23423 T0: fidl::encoding::Encode<u8, D>,
23424 T1: fidl::encoding::Encode<EnumUint32, D>,
23425 T2: fidl::encoding::Encode<EnumUint8, D>,
23426 T3: fidl::encoding::Encode<u16, D>,
23427 T4: fidl::encoding::Encode<u64, D>,
23428 T5: fidl::encoding::Encode<u8, D>,
23429 > fidl::encoding::Encode<Regression5, D> for (T0, T1, T2, T3, T4, T5)
23430 {
23431 #[inline]
23432 unsafe fn encode(
23433 self,
23434 encoder: &mut fidl::encoding::Encoder<'_, D>,
23435 offset: usize,
23436 depth: fidl::encoding::Depth,
23437 ) -> fidl::Result<()> {
23438 encoder.debug_check_bounds::<Regression5>(offset);
23439 unsafe {
23442 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23443 (ptr as *mut u64).write_unaligned(0);
23444 }
23445 unsafe {
23446 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23447 (ptr as *mut u64).write_unaligned(0);
23448 }
23449 unsafe {
23450 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23451 (ptr as *mut u64).write_unaligned(0);
23452 }
23453 self.0.encode(encoder, offset + 0, depth)?;
23455 self.1.encode(encoder, offset + 4, depth)?;
23456 self.2.encode(encoder, offset + 8, depth)?;
23457 self.3.encode(encoder, offset + 10, depth)?;
23458 self.4.encode(encoder, offset + 16, depth)?;
23459 self.5.encode(encoder, offset + 24, depth)?;
23460 Ok(())
23461 }
23462 }
23463
23464 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression5 {
23465 #[inline(always)]
23466 fn new_empty() -> Self {
23467 Self {
23468 f1: fidl::new_empty!(u8, D),
23469 f2: fidl::new_empty!(EnumUint32, D),
23470 f3: fidl::new_empty!(EnumUint8, D),
23471 f4: fidl::new_empty!(u16, D),
23472 f5: fidl::new_empty!(u64, D),
23473 f6: fidl::new_empty!(u8, D),
23474 }
23475 }
23476
23477 #[inline]
23478 unsafe fn decode(
23479 &mut self,
23480 decoder: &mut fidl::encoding::Decoder<'_, D>,
23481 offset: usize,
23482 _depth: fidl::encoding::Depth,
23483 ) -> fidl::Result<()> {
23484 decoder.debug_check_bounds::<Self>(offset);
23485 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23487 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23488 let mask = 0xffffff00u64;
23489 let maskedval = padval & mask;
23490 if maskedval != 0 {
23491 return Err(fidl::Error::NonZeroPadding {
23492 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23493 });
23494 }
23495 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23496 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23497 let mask = 0xffffffff0000ff00u64;
23498 let maskedval = padval & mask;
23499 if maskedval != 0 {
23500 return Err(fidl::Error::NonZeroPadding {
23501 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23502 });
23503 }
23504 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23505 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23506 let mask = 0xffffffffffffff00u64;
23507 let maskedval = padval & mask;
23508 if maskedval != 0 {
23509 return Err(fidl::Error::NonZeroPadding {
23510 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23511 });
23512 }
23513 fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23514 fidl::decode!(EnumUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23515 fidl::decode!(EnumUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23516 fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23517 fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23518 fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23519 Ok(())
23520 }
23521 }
23522
23523 impl fidl::encoding::ValueTypeMarker for Regression6 {
23524 type Borrowed<'a> = &'a Self;
23525 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23526 value
23527 }
23528 }
23529
23530 unsafe impl fidl::encoding::TypeMarker for Regression6 {
23531 type Owned = Self;
23532
23533 #[inline(always)]
23534 fn inline_align(_context: fidl::encoding::Context) -> usize {
23535 8
23536 }
23537
23538 #[inline(always)]
23539 fn inline_size(_context: fidl::encoding::Context) -> usize {
23540 32
23541 }
23542 }
23543
23544 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression6, D>
23545 for &Regression6
23546 {
23547 #[inline]
23548 unsafe fn encode(
23549 self,
23550 encoder: &mut fidl::encoding::Encoder<'_, D>,
23551 offset: usize,
23552 _depth: fidl::encoding::Depth,
23553 ) -> fidl::Result<()> {
23554 encoder.debug_check_bounds::<Regression6>(offset);
23555 fidl::encoding::Encode::<Regression6, D>::encode(
23557 (
23558 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23559 <BitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23560 <BitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23561 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23562 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23563 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23564 ),
23565 encoder,
23566 offset,
23567 _depth,
23568 )
23569 }
23570 }
23571 unsafe impl<
23572 D: fidl::encoding::ResourceDialect,
23573 T0: fidl::encoding::Encode<u8, D>,
23574 T1: fidl::encoding::Encode<BitsUint32, D>,
23575 T2: fidl::encoding::Encode<BitsUint8, D>,
23576 T3: fidl::encoding::Encode<u16, D>,
23577 T4: fidl::encoding::Encode<u64, D>,
23578 T5: fidl::encoding::Encode<u8, D>,
23579 > fidl::encoding::Encode<Regression6, D> for (T0, T1, T2, T3, T4, T5)
23580 {
23581 #[inline]
23582 unsafe fn encode(
23583 self,
23584 encoder: &mut fidl::encoding::Encoder<'_, D>,
23585 offset: usize,
23586 depth: fidl::encoding::Depth,
23587 ) -> fidl::Result<()> {
23588 encoder.debug_check_bounds::<Regression6>(offset);
23589 unsafe {
23592 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23593 (ptr as *mut u64).write_unaligned(0);
23594 }
23595 unsafe {
23596 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23597 (ptr as *mut u64).write_unaligned(0);
23598 }
23599 unsafe {
23600 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23601 (ptr as *mut u64).write_unaligned(0);
23602 }
23603 self.0.encode(encoder, offset + 0, depth)?;
23605 self.1.encode(encoder, offset + 4, depth)?;
23606 self.2.encode(encoder, offset + 8, depth)?;
23607 self.3.encode(encoder, offset + 10, depth)?;
23608 self.4.encode(encoder, offset + 16, depth)?;
23609 self.5.encode(encoder, offset + 24, depth)?;
23610 Ok(())
23611 }
23612 }
23613
23614 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression6 {
23615 #[inline(always)]
23616 fn new_empty() -> Self {
23617 Self {
23618 f1: fidl::new_empty!(u8, D),
23619 f2: fidl::new_empty!(BitsUint32, D),
23620 f3: fidl::new_empty!(BitsUint8, D),
23621 f4: fidl::new_empty!(u16, D),
23622 f5: fidl::new_empty!(u64, D),
23623 f6: fidl::new_empty!(u8, D),
23624 }
23625 }
23626
23627 #[inline]
23628 unsafe fn decode(
23629 &mut self,
23630 decoder: &mut fidl::encoding::Decoder<'_, D>,
23631 offset: usize,
23632 _depth: fidl::encoding::Depth,
23633 ) -> fidl::Result<()> {
23634 decoder.debug_check_bounds::<Self>(offset);
23635 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23637 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23638 let mask = 0xffffff00u64;
23639 let maskedval = padval & mask;
23640 if maskedval != 0 {
23641 return Err(fidl::Error::NonZeroPadding {
23642 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23643 });
23644 }
23645 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23646 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23647 let mask = 0xffffffff0000ff00u64;
23648 let maskedval = padval & mask;
23649 if maskedval != 0 {
23650 return Err(fidl::Error::NonZeroPadding {
23651 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23652 });
23653 }
23654 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23655 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23656 let mask = 0xffffffffffffff00u64;
23657 let maskedval = padval & mask;
23658 if maskedval != 0 {
23659 return Err(fidl::Error::NonZeroPadding {
23660 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23661 });
23662 }
23663 fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23664 fidl::decode!(BitsUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23665 fidl::decode!(BitsUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23666 fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23667 fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23668 fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23669 Ok(())
23670 }
23671 }
23672
23673 impl fidl::encoding::ValueTypeMarker for Regression7TableUnionXUnion {
23674 type Borrowed<'a> = &'a Self;
23675 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23676 value
23677 }
23678 }
23679
23680 unsafe impl fidl::encoding::TypeMarker for Regression7TableUnionXUnion {
23681 type Owned = Self;
23682
23683 #[inline(always)]
23684 fn inline_align(_context: fidl::encoding::Context) -> usize {
23685 8
23686 }
23687
23688 #[inline(always)]
23689 fn inline_size(_context: fidl::encoding::Context) -> usize {
23690 16
23691 }
23692 }
23693
23694 unsafe impl<D: fidl::encoding::ResourceDialect>
23695 fidl::encoding::Encode<Regression7TableUnionXUnion, D> for &Regression7TableUnionXUnion
23696 {
23697 #[inline]
23698 unsafe fn encode(
23699 self,
23700 encoder: &mut fidl::encoding::Encoder<'_, D>,
23701 offset: usize,
23702 _depth: fidl::encoding::Depth,
23703 ) -> fidl::Result<()> {
23704 encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23705 fidl::encoding::Encode::<Regression7TableUnionXUnion, D>::encode(
23707 (
23708 <TableOfUnionThenXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
23709 ),
23710 encoder, offset, _depth
23711 )
23712 }
23713 }
23714 unsafe impl<
23715 D: fidl::encoding::ResourceDialect,
23716 T0: fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>,
23717 > fidl::encoding::Encode<Regression7TableUnionXUnion, D> for (T0,)
23718 {
23719 #[inline]
23720 unsafe fn encode(
23721 self,
23722 encoder: &mut fidl::encoding::Encoder<'_, D>,
23723 offset: usize,
23724 depth: fidl::encoding::Depth,
23725 ) -> fidl::Result<()> {
23726 encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23727 self.0.encode(encoder, offset + 0, depth)?;
23731 Ok(())
23732 }
23733 }
23734
23735 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23736 for Regression7TableUnionXUnion
23737 {
23738 #[inline(always)]
23739 fn new_empty() -> Self {
23740 Self { value: fidl::new_empty!(TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D) }
23741 }
23742
23743 #[inline]
23744 unsafe fn decode(
23745 &mut self,
23746 decoder: &mut fidl::encoding::Decoder<'_, D>,
23747 offset: usize,
23748 _depth: fidl::encoding::Depth,
23749 ) -> fidl::Result<()> {
23750 decoder.debug_check_bounds::<Self>(offset);
23751 fidl::decode!(
23753 TableOfUnionThenXUnionThenTableThenXUnionThenUnion,
23754 D,
23755 &mut self.value,
23756 decoder,
23757 offset + 0,
23758 _depth
23759 )?;
23760 Ok(())
23761 }
23762 }
23763
23764 impl fidl::encoding::ValueTypeMarker for Regression8OptUnionSize12Align4 {
23765 type Borrowed<'a> = &'a Self;
23766 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23767 value
23768 }
23769 }
23770
23771 unsafe impl fidl::encoding::TypeMarker for Regression8OptUnionSize12Align4 {
23772 type Owned = Self;
23773
23774 #[inline(always)]
23775 fn inline_align(_context: fidl::encoding::Context) -> usize {
23776 8
23777 }
23778
23779 #[inline(always)]
23780 fn inline_size(_context: fidl::encoding::Context) -> usize {
23781 48
23782 }
23783 }
23784
23785 unsafe impl<D: fidl::encoding::ResourceDialect>
23786 fidl::encoding::Encode<Regression8OptUnionSize12Align4, D>
23787 for &Regression8OptUnionSize12Align4
23788 {
23789 #[inline]
23790 unsafe fn encode(
23791 self,
23792 encoder: &mut fidl::encoding::Encoder<'_, D>,
23793 offset: usize,
23794 _depth: fidl::encoding::Depth,
23795 ) -> fidl::Result<()> {
23796 encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
23797 fidl::encoding::Encode::<Regression8OptUnionSize12Align4, D>::encode(
23799 (
23800 <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union1),
23801 <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union2),
23802 <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union3),
23803 ),
23804 encoder, offset, _depth
23805 )
23806 }
23807 }
23808 unsafe impl<
23809 D: fidl::encoding::ResourceDialect,
23810 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
23811 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
23812 T2: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
23813 > fidl::encoding::Encode<Regression8OptUnionSize12Align4, D> for (T0, T1, T2)
23814 {
23815 #[inline]
23816 unsafe fn encode(
23817 self,
23818 encoder: &mut fidl::encoding::Encoder<'_, D>,
23819 offset: usize,
23820 depth: fidl::encoding::Depth,
23821 ) -> fidl::Result<()> {
23822 encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
23823 self.0.encode(encoder, offset + 0, depth)?;
23827 self.1.encode(encoder, offset + 16, depth)?;
23828 self.2.encode(encoder, offset + 32, depth)?;
23829 Ok(())
23830 }
23831 }
23832
23833 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23834 for Regression8OptUnionSize12Align4
23835 {
23836 #[inline(always)]
23837 fn new_empty() -> Self {
23838 Self {
23839 opt_union1: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
23840 opt_union2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
23841 opt_union3: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
23842 }
23843 }
23844
23845 #[inline]
23846 unsafe fn decode(
23847 &mut self,
23848 decoder: &mut fidl::encoding::Decoder<'_, D>,
23849 offset: usize,
23850 _depth: fidl::encoding::Depth,
23851 ) -> fidl::Result<()> {
23852 decoder.debug_check_bounds::<Self>(offset);
23853 fidl::decode!(
23855 fidl::encoding::OptionalUnion<UnionSize12Align4>,
23856 D,
23857 &mut self.opt_union1,
23858 decoder,
23859 offset + 0,
23860 _depth
23861 )?;
23862 fidl::decode!(
23863 fidl::encoding::OptionalUnion<UnionSize12Align4>,
23864 D,
23865 &mut self.opt_union2,
23866 decoder,
23867 offset + 16,
23868 _depth
23869 )?;
23870 fidl::decode!(
23871 fidl::encoding::OptionalUnion<UnionSize12Align4>,
23872 D,
23873 &mut self.opt_union3,
23874 decoder,
23875 offset + 32,
23876 _depth
23877 )?;
23878 Ok(())
23879 }
23880 }
23881
23882 impl fidl::encoding::ValueTypeMarker for Regression8TableWithUnionSize12Align4 {
23883 type Borrowed<'a> = &'a Self;
23884 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23885 value
23886 }
23887 }
23888
23889 unsafe impl fidl::encoding::TypeMarker for Regression8TableWithUnionSize12Align4 {
23890 type Owned = Self;
23891
23892 #[inline(always)]
23893 fn inline_align(_context: fidl::encoding::Context) -> usize {
23894 8
23895 }
23896
23897 #[inline(always)]
23898 fn inline_size(_context: fidl::encoding::Context) -> usize {
23899 16
23900 }
23901 }
23902
23903 unsafe impl<D: fidl::encoding::ResourceDialect>
23904 fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D>
23905 for &Regression8TableWithUnionSize12Align4
23906 {
23907 #[inline]
23908 unsafe fn encode(
23909 self,
23910 encoder: &mut fidl::encoding::Encoder<'_, D>,
23911 offset: usize,
23912 _depth: fidl::encoding::Depth,
23913 ) -> fidl::Result<()> {
23914 encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
23915 fidl::encoding::Encode::<Regression8TableWithUnionSize12Align4, D>::encode(
23917 (<TableWithUnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(
23918 &self.value,
23919 ),),
23920 encoder,
23921 offset,
23922 _depth,
23923 )
23924 }
23925 }
23926 unsafe impl<
23927 D: fidl::encoding::ResourceDialect,
23928 T0: fidl::encoding::Encode<TableWithUnionSize12Align4, D>,
23929 > fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D> for (T0,)
23930 {
23931 #[inline]
23932 unsafe fn encode(
23933 self,
23934 encoder: &mut fidl::encoding::Encoder<'_, D>,
23935 offset: usize,
23936 depth: fidl::encoding::Depth,
23937 ) -> fidl::Result<()> {
23938 encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
23939 self.0.encode(encoder, offset + 0, depth)?;
23943 Ok(())
23944 }
23945 }
23946
23947 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23948 for Regression8TableWithUnionSize12Align4
23949 {
23950 #[inline(always)]
23951 fn new_empty() -> Self {
23952 Self { value: fidl::new_empty!(TableWithUnionSize12Align4, D) }
23953 }
23954
23955 #[inline]
23956 unsafe fn decode(
23957 &mut self,
23958 decoder: &mut fidl::encoding::Decoder<'_, D>,
23959 offset: usize,
23960 _depth: fidl::encoding::Depth,
23961 ) -> fidl::Result<()> {
23962 decoder.debug_check_bounds::<Self>(offset);
23963 fidl::decode!(
23965 TableWithUnionSize12Align4,
23966 D,
23967 &mut self.value,
23968 decoder,
23969 offset + 0,
23970 _depth
23971 )?;
23972 Ok(())
23973 }
23974 }
23975
23976 impl fidl::encoding::ValueTypeMarker for Regression8VectorOfOptUnionSize12Align4 {
23977 type Borrowed<'a> = &'a Self;
23978 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23979 value
23980 }
23981 }
23982
23983 unsafe impl fidl::encoding::TypeMarker for Regression8VectorOfOptUnionSize12Align4 {
23984 type Owned = Self;
23985
23986 #[inline(always)]
23987 fn inline_align(_context: fidl::encoding::Context) -> usize {
23988 8
23989 }
23990
23991 #[inline(always)]
23992 fn inline_size(_context: fidl::encoding::Context) -> usize {
23993 16
23994 }
23995 }
23996
23997 unsafe impl<D: fidl::encoding::ResourceDialect>
23998 fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D>
23999 for &Regression8VectorOfOptUnionSize12Align4
24000 {
24001 #[inline]
24002 unsafe fn encode(
24003 self,
24004 encoder: &mut fidl::encoding::Encoder<'_, D>,
24005 offset: usize,
24006 _depth: fidl::encoding::Depth,
24007 ) -> fidl::Result<()> {
24008 encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24009 fidl::encoding::Encode::<Regression8VectorOfOptUnionSize12Align4, D>::encode(
24011 (
24012 <fidl::encoding::UnboundedVector<
24013 fidl::encoding::OptionalUnion<UnionSize12Align4>,
24014 > as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
24015 ),
24016 encoder,
24017 offset,
24018 _depth,
24019 )
24020 }
24021 }
24022 unsafe impl<
24023 D: fidl::encoding::ResourceDialect,
24024 T0: fidl::encoding::Encode<
24025 fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24026 D,
24027 >,
24028 > fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D> for (T0,)
24029 {
24030 #[inline]
24031 unsafe fn encode(
24032 self,
24033 encoder: &mut fidl::encoding::Encoder<'_, D>,
24034 offset: usize,
24035 depth: fidl::encoding::Depth,
24036 ) -> fidl::Result<()> {
24037 encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24038 self.0.encode(encoder, offset + 0, depth)?;
24042 Ok(())
24043 }
24044 }
24045
24046 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24047 for Regression8VectorOfOptUnionSize12Align4
24048 {
24049 #[inline(always)]
24050 fn new_empty() -> Self {
24051 Self {
24052 value: fidl::new_empty!(
24053 fidl::encoding::UnboundedVector<
24054 fidl::encoding::OptionalUnion<UnionSize12Align4>,
24055 >,
24056 D
24057 ),
24058 }
24059 }
24060
24061 #[inline]
24062 unsafe fn decode(
24063 &mut self,
24064 decoder: &mut fidl::encoding::Decoder<'_, D>,
24065 offset: usize,
24066 _depth: fidl::encoding::Depth,
24067 ) -> fidl::Result<()> {
24068 decoder.debug_check_bounds::<Self>(offset);
24069 fidl::decode!(
24071 fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24072 D,
24073 &mut self.value,
24074 decoder,
24075 offset + 0,
24076 _depth
24077 )?;
24078 Ok(())
24079 }
24080 }
24081
24082 impl fidl::encoding::ValueTypeMarker for Regression9Message {
24083 type Borrowed<'a> = &'a Self;
24084 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24085 value
24086 }
24087 }
24088
24089 unsafe impl fidl::encoding::TypeMarker for Regression9Message {
24090 type Owned = Self;
24091
24092 #[inline(always)]
24093 fn inline_align(_context: fidl::encoding::Context) -> usize {
24094 8
24095 }
24096
24097 #[inline(always)]
24098 fn inline_size(_context: fidl::encoding::Context) -> usize {
24099 32
24100 }
24101 }
24102
24103 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Message, D>
24104 for &Regression9Message
24105 {
24106 #[inline]
24107 unsafe fn encode(
24108 self,
24109 encoder: &mut fidl::encoding::Encoder<'_, D>,
24110 offset: usize,
24111 _depth: fidl::encoding::Depth,
24112 ) -> fidl::Result<()> {
24113 encoder.debug_check_bounds::<Regression9Message>(offset);
24114 fidl::encoding::Encode::<Regression9Message, D>::encode(
24116 (
24117 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24118 <Regression9Result as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24119 ),
24120 encoder,
24121 offset,
24122 _depth,
24123 )
24124 }
24125 }
24126 unsafe impl<
24127 D: fidl::encoding::ResourceDialect,
24128 T0: fidl::encoding::Encode<TransactionHeader, D>,
24129 T1: fidl::encoding::Encode<Regression9Result, D>,
24130 > fidl::encoding::Encode<Regression9Message, D> for (T0, T1)
24131 {
24132 #[inline]
24133 unsafe fn encode(
24134 self,
24135 encoder: &mut fidl::encoding::Encoder<'_, D>,
24136 offset: usize,
24137 depth: fidl::encoding::Depth,
24138 ) -> fidl::Result<()> {
24139 encoder.debug_check_bounds::<Regression9Message>(offset);
24140 self.0.encode(encoder, offset + 0, depth)?;
24144 self.1.encode(encoder, offset + 16, depth)?;
24145 Ok(())
24146 }
24147 }
24148
24149 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Message {
24150 #[inline(always)]
24151 fn new_empty() -> Self {
24152 Self {
24153 header: fidl::new_empty!(TransactionHeader, D),
24154 body: fidl::new_empty!(Regression9Result, D),
24155 }
24156 }
24157
24158 #[inline]
24159 unsafe fn decode(
24160 &mut self,
24161 decoder: &mut fidl::encoding::Decoder<'_, D>,
24162 offset: usize,
24163 _depth: fidl::encoding::Depth,
24164 ) -> fidl::Result<()> {
24165 decoder.debug_check_bounds::<Self>(offset);
24166 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24168 fidl::decode!(Regression9Result, D, &mut self.body, decoder, offset + 16, _depth)?;
24169 Ok(())
24170 }
24171 }
24172
24173 impl fidl::encoding::ValueTypeMarker for Regression9Value {
24174 type Borrowed<'a> = &'a Self;
24175 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24176 value
24177 }
24178 }
24179
24180 unsafe impl fidl::encoding::TypeMarker for Regression9Value {
24181 type Owned = Self;
24182
24183 #[inline(always)]
24184 fn inline_align(_context: fidl::encoding::Context) -> usize {
24185 8
24186 }
24187
24188 #[inline(always)]
24189 fn inline_size(_context: fidl::encoding::Context) -> usize {
24190 32
24191 }
24192 }
24193
24194 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Value, D>
24195 for &Regression9Value
24196 {
24197 #[inline]
24198 unsafe fn encode(
24199 self,
24200 encoder: &mut fidl::encoding::Encoder<'_, D>,
24201 offset: usize,
24202 _depth: fidl::encoding::Depth,
24203 ) -> fidl::Result<()> {
24204 encoder.debug_check_bounds::<Regression9Value>(offset);
24205 fidl::encoding::Encode::<Regression9Value, D>::encode(
24207 (
24208 <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
24209 <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
24210 ),
24211 encoder, offset, _depth
24212 )
24213 }
24214 }
24215 unsafe impl<
24216 D: fidl::encoding::ResourceDialect,
24217 T0: fidl::encoding::Encode<StringBoolUnion, D>,
24218 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
24219 > fidl::encoding::Encode<Regression9Value, D> for (T0, T1)
24220 {
24221 #[inline]
24222 unsafe fn encode(
24223 self,
24224 encoder: &mut fidl::encoding::Encoder<'_, D>,
24225 offset: usize,
24226 depth: fidl::encoding::Depth,
24227 ) -> fidl::Result<()> {
24228 encoder.debug_check_bounds::<Regression9Value>(offset);
24229 self.0.encode(encoder, offset + 0, depth)?;
24233 self.1.encode(encoder, offset + 16, depth)?;
24234 Ok(())
24235 }
24236 }
24237
24238 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Value {
24239 #[inline(always)]
24240 fn new_empty() -> Self {
24241 Self {
24242 u: fidl::new_empty!(StringBoolUnion, D),
24243 nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
24244 }
24245 }
24246
24247 #[inline]
24248 unsafe fn decode(
24249 &mut self,
24250 decoder: &mut fidl::encoding::Decoder<'_, D>,
24251 offset: usize,
24252 _depth: fidl::encoding::Depth,
24253 ) -> fidl::Result<()> {
24254 decoder.debug_check_bounds::<Self>(offset);
24255 fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24257 fidl::decode!(
24258 fidl::encoding::OptionalUnion<StringBoolUnion>,
24259 D,
24260 &mut self.nullable_u,
24261 decoder,
24262 offset + 16,
24263 _depth
24264 )?;
24265 Ok(())
24266 }
24267 }
24268
24269 impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnionStruct {
24270 type Borrowed<'a> = &'a Self;
24271 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24272 value
24273 }
24274 }
24275
24276 unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnionStruct {
24277 type Owned = Self;
24278
24279 #[inline(always)]
24280 fn inline_align(_context: fidl::encoding::Context) -> usize {
24281 8
24282 }
24283
24284 #[inline(always)]
24285 fn inline_size(_context: fidl::encoding::Context) -> usize {
24286 16
24287 }
24288 }
24289
24290 unsafe impl<D: fidl::encoding::ResourceDialect>
24291 fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for &ReverseOrdinalUnionStruct
24292 {
24293 #[inline]
24294 unsafe fn encode(
24295 self,
24296 encoder: &mut fidl::encoding::Encoder<'_, D>,
24297 offset: usize,
24298 _depth: fidl::encoding::Depth,
24299 ) -> fidl::Result<()> {
24300 encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24301 fidl::encoding::Encode::<ReverseOrdinalUnionStruct, D>::encode(
24303 (<ReverseOrdinalUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
24304 encoder,
24305 offset,
24306 _depth,
24307 )
24308 }
24309 }
24310 unsafe impl<
24311 D: fidl::encoding::ResourceDialect,
24312 T0: fidl::encoding::Encode<ReverseOrdinalUnion, D>,
24313 > fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for (T0,)
24314 {
24315 #[inline]
24316 unsafe fn encode(
24317 self,
24318 encoder: &mut fidl::encoding::Encoder<'_, D>,
24319 offset: usize,
24320 depth: fidl::encoding::Depth,
24321 ) -> fidl::Result<()> {
24322 encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24323 self.0.encode(encoder, offset + 0, depth)?;
24327 Ok(())
24328 }
24329 }
24330
24331 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24332 for ReverseOrdinalUnionStruct
24333 {
24334 #[inline(always)]
24335 fn new_empty() -> Self {
24336 Self { u: fidl::new_empty!(ReverseOrdinalUnion, D) }
24337 }
24338
24339 #[inline]
24340 unsafe fn decode(
24341 &mut self,
24342 decoder: &mut fidl::encoding::Decoder<'_, D>,
24343 offset: usize,
24344 _depth: fidl::encoding::Depth,
24345 ) -> fidl::Result<()> {
24346 decoder.debug_check_bounds::<Self>(offset);
24347 fidl::decode!(ReverseOrdinalUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24349 Ok(())
24350 }
24351 }
24352
24353 impl fidl::encoding::ValueTypeMarker for Sandwich1 {
24354 type Borrowed<'a> = &'a Self;
24355 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24356 value
24357 }
24358 }
24359
24360 unsafe impl fidl::encoding::TypeMarker for Sandwich1 {
24361 type Owned = Self;
24362
24363 #[inline(always)]
24364 fn inline_align(_context: fidl::encoding::Context) -> usize {
24365 8
24366 }
24367
24368 #[inline(always)]
24369 fn inline_size(_context: fidl::encoding::Context) -> usize {
24370 32
24371 }
24372 }
24373
24374 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1, D>
24375 for &Sandwich1
24376 {
24377 #[inline]
24378 unsafe fn encode(
24379 self,
24380 encoder: &mut fidl::encoding::Encoder<'_, D>,
24381 offset: usize,
24382 _depth: fidl::encoding::Depth,
24383 ) -> fidl::Result<()> {
24384 encoder.debug_check_bounds::<Sandwich1>(offset);
24385 fidl::encoding::Encode::<Sandwich1, D>::encode(
24387 (
24388 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24389 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24390 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24391 ),
24392 encoder,
24393 offset,
24394 _depth,
24395 )
24396 }
24397 }
24398 unsafe impl<
24399 D: fidl::encoding::ResourceDialect,
24400 T0: fidl::encoding::Encode<u32, D>,
24401 T1: fidl::encoding::Encode<UnionSize8Align4, D>,
24402 T2: fidl::encoding::Encode<u32, D>,
24403 > fidl::encoding::Encode<Sandwich1, D> for (T0, T1, T2)
24404 {
24405 #[inline]
24406 unsafe fn encode(
24407 self,
24408 encoder: &mut fidl::encoding::Encoder<'_, D>,
24409 offset: usize,
24410 depth: fidl::encoding::Depth,
24411 ) -> fidl::Result<()> {
24412 encoder.debug_check_bounds::<Sandwich1>(offset);
24413 unsafe {
24416 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24417 (ptr as *mut u64).write_unaligned(0);
24418 }
24419 unsafe {
24420 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24421 (ptr as *mut u64).write_unaligned(0);
24422 }
24423 self.0.encode(encoder, offset + 0, depth)?;
24425 self.1.encode(encoder, offset + 8, depth)?;
24426 self.2.encode(encoder, offset + 24, depth)?;
24427 Ok(())
24428 }
24429 }
24430
24431 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1 {
24432 #[inline(always)]
24433 fn new_empty() -> Self {
24434 Self {
24435 before: fidl::new_empty!(u32, D),
24436 the_union: fidl::new_empty!(UnionSize8Align4, D),
24437 after: fidl::new_empty!(u32, D),
24438 }
24439 }
24440
24441 #[inline]
24442 unsafe fn decode(
24443 &mut self,
24444 decoder: &mut fidl::encoding::Decoder<'_, D>,
24445 offset: usize,
24446 _depth: fidl::encoding::Depth,
24447 ) -> fidl::Result<()> {
24448 decoder.debug_check_bounds::<Self>(offset);
24449 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24451 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24452 let mask = 0xffffffff00000000u64;
24453 let maskedval = padval & mask;
24454 if maskedval != 0 {
24455 return Err(fidl::Error::NonZeroPadding {
24456 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24457 });
24458 }
24459 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24460 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24461 let mask = 0xffffffff00000000u64;
24462 let maskedval = padval & mask;
24463 if maskedval != 0 {
24464 return Err(fidl::Error::NonZeroPadding {
24465 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24466 });
24467 }
24468 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24469 fidl::decode!(UnionSize8Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24470 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24471 Ok(())
24472 }
24473 }
24474
24475 impl fidl::encoding::ValueTypeMarker for Sandwich1Message {
24476 type Borrowed<'a> = &'a Self;
24477 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24478 value
24479 }
24480 }
24481
24482 unsafe impl fidl::encoding::TypeMarker for Sandwich1Message {
24483 type Owned = Self;
24484
24485 #[inline(always)]
24486 fn inline_align(_context: fidl::encoding::Context) -> usize {
24487 8
24488 }
24489
24490 #[inline(always)]
24491 fn inline_size(_context: fidl::encoding::Context) -> usize {
24492 48
24493 }
24494 }
24495
24496 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1Message, D>
24497 for &Sandwich1Message
24498 {
24499 #[inline]
24500 unsafe fn encode(
24501 self,
24502 encoder: &mut fidl::encoding::Encoder<'_, D>,
24503 offset: usize,
24504 _depth: fidl::encoding::Depth,
24505 ) -> fidl::Result<()> {
24506 encoder.debug_check_bounds::<Sandwich1Message>(offset);
24507 fidl::encoding::Encode::<Sandwich1Message, D>::encode(
24509 (
24510 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24511 <Sandwich1 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24512 ),
24513 encoder,
24514 offset,
24515 _depth,
24516 )
24517 }
24518 }
24519 unsafe impl<
24520 D: fidl::encoding::ResourceDialect,
24521 T0: fidl::encoding::Encode<TransactionHeader, D>,
24522 T1: fidl::encoding::Encode<Sandwich1, D>,
24523 > fidl::encoding::Encode<Sandwich1Message, D> for (T0, T1)
24524 {
24525 #[inline]
24526 unsafe fn encode(
24527 self,
24528 encoder: &mut fidl::encoding::Encoder<'_, D>,
24529 offset: usize,
24530 depth: fidl::encoding::Depth,
24531 ) -> fidl::Result<()> {
24532 encoder.debug_check_bounds::<Sandwich1Message>(offset);
24533 self.0.encode(encoder, offset + 0, depth)?;
24537 self.1.encode(encoder, offset + 16, depth)?;
24538 Ok(())
24539 }
24540 }
24541
24542 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1Message {
24543 #[inline(always)]
24544 fn new_empty() -> Self {
24545 Self {
24546 header: fidl::new_empty!(TransactionHeader, D),
24547 body: fidl::new_empty!(Sandwich1, D),
24548 }
24549 }
24550
24551 #[inline]
24552 unsafe fn decode(
24553 &mut self,
24554 decoder: &mut fidl::encoding::Decoder<'_, D>,
24555 offset: usize,
24556 _depth: fidl::encoding::Depth,
24557 ) -> fidl::Result<()> {
24558 decoder.debug_check_bounds::<Self>(offset);
24559 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24561 fidl::decode!(Sandwich1, D, &mut self.body, decoder, offset + 16, _depth)?;
24562 Ok(())
24563 }
24564 }
24565
24566 impl fidl::encoding::ValueTypeMarker for Sandwich1WithOptUnion {
24567 type Borrowed<'a> = &'a Self;
24568 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24569 value
24570 }
24571 }
24572
24573 unsafe impl fidl::encoding::TypeMarker for Sandwich1WithOptUnion {
24574 type Owned = Self;
24575
24576 #[inline(always)]
24577 fn inline_align(_context: fidl::encoding::Context) -> usize {
24578 8
24579 }
24580
24581 #[inline(always)]
24582 fn inline_size(_context: fidl::encoding::Context) -> usize {
24583 32
24584 }
24585 }
24586
24587 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1WithOptUnion, D>
24588 for &Sandwich1WithOptUnion
24589 {
24590 #[inline]
24591 unsafe fn encode(
24592 self,
24593 encoder: &mut fidl::encoding::Encoder<'_, D>,
24594 offset: usize,
24595 _depth: fidl::encoding::Depth,
24596 ) -> fidl::Result<()> {
24597 encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24598 fidl::encoding::Encode::<Sandwich1WithOptUnion, D>::encode(
24600 (
24601 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24602 <fidl::encoding::OptionalUnion<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union),
24603 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24604 ),
24605 encoder, offset, _depth
24606 )
24607 }
24608 }
24609 unsafe impl<
24610 D: fidl::encoding::ResourceDialect,
24611 T0: fidl::encoding::Encode<u32, D>,
24612 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize8Align4>, D>,
24613 T2: fidl::encoding::Encode<u32, D>,
24614 > fidl::encoding::Encode<Sandwich1WithOptUnion, D> for (T0, T1, T2)
24615 {
24616 #[inline]
24617 unsafe fn encode(
24618 self,
24619 encoder: &mut fidl::encoding::Encoder<'_, D>,
24620 offset: usize,
24621 depth: fidl::encoding::Depth,
24622 ) -> fidl::Result<()> {
24623 encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24624 unsafe {
24627 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24628 (ptr as *mut u64).write_unaligned(0);
24629 }
24630 unsafe {
24631 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24632 (ptr as *mut u64).write_unaligned(0);
24633 }
24634 self.0.encode(encoder, offset + 0, depth)?;
24636 self.1.encode(encoder, offset + 8, depth)?;
24637 self.2.encode(encoder, offset + 24, depth)?;
24638 Ok(())
24639 }
24640 }
24641
24642 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1WithOptUnion {
24643 #[inline(always)]
24644 fn new_empty() -> Self {
24645 Self {
24646 before: fidl::new_empty!(u32, D),
24647 opt_union: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize8Align4>, D),
24648 after: fidl::new_empty!(u32, D),
24649 }
24650 }
24651
24652 #[inline]
24653 unsafe fn decode(
24654 &mut self,
24655 decoder: &mut fidl::encoding::Decoder<'_, D>,
24656 offset: usize,
24657 _depth: fidl::encoding::Depth,
24658 ) -> fidl::Result<()> {
24659 decoder.debug_check_bounds::<Self>(offset);
24660 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24662 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24663 let mask = 0xffffffff00000000u64;
24664 let maskedval = padval & mask;
24665 if maskedval != 0 {
24666 return Err(fidl::Error::NonZeroPadding {
24667 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24668 });
24669 }
24670 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24671 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24672 let mask = 0xffffffff00000000u64;
24673 let maskedval = padval & mask;
24674 if maskedval != 0 {
24675 return Err(fidl::Error::NonZeroPadding {
24676 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24677 });
24678 }
24679 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24680 fidl::decode!(
24681 fidl::encoding::OptionalUnion<UnionSize8Align4>,
24682 D,
24683 &mut self.opt_union,
24684 decoder,
24685 offset + 8,
24686 _depth
24687 )?;
24688 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24689 Ok(())
24690 }
24691 }
24692
24693 impl fidl::encoding::ValueTypeMarker for Sandwich2 {
24694 type Borrowed<'a> = &'a Self;
24695 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24696 value
24697 }
24698 }
24699
24700 unsafe impl fidl::encoding::TypeMarker for Sandwich2 {
24701 type Owned = Self;
24702
24703 #[inline(always)]
24704 fn inline_align(_context: fidl::encoding::Context) -> usize {
24705 8
24706 }
24707
24708 #[inline(always)]
24709 fn inline_size(_context: fidl::encoding::Context) -> usize {
24710 32
24711 }
24712 }
24713
24714 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich2, D>
24715 for &Sandwich2
24716 {
24717 #[inline]
24718 unsafe fn encode(
24719 self,
24720 encoder: &mut fidl::encoding::Encoder<'_, D>,
24721 offset: usize,
24722 _depth: fidl::encoding::Depth,
24723 ) -> fidl::Result<()> {
24724 encoder.debug_check_bounds::<Sandwich2>(offset);
24725 fidl::encoding::Encode::<Sandwich2, D>::encode(
24727 (
24728 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24729 <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24730 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24731 ),
24732 encoder,
24733 offset,
24734 _depth,
24735 )
24736 }
24737 }
24738 unsafe impl<
24739 D: fidl::encoding::ResourceDialect,
24740 T0: fidl::encoding::Encode<u32, D>,
24741 T1: fidl::encoding::Encode<UnionSize12Align4, D>,
24742 T2: fidl::encoding::Encode<u32, D>,
24743 > fidl::encoding::Encode<Sandwich2, D> for (T0, T1, T2)
24744 {
24745 #[inline]
24746 unsafe fn encode(
24747 self,
24748 encoder: &mut fidl::encoding::Encoder<'_, D>,
24749 offset: usize,
24750 depth: fidl::encoding::Depth,
24751 ) -> fidl::Result<()> {
24752 encoder.debug_check_bounds::<Sandwich2>(offset);
24753 unsafe {
24756 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24757 (ptr as *mut u64).write_unaligned(0);
24758 }
24759 unsafe {
24760 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24761 (ptr as *mut u64).write_unaligned(0);
24762 }
24763 self.0.encode(encoder, offset + 0, depth)?;
24765 self.1.encode(encoder, offset + 8, depth)?;
24766 self.2.encode(encoder, offset + 24, depth)?;
24767 Ok(())
24768 }
24769 }
24770
24771 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich2 {
24772 #[inline(always)]
24773 fn new_empty() -> Self {
24774 Self {
24775 before: fidl::new_empty!(u32, D),
24776 the_union: fidl::new_empty!(UnionSize12Align4, D),
24777 after: fidl::new_empty!(u32, D),
24778 }
24779 }
24780
24781 #[inline]
24782 unsafe fn decode(
24783 &mut self,
24784 decoder: &mut fidl::encoding::Decoder<'_, D>,
24785 offset: usize,
24786 _depth: fidl::encoding::Depth,
24787 ) -> fidl::Result<()> {
24788 decoder.debug_check_bounds::<Self>(offset);
24789 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24791 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24792 let mask = 0xffffffff00000000u64;
24793 let maskedval = padval & mask;
24794 if maskedval != 0 {
24795 return Err(fidl::Error::NonZeroPadding {
24796 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24797 });
24798 }
24799 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24800 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24801 let mask = 0xffffffff00000000u64;
24802 let maskedval = padval & mask;
24803 if maskedval != 0 {
24804 return Err(fidl::Error::NonZeroPadding {
24805 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24806 });
24807 }
24808 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24809 fidl::decode!(UnionSize12Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24810 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24811 Ok(())
24812 }
24813 }
24814
24815 impl fidl::encoding::ValueTypeMarker for Sandwich3 {
24816 type Borrowed<'a> = &'a Self;
24817 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24818 value
24819 }
24820 }
24821
24822 unsafe impl fidl::encoding::TypeMarker for Sandwich3 {
24823 type Owned = Self;
24824
24825 #[inline(always)]
24826 fn inline_align(_context: fidl::encoding::Context) -> usize {
24827 8
24828 }
24829
24830 #[inline(always)]
24831 fn inline_size(_context: fidl::encoding::Context) -> usize {
24832 32
24833 }
24834 }
24835
24836 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich3, D>
24837 for &Sandwich3
24838 {
24839 #[inline]
24840 unsafe fn encode(
24841 self,
24842 encoder: &mut fidl::encoding::Encoder<'_, D>,
24843 offset: usize,
24844 _depth: fidl::encoding::Depth,
24845 ) -> fidl::Result<()> {
24846 encoder.debug_check_bounds::<Sandwich3>(offset);
24847 fidl::encoding::Encode::<Sandwich3, D>::encode(
24849 (
24850 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24851 <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24852 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24853 ),
24854 encoder,
24855 offset,
24856 _depth,
24857 )
24858 }
24859 }
24860 unsafe impl<
24861 D: fidl::encoding::ResourceDialect,
24862 T0: fidl::encoding::Encode<u32, D>,
24863 T1: fidl::encoding::Encode<UnionSize24Align8, D>,
24864 T2: fidl::encoding::Encode<u32, D>,
24865 > fidl::encoding::Encode<Sandwich3, D> for (T0, T1, T2)
24866 {
24867 #[inline]
24868 unsafe fn encode(
24869 self,
24870 encoder: &mut fidl::encoding::Encoder<'_, D>,
24871 offset: usize,
24872 depth: fidl::encoding::Depth,
24873 ) -> fidl::Result<()> {
24874 encoder.debug_check_bounds::<Sandwich3>(offset);
24875 unsafe {
24878 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24879 (ptr as *mut u64).write_unaligned(0);
24880 }
24881 unsafe {
24882 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24883 (ptr as *mut u64).write_unaligned(0);
24884 }
24885 self.0.encode(encoder, offset + 0, depth)?;
24887 self.1.encode(encoder, offset + 8, depth)?;
24888 self.2.encode(encoder, offset + 24, depth)?;
24889 Ok(())
24890 }
24891 }
24892
24893 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich3 {
24894 #[inline(always)]
24895 fn new_empty() -> Self {
24896 Self {
24897 before: fidl::new_empty!(u32, D),
24898 the_union: fidl::new_empty!(UnionSize24Align8, D),
24899 after: fidl::new_empty!(u32, D),
24900 }
24901 }
24902
24903 #[inline]
24904 unsafe fn decode(
24905 &mut self,
24906 decoder: &mut fidl::encoding::Decoder<'_, D>,
24907 offset: usize,
24908 _depth: fidl::encoding::Depth,
24909 ) -> fidl::Result<()> {
24910 decoder.debug_check_bounds::<Self>(offset);
24911 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24913 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24914 let mask = 0xffffffff00000000u64;
24915 let maskedval = padval & mask;
24916 if maskedval != 0 {
24917 return Err(fidl::Error::NonZeroPadding {
24918 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24919 });
24920 }
24921 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24922 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24923 let mask = 0xffffffff00000000u64;
24924 let maskedval = padval & mask;
24925 if maskedval != 0 {
24926 return Err(fidl::Error::NonZeroPadding {
24927 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24928 });
24929 }
24930 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24931 fidl::decode!(UnionSize24Align8, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24932 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24933 Ok(())
24934 }
24935 }
24936
24937 impl fidl::encoding::ValueTypeMarker for Sandwich4 {
24938 type Borrowed<'a> = &'a Self;
24939 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24940 value
24941 }
24942 }
24943
24944 unsafe impl fidl::encoding::TypeMarker for Sandwich4 {
24945 type Owned = Self;
24946
24947 #[inline(always)]
24948 fn inline_align(_context: fidl::encoding::Context) -> usize {
24949 8
24950 }
24951
24952 #[inline(always)]
24953 fn inline_size(_context: fidl::encoding::Context) -> usize {
24954 32
24955 }
24956 }
24957
24958 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4, D>
24959 for &Sandwich4
24960 {
24961 #[inline]
24962 unsafe fn encode(
24963 self,
24964 encoder: &mut fidl::encoding::Encoder<'_, D>,
24965 offset: usize,
24966 _depth: fidl::encoding::Depth,
24967 ) -> fidl::Result<()> {
24968 encoder.debug_check_bounds::<Sandwich4>(offset);
24969 fidl::encoding::Encode::<Sandwich4, D>::encode(
24971 (
24972 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24973 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24974 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24975 ),
24976 encoder,
24977 offset,
24978 _depth,
24979 )
24980 }
24981 }
24982 unsafe impl<
24983 D: fidl::encoding::ResourceDialect,
24984 T0: fidl::encoding::Encode<u32, D>,
24985 T1: fidl::encoding::Encode<UnionSize36Align4, D>,
24986 T2: fidl::encoding::Encode<u32, D>,
24987 > fidl::encoding::Encode<Sandwich4, D> for (T0, T1, T2)
24988 {
24989 #[inline]
24990 unsafe fn encode(
24991 self,
24992 encoder: &mut fidl::encoding::Encoder<'_, D>,
24993 offset: usize,
24994 depth: fidl::encoding::Depth,
24995 ) -> fidl::Result<()> {
24996 encoder.debug_check_bounds::<Sandwich4>(offset);
24997 unsafe {
25000 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25001 (ptr as *mut u64).write_unaligned(0);
25002 }
25003 unsafe {
25004 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25005 (ptr as *mut u64).write_unaligned(0);
25006 }
25007 self.0.encode(encoder, offset + 0, depth)?;
25009 self.1.encode(encoder, offset + 8, depth)?;
25010 self.2.encode(encoder, offset + 24, depth)?;
25011 Ok(())
25012 }
25013 }
25014
25015 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4 {
25016 #[inline(always)]
25017 fn new_empty() -> Self {
25018 Self {
25019 before: fidl::new_empty!(u32, D),
25020 the_union: fidl::new_empty!(UnionSize36Align4, D),
25021 after: fidl::new_empty!(u32, D),
25022 }
25023 }
25024
25025 #[inline]
25026 unsafe fn decode(
25027 &mut self,
25028 decoder: &mut fidl::encoding::Decoder<'_, D>,
25029 offset: usize,
25030 _depth: fidl::encoding::Depth,
25031 ) -> fidl::Result<()> {
25032 decoder.debug_check_bounds::<Self>(offset);
25033 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25035 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25036 let mask = 0xffffffff00000000u64;
25037 let maskedval = padval & mask;
25038 if maskedval != 0 {
25039 return Err(fidl::Error::NonZeroPadding {
25040 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25041 });
25042 }
25043 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25044 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25045 let mask = 0xffffffff00000000u64;
25046 let maskedval = padval & mask;
25047 if maskedval != 0 {
25048 return Err(fidl::Error::NonZeroPadding {
25049 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25050 });
25051 }
25052 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25053 fidl::decode!(UnionSize36Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25054 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25055 Ok(())
25056 }
25057 }
25058
25059 impl fidl::encoding::ValueTypeMarker for Sandwich4Align8 {
25060 type Borrowed<'a> = &'a Self;
25061 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25062 value
25063 }
25064 }
25065
25066 unsafe impl fidl::encoding::TypeMarker for Sandwich4Align8 {
25067 type Owned = Self;
25068
25069 #[inline(always)]
25070 fn inline_align(_context: fidl::encoding::Context) -> usize {
25071 8
25072 }
25073
25074 #[inline(always)]
25075 fn inline_size(_context: fidl::encoding::Context) -> usize {
25076 40
25077 }
25078 }
25079
25080 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Align8, D>
25081 for &Sandwich4Align8
25082 {
25083 #[inline]
25084 unsafe fn encode(
25085 self,
25086 encoder: &mut fidl::encoding::Encoder<'_, D>,
25087 offset: usize,
25088 _depth: fidl::encoding::Depth,
25089 ) -> fidl::Result<()> {
25090 encoder.debug_check_bounds::<Sandwich4Align8>(offset);
25091 fidl::encoding::Encode::<Sandwich4Align8, D>::encode(
25093 (
25094 <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25095 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.alignment8_enforcement),
25096 ),
25097 encoder,
25098 offset,
25099 _depth,
25100 )
25101 }
25102 }
25103 unsafe impl<
25104 D: fidl::encoding::ResourceDialect,
25105 T0: fidl::encoding::Encode<Sandwich4, D>,
25106 T1: fidl::encoding::Encode<u64, D>,
25107 > fidl::encoding::Encode<Sandwich4Align8, D> for (T0, T1)
25108 {
25109 #[inline]
25110 unsafe fn encode(
25111 self,
25112 encoder: &mut fidl::encoding::Encoder<'_, D>,
25113 offset: usize,
25114 depth: fidl::encoding::Depth,
25115 ) -> fidl::Result<()> {
25116 encoder.debug_check_bounds::<Sandwich4Align8>(offset);
25117 self.0.encode(encoder, offset + 0, depth)?;
25121 self.1.encode(encoder, offset + 32, depth)?;
25122 Ok(())
25123 }
25124 }
25125
25126 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Align8 {
25127 #[inline(always)]
25128 fn new_empty() -> Self {
25129 Self {
25130 sandwich4: fidl::new_empty!(Sandwich4, D),
25131 alignment8_enforcement: fidl::new_empty!(u64, D),
25132 }
25133 }
25134
25135 #[inline]
25136 unsafe fn decode(
25137 &mut self,
25138 decoder: &mut fidl::encoding::Decoder<'_, D>,
25139 offset: usize,
25140 _depth: fidl::encoding::Depth,
25141 ) -> fidl::Result<()> {
25142 decoder.debug_check_bounds::<Self>(offset);
25143 fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25145 fidl::decode!(u64, D, &mut self.alignment8_enforcement, decoder, offset + 32, _depth)?;
25146 Ok(())
25147 }
25148 }
25149
25150 impl fidl::encoding::ValueTypeMarker for Sandwich4Align8WithPointer {
25151 type Borrowed<'a> = &'a Self;
25152 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25153 value
25154 }
25155 }
25156
25157 unsafe impl fidl::encoding::TypeMarker for Sandwich4Align8WithPointer {
25158 type Owned = Self;
25159
25160 #[inline(always)]
25161 fn inline_align(_context: fidl::encoding::Context) -> usize {
25162 8
25163 }
25164
25165 #[inline(always)]
25166 fn inline_size(_context: fidl::encoding::Context) -> usize {
25167 40
25168 }
25169 }
25170
25171 unsafe impl<D: fidl::encoding::ResourceDialect>
25172 fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for &Sandwich4Align8WithPointer
25173 {
25174 #[inline]
25175 unsafe fn encode(
25176 self,
25177 encoder: &mut fidl::encoding::Encoder<'_, D>,
25178 offset: usize,
25179 _depth: fidl::encoding::Depth,
25180 ) -> fidl::Result<()> {
25181 encoder.debug_check_bounds::<Sandwich4Align8WithPointer>(offset);
25182 fidl::encoding::Encode::<Sandwich4Align8WithPointer, D>::encode(
25184 (
25185 <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25186 <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
25187 &self.alignment8_enforcement,
25188 ),
25189 ),
25190 encoder,
25191 offset,
25192 _depth,
25193 )
25194 }
25195 }
25196 unsafe impl<
25197 D: fidl::encoding::ResourceDialect,
25198 T0: fidl::encoding::Encode<Sandwich4, D>,
25199 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
25200 > fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for (T0, T1)
25201 {
25202 #[inline]
25203 unsafe fn encode(
25204 self,
25205 encoder: &mut fidl::encoding::Encoder<'_, D>,
25206 offset: usize,
25207 depth: fidl::encoding::Depth,
25208 ) -> fidl::Result<()> {
25209 encoder.debug_check_bounds::<Sandwich4Align8WithPointer>(offset);
25210 self.0.encode(encoder, offset + 0, depth)?;
25214 self.1.encode(encoder, offset + 32, depth)?;
25215 Ok(())
25216 }
25217 }
25218
25219 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
25220 for Sandwich4Align8WithPointer
25221 {
25222 #[inline(always)]
25223 fn new_empty() -> Self {
25224 Self {
25225 sandwich4: fidl::new_empty!(Sandwich4, D),
25226 alignment8_enforcement: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
25227 }
25228 }
25229
25230 #[inline]
25231 unsafe fn decode(
25232 &mut self,
25233 decoder: &mut fidl::encoding::Decoder<'_, D>,
25234 offset: usize,
25235 _depth: fidl::encoding::Depth,
25236 ) -> fidl::Result<()> {
25237 decoder.debug_check_bounds::<Self>(offset);
25238 fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25240 fidl::decode!(
25241 fidl::encoding::Boxed<Size8Align8>,
25242 D,
25243 &mut self.alignment8_enforcement,
25244 decoder,
25245 offset + 32,
25246 _depth
25247 )?;
25248 Ok(())
25249 }
25250 }
25251
25252 impl fidl::encoding::ValueTypeMarker for Sandwich4Message {
25253 type Borrowed<'a> = &'a Self;
25254 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25255 value
25256 }
25257 }
25258
25259 unsafe impl fidl::encoding::TypeMarker for Sandwich4Message {
25260 type Owned = Self;
25261
25262 #[inline(always)]
25263 fn inline_align(_context: fidl::encoding::Context) -> usize {
25264 8
25265 }
25266
25267 #[inline(always)]
25268 fn inline_size(_context: fidl::encoding::Context) -> usize {
25269 48
25270 }
25271 }
25272
25273 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Message, D>
25274 for &Sandwich4Message
25275 {
25276 #[inline]
25277 unsafe fn encode(
25278 self,
25279 encoder: &mut fidl::encoding::Encoder<'_, D>,
25280 offset: usize,
25281 _depth: fidl::encoding::Depth,
25282 ) -> fidl::Result<()> {
25283 encoder.debug_check_bounds::<Sandwich4Message>(offset);
25284 fidl::encoding::Encode::<Sandwich4Message, D>::encode(
25286 (
25287 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25288 <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25289 ),
25290 encoder,
25291 offset,
25292 _depth,
25293 )
25294 }
25295 }
25296 unsafe impl<
25297 D: fidl::encoding::ResourceDialect,
25298 T0: fidl::encoding::Encode<TransactionHeader, D>,
25299 T1: fidl::encoding::Encode<Sandwich4, D>,
25300 > fidl::encoding::Encode<Sandwich4Message, D> for (T0, T1)
25301 {
25302 #[inline]
25303 unsafe fn encode(
25304 self,
25305 encoder: &mut fidl::encoding::Encoder<'_, D>,
25306 offset: usize,
25307 depth: fidl::encoding::Depth,
25308 ) -> fidl::Result<()> {
25309 encoder.debug_check_bounds::<Sandwich4Message>(offset);
25310 self.0.encode(encoder, offset + 0, depth)?;
25314 self.1.encode(encoder, offset + 16, depth)?;
25315 Ok(())
25316 }
25317 }
25318
25319 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Message {
25320 #[inline(always)]
25321 fn new_empty() -> Self {
25322 Self {
25323 header: fidl::new_empty!(TransactionHeader, D),
25324 body: fidl::new_empty!(Sandwich4, D),
25325 }
25326 }
25327
25328 #[inline]
25329 unsafe fn decode(
25330 &mut self,
25331 decoder: &mut fidl::encoding::Decoder<'_, D>,
25332 offset: usize,
25333 _depth: fidl::encoding::Depth,
25334 ) -> fidl::Result<()> {
25335 decoder.debug_check_bounds::<Self>(offset);
25336 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25338 fidl::decode!(Sandwich4, D, &mut self.body, decoder, offset + 16, _depth)?;
25339 Ok(())
25340 }
25341 }
25342
25343 impl fidl::encoding::ValueTypeMarker for Sandwich5 {
25344 type Borrowed<'a> = &'a Self;
25345 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25346 value
25347 }
25348 }
25349
25350 unsafe impl fidl::encoding::TypeMarker for Sandwich5 {
25351 type Owned = Self;
25352
25353 #[inline(always)]
25354 fn inline_align(_context: fidl::encoding::Context) -> usize {
25355 8
25356 }
25357
25358 #[inline(always)]
25359 fn inline_size(_context: fidl::encoding::Context) -> usize {
25360 32
25361 }
25362 }
25363
25364 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5, D>
25365 for &Sandwich5
25366 {
25367 #[inline]
25368 unsafe fn encode(
25369 self,
25370 encoder: &mut fidl::encoding::Encoder<'_, D>,
25371 offset: usize,
25372 _depth: fidl::encoding::Depth,
25373 ) -> fidl::Result<()> {
25374 encoder.debug_check_bounds::<Sandwich5>(offset);
25375 fidl::encoding::Encode::<Sandwich5, D>::encode(
25377 (
25378 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25379 <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
25380 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25381 ),
25382 encoder,
25383 offset,
25384 _depth,
25385 )
25386 }
25387 }
25388 unsafe impl<
25389 D: fidl::encoding::ResourceDialect,
25390 T0: fidl::encoding::Encode<u32, D>,
25391 T1: fidl::encoding::Encode<UnionOfUnion, D>,
25392 T2: fidl::encoding::Encode<u32, D>,
25393 > fidl::encoding::Encode<Sandwich5, D> for (T0, T1, T2)
25394 {
25395 #[inline]
25396 unsafe fn encode(
25397 self,
25398 encoder: &mut fidl::encoding::Encoder<'_, D>,
25399 offset: usize,
25400 depth: fidl::encoding::Depth,
25401 ) -> fidl::Result<()> {
25402 encoder.debug_check_bounds::<Sandwich5>(offset);
25403 unsafe {
25406 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25407 (ptr as *mut u64).write_unaligned(0);
25408 }
25409 unsafe {
25410 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25411 (ptr as *mut u64).write_unaligned(0);
25412 }
25413 self.0.encode(encoder, offset + 0, depth)?;
25415 self.1.encode(encoder, offset + 8, depth)?;
25416 self.2.encode(encoder, offset + 24, depth)?;
25417 Ok(())
25418 }
25419 }
25420
25421 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5 {
25422 #[inline(always)]
25423 fn new_empty() -> Self {
25424 Self {
25425 before: fidl::new_empty!(u32, D),
25426 union_of_union: fidl::new_empty!(UnionOfUnion, D),
25427 after: fidl::new_empty!(u32, D),
25428 }
25429 }
25430
25431 #[inline]
25432 unsafe fn decode(
25433 &mut self,
25434 decoder: &mut fidl::encoding::Decoder<'_, D>,
25435 offset: usize,
25436 _depth: fidl::encoding::Depth,
25437 ) -> fidl::Result<()> {
25438 decoder.debug_check_bounds::<Self>(offset);
25439 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25441 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25442 let mask = 0xffffffff00000000u64;
25443 let maskedval = padval & mask;
25444 if maskedval != 0 {
25445 return Err(fidl::Error::NonZeroPadding {
25446 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25447 });
25448 }
25449 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25450 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25451 let mask = 0xffffffff00000000u64;
25452 let maskedval = padval & mask;
25453 if maskedval != 0 {
25454 return Err(fidl::Error::NonZeroPadding {
25455 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25456 });
25457 }
25458 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25459 fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
25460 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25461 Ok(())
25462 }
25463 }
25464
25465 impl fidl::encoding::ValueTypeMarker for Sandwich5Message {
25466 type Borrowed<'a> = &'a Self;
25467 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25468 value
25469 }
25470 }
25471
25472 unsafe impl fidl::encoding::TypeMarker for Sandwich5Message {
25473 type Owned = Self;
25474
25475 #[inline(always)]
25476 fn inline_align(_context: fidl::encoding::Context) -> usize {
25477 8
25478 }
25479
25480 #[inline(always)]
25481 fn inline_size(_context: fidl::encoding::Context) -> usize {
25482 48
25483 }
25484 }
25485
25486 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5Message, D>
25487 for &Sandwich5Message
25488 {
25489 #[inline]
25490 unsafe fn encode(
25491 self,
25492 encoder: &mut fidl::encoding::Encoder<'_, D>,
25493 offset: usize,
25494 _depth: fidl::encoding::Depth,
25495 ) -> fidl::Result<()> {
25496 encoder.debug_check_bounds::<Sandwich5Message>(offset);
25497 fidl::encoding::Encode::<Sandwich5Message, D>::encode(
25499 (
25500 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25501 <Sandwich5 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25502 ),
25503 encoder,
25504 offset,
25505 _depth,
25506 )
25507 }
25508 }
25509 unsafe impl<
25510 D: fidl::encoding::ResourceDialect,
25511 T0: fidl::encoding::Encode<TransactionHeader, D>,
25512 T1: fidl::encoding::Encode<Sandwich5, D>,
25513 > fidl::encoding::Encode<Sandwich5Message, D> for (T0, T1)
25514 {
25515 #[inline]
25516 unsafe fn encode(
25517 self,
25518 encoder: &mut fidl::encoding::Encoder<'_, D>,
25519 offset: usize,
25520 depth: fidl::encoding::Depth,
25521 ) -> fidl::Result<()> {
25522 encoder.debug_check_bounds::<Sandwich5Message>(offset);
25523 self.0.encode(encoder, offset + 0, depth)?;
25527 self.1.encode(encoder, offset + 16, depth)?;
25528 Ok(())
25529 }
25530 }
25531
25532 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5Message {
25533 #[inline(always)]
25534 fn new_empty() -> Self {
25535 Self {
25536 header: fidl::new_empty!(TransactionHeader, D),
25537 body: fidl::new_empty!(Sandwich5, D),
25538 }
25539 }
25540
25541 #[inline]
25542 unsafe fn decode(
25543 &mut self,
25544 decoder: &mut fidl::encoding::Decoder<'_, D>,
25545 offset: usize,
25546 _depth: fidl::encoding::Depth,
25547 ) -> fidl::Result<()> {
25548 decoder.debug_check_bounds::<Self>(offset);
25549 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25551 fidl::decode!(Sandwich5, D, &mut self.body, decoder, offset + 16, _depth)?;
25552 Ok(())
25553 }
25554 }
25555
25556 impl fidl::encoding::ValueTypeMarker for Sandwich7 {
25557 type Borrowed<'a> = &'a Self;
25558 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25559 value
25560 }
25561 }
25562
25563 unsafe impl fidl::encoding::TypeMarker for Sandwich7 {
25564 type Owned = Self;
25565
25566 #[inline(always)]
25567 fn inline_align(_context: fidl::encoding::Context) -> usize {
25568 8
25569 }
25570
25571 #[inline(always)]
25572 fn inline_size(_context: fidl::encoding::Context) -> usize {
25573 24
25574 }
25575 }
25576
25577 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7, D>
25578 for &Sandwich7
25579 {
25580 #[inline]
25581 unsafe fn encode(
25582 self,
25583 encoder: &mut fidl::encoding::Encoder<'_, D>,
25584 offset: usize,
25585 _depth: fidl::encoding::Depth,
25586 ) -> fidl::Result<()> {
25587 encoder.debug_check_bounds::<Sandwich7>(offset);
25588 fidl::encoding::Encode::<Sandwich7, D>::encode(
25590 (
25591 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25592 <fidl::encoding::Boxed<Sandwich1> as fidl::encoding::ValueTypeMarker>::borrow(
25593 &self.opt_sandwich1,
25594 ),
25595 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25596 ),
25597 encoder,
25598 offset,
25599 _depth,
25600 )
25601 }
25602 }
25603 unsafe impl<
25604 D: fidl::encoding::ResourceDialect,
25605 T0: fidl::encoding::Encode<u32, D>,
25606 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Sandwich1>, D>,
25607 T2: fidl::encoding::Encode<u32, D>,
25608 > fidl::encoding::Encode<Sandwich7, D> for (T0, T1, T2)
25609 {
25610 #[inline]
25611 unsafe fn encode(
25612 self,
25613 encoder: &mut fidl::encoding::Encoder<'_, D>,
25614 offset: usize,
25615 depth: fidl::encoding::Depth,
25616 ) -> fidl::Result<()> {
25617 encoder.debug_check_bounds::<Sandwich7>(offset);
25618 unsafe {
25621 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25622 (ptr as *mut u64).write_unaligned(0);
25623 }
25624 unsafe {
25625 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
25626 (ptr as *mut u64).write_unaligned(0);
25627 }
25628 self.0.encode(encoder, offset + 0, depth)?;
25630 self.1.encode(encoder, offset + 8, depth)?;
25631 self.2.encode(encoder, offset + 16, depth)?;
25632 Ok(())
25633 }
25634 }
25635
25636 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7 {
25637 #[inline(always)]
25638 fn new_empty() -> Self {
25639 Self {
25640 before: fidl::new_empty!(u32, D),
25641 opt_sandwich1: fidl::new_empty!(fidl::encoding::Boxed<Sandwich1>, D),
25642 after: fidl::new_empty!(u32, D),
25643 }
25644 }
25645
25646 #[inline]
25647 unsafe fn decode(
25648 &mut self,
25649 decoder: &mut fidl::encoding::Decoder<'_, D>,
25650 offset: usize,
25651 _depth: fidl::encoding::Depth,
25652 ) -> fidl::Result<()> {
25653 decoder.debug_check_bounds::<Self>(offset);
25654 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25656 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25657 let mask = 0xffffffff00000000u64;
25658 let maskedval = padval & mask;
25659 if maskedval != 0 {
25660 return Err(fidl::Error::NonZeroPadding {
25661 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25662 });
25663 }
25664 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
25665 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25666 let mask = 0xffffffff00000000u64;
25667 let maskedval = padval & mask;
25668 if maskedval != 0 {
25669 return Err(fidl::Error::NonZeroPadding {
25670 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
25671 });
25672 }
25673 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25674 fidl::decode!(
25675 fidl::encoding::Boxed<Sandwich1>,
25676 D,
25677 &mut self.opt_sandwich1,
25678 decoder,
25679 offset + 8,
25680 _depth
25681 )?;
25682 fidl::decode!(u32, D, &mut self.after, decoder, offset + 16, _depth)?;
25683 Ok(())
25684 }
25685 }
25686
25687 impl fidl::encoding::ValueTypeMarker for Sandwich7Message {
25688 type Borrowed<'a> = &'a Self;
25689 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25690 value
25691 }
25692 }
25693
25694 unsafe impl fidl::encoding::TypeMarker for Sandwich7Message {
25695 type Owned = Self;
25696
25697 #[inline(always)]
25698 fn inline_align(_context: fidl::encoding::Context) -> usize {
25699 8
25700 }
25701
25702 #[inline(always)]
25703 fn inline_size(_context: fidl::encoding::Context) -> usize {
25704 40
25705 }
25706 }
25707
25708 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7Message, D>
25709 for &Sandwich7Message
25710 {
25711 #[inline]
25712 unsafe fn encode(
25713 self,
25714 encoder: &mut fidl::encoding::Encoder<'_, D>,
25715 offset: usize,
25716 _depth: fidl::encoding::Depth,
25717 ) -> fidl::Result<()> {
25718 encoder.debug_check_bounds::<Sandwich7Message>(offset);
25719 fidl::encoding::Encode::<Sandwich7Message, D>::encode(
25721 (
25722 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25723 <Sandwich7 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25724 ),
25725 encoder,
25726 offset,
25727 _depth,
25728 )
25729 }
25730 }
25731 unsafe impl<
25732 D: fidl::encoding::ResourceDialect,
25733 T0: fidl::encoding::Encode<TransactionHeader, D>,
25734 T1: fidl::encoding::Encode<Sandwich7, D>,
25735 > fidl::encoding::Encode<Sandwich7Message, D> for (T0, T1)
25736 {
25737 #[inline]
25738 unsafe fn encode(
25739 self,
25740 encoder: &mut fidl::encoding::Encoder<'_, D>,
25741 offset: usize,
25742 depth: fidl::encoding::Depth,
25743 ) -> fidl::Result<()> {
25744 encoder.debug_check_bounds::<Sandwich7Message>(offset);
25745 self.0.encode(encoder, offset + 0, depth)?;
25749 self.1.encode(encoder, offset + 16, depth)?;
25750 Ok(())
25751 }
25752 }
25753
25754 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7Message {
25755 #[inline(always)]
25756 fn new_empty() -> Self {
25757 Self {
25758 header: fidl::new_empty!(TransactionHeader, D),
25759 body: fidl::new_empty!(Sandwich7, D),
25760 }
25761 }
25762
25763 #[inline]
25764 unsafe fn decode(
25765 &mut self,
25766 decoder: &mut fidl::encoding::Decoder<'_, D>,
25767 offset: usize,
25768 _depth: fidl::encoding::Depth,
25769 ) -> fidl::Result<()> {
25770 decoder.debug_check_bounds::<Self>(offset);
25771 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25773 fidl::decode!(Sandwich7, D, &mut self.body, decoder, offset + 16, _depth)?;
25774 Ok(())
25775 }
25776 }
25777
25778 impl fidl::encoding::ValueTypeMarker for Sandwich8 {
25779 type Borrowed<'a> = &'a Self;
25780 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25781 value
25782 }
25783 }
25784
25785 unsafe impl fidl::encoding::TypeMarker for Sandwich8 {
25786 type Owned = Self;
25787
25788 #[inline(always)]
25789 fn inline_align(_context: fidl::encoding::Context) -> usize {
25790 8
25791 }
25792
25793 #[inline(always)]
25794 fn inline_size(_context: fidl::encoding::Context) -> usize {
25795 32
25796 }
25797 }
25798
25799 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich8, D>
25800 for &Sandwich8
25801 {
25802 #[inline]
25803 unsafe fn encode(
25804 self,
25805 encoder: &mut fidl::encoding::Encoder<'_, D>,
25806 offset: usize,
25807 _depth: fidl::encoding::Depth,
25808 ) -> fidl::Result<()> {
25809 encoder.debug_check_bounds::<Sandwich8>(offset);
25810 fidl::encoding::Encode::<Sandwich8, D>::encode(
25812 (
25813 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25814 <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
25815 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25816 ),
25817 encoder,
25818 offset,
25819 _depth,
25820 )
25821 }
25822 }
25823 unsafe impl<
25824 D: fidl::encoding::ResourceDialect,
25825 T0: fidl::encoding::Encode<u64, D>,
25826 T1: fidl::encoding::Encode<UnionOfUnion, D>,
25827 T2: fidl::encoding::Encode<u32, D>,
25828 > fidl::encoding::Encode<Sandwich8, D> for (T0, T1, T2)
25829 {
25830 #[inline]
25831 unsafe fn encode(
25832 self,
25833 encoder: &mut fidl::encoding::Encoder<'_, D>,
25834 offset: usize,
25835 depth: fidl::encoding::Depth,
25836 ) -> fidl::Result<()> {
25837 encoder.debug_check_bounds::<Sandwich8>(offset);
25838 unsafe {
25841 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25842 (ptr as *mut u64).write_unaligned(0);
25843 }
25844 self.0.encode(encoder, offset + 0, depth)?;
25846 self.1.encode(encoder, offset + 8, depth)?;
25847 self.2.encode(encoder, offset + 24, depth)?;
25848 Ok(())
25849 }
25850 }
25851
25852 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich8 {
25853 #[inline(always)]
25854 fn new_empty() -> Self {
25855 Self {
25856 before: fidl::new_empty!(u64, D),
25857 union_of_union: fidl::new_empty!(UnionOfUnion, D),
25858 after: fidl::new_empty!(u32, D),
25859 }
25860 }
25861
25862 #[inline]
25863 unsafe fn decode(
25864 &mut self,
25865 decoder: &mut fidl::encoding::Decoder<'_, D>,
25866 offset: usize,
25867 _depth: fidl::encoding::Depth,
25868 ) -> fidl::Result<()> {
25869 decoder.debug_check_bounds::<Self>(offset);
25870 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25872 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25873 let mask = 0xffffffff00000000u64;
25874 let maskedval = padval & mask;
25875 if maskedval != 0 {
25876 return Err(fidl::Error::NonZeroPadding {
25877 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25878 });
25879 }
25880 fidl::decode!(u64, D, &mut self.before, decoder, offset + 0, _depth)?;
25881 fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
25882 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25883 Ok(())
25884 }
25885 }
25886
25887 impl fidl::encoding::ValueTypeMarker for Sandwich9 {
25888 type Borrowed<'a> = &'a Self;
25889 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25890 value
25891 }
25892 }
25893
25894 unsafe impl fidl::encoding::TypeMarker for Sandwich9 {
25895 type Owned = Self;
25896
25897 #[inline(always)]
25898 fn inline_align(_context: fidl::encoding::Context) -> usize {
25899 8
25900 }
25901
25902 #[inline(always)]
25903 fn inline_size(_context: fidl::encoding::Context) -> usize {
25904 32
25905 }
25906 }
25907
25908 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich9, D>
25909 for &Sandwich9
25910 {
25911 #[inline]
25912 unsafe fn encode(
25913 self,
25914 encoder: &mut fidl::encoding::Encoder<'_, D>,
25915 offset: usize,
25916 _depth: fidl::encoding::Depth,
25917 ) -> fidl::Result<()> {
25918 encoder.debug_check_bounds::<Sandwich9>(offset);
25919 fidl::encoding::Encode::<Sandwich9, D>::encode(
25921 (
25922 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25923 <UnionWithVectorOfVectors as fidl::encoding::ValueTypeMarker>::borrow(
25924 &self.the_union,
25925 ),
25926 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25927 ),
25928 encoder,
25929 offset,
25930 _depth,
25931 )
25932 }
25933 }
25934 unsafe impl<
25935 D: fidl::encoding::ResourceDialect,
25936 T0: fidl::encoding::Encode<u16, D>,
25937 T1: fidl::encoding::Encode<UnionWithVectorOfVectors, D>,
25938 T2: fidl::encoding::Encode<u16, D>,
25939 > fidl::encoding::Encode<Sandwich9, D> for (T0, T1, T2)
25940 {
25941 #[inline]
25942 unsafe fn encode(
25943 self,
25944 encoder: &mut fidl::encoding::Encoder<'_, D>,
25945 offset: usize,
25946 depth: fidl::encoding::Depth,
25947 ) -> fidl::Result<()> {
25948 encoder.debug_check_bounds::<Sandwich9>(offset);
25949 unsafe {
25952 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25953 (ptr as *mut u64).write_unaligned(0);
25954 }
25955 unsafe {
25956 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25957 (ptr as *mut u64).write_unaligned(0);
25958 }
25959 self.0.encode(encoder, offset + 0, depth)?;
25961 self.1.encode(encoder, offset + 8, depth)?;
25962 self.2.encode(encoder, offset + 24, depth)?;
25963 Ok(())
25964 }
25965 }
25966
25967 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich9 {
25968 #[inline(always)]
25969 fn new_empty() -> Self {
25970 Self {
25971 before: fidl::new_empty!(u16, D),
25972 the_union: fidl::new_empty!(UnionWithVectorOfVectors, D),
25973 after: fidl::new_empty!(u16, D),
25974 }
25975 }
25976
25977 #[inline]
25978 unsafe fn decode(
25979 &mut self,
25980 decoder: &mut fidl::encoding::Decoder<'_, D>,
25981 offset: usize,
25982 _depth: fidl::encoding::Depth,
25983 ) -> fidl::Result<()> {
25984 decoder.debug_check_bounds::<Self>(offset);
25985 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25987 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25988 let mask = 0xffffffffffff0000u64;
25989 let maskedval = padval & mask;
25990 if maskedval != 0 {
25991 return Err(fidl::Error::NonZeroPadding {
25992 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25993 });
25994 }
25995 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25996 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25997 let mask = 0xffffffffffff0000u64;
25998 let maskedval = padval & mask;
25999 if maskedval != 0 {
26000 return Err(fidl::Error::NonZeroPadding {
26001 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
26002 });
26003 }
26004 fidl::decode!(u16, D, &mut self.before, decoder, offset + 0, _depth)?;
26005 fidl::decode!(
26006 UnionWithVectorOfVectors,
26007 D,
26008 &mut self.the_union,
26009 decoder,
26010 offset + 8,
26011 _depth
26012 )?;
26013 fidl::decode!(u16, D, &mut self.after, decoder, offset + 24, _depth)?;
26014 Ok(())
26015 }
26016 }
26017
26018 impl fidl::encoding::ValueTypeMarker for SimpleTableArrayStruct {
26019 type Borrowed<'a> = &'a Self;
26020 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26021 value
26022 }
26023 }
26024
26025 unsafe impl fidl::encoding::TypeMarker for SimpleTableArrayStruct {
26026 type Owned = Self;
26027
26028 #[inline(always)]
26029 fn inline_align(_context: fidl::encoding::Context) -> usize {
26030 8
26031 }
26032
26033 #[inline(always)]
26034 fn inline_size(_context: fidl::encoding::Context) -> usize {
26035 32
26036 }
26037 }
26038
26039 unsafe impl<D: fidl::encoding::ResourceDialect>
26040 fidl::encoding::Encode<SimpleTableArrayStruct, D> for &SimpleTableArrayStruct
26041 {
26042 #[inline]
26043 unsafe fn encode(
26044 self,
26045 encoder: &mut fidl::encoding::Encoder<'_, D>,
26046 offset: usize,
26047 _depth: fidl::encoding::Depth,
26048 ) -> fidl::Result<()> {
26049 encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26050 fidl::encoding::Encode::<SimpleTableArrayStruct, D>::encode(
26052 (
26053 <fidl::encoding::Array<TransformerSimpleTable, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_array),
26054 ),
26055 encoder, offset, _depth
26056 )
26057 }
26058 }
26059 unsafe impl<
26060 D: fidl::encoding::ResourceDialect,
26061 T0: fidl::encoding::Encode<fidl::encoding::Array<TransformerSimpleTable, 2>, D>,
26062 > fidl::encoding::Encode<SimpleTableArrayStruct, D> for (T0,)
26063 {
26064 #[inline]
26065 unsafe fn encode(
26066 self,
26067 encoder: &mut fidl::encoding::Encoder<'_, D>,
26068 offset: usize,
26069 depth: fidl::encoding::Depth,
26070 ) -> fidl::Result<()> {
26071 encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26072 self.0.encode(encoder, offset + 0, depth)?;
26076 Ok(())
26077 }
26078 }
26079
26080 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26081 for SimpleTableArrayStruct
26082 {
26083 #[inline(always)]
26084 fn new_empty() -> Self {
26085 Self {
26086 the_array: fidl::new_empty!(fidl::encoding::Array<TransformerSimpleTable, 2>, D),
26087 }
26088 }
26089
26090 #[inline]
26091 unsafe fn decode(
26092 &mut self,
26093 decoder: &mut fidl::encoding::Decoder<'_, D>,
26094 offset: usize,
26095 _depth: fidl::encoding::Depth,
26096 ) -> fidl::Result<()> {
26097 decoder.debug_check_bounds::<Self>(offset);
26098 fidl::decode!(fidl::encoding::Array<TransformerSimpleTable, 2>, D, &mut self.the_array, decoder, offset + 0, _depth)?;
26100 Ok(())
26101 }
26102 }
26103
26104 impl fidl::encoding::ValueTypeMarker for SimpleTableThenUint64 {
26105 type Borrowed<'a> = &'a Self;
26106 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26107 value
26108 }
26109 }
26110
26111 unsafe impl fidl::encoding::TypeMarker for SimpleTableThenUint64 {
26112 type Owned = Self;
26113
26114 #[inline(always)]
26115 fn inline_align(_context: fidl::encoding::Context) -> usize {
26116 8
26117 }
26118
26119 #[inline(always)]
26120 fn inline_size(_context: fidl::encoding::Context) -> usize {
26121 24
26122 }
26123 }
26124
26125 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTableThenUint64, D>
26126 for &SimpleTableThenUint64
26127 {
26128 #[inline]
26129 unsafe fn encode(
26130 self,
26131 encoder: &mut fidl::encoding::Encoder<'_, D>,
26132 offset: usize,
26133 _depth: fidl::encoding::Depth,
26134 ) -> fidl::Result<()> {
26135 encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26136 fidl::encoding::Encode::<SimpleTableThenUint64, D>::encode(
26138 (
26139 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),
26140 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.number),
26141 ),
26142 encoder,
26143 offset,
26144 _depth,
26145 )
26146 }
26147 }
26148 unsafe impl<
26149 D: fidl::encoding::ResourceDialect,
26150 T0: fidl::encoding::Encode<SimpleTable, D>,
26151 T1: fidl::encoding::Encode<u64, D>,
26152 > fidl::encoding::Encode<SimpleTableThenUint64, D> for (T0, T1)
26153 {
26154 #[inline]
26155 unsafe fn encode(
26156 self,
26157 encoder: &mut fidl::encoding::Encoder<'_, D>,
26158 offset: usize,
26159 depth: fidl::encoding::Depth,
26160 ) -> fidl::Result<()> {
26161 encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26162 self.0.encode(encoder, offset + 0, depth)?;
26166 self.1.encode(encoder, offset + 16, depth)?;
26167 Ok(())
26168 }
26169 }
26170
26171 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTableThenUint64 {
26172 #[inline(always)]
26173 fn new_empty() -> Self {
26174 Self { table: fidl::new_empty!(SimpleTable, D), number: fidl::new_empty!(u64, D) }
26175 }
26176
26177 #[inline]
26178 unsafe fn decode(
26179 &mut self,
26180 decoder: &mut fidl::encoding::Decoder<'_, D>,
26181 offset: usize,
26182 _depth: fidl::encoding::Depth,
26183 ) -> fidl::Result<()> {
26184 decoder.debug_check_bounds::<Self>(offset);
26185 fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
26187 fidl::decode!(u64, D, &mut self.number, decoder, offset + 16, _depth)?;
26188 Ok(())
26189 }
26190 }
26191
26192 impl fidl::encoding::ValueTypeMarker for SingleVariantUnionStruct {
26193 type Borrowed<'a> = &'a Self;
26194 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26195 value
26196 }
26197 }
26198
26199 unsafe impl fidl::encoding::TypeMarker for SingleVariantUnionStruct {
26200 type Owned = Self;
26201
26202 #[inline(always)]
26203 fn inline_align(_context: fidl::encoding::Context) -> usize {
26204 8
26205 }
26206
26207 #[inline(always)]
26208 fn inline_size(_context: fidl::encoding::Context) -> usize {
26209 16
26210 }
26211 }
26212
26213 unsafe impl<D: fidl::encoding::ResourceDialect>
26214 fidl::encoding::Encode<SingleVariantUnionStruct, D> for &SingleVariantUnionStruct
26215 {
26216 #[inline]
26217 unsafe fn encode(
26218 self,
26219 encoder: &mut fidl::encoding::Encoder<'_, D>,
26220 offset: usize,
26221 _depth: fidl::encoding::Depth,
26222 ) -> fidl::Result<()> {
26223 encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26224 fidl::encoding::Encode::<SingleVariantUnionStruct, D>::encode(
26226 (<SingleVariantUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
26227 encoder,
26228 offset,
26229 _depth,
26230 )
26231 }
26232 }
26233 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SingleVariantUnion, D>>
26234 fidl::encoding::Encode<SingleVariantUnionStruct, D> for (T0,)
26235 {
26236 #[inline]
26237 unsafe fn encode(
26238 self,
26239 encoder: &mut fidl::encoding::Encoder<'_, D>,
26240 offset: usize,
26241 depth: fidl::encoding::Depth,
26242 ) -> fidl::Result<()> {
26243 encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26244 self.0.encode(encoder, offset + 0, depth)?;
26248 Ok(())
26249 }
26250 }
26251
26252 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26253 for SingleVariantUnionStruct
26254 {
26255 #[inline(always)]
26256 fn new_empty() -> Self {
26257 Self { u: fidl::new_empty!(SingleVariantUnion, D) }
26258 }
26259
26260 #[inline]
26261 unsafe fn decode(
26262 &mut self,
26263 decoder: &mut fidl::encoding::Decoder<'_, D>,
26264 offset: usize,
26265 _depth: fidl::encoding::Depth,
26266 ) -> fidl::Result<()> {
26267 decoder.debug_check_bounds::<Self>(offset);
26268 fidl::decode!(SingleVariantUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
26270 Ok(())
26271 }
26272 }
26273
26274 impl fidl::encoding::ValueTypeMarker for Size5Alignment1 {
26275 type Borrowed<'a> = &'a Self;
26276 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26277 value
26278 }
26279 }
26280
26281 unsafe impl fidl::encoding::TypeMarker for Size5Alignment1 {
26282 type Owned = Self;
26283
26284 #[inline(always)]
26285 fn inline_align(_context: fidl::encoding::Context) -> usize {
26286 1
26287 }
26288
26289 #[inline(always)]
26290 fn inline_size(_context: fidl::encoding::Context) -> usize {
26291 5
26292 }
26293 #[inline(always)]
26294 fn encode_is_copy() -> bool {
26295 true
26296 }
26297
26298 #[inline(always)]
26299 fn decode_is_copy() -> bool {
26300 true
26301 }
26302 }
26303
26304 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1, D>
26305 for &Size5Alignment1
26306 {
26307 #[inline]
26308 unsafe fn encode(
26309 self,
26310 encoder: &mut fidl::encoding::Encoder<'_, D>,
26311 offset: usize,
26312 _depth: fidl::encoding::Depth,
26313 ) -> fidl::Result<()> {
26314 encoder.debug_check_bounds::<Size5Alignment1>(offset);
26315 unsafe {
26316 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26318 (buf_ptr as *mut Size5Alignment1)
26319 .write_unaligned((self as *const Size5Alignment1).read());
26320 }
26323 Ok(())
26324 }
26325 }
26326 unsafe impl<
26327 D: fidl::encoding::ResourceDialect,
26328 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 5>, D>,
26329 > fidl::encoding::Encode<Size5Alignment1, D> for (T0,)
26330 {
26331 #[inline]
26332 unsafe fn encode(
26333 self,
26334 encoder: &mut fidl::encoding::Encoder<'_, D>,
26335 offset: usize,
26336 depth: fidl::encoding::Depth,
26337 ) -> fidl::Result<()> {
26338 encoder.debug_check_bounds::<Size5Alignment1>(offset);
26339 self.0.encode(encoder, offset + 0, depth)?;
26343 Ok(())
26344 }
26345 }
26346
26347 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1 {
26348 #[inline(always)]
26349 fn new_empty() -> Self {
26350 Self { data: fidl::new_empty!(fidl::encoding::Array<u8, 5>, D) }
26351 }
26352
26353 #[inline]
26354 unsafe fn decode(
26355 &mut self,
26356 decoder: &mut fidl::encoding::Decoder<'_, D>,
26357 offset: usize,
26358 _depth: fidl::encoding::Depth,
26359 ) -> fidl::Result<()> {
26360 decoder.debug_check_bounds::<Self>(offset);
26361 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26362 unsafe {
26365 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 5);
26366 }
26367 Ok(())
26368 }
26369 }
26370
26371 impl fidl::encoding::ValueTypeMarker for Size5Alignment1Array {
26372 type Borrowed<'a> = &'a Self;
26373 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26374 value
26375 }
26376 }
26377
26378 unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Array {
26379 type Owned = Self;
26380
26381 #[inline(always)]
26382 fn inline_align(_context: fidl::encoding::Context) -> usize {
26383 1
26384 }
26385
26386 #[inline(always)]
26387 fn inline_size(_context: fidl::encoding::Context) -> usize {
26388 15
26389 }
26390 #[inline(always)]
26391 fn encode_is_copy() -> bool {
26392 true
26393 }
26394
26395 #[inline(always)]
26396 fn decode_is_copy() -> bool {
26397 true
26398 }
26399 }
26400
26401 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Array, D>
26402 for &Size5Alignment1Array
26403 {
26404 #[inline]
26405 unsafe fn encode(
26406 self,
26407 encoder: &mut fidl::encoding::Encoder<'_, D>,
26408 offset: usize,
26409 _depth: fidl::encoding::Depth,
26410 ) -> fidl::Result<()> {
26411 encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26412 unsafe {
26413 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26415 (buf_ptr as *mut Size5Alignment1Array)
26416 .write_unaligned((self as *const Size5Alignment1Array).read());
26417 }
26420 Ok(())
26421 }
26422 }
26423 unsafe impl<
26424 D: fidl::encoding::ResourceDialect,
26425 T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment1, 3>, D>,
26426 > fidl::encoding::Encode<Size5Alignment1Array, D> for (T0,)
26427 {
26428 #[inline]
26429 unsafe fn encode(
26430 self,
26431 encoder: &mut fidl::encoding::Encoder<'_, D>,
26432 offset: usize,
26433 depth: fidl::encoding::Depth,
26434 ) -> fidl::Result<()> {
26435 encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26436 self.0.encode(encoder, offset + 0, depth)?;
26440 Ok(())
26441 }
26442 }
26443
26444 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Array {
26445 #[inline(always)]
26446 fn new_empty() -> Self {
26447 Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment1, 3>, D) }
26448 }
26449
26450 #[inline]
26451 unsafe fn decode(
26452 &mut self,
26453 decoder: &mut fidl::encoding::Decoder<'_, D>,
26454 offset: usize,
26455 _depth: fidl::encoding::Depth,
26456 ) -> fidl::Result<()> {
26457 decoder.debug_check_bounds::<Self>(offset);
26458 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26459 unsafe {
26462 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 15);
26463 }
26464 Ok(())
26465 }
26466 }
26467
26468 impl fidl::encoding::ValueTypeMarker for Size5Alignment1Vector {
26469 type Borrowed<'a> = &'a Self;
26470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26471 value
26472 }
26473 }
26474
26475 unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Vector {
26476 type Owned = Self;
26477
26478 #[inline(always)]
26479 fn inline_align(_context: fidl::encoding::Context) -> usize {
26480 8
26481 }
26482
26483 #[inline(always)]
26484 fn inline_size(_context: fidl::encoding::Context) -> usize {
26485 16
26486 }
26487 }
26488
26489 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Vector, D>
26490 for &Size5Alignment1Vector
26491 {
26492 #[inline]
26493 unsafe fn encode(
26494 self,
26495 encoder: &mut fidl::encoding::Encoder<'_, D>,
26496 offset: usize,
26497 _depth: fidl::encoding::Depth,
26498 ) -> fidl::Result<()> {
26499 encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26500 fidl::encoding::Encode::<Size5Alignment1Vector, D>::encode(
26502 (
26503 <fidl::encoding::UnboundedVector<Size5Alignment1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
26504 ),
26505 encoder, offset, _depth
26506 )
26507 }
26508 }
26509 unsafe impl<
26510 D: fidl::encoding::ResourceDialect,
26511 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment1>, D>,
26512 > fidl::encoding::Encode<Size5Alignment1Vector, D> for (T0,)
26513 {
26514 #[inline]
26515 unsafe fn encode(
26516 self,
26517 encoder: &mut fidl::encoding::Encoder<'_, D>,
26518 offset: usize,
26519 depth: fidl::encoding::Depth,
26520 ) -> fidl::Result<()> {
26521 encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26522 self.0.encode(encoder, offset + 0, depth)?;
26526 Ok(())
26527 }
26528 }
26529
26530 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Vector {
26531 #[inline(always)]
26532 fn new_empty() -> Self {
26533 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment1>, D) }
26534 }
26535
26536 #[inline]
26537 unsafe fn decode(
26538 &mut self,
26539 decoder: &mut fidl::encoding::Decoder<'_, D>,
26540 offset: usize,
26541 _depth: fidl::encoding::Depth,
26542 ) -> fidl::Result<()> {
26543 decoder.debug_check_bounds::<Self>(offset);
26544 fidl::decode!(
26546 fidl::encoding::UnboundedVector<Size5Alignment1>,
26547 D,
26548 &mut self.v,
26549 decoder,
26550 offset + 0,
26551 _depth
26552 )?;
26553 Ok(())
26554 }
26555 }
26556
26557 impl fidl::encoding::ValueTypeMarker for Size5Alignment4 {
26558 type Borrowed<'a> = &'a Self;
26559 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26560 value
26561 }
26562 }
26563
26564 unsafe impl fidl::encoding::TypeMarker for Size5Alignment4 {
26565 type Owned = Self;
26566
26567 #[inline(always)]
26568 fn inline_align(_context: fidl::encoding::Context) -> usize {
26569 4
26570 }
26571
26572 #[inline(always)]
26573 fn inline_size(_context: fidl::encoding::Context) -> usize {
26574 8
26575 }
26576 }
26577
26578 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4, D>
26579 for &Size5Alignment4
26580 {
26581 #[inline]
26582 unsafe fn encode(
26583 self,
26584 encoder: &mut fidl::encoding::Encoder<'_, D>,
26585 offset: usize,
26586 _depth: fidl::encoding::Depth,
26587 ) -> fidl::Result<()> {
26588 encoder.debug_check_bounds::<Size5Alignment4>(offset);
26589 unsafe {
26590 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26592 (buf_ptr as *mut Size5Alignment4)
26593 .write_unaligned((self as *const Size5Alignment4).read());
26594 let padding_ptr = buf_ptr.offset(4) as *mut u32;
26597 let padding_mask = 0xffffff00u32;
26598 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26599 }
26600 Ok(())
26601 }
26602 }
26603 unsafe impl<
26604 D: fidl::encoding::ResourceDialect,
26605 T0: fidl::encoding::Encode<u32, D>,
26606 T1: fidl::encoding::Encode<u8, D>,
26607 > fidl::encoding::Encode<Size5Alignment4, D> for (T0, T1)
26608 {
26609 #[inline]
26610 unsafe fn encode(
26611 self,
26612 encoder: &mut fidl::encoding::Encoder<'_, D>,
26613 offset: usize,
26614 depth: fidl::encoding::Depth,
26615 ) -> fidl::Result<()> {
26616 encoder.debug_check_bounds::<Size5Alignment4>(offset);
26617 unsafe {
26620 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
26621 (ptr as *mut u32).write_unaligned(0);
26622 }
26623 self.0.encode(encoder, offset + 0, depth)?;
26625 self.1.encode(encoder, offset + 4, depth)?;
26626 Ok(())
26627 }
26628 }
26629
26630 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4 {
26631 #[inline(always)]
26632 fn new_empty() -> Self {
26633 Self { four: fidl::new_empty!(u32, D), one: fidl::new_empty!(u8, D) }
26634 }
26635
26636 #[inline]
26637 unsafe fn decode(
26638 &mut self,
26639 decoder: &mut fidl::encoding::Decoder<'_, D>,
26640 offset: usize,
26641 _depth: fidl::encoding::Depth,
26642 ) -> fidl::Result<()> {
26643 decoder.debug_check_bounds::<Self>(offset);
26644 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26645 let ptr = unsafe { buf_ptr.offset(4) };
26647 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26648 let mask = 0xffffff00u32;
26649 let maskedval = padval & mask;
26650 if maskedval != 0 {
26651 return Err(fidl::Error::NonZeroPadding {
26652 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26653 });
26654 }
26655 unsafe {
26657 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
26658 }
26659 Ok(())
26660 }
26661 }
26662
26663 impl fidl::encoding::ValueTypeMarker for Size5Alignment4Array {
26664 type Borrowed<'a> = &'a Self;
26665 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26666 value
26667 }
26668 }
26669
26670 unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Array {
26671 type Owned = Self;
26672
26673 #[inline(always)]
26674 fn inline_align(_context: fidl::encoding::Context) -> usize {
26675 4
26676 }
26677
26678 #[inline(always)]
26679 fn inline_size(_context: fidl::encoding::Context) -> usize {
26680 24
26681 }
26682 }
26683
26684 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Array, D>
26685 for &Size5Alignment4Array
26686 {
26687 #[inline]
26688 unsafe fn encode(
26689 self,
26690 encoder: &mut fidl::encoding::Encoder<'_, D>,
26691 offset: usize,
26692 _depth: fidl::encoding::Depth,
26693 ) -> fidl::Result<()> {
26694 encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26695 unsafe {
26696 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26698 (buf_ptr as *mut Size5Alignment4Array)
26699 .write_unaligned((self as *const Size5Alignment4Array).read());
26700 let padding_ptr = buf_ptr.offset(4) as *mut u32;
26703 let padding_mask = 0xffffff00u32;
26704 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26705 let padding_ptr = buf_ptr.offset(12) as *mut u32;
26706 let padding_mask = 0xffffff00u32;
26707 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26708 let padding_ptr = buf_ptr.offset(20) as *mut u32;
26709 let padding_mask = 0xffffff00u32;
26710 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26711 }
26712 Ok(())
26713 }
26714 }
26715 unsafe impl<
26716 D: fidl::encoding::ResourceDialect,
26717 T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment4, 3>, D>,
26718 > fidl::encoding::Encode<Size5Alignment4Array, D> for (T0,)
26719 {
26720 #[inline]
26721 unsafe fn encode(
26722 self,
26723 encoder: &mut fidl::encoding::Encoder<'_, D>,
26724 offset: usize,
26725 depth: fidl::encoding::Depth,
26726 ) -> fidl::Result<()> {
26727 encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26728 self.0.encode(encoder, offset + 0, depth)?;
26732 Ok(())
26733 }
26734 }
26735
26736 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Array {
26737 #[inline(always)]
26738 fn new_empty() -> Self {
26739 Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment4, 3>, D) }
26740 }
26741
26742 #[inline]
26743 unsafe fn decode(
26744 &mut self,
26745 decoder: &mut fidl::encoding::Decoder<'_, D>,
26746 offset: usize,
26747 _depth: fidl::encoding::Depth,
26748 ) -> fidl::Result<()> {
26749 decoder.debug_check_bounds::<Self>(offset);
26750 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26751 let ptr = unsafe { buf_ptr.offset(4) };
26753 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26754 let mask = 0xffffff00u32;
26755 let maskedval = padval & mask;
26756 if maskedval != 0 {
26757 return Err(fidl::Error::NonZeroPadding {
26758 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26759 });
26760 }
26761 let ptr = unsafe { buf_ptr.offset(12) };
26762 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26763 let mask = 0xffffff00u32;
26764 let maskedval = padval & mask;
26765 if maskedval != 0 {
26766 return Err(fidl::Error::NonZeroPadding {
26767 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
26768 });
26769 }
26770 let ptr = unsafe { buf_ptr.offset(20) };
26771 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26772 let mask = 0xffffff00u32;
26773 let maskedval = padval & mask;
26774 if maskedval != 0 {
26775 return Err(fidl::Error::NonZeroPadding {
26776 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
26777 });
26778 }
26779 unsafe {
26781 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
26782 }
26783 Ok(())
26784 }
26785 }
26786
26787 impl fidl::encoding::ValueTypeMarker for Size5Alignment4Vector {
26788 type Borrowed<'a> = &'a Self;
26789 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26790 value
26791 }
26792 }
26793
26794 unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Vector {
26795 type Owned = Self;
26796
26797 #[inline(always)]
26798 fn inline_align(_context: fidl::encoding::Context) -> usize {
26799 8
26800 }
26801
26802 #[inline(always)]
26803 fn inline_size(_context: fidl::encoding::Context) -> usize {
26804 16
26805 }
26806 }
26807
26808 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Vector, D>
26809 for &Size5Alignment4Vector
26810 {
26811 #[inline]
26812 unsafe fn encode(
26813 self,
26814 encoder: &mut fidl::encoding::Encoder<'_, D>,
26815 offset: usize,
26816 _depth: fidl::encoding::Depth,
26817 ) -> fidl::Result<()> {
26818 encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
26819 fidl::encoding::Encode::<Size5Alignment4Vector, D>::encode(
26821 (
26822 <fidl::encoding::UnboundedVector<Size5Alignment4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
26823 ),
26824 encoder, offset, _depth
26825 )
26826 }
26827 }
26828 unsafe impl<
26829 D: fidl::encoding::ResourceDialect,
26830 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment4>, D>,
26831 > fidl::encoding::Encode<Size5Alignment4Vector, D> for (T0,)
26832 {
26833 #[inline]
26834 unsafe fn encode(
26835 self,
26836 encoder: &mut fidl::encoding::Encoder<'_, D>,
26837 offset: usize,
26838 depth: fidl::encoding::Depth,
26839 ) -> fidl::Result<()> {
26840 encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
26841 self.0.encode(encoder, offset + 0, depth)?;
26845 Ok(())
26846 }
26847 }
26848
26849 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Vector {
26850 #[inline(always)]
26851 fn new_empty() -> Self {
26852 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment4>, D) }
26853 }
26854
26855 #[inline]
26856 unsafe fn decode(
26857 &mut self,
26858 decoder: &mut fidl::encoding::Decoder<'_, D>,
26859 offset: usize,
26860 _depth: fidl::encoding::Depth,
26861 ) -> fidl::Result<()> {
26862 decoder.debug_check_bounds::<Self>(offset);
26863 fidl::decode!(
26865 fidl::encoding::UnboundedVector<Size5Alignment4>,
26866 D,
26867 &mut self.v,
26868 decoder,
26869 offset + 0,
26870 _depth
26871 )?;
26872 Ok(())
26873 }
26874 }
26875
26876 impl fidl::encoding::ValueTypeMarker for Size8Align8 {
26877 type Borrowed<'a> = &'a Self;
26878 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26879 value
26880 }
26881 }
26882
26883 unsafe impl fidl::encoding::TypeMarker for Size8Align8 {
26884 type Owned = Self;
26885
26886 #[inline(always)]
26887 fn inline_align(_context: fidl::encoding::Context) -> usize {
26888 8
26889 }
26890
26891 #[inline(always)]
26892 fn inline_size(_context: fidl::encoding::Context) -> usize {
26893 8
26894 }
26895 #[inline(always)]
26896 fn encode_is_copy() -> bool {
26897 true
26898 }
26899
26900 #[inline(always)]
26901 fn decode_is_copy() -> bool {
26902 true
26903 }
26904 }
26905
26906 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size8Align8, D>
26907 for &Size8Align8
26908 {
26909 #[inline]
26910 unsafe fn encode(
26911 self,
26912 encoder: &mut fidl::encoding::Encoder<'_, D>,
26913 offset: usize,
26914 _depth: fidl::encoding::Depth,
26915 ) -> fidl::Result<()> {
26916 encoder.debug_check_bounds::<Size8Align8>(offset);
26917 unsafe {
26918 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26920 (buf_ptr as *mut Size8Align8).write_unaligned((self as *const Size8Align8).read());
26921 }
26924 Ok(())
26925 }
26926 }
26927 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
26928 fidl::encoding::Encode<Size8Align8, D> for (T0,)
26929 {
26930 #[inline]
26931 unsafe fn encode(
26932 self,
26933 encoder: &mut fidl::encoding::Encoder<'_, D>,
26934 offset: usize,
26935 depth: fidl::encoding::Depth,
26936 ) -> fidl::Result<()> {
26937 encoder.debug_check_bounds::<Size8Align8>(offset);
26938 self.0.encode(encoder, offset + 0, depth)?;
26942 Ok(())
26943 }
26944 }
26945
26946 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size8Align8 {
26947 #[inline(always)]
26948 fn new_empty() -> Self {
26949 Self { data: fidl::new_empty!(u64, D) }
26950 }
26951
26952 #[inline]
26953 unsafe fn decode(
26954 &mut self,
26955 decoder: &mut fidl::encoding::Decoder<'_, D>,
26956 offset: usize,
26957 _depth: fidl::encoding::Depth,
26958 ) -> fidl::Result<()> {
26959 decoder.debug_check_bounds::<Self>(offset);
26960 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26961 unsafe {
26964 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
26965 }
26966 Ok(())
26967 }
26968 }
26969
26970 impl fidl::encoding::ValueTypeMarker for StrictBitsUint16Struct {
26971 type Borrowed<'a> = &'a Self;
26972 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26973 value
26974 }
26975 }
26976
26977 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16Struct {
26978 type Owned = Self;
26979
26980 #[inline(always)]
26981 fn inline_align(_context: fidl::encoding::Context) -> usize {
26982 2
26983 }
26984
26985 #[inline(always)]
26986 fn inline_size(_context: fidl::encoding::Context) -> usize {
26987 2
26988 }
26989 }
26990
26991 unsafe impl<D: fidl::encoding::ResourceDialect>
26992 fidl::encoding::Encode<StrictBitsUint16Struct, D> for &StrictBitsUint16Struct
26993 {
26994 #[inline]
26995 unsafe fn encode(
26996 self,
26997 encoder: &mut fidl::encoding::Encoder<'_, D>,
26998 offset: usize,
26999 _depth: fidl::encoding::Depth,
27000 ) -> fidl::Result<()> {
27001 encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27002 fidl::encoding::Encode::<StrictBitsUint16Struct, D>::encode(
27004 (<StrictBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27005 encoder,
27006 offset,
27007 _depth,
27008 )
27009 }
27010 }
27011 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint16, D>>
27012 fidl::encoding::Encode<StrictBitsUint16Struct, D> for (T0,)
27013 {
27014 #[inline]
27015 unsafe fn encode(
27016 self,
27017 encoder: &mut fidl::encoding::Encoder<'_, D>,
27018 offset: usize,
27019 depth: fidl::encoding::Depth,
27020 ) -> fidl::Result<()> {
27021 encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27022 self.0.encode(encoder, offset + 0, depth)?;
27026 Ok(())
27027 }
27028 }
27029
27030 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27031 for StrictBitsUint16Struct
27032 {
27033 #[inline(always)]
27034 fn new_empty() -> Self {
27035 Self { b: fidl::new_empty!(StrictBitsUint16, D) }
27036 }
27037
27038 #[inline]
27039 unsafe fn decode(
27040 &mut self,
27041 decoder: &mut fidl::encoding::Decoder<'_, D>,
27042 offset: usize,
27043 _depth: fidl::encoding::Depth,
27044 ) -> fidl::Result<()> {
27045 decoder.debug_check_bounds::<Self>(offset);
27046 fidl::decode!(StrictBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
27048 Ok(())
27049 }
27050 }
27051
27052 impl fidl::encoding::ValueTypeMarker for StrictBitsUint32Struct {
27053 type Borrowed<'a> = &'a Self;
27054 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27055 value
27056 }
27057 }
27058
27059 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32Struct {
27060 type Owned = Self;
27061
27062 #[inline(always)]
27063 fn inline_align(_context: fidl::encoding::Context) -> usize {
27064 4
27065 }
27066
27067 #[inline(always)]
27068 fn inline_size(_context: fidl::encoding::Context) -> usize {
27069 4
27070 }
27071 }
27072
27073 unsafe impl<D: fidl::encoding::ResourceDialect>
27074 fidl::encoding::Encode<StrictBitsUint32Struct, D> for &StrictBitsUint32Struct
27075 {
27076 #[inline]
27077 unsafe fn encode(
27078 self,
27079 encoder: &mut fidl::encoding::Encoder<'_, D>,
27080 offset: usize,
27081 _depth: fidl::encoding::Depth,
27082 ) -> fidl::Result<()> {
27083 encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27084 fidl::encoding::Encode::<StrictBitsUint32Struct, D>::encode(
27086 (<StrictBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27087 encoder,
27088 offset,
27089 _depth,
27090 )
27091 }
27092 }
27093 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint32, D>>
27094 fidl::encoding::Encode<StrictBitsUint32Struct, D> for (T0,)
27095 {
27096 #[inline]
27097 unsafe fn encode(
27098 self,
27099 encoder: &mut fidl::encoding::Encoder<'_, D>,
27100 offset: usize,
27101 depth: fidl::encoding::Depth,
27102 ) -> fidl::Result<()> {
27103 encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27104 self.0.encode(encoder, offset + 0, depth)?;
27108 Ok(())
27109 }
27110 }
27111
27112 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27113 for StrictBitsUint32Struct
27114 {
27115 #[inline(always)]
27116 fn new_empty() -> Self {
27117 Self { b: fidl::new_empty!(StrictBitsUint32, D) }
27118 }
27119
27120 #[inline]
27121 unsafe fn decode(
27122 &mut self,
27123 decoder: &mut fidl::encoding::Decoder<'_, D>,
27124 offset: usize,
27125 _depth: fidl::encoding::Depth,
27126 ) -> fidl::Result<()> {
27127 decoder.debug_check_bounds::<Self>(offset);
27128 fidl::decode!(StrictBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
27130 Ok(())
27131 }
27132 }
27133
27134 impl fidl::encoding::ValueTypeMarker for StrictBitsUint64Struct {
27135 type Borrowed<'a> = &'a Self;
27136 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27137 value
27138 }
27139 }
27140
27141 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64Struct {
27142 type Owned = Self;
27143
27144 #[inline(always)]
27145 fn inline_align(_context: fidl::encoding::Context) -> usize {
27146 8
27147 }
27148
27149 #[inline(always)]
27150 fn inline_size(_context: fidl::encoding::Context) -> usize {
27151 8
27152 }
27153 }
27154
27155 unsafe impl<D: fidl::encoding::ResourceDialect>
27156 fidl::encoding::Encode<StrictBitsUint64Struct, D> for &StrictBitsUint64Struct
27157 {
27158 #[inline]
27159 unsafe fn encode(
27160 self,
27161 encoder: &mut fidl::encoding::Encoder<'_, D>,
27162 offset: usize,
27163 _depth: fidl::encoding::Depth,
27164 ) -> fidl::Result<()> {
27165 encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27166 fidl::encoding::Encode::<StrictBitsUint64Struct, D>::encode(
27168 (<StrictBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27169 encoder,
27170 offset,
27171 _depth,
27172 )
27173 }
27174 }
27175 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint64, D>>
27176 fidl::encoding::Encode<StrictBitsUint64Struct, D> for (T0,)
27177 {
27178 #[inline]
27179 unsafe fn encode(
27180 self,
27181 encoder: &mut fidl::encoding::Encoder<'_, D>,
27182 offset: usize,
27183 depth: fidl::encoding::Depth,
27184 ) -> fidl::Result<()> {
27185 encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27186 self.0.encode(encoder, offset + 0, depth)?;
27190 Ok(())
27191 }
27192 }
27193
27194 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27195 for StrictBitsUint64Struct
27196 {
27197 #[inline(always)]
27198 fn new_empty() -> Self {
27199 Self { b: fidl::new_empty!(StrictBitsUint64, D) }
27200 }
27201
27202 #[inline]
27203 unsafe fn decode(
27204 &mut self,
27205 decoder: &mut fidl::encoding::Decoder<'_, D>,
27206 offset: usize,
27207 _depth: fidl::encoding::Depth,
27208 ) -> fidl::Result<()> {
27209 decoder.debug_check_bounds::<Self>(offset);
27210 fidl::decode!(StrictBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
27212 Ok(())
27213 }
27214 }
27215
27216 impl fidl::encoding::ValueTypeMarker for StrictBitsUint8Struct {
27217 type Borrowed<'a> = &'a Self;
27218 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27219 value
27220 }
27221 }
27222
27223 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8Struct {
27224 type Owned = Self;
27225
27226 #[inline(always)]
27227 fn inline_align(_context: fidl::encoding::Context) -> usize {
27228 1
27229 }
27230
27231 #[inline(always)]
27232 fn inline_size(_context: fidl::encoding::Context) -> usize {
27233 1
27234 }
27235 }
27236
27237 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictBitsUint8Struct, D>
27238 for &StrictBitsUint8Struct
27239 {
27240 #[inline]
27241 unsafe fn encode(
27242 self,
27243 encoder: &mut fidl::encoding::Encoder<'_, D>,
27244 offset: usize,
27245 _depth: fidl::encoding::Depth,
27246 ) -> fidl::Result<()> {
27247 encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27248 fidl::encoding::Encode::<StrictBitsUint8Struct, D>::encode(
27250 (<StrictBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27251 encoder,
27252 offset,
27253 _depth,
27254 )
27255 }
27256 }
27257 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint8, D>>
27258 fidl::encoding::Encode<StrictBitsUint8Struct, D> for (T0,)
27259 {
27260 #[inline]
27261 unsafe fn encode(
27262 self,
27263 encoder: &mut fidl::encoding::Encoder<'_, D>,
27264 offset: usize,
27265 depth: fidl::encoding::Depth,
27266 ) -> fidl::Result<()> {
27267 encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27268 self.0.encode(encoder, offset + 0, depth)?;
27272 Ok(())
27273 }
27274 }
27275
27276 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8Struct {
27277 #[inline(always)]
27278 fn new_empty() -> Self {
27279 Self { b: fidl::new_empty!(StrictBitsUint8, D) }
27280 }
27281
27282 #[inline]
27283 unsafe fn decode(
27284 &mut self,
27285 decoder: &mut fidl::encoding::Decoder<'_, D>,
27286 offset: usize,
27287 _depth: fidl::encoding::Depth,
27288 ) -> fidl::Result<()> {
27289 decoder.debug_check_bounds::<Self>(offset);
27290 fidl::decode!(StrictBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
27292 Ok(())
27293 }
27294 }
27295
27296 impl fidl::encoding::ValueTypeMarker for StrictEnumInt16Struct {
27297 type Borrowed<'a> = &'a Self;
27298 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27299 value
27300 }
27301 }
27302
27303 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16Struct {
27304 type Owned = Self;
27305
27306 #[inline(always)]
27307 fn inline_align(_context: fidl::encoding::Context) -> usize {
27308 2
27309 }
27310
27311 #[inline(always)]
27312 fn inline_size(_context: fidl::encoding::Context) -> usize {
27313 2
27314 }
27315 }
27316
27317 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt16Struct, D>
27318 for &StrictEnumInt16Struct
27319 {
27320 #[inline]
27321 unsafe fn encode(
27322 self,
27323 encoder: &mut fidl::encoding::Encoder<'_, D>,
27324 offset: usize,
27325 _depth: fidl::encoding::Depth,
27326 ) -> fidl::Result<()> {
27327 encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27328 fidl::encoding::Encode::<StrictEnumInt16Struct, D>::encode(
27330 (<StrictEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27331 encoder,
27332 offset,
27333 _depth,
27334 )
27335 }
27336 }
27337 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt16, D>>
27338 fidl::encoding::Encode<StrictEnumInt16Struct, D> for (T0,)
27339 {
27340 #[inline]
27341 unsafe fn encode(
27342 self,
27343 encoder: &mut fidl::encoding::Encoder<'_, D>,
27344 offset: usize,
27345 depth: fidl::encoding::Depth,
27346 ) -> fidl::Result<()> {
27347 encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27348 self.0.encode(encoder, offset + 0, depth)?;
27352 Ok(())
27353 }
27354 }
27355
27356 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16Struct {
27357 #[inline(always)]
27358 fn new_empty() -> Self {
27359 Self { e: fidl::new_empty!(StrictEnumInt16, D) }
27360 }
27361
27362 #[inline]
27363 unsafe fn decode(
27364 &mut self,
27365 decoder: &mut fidl::encoding::Decoder<'_, D>,
27366 offset: usize,
27367 _depth: fidl::encoding::Depth,
27368 ) -> fidl::Result<()> {
27369 decoder.debug_check_bounds::<Self>(offset);
27370 fidl::decode!(StrictEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
27372 Ok(())
27373 }
27374 }
27375
27376 impl fidl::encoding::ValueTypeMarker for StrictEnumInt32Struct {
27377 type Borrowed<'a> = &'a Self;
27378 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27379 value
27380 }
27381 }
27382
27383 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32Struct {
27384 type Owned = Self;
27385
27386 #[inline(always)]
27387 fn inline_align(_context: fidl::encoding::Context) -> usize {
27388 4
27389 }
27390
27391 #[inline(always)]
27392 fn inline_size(_context: fidl::encoding::Context) -> usize {
27393 4
27394 }
27395 }
27396
27397 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt32Struct, D>
27398 for &StrictEnumInt32Struct
27399 {
27400 #[inline]
27401 unsafe fn encode(
27402 self,
27403 encoder: &mut fidl::encoding::Encoder<'_, D>,
27404 offset: usize,
27405 _depth: fidl::encoding::Depth,
27406 ) -> fidl::Result<()> {
27407 encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27408 fidl::encoding::Encode::<StrictEnumInt32Struct, D>::encode(
27410 (<StrictEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27411 encoder,
27412 offset,
27413 _depth,
27414 )
27415 }
27416 }
27417 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt32, D>>
27418 fidl::encoding::Encode<StrictEnumInt32Struct, D> for (T0,)
27419 {
27420 #[inline]
27421 unsafe fn encode(
27422 self,
27423 encoder: &mut fidl::encoding::Encoder<'_, D>,
27424 offset: usize,
27425 depth: fidl::encoding::Depth,
27426 ) -> fidl::Result<()> {
27427 encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27428 self.0.encode(encoder, offset + 0, depth)?;
27432 Ok(())
27433 }
27434 }
27435
27436 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32Struct {
27437 #[inline(always)]
27438 fn new_empty() -> Self {
27439 Self { e: fidl::new_empty!(StrictEnumInt32, D) }
27440 }
27441
27442 #[inline]
27443 unsafe fn decode(
27444 &mut self,
27445 decoder: &mut fidl::encoding::Decoder<'_, D>,
27446 offset: usize,
27447 _depth: fidl::encoding::Depth,
27448 ) -> fidl::Result<()> {
27449 decoder.debug_check_bounds::<Self>(offset);
27450 fidl::decode!(StrictEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
27452 Ok(())
27453 }
27454 }
27455
27456 impl fidl::encoding::ValueTypeMarker for StrictEnumInt64Struct {
27457 type Borrowed<'a> = &'a Self;
27458 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27459 value
27460 }
27461 }
27462
27463 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64Struct {
27464 type Owned = Self;
27465
27466 #[inline(always)]
27467 fn inline_align(_context: fidl::encoding::Context) -> usize {
27468 8
27469 }
27470
27471 #[inline(always)]
27472 fn inline_size(_context: fidl::encoding::Context) -> usize {
27473 8
27474 }
27475 }
27476
27477 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt64Struct, D>
27478 for &StrictEnumInt64Struct
27479 {
27480 #[inline]
27481 unsafe fn encode(
27482 self,
27483 encoder: &mut fidl::encoding::Encoder<'_, D>,
27484 offset: usize,
27485 _depth: fidl::encoding::Depth,
27486 ) -> fidl::Result<()> {
27487 encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27488 fidl::encoding::Encode::<StrictEnumInt64Struct, D>::encode(
27490 (<StrictEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27491 encoder,
27492 offset,
27493 _depth,
27494 )
27495 }
27496 }
27497 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt64, D>>
27498 fidl::encoding::Encode<StrictEnumInt64Struct, D> for (T0,)
27499 {
27500 #[inline]
27501 unsafe fn encode(
27502 self,
27503 encoder: &mut fidl::encoding::Encoder<'_, D>,
27504 offset: usize,
27505 depth: fidl::encoding::Depth,
27506 ) -> fidl::Result<()> {
27507 encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27508 self.0.encode(encoder, offset + 0, depth)?;
27512 Ok(())
27513 }
27514 }
27515
27516 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64Struct {
27517 #[inline(always)]
27518 fn new_empty() -> Self {
27519 Self { e: fidl::new_empty!(StrictEnumInt64, D) }
27520 }
27521
27522 #[inline]
27523 unsafe fn decode(
27524 &mut self,
27525 decoder: &mut fidl::encoding::Decoder<'_, D>,
27526 offset: usize,
27527 _depth: fidl::encoding::Depth,
27528 ) -> fidl::Result<()> {
27529 decoder.debug_check_bounds::<Self>(offset);
27530 fidl::decode!(StrictEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
27532 Ok(())
27533 }
27534 }
27535
27536 impl fidl::encoding::ValueTypeMarker for StrictEnumInt8Struct {
27537 type Borrowed<'a> = &'a Self;
27538 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27539 value
27540 }
27541 }
27542
27543 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8Struct {
27544 type Owned = Self;
27545
27546 #[inline(always)]
27547 fn inline_align(_context: fidl::encoding::Context) -> usize {
27548 1
27549 }
27550
27551 #[inline(always)]
27552 fn inline_size(_context: fidl::encoding::Context) -> usize {
27553 1
27554 }
27555 }
27556
27557 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt8Struct, D>
27558 for &StrictEnumInt8Struct
27559 {
27560 #[inline]
27561 unsafe fn encode(
27562 self,
27563 encoder: &mut fidl::encoding::Encoder<'_, D>,
27564 offset: usize,
27565 _depth: fidl::encoding::Depth,
27566 ) -> fidl::Result<()> {
27567 encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27568 fidl::encoding::Encode::<StrictEnumInt8Struct, D>::encode(
27570 (<StrictEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27571 encoder,
27572 offset,
27573 _depth,
27574 )
27575 }
27576 }
27577 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt8, D>>
27578 fidl::encoding::Encode<StrictEnumInt8Struct, D> for (T0,)
27579 {
27580 #[inline]
27581 unsafe fn encode(
27582 self,
27583 encoder: &mut fidl::encoding::Encoder<'_, D>,
27584 offset: usize,
27585 depth: fidl::encoding::Depth,
27586 ) -> fidl::Result<()> {
27587 encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27588 self.0.encode(encoder, offset + 0, depth)?;
27592 Ok(())
27593 }
27594 }
27595
27596 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8Struct {
27597 #[inline(always)]
27598 fn new_empty() -> Self {
27599 Self { e: fidl::new_empty!(StrictEnumInt8, D) }
27600 }
27601
27602 #[inline]
27603 unsafe fn decode(
27604 &mut self,
27605 decoder: &mut fidl::encoding::Decoder<'_, D>,
27606 offset: usize,
27607 _depth: fidl::encoding::Depth,
27608 ) -> fidl::Result<()> {
27609 decoder.debug_check_bounds::<Self>(offset);
27610 fidl::decode!(StrictEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
27612 Ok(())
27613 }
27614 }
27615
27616 impl fidl::encoding::ValueTypeMarker for StrictEnumUint16Struct {
27617 type Borrowed<'a> = &'a Self;
27618 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27619 value
27620 }
27621 }
27622
27623 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16Struct {
27624 type Owned = Self;
27625
27626 #[inline(always)]
27627 fn inline_align(_context: fidl::encoding::Context) -> usize {
27628 2
27629 }
27630
27631 #[inline(always)]
27632 fn inline_size(_context: fidl::encoding::Context) -> usize {
27633 2
27634 }
27635 }
27636
27637 unsafe impl<D: fidl::encoding::ResourceDialect>
27638 fidl::encoding::Encode<StrictEnumUint16Struct, D> for &StrictEnumUint16Struct
27639 {
27640 #[inline]
27641 unsafe fn encode(
27642 self,
27643 encoder: &mut fidl::encoding::Encoder<'_, D>,
27644 offset: usize,
27645 _depth: fidl::encoding::Depth,
27646 ) -> fidl::Result<()> {
27647 encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27648 fidl::encoding::Encode::<StrictEnumUint16Struct, D>::encode(
27650 (<StrictEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27651 encoder,
27652 offset,
27653 _depth,
27654 )
27655 }
27656 }
27657 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint16, D>>
27658 fidl::encoding::Encode<StrictEnumUint16Struct, D> for (T0,)
27659 {
27660 #[inline]
27661 unsafe fn encode(
27662 self,
27663 encoder: &mut fidl::encoding::Encoder<'_, D>,
27664 offset: usize,
27665 depth: fidl::encoding::Depth,
27666 ) -> fidl::Result<()> {
27667 encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27668 self.0.encode(encoder, offset + 0, depth)?;
27672 Ok(())
27673 }
27674 }
27675
27676 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27677 for StrictEnumUint16Struct
27678 {
27679 #[inline(always)]
27680 fn new_empty() -> Self {
27681 Self { e: fidl::new_empty!(StrictEnumUint16, D) }
27682 }
27683
27684 #[inline]
27685 unsafe fn decode(
27686 &mut self,
27687 decoder: &mut fidl::encoding::Decoder<'_, D>,
27688 offset: usize,
27689 _depth: fidl::encoding::Depth,
27690 ) -> fidl::Result<()> {
27691 decoder.debug_check_bounds::<Self>(offset);
27692 fidl::decode!(StrictEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
27694 Ok(())
27695 }
27696 }
27697
27698 impl fidl::encoding::ValueTypeMarker for StrictEnumUint32Struct {
27699 type Borrowed<'a> = &'a Self;
27700 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27701 value
27702 }
27703 }
27704
27705 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32Struct {
27706 type Owned = Self;
27707
27708 #[inline(always)]
27709 fn inline_align(_context: fidl::encoding::Context) -> usize {
27710 4
27711 }
27712
27713 #[inline(always)]
27714 fn inline_size(_context: fidl::encoding::Context) -> usize {
27715 4
27716 }
27717 }
27718
27719 unsafe impl<D: fidl::encoding::ResourceDialect>
27720 fidl::encoding::Encode<StrictEnumUint32Struct, D> for &StrictEnumUint32Struct
27721 {
27722 #[inline]
27723 unsafe fn encode(
27724 self,
27725 encoder: &mut fidl::encoding::Encoder<'_, D>,
27726 offset: usize,
27727 _depth: fidl::encoding::Depth,
27728 ) -> fidl::Result<()> {
27729 encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27730 fidl::encoding::Encode::<StrictEnumUint32Struct, D>::encode(
27732 (<StrictEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27733 encoder,
27734 offset,
27735 _depth,
27736 )
27737 }
27738 }
27739 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint32, D>>
27740 fidl::encoding::Encode<StrictEnumUint32Struct, D> for (T0,)
27741 {
27742 #[inline]
27743 unsafe fn encode(
27744 self,
27745 encoder: &mut fidl::encoding::Encoder<'_, D>,
27746 offset: usize,
27747 depth: fidl::encoding::Depth,
27748 ) -> fidl::Result<()> {
27749 encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27750 self.0.encode(encoder, offset + 0, depth)?;
27754 Ok(())
27755 }
27756 }
27757
27758 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27759 for StrictEnumUint32Struct
27760 {
27761 #[inline(always)]
27762 fn new_empty() -> Self {
27763 Self { e: fidl::new_empty!(StrictEnumUint32, D) }
27764 }
27765
27766 #[inline]
27767 unsafe fn decode(
27768 &mut self,
27769 decoder: &mut fidl::encoding::Decoder<'_, D>,
27770 offset: usize,
27771 _depth: fidl::encoding::Depth,
27772 ) -> fidl::Result<()> {
27773 decoder.debug_check_bounds::<Self>(offset);
27774 fidl::decode!(StrictEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
27776 Ok(())
27777 }
27778 }
27779
27780 impl fidl::encoding::ValueTypeMarker for StrictEnumUint64Struct {
27781 type Borrowed<'a> = &'a Self;
27782 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27783 value
27784 }
27785 }
27786
27787 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64Struct {
27788 type Owned = Self;
27789
27790 #[inline(always)]
27791 fn inline_align(_context: fidl::encoding::Context) -> usize {
27792 8
27793 }
27794
27795 #[inline(always)]
27796 fn inline_size(_context: fidl::encoding::Context) -> usize {
27797 8
27798 }
27799 }
27800
27801 unsafe impl<D: fidl::encoding::ResourceDialect>
27802 fidl::encoding::Encode<StrictEnumUint64Struct, D> for &StrictEnumUint64Struct
27803 {
27804 #[inline]
27805 unsafe fn encode(
27806 self,
27807 encoder: &mut fidl::encoding::Encoder<'_, D>,
27808 offset: usize,
27809 _depth: fidl::encoding::Depth,
27810 ) -> fidl::Result<()> {
27811 encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
27812 fidl::encoding::Encode::<StrictEnumUint64Struct, D>::encode(
27814 (<StrictEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27815 encoder,
27816 offset,
27817 _depth,
27818 )
27819 }
27820 }
27821 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint64, D>>
27822 fidl::encoding::Encode<StrictEnumUint64Struct, D> for (T0,)
27823 {
27824 #[inline]
27825 unsafe fn encode(
27826 self,
27827 encoder: &mut fidl::encoding::Encoder<'_, D>,
27828 offset: usize,
27829 depth: fidl::encoding::Depth,
27830 ) -> fidl::Result<()> {
27831 encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
27832 self.0.encode(encoder, offset + 0, depth)?;
27836 Ok(())
27837 }
27838 }
27839
27840 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27841 for StrictEnumUint64Struct
27842 {
27843 #[inline(always)]
27844 fn new_empty() -> Self {
27845 Self { e: fidl::new_empty!(StrictEnumUint64, D) }
27846 }
27847
27848 #[inline]
27849 unsafe fn decode(
27850 &mut self,
27851 decoder: &mut fidl::encoding::Decoder<'_, D>,
27852 offset: usize,
27853 _depth: fidl::encoding::Depth,
27854 ) -> fidl::Result<()> {
27855 decoder.debug_check_bounds::<Self>(offset);
27856 fidl::decode!(StrictEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
27858 Ok(())
27859 }
27860 }
27861
27862 impl fidl::encoding::ValueTypeMarker for StrictEnumUint8Struct {
27863 type Borrowed<'a> = &'a Self;
27864 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27865 value
27866 }
27867 }
27868
27869 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8Struct {
27870 type Owned = Self;
27871
27872 #[inline(always)]
27873 fn inline_align(_context: fidl::encoding::Context) -> usize {
27874 1
27875 }
27876
27877 #[inline(always)]
27878 fn inline_size(_context: fidl::encoding::Context) -> usize {
27879 1
27880 }
27881 }
27882
27883 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumUint8Struct, D>
27884 for &StrictEnumUint8Struct
27885 {
27886 #[inline]
27887 unsafe fn encode(
27888 self,
27889 encoder: &mut fidl::encoding::Encoder<'_, D>,
27890 offset: usize,
27891 _depth: fidl::encoding::Depth,
27892 ) -> fidl::Result<()> {
27893 encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
27894 fidl::encoding::Encode::<StrictEnumUint8Struct, D>::encode(
27896 (<StrictEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27897 encoder,
27898 offset,
27899 _depth,
27900 )
27901 }
27902 }
27903 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint8, D>>
27904 fidl::encoding::Encode<StrictEnumUint8Struct, D> for (T0,)
27905 {
27906 #[inline]
27907 unsafe fn encode(
27908 self,
27909 encoder: &mut fidl::encoding::Encoder<'_, D>,
27910 offset: usize,
27911 depth: fidl::encoding::Depth,
27912 ) -> fidl::Result<()> {
27913 encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
27914 self.0.encode(encoder, offset + 0, depth)?;
27918 Ok(())
27919 }
27920 }
27921
27922 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8Struct {
27923 #[inline(always)]
27924 fn new_empty() -> Self {
27925 Self { e: fidl::new_empty!(StrictEnumUint8, D) }
27926 }
27927
27928 #[inline]
27929 unsafe fn decode(
27930 &mut self,
27931 decoder: &mut fidl::encoding::Decoder<'_, D>,
27932 offset: usize,
27933 _depth: fidl::encoding::Depth,
27934 ) -> fidl::Result<()> {
27935 decoder.debug_check_bounds::<Self>(offset);
27936 fidl::decode!(StrictEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
27938 Ok(())
27939 }
27940 }
27941
27942 impl fidl::encoding::ValueTypeMarker for StringUnionStruct {
27943 type Borrowed<'a> = &'a Self;
27944 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27945 value
27946 }
27947 }
27948
27949 unsafe impl fidl::encoding::TypeMarker for StringUnionStruct {
27950 type Owned = Self;
27951
27952 #[inline(always)]
27953 fn inline_align(_context: fidl::encoding::Context) -> usize {
27954 8
27955 }
27956
27957 #[inline(always)]
27958 fn inline_size(_context: fidl::encoding::Context) -> usize {
27959 32
27960 }
27961 }
27962
27963 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionStruct, D>
27964 for &StringUnionStruct
27965 {
27966 #[inline]
27967 unsafe fn encode(
27968 self,
27969 encoder: &mut fidl::encoding::Encoder<'_, D>,
27970 offset: usize,
27971 _depth: fidl::encoding::Depth,
27972 ) -> fidl::Result<()> {
27973 encoder.debug_check_bounds::<StringUnionStruct>(offset);
27974 fidl::encoding::Encode::<StringUnionStruct, D>::encode(
27976 (
27977 <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
27978 <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
27979 ),
27980 encoder, offset, _depth
27981 )
27982 }
27983 }
27984 unsafe impl<
27985 D: fidl::encoding::ResourceDialect,
27986 T0: fidl::encoding::Encode<StringBoolUnion, D>,
27987 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
27988 > fidl::encoding::Encode<StringUnionStruct, D> for (T0, T1)
27989 {
27990 #[inline]
27991 unsafe fn encode(
27992 self,
27993 encoder: &mut fidl::encoding::Encoder<'_, D>,
27994 offset: usize,
27995 depth: fidl::encoding::Depth,
27996 ) -> fidl::Result<()> {
27997 encoder.debug_check_bounds::<StringUnionStruct>(offset);
27998 self.0.encode(encoder, offset + 0, depth)?;
28002 self.1.encode(encoder, offset + 16, depth)?;
28003 Ok(())
28004 }
28005 }
28006
28007 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionStruct {
28008 #[inline(always)]
28009 fn new_empty() -> Self {
28010 Self {
28011 u: fidl::new_empty!(StringBoolUnion, D),
28012 nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
28013 }
28014 }
28015
28016 #[inline]
28017 unsafe fn decode(
28018 &mut self,
28019 decoder: &mut fidl::encoding::Decoder<'_, D>,
28020 offset: usize,
28021 _depth: fidl::encoding::Depth,
28022 ) -> fidl::Result<()> {
28023 decoder.debug_check_bounds::<Self>(offset);
28024 fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
28026 fidl::decode!(
28027 fidl::encoding::OptionalUnion<StringBoolUnion>,
28028 D,
28029 &mut self.nullable_u,
28030 decoder,
28031 offset + 16,
28032 _depth
28033 )?;
28034 Ok(())
28035 }
28036 }
28037
28038 impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapper {
28039 type Borrowed<'a> = &'a Self;
28040 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28041 value
28042 }
28043 }
28044
28045 unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapper {
28046 type Owned = Self;
28047
28048 #[inline(always)]
28049 fn inline_align(_context: fidl::encoding::Context) -> usize {
28050 8
28051 }
28052
28053 #[inline(always)]
28054 fn inline_size(_context: fidl::encoding::Context) -> usize {
28055 32
28056 }
28057 }
28058
28059 unsafe impl<D: fidl::encoding::ResourceDialect>
28060 fidl::encoding::Encode<StringUnionStructWrapper, D> for &StringUnionStructWrapper
28061 {
28062 #[inline]
28063 unsafe fn encode(
28064 self,
28065 encoder: &mut fidl::encoding::Encoder<'_, D>,
28066 offset: usize,
28067 _depth: fidl::encoding::Depth,
28068 ) -> fidl::Result<()> {
28069 encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28070 fidl::encoding::Encode::<StringUnionStructWrapper, D>::encode(
28072 (<StringUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.sus),),
28073 encoder,
28074 offset,
28075 _depth,
28076 )
28077 }
28078 }
28079 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StringUnionStruct, D>>
28080 fidl::encoding::Encode<StringUnionStructWrapper, D> for (T0,)
28081 {
28082 #[inline]
28083 unsafe fn encode(
28084 self,
28085 encoder: &mut fidl::encoding::Encoder<'_, D>,
28086 offset: usize,
28087 depth: fidl::encoding::Depth,
28088 ) -> fidl::Result<()> {
28089 encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28090 self.0.encode(encoder, offset + 0, depth)?;
28094 Ok(())
28095 }
28096 }
28097
28098 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28099 for StringUnionStructWrapper
28100 {
28101 #[inline(always)]
28102 fn new_empty() -> Self {
28103 Self { sus: fidl::new_empty!(StringUnionStruct, D) }
28104 }
28105
28106 #[inline]
28107 unsafe fn decode(
28108 &mut self,
28109 decoder: &mut fidl::encoding::Decoder<'_, D>,
28110 offset: usize,
28111 _depth: fidl::encoding::Depth,
28112 ) -> fidl::Result<()> {
28113 decoder.debug_check_bounds::<Self>(offset);
28114 fidl::decode!(StringUnionStruct, D, &mut self.sus, decoder, offset + 0, _depth)?;
28116 Ok(())
28117 }
28118 }
28119
28120 impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapperResponse {
28121 type Borrowed<'a> = &'a Self;
28122 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28123 value
28124 }
28125 }
28126
28127 unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapperResponse {
28128 type Owned = Self;
28129
28130 #[inline(always)]
28131 fn inline_align(_context: fidl::encoding::Context) -> usize {
28132 8
28133 }
28134
28135 #[inline(always)]
28136 fn inline_size(_context: fidl::encoding::Context) -> usize {
28137 48
28138 }
28139 }
28140
28141 unsafe impl<D: fidl::encoding::ResourceDialect>
28142 fidl::encoding::Encode<StringUnionStructWrapperResponse, D>
28143 for &StringUnionStructWrapperResponse
28144 {
28145 #[inline]
28146 unsafe fn encode(
28147 self,
28148 encoder: &mut fidl::encoding::Encoder<'_, D>,
28149 offset: usize,
28150 _depth: fidl::encoding::Depth,
28151 ) -> fidl::Result<()> {
28152 encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28153 fidl::encoding::Encode::<StringUnionStructWrapperResponse, D>::encode(
28155 (
28156 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
28157 <StringUnionStructWrapper as fidl::encoding::ValueTypeMarker>::borrow(
28158 &self.body,
28159 ),
28160 ),
28161 encoder,
28162 offset,
28163 _depth,
28164 )
28165 }
28166 }
28167 unsafe impl<
28168 D: fidl::encoding::ResourceDialect,
28169 T0: fidl::encoding::Encode<TransactionHeader, D>,
28170 T1: fidl::encoding::Encode<StringUnionStructWrapper, D>,
28171 > fidl::encoding::Encode<StringUnionStructWrapperResponse, D> for (T0, T1)
28172 {
28173 #[inline]
28174 unsafe fn encode(
28175 self,
28176 encoder: &mut fidl::encoding::Encoder<'_, D>,
28177 offset: usize,
28178 depth: fidl::encoding::Depth,
28179 ) -> fidl::Result<()> {
28180 encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28181 self.0.encode(encoder, offset + 0, depth)?;
28185 self.1.encode(encoder, offset + 16, depth)?;
28186 Ok(())
28187 }
28188 }
28189
28190 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28191 for StringUnionStructWrapperResponse
28192 {
28193 #[inline(always)]
28194 fn new_empty() -> Self {
28195 Self {
28196 header: fidl::new_empty!(TransactionHeader, D),
28197 body: fidl::new_empty!(StringUnionStructWrapper, D),
28198 }
28199 }
28200
28201 #[inline]
28202 unsafe fn decode(
28203 &mut self,
28204 decoder: &mut fidl::encoding::Decoder<'_, D>,
28205 offset: usize,
28206 _depth: fidl::encoding::Depth,
28207 ) -> fidl::Result<()> {
28208 decoder.debug_check_bounds::<Self>(offset);
28209 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
28211 fidl::decode!(
28212 StringUnionStructWrapper,
28213 D,
28214 &mut self.body,
28215 decoder,
28216 offset + 16,
28217 _depth
28218 )?;
28219 Ok(())
28220 }
28221 }
28222
28223 impl fidl::encoding::ValueTypeMarker for StringUnionVector {
28224 type Borrowed<'a> = &'a Self;
28225 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28226 value
28227 }
28228 }
28229
28230 unsafe impl fidl::encoding::TypeMarker for StringUnionVector {
28231 type Owned = Self;
28232
28233 #[inline(always)]
28234 fn inline_align(_context: fidl::encoding::Context) -> usize {
28235 8
28236 }
28237
28238 #[inline(always)]
28239 fn inline_size(_context: fidl::encoding::Context) -> usize {
28240 16
28241 }
28242 }
28243
28244 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionVector, D>
28245 for &StringUnionVector
28246 {
28247 #[inline]
28248 unsafe fn encode(
28249 self,
28250 encoder: &mut fidl::encoding::Encoder<'_, D>,
28251 offset: usize,
28252 _depth: fidl::encoding::Depth,
28253 ) -> fidl::Result<()> {
28254 encoder.debug_check_bounds::<StringUnionVector>(offset);
28255 fidl::encoding::Encode::<StringUnionVector, D>::encode(
28257 (
28258 <fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_vector),
28259 ),
28260 encoder, offset, _depth
28261 )
28262 }
28263 }
28264 unsafe impl<
28265 D: fidl::encoding::ResourceDialect,
28266 T0: fidl::encoding::Encode<
28267 fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28268 D,
28269 >,
28270 > fidl::encoding::Encode<StringUnionVector, D> for (T0,)
28271 {
28272 #[inline]
28273 unsafe fn encode(
28274 self,
28275 encoder: &mut fidl::encoding::Encoder<'_, D>,
28276 offset: usize,
28277 depth: fidl::encoding::Depth,
28278 ) -> fidl::Result<()> {
28279 encoder.debug_check_bounds::<StringUnionVector>(offset);
28280 self.0.encode(encoder, offset + 0, depth)?;
28284 Ok(())
28285 }
28286 }
28287
28288 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionVector {
28289 #[inline(always)]
28290 fn new_empty() -> Self {
28291 Self {
28292 the_vector: fidl::new_empty!(
28293 fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28294 D
28295 ),
28296 }
28297 }
28298
28299 #[inline]
28300 unsafe fn decode(
28301 &mut self,
28302 decoder: &mut fidl::encoding::Decoder<'_, D>,
28303 offset: usize,
28304 _depth: fidl::encoding::Depth,
28305 ) -> fidl::Result<()> {
28306 decoder.debug_check_bounds::<Self>(offset);
28307 fidl::decode!(
28309 fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28310 D,
28311 &mut self.the_vector,
28312 decoder,
28313 offset + 0,
28314 _depth
28315 )?;
28316 Ok(())
28317 }
28318 }
28319
28320 impl fidl::encoding::ValueTypeMarker for StringWrapper {
28321 type Borrowed<'a> = &'a Self;
28322 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28323 value
28324 }
28325 }
28326
28327 unsafe impl fidl::encoding::TypeMarker for StringWrapper {
28328 type Owned = Self;
28329
28330 #[inline(always)]
28331 fn inline_align(_context: fidl::encoding::Context) -> usize {
28332 8
28333 }
28334
28335 #[inline(always)]
28336 fn inline_size(_context: fidl::encoding::Context) -> usize {
28337 16
28338 }
28339 }
28340
28341 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringWrapper, D>
28342 for &StringWrapper
28343 {
28344 #[inline]
28345 unsafe fn encode(
28346 self,
28347 encoder: &mut fidl::encoding::Encoder<'_, D>,
28348 offset: usize,
28349 _depth: fidl::encoding::Depth,
28350 ) -> fidl::Result<()> {
28351 encoder.debug_check_bounds::<StringWrapper>(offset);
28352 fidl::encoding::Encode::<StringWrapper, D>::encode(
28354 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
28355 &self.str,
28356 ),),
28357 encoder,
28358 offset,
28359 _depth,
28360 )
28361 }
28362 }
28363 unsafe impl<
28364 D: fidl::encoding::ResourceDialect,
28365 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
28366 > fidl::encoding::Encode<StringWrapper, D> for (T0,)
28367 {
28368 #[inline]
28369 unsafe fn encode(
28370 self,
28371 encoder: &mut fidl::encoding::Encoder<'_, D>,
28372 offset: usize,
28373 depth: fidl::encoding::Depth,
28374 ) -> fidl::Result<()> {
28375 encoder.debug_check_bounds::<StringWrapper>(offset);
28376 self.0.encode(encoder, offset + 0, depth)?;
28380 Ok(())
28381 }
28382 }
28383
28384 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringWrapper {
28385 #[inline(always)]
28386 fn new_empty() -> Self {
28387 Self { str: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
28388 }
28389
28390 #[inline]
28391 unsafe fn decode(
28392 &mut self,
28393 decoder: &mut fidl::encoding::Decoder<'_, D>,
28394 offset: usize,
28395 _depth: fidl::encoding::Depth,
28396 ) -> fidl::Result<()> {
28397 decoder.debug_check_bounds::<Self>(offset);
28398 fidl::decode!(
28400 fidl::encoding::UnboundedString,
28401 D,
28402 &mut self.str,
28403 decoder,
28404 offset + 0,
28405 _depth
28406 )?;
28407 Ok(())
28408 }
28409 }
28410
28411 impl fidl::encoding::ValueTypeMarker for Struct1Byte {
28412 type Borrowed<'a> = &'a Self;
28413 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28414 value
28415 }
28416 }
28417
28418 unsafe impl fidl::encoding::TypeMarker for Struct1Byte {
28419 type Owned = Self;
28420
28421 #[inline(always)]
28422 fn inline_align(_context: fidl::encoding::Context) -> usize {
28423 1
28424 }
28425
28426 #[inline(always)]
28427 fn inline_size(_context: fidl::encoding::Context) -> usize {
28428 1
28429 }
28430 #[inline(always)]
28431 fn encode_is_copy() -> bool {
28432 true
28433 }
28434
28435 #[inline(always)]
28436 fn decode_is_copy() -> bool {
28437 true
28438 }
28439 }
28440
28441 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct1Byte, D>
28442 for &Struct1Byte
28443 {
28444 #[inline]
28445 unsafe fn encode(
28446 self,
28447 encoder: &mut fidl::encoding::Encoder<'_, D>,
28448 offset: usize,
28449 _depth: fidl::encoding::Depth,
28450 ) -> fidl::Result<()> {
28451 encoder.debug_check_bounds::<Struct1Byte>(offset);
28452 unsafe {
28453 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28455 (buf_ptr as *mut Struct1Byte).write_unaligned((self as *const Struct1Byte).read());
28456 }
28459 Ok(())
28460 }
28461 }
28462 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
28463 fidl::encoding::Encode<Struct1Byte, D> for (T0,)
28464 {
28465 #[inline]
28466 unsafe fn encode(
28467 self,
28468 encoder: &mut fidl::encoding::Encoder<'_, D>,
28469 offset: usize,
28470 depth: fidl::encoding::Depth,
28471 ) -> fidl::Result<()> {
28472 encoder.debug_check_bounds::<Struct1Byte>(offset);
28473 self.0.encode(encoder, offset + 0, depth)?;
28477 Ok(())
28478 }
28479 }
28480
28481 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct1Byte {
28482 #[inline(always)]
28483 fn new_empty() -> Self {
28484 Self { a: fidl::new_empty!(i8, D) }
28485 }
28486
28487 #[inline]
28488 unsafe fn decode(
28489 &mut self,
28490 decoder: &mut fidl::encoding::Decoder<'_, D>,
28491 offset: usize,
28492 _depth: fidl::encoding::Depth,
28493 ) -> fidl::Result<()> {
28494 decoder.debug_check_bounds::<Self>(offset);
28495 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28496 unsafe {
28499 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
28500 }
28501 Ok(())
28502 }
28503 }
28504
28505 impl fidl::encoding::ValueTypeMarker for Struct2Byte {
28506 type Borrowed<'a> = &'a Self;
28507 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28508 value
28509 }
28510 }
28511
28512 unsafe impl fidl::encoding::TypeMarker for Struct2Byte {
28513 type Owned = Self;
28514
28515 #[inline(always)]
28516 fn inline_align(_context: fidl::encoding::Context) -> usize {
28517 2
28518 }
28519
28520 #[inline(always)]
28521 fn inline_size(_context: fidl::encoding::Context) -> usize {
28522 2
28523 }
28524 #[inline(always)]
28525 fn encode_is_copy() -> bool {
28526 true
28527 }
28528
28529 #[inline(always)]
28530 fn decode_is_copy() -> bool {
28531 true
28532 }
28533 }
28534
28535 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct2Byte, D>
28536 for &Struct2Byte
28537 {
28538 #[inline]
28539 unsafe fn encode(
28540 self,
28541 encoder: &mut fidl::encoding::Encoder<'_, D>,
28542 offset: usize,
28543 _depth: fidl::encoding::Depth,
28544 ) -> fidl::Result<()> {
28545 encoder.debug_check_bounds::<Struct2Byte>(offset);
28546 unsafe {
28547 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28549 (buf_ptr as *mut Struct2Byte).write_unaligned((self as *const Struct2Byte).read());
28550 }
28553 Ok(())
28554 }
28555 }
28556 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
28557 fidl::encoding::Encode<Struct2Byte, D> for (T0,)
28558 {
28559 #[inline]
28560 unsafe fn encode(
28561 self,
28562 encoder: &mut fidl::encoding::Encoder<'_, D>,
28563 offset: usize,
28564 depth: fidl::encoding::Depth,
28565 ) -> fidl::Result<()> {
28566 encoder.debug_check_bounds::<Struct2Byte>(offset);
28567 self.0.encode(encoder, offset + 0, depth)?;
28571 Ok(())
28572 }
28573 }
28574
28575 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct2Byte {
28576 #[inline(always)]
28577 fn new_empty() -> Self {
28578 Self { a: fidl::new_empty!(i16, D) }
28579 }
28580
28581 #[inline]
28582 unsafe fn decode(
28583 &mut self,
28584 decoder: &mut fidl::encoding::Decoder<'_, D>,
28585 offset: usize,
28586 _depth: fidl::encoding::Depth,
28587 ) -> fidl::Result<()> {
28588 decoder.debug_check_bounds::<Self>(offset);
28589 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28590 unsafe {
28593 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
28594 }
28595 Ok(())
28596 }
28597 }
28598
28599 impl fidl::encoding::ValueTypeMarker for Struct3Byte {
28600 type Borrowed<'a> = &'a Self;
28601 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28602 value
28603 }
28604 }
28605
28606 unsafe impl fidl::encoding::TypeMarker for Struct3Byte {
28607 type Owned = Self;
28608
28609 #[inline(always)]
28610 fn inline_align(_context: fidl::encoding::Context) -> usize {
28611 2
28612 }
28613
28614 #[inline(always)]
28615 fn inline_size(_context: fidl::encoding::Context) -> usize {
28616 4
28617 }
28618 }
28619
28620 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct3Byte, D>
28621 for &Struct3Byte
28622 {
28623 #[inline]
28624 unsafe fn encode(
28625 self,
28626 encoder: &mut fidl::encoding::Encoder<'_, D>,
28627 offset: usize,
28628 _depth: fidl::encoding::Depth,
28629 ) -> fidl::Result<()> {
28630 encoder.debug_check_bounds::<Struct3Byte>(offset);
28631 unsafe {
28632 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28634 (buf_ptr as *mut Struct3Byte).write_unaligned((self as *const Struct3Byte).read());
28635 let padding_ptr = buf_ptr.offset(2) as *mut u16;
28638 let padding_mask = 0xff00u16;
28639 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
28640 }
28641 Ok(())
28642 }
28643 }
28644 unsafe impl<
28645 D: fidl::encoding::ResourceDialect,
28646 T0: fidl::encoding::Encode<i16, D>,
28647 T1: fidl::encoding::Encode<i8, D>,
28648 > fidl::encoding::Encode<Struct3Byte, D> for (T0, T1)
28649 {
28650 #[inline]
28651 unsafe fn encode(
28652 self,
28653 encoder: &mut fidl::encoding::Encoder<'_, D>,
28654 offset: usize,
28655 depth: fidl::encoding::Depth,
28656 ) -> fidl::Result<()> {
28657 encoder.debug_check_bounds::<Struct3Byte>(offset);
28658 unsafe {
28661 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
28662 (ptr as *mut u16).write_unaligned(0);
28663 }
28664 self.0.encode(encoder, offset + 0, depth)?;
28666 self.1.encode(encoder, offset + 2, depth)?;
28667 Ok(())
28668 }
28669 }
28670
28671 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct3Byte {
28672 #[inline(always)]
28673 fn new_empty() -> Self {
28674 Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i8, D) }
28675 }
28676
28677 #[inline]
28678 unsafe fn decode(
28679 &mut self,
28680 decoder: &mut fidl::encoding::Decoder<'_, D>,
28681 offset: usize,
28682 _depth: fidl::encoding::Depth,
28683 ) -> fidl::Result<()> {
28684 decoder.debug_check_bounds::<Self>(offset);
28685 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28686 let ptr = unsafe { buf_ptr.offset(2) };
28688 let padval = unsafe { (ptr as *const u16).read_unaligned() };
28689 let mask = 0xff00u16;
28690 let maskedval = padval & mask;
28691 if maskedval != 0 {
28692 return Err(fidl::Error::NonZeroPadding {
28693 padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
28694 });
28695 }
28696 unsafe {
28698 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
28699 }
28700 Ok(())
28701 }
28702 }
28703
28704 impl fidl::encoding::ValueTypeMarker for Struct4Byte {
28705 type Borrowed<'a> = &'a Self;
28706 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28707 value
28708 }
28709 }
28710
28711 unsafe impl fidl::encoding::TypeMarker for Struct4Byte {
28712 type Owned = Self;
28713
28714 #[inline(always)]
28715 fn inline_align(_context: fidl::encoding::Context) -> usize {
28716 4
28717 }
28718
28719 #[inline(always)]
28720 fn inline_size(_context: fidl::encoding::Context) -> usize {
28721 4
28722 }
28723 #[inline(always)]
28724 fn encode_is_copy() -> bool {
28725 true
28726 }
28727
28728 #[inline(always)]
28729 fn decode_is_copy() -> bool {
28730 true
28731 }
28732 }
28733
28734 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct4Byte, D>
28735 for &Struct4Byte
28736 {
28737 #[inline]
28738 unsafe fn encode(
28739 self,
28740 encoder: &mut fidl::encoding::Encoder<'_, D>,
28741 offset: usize,
28742 _depth: fidl::encoding::Depth,
28743 ) -> fidl::Result<()> {
28744 encoder.debug_check_bounds::<Struct4Byte>(offset);
28745 unsafe {
28746 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28748 (buf_ptr as *mut Struct4Byte).write_unaligned((self as *const Struct4Byte).read());
28749 }
28752 Ok(())
28753 }
28754 }
28755 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
28756 fidl::encoding::Encode<Struct4Byte, D> for (T0,)
28757 {
28758 #[inline]
28759 unsafe fn encode(
28760 self,
28761 encoder: &mut fidl::encoding::Encoder<'_, D>,
28762 offset: usize,
28763 depth: fidl::encoding::Depth,
28764 ) -> fidl::Result<()> {
28765 encoder.debug_check_bounds::<Struct4Byte>(offset);
28766 self.0.encode(encoder, offset + 0, depth)?;
28770 Ok(())
28771 }
28772 }
28773
28774 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct4Byte {
28775 #[inline(always)]
28776 fn new_empty() -> Self {
28777 Self { a: fidl::new_empty!(i32, D) }
28778 }
28779
28780 #[inline]
28781 unsafe fn decode(
28782 &mut self,
28783 decoder: &mut fidl::encoding::Decoder<'_, D>,
28784 offset: usize,
28785 _depth: fidl::encoding::Depth,
28786 ) -> fidl::Result<()> {
28787 decoder.debug_check_bounds::<Self>(offset);
28788 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28789 unsafe {
28792 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
28793 }
28794 Ok(())
28795 }
28796 }
28797
28798 impl fidl::encoding::ValueTypeMarker for Struct5Byte {
28799 type Borrowed<'a> = &'a Self;
28800 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28801 value
28802 }
28803 }
28804
28805 unsafe impl fidl::encoding::TypeMarker for Struct5Byte {
28806 type Owned = Self;
28807
28808 #[inline(always)]
28809 fn inline_align(_context: fidl::encoding::Context) -> usize {
28810 4
28811 }
28812
28813 #[inline(always)]
28814 fn inline_size(_context: fidl::encoding::Context) -> usize {
28815 8
28816 }
28817 }
28818
28819 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct5Byte, D>
28820 for &Struct5Byte
28821 {
28822 #[inline]
28823 unsafe fn encode(
28824 self,
28825 encoder: &mut fidl::encoding::Encoder<'_, D>,
28826 offset: usize,
28827 _depth: fidl::encoding::Depth,
28828 ) -> fidl::Result<()> {
28829 encoder.debug_check_bounds::<Struct5Byte>(offset);
28830 unsafe {
28831 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28833 (buf_ptr as *mut Struct5Byte).write_unaligned((self as *const Struct5Byte).read());
28834 let padding_ptr = buf_ptr.offset(4) as *mut u32;
28837 let padding_mask = 0xffffff00u32;
28838 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
28839 }
28840 Ok(())
28841 }
28842 }
28843 unsafe impl<
28844 D: fidl::encoding::ResourceDialect,
28845 T0: fidl::encoding::Encode<i32, D>,
28846 T1: fidl::encoding::Encode<i8, D>,
28847 > fidl::encoding::Encode<Struct5Byte, D> for (T0, T1)
28848 {
28849 #[inline]
28850 unsafe fn encode(
28851 self,
28852 encoder: &mut fidl::encoding::Encoder<'_, D>,
28853 offset: usize,
28854 depth: fidl::encoding::Depth,
28855 ) -> fidl::Result<()> {
28856 encoder.debug_check_bounds::<Struct5Byte>(offset);
28857 unsafe {
28860 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
28861 (ptr as *mut u32).write_unaligned(0);
28862 }
28863 self.0.encode(encoder, offset + 0, depth)?;
28865 self.1.encode(encoder, offset + 4, depth)?;
28866 Ok(())
28867 }
28868 }
28869
28870 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct5Byte {
28871 #[inline(always)]
28872 fn new_empty() -> Self {
28873 Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i8, D) }
28874 }
28875
28876 #[inline]
28877 unsafe fn decode(
28878 &mut self,
28879 decoder: &mut fidl::encoding::Decoder<'_, D>,
28880 offset: usize,
28881 _depth: fidl::encoding::Depth,
28882 ) -> fidl::Result<()> {
28883 decoder.debug_check_bounds::<Self>(offset);
28884 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28885 let ptr = unsafe { buf_ptr.offset(4) };
28887 let padval = unsafe { (ptr as *const u32).read_unaligned() };
28888 let mask = 0xffffff00u32;
28889 let maskedval = padval & mask;
28890 if maskedval != 0 {
28891 return Err(fidl::Error::NonZeroPadding {
28892 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
28893 });
28894 }
28895 unsafe {
28897 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
28898 }
28899 Ok(())
28900 }
28901 }
28902
28903 impl fidl::encoding::ValueTypeMarker for Struct6Byte {
28904 type Borrowed<'a> = &'a Self;
28905 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28906 value
28907 }
28908 }
28909
28910 unsafe impl fidl::encoding::TypeMarker for Struct6Byte {
28911 type Owned = Self;
28912
28913 #[inline(always)]
28914 fn inline_align(_context: fidl::encoding::Context) -> usize {
28915 4
28916 }
28917
28918 #[inline(always)]
28919 fn inline_size(_context: fidl::encoding::Context) -> usize {
28920 8
28921 }
28922 }
28923
28924 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct6Byte, D>
28925 for &Struct6Byte
28926 {
28927 #[inline]
28928 unsafe fn encode(
28929 self,
28930 encoder: &mut fidl::encoding::Encoder<'_, D>,
28931 offset: usize,
28932 _depth: fidl::encoding::Depth,
28933 ) -> fidl::Result<()> {
28934 encoder.debug_check_bounds::<Struct6Byte>(offset);
28935 unsafe {
28936 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28938 (buf_ptr as *mut Struct6Byte).write_unaligned((self as *const Struct6Byte).read());
28939 let padding_ptr = buf_ptr.offset(4) as *mut u32;
28942 let padding_mask = 0xffff0000u32;
28943 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
28944 }
28945 Ok(())
28946 }
28947 }
28948 unsafe impl<
28949 D: fidl::encoding::ResourceDialect,
28950 T0: fidl::encoding::Encode<i32, D>,
28951 T1: fidl::encoding::Encode<i16, D>,
28952 > fidl::encoding::Encode<Struct6Byte, D> for (T0, T1)
28953 {
28954 #[inline]
28955 unsafe fn encode(
28956 self,
28957 encoder: &mut fidl::encoding::Encoder<'_, D>,
28958 offset: usize,
28959 depth: fidl::encoding::Depth,
28960 ) -> fidl::Result<()> {
28961 encoder.debug_check_bounds::<Struct6Byte>(offset);
28962 unsafe {
28965 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
28966 (ptr as *mut u32).write_unaligned(0);
28967 }
28968 self.0.encode(encoder, offset + 0, depth)?;
28970 self.1.encode(encoder, offset + 4, depth)?;
28971 Ok(())
28972 }
28973 }
28974
28975 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct6Byte {
28976 #[inline(always)]
28977 fn new_empty() -> Self {
28978 Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i16, D) }
28979 }
28980
28981 #[inline]
28982 unsafe fn decode(
28983 &mut self,
28984 decoder: &mut fidl::encoding::Decoder<'_, D>,
28985 offset: usize,
28986 _depth: fidl::encoding::Depth,
28987 ) -> fidl::Result<()> {
28988 decoder.debug_check_bounds::<Self>(offset);
28989 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28990 let ptr = unsafe { buf_ptr.offset(4) };
28992 let padval = unsafe { (ptr as *const u32).read_unaligned() };
28993 let mask = 0xffff0000u32;
28994 let maskedval = padval & mask;
28995 if maskedval != 0 {
28996 return Err(fidl::Error::NonZeroPadding {
28997 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
28998 });
28999 }
29000 unsafe {
29002 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29003 }
29004 Ok(())
29005 }
29006 }
29007
29008 impl fidl::encoding::ValueTypeMarker for Struct7Byte {
29009 type Borrowed<'a> = &'a Self;
29010 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29011 value
29012 }
29013 }
29014
29015 unsafe impl fidl::encoding::TypeMarker for Struct7Byte {
29016 type Owned = Self;
29017
29018 #[inline(always)]
29019 fn inline_align(_context: fidl::encoding::Context) -> usize {
29020 4
29021 }
29022
29023 #[inline(always)]
29024 fn inline_size(_context: fidl::encoding::Context) -> usize {
29025 8
29026 }
29027 }
29028
29029 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct7Byte, D>
29030 for &Struct7Byte
29031 {
29032 #[inline]
29033 unsafe fn encode(
29034 self,
29035 encoder: &mut fidl::encoding::Encoder<'_, D>,
29036 offset: usize,
29037 _depth: fidl::encoding::Depth,
29038 ) -> fidl::Result<()> {
29039 encoder.debug_check_bounds::<Struct7Byte>(offset);
29040 unsafe {
29041 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29043 (buf_ptr as *mut Struct7Byte).write_unaligned((self as *const Struct7Byte).read());
29044 let padding_ptr = buf_ptr.offset(4) as *mut u32;
29047 let padding_mask = 0xff000000u32;
29048 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29049 }
29050 Ok(())
29051 }
29052 }
29053 unsafe impl<
29054 D: fidl::encoding::ResourceDialect,
29055 T0: fidl::encoding::Encode<i32, D>,
29056 T1: fidl::encoding::Encode<i16, D>,
29057 T2: fidl::encoding::Encode<i8, D>,
29058 > fidl::encoding::Encode<Struct7Byte, D> for (T0, T1, T2)
29059 {
29060 #[inline]
29061 unsafe fn encode(
29062 self,
29063 encoder: &mut fidl::encoding::Encoder<'_, D>,
29064 offset: usize,
29065 depth: fidl::encoding::Depth,
29066 ) -> fidl::Result<()> {
29067 encoder.debug_check_bounds::<Struct7Byte>(offset);
29068 unsafe {
29071 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29072 (ptr as *mut u32).write_unaligned(0);
29073 }
29074 self.0.encode(encoder, offset + 0, depth)?;
29076 self.1.encode(encoder, offset + 4, depth)?;
29077 self.2.encode(encoder, offset + 6, depth)?;
29078 Ok(())
29079 }
29080 }
29081
29082 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct7Byte {
29083 #[inline(always)]
29084 fn new_empty() -> Self {
29085 Self {
29086 a: fidl::new_empty!(i32, D),
29087 b: fidl::new_empty!(i16, D),
29088 c: fidl::new_empty!(i8, D),
29089 }
29090 }
29091
29092 #[inline]
29093 unsafe fn decode(
29094 &mut self,
29095 decoder: &mut fidl::encoding::Decoder<'_, D>,
29096 offset: usize,
29097 _depth: fidl::encoding::Depth,
29098 ) -> fidl::Result<()> {
29099 decoder.debug_check_bounds::<Self>(offset);
29100 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29101 let ptr = unsafe { buf_ptr.offset(4) };
29103 let padval = unsafe { (ptr as *const u32).read_unaligned() };
29104 let mask = 0xff000000u32;
29105 let maskedval = padval & mask;
29106 if maskedval != 0 {
29107 return Err(fidl::Error::NonZeroPadding {
29108 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29109 });
29110 }
29111 unsafe {
29113 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29114 }
29115 Ok(())
29116 }
29117 }
29118
29119 impl fidl::encoding::ValueTypeMarker for Struct8Byte {
29120 type Borrowed<'a> = &'a Self;
29121 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29122 value
29123 }
29124 }
29125
29126 unsafe impl fidl::encoding::TypeMarker for Struct8Byte {
29127 type Owned = Self;
29128
29129 #[inline(always)]
29130 fn inline_align(_context: fidl::encoding::Context) -> usize {
29131 8
29132 }
29133
29134 #[inline(always)]
29135 fn inline_size(_context: fidl::encoding::Context) -> usize {
29136 8
29137 }
29138 #[inline(always)]
29139 fn encode_is_copy() -> bool {
29140 true
29141 }
29142
29143 #[inline(always)]
29144 fn decode_is_copy() -> bool {
29145 true
29146 }
29147 }
29148
29149 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct8Byte, D>
29150 for &Struct8Byte
29151 {
29152 #[inline]
29153 unsafe fn encode(
29154 self,
29155 encoder: &mut fidl::encoding::Encoder<'_, D>,
29156 offset: usize,
29157 _depth: fidl::encoding::Depth,
29158 ) -> fidl::Result<()> {
29159 encoder.debug_check_bounds::<Struct8Byte>(offset);
29160 unsafe {
29161 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29163 (buf_ptr as *mut Struct8Byte).write_unaligned((self as *const Struct8Byte).read());
29164 }
29167 Ok(())
29168 }
29169 }
29170 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
29171 fidl::encoding::Encode<Struct8Byte, D> for (T0,)
29172 {
29173 #[inline]
29174 unsafe fn encode(
29175 self,
29176 encoder: &mut fidl::encoding::Encoder<'_, D>,
29177 offset: usize,
29178 depth: fidl::encoding::Depth,
29179 ) -> fidl::Result<()> {
29180 encoder.debug_check_bounds::<Struct8Byte>(offset);
29181 self.0.encode(encoder, offset + 0, depth)?;
29185 Ok(())
29186 }
29187 }
29188
29189 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct8Byte {
29190 #[inline(always)]
29191 fn new_empty() -> Self {
29192 Self { a: fidl::new_empty!(i64, D) }
29193 }
29194
29195 #[inline]
29196 unsafe fn decode(
29197 &mut self,
29198 decoder: &mut fidl::encoding::Decoder<'_, D>,
29199 offset: usize,
29200 _depth: fidl::encoding::Depth,
29201 ) -> fidl::Result<()> {
29202 decoder.debug_check_bounds::<Self>(offset);
29203 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29204 unsafe {
29207 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29208 }
29209 Ok(())
29210 }
29211 }
29212
29213 impl fidl::encoding::ValueTypeMarker for StructOfEmptyFlexibleUnion {
29214 type Borrowed<'a> = &'a Self;
29215 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29216 value
29217 }
29218 }
29219
29220 unsafe impl fidl::encoding::TypeMarker for StructOfEmptyFlexibleUnion {
29221 type Owned = Self;
29222
29223 #[inline(always)]
29224 fn inline_align(_context: fidl::encoding::Context) -> usize {
29225 8
29226 }
29227
29228 #[inline(always)]
29229 fn inline_size(_context: fidl::encoding::Context) -> usize {
29230 16
29231 }
29232 }
29233
29234 unsafe impl<D: fidl::encoding::ResourceDialect>
29235 fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for &StructOfEmptyFlexibleUnion
29236 {
29237 #[inline]
29238 unsafe fn encode(
29239 self,
29240 encoder: &mut fidl::encoding::Encoder<'_, D>,
29241 offset: usize,
29242 _depth: fidl::encoding::Depth,
29243 ) -> fidl::Result<()> {
29244 encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29245 fidl::encoding::Encode::<StructOfEmptyFlexibleUnion, D>::encode(
29247 (<EmptyFlexibleUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.empty),),
29248 encoder,
29249 offset,
29250 _depth,
29251 )
29252 }
29253 }
29254 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyFlexibleUnion, D>>
29255 fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for (T0,)
29256 {
29257 #[inline]
29258 unsafe fn encode(
29259 self,
29260 encoder: &mut fidl::encoding::Encoder<'_, D>,
29261 offset: usize,
29262 depth: fidl::encoding::Depth,
29263 ) -> fidl::Result<()> {
29264 encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29265 self.0.encode(encoder, offset + 0, depth)?;
29269 Ok(())
29270 }
29271 }
29272
29273 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29274 for StructOfEmptyFlexibleUnion
29275 {
29276 #[inline(always)]
29277 fn new_empty() -> Self {
29278 Self { empty: fidl::new_empty!(EmptyFlexibleUnion, D) }
29279 }
29280
29281 #[inline]
29282 unsafe fn decode(
29283 &mut self,
29284 decoder: &mut fidl::encoding::Decoder<'_, D>,
29285 offset: usize,
29286 _depth: fidl::encoding::Depth,
29287 ) -> fidl::Result<()> {
29288 decoder.debug_check_bounds::<Self>(offset);
29289 fidl::decode!(EmptyFlexibleUnion, D, &mut self.empty, decoder, offset + 0, _depth)?;
29291 Ok(())
29292 }
29293 }
29294
29295 impl fidl::encoding::ValueTypeMarker for StructOfEmptyTable {
29296 type Borrowed<'a> = &'a Self;
29297 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29298 value
29299 }
29300 }
29301
29302 unsafe impl fidl::encoding::TypeMarker for StructOfEmptyTable {
29303 type Owned = Self;
29304
29305 #[inline(always)]
29306 fn inline_align(_context: fidl::encoding::Context) -> usize {
29307 8
29308 }
29309
29310 #[inline(always)]
29311 fn inline_size(_context: fidl::encoding::Context) -> usize {
29312 16
29313 }
29314 }
29315
29316 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfEmptyTable, D>
29317 for &StructOfEmptyTable
29318 {
29319 #[inline]
29320 unsafe fn encode(
29321 self,
29322 encoder: &mut fidl::encoding::Encoder<'_, D>,
29323 offset: usize,
29324 _depth: fidl::encoding::Depth,
29325 ) -> fidl::Result<()> {
29326 encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29327 fidl::encoding::Encode::<StructOfEmptyTable, D>::encode(
29329 (<EmptyTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29330 encoder,
29331 offset,
29332 _depth,
29333 )
29334 }
29335 }
29336 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyTable, D>>
29337 fidl::encoding::Encode<StructOfEmptyTable, D> for (T0,)
29338 {
29339 #[inline]
29340 unsafe fn encode(
29341 self,
29342 encoder: &mut fidl::encoding::Encoder<'_, D>,
29343 offset: usize,
29344 depth: fidl::encoding::Depth,
29345 ) -> fidl::Result<()> {
29346 encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29347 self.0.encode(encoder, offset + 0, depth)?;
29351 Ok(())
29352 }
29353 }
29354
29355 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfEmptyTable {
29356 #[inline(always)]
29357 fn new_empty() -> Self {
29358 Self { table: fidl::new_empty!(EmptyTable, D) }
29359 }
29360
29361 #[inline]
29362 unsafe fn decode(
29363 &mut self,
29364 decoder: &mut fidl::encoding::Decoder<'_, D>,
29365 offset: usize,
29366 _depth: fidl::encoding::Depth,
29367 ) -> fidl::Result<()> {
29368 decoder.debug_check_bounds::<Self>(offset);
29369 fidl::decode!(EmptyTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29371 Ok(())
29372 }
29373 }
29374
29375 impl fidl::encoding::ValueTypeMarker for StructOfReverseOrdinalTable {
29376 type Borrowed<'a> = &'a Self;
29377 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29378 value
29379 }
29380 }
29381
29382 unsafe impl fidl::encoding::TypeMarker for StructOfReverseOrdinalTable {
29383 type Owned = Self;
29384
29385 #[inline(always)]
29386 fn inline_align(_context: fidl::encoding::Context) -> usize {
29387 8
29388 }
29389
29390 #[inline(always)]
29391 fn inline_size(_context: fidl::encoding::Context) -> usize {
29392 16
29393 }
29394 }
29395
29396 unsafe impl<D: fidl::encoding::ResourceDialect>
29397 fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for &StructOfReverseOrdinalTable
29398 {
29399 #[inline]
29400 unsafe fn encode(
29401 self,
29402 encoder: &mut fidl::encoding::Encoder<'_, D>,
29403 offset: usize,
29404 _depth: fidl::encoding::Depth,
29405 ) -> fidl::Result<()> {
29406 encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29407 fidl::encoding::Encode::<StructOfReverseOrdinalTable, D>::encode(
29409 (<ReverseOrdinalTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29410 encoder,
29411 offset,
29412 _depth,
29413 )
29414 }
29415 }
29416 unsafe impl<
29417 D: fidl::encoding::ResourceDialect,
29418 T0: fidl::encoding::Encode<ReverseOrdinalTable, D>,
29419 > fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for (T0,)
29420 {
29421 #[inline]
29422 unsafe fn encode(
29423 self,
29424 encoder: &mut fidl::encoding::Encoder<'_, D>,
29425 offset: usize,
29426 depth: fidl::encoding::Depth,
29427 ) -> fidl::Result<()> {
29428 encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29429 self.0.encode(encoder, offset + 0, depth)?;
29433 Ok(())
29434 }
29435 }
29436
29437 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29438 for StructOfReverseOrdinalTable
29439 {
29440 #[inline(always)]
29441 fn new_empty() -> Self {
29442 Self { table: fidl::new_empty!(ReverseOrdinalTable, D) }
29443 }
29444
29445 #[inline]
29446 unsafe fn decode(
29447 &mut self,
29448 decoder: &mut fidl::encoding::Decoder<'_, D>,
29449 offset: usize,
29450 _depth: fidl::encoding::Depth,
29451 ) -> fidl::Result<()> {
29452 decoder.debug_check_bounds::<Self>(offset);
29453 fidl::decode!(ReverseOrdinalTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29455 Ok(())
29456 }
29457 }
29458
29459 impl fidl::encoding::ValueTypeMarker for StructOfSimpleTable {
29460 type Borrowed<'a> = &'a Self;
29461 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29462 value
29463 }
29464 }
29465
29466 unsafe impl fidl::encoding::TypeMarker for StructOfSimpleTable {
29467 type Owned = Self;
29468
29469 #[inline(always)]
29470 fn inline_align(_context: fidl::encoding::Context) -> usize {
29471 8
29472 }
29473
29474 #[inline(always)]
29475 fn inline_size(_context: fidl::encoding::Context) -> usize {
29476 16
29477 }
29478 }
29479
29480 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfSimpleTable, D>
29481 for &StructOfSimpleTable
29482 {
29483 #[inline]
29484 unsafe fn encode(
29485 self,
29486 encoder: &mut fidl::encoding::Encoder<'_, D>,
29487 offset: usize,
29488 _depth: fidl::encoding::Depth,
29489 ) -> fidl::Result<()> {
29490 encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
29491 fidl::encoding::Encode::<StructOfSimpleTable, D>::encode(
29493 (<SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29494 encoder,
29495 offset,
29496 _depth,
29497 )
29498 }
29499 }
29500 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SimpleTable, D>>
29501 fidl::encoding::Encode<StructOfSimpleTable, D> for (T0,)
29502 {
29503 #[inline]
29504 unsafe fn encode(
29505 self,
29506 encoder: &mut fidl::encoding::Encoder<'_, D>,
29507 offset: usize,
29508 depth: fidl::encoding::Depth,
29509 ) -> fidl::Result<()> {
29510 encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
29511 self.0.encode(encoder, offset + 0, depth)?;
29515 Ok(())
29516 }
29517 }
29518
29519 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfSimpleTable {
29520 #[inline(always)]
29521 fn new_empty() -> Self {
29522 Self { table: fidl::new_empty!(SimpleTable, D) }
29523 }
29524
29525 #[inline]
29526 unsafe fn decode(
29527 &mut self,
29528 decoder: &mut fidl::encoding::Decoder<'_, D>,
29529 offset: usize,
29530 _depth: fidl::encoding::Depth,
29531 ) -> fidl::Result<()> {
29532 decoder.debug_check_bounds::<Self>(offset);
29533 fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29535 Ok(())
29536 }
29537 }
29538
29539 impl fidl::encoding::ValueTypeMarker for StructOfTableWithGaps {
29540 type Borrowed<'a> = &'a Self;
29541 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29542 value
29543 }
29544 }
29545
29546 unsafe impl fidl::encoding::TypeMarker for StructOfTableWithGaps {
29547 type Owned = Self;
29548
29549 #[inline(always)]
29550 fn inline_align(_context: fidl::encoding::Context) -> usize {
29551 8
29552 }
29553
29554 #[inline(always)]
29555 fn inline_size(_context: fidl::encoding::Context) -> usize {
29556 16
29557 }
29558 }
29559
29560 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfTableWithGaps, D>
29561 for &StructOfTableWithGaps
29562 {
29563 #[inline]
29564 unsafe fn encode(
29565 self,
29566 encoder: &mut fidl::encoding::Encoder<'_, D>,
29567 offset: usize,
29568 _depth: fidl::encoding::Depth,
29569 ) -> fidl::Result<()> {
29570 encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
29571 fidl::encoding::Encode::<StructOfTableWithGaps, D>::encode(
29573 (<TableWithGaps as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29574 encoder,
29575 offset,
29576 _depth,
29577 )
29578 }
29579 }
29580 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithGaps, D>>
29581 fidl::encoding::Encode<StructOfTableWithGaps, D> for (T0,)
29582 {
29583 #[inline]
29584 unsafe fn encode(
29585 self,
29586 encoder: &mut fidl::encoding::Encoder<'_, D>,
29587 offset: usize,
29588 depth: fidl::encoding::Depth,
29589 ) -> fidl::Result<()> {
29590 encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
29591 self.0.encode(encoder, offset + 0, depth)?;
29595 Ok(())
29596 }
29597 }
29598
29599 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfTableWithGaps {
29600 #[inline(always)]
29601 fn new_empty() -> Self {
29602 Self { table: fidl::new_empty!(TableWithGaps, D) }
29603 }
29604
29605 #[inline]
29606 unsafe fn decode(
29607 &mut self,
29608 decoder: &mut fidl::encoding::Decoder<'_, D>,
29609 offset: usize,
29610 _depth: fidl::encoding::Depth,
29611 ) -> fidl::Result<()> {
29612 decoder.debug_check_bounds::<Self>(offset);
29613 fidl::decode!(TableWithGaps, D, &mut self.table, decoder, offset + 0, _depth)?;
29615 Ok(())
29616 }
29617 }
29618
29619 impl fidl::encoding::ValueTypeMarker for StructOfTableWithStringAndVector {
29620 type Borrowed<'a> = &'a Self;
29621 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29622 value
29623 }
29624 }
29625
29626 unsafe impl fidl::encoding::TypeMarker for StructOfTableWithStringAndVector {
29627 type Owned = Self;
29628
29629 #[inline(always)]
29630 fn inline_align(_context: fidl::encoding::Context) -> usize {
29631 8
29632 }
29633
29634 #[inline(always)]
29635 fn inline_size(_context: fidl::encoding::Context) -> usize {
29636 16
29637 }
29638 }
29639
29640 unsafe impl<D: fidl::encoding::ResourceDialect>
29641 fidl::encoding::Encode<StructOfTableWithStringAndVector, D>
29642 for &StructOfTableWithStringAndVector
29643 {
29644 #[inline]
29645 unsafe fn encode(
29646 self,
29647 encoder: &mut fidl::encoding::Encoder<'_, D>,
29648 offset: usize,
29649 _depth: fidl::encoding::Depth,
29650 ) -> fidl::Result<()> {
29651 encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
29652 fidl::encoding::Encode::<StructOfTableWithStringAndVector, D>::encode(
29654 (<TableWithStringAndVector as fidl::encoding::ValueTypeMarker>::borrow(
29655 &self.table,
29656 ),),
29657 encoder,
29658 offset,
29659 _depth,
29660 )
29661 }
29662 }
29663 unsafe impl<
29664 D: fidl::encoding::ResourceDialect,
29665 T0: fidl::encoding::Encode<TableWithStringAndVector, D>,
29666 > fidl::encoding::Encode<StructOfTableWithStringAndVector, D> for (T0,)
29667 {
29668 #[inline]
29669 unsafe fn encode(
29670 self,
29671 encoder: &mut fidl::encoding::Encoder<'_, D>,
29672 offset: usize,
29673 depth: fidl::encoding::Depth,
29674 ) -> fidl::Result<()> {
29675 encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
29676 self.0.encode(encoder, offset + 0, depth)?;
29680 Ok(())
29681 }
29682 }
29683
29684 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29685 for StructOfTableWithStringAndVector
29686 {
29687 #[inline(always)]
29688 fn new_empty() -> Self {
29689 Self { table: fidl::new_empty!(TableWithStringAndVector, D) }
29690 }
29691
29692 #[inline]
29693 unsafe fn decode(
29694 &mut self,
29695 decoder: &mut fidl::encoding::Decoder<'_, D>,
29696 offset: usize,
29697 _depth: fidl::encoding::Depth,
29698 ) -> fidl::Result<()> {
29699 decoder.debug_check_bounds::<Self>(offset);
29700 fidl::decode!(
29702 TableWithStringAndVector,
29703 D,
29704 &mut self.table,
29705 decoder,
29706 offset + 0,
29707 _depth
29708 )?;
29709 Ok(())
29710 }
29711 }
29712
29713 impl fidl::encoding::ValueTypeMarker for StructOfTableWithXUnion {
29714 type Borrowed<'a> = &'a Self;
29715 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29716 value
29717 }
29718 }
29719
29720 unsafe impl fidl::encoding::TypeMarker for StructOfTableWithXUnion {
29721 type Owned = Self;
29722
29723 #[inline(always)]
29724 fn inline_align(_context: fidl::encoding::Context) -> usize {
29725 8
29726 }
29727
29728 #[inline(always)]
29729 fn inline_size(_context: fidl::encoding::Context) -> usize {
29730 16
29731 }
29732 }
29733
29734 unsafe impl<D: fidl::encoding::ResourceDialect>
29735 fidl::encoding::Encode<StructOfTableWithXUnion, D> for &StructOfTableWithXUnion
29736 {
29737 #[inline]
29738 unsafe fn encode(
29739 self,
29740 encoder: &mut fidl::encoding::Encoder<'_, D>,
29741 offset: usize,
29742 _depth: fidl::encoding::Depth,
29743 ) -> fidl::Result<()> {
29744 encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
29745 fidl::encoding::Encode::<StructOfTableWithXUnion, D>::encode(
29747 (<TableWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
29748 encoder,
29749 offset,
29750 _depth,
29751 )
29752 }
29753 }
29754 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithXUnion, D>>
29755 fidl::encoding::Encode<StructOfTableWithXUnion, D> for (T0,)
29756 {
29757 #[inline]
29758 unsafe fn encode(
29759 self,
29760 encoder: &mut fidl::encoding::Encoder<'_, D>,
29761 offset: usize,
29762 depth: fidl::encoding::Depth,
29763 ) -> fidl::Result<()> {
29764 encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
29765 self.0.encode(encoder, offset + 0, depth)?;
29769 Ok(())
29770 }
29771 }
29772
29773 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29774 for StructOfTableWithXUnion
29775 {
29776 #[inline(always)]
29777 fn new_empty() -> Self {
29778 Self { value: fidl::new_empty!(TableWithXUnion, D) }
29779 }
29780
29781 #[inline]
29782 unsafe fn decode(
29783 &mut self,
29784 decoder: &mut fidl::encoding::Decoder<'_, D>,
29785 offset: usize,
29786 _depth: fidl::encoding::Depth,
29787 ) -> fidl::Result<()> {
29788 decoder.debug_check_bounds::<Self>(offset);
29789 fidl::decode!(TableWithXUnion, D, &mut self.value, decoder, offset + 0, _depth)?;
29791 Ok(())
29792 }
29793 }
29794
29795 impl fidl::encoding::ValueTypeMarker for StructOfUnionOfTable {
29796 type Borrowed<'a> = &'a Self;
29797 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29798 value
29799 }
29800 }
29801
29802 unsafe impl fidl::encoding::TypeMarker for StructOfUnionOfTable {
29803 type Owned = Self;
29804
29805 #[inline(always)]
29806 fn inline_align(_context: fidl::encoding::Context) -> usize {
29807 8
29808 }
29809
29810 #[inline(always)]
29811 fn inline_size(_context: fidl::encoding::Context) -> usize {
29812 16
29813 }
29814 }
29815
29816 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfUnionOfTable, D>
29817 for &StructOfUnionOfTable
29818 {
29819 #[inline]
29820 unsafe fn encode(
29821 self,
29822 encoder: &mut fidl::encoding::Encoder<'_, D>,
29823 offset: usize,
29824 _depth: fidl::encoding::Depth,
29825 ) -> fidl::Result<()> {
29826 encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
29827 fidl::encoding::Encode::<StructOfUnionOfTable, D>::encode(
29829 (<UnionOfTable as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
29830 encoder,
29831 offset,
29832 _depth,
29833 )
29834 }
29835 }
29836 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<UnionOfTable, D>>
29837 fidl::encoding::Encode<StructOfUnionOfTable, D> for (T0,)
29838 {
29839 #[inline]
29840 unsafe fn encode(
29841 self,
29842 encoder: &mut fidl::encoding::Encoder<'_, D>,
29843 offset: usize,
29844 depth: fidl::encoding::Depth,
29845 ) -> fidl::Result<()> {
29846 encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
29847 self.0.encode(encoder, offset + 0, depth)?;
29851 Ok(())
29852 }
29853 }
29854
29855 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfUnionOfTable {
29856 #[inline(always)]
29857 fn new_empty() -> Self {
29858 Self { u: fidl::new_empty!(UnionOfTable, D) }
29859 }
29860
29861 #[inline]
29862 unsafe fn decode(
29863 &mut self,
29864 decoder: &mut fidl::encoding::Decoder<'_, D>,
29865 offset: usize,
29866 _depth: fidl::encoding::Depth,
29867 ) -> fidl::Result<()> {
29868 decoder.debug_check_bounds::<Self>(offset);
29869 fidl::decode!(UnionOfTable, D, &mut self.u, decoder, offset + 0, _depth)?;
29871 Ok(())
29872 }
29873 }
29874
29875 impl fidl::encoding::ValueTypeMarker for StructSize16Align8 {
29876 type Borrowed<'a> = &'a Self;
29877 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29878 value
29879 }
29880 }
29881
29882 unsafe impl fidl::encoding::TypeMarker for StructSize16Align8 {
29883 type Owned = Self;
29884
29885 #[inline(always)]
29886 fn inline_align(_context: fidl::encoding::Context) -> usize {
29887 8
29888 }
29889
29890 #[inline(always)]
29891 fn inline_size(_context: fidl::encoding::Context) -> usize {
29892 16
29893 }
29894 #[inline(always)]
29895 fn encode_is_copy() -> bool {
29896 true
29897 }
29898
29899 #[inline(always)]
29900 fn decode_is_copy() -> bool {
29901 true
29902 }
29903 }
29904
29905 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize16Align8, D>
29906 for &StructSize16Align8
29907 {
29908 #[inline]
29909 unsafe fn encode(
29910 self,
29911 encoder: &mut fidl::encoding::Encoder<'_, D>,
29912 offset: usize,
29913 _depth: fidl::encoding::Depth,
29914 ) -> fidl::Result<()> {
29915 encoder.debug_check_bounds::<StructSize16Align8>(offset);
29916 unsafe {
29917 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29919 (buf_ptr as *mut StructSize16Align8)
29920 .write_unaligned((self as *const StructSize16Align8).read());
29921 }
29924 Ok(())
29925 }
29926 }
29927 unsafe impl<
29928 D: fidl::encoding::ResourceDialect,
29929 T0: fidl::encoding::Encode<u64, D>,
29930 T1: fidl::encoding::Encode<u64, D>,
29931 > fidl::encoding::Encode<StructSize16Align8, D> for (T0, T1)
29932 {
29933 #[inline]
29934 unsafe fn encode(
29935 self,
29936 encoder: &mut fidl::encoding::Encoder<'_, D>,
29937 offset: usize,
29938 depth: fidl::encoding::Depth,
29939 ) -> fidl::Result<()> {
29940 encoder.debug_check_bounds::<StructSize16Align8>(offset);
29941 self.0.encode(encoder, offset + 0, depth)?;
29945 self.1.encode(encoder, offset + 8, depth)?;
29946 Ok(())
29947 }
29948 }
29949
29950 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize16Align8 {
29951 #[inline(always)]
29952 fn new_empty() -> Self {
29953 Self { f1: fidl::new_empty!(u64, D), f2: fidl::new_empty!(u64, D) }
29954 }
29955
29956 #[inline]
29957 unsafe fn decode(
29958 &mut self,
29959 decoder: &mut fidl::encoding::Decoder<'_, D>,
29960 offset: usize,
29961 _depth: fidl::encoding::Depth,
29962 ) -> fidl::Result<()> {
29963 decoder.debug_check_bounds::<Self>(offset);
29964 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29965 unsafe {
29968 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
29969 }
29970 Ok(())
29971 }
29972 }
29973
29974 impl fidl::encoding::ValueTypeMarker for StructSize3Align1 {
29975 type Borrowed<'a> = &'a Self;
29976 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29977 value
29978 }
29979 }
29980
29981 unsafe impl fidl::encoding::TypeMarker for StructSize3Align1 {
29982 type Owned = Self;
29983
29984 #[inline(always)]
29985 fn inline_align(_context: fidl::encoding::Context) -> usize {
29986 1
29987 }
29988
29989 #[inline(always)]
29990 fn inline_size(_context: fidl::encoding::Context) -> usize {
29991 3
29992 }
29993 #[inline(always)]
29994 fn encode_is_copy() -> bool {
29995 true
29996 }
29997
29998 #[inline(always)]
29999 fn decode_is_copy() -> bool {
30000 true
30001 }
30002 }
30003
30004 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align1, D>
30005 for &StructSize3Align1
30006 {
30007 #[inline]
30008 unsafe fn encode(
30009 self,
30010 encoder: &mut fidl::encoding::Encoder<'_, D>,
30011 offset: usize,
30012 _depth: fidl::encoding::Depth,
30013 ) -> fidl::Result<()> {
30014 encoder.debug_check_bounds::<StructSize3Align1>(offset);
30015 unsafe {
30016 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30018 (buf_ptr as *mut StructSize3Align1)
30019 .write_unaligned((self as *const StructSize3Align1).read());
30020 }
30023 Ok(())
30024 }
30025 }
30026 unsafe impl<
30027 D: fidl::encoding::ResourceDialect,
30028 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
30029 > fidl::encoding::Encode<StructSize3Align1, D> for (T0,)
30030 {
30031 #[inline]
30032 unsafe fn encode(
30033 self,
30034 encoder: &mut fidl::encoding::Encoder<'_, D>,
30035 offset: usize,
30036 depth: fidl::encoding::Depth,
30037 ) -> fidl::Result<()> {
30038 encoder.debug_check_bounds::<StructSize3Align1>(offset);
30039 self.0.encode(encoder, offset + 0, depth)?;
30043 Ok(())
30044 }
30045 }
30046
30047 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align1 {
30048 #[inline(always)]
30049 fn new_empty() -> Self {
30050 Self { three_bytes: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D) }
30051 }
30052
30053 #[inline]
30054 unsafe fn decode(
30055 &mut self,
30056 decoder: &mut fidl::encoding::Decoder<'_, D>,
30057 offset: usize,
30058 _depth: fidl::encoding::Depth,
30059 ) -> fidl::Result<()> {
30060 decoder.debug_check_bounds::<Self>(offset);
30061 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30062 unsafe {
30065 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
30066 }
30067 Ok(())
30068 }
30069 }
30070
30071 impl fidl::encoding::ValueTypeMarker for StructSize3Align2 {
30072 type Borrowed<'a> = &'a Self;
30073 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30074 value
30075 }
30076 }
30077
30078 unsafe impl fidl::encoding::TypeMarker for StructSize3Align2 {
30079 type Owned = Self;
30080
30081 #[inline(always)]
30082 fn inline_align(_context: fidl::encoding::Context) -> usize {
30083 2
30084 }
30085
30086 #[inline(always)]
30087 fn inline_size(_context: fidl::encoding::Context) -> usize {
30088 4
30089 }
30090 }
30091
30092 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align2, D>
30093 for &StructSize3Align2
30094 {
30095 #[inline]
30096 unsafe fn encode(
30097 self,
30098 encoder: &mut fidl::encoding::Encoder<'_, D>,
30099 offset: usize,
30100 _depth: fidl::encoding::Depth,
30101 ) -> fidl::Result<()> {
30102 encoder.debug_check_bounds::<StructSize3Align2>(offset);
30103 unsafe {
30104 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30106 (buf_ptr as *mut StructSize3Align2)
30107 .write_unaligned((self as *const StructSize3Align2).read());
30108 let padding_ptr = buf_ptr.offset(2) as *mut u16;
30111 let padding_mask = 0xff00u16;
30112 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
30113 }
30114 Ok(())
30115 }
30116 }
30117 unsafe impl<
30118 D: fidl::encoding::ResourceDialect,
30119 T0: fidl::encoding::Encode<u16, D>,
30120 T1: fidl::encoding::Encode<u8, D>,
30121 > fidl::encoding::Encode<StructSize3Align2, D> for (T0, T1)
30122 {
30123 #[inline]
30124 unsafe fn encode(
30125 self,
30126 encoder: &mut fidl::encoding::Encoder<'_, D>,
30127 offset: usize,
30128 depth: fidl::encoding::Depth,
30129 ) -> fidl::Result<()> {
30130 encoder.debug_check_bounds::<StructSize3Align2>(offset);
30131 unsafe {
30134 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
30135 (ptr as *mut u16).write_unaligned(0);
30136 }
30137 self.0.encode(encoder, offset + 0, depth)?;
30139 self.1.encode(encoder, offset + 2, depth)?;
30140 Ok(())
30141 }
30142 }
30143
30144 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align2 {
30145 #[inline(always)]
30146 fn new_empty() -> Self {
30147 Self { f1: fidl::new_empty!(u16, D), f2: fidl::new_empty!(u8, D) }
30148 }
30149
30150 #[inline]
30151 unsafe fn decode(
30152 &mut self,
30153 decoder: &mut fidl::encoding::Decoder<'_, D>,
30154 offset: usize,
30155 _depth: fidl::encoding::Depth,
30156 ) -> fidl::Result<()> {
30157 decoder.debug_check_bounds::<Self>(offset);
30158 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30159 let ptr = unsafe { buf_ptr.offset(2) };
30161 let padval = unsafe { (ptr as *const u16).read_unaligned() };
30162 let mask = 0xff00u16;
30163 let maskedval = padval & mask;
30164 if maskedval != 0 {
30165 return Err(fidl::Error::NonZeroPadding {
30166 padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
30167 });
30168 }
30169 unsafe {
30171 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
30172 }
30173 Ok(())
30174 }
30175 }
30176
30177 impl fidl::encoding::ValueTypeMarker for StructTableNoFields {
30178 type Borrowed<'a> = &'a Self;
30179 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30180 value
30181 }
30182 }
30183
30184 unsafe impl fidl::encoding::TypeMarker for StructTableNoFields {
30185 type Owned = Self;
30186
30187 #[inline(always)]
30188 fn inline_align(_context: fidl::encoding::Context) -> usize {
30189 8
30190 }
30191
30192 #[inline(always)]
30193 fn inline_size(_context: fidl::encoding::Context) -> usize {
30194 16
30195 }
30196 }
30197
30198 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructTableNoFields, D>
30199 for &StructTableNoFields
30200 {
30201 #[inline]
30202 unsafe fn encode(
30203 self,
30204 encoder: &mut fidl::encoding::Encoder<'_, D>,
30205 offset: usize,
30206 _depth: fidl::encoding::Depth,
30207 ) -> fidl::Result<()> {
30208 encoder.debug_check_bounds::<StructTableNoFields>(offset);
30209 fidl::encoding::Encode::<StructTableNoFields, D>::encode(
30211 (<TableNoFields as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30212 encoder,
30213 offset,
30214 _depth,
30215 )
30216 }
30217 }
30218 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableNoFields, D>>
30219 fidl::encoding::Encode<StructTableNoFields, D> for (T0,)
30220 {
30221 #[inline]
30222 unsafe fn encode(
30223 self,
30224 encoder: &mut fidl::encoding::Encoder<'_, D>,
30225 offset: usize,
30226 depth: fidl::encoding::Depth,
30227 ) -> fidl::Result<()> {
30228 encoder.debug_check_bounds::<StructTableNoFields>(offset);
30229 self.0.encode(encoder, offset + 0, depth)?;
30233 Ok(())
30234 }
30235 }
30236
30237 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructTableNoFields {
30238 #[inline(always)]
30239 fn new_empty() -> Self {
30240 Self { t: fidl::new_empty!(TableNoFields, D) }
30241 }
30242
30243 #[inline]
30244 unsafe fn decode(
30245 &mut self,
30246 decoder: &mut fidl::encoding::Decoder<'_, D>,
30247 offset: usize,
30248 _depth: fidl::encoding::Depth,
30249 ) -> fidl::Result<()> {
30250 decoder.debug_check_bounds::<Self>(offset);
30251 fidl::decode!(TableNoFields, D, &mut self.t, decoder, offset + 0, _depth)?;
30253 Ok(())
30254 }
30255 }
30256
30257 impl fidl::encoding::ValueTypeMarker for StructWithArrays {
30258 type Borrowed<'a> = &'a Self;
30259 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30260 value
30261 }
30262 }
30263
30264 unsafe impl fidl::encoding::TypeMarker for StructWithArrays {
30265 type Owned = Self;
30266
30267 #[inline(always)]
30268 fn inline_align(_context: fidl::encoding::Context) -> usize {
30269 8
30270 }
30271
30272 #[inline(always)]
30273 fn inline_size(_context: fidl::encoding::Context) -> usize {
30274 120
30275 }
30276 }
30277
30278 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithArrays, D>
30279 for &StructWithArrays
30280 {
30281 #[inline]
30282 unsafe fn encode(
30283 self,
30284 encoder: &mut fidl::encoding::Encoder<'_, D>,
30285 offset: usize,
30286 _depth: fidl::encoding::Depth,
30287 ) -> fidl::Result<()> {
30288 encoder.debug_check_bounds::<StructWithArrays>(offset);
30289 fidl::encoding::Encode::<StructWithArrays, D>::encode(
30291 (
30292 <fidl::encoding::Array<i32, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_int),
30293 <fidl::encoding::Array<fidl::encoding::UnboundedString, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_string),
30294 <fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_string),
30295 <fidl::encoding::Array<StructWithInt, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_struct),
30296 <fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_struct),
30297 <fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_arr_int),
30298 ),
30299 encoder, offset, _depth
30300 )
30301 }
30302 }
30303 unsafe impl<
30304 D: fidl::encoding::ResourceDialect,
30305 T0: fidl::encoding::Encode<fidl::encoding::Array<i32, 2>, D>,
30306 T1: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D>,
30307 T2: fidl::encoding::Encode<
30308 fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30309 D,
30310 >,
30311 T3: fidl::encoding::Encode<fidl::encoding::Array<StructWithInt, 2>, D>,
30312 T4: fidl::encoding::Encode<
30313 fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30314 D,
30315 >,
30316 T5: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>, D>,
30317 > fidl::encoding::Encode<StructWithArrays, D> for (T0, T1, T2, T3, T4, T5)
30318 {
30319 #[inline]
30320 unsafe fn encode(
30321 self,
30322 encoder: &mut fidl::encoding::Encoder<'_, D>,
30323 offset: usize,
30324 depth: fidl::encoding::Depth,
30325 ) -> fidl::Result<()> {
30326 encoder.debug_check_bounds::<StructWithArrays>(offset);
30327 self.0.encode(encoder, offset + 0, depth)?;
30331 self.1.encode(encoder, offset + 8, depth)?;
30332 self.2.encode(encoder, offset + 40, depth)?;
30333 self.3.encode(encoder, offset + 72, depth)?;
30334 self.4.encode(encoder, offset + 80, depth)?;
30335 self.5.encode(encoder, offset + 96, depth)?;
30336 Ok(())
30337 }
30338 }
30339
30340 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithArrays {
30341 #[inline(always)]
30342 fn new_empty() -> Self {
30343 Self {
30344 arr_int: fidl::new_empty!(fidl::encoding::Array<i32, 2>, D),
30345 arr_string: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D),
30346 arr_nullable_string: fidl::new_empty!(
30347 fidl::encoding::Array<
30348 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30349 2,
30350 >,
30351 D
30352 ),
30353 arr_struct: fidl::new_empty!(fidl::encoding::Array<StructWithInt, 2>, D),
30354 arr_nullable_struct: fidl::new_empty!(
30355 fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30356 D
30357 ),
30358 arr_arr_int: fidl::new_empty!(
30359 fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30360 D
30361 ),
30362 }
30363 }
30364
30365 #[inline]
30366 unsafe fn decode(
30367 &mut self,
30368 decoder: &mut fidl::encoding::Decoder<'_, D>,
30369 offset: usize,
30370 _depth: fidl::encoding::Depth,
30371 ) -> fidl::Result<()> {
30372 decoder.debug_check_bounds::<Self>(offset);
30373 fidl::decode!(fidl::encoding::Array<i32, 2>, D, &mut self.arr_int, decoder, offset + 0, _depth)?;
30375 fidl::decode!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D, &mut self.arr_string, decoder, offset + 8, _depth)?;
30376 fidl::decode!(
30377 fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30378 D,
30379 &mut self.arr_nullable_string,
30380 decoder,
30381 offset + 40,
30382 _depth
30383 )?;
30384 fidl::decode!(fidl::encoding::Array<StructWithInt, 2>, D, &mut self.arr_struct, decoder, offset + 72, _depth)?;
30385 fidl::decode!(
30386 fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30387 D,
30388 &mut self.arr_nullable_struct,
30389 decoder,
30390 offset + 80,
30391 _depth
30392 )?;
30393 fidl::decode!(
30394 fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30395 D,
30396 &mut self.arr_arr_int,
30397 decoder,
30398 offset + 96,
30399 _depth
30400 )?;
30401 Ok(())
30402 }
30403 }
30404
30405 impl fidl::encoding::ValueTypeMarker for StructWithInt {
30406 type Borrowed<'a> = &'a Self;
30407 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30408 value
30409 }
30410 }
30411
30412 unsafe impl fidl::encoding::TypeMarker for StructWithInt {
30413 type Owned = Self;
30414
30415 #[inline(always)]
30416 fn inline_align(_context: fidl::encoding::Context) -> usize {
30417 4
30418 }
30419
30420 #[inline(always)]
30421 fn inline_size(_context: fidl::encoding::Context) -> usize {
30422 4
30423 }
30424 #[inline(always)]
30425 fn encode_is_copy() -> bool {
30426 true
30427 }
30428
30429 #[inline(always)]
30430 fn decode_is_copy() -> bool {
30431 true
30432 }
30433 }
30434
30435 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithInt, D>
30436 for &StructWithInt
30437 {
30438 #[inline]
30439 unsafe fn encode(
30440 self,
30441 encoder: &mut fidl::encoding::Encoder<'_, D>,
30442 offset: usize,
30443 _depth: fidl::encoding::Depth,
30444 ) -> fidl::Result<()> {
30445 encoder.debug_check_bounds::<StructWithInt>(offset);
30446 unsafe {
30447 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30449 (buf_ptr as *mut StructWithInt)
30450 .write_unaligned((self as *const StructWithInt).read());
30451 }
30454 Ok(())
30455 }
30456 }
30457 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
30458 fidl::encoding::Encode<StructWithInt, D> for (T0,)
30459 {
30460 #[inline]
30461 unsafe fn encode(
30462 self,
30463 encoder: &mut fidl::encoding::Encoder<'_, D>,
30464 offset: usize,
30465 depth: fidl::encoding::Depth,
30466 ) -> fidl::Result<()> {
30467 encoder.debug_check_bounds::<StructWithInt>(offset);
30468 self.0.encode(encoder, offset + 0, depth)?;
30472 Ok(())
30473 }
30474 }
30475
30476 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithInt {
30477 #[inline(always)]
30478 fn new_empty() -> Self {
30479 Self { x: fidl::new_empty!(i32, D) }
30480 }
30481
30482 #[inline]
30483 unsafe fn decode(
30484 &mut self,
30485 decoder: &mut fidl::encoding::Decoder<'_, D>,
30486 offset: usize,
30487 _depth: fidl::encoding::Depth,
30488 ) -> fidl::Result<()> {
30489 decoder.debug_check_bounds::<Self>(offset);
30490 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30491 unsafe {
30494 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
30495 }
30496 Ok(())
30497 }
30498 }
30499
30500 impl fidl::encoding::ValueTypeMarker for StructWithOptionals {
30501 type Borrowed<'a> = &'a Self;
30502 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30503 value
30504 }
30505 }
30506
30507 unsafe impl fidl::encoding::TypeMarker for StructWithOptionals {
30508 type Owned = Self;
30509
30510 #[inline(always)]
30511 fn inline_align(_context: fidl::encoding::Context) -> usize {
30512 8
30513 }
30514
30515 #[inline(always)]
30516 fn inline_size(_context: fidl::encoding::Context) -> usize {
30517 96
30518 }
30519 }
30520
30521 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithOptionals, D>
30522 for &StructWithOptionals
30523 {
30524 #[inline]
30525 unsafe fn encode(
30526 self,
30527 encoder: &mut fidl::encoding::Encoder<'_, D>,
30528 offset: usize,
30529 _depth: fidl::encoding::Depth,
30530 ) -> fidl::Result<()> {
30531 encoder.debug_check_bounds::<StructWithOptionals>(offset);
30532 fidl::encoding::Encode::<StructWithOptionals, D>::encode(
30534 (
30535 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
30536 <fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.s2),
30537 <TableWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.t),
30538 <XUnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
30539 <fidl::encoding::OptionalUnion<XUnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu2),
30540 <UnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
30541 <fidl::encoding::OptionalUnion<UnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
30542 ),
30543 encoder, offset, _depth
30544 )
30545 }
30546 }
30547 unsafe impl<
30548 D: fidl::encoding::ResourceDialect,
30549 T0: fidl::encoding::Encode<EmptyStruct, D>,
30550 T1: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
30551 T2: fidl::encoding::Encode<TableWithEmptyStruct, D>,
30552 T3: fidl::encoding::Encode<XUnionWithEmptyStruct, D>,
30553 T4: fidl::encoding::Encode<fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D>,
30554 T5: fidl::encoding::Encode<UnionWithEmptyStruct, D>,
30555 T6: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D>,
30556 > fidl::encoding::Encode<StructWithOptionals, D> for (T0, T1, T2, T3, T4, T5, T6)
30557 {
30558 #[inline]
30559 unsafe fn encode(
30560 self,
30561 encoder: &mut fidl::encoding::Encoder<'_, D>,
30562 offset: usize,
30563 depth: fidl::encoding::Depth,
30564 ) -> fidl::Result<()> {
30565 encoder.debug_check_bounds::<StructWithOptionals>(offset);
30566 unsafe {
30569 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
30570 (ptr as *mut u64).write_unaligned(0);
30571 }
30572 self.0.encode(encoder, offset + 0, depth)?;
30574 self.1.encode(encoder, offset + 8, depth)?;
30575 self.2.encode(encoder, offset + 16, depth)?;
30576 self.3.encode(encoder, offset + 32, depth)?;
30577 self.4.encode(encoder, offset + 48, depth)?;
30578 self.5.encode(encoder, offset + 64, depth)?;
30579 self.6.encode(encoder, offset + 80, depth)?;
30580 Ok(())
30581 }
30582 }
30583
30584 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithOptionals {
30585 #[inline(always)]
30586 fn new_empty() -> Self {
30587 Self {
30588 s: fidl::new_empty!(EmptyStruct, D),
30589 s2: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D),
30590 t: fidl::new_empty!(TableWithEmptyStruct, D),
30591 xu: fidl::new_empty!(XUnionWithEmptyStruct, D),
30592 xu2: fidl::new_empty!(fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D),
30593 u: fidl::new_empty!(UnionWithEmptyStruct, D),
30594 u2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D),
30595 }
30596 }
30597
30598 #[inline]
30599 unsafe fn decode(
30600 &mut self,
30601 decoder: &mut fidl::encoding::Decoder<'_, D>,
30602 offset: usize,
30603 _depth: fidl::encoding::Depth,
30604 ) -> fidl::Result<()> {
30605 decoder.debug_check_bounds::<Self>(offset);
30606 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
30608 let padval = unsafe { (ptr as *const u64).read_unaligned() };
30609 let mask = 0xffffffffffffff00u64;
30610 let maskedval = padval & mask;
30611 if maskedval != 0 {
30612 return Err(fidl::Error::NonZeroPadding {
30613 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
30614 });
30615 }
30616 fidl::decode!(EmptyStruct, D, &mut self.s, decoder, offset + 0, _depth)?;
30617 fidl::decode!(
30618 fidl::encoding::Boxed<EmptyStruct>,
30619 D,
30620 &mut self.s2,
30621 decoder,
30622 offset + 8,
30623 _depth
30624 )?;
30625 fidl::decode!(TableWithEmptyStruct, D, &mut self.t, decoder, offset + 16, _depth)?;
30626 fidl::decode!(XUnionWithEmptyStruct, D, &mut self.xu, decoder, offset + 32, _depth)?;
30627 fidl::decode!(
30628 fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>,
30629 D,
30630 &mut self.xu2,
30631 decoder,
30632 offset + 48,
30633 _depth
30634 )?;
30635 fidl::decode!(UnionWithEmptyStruct, D, &mut self.u, decoder, offset + 64, _depth)?;
30636 fidl::decode!(
30637 fidl::encoding::OptionalUnion<UnionWithEmptyStruct>,
30638 D,
30639 &mut self.u2,
30640 decoder,
30641 offset + 80,
30642 _depth
30643 )?;
30644 Ok(())
30645 }
30646 }
30647
30648 impl fidl::encoding::ValueTypeMarker for StructWithVectors {
30649 type Borrowed<'a> = &'a Self;
30650 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30651 value
30652 }
30653 }
30654
30655 unsafe impl fidl::encoding::TypeMarker for StructWithVectors {
30656 type Owned = Self;
30657
30658 #[inline(always)]
30659 fn inline_align(_context: fidl::encoding::Context) -> usize {
30660 8
30661 }
30662
30663 #[inline(always)]
30664 fn inline_size(_context: fidl::encoding::Context) -> usize {
30665 112
30666 }
30667 }
30668
30669 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithVectors, D>
30670 for &StructWithVectors
30671 {
30672 #[inline]
30673 unsafe fn encode(
30674 self,
30675 encoder: &mut fidl::encoding::Encoder<'_, D>,
30676 offset: usize,
30677 _depth: fidl::encoding::Depth,
30678 ) -> fidl::Result<()> {
30679 encoder.debug_check_bounds::<StructWithVectors>(offset);
30680 fidl::encoding::Encode::<StructWithVectors, D>::encode(
30682 (
30683 <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_empty),
30684 <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_int),
30685 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_string),
30686 <fidl::encoding::UnboundedVector<fidl::encoding::Optional<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_string),
30687 <fidl::encoding::UnboundedVector<StructWithInt> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_struct),
30688 <fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_struct),
30689 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_vec_int),
30690 ),
30691 encoder, offset, _depth
30692 )
30693 }
30694 }
30695 unsafe impl<
30696 D: fidl::encoding::ResourceDialect,
30697 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
30698 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
30699 T2: fidl::encoding::Encode<
30700 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
30701 D,
30702 >,
30703 T3: fidl::encoding::Encode<
30704 fidl::encoding::UnboundedVector<
30705 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30706 >,
30707 D,
30708 >,
30709 T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StructWithInt>, D>,
30710 T5: fidl::encoding::Encode<
30711 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
30712 D,
30713 >,
30714 T6: fidl::encoding::Encode<
30715 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
30716 D,
30717 >,
30718 > fidl::encoding::Encode<StructWithVectors, D> for (T0, T1, T2, T3, T4, T5, T6)
30719 {
30720 #[inline]
30721 unsafe fn encode(
30722 self,
30723 encoder: &mut fidl::encoding::Encoder<'_, D>,
30724 offset: usize,
30725 depth: fidl::encoding::Depth,
30726 ) -> fidl::Result<()> {
30727 encoder.debug_check_bounds::<StructWithVectors>(offset);
30728 self.0.encode(encoder, offset + 0, depth)?;
30732 self.1.encode(encoder, offset + 16, depth)?;
30733 self.2.encode(encoder, offset + 32, depth)?;
30734 self.3.encode(encoder, offset + 48, depth)?;
30735 self.4.encode(encoder, offset + 64, depth)?;
30736 self.5.encode(encoder, offset + 80, depth)?;
30737 self.6.encode(encoder, offset + 96, depth)?;
30738 Ok(())
30739 }
30740 }
30741
30742 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithVectors {
30743 #[inline(always)]
30744 fn new_empty() -> Self {
30745 Self {
30746 vec_empty: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
30747 vec_int: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
30748 vec_string: fidl::new_empty!(
30749 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
30750 D
30751 ),
30752 vec_nullable_string: fidl::new_empty!(
30753 fidl::encoding::UnboundedVector<
30754 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30755 >,
30756 D
30757 ),
30758 vec_struct: fidl::new_empty!(fidl::encoding::UnboundedVector<StructWithInt>, D),
30759 vec_nullable_struct: fidl::new_empty!(
30760 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
30761 D
30762 ),
30763 vec_vec_int: fidl::new_empty!(
30764 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
30765 D
30766 ),
30767 }
30768 }
30769
30770 #[inline]
30771 unsafe fn decode(
30772 &mut self,
30773 decoder: &mut fidl::encoding::Decoder<'_, D>,
30774 offset: usize,
30775 _depth: fidl::encoding::Depth,
30776 ) -> fidl::Result<()> {
30777 decoder.debug_check_bounds::<Self>(offset);
30778 fidl::decode!(
30780 fidl::encoding::UnboundedVector<i32>,
30781 D,
30782 &mut self.vec_empty,
30783 decoder,
30784 offset + 0,
30785 _depth
30786 )?;
30787 fidl::decode!(
30788 fidl::encoding::UnboundedVector<i32>,
30789 D,
30790 &mut self.vec_int,
30791 decoder,
30792 offset + 16,
30793 _depth
30794 )?;
30795 fidl::decode!(
30796 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
30797 D,
30798 &mut self.vec_string,
30799 decoder,
30800 offset + 32,
30801 _depth
30802 )?;
30803 fidl::decode!(
30804 fidl::encoding::UnboundedVector<
30805 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30806 >,
30807 D,
30808 &mut self.vec_nullable_string,
30809 decoder,
30810 offset + 48,
30811 _depth
30812 )?;
30813 fidl::decode!(
30814 fidl::encoding::UnboundedVector<StructWithInt>,
30815 D,
30816 &mut self.vec_struct,
30817 decoder,
30818 offset + 64,
30819 _depth
30820 )?;
30821 fidl::decode!(
30822 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
30823 D,
30824 &mut self.vec_nullable_struct,
30825 decoder,
30826 offset + 80,
30827 _depth
30828 )?;
30829 fidl::decode!(
30830 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
30831 D,
30832 &mut self.vec_vec_int,
30833 decoder,
30834 offset + 96,
30835 _depth
30836 )?;
30837 Ok(())
30838 }
30839 }
30840
30841 impl fidl::encoding::ValueTypeMarker for TableFieldInlinedStruct {
30842 type Borrowed<'a> = &'a Self;
30843 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30844 value
30845 }
30846 }
30847
30848 unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedStruct {
30849 type Owned = Self;
30850
30851 #[inline(always)]
30852 fn inline_align(_context: fidl::encoding::Context) -> usize {
30853 8
30854 }
30855
30856 #[inline(always)]
30857 fn inline_size(_context: fidl::encoding::Context) -> usize {
30858 16
30859 }
30860 }
30861
30862 unsafe impl<D: fidl::encoding::ResourceDialect>
30863 fidl::encoding::Encode<TableFieldInlinedStruct, D> for &TableFieldInlinedStruct
30864 {
30865 #[inline]
30866 unsafe fn encode(
30867 self,
30868 encoder: &mut fidl::encoding::Encoder<'_, D>,
30869 offset: usize,
30870 _depth: fidl::encoding::Depth,
30871 ) -> fidl::Result<()> {
30872 encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
30873 fidl::encoding::Encode::<TableFieldInlinedStruct, D>::encode(
30875 (<TableFieldInlined as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30876 encoder,
30877 offset,
30878 _depth,
30879 )
30880 }
30881 }
30882 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableFieldInlined, D>>
30883 fidl::encoding::Encode<TableFieldInlinedStruct, D> for (T0,)
30884 {
30885 #[inline]
30886 unsafe fn encode(
30887 self,
30888 encoder: &mut fidl::encoding::Encoder<'_, D>,
30889 offset: usize,
30890 depth: fidl::encoding::Depth,
30891 ) -> fidl::Result<()> {
30892 encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
30893 self.0.encode(encoder, offset + 0, depth)?;
30897 Ok(())
30898 }
30899 }
30900
30901 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30902 for TableFieldInlinedStruct
30903 {
30904 #[inline(always)]
30905 fn new_empty() -> Self {
30906 Self { t: fidl::new_empty!(TableFieldInlined, D) }
30907 }
30908
30909 #[inline]
30910 unsafe fn decode(
30911 &mut self,
30912 decoder: &mut fidl::encoding::Decoder<'_, D>,
30913 offset: usize,
30914 _depth: fidl::encoding::Depth,
30915 ) -> fidl::Result<()> {
30916 decoder.debug_check_bounds::<Self>(offset);
30917 fidl::decode!(TableFieldInlined, D, &mut self.t, decoder, offset + 0, _depth)?;
30919 Ok(())
30920 }
30921 }
30922
30923 impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLineStruct {
30924 type Borrowed<'a> = &'a Self;
30925 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30926 value
30927 }
30928 }
30929
30930 unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLineStruct {
30931 type Owned = Self;
30932
30933 #[inline(always)]
30934 fn inline_align(_context: fidl::encoding::Context) -> usize {
30935 8
30936 }
30937
30938 #[inline(always)]
30939 fn inline_size(_context: fidl::encoding::Context) -> usize {
30940 16
30941 }
30942 }
30943
30944 unsafe impl<D: fidl::encoding::ResourceDialect>
30945 fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for &TableFieldOutOfLineStruct
30946 {
30947 #[inline]
30948 unsafe fn encode(
30949 self,
30950 encoder: &mut fidl::encoding::Encoder<'_, D>,
30951 offset: usize,
30952 _depth: fidl::encoding::Depth,
30953 ) -> fidl::Result<()> {
30954 encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
30955 fidl::encoding::Encode::<TableFieldOutOfLineStruct, D>::encode(
30957 (<TableFieldOutOfLine as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30958 encoder,
30959 offset,
30960 _depth,
30961 )
30962 }
30963 }
30964 unsafe impl<
30965 D: fidl::encoding::ResourceDialect,
30966 T0: fidl::encoding::Encode<TableFieldOutOfLine, D>,
30967 > fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for (T0,)
30968 {
30969 #[inline]
30970 unsafe fn encode(
30971 self,
30972 encoder: &mut fidl::encoding::Encoder<'_, D>,
30973 offset: usize,
30974 depth: fidl::encoding::Depth,
30975 ) -> fidl::Result<()> {
30976 encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
30977 self.0.encode(encoder, offset + 0, depth)?;
30981 Ok(())
30982 }
30983 }
30984
30985 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30986 for TableFieldOutOfLineStruct
30987 {
30988 #[inline(always)]
30989 fn new_empty() -> Self {
30990 Self { t: fidl::new_empty!(TableFieldOutOfLine, D) }
30991 }
30992
30993 #[inline]
30994 unsafe fn decode(
30995 &mut self,
30996 decoder: &mut fidl::encoding::Decoder<'_, D>,
30997 offset: usize,
30998 _depth: fidl::encoding::Depth,
30999 ) -> fidl::Result<()> {
31000 decoder.debug_check_bounds::<Self>(offset);
31001 fidl::decode!(TableFieldOutOfLine, D, &mut self.t, decoder, offset + 0, _depth)?;
31003 Ok(())
31004 }
31005 }
31006
31007 impl fidl::encoding::ValueTypeMarker for TableFieldUnknownStruct {
31008 type Borrowed<'a> = &'a Self;
31009 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31010 value
31011 }
31012 }
31013
31014 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownStruct {
31015 type Owned = Self;
31016
31017 #[inline(always)]
31018 fn inline_align(_context: fidl::encoding::Context) -> usize {
31019 8
31020 }
31021
31022 #[inline(always)]
31023 fn inline_size(_context: fidl::encoding::Context) -> usize {
31024 16
31025 }
31026 }
31027
31028 unsafe impl<D: fidl::encoding::ResourceDialect>
31029 fidl::encoding::Encode<TableFieldUnknownStruct, D> for &TableFieldUnknownStruct
31030 {
31031 #[inline]
31032 unsafe fn encode(
31033 self,
31034 encoder: &mut fidl::encoding::Encoder<'_, D>,
31035 offset: usize,
31036 _depth: fidl::encoding::Depth,
31037 ) -> fidl::Result<()> {
31038 encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31039 fidl::encoding::Encode::<TableFieldUnknownStruct, D>::encode(
31041 (<TableFieldUnknown as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31042 encoder,
31043 offset,
31044 _depth,
31045 )
31046 }
31047 }
31048 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableFieldUnknown, D>>
31049 fidl::encoding::Encode<TableFieldUnknownStruct, D> for (T0,)
31050 {
31051 #[inline]
31052 unsafe fn encode(
31053 self,
31054 encoder: &mut fidl::encoding::Encoder<'_, D>,
31055 offset: usize,
31056 depth: fidl::encoding::Depth,
31057 ) -> fidl::Result<()> {
31058 encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31059 self.0.encode(encoder, offset + 0, depth)?;
31063 Ok(())
31064 }
31065 }
31066
31067 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31068 for TableFieldUnknownStruct
31069 {
31070 #[inline(always)]
31071 fn new_empty() -> Self {
31072 Self { t: fidl::new_empty!(TableFieldUnknown, D) }
31073 }
31074
31075 #[inline]
31076 unsafe fn decode(
31077 &mut self,
31078 decoder: &mut fidl::encoding::Decoder<'_, D>,
31079 offset: usize,
31080 _depth: fidl::encoding::Depth,
31081 ) -> fidl::Result<()> {
31082 decoder.debug_check_bounds::<Self>(offset);
31083 fidl::decode!(TableFieldUnknown, D, &mut self.t, decoder, offset + 0, _depth)?;
31085 Ok(())
31086 }
31087 }
31088
31089 impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31090 type Borrowed<'a> = &'a Self;
31091 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31092 value
31093 }
31094 }
31095
31096 unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31097 type Owned = Self;
31098
31099 #[inline(always)]
31100 fn inline_align(_context: fidl::encoding::Context) -> usize {
31101 8
31102 }
31103
31104 #[inline(always)]
31105 fn inline_size(_context: fidl::encoding::Context) -> usize {
31106 16
31107 }
31108 }
31109
31110 unsafe impl<D: fidl::encoding::ResourceDialect>
31111 fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D>
31112 for &TableFieldUnsetFlexibleEnumInlinedStruct
31113 {
31114 #[inline]
31115 unsafe fn encode(
31116 self,
31117 encoder: &mut fidl::encoding::Encoder<'_, D>,
31118 offset: usize,
31119 _depth: fidl::encoding::Depth,
31120 ) -> fidl::Result<()> {
31121 encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31122 fidl::encoding::Encode::<TableFieldUnsetFlexibleEnumInlinedStruct, D>::encode(
31124 (<TableFieldUnsetFlexibleEnumInlined as fidl::encoding::ValueTypeMarker>::borrow(
31125 &self.t,
31126 ),),
31127 encoder,
31128 offset,
31129 _depth,
31130 )
31131 }
31132 }
31133 unsafe impl<
31134 D: fidl::encoding::ResourceDialect,
31135 T0: fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>,
31136 > fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D> for (T0,)
31137 {
31138 #[inline]
31139 unsafe fn encode(
31140 self,
31141 encoder: &mut fidl::encoding::Encoder<'_, D>,
31142 offset: usize,
31143 depth: fidl::encoding::Depth,
31144 ) -> fidl::Result<()> {
31145 encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31146 self.0.encode(encoder, offset + 0, depth)?;
31150 Ok(())
31151 }
31152 }
31153
31154 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31155 for TableFieldUnsetFlexibleEnumInlinedStruct
31156 {
31157 #[inline(always)]
31158 fn new_empty() -> Self {
31159 Self { t: fidl::new_empty!(TableFieldUnsetFlexibleEnumInlined, D) }
31160 }
31161
31162 #[inline]
31163 unsafe fn decode(
31164 &mut self,
31165 decoder: &mut fidl::encoding::Decoder<'_, D>,
31166 offset: usize,
31167 _depth: fidl::encoding::Depth,
31168 ) -> fidl::Result<()> {
31169 decoder.debug_check_bounds::<Self>(offset);
31170 fidl::decode!(
31172 TableFieldUnsetFlexibleEnumInlined,
31173 D,
31174 &mut self.t,
31175 decoder,
31176 offset + 0,
31177 _depth
31178 )?;
31179 Ok(())
31180 }
31181 }
31182
31183 impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwichStruct {
31184 type Borrowed<'a> = &'a Self;
31185 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31186 value
31187 }
31188 }
31189
31190 unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwichStruct {
31191 type Owned = Self;
31192
31193 #[inline(always)]
31194 fn inline_align(_context: fidl::encoding::Context) -> usize {
31195 8
31196 }
31197
31198 #[inline(always)]
31199 fn inline_size(_context: fidl::encoding::Context) -> usize {
31200 16
31201 }
31202 }
31203
31204 unsafe impl<D: fidl::encoding::ResourceDialect>
31205 fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D>
31206 for &TableStructWithReservedSandwichStruct
31207 {
31208 #[inline]
31209 unsafe fn encode(
31210 self,
31211 encoder: &mut fidl::encoding::Encoder<'_, D>,
31212 offset: usize,
31213 _depth: fidl::encoding::Depth,
31214 ) -> fidl::Result<()> {
31215 encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31216 fidl::encoding::Encode::<TableStructWithReservedSandwichStruct, D>::encode(
31218 (<TableStructWithReservedSandwich as fidl::encoding::ValueTypeMarker>::borrow(
31219 &self.table,
31220 ),),
31221 encoder,
31222 offset,
31223 _depth,
31224 )
31225 }
31226 }
31227 unsafe impl<
31228 D: fidl::encoding::ResourceDialect,
31229 T0: fidl::encoding::Encode<TableStructWithReservedSandwich, D>,
31230 > fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D> for (T0,)
31231 {
31232 #[inline]
31233 unsafe fn encode(
31234 self,
31235 encoder: &mut fidl::encoding::Encoder<'_, D>,
31236 offset: usize,
31237 depth: fidl::encoding::Depth,
31238 ) -> fidl::Result<()> {
31239 encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31240 self.0.encode(encoder, offset + 0, depth)?;
31244 Ok(())
31245 }
31246 }
31247
31248 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31249 for TableStructWithReservedSandwichStruct
31250 {
31251 #[inline(always)]
31252 fn new_empty() -> Self {
31253 Self { table: fidl::new_empty!(TableStructWithReservedSandwich, D) }
31254 }
31255
31256 #[inline]
31257 unsafe fn decode(
31258 &mut self,
31259 decoder: &mut fidl::encoding::Decoder<'_, D>,
31260 offset: usize,
31261 _depth: fidl::encoding::Depth,
31262 ) -> fidl::Result<()> {
31263 decoder.debug_check_bounds::<Self>(offset);
31264 fidl::decode!(
31266 TableStructWithReservedSandwich,
31267 D,
31268 &mut self.table,
31269 decoder,
31270 offset + 0,
31271 _depth
31272 )?;
31273 Ok(())
31274 }
31275 }
31276
31277 impl fidl::encoding::ValueTypeMarker for TableStructWithUint32SandwichStruct {
31278 type Borrowed<'a> = &'a Self;
31279 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31280 value
31281 }
31282 }
31283
31284 unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32SandwichStruct {
31285 type Owned = Self;
31286
31287 #[inline(always)]
31288 fn inline_align(_context: fidl::encoding::Context) -> usize {
31289 8
31290 }
31291
31292 #[inline(always)]
31293 fn inline_size(_context: fidl::encoding::Context) -> usize {
31294 16
31295 }
31296 }
31297
31298 unsafe impl<D: fidl::encoding::ResourceDialect>
31299 fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D>
31300 for &TableStructWithUint32SandwichStruct
31301 {
31302 #[inline]
31303 unsafe fn encode(
31304 self,
31305 encoder: &mut fidl::encoding::Encoder<'_, D>,
31306 offset: usize,
31307 _depth: fidl::encoding::Depth,
31308 ) -> fidl::Result<()> {
31309 encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31310 fidl::encoding::Encode::<TableStructWithUint32SandwichStruct, D>::encode(
31312 (<TableStructWithUint32Sandwich as fidl::encoding::ValueTypeMarker>::borrow(
31313 &self.table,
31314 ),),
31315 encoder,
31316 offset,
31317 _depth,
31318 )
31319 }
31320 }
31321 unsafe impl<
31322 D: fidl::encoding::ResourceDialect,
31323 T0: fidl::encoding::Encode<TableStructWithUint32Sandwich, D>,
31324 > fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D> for (T0,)
31325 {
31326 #[inline]
31327 unsafe fn encode(
31328 self,
31329 encoder: &mut fidl::encoding::Encoder<'_, D>,
31330 offset: usize,
31331 depth: fidl::encoding::Depth,
31332 ) -> fidl::Result<()> {
31333 encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31334 self.0.encode(encoder, offset + 0, depth)?;
31338 Ok(())
31339 }
31340 }
31341
31342 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31343 for TableStructWithUint32SandwichStruct
31344 {
31345 #[inline(always)]
31346 fn new_empty() -> Self {
31347 Self { table: fidl::new_empty!(TableStructWithUint32Sandwich, D) }
31348 }
31349
31350 #[inline]
31351 unsafe fn decode(
31352 &mut self,
31353 decoder: &mut fidl::encoding::Decoder<'_, D>,
31354 offset: usize,
31355 _depth: fidl::encoding::Depth,
31356 ) -> fidl::Result<()> {
31357 decoder.debug_check_bounds::<Self>(offset);
31358 fidl::decode!(
31360 TableStructWithUint32Sandwich,
31361 D,
31362 &mut self.table,
31363 decoder,
31364 offset + 0,
31365 _depth
31366 )?;
31367 Ok(())
31368 }
31369 }
31370
31371 impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnionStruct {
31372 type Borrowed<'a> = &'a Self;
31373 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31374 value
31375 }
31376 }
31377
31378 unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnionStruct {
31379 type Owned = Self;
31380
31381 #[inline(always)]
31382 fn inline_align(_context: fidl::encoding::Context) -> usize {
31383 8
31384 }
31385
31386 #[inline(always)]
31387 fn inline_size(_context: fidl::encoding::Context) -> usize {
31388 16
31389 }
31390 }
31391
31392 unsafe impl<D: fidl::encoding::ResourceDialect>
31393 fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D>
31394 for &TableWithReservedFieldThenUnionStruct
31395 {
31396 #[inline]
31397 unsafe fn encode(
31398 self,
31399 encoder: &mut fidl::encoding::Encoder<'_, D>,
31400 offset: usize,
31401 _depth: fidl::encoding::Depth,
31402 ) -> fidl::Result<()> {
31403 encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31404 fidl::encoding::Encode::<TableWithReservedFieldThenUnionStruct, D>::encode(
31406 (<TableWithReservedFieldThenUnion as fidl::encoding::ValueTypeMarker>::borrow(
31407 &self.t,
31408 ),),
31409 encoder,
31410 offset,
31411 _depth,
31412 )
31413 }
31414 }
31415 unsafe impl<
31416 D: fidl::encoding::ResourceDialect,
31417 T0: fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>,
31418 > fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D> for (T0,)
31419 {
31420 #[inline]
31421 unsafe fn encode(
31422 self,
31423 encoder: &mut fidl::encoding::Encoder<'_, D>,
31424 offset: usize,
31425 depth: fidl::encoding::Depth,
31426 ) -> fidl::Result<()> {
31427 encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31428 self.0.encode(encoder, offset + 0, depth)?;
31432 Ok(())
31433 }
31434 }
31435
31436 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31437 for TableWithReservedFieldThenUnionStruct
31438 {
31439 #[inline(always)]
31440 fn new_empty() -> Self {
31441 Self { t: fidl::new_empty!(TableWithReservedFieldThenUnion, D) }
31442 }
31443
31444 #[inline]
31445 unsafe fn decode(
31446 &mut self,
31447 decoder: &mut fidl::encoding::Decoder<'_, D>,
31448 offset: usize,
31449 _depth: fidl::encoding::Depth,
31450 ) -> fidl::Result<()> {
31451 decoder.debug_check_bounds::<Self>(offset);
31452 fidl::decode!(
31454 TableWithReservedFieldThenUnion,
31455 D,
31456 &mut self.t,
31457 decoder,
31458 offset + 0,
31459 _depth
31460 )?;
31461 Ok(())
31462 }
31463 }
31464
31465 impl fidl::encoding::ValueTypeMarker for TestAddEthernetDeviceRequest {
31466 type Borrowed<'a> = &'a Self;
31467 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31468 value
31469 }
31470 }
31471
31472 unsafe impl fidl::encoding::TypeMarker for TestAddEthernetDeviceRequest {
31473 type Owned = Self;
31474
31475 #[inline(always)]
31476 fn inline_align(_context: fidl::encoding::Context) -> usize {
31477 8
31478 }
31479
31480 #[inline(always)]
31481 fn inline_size(_context: fidl::encoding::Context) -> usize {
31482 56
31483 }
31484 }
31485
31486 unsafe impl<D: fidl::encoding::ResourceDialect>
31487 fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for &TestAddEthernetDeviceRequest
31488 {
31489 #[inline]
31490 unsafe fn encode(
31491 self,
31492 encoder: &mut fidl::encoding::Encoder<'_, D>,
31493 offset: usize,
31494 _depth: fidl::encoding::Depth,
31495 ) -> fidl::Result<()> {
31496 encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
31497 fidl::encoding::Encode::<TestAddEthernetDeviceRequest, D>::encode(
31499 (
31500 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
31501 &self.topological_path,
31502 ),
31503 <InterfaceConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
31504 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
31505 ),
31506 encoder,
31507 offset,
31508 _depth,
31509 )
31510 }
31511 }
31512 unsafe impl<
31513 D: fidl::encoding::ResourceDialect,
31514 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
31515 T1: fidl::encoding::Encode<InterfaceConfig, D>,
31516 T2: fidl::encoding::Encode<u32, D>,
31517 > fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for (T0, T1, T2)
31518 {
31519 #[inline]
31520 unsafe fn encode(
31521 self,
31522 encoder: &mut fidl::encoding::Encoder<'_, D>,
31523 offset: usize,
31524 depth: fidl::encoding::Depth,
31525 ) -> fidl::Result<()> {
31526 encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
31527 unsafe {
31530 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
31531 (ptr as *mut u64).write_unaligned(0);
31532 }
31533 self.0.encode(encoder, offset + 0, depth)?;
31535 self.1.encode(encoder, offset + 16, depth)?;
31536 self.2.encode(encoder, offset + 48, depth)?;
31537 Ok(())
31538 }
31539 }
31540
31541 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31542 for TestAddEthernetDeviceRequest
31543 {
31544 #[inline(always)]
31545 fn new_empty() -> Self {
31546 Self {
31547 topological_path: fidl::new_empty!(fidl::encoding::UnboundedString, D),
31548 config: fidl::new_empty!(InterfaceConfig, D),
31549 this_should_be_a_handle: fidl::new_empty!(u32, D),
31550 }
31551 }
31552
31553 #[inline]
31554 unsafe fn decode(
31555 &mut self,
31556 decoder: &mut fidl::encoding::Decoder<'_, D>,
31557 offset: usize,
31558 _depth: fidl::encoding::Depth,
31559 ) -> fidl::Result<()> {
31560 decoder.debug_check_bounds::<Self>(offset);
31561 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
31563 let padval = unsafe { (ptr as *const u64).read_unaligned() };
31564 let mask = 0xffffffff00000000u64;
31565 let maskedval = padval & mask;
31566 if maskedval != 0 {
31567 return Err(fidl::Error::NonZeroPadding {
31568 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
31569 });
31570 }
31571 fidl::decode!(
31572 fidl::encoding::UnboundedString,
31573 D,
31574 &mut self.topological_path,
31575 decoder,
31576 offset + 0,
31577 _depth
31578 )?;
31579 fidl::decode!(InterfaceConfig, D, &mut self.config, decoder, offset + 16, _depth)?;
31580 fidl::decode!(u32, D, &mut self.this_should_be_a_handle, decoder, offset + 48, _depth)?;
31581 Ok(())
31582 }
31583 }
31584
31585 impl fidl::encoding::ValueTypeMarker for TestFlexibleXUnionInStruct {
31586 type Borrowed<'a> = &'a Self;
31587 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31588 value
31589 }
31590 }
31591
31592 unsafe impl fidl::encoding::TypeMarker for TestFlexibleXUnionInStruct {
31593 type Owned = Self;
31594
31595 #[inline(always)]
31596 fn inline_align(_context: fidl::encoding::Context) -> usize {
31597 8
31598 }
31599
31600 #[inline(always)]
31601 fn inline_size(_context: fidl::encoding::Context) -> usize {
31602 16
31603 }
31604 }
31605
31606 unsafe impl<D: fidl::encoding::ResourceDialect>
31607 fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for &TestFlexibleXUnionInStruct
31608 {
31609 #[inline]
31610 unsafe fn encode(
31611 self,
31612 encoder: &mut fidl::encoding::Encoder<'_, D>,
31613 offset: usize,
31614 _depth: fidl::encoding::Depth,
31615 ) -> fidl::Result<()> {
31616 encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
31617 fidl::encoding::Encode::<TestFlexibleXUnionInStruct, D>::encode(
31619 (<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
31620 encoder,
31621 offset,
31622 _depth,
31623 )
31624 }
31625 }
31626 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SampleXUnion, D>>
31627 fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for (T0,)
31628 {
31629 #[inline]
31630 unsafe fn encode(
31631 self,
31632 encoder: &mut fidl::encoding::Encoder<'_, D>,
31633 offset: usize,
31634 depth: fidl::encoding::Depth,
31635 ) -> fidl::Result<()> {
31636 encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
31637 self.0.encode(encoder, offset + 0, depth)?;
31641 Ok(())
31642 }
31643 }
31644
31645 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31646 for TestFlexibleXUnionInStruct
31647 {
31648 #[inline(always)]
31649 fn new_empty() -> Self {
31650 Self { xu: fidl::new_empty!(SampleXUnion, D) }
31651 }
31652
31653 #[inline]
31654 unsafe fn decode(
31655 &mut self,
31656 decoder: &mut fidl::encoding::Decoder<'_, D>,
31657 offset: usize,
31658 _depth: fidl::encoding::Depth,
31659 ) -> fidl::Result<()> {
31660 decoder.debug_check_bounds::<Self>(offset);
31661 fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
31663 Ok(())
31664 }
31665 }
31666
31667 impl fidl::encoding::ValueTypeMarker for TestInlineXUnionInStruct {
31668 type Borrowed<'a> = &'a Self;
31669 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31670 value
31671 }
31672 }
31673
31674 unsafe impl fidl::encoding::TypeMarker for TestInlineXUnionInStruct {
31675 type Owned = Self;
31676
31677 #[inline(always)]
31678 fn inline_align(_context: fidl::encoding::Context) -> usize {
31679 8
31680 }
31681
31682 #[inline(always)]
31683 fn inline_size(_context: fidl::encoding::Context) -> usize {
31684 48
31685 }
31686 }
31687
31688 unsafe impl<D: fidl::encoding::ResourceDialect>
31689 fidl::encoding::Encode<TestInlineXUnionInStruct, D> for &TestInlineXUnionInStruct
31690 {
31691 #[inline]
31692 unsafe fn encode(
31693 self,
31694 encoder: &mut fidl::encoding::Encoder<'_, D>,
31695 offset: usize,
31696 _depth: fidl::encoding::Depth,
31697 ) -> fidl::Result<()> {
31698 encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
31699 fidl::encoding::Encode::<TestInlineXUnionInStruct, D>::encode(
31701 (
31702 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
31703 &self.before,
31704 ),
31705 <SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31706 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
31707 &self.after,
31708 ),
31709 ),
31710 encoder,
31711 offset,
31712 _depth,
31713 )
31714 }
31715 }
31716 unsafe impl<
31717 D: fidl::encoding::ResourceDialect,
31718 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
31719 T1: fidl::encoding::Encode<SampleXUnion, D>,
31720 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
31721 > fidl::encoding::Encode<TestInlineXUnionInStruct, D> for (T0, T1, T2)
31722 {
31723 #[inline]
31724 unsafe fn encode(
31725 self,
31726 encoder: &mut fidl::encoding::Encoder<'_, D>,
31727 offset: usize,
31728 depth: fidl::encoding::Depth,
31729 ) -> fidl::Result<()> {
31730 encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
31731 self.0.encode(encoder, offset + 0, depth)?;
31735 self.1.encode(encoder, offset + 16, depth)?;
31736 self.2.encode(encoder, offset + 32, depth)?;
31737 Ok(())
31738 }
31739 }
31740
31741 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31742 for TestInlineXUnionInStruct
31743 {
31744 #[inline(always)]
31745 fn new_empty() -> Self {
31746 Self {
31747 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
31748 xu: fidl::new_empty!(SampleXUnion, D),
31749 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
31750 }
31751 }
31752
31753 #[inline]
31754 unsafe fn decode(
31755 &mut self,
31756 decoder: &mut fidl::encoding::Decoder<'_, D>,
31757 offset: usize,
31758 _depth: fidl::encoding::Depth,
31759 ) -> fidl::Result<()> {
31760 decoder.debug_check_bounds::<Self>(offset);
31761 fidl::decode!(
31763 fidl::encoding::UnboundedString,
31764 D,
31765 &mut self.before,
31766 decoder,
31767 offset + 0,
31768 _depth
31769 )?;
31770 fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 16, _depth)?;
31771 fidl::decode!(
31772 fidl::encoding::UnboundedString,
31773 D,
31774 &mut self.after,
31775 decoder,
31776 offset + 32,
31777 _depth
31778 )?;
31779 Ok(())
31780 }
31781 }
31782
31783 impl fidl::encoding::ValueTypeMarker for TestOptionalFlexibleXUnionInStruct {
31784 type Borrowed<'a> = &'a Self;
31785 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31786 value
31787 }
31788 }
31789
31790 unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleXUnionInStruct {
31791 type Owned = Self;
31792
31793 #[inline(always)]
31794 fn inline_align(_context: fidl::encoding::Context) -> usize {
31795 8
31796 }
31797
31798 #[inline(always)]
31799 fn inline_size(_context: fidl::encoding::Context) -> usize {
31800 16
31801 }
31802 }
31803
31804 unsafe impl<D: fidl::encoding::ResourceDialect>
31805 fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D>
31806 for &TestOptionalFlexibleXUnionInStruct
31807 {
31808 #[inline]
31809 unsafe fn encode(
31810 self,
31811 encoder: &mut fidl::encoding::Encoder<'_, D>,
31812 offset: usize,
31813 _depth: fidl::encoding::Depth,
31814 ) -> fidl::Result<()> {
31815 encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
31816 fidl::encoding::Encode::<TestOptionalFlexibleXUnionInStruct, D>::encode(
31818 (
31819 <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31820 ),
31821 encoder, offset, _depth
31822 )
31823 }
31824 }
31825 unsafe impl<
31826 D: fidl::encoding::ResourceDialect,
31827 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
31828 > fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D> for (T0,)
31829 {
31830 #[inline]
31831 unsafe fn encode(
31832 self,
31833 encoder: &mut fidl::encoding::Encoder<'_, D>,
31834 offset: usize,
31835 depth: fidl::encoding::Depth,
31836 ) -> fidl::Result<()> {
31837 encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
31838 self.0.encode(encoder, offset + 0, depth)?;
31842 Ok(())
31843 }
31844 }
31845
31846 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31847 for TestOptionalFlexibleXUnionInStruct
31848 {
31849 #[inline(always)]
31850 fn new_empty() -> Self {
31851 Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D) }
31852 }
31853
31854 #[inline]
31855 unsafe fn decode(
31856 &mut self,
31857 decoder: &mut fidl::encoding::Decoder<'_, D>,
31858 offset: usize,
31859 _depth: fidl::encoding::Depth,
31860 ) -> fidl::Result<()> {
31861 decoder.debug_check_bounds::<Self>(offset);
31862 fidl::decode!(
31864 fidl::encoding::OptionalUnion<SampleXUnion>,
31865 D,
31866 &mut self.xu,
31867 decoder,
31868 offset + 0,
31869 _depth
31870 )?;
31871 Ok(())
31872 }
31873 }
31874
31875 impl fidl::encoding::ValueTypeMarker for TestOptionalStrictXUnionInStruct {
31876 type Borrowed<'a> = &'a Self;
31877 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31878 value
31879 }
31880 }
31881
31882 unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictXUnionInStruct {
31883 type Owned = Self;
31884
31885 #[inline(always)]
31886 fn inline_align(_context: fidl::encoding::Context) -> usize {
31887 8
31888 }
31889
31890 #[inline(always)]
31891 fn inline_size(_context: fidl::encoding::Context) -> usize {
31892 16
31893 }
31894 }
31895
31896 unsafe impl<D: fidl::encoding::ResourceDialect>
31897 fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D>
31898 for &TestOptionalStrictXUnionInStruct
31899 {
31900 #[inline]
31901 unsafe fn encode(
31902 self,
31903 encoder: &mut fidl::encoding::Encoder<'_, D>,
31904 offset: usize,
31905 _depth: fidl::encoding::Depth,
31906 ) -> fidl::Result<()> {
31907 encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
31908 fidl::encoding::Encode::<TestOptionalStrictXUnionInStruct, D>::encode(
31910 (
31911 <fidl::encoding::OptionalUnion<SampleStrictXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31912 ),
31913 encoder, offset, _depth
31914 )
31915 }
31916 }
31917 unsafe impl<
31918 D: fidl::encoding::ResourceDialect,
31919 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleStrictXUnion>, D>,
31920 > fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D> for (T0,)
31921 {
31922 #[inline]
31923 unsafe fn encode(
31924 self,
31925 encoder: &mut fidl::encoding::Encoder<'_, D>,
31926 offset: usize,
31927 depth: fidl::encoding::Depth,
31928 ) -> fidl::Result<()> {
31929 encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
31930 self.0.encode(encoder, offset + 0, depth)?;
31934 Ok(())
31935 }
31936 }
31937
31938 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31939 for TestOptionalStrictXUnionInStruct
31940 {
31941 #[inline(always)]
31942 fn new_empty() -> Self {
31943 Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleStrictXUnion>, D) }
31944 }
31945
31946 #[inline]
31947 unsafe fn decode(
31948 &mut self,
31949 decoder: &mut fidl::encoding::Decoder<'_, D>,
31950 offset: usize,
31951 _depth: fidl::encoding::Depth,
31952 ) -> fidl::Result<()> {
31953 decoder.debug_check_bounds::<Self>(offset);
31954 fidl::decode!(
31956 fidl::encoding::OptionalUnion<SampleStrictXUnion>,
31957 D,
31958 &mut self.xu,
31959 decoder,
31960 offset + 0,
31961 _depth
31962 )?;
31963 Ok(())
31964 }
31965 }
31966
31967 impl fidl::encoding::ValueTypeMarker for TestOptionalXUnionInStruct {
31968 type Borrowed<'a> = &'a Self;
31969 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31970 value
31971 }
31972 }
31973
31974 unsafe impl fidl::encoding::TypeMarker for TestOptionalXUnionInStruct {
31975 type Owned = Self;
31976
31977 #[inline(always)]
31978 fn inline_align(_context: fidl::encoding::Context) -> usize {
31979 8
31980 }
31981
31982 #[inline(always)]
31983 fn inline_size(_context: fidl::encoding::Context) -> usize {
31984 48
31985 }
31986 }
31987
31988 unsafe impl<D: fidl::encoding::ResourceDialect>
31989 fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for &TestOptionalXUnionInStruct
31990 {
31991 #[inline]
31992 unsafe fn encode(
31993 self,
31994 encoder: &mut fidl::encoding::Encoder<'_, D>,
31995 offset: usize,
31996 _depth: fidl::encoding::Depth,
31997 ) -> fidl::Result<()> {
31998 encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
31999 fidl::encoding::Encode::<TestOptionalXUnionInStruct, D>::encode(
32001 (
32002 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
32003 <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32004 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
32005 ),
32006 encoder, offset, _depth
32007 )
32008 }
32009 }
32010 unsafe impl<
32011 D: fidl::encoding::ResourceDialect,
32012 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32013 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
32014 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32015 > fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for (T0, T1, T2)
32016 {
32017 #[inline]
32018 unsafe fn encode(
32019 self,
32020 encoder: &mut fidl::encoding::Encoder<'_, D>,
32021 offset: usize,
32022 depth: fidl::encoding::Depth,
32023 ) -> fidl::Result<()> {
32024 encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
32025 self.0.encode(encoder, offset + 0, depth)?;
32029 self.1.encode(encoder, offset + 16, depth)?;
32030 self.2.encode(encoder, offset + 32, depth)?;
32031 Ok(())
32032 }
32033 }
32034
32035 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32036 for TestOptionalXUnionInStruct
32037 {
32038 #[inline(always)]
32039 fn new_empty() -> Self {
32040 Self {
32041 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32042 xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D),
32043 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32044 }
32045 }
32046
32047 #[inline]
32048 unsafe fn decode(
32049 &mut self,
32050 decoder: &mut fidl::encoding::Decoder<'_, D>,
32051 offset: usize,
32052 _depth: fidl::encoding::Depth,
32053 ) -> fidl::Result<()> {
32054 decoder.debug_check_bounds::<Self>(offset);
32055 fidl::decode!(
32057 fidl::encoding::UnboundedString,
32058 D,
32059 &mut self.before,
32060 decoder,
32061 offset + 0,
32062 _depth
32063 )?;
32064 fidl::decode!(
32065 fidl::encoding::OptionalUnion<SampleXUnion>,
32066 D,
32067 &mut self.xu,
32068 decoder,
32069 offset + 16,
32070 _depth
32071 )?;
32072 fidl::decode!(
32073 fidl::encoding::UnboundedString,
32074 D,
32075 &mut self.after,
32076 decoder,
32077 offset + 32,
32078 _depth
32079 )?;
32080 Ok(())
32081 }
32082 }
32083
32084 impl fidl::encoding::ValueTypeMarker for TestStrictXUnionInStruct {
32085 type Borrowed<'a> = &'a Self;
32086 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32087 value
32088 }
32089 }
32090
32091 unsafe impl fidl::encoding::TypeMarker for TestStrictXUnionInStruct {
32092 type Owned = Self;
32093
32094 #[inline(always)]
32095 fn inline_align(_context: fidl::encoding::Context) -> usize {
32096 8
32097 }
32098
32099 #[inline(always)]
32100 fn inline_size(_context: fidl::encoding::Context) -> usize {
32101 16
32102 }
32103 }
32104
32105 unsafe impl<D: fidl::encoding::ResourceDialect>
32106 fidl::encoding::Encode<TestStrictXUnionInStruct, D> for &TestStrictXUnionInStruct
32107 {
32108 #[inline]
32109 unsafe fn encode(
32110 self,
32111 encoder: &mut fidl::encoding::Encoder<'_, D>,
32112 offset: usize,
32113 _depth: fidl::encoding::Depth,
32114 ) -> fidl::Result<()> {
32115 encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32116 fidl::encoding::Encode::<TestStrictXUnionInStruct, D>::encode(
32118 (<SampleStrictXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
32119 encoder,
32120 offset,
32121 _depth,
32122 )
32123 }
32124 }
32125 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SampleStrictXUnion, D>>
32126 fidl::encoding::Encode<TestStrictXUnionInStruct, D> for (T0,)
32127 {
32128 #[inline]
32129 unsafe fn encode(
32130 self,
32131 encoder: &mut fidl::encoding::Encoder<'_, D>,
32132 offset: usize,
32133 depth: fidl::encoding::Depth,
32134 ) -> fidl::Result<()> {
32135 encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32136 self.0.encode(encoder, offset + 0, depth)?;
32140 Ok(())
32141 }
32142 }
32143
32144 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32145 for TestStrictXUnionInStruct
32146 {
32147 #[inline(always)]
32148 fn new_empty() -> Self {
32149 Self { xu: fidl::new_empty!(SampleStrictXUnion, D) }
32150 }
32151
32152 #[inline]
32153 unsafe fn decode(
32154 &mut self,
32155 decoder: &mut fidl::encoding::Decoder<'_, D>,
32156 offset: usize,
32157 _depth: fidl::encoding::Depth,
32158 ) -> fidl::Result<()> {
32159 decoder.debug_check_bounds::<Self>(offset);
32160 fidl::decode!(SampleStrictXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
32162 Ok(())
32163 }
32164 }
32165
32166 impl fidl::encoding::ValueTypeMarker for TestXUnionInTable {
32167 type Borrowed<'a> = &'a Self;
32168 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32169 value
32170 }
32171 }
32172
32173 unsafe impl fidl::encoding::TypeMarker for TestXUnionInTable {
32174 type Owned = Self;
32175
32176 #[inline(always)]
32177 fn inline_align(_context: fidl::encoding::Context) -> usize {
32178 8
32179 }
32180
32181 #[inline(always)]
32182 fn inline_size(_context: fidl::encoding::Context) -> usize {
32183 16
32184 }
32185 }
32186
32187 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestXUnionInTable, D>
32188 for &TestXUnionInTable
32189 {
32190 #[inline]
32191 unsafe fn encode(
32192 self,
32193 encoder: &mut fidl::encoding::Encoder<'_, D>,
32194 offset: usize,
32195 _depth: fidl::encoding::Depth,
32196 ) -> fidl::Result<()> {
32197 encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32198 fidl::encoding::Encode::<TestXUnionInTable, D>::encode(
32200 (<XUnionInTable as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
32201 encoder,
32202 offset,
32203 _depth,
32204 )
32205 }
32206 }
32207 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionInTable, D>>
32208 fidl::encoding::Encode<TestXUnionInTable, D> for (T0,)
32209 {
32210 #[inline]
32211 unsafe fn encode(
32212 self,
32213 encoder: &mut fidl::encoding::Encoder<'_, D>,
32214 offset: usize,
32215 depth: fidl::encoding::Depth,
32216 ) -> fidl::Result<()> {
32217 encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32218 self.0.encode(encoder, offset + 0, depth)?;
32222 Ok(())
32223 }
32224 }
32225
32226 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestXUnionInTable {
32227 #[inline(always)]
32228 fn new_empty() -> Self {
32229 Self { value: fidl::new_empty!(XUnionInTable, D) }
32230 }
32231
32232 #[inline]
32233 unsafe fn decode(
32234 &mut self,
32235 decoder: &mut fidl::encoding::Decoder<'_, D>,
32236 offset: usize,
32237 _depth: fidl::encoding::Depth,
32238 ) -> fidl::Result<()> {
32239 decoder.debug_check_bounds::<Self>(offset);
32240 fidl::decode!(XUnionInTable, D, &mut self.value, decoder, offset + 0, _depth)?;
32242 Ok(())
32243 }
32244 }
32245
32246 impl fidl::encoding::ValueTypeMarker for ThreeByte {
32247 type Borrowed<'a> = &'a Self;
32248 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32249 value
32250 }
32251 }
32252
32253 unsafe impl fidl::encoding::TypeMarker for ThreeByte {
32254 type Owned = Self;
32255
32256 #[inline(always)]
32257 fn inline_align(_context: fidl::encoding::Context) -> usize {
32258 1
32259 }
32260
32261 #[inline(always)]
32262 fn inline_size(_context: fidl::encoding::Context) -> usize {
32263 3
32264 }
32265 #[inline(always)]
32266 fn encode_is_copy() -> bool {
32267 true
32268 }
32269
32270 #[inline(always)]
32271 fn decode_is_copy() -> bool {
32272 true
32273 }
32274 }
32275
32276 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByte, D>
32277 for &ThreeByte
32278 {
32279 #[inline]
32280 unsafe fn encode(
32281 self,
32282 encoder: &mut fidl::encoding::Encoder<'_, D>,
32283 offset: usize,
32284 _depth: fidl::encoding::Depth,
32285 ) -> fidl::Result<()> {
32286 encoder.debug_check_bounds::<ThreeByte>(offset);
32287 unsafe {
32288 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32290 (buf_ptr as *mut ThreeByte).write_unaligned((self as *const ThreeByte).read());
32291 }
32294 Ok(())
32295 }
32296 }
32297 unsafe impl<
32298 D: fidl::encoding::ResourceDialect,
32299 T0: fidl::encoding::Encode<u8, D>,
32300 T1: fidl::encoding::Encode<u8, D>,
32301 T2: fidl::encoding::Encode<u8, D>,
32302 > fidl::encoding::Encode<ThreeByte, D> for (T0, T1, T2)
32303 {
32304 #[inline]
32305 unsafe fn encode(
32306 self,
32307 encoder: &mut fidl::encoding::Encoder<'_, D>,
32308 offset: usize,
32309 depth: fidl::encoding::Depth,
32310 ) -> fidl::Result<()> {
32311 encoder.debug_check_bounds::<ThreeByte>(offset);
32312 self.0.encode(encoder, offset + 0, depth)?;
32316 self.1.encode(encoder, offset + 1, depth)?;
32317 self.2.encode(encoder, offset + 2, depth)?;
32318 Ok(())
32319 }
32320 }
32321
32322 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByte {
32323 #[inline(always)]
32324 fn new_empty() -> Self {
32325 Self {
32326 elem1: fidl::new_empty!(u8, D),
32327 elem2: fidl::new_empty!(u8, D),
32328 elem3: fidl::new_empty!(u8, D),
32329 }
32330 }
32331
32332 #[inline]
32333 unsafe fn decode(
32334 &mut self,
32335 decoder: &mut fidl::encoding::Decoder<'_, D>,
32336 offset: usize,
32337 _depth: fidl::encoding::Depth,
32338 ) -> fidl::Result<()> {
32339 decoder.debug_check_bounds::<Self>(offset);
32340 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32341 unsafe {
32344 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
32345 }
32346 Ok(())
32347 }
32348 }
32349
32350 impl fidl::encoding::ValueTypeMarker for ThreeByteInArray {
32351 type Borrowed<'a> = &'a Self;
32352 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32353 value
32354 }
32355 }
32356
32357 unsafe impl fidl::encoding::TypeMarker for ThreeByteInArray {
32358 type Owned = Self;
32359
32360 #[inline(always)]
32361 fn inline_align(_context: fidl::encoding::Context) -> usize {
32362 1
32363 }
32364
32365 #[inline(always)]
32366 fn inline_size(_context: fidl::encoding::Context) -> usize {
32367 9
32368 }
32369 #[inline(always)]
32370 fn encode_is_copy() -> bool {
32371 true
32372 }
32373
32374 #[inline(always)]
32375 fn decode_is_copy() -> bool {
32376 true
32377 }
32378 }
32379
32380 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInArray, D>
32381 for &ThreeByteInArray
32382 {
32383 #[inline]
32384 unsafe fn encode(
32385 self,
32386 encoder: &mut fidl::encoding::Encoder<'_, D>,
32387 offset: usize,
32388 _depth: fidl::encoding::Depth,
32389 ) -> fidl::Result<()> {
32390 encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32391 unsafe {
32392 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32394 (buf_ptr as *mut ThreeByteInArray)
32395 .write_unaligned((self as *const ThreeByteInArray).read());
32396 }
32399 Ok(())
32400 }
32401 }
32402 unsafe impl<
32403 D: fidl::encoding::ResourceDialect,
32404 T0: fidl::encoding::Encode<fidl::encoding::Array<ThreeByte, 3>, D>,
32405 > fidl::encoding::Encode<ThreeByteInArray, D> for (T0,)
32406 {
32407 #[inline]
32408 unsafe fn encode(
32409 self,
32410 encoder: &mut fidl::encoding::Encoder<'_, D>,
32411 offset: usize,
32412 depth: fidl::encoding::Depth,
32413 ) -> fidl::Result<()> {
32414 encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32415 self.0.encode(encoder, offset + 0, depth)?;
32419 Ok(())
32420 }
32421 }
32422
32423 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInArray {
32424 #[inline(always)]
32425 fn new_empty() -> Self {
32426 Self { elems: fidl::new_empty!(fidl::encoding::Array<ThreeByte, 3>, D) }
32427 }
32428
32429 #[inline]
32430 unsafe fn decode(
32431 &mut self,
32432 decoder: &mut fidl::encoding::Decoder<'_, D>,
32433 offset: usize,
32434 _depth: fidl::encoding::Depth,
32435 ) -> fidl::Result<()> {
32436 decoder.debug_check_bounds::<Self>(offset);
32437 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32438 unsafe {
32441 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
32442 }
32443 Ok(())
32444 }
32445 }
32446
32447 impl fidl::encoding::ValueTypeMarker for ThreeByteInStruct {
32448 type Borrowed<'a> = &'a Self;
32449 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32450 value
32451 }
32452 }
32453
32454 unsafe impl fidl::encoding::TypeMarker for ThreeByteInStruct {
32455 type Owned = Self;
32456
32457 #[inline(always)]
32458 fn inline_align(_context: fidl::encoding::Context) -> usize {
32459 1
32460 }
32461
32462 #[inline(always)]
32463 fn inline_size(_context: fidl::encoding::Context) -> usize {
32464 9
32465 }
32466 #[inline(always)]
32467 fn encode_is_copy() -> bool {
32468 true
32469 }
32470
32471 #[inline(always)]
32472 fn decode_is_copy() -> bool {
32473 true
32474 }
32475 }
32476
32477 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInStruct, D>
32478 for &ThreeByteInStruct
32479 {
32480 #[inline]
32481 unsafe fn encode(
32482 self,
32483 encoder: &mut fidl::encoding::Encoder<'_, D>,
32484 offset: usize,
32485 _depth: fidl::encoding::Depth,
32486 ) -> fidl::Result<()> {
32487 encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
32488 unsafe {
32489 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32491 (buf_ptr as *mut ThreeByteInStruct)
32492 .write_unaligned((self as *const ThreeByteInStruct).read());
32493 }
32496 Ok(())
32497 }
32498 }
32499 unsafe impl<
32500 D: fidl::encoding::ResourceDialect,
32501 T0: fidl::encoding::Encode<ThreeByte, D>,
32502 T1: fidl::encoding::Encode<ThreeByte, D>,
32503 T2: fidl::encoding::Encode<ThreeByte, D>,
32504 > fidl::encoding::Encode<ThreeByteInStruct, D> for (T0, T1, T2)
32505 {
32506 #[inline]
32507 unsafe fn encode(
32508 self,
32509 encoder: &mut fidl::encoding::Encoder<'_, D>,
32510 offset: usize,
32511 depth: fidl::encoding::Depth,
32512 ) -> fidl::Result<()> {
32513 encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
32514 self.0.encode(encoder, offset + 0, depth)?;
32518 self.1.encode(encoder, offset + 3, depth)?;
32519 self.2.encode(encoder, offset + 6, depth)?;
32520 Ok(())
32521 }
32522 }
32523
32524 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInStruct {
32525 #[inline(always)]
32526 fn new_empty() -> Self {
32527 Self {
32528 elem1: fidl::new_empty!(ThreeByte, D),
32529 elem2: fidl::new_empty!(ThreeByte, D),
32530 elem3: fidl::new_empty!(ThreeByte, D),
32531 }
32532 }
32533
32534 #[inline]
32535 unsafe fn decode(
32536 &mut self,
32537 decoder: &mut fidl::encoding::Decoder<'_, D>,
32538 offset: usize,
32539 _depth: fidl::encoding::Depth,
32540 ) -> fidl::Result<()> {
32541 decoder.debug_check_bounds::<Self>(offset);
32542 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32543 unsafe {
32546 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
32547 }
32548 Ok(())
32549 }
32550 }
32551
32552 impl fidl::encoding::ValueTypeMarker for ThreeByteInVector {
32553 type Borrowed<'a> = &'a Self;
32554 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32555 value
32556 }
32557 }
32558
32559 unsafe impl fidl::encoding::TypeMarker for ThreeByteInVector {
32560 type Owned = Self;
32561
32562 #[inline(always)]
32563 fn inline_align(_context: fidl::encoding::Context) -> usize {
32564 8
32565 }
32566
32567 #[inline(always)]
32568 fn inline_size(_context: fidl::encoding::Context) -> usize {
32569 16
32570 }
32571 }
32572
32573 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInVector, D>
32574 for &ThreeByteInVector
32575 {
32576 #[inline]
32577 unsafe fn encode(
32578 self,
32579 encoder: &mut fidl::encoding::Encoder<'_, D>,
32580 offset: usize,
32581 _depth: fidl::encoding::Depth,
32582 ) -> fidl::Result<()> {
32583 encoder.debug_check_bounds::<ThreeByteInVector>(offset);
32584 fidl::encoding::Encode::<ThreeByteInVector, D>::encode(
32586 (
32587 <fidl::encoding::UnboundedVector<ThreeByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
32588 ),
32589 encoder, offset, _depth
32590 )
32591 }
32592 }
32593 unsafe impl<
32594 D: fidl::encoding::ResourceDialect,
32595 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ThreeByte>, D>,
32596 > fidl::encoding::Encode<ThreeByteInVector, D> for (T0,)
32597 {
32598 #[inline]
32599 unsafe fn encode(
32600 self,
32601 encoder: &mut fidl::encoding::Encoder<'_, D>,
32602 offset: usize,
32603 depth: fidl::encoding::Depth,
32604 ) -> fidl::Result<()> {
32605 encoder.debug_check_bounds::<ThreeByteInVector>(offset);
32606 self.0.encode(encoder, offset + 0, depth)?;
32610 Ok(())
32611 }
32612 }
32613
32614 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInVector {
32615 #[inline(always)]
32616 fn new_empty() -> Self {
32617 Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<ThreeByte>, D) }
32618 }
32619
32620 #[inline]
32621 unsafe fn decode(
32622 &mut self,
32623 decoder: &mut fidl::encoding::Decoder<'_, D>,
32624 offset: usize,
32625 _depth: fidl::encoding::Depth,
32626 ) -> fidl::Result<()> {
32627 decoder.debug_check_bounds::<Self>(offset);
32628 fidl::decode!(
32630 fidl::encoding::UnboundedVector<ThreeByte>,
32631 D,
32632 &mut self.elems,
32633 decoder,
32634 offset + 0,
32635 _depth
32636 )?;
32637 Ok(())
32638 }
32639 }
32640
32641 impl fidl::encoding::ValueTypeMarker for TransactionHeader {
32642 type Borrowed<'a> = &'a Self;
32643 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32644 value
32645 }
32646 }
32647
32648 unsafe impl fidl::encoding::TypeMarker for TransactionHeader {
32649 type Owned = Self;
32650
32651 #[inline(always)]
32652 fn inline_align(_context: fidl::encoding::Context) -> usize {
32653 8
32654 }
32655
32656 #[inline(always)]
32657 fn inline_size(_context: fidl::encoding::Context) -> usize {
32658 16
32659 }
32660 #[inline(always)]
32661 fn encode_is_copy() -> bool {
32662 true
32663 }
32664
32665 #[inline(always)]
32666 fn decode_is_copy() -> bool {
32667 true
32668 }
32669 }
32670
32671 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TransactionHeader, D>
32672 for &TransactionHeader
32673 {
32674 #[inline]
32675 unsafe fn encode(
32676 self,
32677 encoder: &mut fidl::encoding::Encoder<'_, D>,
32678 offset: usize,
32679 _depth: fidl::encoding::Depth,
32680 ) -> fidl::Result<()> {
32681 encoder.debug_check_bounds::<TransactionHeader>(offset);
32682 unsafe {
32683 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32685 (buf_ptr as *mut TransactionHeader)
32686 .write_unaligned((self as *const TransactionHeader).read());
32687 }
32690 Ok(())
32691 }
32692 }
32693 unsafe impl<
32694 D: fidl::encoding::ResourceDialect,
32695 T0: fidl::encoding::Encode<u32, D>,
32696 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
32697 T2: fidl::encoding::Encode<u8, D>,
32698 T3: fidl::encoding::Encode<u64, D>,
32699 > fidl::encoding::Encode<TransactionHeader, D> for (T0, T1, T2, T3)
32700 {
32701 #[inline]
32702 unsafe fn encode(
32703 self,
32704 encoder: &mut fidl::encoding::Encoder<'_, D>,
32705 offset: usize,
32706 depth: fidl::encoding::Depth,
32707 ) -> fidl::Result<()> {
32708 encoder.debug_check_bounds::<TransactionHeader>(offset);
32709 self.0.encode(encoder, offset + 0, depth)?;
32713 self.1.encode(encoder, offset + 4, depth)?;
32714 self.2.encode(encoder, offset + 7, depth)?;
32715 self.3.encode(encoder, offset + 8, depth)?;
32716 Ok(())
32717 }
32718 }
32719
32720 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TransactionHeader {
32721 #[inline(always)]
32722 fn new_empty() -> Self {
32723 Self {
32724 tx_id: fidl::new_empty!(u32, D),
32725 flags: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
32726 magic_number: fidl::new_empty!(u8, D),
32727 ordinal: fidl::new_empty!(u64, D),
32728 }
32729 }
32730
32731 #[inline]
32732 unsafe fn decode(
32733 &mut self,
32734 decoder: &mut fidl::encoding::Decoder<'_, D>,
32735 offset: usize,
32736 _depth: fidl::encoding::Depth,
32737 ) -> fidl::Result<()> {
32738 decoder.debug_check_bounds::<Self>(offset);
32739 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32740 unsafe {
32743 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
32744 }
32745 Ok(())
32746 }
32747 }
32748
32749 impl fidl::encoding::ValueTypeMarker for TransformerEmptyStruct {
32750 type Borrowed<'a> = &'a Self;
32751 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32752 value
32753 }
32754 }
32755
32756 unsafe impl fidl::encoding::TypeMarker for TransformerEmptyStruct {
32757 type Owned = Self;
32758
32759 #[inline(always)]
32760 fn inline_align(_context: fidl::encoding::Context) -> usize {
32761 1
32762 }
32763
32764 #[inline(always)]
32765 fn inline_size(_context: fidl::encoding::Context) -> usize {
32766 1
32767 }
32768 }
32769
32770 unsafe impl<D: fidl::encoding::ResourceDialect>
32771 fidl::encoding::Encode<TransformerEmptyStruct, D> for &TransformerEmptyStruct
32772 {
32773 #[inline]
32774 unsafe fn encode(
32775 self,
32776 encoder: &mut fidl::encoding::Encoder<'_, D>,
32777 offset: usize,
32778 _depth: fidl::encoding::Depth,
32779 ) -> fidl::Result<()> {
32780 encoder.debug_check_bounds::<TransformerEmptyStruct>(offset);
32781 encoder.write_num(0u8, offset);
32782 Ok(())
32783 }
32784 }
32785
32786 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32787 for TransformerEmptyStruct
32788 {
32789 #[inline(always)]
32790 fn new_empty() -> Self {
32791 Self
32792 }
32793
32794 #[inline]
32795 unsafe fn decode(
32796 &mut self,
32797 decoder: &mut fidl::encoding::Decoder<'_, D>,
32798 offset: usize,
32799 _depth: fidl::encoding::Depth,
32800 ) -> fidl::Result<()> {
32801 decoder.debug_check_bounds::<Self>(offset);
32802 match decoder.read_num::<u8>(offset) {
32803 0 => Ok(()),
32804 _ => Err(fidl::Error::Invalid),
32805 }
32806 }
32807 }
32808
32809 impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStruct {
32810 type Borrowed<'a> = &'a Self;
32811 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32812 value
32813 }
32814 }
32815
32816 unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStruct {
32817 type Owned = Self;
32818
32819 #[inline(always)]
32820 fn inline_align(_context: fidl::encoding::Context) -> usize {
32821 1
32822 }
32823
32824 #[inline(always)]
32825 fn inline_size(_context: fidl::encoding::Context) -> usize {
32826 2
32827 }
32828 }
32829
32830 unsafe impl<D: fidl::encoding::ResourceDialect>
32831 fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for &TwoEmptyStructsInStruct
32832 {
32833 #[inline]
32834 unsafe fn encode(
32835 self,
32836 encoder: &mut fidl::encoding::Encoder<'_, D>,
32837 offset: usize,
32838 _depth: fidl::encoding::Depth,
32839 ) -> fidl::Result<()> {
32840 encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
32841 fidl::encoding::Encode::<TwoEmptyStructsInStruct, D>::encode(
32843 (
32844 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
32845 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
32846 ),
32847 encoder,
32848 offset,
32849 _depth,
32850 )
32851 }
32852 }
32853 unsafe impl<
32854 D: fidl::encoding::ResourceDialect,
32855 T0: fidl::encoding::Encode<EmptyStruct, D>,
32856 T1: fidl::encoding::Encode<EmptyStruct, D>,
32857 > fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for (T0, T1)
32858 {
32859 #[inline]
32860 unsafe fn encode(
32861 self,
32862 encoder: &mut fidl::encoding::Encoder<'_, D>,
32863 offset: usize,
32864 depth: fidl::encoding::Depth,
32865 ) -> fidl::Result<()> {
32866 encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
32867 self.0.encode(encoder, offset + 0, depth)?;
32871 self.1.encode(encoder, offset + 1, depth)?;
32872 Ok(())
32873 }
32874 }
32875
32876 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32877 for TwoEmptyStructsInStruct
32878 {
32879 #[inline(always)]
32880 fn new_empty() -> Self {
32881 Self { a: fidl::new_empty!(EmptyStruct, D), b: fidl::new_empty!(EmptyStruct, D) }
32882 }
32883
32884 #[inline]
32885 unsafe fn decode(
32886 &mut self,
32887 decoder: &mut fidl::encoding::Decoder<'_, D>,
32888 offset: usize,
32889 _depth: fidl::encoding::Depth,
32890 ) -> fidl::Result<()> {
32891 decoder.debug_check_bounds::<Self>(offset);
32892 fidl::decode!(EmptyStruct, D, &mut self.a, decoder, offset + 0, _depth)?;
32894 fidl::decode!(EmptyStruct, D, &mut self.b, decoder, offset + 1, _depth)?;
32895 Ok(())
32896 }
32897 }
32898
32899 impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStructInVectorInStruct {
32900 type Borrowed<'a> = &'a Self;
32901 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32902 value
32903 }
32904 }
32905
32906 unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStructInVectorInStruct {
32907 type Owned = Self;
32908
32909 #[inline(always)]
32910 fn inline_align(_context: fidl::encoding::Context) -> usize {
32911 8
32912 }
32913
32914 #[inline(always)]
32915 fn inline_size(_context: fidl::encoding::Context) -> usize {
32916 16
32917 }
32918 }
32919
32920 unsafe impl<D: fidl::encoding::ResourceDialect>
32921 fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D>
32922 for &TwoEmptyStructsInStructInVectorInStruct
32923 {
32924 #[inline]
32925 unsafe fn encode(
32926 self,
32927 encoder: &mut fidl::encoding::Encoder<'_, D>,
32928 offset: usize,
32929 _depth: fidl::encoding::Depth,
32930 ) -> fidl::Result<()> {
32931 encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
32932 fidl::encoding::Encode::<TwoEmptyStructsInStructInVectorInStruct, D>::encode(
32934 (
32935 <fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
32936 ),
32937 encoder, offset, _depth
32938 )
32939 }
32940 }
32941 unsafe impl<
32942 D: fidl::encoding::ResourceDialect,
32943 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D>,
32944 > fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D> for (T0,)
32945 {
32946 #[inline]
32947 unsafe fn encode(
32948 self,
32949 encoder: &mut fidl::encoding::Encoder<'_, D>,
32950 offset: usize,
32951 depth: fidl::encoding::Depth,
32952 ) -> fidl::Result<()> {
32953 encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
32954 self.0.encode(encoder, offset + 0, depth)?;
32958 Ok(())
32959 }
32960 }
32961
32962 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32963 for TwoEmptyStructsInStructInVectorInStruct
32964 {
32965 #[inline(always)]
32966 fn new_empty() -> Self {
32967 Self {
32968 v: fidl::new_empty!(fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D),
32969 }
32970 }
32971
32972 #[inline]
32973 unsafe fn decode(
32974 &mut self,
32975 decoder: &mut fidl::encoding::Decoder<'_, D>,
32976 offset: usize,
32977 _depth: fidl::encoding::Depth,
32978 ) -> fidl::Result<()> {
32979 decoder.debug_check_bounds::<Self>(offset);
32980 fidl::decode!(
32982 fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>,
32983 D,
32984 &mut self.v,
32985 decoder,
32986 offset + 0,
32987 _depth
32988 )?;
32989 Ok(())
32990 }
32991 }
32992
32993 impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerBool {
32994 type Borrowed<'a> = &'a Self;
32995 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32996 value
32997 }
32998 }
32999
33000 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerBool {
33001 type Owned = Self;
33002
33003 #[inline(always)]
33004 fn inline_align(_context: fidl::encoding::Context) -> usize {
33005 8
33006 }
33007
33008 #[inline(always)]
33009 fn inline_size(_context: fidl::encoding::Context) -> usize {
33010 16
33011 }
33012 }
33013
33014 unsafe impl<D: fidl::encoding::ResourceDialect>
33015 fidl::encoding::Encode<TwoLayerStructInnerBool, D> for &TwoLayerStructInnerBool
33016 {
33017 #[inline]
33018 unsafe fn encode(
33019 self,
33020 encoder: &mut fidl::encoding::Encoder<'_, D>,
33021 offset: usize,
33022 _depth: fidl::encoding::Depth,
33023 ) -> fidl::Result<()> {
33024 encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33025 fidl::encoding::Encode::<TwoLayerStructInnerBool, D>::encode(
33027 (
33028 <OneLayerStructWithBool as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
33029 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
33030 ),
33031 encoder,
33032 offset,
33033 _depth,
33034 )
33035 }
33036 }
33037 unsafe impl<
33038 D: fidl::encoding::ResourceDialect,
33039 T0: fidl::encoding::Encode<OneLayerStructWithBool, D>,
33040 T1: fidl::encoding::Encode<u64, D>,
33041 > fidl::encoding::Encode<TwoLayerStructInnerBool, D> for (T0, T1)
33042 {
33043 #[inline]
33044 unsafe fn encode(
33045 self,
33046 encoder: &mut fidl::encoding::Encoder<'_, D>,
33047 offset: usize,
33048 depth: fidl::encoding::Depth,
33049 ) -> fidl::Result<()> {
33050 encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33051 self.0.encode(encoder, offset + 0, depth)?;
33055 self.1.encode(encoder, offset + 8, depth)?;
33056 Ok(())
33057 }
33058 }
33059
33060 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33061 for TwoLayerStructInnerBool
33062 {
33063 #[inline(always)]
33064 fn new_empty() -> Self {
33065 Self { s: fidl::new_empty!(OneLayerStructWithBool, D), a: fidl::new_empty!(u64, D) }
33066 }
33067
33068 #[inline]
33069 unsafe fn decode(
33070 &mut self,
33071 decoder: &mut fidl::encoding::Decoder<'_, D>,
33072 offset: usize,
33073 _depth: fidl::encoding::Depth,
33074 ) -> fidl::Result<()> {
33075 decoder.debug_check_bounds::<Self>(offset);
33076 fidl::decode!(OneLayerStructWithBool, D, &mut self.s, decoder, offset + 0, _depth)?;
33078 fidl::decode!(u64, D, &mut self.a, decoder, offset + 8, _depth)?;
33079 Ok(())
33080 }
33081 }
33082
33083 impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign4 {
33084 type Borrowed<'a> = &'a Self;
33085 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33086 value
33087 }
33088 }
33089
33090 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign4 {
33091 type Owned = Self;
33092
33093 #[inline(always)]
33094 fn inline_align(_context: fidl::encoding::Context) -> usize {
33095 4
33096 }
33097
33098 #[inline(always)]
33099 fn inline_size(_context: fidl::encoding::Context) -> usize {
33100 12
33101 }
33102 }
33103
33104 unsafe impl<D: fidl::encoding::ResourceDialect>
33105 fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D>
33106 for &TwoLayerStructInnerPaddingAlign4
33107 {
33108 #[inline]
33109 unsafe fn encode(
33110 self,
33111 encoder: &mut fidl::encoding::Encoder<'_, D>,
33112 offset: usize,
33113 _depth: fidl::encoding::Depth,
33114 ) -> fidl::Result<()> {
33115 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33116 unsafe {
33117 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33119 (buf_ptr as *mut TwoLayerStructInnerPaddingAlign4)
33120 .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign4).read());
33121 let padding_ptr = buf_ptr.offset(0) as *mut u32;
33124 let padding_mask = 0xff000000u32;
33125 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33126 }
33127 Ok(())
33128 }
33129 }
33130 unsafe impl<
33131 D: fidl::encoding::ResourceDialect,
33132 T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>,
33133 T1: fidl::encoding::Encode<u32, D>,
33134 > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D> for (T0, T1)
33135 {
33136 #[inline]
33137 unsafe fn encode(
33138 self,
33139 encoder: &mut fidl::encoding::Encoder<'_, D>,
33140 offset: usize,
33141 depth: fidl::encoding::Depth,
33142 ) -> fidl::Result<()> {
33143 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33144 self.0.encode(encoder, offset + 0, depth)?;
33148 self.1.encode(encoder, offset + 8, depth)?;
33149 Ok(())
33150 }
33151 }
33152
33153 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33154 for TwoLayerStructInnerPaddingAlign4
33155 {
33156 #[inline(always)]
33157 fn new_empty() -> Self {
33158 Self {
33159 s: fidl::new_empty!(OneLayerStructWithPaddingAlign4, D),
33160 a: fidl::new_empty!(u32, D),
33161 }
33162 }
33163
33164 #[inline]
33165 unsafe fn decode(
33166 &mut self,
33167 decoder: &mut fidl::encoding::Decoder<'_, D>,
33168 offset: usize,
33169 _depth: fidl::encoding::Depth,
33170 ) -> fidl::Result<()> {
33171 decoder.debug_check_bounds::<Self>(offset);
33172 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33173 let ptr = unsafe { buf_ptr.offset(0) };
33175 let padval = unsafe { (ptr as *const u32).read_unaligned() };
33176 let mask = 0xff000000u32;
33177 let maskedval = padval & mask;
33178 if maskedval != 0 {
33179 return Err(fidl::Error::NonZeroPadding {
33180 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33181 });
33182 }
33183 unsafe {
33185 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33186 }
33187 Ok(())
33188 }
33189 }
33190
33191 impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign8 {
33192 type Borrowed<'a> = &'a Self;
33193 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33194 value
33195 }
33196 }
33197
33198 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign8 {
33199 type Owned = Self;
33200
33201 #[inline(always)]
33202 fn inline_align(_context: fidl::encoding::Context) -> usize {
33203 8
33204 }
33205
33206 #[inline(always)]
33207 fn inline_size(_context: fidl::encoding::Context) -> usize {
33208 24
33209 }
33210 }
33211
33212 unsafe impl<D: fidl::encoding::ResourceDialect>
33213 fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D>
33214 for &TwoLayerStructInnerPaddingAlign8
33215 {
33216 #[inline]
33217 unsafe fn encode(
33218 self,
33219 encoder: &mut fidl::encoding::Encoder<'_, D>,
33220 offset: usize,
33221 _depth: fidl::encoding::Depth,
33222 ) -> fidl::Result<()> {
33223 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33224 unsafe {
33225 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33227 (buf_ptr as *mut TwoLayerStructInnerPaddingAlign8)
33228 .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign8).read());
33229 let padding_ptr = buf_ptr.offset(0) as *mut u64;
33232 let padding_mask = 0xffff000000000000u64;
33233 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33234 }
33235 Ok(())
33236 }
33237 }
33238 unsafe impl<
33239 D: fidl::encoding::ResourceDialect,
33240 T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>,
33241 T1: fidl::encoding::Encode<u64, D>,
33242 > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D> for (T0, T1)
33243 {
33244 #[inline]
33245 unsafe fn encode(
33246 self,
33247 encoder: &mut fidl::encoding::Encoder<'_, D>,
33248 offset: usize,
33249 depth: fidl::encoding::Depth,
33250 ) -> fidl::Result<()> {
33251 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33252 self.0.encode(encoder, offset + 0, depth)?;
33256 self.1.encode(encoder, offset + 16, depth)?;
33257 Ok(())
33258 }
33259 }
33260
33261 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33262 for TwoLayerStructInnerPaddingAlign8
33263 {
33264 #[inline(always)]
33265 fn new_empty() -> Self {
33266 Self {
33267 s: fidl::new_empty!(OneLayerStructWithPaddingAlign8, D),
33268 a: fidl::new_empty!(u64, D),
33269 }
33270 }
33271
33272 #[inline]
33273 unsafe fn decode(
33274 &mut self,
33275 decoder: &mut fidl::encoding::Decoder<'_, D>,
33276 offset: usize,
33277 _depth: fidl::encoding::Depth,
33278 ) -> fidl::Result<()> {
33279 decoder.debug_check_bounds::<Self>(offset);
33280 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33281 let ptr = unsafe { buf_ptr.offset(0) };
33283 let padval = unsafe { (ptr as *const u64).read_unaligned() };
33284 let mask = 0xffff000000000000u64;
33285 let maskedval = padval & mask;
33286 if maskedval != 0 {
33287 return Err(fidl::Error::NonZeroPadding {
33288 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33289 });
33290 }
33291 unsafe {
33293 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
33294 }
33295 Ok(())
33296 }
33297 }
33298
33299 impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign4 {
33300 type Borrowed<'a> = &'a Self;
33301 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33302 value
33303 }
33304 }
33305
33306 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign4 {
33307 type Owned = Self;
33308
33309 #[inline(always)]
33310 fn inline_align(_context: fidl::encoding::Context) -> usize {
33311 4
33312 }
33313
33314 #[inline(always)]
33315 fn inline_size(_context: fidl::encoding::Context) -> usize {
33316 12
33317 }
33318 #[inline(always)]
33319 fn encode_is_copy() -> bool {
33320 true
33321 }
33322
33323 #[inline(always)]
33324 fn decode_is_copy() -> bool {
33325 true
33326 }
33327 }
33328
33329 unsafe impl<D: fidl::encoding::ResourceDialect>
33330 fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D>
33331 for &TwoLayerStructNoPaddingAlign4
33332 {
33333 #[inline]
33334 unsafe fn encode(
33335 self,
33336 encoder: &mut fidl::encoding::Encoder<'_, D>,
33337 offset: usize,
33338 _depth: fidl::encoding::Depth,
33339 ) -> fidl::Result<()> {
33340 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33341 unsafe {
33342 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33344 (buf_ptr as *mut TwoLayerStructNoPaddingAlign4)
33345 .write_unaligned((self as *const TwoLayerStructNoPaddingAlign4).read());
33346 }
33349 Ok(())
33350 }
33351 }
33352 unsafe impl<
33353 D: fidl::encoding::ResourceDialect,
33354 T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>,
33355 T1: fidl::encoding::Encode<u32, D>,
33356 > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D> for (T0, T1)
33357 {
33358 #[inline]
33359 unsafe fn encode(
33360 self,
33361 encoder: &mut fidl::encoding::Encoder<'_, D>,
33362 offset: usize,
33363 depth: fidl::encoding::Depth,
33364 ) -> fidl::Result<()> {
33365 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33366 self.0.encode(encoder, offset + 0, depth)?;
33370 self.1.encode(encoder, offset + 8, depth)?;
33371 Ok(())
33372 }
33373 }
33374
33375 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33376 for TwoLayerStructNoPaddingAlign4
33377 {
33378 #[inline(always)]
33379 fn new_empty() -> Self {
33380 Self {
33381 s: fidl::new_empty!(OneLayerStructNoPaddingAlign4, D),
33382 a: fidl::new_empty!(u32, D),
33383 }
33384 }
33385
33386 #[inline]
33387 unsafe fn decode(
33388 &mut self,
33389 decoder: &mut fidl::encoding::Decoder<'_, D>,
33390 offset: usize,
33391 _depth: fidl::encoding::Depth,
33392 ) -> fidl::Result<()> {
33393 decoder.debug_check_bounds::<Self>(offset);
33394 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33395 unsafe {
33398 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33399 }
33400 Ok(())
33401 }
33402 }
33403
33404 impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign8 {
33405 type Borrowed<'a> = &'a Self;
33406 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33407 value
33408 }
33409 }
33410
33411 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign8 {
33412 type Owned = Self;
33413
33414 #[inline(always)]
33415 fn inline_align(_context: fidl::encoding::Context) -> usize {
33416 8
33417 }
33418
33419 #[inline(always)]
33420 fn inline_size(_context: fidl::encoding::Context) -> usize {
33421 24
33422 }
33423 #[inline(always)]
33424 fn encode_is_copy() -> bool {
33425 true
33426 }
33427
33428 #[inline(always)]
33429 fn decode_is_copy() -> bool {
33430 true
33431 }
33432 }
33433
33434 unsafe impl<D: fidl::encoding::ResourceDialect>
33435 fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D>
33436 for &TwoLayerStructNoPaddingAlign8
33437 {
33438 #[inline]
33439 unsafe fn encode(
33440 self,
33441 encoder: &mut fidl::encoding::Encoder<'_, D>,
33442 offset: usize,
33443 _depth: fidl::encoding::Depth,
33444 ) -> fidl::Result<()> {
33445 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
33446 unsafe {
33447 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33449 (buf_ptr as *mut TwoLayerStructNoPaddingAlign8)
33450 .write_unaligned((self as *const TwoLayerStructNoPaddingAlign8).read());
33451 }
33454 Ok(())
33455 }
33456 }
33457 unsafe impl<
33458 D: fidl::encoding::ResourceDialect,
33459 T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>,
33460 T1: fidl::encoding::Encode<u64, D>,
33461 > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D> for (T0, T1)
33462 {
33463 #[inline]
33464 unsafe fn encode(
33465 self,
33466 encoder: &mut fidl::encoding::Encoder<'_, D>,
33467 offset: usize,
33468 depth: fidl::encoding::Depth,
33469 ) -> fidl::Result<()> {
33470 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
33471 self.0.encode(encoder, offset + 0, depth)?;
33475 self.1.encode(encoder, offset + 16, depth)?;
33476 Ok(())
33477 }
33478 }
33479
33480 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33481 for TwoLayerStructNoPaddingAlign8
33482 {
33483 #[inline(always)]
33484 fn new_empty() -> Self {
33485 Self {
33486 s: fidl::new_empty!(OneLayerStructNoPaddingAlign8, D),
33487 a: fidl::new_empty!(u64, D),
33488 }
33489 }
33490
33491 #[inline]
33492 unsafe fn decode(
33493 &mut self,
33494 decoder: &mut fidl::encoding::Decoder<'_, D>,
33495 offset: usize,
33496 _depth: fidl::encoding::Depth,
33497 ) -> fidl::Result<()> {
33498 decoder.debug_check_bounds::<Self>(offset);
33499 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33500 unsafe {
33503 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
33504 }
33505 Ok(())
33506 }
33507 }
33508
33509 impl fidl::encoding::ValueTypeMarker for Uint16Struct {
33510 type Borrowed<'a> = &'a Self;
33511 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33512 value
33513 }
33514 }
33515
33516 unsafe impl fidl::encoding::TypeMarker for Uint16Struct {
33517 type Owned = Self;
33518
33519 #[inline(always)]
33520 fn inline_align(_context: fidl::encoding::Context) -> usize {
33521 2
33522 }
33523
33524 #[inline(always)]
33525 fn inline_size(_context: fidl::encoding::Context) -> usize {
33526 2
33527 }
33528 #[inline(always)]
33529 fn encode_is_copy() -> bool {
33530 true
33531 }
33532
33533 #[inline(always)]
33534 fn decode_is_copy() -> bool {
33535 true
33536 }
33537 }
33538
33539 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint16Struct, D>
33540 for &Uint16Struct
33541 {
33542 #[inline]
33543 unsafe fn encode(
33544 self,
33545 encoder: &mut fidl::encoding::Encoder<'_, D>,
33546 offset: usize,
33547 _depth: fidl::encoding::Depth,
33548 ) -> fidl::Result<()> {
33549 encoder.debug_check_bounds::<Uint16Struct>(offset);
33550 unsafe {
33551 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33553 (buf_ptr as *mut Uint16Struct)
33554 .write_unaligned((self as *const Uint16Struct).read());
33555 }
33558 Ok(())
33559 }
33560 }
33561 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
33562 fidl::encoding::Encode<Uint16Struct, D> for (T0,)
33563 {
33564 #[inline]
33565 unsafe fn encode(
33566 self,
33567 encoder: &mut fidl::encoding::Encoder<'_, D>,
33568 offset: usize,
33569 depth: fidl::encoding::Depth,
33570 ) -> fidl::Result<()> {
33571 encoder.debug_check_bounds::<Uint16Struct>(offset);
33572 self.0.encode(encoder, offset + 0, depth)?;
33576 Ok(())
33577 }
33578 }
33579
33580 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint16Struct {
33581 #[inline(always)]
33582 fn new_empty() -> Self {
33583 Self { val: fidl::new_empty!(u16, D) }
33584 }
33585
33586 #[inline]
33587 unsafe fn decode(
33588 &mut self,
33589 decoder: &mut fidl::encoding::Decoder<'_, D>,
33590 offset: usize,
33591 _depth: fidl::encoding::Depth,
33592 ) -> fidl::Result<()> {
33593 decoder.debug_check_bounds::<Self>(offset);
33594 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33595 unsafe {
33598 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
33599 }
33600 Ok(())
33601 }
33602 }
33603
33604 impl fidl::encoding::ValueTypeMarker for Uint32Struct {
33605 type Borrowed<'a> = &'a Self;
33606 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33607 value
33608 }
33609 }
33610
33611 unsafe impl fidl::encoding::TypeMarker for Uint32Struct {
33612 type Owned = Self;
33613
33614 #[inline(always)]
33615 fn inline_align(_context: fidl::encoding::Context) -> usize {
33616 4
33617 }
33618
33619 #[inline(always)]
33620 fn inline_size(_context: fidl::encoding::Context) -> usize {
33621 4
33622 }
33623 #[inline(always)]
33624 fn encode_is_copy() -> bool {
33625 true
33626 }
33627
33628 #[inline(always)]
33629 fn decode_is_copy() -> bool {
33630 true
33631 }
33632 }
33633
33634 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint32Struct, D>
33635 for &Uint32Struct
33636 {
33637 #[inline]
33638 unsafe fn encode(
33639 self,
33640 encoder: &mut fidl::encoding::Encoder<'_, D>,
33641 offset: usize,
33642 _depth: fidl::encoding::Depth,
33643 ) -> fidl::Result<()> {
33644 encoder.debug_check_bounds::<Uint32Struct>(offset);
33645 unsafe {
33646 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33648 (buf_ptr as *mut Uint32Struct)
33649 .write_unaligned((self as *const Uint32Struct).read());
33650 }
33653 Ok(())
33654 }
33655 }
33656 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
33657 fidl::encoding::Encode<Uint32Struct, D> for (T0,)
33658 {
33659 #[inline]
33660 unsafe fn encode(
33661 self,
33662 encoder: &mut fidl::encoding::Encoder<'_, D>,
33663 offset: usize,
33664 depth: fidl::encoding::Depth,
33665 ) -> fidl::Result<()> {
33666 encoder.debug_check_bounds::<Uint32Struct>(offset);
33667 self.0.encode(encoder, offset + 0, depth)?;
33671 Ok(())
33672 }
33673 }
33674
33675 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint32Struct {
33676 #[inline(always)]
33677 fn new_empty() -> Self {
33678 Self { val: fidl::new_empty!(u32, D) }
33679 }
33680
33681 #[inline]
33682 unsafe fn decode(
33683 &mut self,
33684 decoder: &mut fidl::encoding::Decoder<'_, D>,
33685 offset: usize,
33686 _depth: fidl::encoding::Depth,
33687 ) -> fidl::Result<()> {
33688 decoder.debug_check_bounds::<Self>(offset);
33689 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33690 unsafe {
33693 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
33694 }
33695 Ok(())
33696 }
33697 }
33698
33699 impl fidl::encoding::ValueTypeMarker for Uint64Struct {
33700 type Borrowed<'a> = &'a Self;
33701 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33702 value
33703 }
33704 }
33705
33706 unsafe impl fidl::encoding::TypeMarker for Uint64Struct {
33707 type Owned = Self;
33708
33709 #[inline(always)]
33710 fn inline_align(_context: fidl::encoding::Context) -> usize {
33711 8
33712 }
33713
33714 #[inline(always)]
33715 fn inline_size(_context: fidl::encoding::Context) -> usize {
33716 8
33717 }
33718 #[inline(always)]
33719 fn encode_is_copy() -> bool {
33720 true
33721 }
33722
33723 #[inline(always)]
33724 fn decode_is_copy() -> bool {
33725 true
33726 }
33727 }
33728
33729 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint64Struct, D>
33730 for &Uint64Struct
33731 {
33732 #[inline]
33733 unsafe fn encode(
33734 self,
33735 encoder: &mut fidl::encoding::Encoder<'_, D>,
33736 offset: usize,
33737 _depth: fidl::encoding::Depth,
33738 ) -> fidl::Result<()> {
33739 encoder.debug_check_bounds::<Uint64Struct>(offset);
33740 unsafe {
33741 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33743 (buf_ptr as *mut Uint64Struct)
33744 .write_unaligned((self as *const Uint64Struct).read());
33745 }
33748 Ok(())
33749 }
33750 }
33751 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
33752 fidl::encoding::Encode<Uint64Struct, D> for (T0,)
33753 {
33754 #[inline]
33755 unsafe fn encode(
33756 self,
33757 encoder: &mut fidl::encoding::Encoder<'_, D>,
33758 offset: usize,
33759 depth: fidl::encoding::Depth,
33760 ) -> fidl::Result<()> {
33761 encoder.debug_check_bounds::<Uint64Struct>(offset);
33762 self.0.encode(encoder, offset + 0, depth)?;
33766 Ok(())
33767 }
33768 }
33769
33770 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint64Struct {
33771 #[inline(always)]
33772 fn new_empty() -> Self {
33773 Self { val: fidl::new_empty!(u64, D) }
33774 }
33775
33776 #[inline]
33777 unsafe fn decode(
33778 &mut self,
33779 decoder: &mut fidl::encoding::Decoder<'_, D>,
33780 offset: usize,
33781 _depth: fidl::encoding::Depth,
33782 ) -> fidl::Result<()> {
33783 decoder.debug_check_bounds::<Self>(offset);
33784 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33785 unsafe {
33788 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
33789 }
33790 Ok(())
33791 }
33792 }
33793
33794 impl fidl::encoding::ValueTypeMarker for Uint64Uint32Uint16Uint8 {
33795 type Borrowed<'a> = &'a Self;
33796 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33797 value
33798 }
33799 }
33800
33801 unsafe impl fidl::encoding::TypeMarker for Uint64Uint32Uint16Uint8 {
33802 type Owned = Self;
33803
33804 #[inline(always)]
33805 fn inline_align(_context: fidl::encoding::Context) -> usize {
33806 8
33807 }
33808
33809 #[inline(always)]
33810 fn inline_size(_context: fidl::encoding::Context) -> usize {
33811 16
33812 }
33813 }
33814
33815 unsafe impl<D: fidl::encoding::ResourceDialect>
33816 fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for &Uint64Uint32Uint16Uint8
33817 {
33818 #[inline]
33819 unsafe fn encode(
33820 self,
33821 encoder: &mut fidl::encoding::Encoder<'_, D>,
33822 offset: usize,
33823 _depth: fidl::encoding::Depth,
33824 ) -> fidl::Result<()> {
33825 encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
33826 unsafe {
33827 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33829 (buf_ptr as *mut Uint64Uint32Uint16Uint8)
33830 .write_unaligned((self as *const Uint64Uint32Uint16Uint8).read());
33831 let padding_ptr = buf_ptr.offset(8) as *mut u64;
33834 let padding_mask = 0xff00000000000000u64;
33835 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33836 }
33837 Ok(())
33838 }
33839 }
33840 unsafe impl<
33841 D: fidl::encoding::ResourceDialect,
33842 T0: fidl::encoding::Encode<u64, D>,
33843 T1: fidl::encoding::Encode<u32, D>,
33844 T2: fidl::encoding::Encode<u16, D>,
33845 T3: fidl::encoding::Encode<u8, D>,
33846 > fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for (T0, T1, T2, T3)
33847 {
33848 #[inline]
33849 unsafe fn encode(
33850 self,
33851 encoder: &mut fidl::encoding::Encoder<'_, D>,
33852 offset: usize,
33853 depth: fidl::encoding::Depth,
33854 ) -> fidl::Result<()> {
33855 encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
33856 unsafe {
33859 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
33860 (ptr as *mut u64).write_unaligned(0);
33861 }
33862 self.0.encode(encoder, offset + 0, depth)?;
33864 self.1.encode(encoder, offset + 8, depth)?;
33865 self.2.encode(encoder, offset + 12, depth)?;
33866 self.3.encode(encoder, offset + 14, depth)?;
33867 Ok(())
33868 }
33869 }
33870
33871 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33872 for Uint64Uint32Uint16Uint8
33873 {
33874 #[inline(always)]
33875 fn new_empty() -> Self {
33876 Self {
33877 f1: fidl::new_empty!(u64, D),
33878 f2: fidl::new_empty!(u32, D),
33879 f3: fidl::new_empty!(u16, D),
33880 f4: fidl::new_empty!(u8, D),
33881 }
33882 }
33883
33884 #[inline]
33885 unsafe fn decode(
33886 &mut self,
33887 decoder: &mut fidl::encoding::Decoder<'_, D>,
33888 offset: usize,
33889 _depth: fidl::encoding::Depth,
33890 ) -> fidl::Result<()> {
33891 decoder.debug_check_bounds::<Self>(offset);
33892 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33893 let ptr = unsafe { buf_ptr.offset(8) };
33895 let padval = unsafe { (ptr as *const u64).read_unaligned() };
33896 let mask = 0xff00000000000000u64;
33897 let maskedval = padval & mask;
33898 if maskedval != 0 {
33899 return Err(fidl::Error::NonZeroPadding {
33900 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
33901 });
33902 }
33903 unsafe {
33905 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
33906 }
33907 Ok(())
33908 }
33909 }
33910
33911 impl fidl::encoding::ValueTypeMarker for Uint8Struct {
33912 type Borrowed<'a> = &'a Self;
33913 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33914 value
33915 }
33916 }
33917
33918 unsafe impl fidl::encoding::TypeMarker for Uint8Struct {
33919 type Owned = Self;
33920
33921 #[inline(always)]
33922 fn inline_align(_context: fidl::encoding::Context) -> usize {
33923 1
33924 }
33925
33926 #[inline(always)]
33927 fn inline_size(_context: fidl::encoding::Context) -> usize {
33928 1
33929 }
33930 #[inline(always)]
33931 fn encode_is_copy() -> bool {
33932 true
33933 }
33934
33935 #[inline(always)]
33936 fn decode_is_copy() -> bool {
33937 true
33938 }
33939 }
33940
33941 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Struct, D>
33942 for &Uint8Struct
33943 {
33944 #[inline]
33945 unsafe fn encode(
33946 self,
33947 encoder: &mut fidl::encoding::Encoder<'_, D>,
33948 offset: usize,
33949 _depth: fidl::encoding::Depth,
33950 ) -> fidl::Result<()> {
33951 encoder.debug_check_bounds::<Uint8Struct>(offset);
33952 unsafe {
33953 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33955 (buf_ptr as *mut Uint8Struct).write_unaligned((self as *const Uint8Struct).read());
33956 }
33959 Ok(())
33960 }
33961 }
33962 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
33963 fidl::encoding::Encode<Uint8Struct, D> for (T0,)
33964 {
33965 #[inline]
33966 unsafe fn encode(
33967 self,
33968 encoder: &mut fidl::encoding::Encoder<'_, D>,
33969 offset: usize,
33970 depth: fidl::encoding::Depth,
33971 ) -> fidl::Result<()> {
33972 encoder.debug_check_bounds::<Uint8Struct>(offset);
33973 self.0.encode(encoder, offset + 0, depth)?;
33977 Ok(())
33978 }
33979 }
33980
33981 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Struct {
33982 #[inline(always)]
33983 fn new_empty() -> Self {
33984 Self { val: fidl::new_empty!(u8, D) }
33985 }
33986
33987 #[inline]
33988 unsafe fn decode(
33989 &mut self,
33990 decoder: &mut fidl::encoding::Decoder<'_, D>,
33991 offset: usize,
33992 _depth: fidl::encoding::Depth,
33993 ) -> fidl::Result<()> {
33994 decoder.debug_check_bounds::<Self>(offset);
33995 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33996 unsafe {
33999 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
34000 }
34001 Ok(())
34002 }
34003 }
34004
34005 impl fidl::encoding::ValueTypeMarker for Uint8Uint16Uint32Uint64 {
34006 type Borrowed<'a> = &'a Self;
34007 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34008 value
34009 }
34010 }
34011
34012 unsafe impl fidl::encoding::TypeMarker for Uint8Uint16Uint32Uint64 {
34013 type Owned = Self;
34014
34015 #[inline(always)]
34016 fn inline_align(_context: fidl::encoding::Context) -> usize {
34017 8
34018 }
34019
34020 #[inline(always)]
34021 fn inline_size(_context: fidl::encoding::Context) -> usize {
34022 16
34023 }
34024 }
34025
34026 unsafe impl<D: fidl::encoding::ResourceDialect>
34027 fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for &Uint8Uint16Uint32Uint64
34028 {
34029 #[inline]
34030 unsafe fn encode(
34031 self,
34032 encoder: &mut fidl::encoding::Encoder<'_, D>,
34033 offset: usize,
34034 _depth: fidl::encoding::Depth,
34035 ) -> fidl::Result<()> {
34036 encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34037 unsafe {
34038 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34040 (buf_ptr as *mut Uint8Uint16Uint32Uint64)
34041 .write_unaligned((self as *const Uint8Uint16Uint32Uint64).read());
34042 let padding_ptr = buf_ptr.offset(0) as *mut u64;
34045 let padding_mask = 0xff00u64;
34046 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
34047 }
34048 Ok(())
34049 }
34050 }
34051 unsafe impl<
34052 D: fidl::encoding::ResourceDialect,
34053 T0: fidl::encoding::Encode<u8, D>,
34054 T1: fidl::encoding::Encode<u16, D>,
34055 T2: fidl::encoding::Encode<u32, D>,
34056 T3: fidl::encoding::Encode<u64, D>,
34057 > fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for (T0, T1, T2, T3)
34058 {
34059 #[inline]
34060 unsafe fn encode(
34061 self,
34062 encoder: &mut fidl::encoding::Encoder<'_, D>,
34063 offset: usize,
34064 depth: fidl::encoding::Depth,
34065 ) -> fidl::Result<()> {
34066 encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34067 unsafe {
34070 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
34071 (ptr as *mut u64).write_unaligned(0);
34072 }
34073 self.0.encode(encoder, offset + 0, depth)?;
34075 self.1.encode(encoder, offset + 2, depth)?;
34076 self.2.encode(encoder, offset + 4, depth)?;
34077 self.3.encode(encoder, offset + 8, depth)?;
34078 Ok(())
34079 }
34080 }
34081
34082 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34083 for Uint8Uint16Uint32Uint64
34084 {
34085 #[inline(always)]
34086 fn new_empty() -> Self {
34087 Self {
34088 f1: fidl::new_empty!(u8, D),
34089 f2: fidl::new_empty!(u16, D),
34090 f3: fidl::new_empty!(u32, D),
34091 f4: fidl::new_empty!(u64, D),
34092 }
34093 }
34094
34095 #[inline]
34096 unsafe fn decode(
34097 &mut self,
34098 decoder: &mut fidl::encoding::Decoder<'_, D>,
34099 offset: usize,
34100 _depth: fidl::encoding::Depth,
34101 ) -> fidl::Result<()> {
34102 decoder.debug_check_bounds::<Self>(offset);
34103 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34104 let ptr = unsafe { buf_ptr.offset(0) };
34106 let padval = unsafe { (ptr as *const u64).read_unaligned() };
34107 let mask = 0xff00u64;
34108 let maskedval = padval & mask;
34109 if maskedval != 0 {
34110 return Err(fidl::Error::NonZeroPadding {
34111 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
34112 });
34113 }
34114 unsafe {
34116 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
34117 }
34118 Ok(())
34119 }
34120 }
34121
34122 impl fidl::encoding::ValueTypeMarker for Uint8UnionStruct {
34123 type Borrowed<'a> = &'a Self;
34124 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34125 value
34126 }
34127 }
34128
34129 unsafe impl fidl::encoding::TypeMarker for Uint8UnionStruct {
34130 type Owned = Self;
34131
34132 #[inline(always)]
34133 fn inline_align(_context: fidl::encoding::Context) -> usize {
34134 8
34135 }
34136
34137 #[inline(always)]
34138 fn inline_size(_context: fidl::encoding::Context) -> usize {
34139 16
34140 }
34141 }
34142
34143 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8UnionStruct, D>
34144 for &Uint8UnionStruct
34145 {
34146 #[inline]
34147 unsafe fn encode(
34148 self,
34149 encoder: &mut fidl::encoding::Encoder<'_, D>,
34150 offset: usize,
34151 _depth: fidl::encoding::Depth,
34152 ) -> fidl::Result<()> {
34153 encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34154 fidl::encoding::Encode::<Uint8UnionStruct, D>::encode(
34156 (<Uint8Union as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
34157 encoder,
34158 offset,
34159 _depth,
34160 )
34161 }
34162 }
34163 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Uint8Union, D>>
34164 fidl::encoding::Encode<Uint8UnionStruct, D> for (T0,)
34165 {
34166 #[inline]
34167 unsafe fn encode(
34168 self,
34169 encoder: &mut fidl::encoding::Encoder<'_, D>,
34170 offset: usize,
34171 depth: fidl::encoding::Depth,
34172 ) -> fidl::Result<()> {
34173 encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34174 self.0.encode(encoder, offset + 0, depth)?;
34178 Ok(())
34179 }
34180 }
34181
34182 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8UnionStruct {
34183 #[inline(always)]
34184 fn new_empty() -> Self {
34185 Self { u: fidl::new_empty!(Uint8Union, D) }
34186 }
34187
34188 #[inline]
34189 unsafe fn decode(
34190 &mut self,
34191 decoder: &mut fidl::encoding::Decoder<'_, D>,
34192 offset: usize,
34193 _depth: fidl::encoding::Depth,
34194 ) -> fidl::Result<()> {
34195 decoder.debug_check_bounds::<Self>(offset);
34196 fidl::decode!(Uint8Union, D, &mut self.u, decoder, offset + 0, _depth)?;
34198 Ok(())
34199 }
34200 }
34201
34202 impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableString {
34203 type Borrowed<'a> = &'a Self;
34204 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34205 value
34206 }
34207 }
34208
34209 unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableString {
34210 type Owned = Self;
34211
34212 #[inline(always)]
34213 fn inline_align(_context: fidl::encoding::Context) -> usize {
34214 8
34215 }
34216
34217 #[inline(always)]
34218 fn inline_size(_context: fidl::encoding::Context) -> usize {
34219 16
34220 }
34221 }
34222
34223 unsafe impl<D: fidl::encoding::ResourceDialect>
34224 fidl::encoding::Encode<UnboundedNonnullableString, D> for &UnboundedNonnullableString
34225 {
34226 #[inline]
34227 unsafe fn encode(
34228 self,
34229 encoder: &mut fidl::encoding::Encoder<'_, D>,
34230 offset: usize,
34231 _depth: fidl::encoding::Depth,
34232 ) -> fidl::Result<()> {
34233 encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34234 fidl::encoding::Encode::<UnboundedNonnullableString, D>::encode(
34236 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
34237 &self.s0,
34238 ),),
34239 encoder,
34240 offset,
34241 _depth,
34242 )
34243 }
34244 }
34245 unsafe impl<
34246 D: fidl::encoding::ResourceDialect,
34247 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
34248 > fidl::encoding::Encode<UnboundedNonnullableString, D> for (T0,)
34249 {
34250 #[inline]
34251 unsafe fn encode(
34252 self,
34253 encoder: &mut fidl::encoding::Encoder<'_, D>,
34254 offset: usize,
34255 depth: fidl::encoding::Depth,
34256 ) -> fidl::Result<()> {
34257 encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34258 self.0.encode(encoder, offset + 0, depth)?;
34262 Ok(())
34263 }
34264 }
34265
34266 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34267 for UnboundedNonnullableString
34268 {
34269 #[inline(always)]
34270 fn new_empty() -> Self {
34271 Self { s0: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
34272 }
34273
34274 #[inline]
34275 unsafe fn decode(
34276 &mut self,
34277 decoder: &mut fidl::encoding::Decoder<'_, D>,
34278 offset: usize,
34279 _depth: fidl::encoding::Depth,
34280 ) -> fidl::Result<()> {
34281 decoder.debug_check_bounds::<Self>(offset);
34282 fidl::decode!(
34284 fidl::encoding::UnboundedString,
34285 D,
34286 &mut self.s0,
34287 decoder,
34288 offset + 0,
34289 _depth
34290 )?;
34291 Ok(())
34292 }
34293 }
34294
34295 impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableVectorOfUint32s {
34296 type Borrowed<'a> = &'a Self;
34297 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34298 value
34299 }
34300 }
34301
34302 unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfUint32s {
34303 type Owned = Self;
34304
34305 #[inline(always)]
34306 fn inline_align(_context: fidl::encoding::Context) -> usize {
34307 8
34308 }
34309
34310 #[inline(always)]
34311 fn inline_size(_context: fidl::encoding::Context) -> usize {
34312 16
34313 }
34314 }
34315
34316 unsafe impl<D: fidl::encoding::ResourceDialect>
34317 fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D>
34318 for &UnboundedNonnullableVectorOfUint32s
34319 {
34320 #[inline]
34321 unsafe fn encode(
34322 self,
34323 encoder: &mut fidl::encoding::Encoder<'_, D>,
34324 offset: usize,
34325 _depth: fidl::encoding::Depth,
34326 ) -> fidl::Result<()> {
34327 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34328 fidl::encoding::Encode::<UnboundedNonnullableVectorOfUint32s, D>::encode(
34330 (
34331 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
34332 ),
34333 encoder, offset, _depth
34334 )
34335 }
34336 }
34337 unsafe impl<
34338 D: fidl::encoding::ResourceDialect,
34339 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
34340 > fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D> for (T0,)
34341 {
34342 #[inline]
34343 unsafe fn encode(
34344 self,
34345 encoder: &mut fidl::encoding::Encoder<'_, D>,
34346 offset: usize,
34347 depth: fidl::encoding::Depth,
34348 ) -> fidl::Result<()> {
34349 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34350 self.0.encode(encoder, offset + 0, depth)?;
34354 Ok(())
34355 }
34356 }
34357
34358 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34359 for UnboundedNonnullableVectorOfUint32s
34360 {
34361 #[inline(always)]
34362 fn new_empty() -> Self {
34363 Self { vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D) }
34364 }
34365
34366 #[inline]
34367 unsafe fn decode(
34368 &mut self,
34369 decoder: &mut fidl::encoding::Decoder<'_, D>,
34370 offset: usize,
34371 _depth: fidl::encoding::Depth,
34372 ) -> fidl::Result<()> {
34373 decoder.debug_check_bounds::<Self>(offset);
34374 fidl::decode!(
34376 fidl::encoding::UnboundedVector<u32>,
34377 D,
34378 &mut self.vu0,
34379 decoder,
34380 offset + 0,
34381 _depth
34382 )?;
34383 Ok(())
34384 }
34385 }
34386
34387 impl fidl::encoding::ValueTypeMarker for UnboundedNullableString {
34388 type Borrowed<'a> = &'a Self;
34389 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34390 value
34391 }
34392 }
34393
34394 unsafe impl fidl::encoding::TypeMarker for UnboundedNullableString {
34395 type Owned = Self;
34396
34397 #[inline(always)]
34398 fn inline_align(_context: fidl::encoding::Context) -> usize {
34399 8
34400 }
34401
34402 #[inline(always)]
34403 fn inline_size(_context: fidl::encoding::Context) -> usize {
34404 16
34405 }
34406 }
34407
34408 unsafe impl<D: fidl::encoding::ResourceDialect>
34409 fidl::encoding::Encode<UnboundedNullableString, D> for &UnboundedNullableString
34410 {
34411 #[inline]
34412 unsafe fn encode(
34413 self,
34414 encoder: &mut fidl::encoding::Encoder<'_, D>,
34415 offset: usize,
34416 _depth: fidl::encoding::Depth,
34417 ) -> fidl::Result<()> {
34418 encoder.debug_check_bounds::<UnboundedNullableString>(offset);
34419 fidl::encoding::Encode::<UnboundedNullableString, D>::encode(
34421 (
34422 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
34423 ),
34424 encoder, offset, _depth
34425 )
34426 }
34427 }
34428 unsafe impl<
34429 D: fidl::encoding::ResourceDialect,
34430 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
34431 > fidl::encoding::Encode<UnboundedNullableString, D> for (T0,)
34432 {
34433 #[inline]
34434 unsafe fn encode(
34435 self,
34436 encoder: &mut fidl::encoding::Encoder<'_, D>,
34437 offset: usize,
34438 depth: fidl::encoding::Depth,
34439 ) -> fidl::Result<()> {
34440 encoder.debug_check_bounds::<UnboundedNullableString>(offset);
34441 self.0.encode(encoder, offset + 0, depth)?;
34445 Ok(())
34446 }
34447 }
34448
34449 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34450 for UnboundedNullableString
34451 {
34452 #[inline(always)]
34453 fn new_empty() -> Self {
34454 Self {
34455 s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
34456 }
34457 }
34458
34459 #[inline]
34460 unsafe fn decode(
34461 &mut self,
34462 decoder: &mut fidl::encoding::Decoder<'_, D>,
34463 offset: usize,
34464 _depth: fidl::encoding::Depth,
34465 ) -> fidl::Result<()> {
34466 decoder.debug_check_bounds::<Self>(offset);
34467 fidl::decode!(
34469 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
34470 D,
34471 &mut self.s0,
34472 decoder,
34473 offset + 0,
34474 _depth
34475 )?;
34476 Ok(())
34477 }
34478 }
34479
34480 impl fidl::encoding::ValueTypeMarker for UnboundedNullableVectorOfUint32s {
34481 type Borrowed<'a> = &'a Self;
34482 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34483 value
34484 }
34485 }
34486
34487 unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfUint32s {
34488 type Owned = Self;
34489
34490 #[inline(always)]
34491 fn inline_align(_context: fidl::encoding::Context) -> usize {
34492 8
34493 }
34494
34495 #[inline(always)]
34496 fn inline_size(_context: fidl::encoding::Context) -> usize {
34497 16
34498 }
34499 }
34500
34501 unsafe impl<D: fidl::encoding::ResourceDialect>
34502 fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D>
34503 for &UnboundedNullableVectorOfUint32s
34504 {
34505 #[inline]
34506 unsafe fn encode(
34507 self,
34508 encoder: &mut fidl::encoding::Encoder<'_, D>,
34509 offset: usize,
34510 _depth: fidl::encoding::Depth,
34511 ) -> fidl::Result<()> {
34512 encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
34513 fidl::encoding::Encode::<UnboundedNullableVectorOfUint32s, D>::encode(
34515 (
34516 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
34517 ),
34518 encoder, offset, _depth
34519 )
34520 }
34521 }
34522 unsafe impl<
34523 D: fidl::encoding::ResourceDialect,
34524 T0: fidl::encoding::Encode<
34525 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
34526 D,
34527 >,
34528 > fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D> for (T0,)
34529 {
34530 #[inline]
34531 unsafe fn encode(
34532 self,
34533 encoder: &mut fidl::encoding::Encoder<'_, D>,
34534 offset: usize,
34535 depth: fidl::encoding::Depth,
34536 ) -> fidl::Result<()> {
34537 encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
34538 self.0.encode(encoder, offset + 0, depth)?;
34542 Ok(())
34543 }
34544 }
34545
34546 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34547 for UnboundedNullableVectorOfUint32s
34548 {
34549 #[inline(always)]
34550 fn new_empty() -> Self {
34551 Self {
34552 vu0: fidl::new_empty!(
34553 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
34554 D
34555 ),
34556 }
34557 }
34558
34559 #[inline]
34560 unsafe fn decode(
34561 &mut self,
34562 decoder: &mut fidl::encoding::Decoder<'_, D>,
34563 offset: usize,
34564 _depth: fidl::encoding::Depth,
34565 ) -> fidl::Result<()> {
34566 decoder.debug_check_bounds::<Self>(offset);
34567 fidl::decode!(
34569 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
34570 D,
34571 &mut self.vu0,
34572 decoder,
34573 offset + 0,
34574 _depth
34575 )?;
34576 Ok(())
34577 }
34578 }
34579
34580 impl fidl::encoding::ValueTypeMarker for UnionInlinePaddingStruct {
34581 type Borrowed<'a> = &'a Self;
34582 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34583 value
34584 }
34585 }
34586
34587 unsafe impl fidl::encoding::TypeMarker for UnionInlinePaddingStruct {
34588 type Owned = Self;
34589
34590 #[inline(always)]
34591 fn inline_align(_context: fidl::encoding::Context) -> usize {
34592 8
34593 }
34594
34595 #[inline(always)]
34596 fn inline_size(_context: fidl::encoding::Context) -> usize {
34597 16
34598 }
34599 }
34600
34601 unsafe impl<D: fidl::encoding::ResourceDialect>
34602 fidl::encoding::Encode<UnionInlinePaddingStruct, D> for &UnionInlinePaddingStruct
34603 {
34604 #[inline]
34605 unsafe fn encode(
34606 self,
34607 encoder: &mut fidl::encoding::Encoder<'_, D>,
34608 offset: usize,
34609 _depth: fidl::encoding::Depth,
34610 ) -> fidl::Result<()> {
34611 encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
34612 fidl::encoding::Encode::<UnionInlinePaddingStruct, D>::encode(
34614 (<UnionInlinePadding as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
34615 encoder,
34616 offset,
34617 _depth,
34618 )
34619 }
34620 }
34621 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<UnionInlinePadding, D>>
34622 fidl::encoding::Encode<UnionInlinePaddingStruct, D> for (T0,)
34623 {
34624 #[inline]
34625 unsafe fn encode(
34626 self,
34627 encoder: &mut fidl::encoding::Encoder<'_, D>,
34628 offset: usize,
34629 depth: fidl::encoding::Depth,
34630 ) -> fidl::Result<()> {
34631 encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
34632 self.0.encode(encoder, offset + 0, depth)?;
34636 Ok(())
34637 }
34638 }
34639
34640 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34641 for UnionInlinePaddingStruct
34642 {
34643 #[inline(always)]
34644 fn new_empty() -> Self {
34645 Self { u: fidl::new_empty!(UnionInlinePadding, D) }
34646 }
34647
34648 #[inline]
34649 unsafe fn decode(
34650 &mut self,
34651 decoder: &mut fidl::encoding::Decoder<'_, D>,
34652 offset: usize,
34653 _depth: fidl::encoding::Depth,
34654 ) -> fidl::Result<()> {
34655 decoder.debug_check_bounds::<Self>(offset);
34656 fidl::decode!(UnionInlinePadding, D, &mut self.u, decoder, offset + 0, _depth)?;
34658 Ok(())
34659 }
34660 }
34661
34662 impl fidl::encoding::ValueTypeMarker for UnionWithBoundStringStruct {
34663 type Borrowed<'a> = &'a Self;
34664 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34665 value
34666 }
34667 }
34668
34669 unsafe impl fidl::encoding::TypeMarker for UnionWithBoundStringStruct {
34670 type Owned = Self;
34671
34672 #[inline(always)]
34673 fn inline_align(_context: fidl::encoding::Context) -> usize {
34674 8
34675 }
34676
34677 #[inline(always)]
34678 fn inline_size(_context: fidl::encoding::Context) -> usize {
34679 16
34680 }
34681 }
34682
34683 unsafe impl<D: fidl::encoding::ResourceDialect>
34684 fidl::encoding::Encode<UnionWithBoundStringStruct, D> for &UnionWithBoundStringStruct
34685 {
34686 #[inline]
34687 unsafe fn encode(
34688 self,
34689 encoder: &mut fidl::encoding::Encoder<'_, D>,
34690 offset: usize,
34691 _depth: fidl::encoding::Depth,
34692 ) -> fidl::Result<()> {
34693 encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
34694 fidl::encoding::Encode::<UnionWithBoundStringStruct, D>::encode(
34696 (<UnionWithBoundString as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
34697 encoder,
34698 offset,
34699 _depth,
34700 )
34701 }
34702 }
34703 unsafe impl<
34704 D: fidl::encoding::ResourceDialect,
34705 T0: fidl::encoding::Encode<UnionWithBoundString, D>,
34706 > fidl::encoding::Encode<UnionWithBoundStringStruct, D> for (T0,)
34707 {
34708 #[inline]
34709 unsafe fn encode(
34710 self,
34711 encoder: &mut fidl::encoding::Encoder<'_, D>,
34712 offset: usize,
34713 depth: fidl::encoding::Depth,
34714 ) -> fidl::Result<()> {
34715 encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
34716 self.0.encode(encoder, offset + 0, depth)?;
34720 Ok(())
34721 }
34722 }
34723
34724 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34725 for UnionWithBoundStringStruct
34726 {
34727 #[inline(always)]
34728 fn new_empty() -> Self {
34729 Self { v: fidl::new_empty!(UnionWithBoundString, D) }
34730 }
34731
34732 #[inline]
34733 unsafe fn decode(
34734 &mut self,
34735 decoder: &mut fidl::encoding::Decoder<'_, D>,
34736 offset: usize,
34737 _depth: fidl::encoding::Depth,
34738 ) -> fidl::Result<()> {
34739 decoder.debug_check_bounds::<Self>(offset);
34740 fidl::decode!(UnionWithBoundString, D, &mut self.v, decoder, offset + 0, _depth)?;
34742 Ok(())
34743 }
34744 }
34745
34746 impl fidl::encoding::ValueTypeMarker for UpdatePolicy {
34747 type Borrowed<'a> = &'a Self;
34748 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34749 value
34750 }
34751 }
34752
34753 unsafe impl fidl::encoding::TypeMarker for UpdatePolicy {
34754 type Owned = Self;
34755
34756 #[inline(always)]
34757 fn inline_align(_context: fidl::encoding::Context) -> usize {
34758 1
34759 }
34760
34761 #[inline(always)]
34762 fn inline_size(_context: fidl::encoding::Context) -> usize {
34763 2
34764 }
34765 }
34766
34767 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UpdatePolicy, D>
34768 for &UpdatePolicy
34769 {
34770 #[inline]
34771 unsafe fn encode(
34772 self,
34773 encoder: &mut fidl::encoding::Encoder<'_, D>,
34774 offset: usize,
34775 _depth: fidl::encoding::Depth,
34776 ) -> fidl::Result<()> {
34777 encoder.debug_check_bounds::<UpdatePolicy>(offset);
34778 fidl::encoding::Encode::<UpdatePolicy, D>::encode(
34780 (
34781 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.fetch_if_absent),
34782 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_old_versions),
34783 ),
34784 encoder,
34785 offset,
34786 _depth,
34787 )
34788 }
34789 }
34790 unsafe impl<
34791 D: fidl::encoding::ResourceDialect,
34792 T0: fidl::encoding::Encode<bool, D>,
34793 T1: fidl::encoding::Encode<bool, D>,
34794 > fidl::encoding::Encode<UpdatePolicy, D> for (T0, T1)
34795 {
34796 #[inline]
34797 unsafe fn encode(
34798 self,
34799 encoder: &mut fidl::encoding::Encoder<'_, D>,
34800 offset: usize,
34801 depth: fidl::encoding::Depth,
34802 ) -> fidl::Result<()> {
34803 encoder.debug_check_bounds::<UpdatePolicy>(offset);
34804 self.0.encode(encoder, offset + 0, depth)?;
34808 self.1.encode(encoder, offset + 1, depth)?;
34809 Ok(())
34810 }
34811 }
34812
34813 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UpdatePolicy {
34814 #[inline(always)]
34815 fn new_empty() -> Self {
34816 Self {
34817 fetch_if_absent: fidl::new_empty!(bool, D),
34818 allow_old_versions: fidl::new_empty!(bool, D),
34819 }
34820 }
34821
34822 #[inline]
34823 unsafe fn decode(
34824 &mut self,
34825 decoder: &mut fidl::encoding::Decoder<'_, D>,
34826 offset: usize,
34827 _depth: fidl::encoding::Depth,
34828 ) -> fidl::Result<()> {
34829 decoder.debug_check_bounds::<Self>(offset);
34830 fidl::decode!(bool, D, &mut self.fetch_if_absent, decoder, offset + 0, _depth)?;
34832 fidl::decode!(bool, D, &mut self.allow_old_versions, decoder, offset + 1, _depth)?;
34833 Ok(())
34834 }
34835 }
34836
34837 impl fidl::encoding::ValueTypeMarker for VectorOfByteVector {
34838 type Borrowed<'a> = &'a Self;
34839 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34840 value
34841 }
34842 }
34843
34844 unsafe impl fidl::encoding::TypeMarker for VectorOfByteVector {
34845 type Owned = Self;
34846
34847 #[inline(always)]
34848 fn inline_align(_context: fidl::encoding::Context) -> usize {
34849 8
34850 }
34851
34852 #[inline(always)]
34853 fn inline_size(_context: fidl::encoding::Context) -> usize {
34854 16
34855 }
34856 }
34857
34858 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfByteVector, D>
34859 for &VectorOfByteVector
34860 {
34861 #[inline]
34862 unsafe fn encode(
34863 self,
34864 encoder: &mut fidl::encoding::Encoder<'_, D>,
34865 offset: usize,
34866 _depth: fidl::encoding::Depth,
34867 ) -> fidl::Result<()> {
34868 encoder.debug_check_bounds::<VectorOfByteVector>(offset);
34869 fidl::encoding::Encode::<VectorOfByteVector, D>::encode(
34871 (
34872 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
34873 ),
34874 encoder, offset, _depth
34875 )
34876 }
34877 }
34878 unsafe impl<
34879 D: fidl::encoding::ResourceDialect,
34880 T0: fidl::encoding::Encode<
34881 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
34882 D,
34883 >,
34884 > fidl::encoding::Encode<VectorOfByteVector, D> for (T0,)
34885 {
34886 #[inline]
34887 unsafe fn encode(
34888 self,
34889 encoder: &mut fidl::encoding::Encoder<'_, D>,
34890 offset: usize,
34891 depth: fidl::encoding::Depth,
34892 ) -> fidl::Result<()> {
34893 encoder.debug_check_bounds::<VectorOfByteVector>(offset);
34894 self.0.encode(encoder, offset + 0, depth)?;
34898 Ok(())
34899 }
34900 }
34901
34902 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfByteVector {
34903 #[inline(always)]
34904 fn new_empty() -> Self {
34905 Self {
34906 v: fidl::new_empty!(
34907 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
34908 D
34909 ),
34910 }
34911 }
34912
34913 #[inline]
34914 unsafe fn decode(
34915 &mut self,
34916 decoder: &mut fidl::encoding::Decoder<'_, D>,
34917 offset: usize,
34918 _depth: fidl::encoding::Depth,
34919 ) -> fidl::Result<()> {
34920 decoder.debug_check_bounds::<Self>(offset);
34921 fidl::decode!(
34923 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
34924 D,
34925 &mut self.v,
34926 decoder,
34927 offset + 0,
34928 _depth
34929 )?;
34930 Ok(())
34931 }
34932 }
34933
34934 impl fidl::encoding::ValueTypeMarker for VectorOfEnumStruct {
34935 type Borrowed<'a> = &'a Self;
34936 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34937 value
34938 }
34939 }
34940
34941 unsafe impl fidl::encoding::TypeMarker for VectorOfEnumStruct {
34942 type Owned = Self;
34943
34944 #[inline(always)]
34945 fn inline_align(_context: fidl::encoding::Context) -> usize {
34946 8
34947 }
34948
34949 #[inline(always)]
34950 fn inline_size(_context: fidl::encoding::Context) -> usize {
34951 16
34952 }
34953 }
34954
34955 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfEnumStruct, D>
34956 for &VectorOfEnumStruct
34957 {
34958 #[inline]
34959 unsafe fn encode(
34960 self,
34961 encoder: &mut fidl::encoding::Encoder<'_, D>,
34962 offset: usize,
34963 _depth: fidl::encoding::Depth,
34964 ) -> fidl::Result<()> {
34965 encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
34966 fidl::encoding::Encode::<VectorOfEnumStruct, D>::encode(
34968 (
34969 <fidl::encoding::UnboundedVector<StrictEnumInt16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
34970 ),
34971 encoder, offset, _depth
34972 )
34973 }
34974 }
34975 unsafe impl<
34976 D: fidl::encoding::ResourceDialect,
34977 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StrictEnumInt16>, D>,
34978 > fidl::encoding::Encode<VectorOfEnumStruct, D> for (T0,)
34979 {
34980 #[inline]
34981 unsafe fn encode(
34982 self,
34983 encoder: &mut fidl::encoding::Encoder<'_, D>,
34984 offset: usize,
34985 depth: fidl::encoding::Depth,
34986 ) -> fidl::Result<()> {
34987 encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
34988 self.0.encode(encoder, offset + 0, depth)?;
34992 Ok(())
34993 }
34994 }
34995
34996 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfEnumStruct {
34997 #[inline(always)]
34998 fn new_empty() -> Self {
34999 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<StrictEnumInt16>, D) }
35000 }
35001
35002 #[inline]
35003 unsafe fn decode(
35004 &mut self,
35005 decoder: &mut fidl::encoding::Decoder<'_, D>,
35006 offset: usize,
35007 _depth: fidl::encoding::Depth,
35008 ) -> fidl::Result<()> {
35009 decoder.debug_check_bounds::<Self>(offset);
35010 fidl::decode!(
35012 fidl::encoding::UnboundedVector<StrictEnumInt16>,
35013 D,
35014 &mut self.v,
35015 decoder,
35016 offset + 0,
35017 _depth
35018 )?;
35019 Ok(())
35020 }
35021 }
35022
35023 impl fidl::encoding::ValueTypeMarker for VectorOfStrings {
35024 type Borrowed<'a> = &'a Self;
35025 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35026 value
35027 }
35028 }
35029
35030 unsafe impl fidl::encoding::TypeMarker for VectorOfStrings {
35031 type Owned = Self;
35032
35033 #[inline(always)]
35034 fn inline_align(_context: fidl::encoding::Context) -> usize {
35035 8
35036 }
35037
35038 #[inline(always)]
35039 fn inline_size(_context: fidl::encoding::Context) -> usize {
35040 16
35041 }
35042 }
35043
35044 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfStrings, D>
35045 for &VectorOfStrings
35046 {
35047 #[inline]
35048 unsafe fn encode(
35049 self,
35050 encoder: &mut fidl::encoding::Encoder<'_, D>,
35051 offset: usize,
35052 _depth: fidl::encoding::Depth,
35053 ) -> fidl::Result<()> {
35054 encoder.debug_check_bounds::<VectorOfStrings>(offset);
35055 fidl::encoding::Encode::<VectorOfStrings, D>::encode(
35057 (
35058 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35059 ),
35060 encoder, offset, _depth
35061 )
35062 }
35063 }
35064 unsafe impl<
35065 D: fidl::encoding::ResourceDialect,
35066 T0: fidl::encoding::Encode<
35067 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35068 D,
35069 >,
35070 > fidl::encoding::Encode<VectorOfStrings, D> for (T0,)
35071 {
35072 #[inline]
35073 unsafe fn encode(
35074 self,
35075 encoder: &mut fidl::encoding::Encoder<'_, D>,
35076 offset: usize,
35077 depth: fidl::encoding::Depth,
35078 ) -> fidl::Result<()> {
35079 encoder.debug_check_bounds::<VectorOfStrings>(offset);
35080 self.0.encode(encoder, offset + 0, depth)?;
35084 Ok(())
35085 }
35086 }
35087
35088 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfStrings {
35089 #[inline(always)]
35090 fn new_empty() -> Self {
35091 Self {
35092 v: fidl::new_empty!(
35093 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35094 D
35095 ),
35096 }
35097 }
35098
35099 #[inline]
35100 unsafe fn decode(
35101 &mut self,
35102 decoder: &mut fidl::encoding::Decoder<'_, D>,
35103 offset: usize,
35104 _depth: fidl::encoding::Depth,
35105 ) -> fidl::Result<()> {
35106 decoder.debug_check_bounds::<Self>(offset);
35107 fidl::decode!(
35109 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35110 D,
35111 &mut self.v,
35112 decoder,
35113 offset + 0,
35114 _depth
35115 )?;
35116 Ok(())
35117 }
35118 }
35119
35120 impl fidl::encoding::ValueTypeMarker for VectorWithLimit {
35121 type Borrowed<'a> = &'a Self;
35122 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35123 value
35124 }
35125 }
35126
35127 unsafe impl fidl::encoding::TypeMarker for VectorWithLimit {
35128 type Owned = Self;
35129
35130 #[inline(always)]
35131 fn inline_align(_context: fidl::encoding::Context) -> usize {
35132 8
35133 }
35134
35135 #[inline(always)]
35136 fn inline_size(_context: fidl::encoding::Context) -> usize {
35137 16
35138 }
35139 }
35140
35141 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWithLimit, D>
35142 for &VectorWithLimit
35143 {
35144 #[inline]
35145 unsafe fn encode(
35146 self,
35147 encoder: &mut fidl::encoding::Encoder<'_, D>,
35148 offset: usize,
35149 _depth: fidl::encoding::Depth,
35150 ) -> fidl::Result<()> {
35151 encoder.debug_check_bounds::<VectorWithLimit>(offset);
35152 fidl::encoding::Encode::<VectorWithLimit, D>::encode(
35154 (<fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow(
35155 &self.v,
35156 ),),
35157 encoder,
35158 offset,
35159 _depth,
35160 )
35161 }
35162 }
35163 unsafe impl<
35164 D: fidl::encoding::ResourceDialect,
35165 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 2>, D>,
35166 > fidl::encoding::Encode<VectorWithLimit, D> for (T0,)
35167 {
35168 #[inline]
35169 unsafe fn encode(
35170 self,
35171 encoder: &mut fidl::encoding::Encoder<'_, D>,
35172 offset: usize,
35173 depth: fidl::encoding::Depth,
35174 ) -> fidl::Result<()> {
35175 encoder.debug_check_bounds::<VectorWithLimit>(offset);
35176 self.0.encode(encoder, offset + 0, depth)?;
35180 Ok(())
35181 }
35182 }
35183
35184 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWithLimit {
35185 #[inline(always)]
35186 fn new_empty() -> Self {
35187 Self { v: fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D) }
35188 }
35189
35190 #[inline]
35191 unsafe fn decode(
35192 &mut self,
35193 decoder: &mut fidl::encoding::Decoder<'_, D>,
35194 offset: usize,
35195 _depth: fidl::encoding::Depth,
35196 ) -> fidl::Result<()> {
35197 decoder.debug_check_bounds::<Self>(offset);
35198 fidl::decode!(fidl::encoding::Vector<u8, 2>, D, &mut self.v, decoder, offset + 0, _depth)?;
35200 Ok(())
35201 }
35202 }
35203
35204 impl fidl::encoding::ValueTypeMarker for VectorWrapper {
35205 type Borrowed<'a> = &'a Self;
35206 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35207 value
35208 }
35209 }
35210
35211 unsafe impl fidl::encoding::TypeMarker for VectorWrapper {
35212 type Owned = Self;
35213
35214 #[inline(always)]
35215 fn inline_align(_context: fidl::encoding::Context) -> usize {
35216 8
35217 }
35218
35219 #[inline(always)]
35220 fn inline_size(_context: fidl::encoding::Context) -> usize {
35221 16
35222 }
35223 }
35224
35225 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWrapper, D>
35226 for &VectorWrapper
35227 {
35228 #[inline]
35229 unsafe fn encode(
35230 self,
35231 encoder: &mut fidl::encoding::Encoder<'_, D>,
35232 offset: usize,
35233 _depth: fidl::encoding::Depth,
35234 ) -> fidl::Result<()> {
35235 encoder.debug_check_bounds::<VectorWrapper>(offset);
35236 fidl::encoding::Encode::<VectorWrapper, D>::encode(
35238 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
35239 &self.v,
35240 ),),
35241 encoder,
35242 offset,
35243 _depth,
35244 )
35245 }
35246 }
35247 unsafe impl<
35248 D: fidl::encoding::ResourceDialect,
35249 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
35250 > fidl::encoding::Encode<VectorWrapper, D> for (T0,)
35251 {
35252 #[inline]
35253 unsafe fn encode(
35254 self,
35255 encoder: &mut fidl::encoding::Encoder<'_, D>,
35256 offset: usize,
35257 depth: fidl::encoding::Depth,
35258 ) -> fidl::Result<()> {
35259 encoder.debug_check_bounds::<VectorWrapper>(offset);
35260 self.0.encode(encoder, offset + 0, depth)?;
35264 Ok(())
35265 }
35266 }
35267
35268 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWrapper {
35269 #[inline(always)]
35270 fn new_empty() -> Self {
35271 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
35272 }
35273
35274 #[inline]
35275 unsafe fn decode(
35276 &mut self,
35277 decoder: &mut fidl::encoding::Decoder<'_, D>,
35278 offset: usize,
35279 _depth: fidl::encoding::Depth,
35280 ) -> fidl::Result<()> {
35281 decoder.debug_check_bounds::<Self>(offset);
35282 fidl::decode!(
35284 fidl::encoding::UnboundedVector<u8>,
35285 D,
35286 &mut self.v,
35287 decoder,
35288 offset + 0,
35289 _depth
35290 )?;
35291 Ok(())
35292 }
35293 }
35294
35295 impl fidl::encoding::ValueTypeMarker for XUnionWithStructStruct {
35296 type Borrowed<'a> = &'a Self;
35297 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35298 value
35299 }
35300 }
35301
35302 unsafe impl fidl::encoding::TypeMarker for XUnionWithStructStruct {
35303 type Owned = Self;
35304
35305 #[inline(always)]
35306 fn inline_align(_context: fidl::encoding::Context) -> usize {
35307 8
35308 }
35309
35310 #[inline(always)]
35311 fn inline_size(_context: fidl::encoding::Context) -> usize {
35312 16
35313 }
35314 }
35315
35316 unsafe impl<D: fidl::encoding::ResourceDialect>
35317 fidl::encoding::Encode<XUnionWithStructStruct, D> for &XUnionWithStructStruct
35318 {
35319 #[inline]
35320 unsafe fn encode(
35321 self,
35322 encoder: &mut fidl::encoding::Encoder<'_, D>,
35323 offset: usize,
35324 _depth: fidl::encoding::Depth,
35325 ) -> fidl::Result<()> {
35326 encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
35327 fidl::encoding::Encode::<XUnionWithStructStruct, D>::encode(
35329 (<XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
35330 encoder,
35331 offset,
35332 _depth,
35333 )
35334 }
35335 }
35336 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithStruct, D>>
35337 fidl::encoding::Encode<XUnionWithStructStruct, D> for (T0,)
35338 {
35339 #[inline]
35340 unsafe fn encode(
35341 self,
35342 encoder: &mut fidl::encoding::Encoder<'_, D>,
35343 offset: usize,
35344 depth: fidl::encoding::Depth,
35345 ) -> fidl::Result<()> {
35346 encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
35347 self.0.encode(encoder, offset + 0, depth)?;
35351 Ok(())
35352 }
35353 }
35354
35355 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35356 for XUnionWithStructStruct
35357 {
35358 #[inline(always)]
35359 fn new_empty() -> Self {
35360 Self { xu: fidl::new_empty!(XUnionWithStruct, D) }
35361 }
35362
35363 #[inline]
35364 unsafe fn decode(
35365 &mut self,
35366 decoder: &mut fidl::encoding::Decoder<'_, D>,
35367 offset: usize,
35368 _depth: fidl::encoding::Depth,
35369 ) -> fidl::Result<()> {
35370 decoder.debug_check_bounds::<Self>(offset);
35371 fidl::decode!(XUnionWithStruct, D, &mut self.xu, decoder, offset + 0, _depth)?;
35373 Ok(())
35374 }
35375 }
35376
35377 impl fidl::encoding::ValueTypeMarker for XUnionWithXUnionStruct {
35378 type Borrowed<'a> = &'a Self;
35379 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35380 value
35381 }
35382 }
35383
35384 unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnionStruct {
35385 type Owned = Self;
35386
35387 #[inline(always)]
35388 fn inline_align(_context: fidl::encoding::Context) -> usize {
35389 8
35390 }
35391
35392 #[inline(always)]
35393 fn inline_size(_context: fidl::encoding::Context) -> usize {
35394 16
35395 }
35396 }
35397
35398 unsafe impl<D: fidl::encoding::ResourceDialect>
35399 fidl::encoding::Encode<XUnionWithXUnionStruct, D> for &XUnionWithXUnionStruct
35400 {
35401 #[inline]
35402 unsafe fn encode(
35403 self,
35404 encoder: &mut fidl::encoding::Encoder<'_, D>,
35405 offset: usize,
35406 _depth: fidl::encoding::Depth,
35407 ) -> fidl::Result<()> {
35408 encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
35409 fidl::encoding::Encode::<XUnionWithXUnionStruct, D>::encode(
35411 (<XUnionWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
35412 encoder,
35413 offset,
35414 _depth,
35415 )
35416 }
35417 }
35418 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithXUnion, D>>
35419 fidl::encoding::Encode<XUnionWithXUnionStruct, D> for (T0,)
35420 {
35421 #[inline]
35422 unsafe fn encode(
35423 self,
35424 encoder: &mut fidl::encoding::Encoder<'_, D>,
35425 offset: usize,
35426 depth: fidl::encoding::Depth,
35427 ) -> fidl::Result<()> {
35428 encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
35429 self.0.encode(encoder, offset + 0, depth)?;
35433 Ok(())
35434 }
35435 }
35436
35437 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35438 for XUnionWithXUnionStruct
35439 {
35440 #[inline(always)]
35441 fn new_empty() -> Self {
35442 Self { xu: fidl::new_empty!(XUnionWithXUnion, D) }
35443 }
35444
35445 #[inline]
35446 unsafe fn decode(
35447 &mut self,
35448 decoder: &mut fidl::encoding::Decoder<'_, D>,
35449 offset: usize,
35450 _depth: fidl::encoding::Depth,
35451 ) -> fidl::Result<()> {
35452 decoder.debug_check_bounds::<Self>(offset);
35453 fidl::decode!(XUnionWithXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
35455 Ok(())
35456 }
35457 }
35458
35459 impl CompatTableString {
35460 #[inline(always)]
35461 fn max_ordinal_present(&self) -> u64 {
35462 if let Some(_) = self.s {
35463 return 1;
35464 }
35465 0
35466 }
35467 }
35468
35469 impl fidl::encoding::ValueTypeMarker for CompatTableString {
35470 type Borrowed<'a> = &'a Self;
35471 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35472 value
35473 }
35474 }
35475
35476 unsafe impl fidl::encoding::TypeMarker for CompatTableString {
35477 type Owned = Self;
35478
35479 #[inline(always)]
35480 fn inline_align(_context: fidl::encoding::Context) -> usize {
35481 8
35482 }
35483
35484 #[inline(always)]
35485 fn inline_size(_context: fidl::encoding::Context) -> usize {
35486 16
35487 }
35488 }
35489
35490 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableString, D>
35491 for &CompatTableString
35492 {
35493 unsafe fn encode(
35494 self,
35495 encoder: &mut fidl::encoding::Encoder<'_, D>,
35496 offset: usize,
35497 mut depth: fidl::encoding::Depth,
35498 ) -> fidl::Result<()> {
35499 encoder.debug_check_bounds::<CompatTableString>(offset);
35500 let max_ordinal: u64 = self.max_ordinal_present();
35502 encoder.write_num(max_ordinal, offset);
35503 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
35504 if max_ordinal == 0 {
35506 return Ok(());
35507 }
35508 depth.increment()?;
35509 let envelope_size = 8;
35510 let bytes_len = max_ordinal as usize * envelope_size;
35511 #[allow(unused_variables)]
35512 let offset = encoder.out_of_line_offset(bytes_len);
35513 let mut _prev_end_offset: usize = 0;
35514 if 1 > max_ordinal {
35515 return Ok(());
35516 }
35517
35518 let cur_offset: usize = (1 - 1) * envelope_size;
35521
35522 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35524
35525 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
35530 self.s.as_ref().map(
35531 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
35532 ),
35533 encoder,
35534 offset + cur_offset,
35535 depth,
35536 )?;
35537
35538 _prev_end_offset = cur_offset + envelope_size;
35539
35540 Ok(())
35541 }
35542 }
35543
35544 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableString {
35545 #[inline(always)]
35546 fn new_empty() -> Self {
35547 Self::default()
35548 }
35549
35550 unsafe fn decode(
35551 &mut self,
35552 decoder: &mut fidl::encoding::Decoder<'_, D>,
35553 offset: usize,
35554 mut depth: fidl::encoding::Depth,
35555 ) -> fidl::Result<()> {
35556 decoder.debug_check_bounds::<Self>(offset);
35557 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
35558 None => return Err(fidl::Error::NotNullable),
35559 Some(len) => len,
35560 };
35561 if len == 0 {
35563 return Ok(());
35564 };
35565 depth.increment()?;
35566 let envelope_size = 8;
35567 let bytes_len = len * envelope_size;
35568 let offset = decoder.out_of_line_offset(bytes_len)?;
35569 let mut _next_ordinal_to_read = 0;
35571 let mut next_offset = offset;
35572 let end_offset = offset + bytes_len;
35573 _next_ordinal_to_read += 1;
35574 if next_offset >= end_offset {
35575 return Ok(());
35576 }
35577
35578 while _next_ordinal_to_read < 1 {
35580 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35581 _next_ordinal_to_read += 1;
35582 next_offset += envelope_size;
35583 }
35584
35585 let next_out_of_line = decoder.next_out_of_line();
35586 let handles_before = decoder.remaining_handles();
35587 if let Some((inlined, num_bytes, num_handles)) =
35588 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35589 {
35590 let member_inline_size =
35591 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
35592 decoder.context,
35593 );
35594 if inlined != (member_inline_size <= 4) {
35595 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35596 }
35597 let inner_offset;
35598 let mut inner_depth = depth.clone();
35599 if inlined {
35600 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35601 inner_offset = next_offset;
35602 } else {
35603 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35604 inner_depth.increment()?;
35605 }
35606 let val_ref = self
35607 .s
35608 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
35609 fidl::decode!(
35610 fidl::encoding::UnboundedString,
35611 D,
35612 val_ref,
35613 decoder,
35614 inner_offset,
35615 inner_depth
35616 )?;
35617 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35618 {
35619 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35620 }
35621 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35622 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35623 }
35624 }
35625
35626 next_offset += envelope_size;
35627
35628 while next_offset < end_offset {
35630 _next_ordinal_to_read += 1;
35631 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35632 next_offset += envelope_size;
35633 }
35634
35635 Ok(())
35636 }
35637 }
35638
35639 impl CompatTableValue {
35640 #[inline(always)]
35641 fn max_ordinal_present(&self) -> u64 {
35642 if let Some(_) = self.xunion_member {
35643 return 4;
35644 }
35645 if let Some(_) = self.table_member {
35646 return 3;
35647 }
35648 if let Some(_) = self.array_member {
35649 return 2;
35650 }
35651 if let Some(_) = self.union_member {
35652 return 1;
35653 }
35654 0
35655 }
35656 }
35657
35658 impl fidl::encoding::ValueTypeMarker for CompatTableValue {
35659 type Borrowed<'a> = &'a Self;
35660 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35661 value
35662 }
35663 }
35664
35665 unsafe impl fidl::encoding::TypeMarker for CompatTableValue {
35666 type Owned = Self;
35667
35668 #[inline(always)]
35669 fn inline_align(_context: fidl::encoding::Context) -> usize {
35670 8
35671 }
35672
35673 #[inline(always)]
35674 fn inline_size(_context: fidl::encoding::Context) -> usize {
35675 16
35676 }
35677 }
35678
35679 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableValue, D>
35680 for &CompatTableValue
35681 {
35682 unsafe fn encode(
35683 self,
35684 encoder: &mut fidl::encoding::Encoder<'_, D>,
35685 offset: usize,
35686 mut depth: fidl::encoding::Depth,
35687 ) -> fidl::Result<()> {
35688 encoder.debug_check_bounds::<CompatTableValue>(offset);
35689 let max_ordinal: u64 = self.max_ordinal_present();
35691 encoder.write_num(max_ordinal, offset);
35692 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
35693 if max_ordinal == 0 {
35695 return Ok(());
35696 }
35697 depth.increment()?;
35698 let envelope_size = 8;
35699 let bytes_len = max_ordinal as usize * envelope_size;
35700 #[allow(unused_variables)]
35701 let offset = encoder.out_of_line_offset(bytes_len);
35702 let mut _prev_end_offset: usize = 0;
35703 if 1 > max_ordinal {
35704 return Ok(());
35705 }
35706
35707 let cur_offset: usize = (1 - 1) * envelope_size;
35710
35711 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35713
35714 fidl::encoding::encode_in_envelope_optional::<CompatUnion, D>(
35719 self.union_member
35720 .as_ref()
35721 .map(<CompatUnion as fidl::encoding::ValueTypeMarker>::borrow),
35722 encoder,
35723 offset + cur_offset,
35724 depth,
35725 )?;
35726
35727 _prev_end_offset = cur_offset + envelope_size;
35728 if 2 > max_ordinal {
35729 return Ok(());
35730 }
35731
35732 let cur_offset: usize = (2 - 1) * envelope_size;
35735
35736 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35738
35739 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u32, 3>, D>(
35744 self.array_member.as_ref().map(
35745 <fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow,
35746 ),
35747 encoder,
35748 offset + cur_offset,
35749 depth,
35750 )?;
35751
35752 _prev_end_offset = cur_offset + envelope_size;
35753 if 3 > max_ordinal {
35754 return Ok(());
35755 }
35756
35757 let cur_offset: usize = (3 - 1) * envelope_size;
35760
35761 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35763
35764 fidl::encoding::encode_in_envelope_optional::<CompatTableString, D>(
35769 self.table_member
35770 .as_ref()
35771 .map(<CompatTableString as fidl::encoding::ValueTypeMarker>::borrow),
35772 encoder,
35773 offset + cur_offset,
35774 depth,
35775 )?;
35776
35777 _prev_end_offset = cur_offset + envelope_size;
35778 if 4 > max_ordinal {
35779 return Ok(());
35780 }
35781
35782 let cur_offset: usize = (4 - 1) * envelope_size;
35785
35786 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35788
35789 fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
35794 self.xunion_member
35795 .as_ref()
35796 .map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
35797 encoder,
35798 offset + cur_offset,
35799 depth,
35800 )?;
35801
35802 _prev_end_offset = cur_offset + envelope_size;
35803
35804 Ok(())
35805 }
35806 }
35807
35808 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableValue {
35809 #[inline(always)]
35810 fn new_empty() -> Self {
35811 Self::default()
35812 }
35813
35814 unsafe fn decode(
35815 &mut self,
35816 decoder: &mut fidl::encoding::Decoder<'_, D>,
35817 offset: usize,
35818 mut depth: fidl::encoding::Depth,
35819 ) -> fidl::Result<()> {
35820 decoder.debug_check_bounds::<Self>(offset);
35821 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
35822 None => return Err(fidl::Error::NotNullable),
35823 Some(len) => len,
35824 };
35825 if len == 0 {
35827 return Ok(());
35828 };
35829 depth.increment()?;
35830 let envelope_size = 8;
35831 let bytes_len = len * envelope_size;
35832 let offset = decoder.out_of_line_offset(bytes_len)?;
35833 let mut _next_ordinal_to_read = 0;
35835 let mut next_offset = offset;
35836 let end_offset = offset + bytes_len;
35837 _next_ordinal_to_read += 1;
35838 if next_offset >= end_offset {
35839 return Ok(());
35840 }
35841
35842 while _next_ordinal_to_read < 1 {
35844 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35845 _next_ordinal_to_read += 1;
35846 next_offset += envelope_size;
35847 }
35848
35849 let next_out_of_line = decoder.next_out_of_line();
35850 let handles_before = decoder.remaining_handles();
35851 if let Some((inlined, num_bytes, num_handles)) =
35852 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35853 {
35854 let member_inline_size =
35855 <CompatUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
35856 if inlined != (member_inline_size <= 4) {
35857 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35858 }
35859 let inner_offset;
35860 let mut inner_depth = depth.clone();
35861 if inlined {
35862 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35863 inner_offset = next_offset;
35864 } else {
35865 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35866 inner_depth.increment()?;
35867 }
35868 let val_ref =
35869 self.union_member.get_or_insert_with(|| fidl::new_empty!(CompatUnion, D));
35870 fidl::decode!(CompatUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
35871 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35872 {
35873 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35874 }
35875 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35876 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35877 }
35878 }
35879
35880 next_offset += envelope_size;
35881 _next_ordinal_to_read += 1;
35882 if next_offset >= end_offset {
35883 return Ok(());
35884 }
35885
35886 while _next_ordinal_to_read < 2 {
35888 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35889 _next_ordinal_to_read += 1;
35890 next_offset += envelope_size;
35891 }
35892
35893 let next_out_of_line = decoder.next_out_of_line();
35894 let handles_before = decoder.remaining_handles();
35895 if let Some((inlined, num_bytes, num_handles)) =
35896 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35897 {
35898 let member_inline_size =
35899 <fidl::encoding::Array<u32, 3> as fidl::encoding::TypeMarker>::inline_size(
35900 decoder.context,
35901 );
35902 if inlined != (member_inline_size <= 4) {
35903 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35904 }
35905 let inner_offset;
35906 let mut inner_depth = depth.clone();
35907 if inlined {
35908 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35909 inner_offset = next_offset;
35910 } else {
35911 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35912 inner_depth.increment()?;
35913 }
35914 let val_ref = self
35915 .array_member
35916 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u32, 3>, D));
35917 fidl::decode!(fidl::encoding::Array<u32, 3>, D, val_ref, decoder, inner_offset, inner_depth)?;
35918 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35919 {
35920 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35921 }
35922 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35923 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35924 }
35925 }
35926
35927 next_offset += envelope_size;
35928 _next_ordinal_to_read += 1;
35929 if next_offset >= end_offset {
35930 return Ok(());
35931 }
35932
35933 while _next_ordinal_to_read < 3 {
35935 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35936 _next_ordinal_to_read += 1;
35937 next_offset += envelope_size;
35938 }
35939
35940 let next_out_of_line = decoder.next_out_of_line();
35941 let handles_before = decoder.remaining_handles();
35942 if let Some((inlined, num_bytes, num_handles)) =
35943 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35944 {
35945 let member_inline_size =
35946 <CompatTableString as fidl::encoding::TypeMarker>::inline_size(decoder.context);
35947 if inlined != (member_inline_size <= 4) {
35948 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35949 }
35950 let inner_offset;
35951 let mut inner_depth = depth.clone();
35952 if inlined {
35953 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35954 inner_offset = next_offset;
35955 } else {
35956 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35957 inner_depth.increment()?;
35958 }
35959 let val_ref =
35960 self.table_member.get_or_insert_with(|| fidl::new_empty!(CompatTableString, D));
35961 fidl::decode!(CompatTableString, D, val_ref, decoder, inner_offset, inner_depth)?;
35962 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35963 {
35964 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35965 }
35966 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35967 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35968 }
35969 }
35970
35971 next_offset += envelope_size;
35972 _next_ordinal_to_read += 1;
35973 if next_offset >= end_offset {
35974 return Ok(());
35975 }
35976
35977 while _next_ordinal_to_read < 4 {
35979 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35980 _next_ordinal_to_read += 1;
35981 next_offset += envelope_size;
35982 }
35983
35984 let next_out_of_line = decoder.next_out_of_line();
35985 let handles_before = decoder.remaining_handles();
35986 if let Some((inlined, num_bytes, num_handles)) =
35987 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35988 {
35989 let member_inline_size =
35990 <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
35991 if inlined != (member_inline_size <= 4) {
35992 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35993 }
35994 let inner_offset;
35995 let mut inner_depth = depth.clone();
35996 if inlined {
35997 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35998 inner_offset = next_offset;
35999 } else {
36000 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36001 inner_depth.increment()?;
36002 }
36003 let val_ref =
36004 self.xunion_member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
36005 fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
36006 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36007 {
36008 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36009 }
36010 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36011 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36012 }
36013 }
36014
36015 next_offset += envelope_size;
36016
36017 while next_offset < end_offset {
36019 _next_ordinal_to_read += 1;
36020 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36021 next_offset += envelope_size;
36022 }
36023
36024 Ok(())
36025 }
36026 }
36027
36028 impl EmptyTable {
36029 #[inline(always)]
36030 fn max_ordinal_present(&self) -> u64 {
36031 0
36032 }
36033 }
36034
36035 impl fidl::encoding::ValueTypeMarker for EmptyTable {
36036 type Borrowed<'a> = &'a Self;
36037 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36038 value
36039 }
36040 }
36041
36042 unsafe impl fidl::encoding::TypeMarker for EmptyTable {
36043 type Owned = Self;
36044
36045 #[inline(always)]
36046 fn inline_align(_context: fidl::encoding::Context) -> usize {
36047 8
36048 }
36049
36050 #[inline(always)]
36051 fn inline_size(_context: fidl::encoding::Context) -> usize {
36052 16
36053 }
36054 }
36055
36056 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyTable, D>
36057 for &EmptyTable
36058 {
36059 unsafe fn encode(
36060 self,
36061 encoder: &mut fidl::encoding::Encoder<'_, D>,
36062 offset: usize,
36063 mut depth: fidl::encoding::Depth,
36064 ) -> fidl::Result<()> {
36065 encoder.debug_check_bounds::<EmptyTable>(offset);
36066 let max_ordinal: u64 = self.max_ordinal_present();
36068 encoder.write_num(max_ordinal, offset);
36069 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36070 if max_ordinal == 0 {
36072 return Ok(());
36073 }
36074 depth.increment()?;
36075 let envelope_size = 8;
36076 let bytes_len = max_ordinal as usize * envelope_size;
36077 #[allow(unused_variables)]
36078 let offset = encoder.out_of_line_offset(bytes_len);
36079 let mut _prev_end_offset: usize = 0;
36080
36081 Ok(())
36082 }
36083 }
36084
36085 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyTable {
36086 #[inline(always)]
36087 fn new_empty() -> Self {
36088 Self::default()
36089 }
36090
36091 unsafe fn decode(
36092 &mut self,
36093 decoder: &mut fidl::encoding::Decoder<'_, D>,
36094 offset: usize,
36095 mut depth: fidl::encoding::Depth,
36096 ) -> fidl::Result<()> {
36097 decoder.debug_check_bounds::<Self>(offset);
36098 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36099 None => return Err(fidl::Error::NotNullable),
36100 Some(len) => len,
36101 };
36102 if len == 0 {
36104 return Ok(());
36105 };
36106 depth.increment()?;
36107 let envelope_size = 8;
36108 let bytes_len = len * envelope_size;
36109 let offset = decoder.out_of_line_offset(bytes_len)?;
36110 let mut _next_ordinal_to_read = 0;
36112 let mut next_offset = offset;
36113 let end_offset = offset + bytes_len;
36114
36115 while next_offset < end_offset {
36117 _next_ordinal_to_read += 1;
36118 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36119 next_offset += envelope_size;
36120 }
36121
36122 Ok(())
36123 }
36124 }
36125
36126 impl FidlvizTable {
36127 #[inline(always)]
36128 fn max_ordinal_present(&self) -> u64 {
36129 if let Some(_) = self.f3 {
36130 return 3;
36131 }
36132 if let Some(_) = self.f1 {
36133 return 1;
36134 }
36135 0
36136 }
36137 }
36138
36139 impl fidl::encoding::ValueTypeMarker for FidlvizTable {
36140 type Borrowed<'a> = &'a Self;
36141 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36142 value
36143 }
36144 }
36145
36146 unsafe impl fidl::encoding::TypeMarker for FidlvizTable {
36147 type Owned = Self;
36148
36149 #[inline(always)]
36150 fn inline_align(_context: fidl::encoding::Context) -> usize {
36151 8
36152 }
36153
36154 #[inline(always)]
36155 fn inline_size(_context: fidl::encoding::Context) -> usize {
36156 16
36157 }
36158 }
36159
36160 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizTable, D>
36161 for &FidlvizTable
36162 {
36163 unsafe fn encode(
36164 self,
36165 encoder: &mut fidl::encoding::Encoder<'_, D>,
36166 offset: usize,
36167 mut depth: fidl::encoding::Depth,
36168 ) -> fidl::Result<()> {
36169 encoder.debug_check_bounds::<FidlvizTable>(offset);
36170 let max_ordinal: u64 = self.max_ordinal_present();
36172 encoder.write_num(max_ordinal, offset);
36173 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36174 if max_ordinal == 0 {
36176 return Ok(());
36177 }
36178 depth.increment()?;
36179 let envelope_size = 8;
36180 let bytes_len = max_ordinal as usize * envelope_size;
36181 #[allow(unused_variables)]
36182 let offset = encoder.out_of_line_offset(bytes_len);
36183 let mut _prev_end_offset: usize = 0;
36184 if 1 > max_ordinal {
36185 return Ok(());
36186 }
36187
36188 let cur_offset: usize = (1 - 1) * envelope_size;
36191
36192 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36194
36195 fidl::encoding::encode_in_envelope_optional::<bool, D>(
36200 self.f1.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
36201 encoder,
36202 offset + cur_offset,
36203 depth,
36204 )?;
36205
36206 _prev_end_offset = cur_offset + envelope_size;
36207 if 3 > max_ordinal {
36208 return Ok(());
36209 }
36210
36211 let cur_offset: usize = (3 - 1) * envelope_size;
36214
36215 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36217
36218 fidl::encoding::encode_in_envelope_optional::<bool, D>(
36223 self.f3.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
36224 encoder,
36225 offset + cur_offset,
36226 depth,
36227 )?;
36228
36229 _prev_end_offset = cur_offset + envelope_size;
36230
36231 Ok(())
36232 }
36233 }
36234
36235 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizTable {
36236 #[inline(always)]
36237 fn new_empty() -> Self {
36238 Self::default()
36239 }
36240
36241 unsafe fn decode(
36242 &mut self,
36243 decoder: &mut fidl::encoding::Decoder<'_, D>,
36244 offset: usize,
36245 mut depth: fidl::encoding::Depth,
36246 ) -> fidl::Result<()> {
36247 decoder.debug_check_bounds::<Self>(offset);
36248 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36249 None => return Err(fidl::Error::NotNullable),
36250 Some(len) => len,
36251 };
36252 if len == 0 {
36254 return Ok(());
36255 };
36256 depth.increment()?;
36257 let envelope_size = 8;
36258 let bytes_len = len * envelope_size;
36259 let offset = decoder.out_of_line_offset(bytes_len)?;
36260 let mut _next_ordinal_to_read = 0;
36262 let mut next_offset = offset;
36263 let end_offset = offset + bytes_len;
36264 _next_ordinal_to_read += 1;
36265 if next_offset >= end_offset {
36266 return Ok(());
36267 }
36268
36269 while _next_ordinal_to_read < 1 {
36271 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36272 _next_ordinal_to_read += 1;
36273 next_offset += envelope_size;
36274 }
36275
36276 let next_out_of_line = decoder.next_out_of_line();
36277 let handles_before = decoder.remaining_handles();
36278 if let Some((inlined, num_bytes, num_handles)) =
36279 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36280 {
36281 let member_inline_size =
36282 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36283 if inlined != (member_inline_size <= 4) {
36284 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36285 }
36286 let inner_offset;
36287 let mut inner_depth = depth.clone();
36288 if inlined {
36289 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36290 inner_offset = next_offset;
36291 } else {
36292 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36293 inner_depth.increment()?;
36294 }
36295 let val_ref = self.f1.get_or_insert_with(|| fidl::new_empty!(bool, D));
36296 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
36297 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36298 {
36299 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36300 }
36301 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36302 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36303 }
36304 }
36305
36306 next_offset += envelope_size;
36307 _next_ordinal_to_read += 1;
36308 if next_offset >= end_offset {
36309 return Ok(());
36310 }
36311
36312 while _next_ordinal_to_read < 3 {
36314 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36315 _next_ordinal_to_read += 1;
36316 next_offset += envelope_size;
36317 }
36318
36319 let next_out_of_line = decoder.next_out_of_line();
36320 let handles_before = decoder.remaining_handles();
36321 if let Some((inlined, num_bytes, num_handles)) =
36322 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36323 {
36324 let member_inline_size =
36325 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36326 if inlined != (member_inline_size <= 4) {
36327 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36328 }
36329 let inner_offset;
36330 let mut inner_depth = depth.clone();
36331 if inlined {
36332 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36333 inner_offset = next_offset;
36334 } else {
36335 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36336 inner_depth.increment()?;
36337 }
36338 let val_ref = self.f3.get_or_insert_with(|| fidl::new_empty!(bool, D));
36339 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
36340 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36341 {
36342 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36343 }
36344 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36345 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36346 }
36347 }
36348
36349 next_offset += envelope_size;
36350
36351 while next_offset < end_offset {
36353 _next_ordinal_to_read += 1;
36354 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36355 next_offset += envelope_size;
36356 }
36357
36358 Ok(())
36359 }
36360 }
36361
36362 impl GoldenTable {
36363 #[inline(always)]
36364 fn max_ordinal_present(&self) -> u64 {
36365 if let Some(_) = self.v {
36366 return 1;
36367 }
36368 0
36369 }
36370 }
36371
36372 impl fidl::encoding::ValueTypeMarker for GoldenTable {
36373 type Borrowed<'a> = &'a Self;
36374 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36375 value
36376 }
36377 }
36378
36379 unsafe impl fidl::encoding::TypeMarker for GoldenTable {
36380 type Owned = Self;
36381
36382 #[inline(always)]
36383 fn inline_align(_context: fidl::encoding::Context) -> usize {
36384 8
36385 }
36386
36387 #[inline(always)]
36388 fn inline_size(_context: fidl::encoding::Context) -> usize {
36389 16
36390 }
36391 }
36392
36393 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTable, D>
36394 for &GoldenTable
36395 {
36396 unsafe fn encode(
36397 self,
36398 encoder: &mut fidl::encoding::Encoder<'_, D>,
36399 offset: usize,
36400 mut depth: fidl::encoding::Depth,
36401 ) -> fidl::Result<()> {
36402 encoder.debug_check_bounds::<GoldenTable>(offset);
36403 let max_ordinal: u64 = self.max_ordinal_present();
36405 encoder.write_num(max_ordinal, offset);
36406 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36407 if max_ordinal == 0 {
36409 return Ok(());
36410 }
36411 depth.increment()?;
36412 let envelope_size = 8;
36413 let bytes_len = max_ordinal as usize * envelope_size;
36414 #[allow(unused_variables)]
36415 let offset = encoder.out_of_line_offset(bytes_len);
36416 let mut _prev_end_offset: usize = 0;
36417 if 1 > max_ordinal {
36418 return Ok(());
36419 }
36420
36421 let cur_offset: usize = (1 - 1) * envelope_size;
36424
36425 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36427
36428 fidl::encoding::encode_in_envelope_optional::<i16, D>(
36433 self.v.as_ref().map(<i16 as fidl::encoding::ValueTypeMarker>::borrow),
36434 encoder,
36435 offset + cur_offset,
36436 depth,
36437 )?;
36438
36439 _prev_end_offset = cur_offset + envelope_size;
36440
36441 Ok(())
36442 }
36443 }
36444
36445 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTable {
36446 #[inline(always)]
36447 fn new_empty() -> Self {
36448 Self::default()
36449 }
36450
36451 unsafe fn decode(
36452 &mut self,
36453 decoder: &mut fidl::encoding::Decoder<'_, D>,
36454 offset: usize,
36455 mut depth: fidl::encoding::Depth,
36456 ) -> fidl::Result<()> {
36457 decoder.debug_check_bounds::<Self>(offset);
36458 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36459 None => return Err(fidl::Error::NotNullable),
36460 Some(len) => len,
36461 };
36462 if len == 0 {
36464 return Ok(());
36465 };
36466 depth.increment()?;
36467 let envelope_size = 8;
36468 let bytes_len = len * envelope_size;
36469 let offset = decoder.out_of_line_offset(bytes_len)?;
36470 let mut _next_ordinal_to_read = 0;
36472 let mut next_offset = offset;
36473 let end_offset = offset + bytes_len;
36474 _next_ordinal_to_read += 1;
36475 if next_offset >= end_offset {
36476 return Ok(());
36477 }
36478
36479 while _next_ordinal_to_read < 1 {
36481 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36482 _next_ordinal_to_read += 1;
36483 next_offset += envelope_size;
36484 }
36485
36486 let next_out_of_line = decoder.next_out_of_line();
36487 let handles_before = decoder.remaining_handles();
36488 if let Some((inlined, num_bytes, num_handles)) =
36489 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36490 {
36491 let member_inline_size =
36492 <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36493 if inlined != (member_inline_size <= 4) {
36494 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36495 }
36496 let inner_offset;
36497 let mut inner_depth = depth.clone();
36498 if inlined {
36499 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36500 inner_offset = next_offset;
36501 } else {
36502 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36503 inner_depth.increment()?;
36504 }
36505 let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i16, D));
36506 fidl::decode!(i16, D, val_ref, decoder, inner_offset, inner_depth)?;
36507 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36508 {
36509 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36510 }
36511 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36512 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36513 }
36514 }
36515
36516 next_offset += envelope_size;
36517
36518 while next_offset < end_offset {
36520 _next_ordinal_to_read += 1;
36521 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36522 next_offset += envelope_size;
36523 }
36524
36525 Ok(())
36526 }
36527 }
36528
36529 impl PaddedTable {
36530 #[inline(always)]
36531 fn max_ordinal_present(&self) -> u64 {
36532 if let Some(_) = self.field {
36533 return 1;
36534 }
36535 0
36536 }
36537 }
36538
36539 impl fidl::encoding::ValueTypeMarker for PaddedTable {
36540 type Borrowed<'a> = &'a Self;
36541 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36542 value
36543 }
36544 }
36545
36546 unsafe impl fidl::encoding::TypeMarker for PaddedTable {
36547 type Owned = Self;
36548
36549 #[inline(always)]
36550 fn inline_align(_context: fidl::encoding::Context) -> usize {
36551 8
36552 }
36553
36554 #[inline(always)]
36555 fn inline_size(_context: fidl::encoding::Context) -> usize {
36556 16
36557 }
36558 }
36559
36560 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTable, D>
36561 for &PaddedTable
36562 {
36563 unsafe fn encode(
36564 self,
36565 encoder: &mut fidl::encoding::Encoder<'_, D>,
36566 offset: usize,
36567 mut depth: fidl::encoding::Depth,
36568 ) -> fidl::Result<()> {
36569 encoder.debug_check_bounds::<PaddedTable>(offset);
36570 let max_ordinal: u64 = self.max_ordinal_present();
36572 encoder.write_num(max_ordinal, offset);
36573 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36574 if max_ordinal == 0 {
36576 return Ok(());
36577 }
36578 depth.increment()?;
36579 let envelope_size = 8;
36580 let bytes_len = max_ordinal as usize * envelope_size;
36581 #[allow(unused_variables)]
36582 let offset = encoder.out_of_line_offset(bytes_len);
36583 let mut _prev_end_offset: usize = 0;
36584 if 1 > max_ordinal {
36585 return Ok(());
36586 }
36587
36588 let cur_offset: usize = (1 - 1) * envelope_size;
36591
36592 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36594
36595 fidl::encoding::encode_in_envelope_optional::<i8, D>(
36600 self.field.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
36601 encoder,
36602 offset + cur_offset,
36603 depth,
36604 )?;
36605
36606 _prev_end_offset = cur_offset + envelope_size;
36607
36608 Ok(())
36609 }
36610 }
36611
36612 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTable {
36613 #[inline(always)]
36614 fn new_empty() -> Self {
36615 Self::default()
36616 }
36617
36618 unsafe fn decode(
36619 &mut self,
36620 decoder: &mut fidl::encoding::Decoder<'_, D>,
36621 offset: usize,
36622 mut depth: fidl::encoding::Depth,
36623 ) -> fidl::Result<()> {
36624 decoder.debug_check_bounds::<Self>(offset);
36625 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36626 None => return Err(fidl::Error::NotNullable),
36627 Some(len) => len,
36628 };
36629 if len == 0 {
36631 return Ok(());
36632 };
36633 depth.increment()?;
36634 let envelope_size = 8;
36635 let bytes_len = len * envelope_size;
36636 let offset = decoder.out_of_line_offset(bytes_len)?;
36637 let mut _next_ordinal_to_read = 0;
36639 let mut next_offset = offset;
36640 let end_offset = offset + bytes_len;
36641 _next_ordinal_to_read += 1;
36642 if next_offset >= end_offset {
36643 return Ok(());
36644 }
36645
36646 while _next_ordinal_to_read < 1 {
36648 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36649 _next_ordinal_to_read += 1;
36650 next_offset += envelope_size;
36651 }
36652
36653 let next_out_of_line = decoder.next_out_of_line();
36654 let handles_before = decoder.remaining_handles();
36655 if let Some((inlined, num_bytes, num_handles)) =
36656 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36657 {
36658 let member_inline_size =
36659 <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36660 if inlined != (member_inline_size <= 4) {
36661 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36662 }
36663 let inner_offset;
36664 let mut inner_depth = depth.clone();
36665 if inlined {
36666 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36667 inner_offset = next_offset;
36668 } else {
36669 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36670 inner_depth.increment()?;
36671 }
36672 let val_ref = self.field.get_or_insert_with(|| fidl::new_empty!(i8, D));
36673 fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
36674 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36675 {
36676 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36677 }
36678 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36679 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36680 }
36681 }
36682
36683 next_offset += envelope_size;
36684
36685 while next_offset < end_offset {
36687 _next_ordinal_to_read += 1;
36688 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36689 next_offset += envelope_size;
36690 }
36691
36692 Ok(())
36693 }
36694 }
36695
36696 impl RecursiveOptionalAndTable {
36697 #[inline(always)]
36698 fn max_ordinal_present(&self) -> u64 {
36699 if let Some(_) = self.recursive_optional {
36700 return 1;
36701 }
36702 0
36703 }
36704 }
36705
36706 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTable {
36707 type Borrowed<'a> = &'a Self;
36708 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36709 value
36710 }
36711 }
36712
36713 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTable {
36714 type Owned = Self;
36715
36716 #[inline(always)]
36717 fn inline_align(_context: fidl::encoding::Context) -> usize {
36718 8
36719 }
36720
36721 #[inline(always)]
36722 fn inline_size(_context: fidl::encoding::Context) -> usize {
36723 16
36724 }
36725 }
36726
36727 unsafe impl<D: fidl::encoding::ResourceDialect>
36728 fidl::encoding::Encode<RecursiveOptionalAndTable, D> for &RecursiveOptionalAndTable
36729 {
36730 unsafe fn encode(
36731 self,
36732 encoder: &mut fidl::encoding::Encoder<'_, D>,
36733 offset: usize,
36734 mut depth: fidl::encoding::Depth,
36735 ) -> fidl::Result<()> {
36736 encoder.debug_check_bounds::<RecursiveOptionalAndTable>(offset);
36737 let max_ordinal: u64 = self.max_ordinal_present();
36739 encoder.write_num(max_ordinal, offset);
36740 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36741 if max_ordinal == 0 {
36743 return Ok(());
36744 }
36745 depth.increment()?;
36746 let envelope_size = 8;
36747 let bytes_len = max_ordinal as usize * envelope_size;
36748 #[allow(unused_variables)]
36749 let offset = encoder.out_of_line_offset(bytes_len);
36750 let mut _prev_end_offset: usize = 0;
36751 if 1 > max_ordinal {
36752 return Ok(());
36753 }
36754
36755 let cur_offset: usize = (1 - 1) * envelope_size;
36758
36759 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36761
36762 fidl::encoding::encode_in_envelope_optional::<RecursiveOptionalStruct, D>(
36767 self.recursive_optional
36768 .as_ref()
36769 .map(<RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow),
36770 encoder,
36771 offset + cur_offset,
36772 depth,
36773 )?;
36774
36775 _prev_end_offset = cur_offset + envelope_size;
36776
36777 Ok(())
36778 }
36779 }
36780
36781 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36782 for RecursiveOptionalAndTable
36783 {
36784 #[inline(always)]
36785 fn new_empty() -> Self {
36786 Self::default()
36787 }
36788
36789 unsafe fn decode(
36790 &mut self,
36791 decoder: &mut fidl::encoding::Decoder<'_, D>,
36792 offset: usize,
36793 mut depth: fidl::encoding::Depth,
36794 ) -> fidl::Result<()> {
36795 decoder.debug_check_bounds::<Self>(offset);
36796 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36797 None => return Err(fidl::Error::NotNullable),
36798 Some(len) => len,
36799 };
36800 if len == 0 {
36802 return Ok(());
36803 };
36804 depth.increment()?;
36805 let envelope_size = 8;
36806 let bytes_len = len * envelope_size;
36807 let offset = decoder.out_of_line_offset(bytes_len)?;
36808 let mut _next_ordinal_to_read = 0;
36810 let mut next_offset = offset;
36811 let end_offset = offset + bytes_len;
36812 _next_ordinal_to_read += 1;
36813 if next_offset >= end_offset {
36814 return Ok(());
36815 }
36816
36817 while _next_ordinal_to_read < 1 {
36819 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36820 _next_ordinal_to_read += 1;
36821 next_offset += envelope_size;
36822 }
36823
36824 let next_out_of_line = decoder.next_out_of_line();
36825 let handles_before = decoder.remaining_handles();
36826 if let Some((inlined, num_bytes, num_handles)) =
36827 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36828 {
36829 let member_inline_size =
36830 <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
36831 decoder.context,
36832 );
36833 if inlined != (member_inline_size <= 4) {
36834 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36835 }
36836 let inner_offset;
36837 let mut inner_depth = depth.clone();
36838 if inlined {
36839 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36840 inner_offset = next_offset;
36841 } else {
36842 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36843 inner_depth.increment()?;
36844 }
36845 let val_ref = self
36846 .recursive_optional
36847 .get_or_insert_with(|| fidl::new_empty!(RecursiveOptionalStruct, D));
36848 fidl::decode!(
36849 RecursiveOptionalStruct,
36850 D,
36851 val_ref,
36852 decoder,
36853 inner_offset,
36854 inner_depth
36855 )?;
36856 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36857 {
36858 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36859 }
36860 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36861 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36862 }
36863 }
36864
36865 next_offset += envelope_size;
36866
36867 while next_offset < end_offset {
36869 _next_ordinal_to_read += 1;
36870 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36871 next_offset += envelope_size;
36872 }
36873
36874 Ok(())
36875 }
36876 }
36877
36878 impl RecursiveTable {
36879 #[inline(always)]
36880 fn max_ordinal_present(&self) -> u64 {
36881 if let Some(_) = self.s {
36882 return 1;
36883 }
36884 0
36885 }
36886 }
36887
36888 impl fidl::encoding::ValueTypeMarker for RecursiveTable {
36889 type Borrowed<'a> = &'a Self;
36890 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36891 value
36892 }
36893 }
36894
36895 unsafe impl fidl::encoding::TypeMarker for RecursiveTable {
36896 type Owned = Self;
36897
36898 #[inline(always)]
36899 fn inline_align(_context: fidl::encoding::Context) -> usize {
36900 8
36901 }
36902
36903 #[inline(always)]
36904 fn inline_size(_context: fidl::encoding::Context) -> usize {
36905 16
36906 }
36907 }
36908
36909 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTable, D>
36910 for &RecursiveTable
36911 {
36912 unsafe fn encode(
36913 self,
36914 encoder: &mut fidl::encoding::Encoder<'_, D>,
36915 offset: usize,
36916 mut depth: fidl::encoding::Depth,
36917 ) -> fidl::Result<()> {
36918 encoder.debug_check_bounds::<RecursiveTable>(offset);
36919 let max_ordinal: u64 = self.max_ordinal_present();
36921 encoder.write_num(max_ordinal, offset);
36922 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36923 if max_ordinal == 0 {
36925 return Ok(());
36926 }
36927 depth.increment()?;
36928 let envelope_size = 8;
36929 let bytes_len = max_ordinal as usize * envelope_size;
36930 #[allow(unused_variables)]
36931 let offset = encoder.out_of_line_offset(bytes_len);
36932 let mut _prev_end_offset: usize = 0;
36933 if 1 > max_ordinal {
36934 return Ok(());
36935 }
36936
36937 let cur_offset: usize = (1 - 1) * envelope_size;
36940
36941 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36943
36944 fidl::encoding::encode_in_envelope_optional::<RecursiveTableOptionalHolder, D>(
36949 self.s
36950 .as_ref()
36951 .map(<RecursiveTableOptionalHolder as fidl::encoding::ValueTypeMarker>::borrow),
36952 encoder,
36953 offset + cur_offset,
36954 depth,
36955 )?;
36956
36957 _prev_end_offset = cur_offset + envelope_size;
36958
36959 Ok(())
36960 }
36961 }
36962
36963 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTable {
36964 #[inline(always)]
36965 fn new_empty() -> Self {
36966 Self::default()
36967 }
36968
36969 unsafe fn decode(
36970 &mut self,
36971 decoder: &mut fidl::encoding::Decoder<'_, D>,
36972 offset: usize,
36973 mut depth: fidl::encoding::Depth,
36974 ) -> fidl::Result<()> {
36975 decoder.debug_check_bounds::<Self>(offset);
36976 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36977 None => return Err(fidl::Error::NotNullable),
36978 Some(len) => len,
36979 };
36980 if len == 0 {
36982 return Ok(());
36983 };
36984 depth.increment()?;
36985 let envelope_size = 8;
36986 let bytes_len = len * envelope_size;
36987 let offset = decoder.out_of_line_offset(bytes_len)?;
36988 let mut _next_ordinal_to_read = 0;
36990 let mut next_offset = offset;
36991 let end_offset = offset + bytes_len;
36992 _next_ordinal_to_read += 1;
36993 if next_offset >= end_offset {
36994 return Ok(());
36995 }
36996
36997 while _next_ordinal_to_read < 1 {
36999 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37000 _next_ordinal_to_read += 1;
37001 next_offset += envelope_size;
37002 }
37003
37004 let next_out_of_line = decoder.next_out_of_line();
37005 let handles_before = decoder.remaining_handles();
37006 if let Some((inlined, num_bytes, num_handles)) =
37007 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37008 {
37009 let member_inline_size =
37010 <RecursiveTableOptionalHolder as fidl::encoding::TypeMarker>::inline_size(
37011 decoder.context,
37012 );
37013 if inlined != (member_inline_size <= 4) {
37014 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37015 }
37016 let inner_offset;
37017 let mut inner_depth = depth.clone();
37018 if inlined {
37019 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37020 inner_offset = next_offset;
37021 } else {
37022 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37023 inner_depth.increment()?;
37024 }
37025 let val_ref =
37026 self.s.get_or_insert_with(|| fidl::new_empty!(RecursiveTableOptionalHolder, D));
37027 fidl::decode!(
37028 RecursiveTableOptionalHolder,
37029 D,
37030 val_ref,
37031 decoder,
37032 inner_offset,
37033 inner_depth
37034 )?;
37035 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37036 {
37037 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37038 }
37039 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37040 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37041 }
37042 }
37043
37044 next_offset += envelope_size;
37045
37046 while next_offset < end_offset {
37048 _next_ordinal_to_read += 1;
37049 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37050 next_offset += envelope_size;
37051 }
37052
37053 Ok(())
37054 }
37055 }
37056
37057 impl Regression10TableV1 {
37058 #[inline(always)]
37059 fn max_ordinal_present(&self) -> u64 {
37060 if let Some(_) = self.member1 {
37061 return 1;
37062 }
37063 0
37064 }
37065 }
37066
37067 impl fidl::encoding::ValueTypeMarker for Regression10TableV1 {
37068 type Borrowed<'a> = &'a Self;
37069 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37070 value
37071 }
37072 }
37073
37074 unsafe impl fidl::encoding::TypeMarker for Regression10TableV1 {
37075 type Owned = Self;
37076
37077 #[inline(always)]
37078 fn inline_align(_context: fidl::encoding::Context) -> usize {
37079 8
37080 }
37081
37082 #[inline(always)]
37083 fn inline_size(_context: fidl::encoding::Context) -> usize {
37084 16
37085 }
37086 }
37087
37088 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV1, D>
37089 for &Regression10TableV1
37090 {
37091 unsafe fn encode(
37092 self,
37093 encoder: &mut fidl::encoding::Encoder<'_, D>,
37094 offset: usize,
37095 mut depth: fidl::encoding::Depth,
37096 ) -> fidl::Result<()> {
37097 encoder.debug_check_bounds::<Regression10TableV1>(offset);
37098 let max_ordinal: u64 = self.max_ordinal_present();
37100 encoder.write_num(max_ordinal, offset);
37101 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37102 if max_ordinal == 0 {
37104 return Ok(());
37105 }
37106 depth.increment()?;
37107 let envelope_size = 8;
37108 let bytes_len = max_ordinal as usize * envelope_size;
37109 #[allow(unused_variables)]
37110 let offset = encoder.out_of_line_offset(bytes_len);
37111 let mut _prev_end_offset: usize = 0;
37112 if 1 > max_ordinal {
37113 return Ok(());
37114 }
37115
37116 let cur_offset: usize = (1 - 1) * envelope_size;
37119
37120 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37122
37123 fidl::encoding::encode_in_envelope_optional::<u64, D>(
37128 self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
37129 encoder,
37130 offset + cur_offset,
37131 depth,
37132 )?;
37133
37134 _prev_end_offset = cur_offset + envelope_size;
37135
37136 Ok(())
37137 }
37138 }
37139
37140 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV1 {
37141 #[inline(always)]
37142 fn new_empty() -> Self {
37143 Self::default()
37144 }
37145
37146 unsafe fn decode(
37147 &mut self,
37148 decoder: &mut fidl::encoding::Decoder<'_, D>,
37149 offset: usize,
37150 mut depth: fidl::encoding::Depth,
37151 ) -> fidl::Result<()> {
37152 decoder.debug_check_bounds::<Self>(offset);
37153 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37154 None => return Err(fidl::Error::NotNullable),
37155 Some(len) => len,
37156 };
37157 if len == 0 {
37159 return Ok(());
37160 };
37161 depth.increment()?;
37162 let envelope_size = 8;
37163 let bytes_len = len * envelope_size;
37164 let offset = decoder.out_of_line_offset(bytes_len)?;
37165 let mut _next_ordinal_to_read = 0;
37167 let mut next_offset = offset;
37168 let end_offset = offset + bytes_len;
37169 _next_ordinal_to_read += 1;
37170 if next_offset >= end_offset {
37171 return Ok(());
37172 }
37173
37174 while _next_ordinal_to_read < 1 {
37176 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37177 _next_ordinal_to_read += 1;
37178 next_offset += envelope_size;
37179 }
37180
37181 let next_out_of_line = decoder.next_out_of_line();
37182 let handles_before = decoder.remaining_handles();
37183 if let Some((inlined, num_bytes, num_handles)) =
37184 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37185 {
37186 let member_inline_size =
37187 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37188 if inlined != (member_inline_size <= 4) {
37189 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37190 }
37191 let inner_offset;
37192 let mut inner_depth = depth.clone();
37193 if inlined {
37194 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37195 inner_offset = next_offset;
37196 } else {
37197 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37198 inner_depth.increment()?;
37199 }
37200 let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
37201 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
37202 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37203 {
37204 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37205 }
37206 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37207 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37208 }
37209 }
37210
37211 next_offset += envelope_size;
37212
37213 while next_offset < end_offset {
37215 _next_ordinal_to_read += 1;
37216 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37217 next_offset += envelope_size;
37218 }
37219
37220 Ok(())
37221 }
37222 }
37223
37224 impl Regression10TableV2 {
37225 #[inline(always)]
37226 fn max_ordinal_present(&self) -> u64 {
37227 if let Some(_) = self.member2 {
37228 return 5;
37229 }
37230 if let Some(_) = self.member1 {
37231 return 1;
37232 }
37233 0
37234 }
37235 }
37236
37237 impl fidl::encoding::ValueTypeMarker for Regression10TableV2 {
37238 type Borrowed<'a> = &'a Self;
37239 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37240 value
37241 }
37242 }
37243
37244 unsafe impl fidl::encoding::TypeMarker for Regression10TableV2 {
37245 type Owned = Self;
37246
37247 #[inline(always)]
37248 fn inline_align(_context: fidl::encoding::Context) -> usize {
37249 8
37250 }
37251
37252 #[inline(always)]
37253 fn inline_size(_context: fidl::encoding::Context) -> usize {
37254 16
37255 }
37256 }
37257
37258 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV2, D>
37259 for &Regression10TableV2
37260 {
37261 unsafe fn encode(
37262 self,
37263 encoder: &mut fidl::encoding::Encoder<'_, D>,
37264 offset: usize,
37265 mut depth: fidl::encoding::Depth,
37266 ) -> fidl::Result<()> {
37267 encoder.debug_check_bounds::<Regression10TableV2>(offset);
37268 let max_ordinal: u64 = self.max_ordinal_present();
37270 encoder.write_num(max_ordinal, offset);
37271 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37272 if max_ordinal == 0 {
37274 return Ok(());
37275 }
37276 depth.increment()?;
37277 let envelope_size = 8;
37278 let bytes_len = max_ordinal as usize * envelope_size;
37279 #[allow(unused_variables)]
37280 let offset = encoder.out_of_line_offset(bytes_len);
37281 let mut _prev_end_offset: usize = 0;
37282 if 1 > max_ordinal {
37283 return Ok(());
37284 }
37285
37286 let cur_offset: usize = (1 - 1) * envelope_size;
37289
37290 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37292
37293 fidl::encoding::encode_in_envelope_optional::<u64, D>(
37298 self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
37299 encoder,
37300 offset + cur_offset,
37301 depth,
37302 )?;
37303
37304 _prev_end_offset = cur_offset + envelope_size;
37305 if 5 > max_ordinal {
37306 return Ok(());
37307 }
37308
37309 let cur_offset: usize = (5 - 1) * envelope_size;
37312
37313 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37315
37316 fidl::encoding::encode_in_envelope_optional::<u64, D>(
37321 self.member2.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
37322 encoder,
37323 offset + cur_offset,
37324 depth,
37325 )?;
37326
37327 _prev_end_offset = cur_offset + envelope_size;
37328
37329 Ok(())
37330 }
37331 }
37332
37333 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV2 {
37334 #[inline(always)]
37335 fn new_empty() -> Self {
37336 Self::default()
37337 }
37338
37339 unsafe fn decode(
37340 &mut self,
37341 decoder: &mut fidl::encoding::Decoder<'_, D>,
37342 offset: usize,
37343 mut depth: fidl::encoding::Depth,
37344 ) -> fidl::Result<()> {
37345 decoder.debug_check_bounds::<Self>(offset);
37346 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37347 None => return Err(fidl::Error::NotNullable),
37348 Some(len) => len,
37349 };
37350 if len == 0 {
37352 return Ok(());
37353 };
37354 depth.increment()?;
37355 let envelope_size = 8;
37356 let bytes_len = len * envelope_size;
37357 let offset = decoder.out_of_line_offset(bytes_len)?;
37358 let mut _next_ordinal_to_read = 0;
37360 let mut next_offset = offset;
37361 let end_offset = offset + bytes_len;
37362 _next_ordinal_to_read += 1;
37363 if next_offset >= end_offset {
37364 return Ok(());
37365 }
37366
37367 while _next_ordinal_to_read < 1 {
37369 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37370 _next_ordinal_to_read += 1;
37371 next_offset += envelope_size;
37372 }
37373
37374 let next_out_of_line = decoder.next_out_of_line();
37375 let handles_before = decoder.remaining_handles();
37376 if let Some((inlined, num_bytes, num_handles)) =
37377 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37378 {
37379 let member_inline_size =
37380 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37381 if inlined != (member_inline_size <= 4) {
37382 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37383 }
37384 let inner_offset;
37385 let mut inner_depth = depth.clone();
37386 if inlined {
37387 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37388 inner_offset = next_offset;
37389 } else {
37390 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37391 inner_depth.increment()?;
37392 }
37393 let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
37394 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
37395 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37396 {
37397 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37398 }
37399 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37400 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37401 }
37402 }
37403
37404 next_offset += envelope_size;
37405 _next_ordinal_to_read += 1;
37406 if next_offset >= end_offset {
37407 return Ok(());
37408 }
37409
37410 while _next_ordinal_to_read < 5 {
37412 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37413 _next_ordinal_to_read += 1;
37414 next_offset += envelope_size;
37415 }
37416
37417 let next_out_of_line = decoder.next_out_of_line();
37418 let handles_before = decoder.remaining_handles();
37419 if let Some((inlined, num_bytes, num_handles)) =
37420 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37421 {
37422 let member_inline_size =
37423 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37424 if inlined != (member_inline_size <= 4) {
37425 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37426 }
37427 let inner_offset;
37428 let mut inner_depth = depth.clone();
37429 if inlined {
37430 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37431 inner_offset = next_offset;
37432 } else {
37433 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37434 inner_depth.increment()?;
37435 }
37436 let val_ref = self.member2.get_or_insert_with(|| fidl::new_empty!(u64, D));
37437 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
37438 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37439 {
37440 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37441 }
37442 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37443 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37444 }
37445 }
37446
37447 next_offset += envelope_size;
37448
37449 while next_offset < end_offset {
37451 _next_ordinal_to_read += 1;
37452 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37453 next_offset += envelope_size;
37454 }
37455
37456 Ok(())
37457 }
37458 }
37459
37460 impl Regression10TableV3 {
37461 #[inline(always)]
37462 fn max_ordinal_present(&self) -> u64 {
37463 if let Some(_) = self.z {
37464 return 6;
37465 }
37466 if let Some(_) = self.y {
37467 return 5;
37468 }
37469 if let Some(_) = self.x {
37470 return 1;
37471 }
37472 0
37473 }
37474 }
37475
37476 impl fidl::encoding::ValueTypeMarker for Regression10TableV3 {
37477 type Borrowed<'a> = &'a Self;
37478 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37479 value
37480 }
37481 }
37482
37483 unsafe impl fidl::encoding::TypeMarker for Regression10TableV3 {
37484 type Owned = Self;
37485
37486 #[inline(always)]
37487 fn inline_align(_context: fidl::encoding::Context) -> usize {
37488 8
37489 }
37490
37491 #[inline(always)]
37492 fn inline_size(_context: fidl::encoding::Context) -> usize {
37493 16
37494 }
37495 }
37496
37497 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV3, D>
37498 for &Regression10TableV3
37499 {
37500 unsafe fn encode(
37501 self,
37502 encoder: &mut fidl::encoding::Encoder<'_, D>,
37503 offset: usize,
37504 mut depth: fidl::encoding::Depth,
37505 ) -> fidl::Result<()> {
37506 encoder.debug_check_bounds::<Regression10TableV3>(offset);
37507 let max_ordinal: u64 = self.max_ordinal_present();
37509 encoder.write_num(max_ordinal, offset);
37510 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37511 if max_ordinal == 0 {
37513 return Ok(());
37514 }
37515 depth.increment()?;
37516 let envelope_size = 8;
37517 let bytes_len = max_ordinal as usize * envelope_size;
37518 #[allow(unused_variables)]
37519 let offset = encoder.out_of_line_offset(bytes_len);
37520 let mut _prev_end_offset: usize = 0;
37521 if 1 > max_ordinal {
37522 return Ok(());
37523 }
37524
37525 let cur_offset: usize = (1 - 1) * envelope_size;
37528
37529 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37531
37532 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37537 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37538 encoder,
37539 offset + cur_offset,
37540 depth,
37541 )?;
37542
37543 _prev_end_offset = cur_offset + envelope_size;
37544 if 5 > max_ordinal {
37545 return Ok(());
37546 }
37547
37548 let cur_offset: usize = (5 - 1) * envelope_size;
37551
37552 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37554
37555 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37560 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37561 encoder,
37562 offset + cur_offset,
37563 depth,
37564 )?;
37565
37566 _prev_end_offset = cur_offset + envelope_size;
37567 if 6 > max_ordinal {
37568 return Ok(());
37569 }
37570
37571 let cur_offset: usize = (6 - 1) * envelope_size;
37574
37575 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37577
37578 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37583 self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37584 encoder,
37585 offset + cur_offset,
37586 depth,
37587 )?;
37588
37589 _prev_end_offset = cur_offset + envelope_size;
37590
37591 Ok(())
37592 }
37593 }
37594
37595 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV3 {
37596 #[inline(always)]
37597 fn new_empty() -> Self {
37598 Self::default()
37599 }
37600
37601 unsafe fn decode(
37602 &mut self,
37603 decoder: &mut fidl::encoding::Decoder<'_, D>,
37604 offset: usize,
37605 mut depth: fidl::encoding::Depth,
37606 ) -> fidl::Result<()> {
37607 decoder.debug_check_bounds::<Self>(offset);
37608 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37609 None => return Err(fidl::Error::NotNullable),
37610 Some(len) => len,
37611 };
37612 if len == 0 {
37614 return Ok(());
37615 };
37616 depth.increment()?;
37617 let envelope_size = 8;
37618 let bytes_len = len * envelope_size;
37619 let offset = decoder.out_of_line_offset(bytes_len)?;
37620 let mut _next_ordinal_to_read = 0;
37622 let mut next_offset = offset;
37623 let end_offset = offset + bytes_len;
37624 _next_ordinal_to_read += 1;
37625 if next_offset >= end_offset {
37626 return Ok(());
37627 }
37628
37629 while _next_ordinal_to_read < 1 {
37631 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37632 _next_ordinal_to_read += 1;
37633 next_offset += envelope_size;
37634 }
37635
37636 let next_out_of_line = decoder.next_out_of_line();
37637 let handles_before = decoder.remaining_handles();
37638 if let Some((inlined, num_bytes, num_handles)) =
37639 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37640 {
37641 let member_inline_size =
37642 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37643 if inlined != (member_inline_size <= 4) {
37644 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37645 }
37646 let inner_offset;
37647 let mut inner_depth = depth.clone();
37648 if inlined {
37649 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37650 inner_offset = next_offset;
37651 } else {
37652 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37653 inner_depth.increment()?;
37654 }
37655 let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
37656 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37657 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37658 {
37659 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37660 }
37661 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37662 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37663 }
37664 }
37665
37666 next_offset += envelope_size;
37667 _next_ordinal_to_read += 1;
37668 if next_offset >= end_offset {
37669 return Ok(());
37670 }
37671
37672 while _next_ordinal_to_read < 5 {
37674 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37675 _next_ordinal_to_read += 1;
37676 next_offset += envelope_size;
37677 }
37678
37679 let next_out_of_line = decoder.next_out_of_line();
37680 let handles_before = decoder.remaining_handles();
37681 if let Some((inlined, num_bytes, num_handles)) =
37682 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37683 {
37684 let member_inline_size =
37685 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37686 if inlined != (member_inline_size <= 4) {
37687 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37688 }
37689 let inner_offset;
37690 let mut inner_depth = depth.clone();
37691 if inlined {
37692 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37693 inner_offset = next_offset;
37694 } else {
37695 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37696 inner_depth.increment()?;
37697 }
37698 let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
37699 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37700 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37701 {
37702 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37703 }
37704 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37705 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37706 }
37707 }
37708
37709 next_offset += envelope_size;
37710 _next_ordinal_to_read += 1;
37711 if next_offset >= end_offset {
37712 return Ok(());
37713 }
37714
37715 while _next_ordinal_to_read < 6 {
37717 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37718 _next_ordinal_to_read += 1;
37719 next_offset += envelope_size;
37720 }
37721
37722 let next_out_of_line = decoder.next_out_of_line();
37723 let handles_before = decoder.remaining_handles();
37724 if let Some((inlined, num_bytes, num_handles)) =
37725 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37726 {
37727 let member_inline_size =
37728 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37729 if inlined != (member_inline_size <= 4) {
37730 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37731 }
37732 let inner_offset;
37733 let mut inner_depth = depth.clone();
37734 if inlined {
37735 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37736 inner_offset = next_offset;
37737 } else {
37738 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37739 inner_depth.increment()?;
37740 }
37741 let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
37742 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37743 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37744 {
37745 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37746 }
37747 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37748 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37749 }
37750 }
37751
37752 next_offset += envelope_size;
37753
37754 while next_offset < end_offset {
37756 _next_ordinal_to_read += 1;
37757 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37758 next_offset += envelope_size;
37759 }
37760
37761 Ok(())
37762 }
37763 }
37764
37765 impl ReverseOrdinalTable {
37766 #[inline(always)]
37767 fn max_ordinal_present(&self) -> u64 {
37768 if let Some(_) = self.x {
37769 return 4;
37770 }
37771 if let Some(_) = self.y {
37772 return 2;
37773 }
37774 if let Some(_) = self.z {
37775 return 1;
37776 }
37777 0
37778 }
37779 }
37780
37781 impl fidl::encoding::ValueTypeMarker for ReverseOrdinalTable {
37782 type Borrowed<'a> = &'a Self;
37783 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37784 value
37785 }
37786 }
37787
37788 unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalTable {
37789 type Owned = Self;
37790
37791 #[inline(always)]
37792 fn inline_align(_context: fidl::encoding::Context) -> usize {
37793 8
37794 }
37795
37796 #[inline(always)]
37797 fn inline_size(_context: fidl::encoding::Context) -> usize {
37798 16
37799 }
37800 }
37801
37802 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalTable, D>
37803 for &ReverseOrdinalTable
37804 {
37805 unsafe fn encode(
37806 self,
37807 encoder: &mut fidl::encoding::Encoder<'_, D>,
37808 offset: usize,
37809 mut depth: fidl::encoding::Depth,
37810 ) -> fidl::Result<()> {
37811 encoder.debug_check_bounds::<ReverseOrdinalTable>(offset);
37812 let max_ordinal: u64 = self.max_ordinal_present();
37814 encoder.write_num(max_ordinal, offset);
37815 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37816 if max_ordinal == 0 {
37818 return Ok(());
37819 }
37820 depth.increment()?;
37821 let envelope_size = 8;
37822 let bytes_len = max_ordinal as usize * envelope_size;
37823 #[allow(unused_variables)]
37824 let offset = encoder.out_of_line_offset(bytes_len);
37825 let mut _prev_end_offset: usize = 0;
37826 if 1 > max_ordinal {
37827 return Ok(());
37828 }
37829
37830 let cur_offset: usize = (1 - 1) * envelope_size;
37833
37834 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37836
37837 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37842 self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37843 encoder,
37844 offset + cur_offset,
37845 depth,
37846 )?;
37847
37848 _prev_end_offset = cur_offset + envelope_size;
37849 if 2 > max_ordinal {
37850 return Ok(());
37851 }
37852
37853 let cur_offset: usize = (2 - 1) * envelope_size;
37856
37857 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37859
37860 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37865 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37866 encoder,
37867 offset + cur_offset,
37868 depth,
37869 )?;
37870
37871 _prev_end_offset = cur_offset + envelope_size;
37872 if 4 > max_ordinal {
37873 return Ok(());
37874 }
37875
37876 let cur_offset: usize = (4 - 1) * envelope_size;
37879
37880 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37882
37883 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37888 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37889 encoder,
37890 offset + cur_offset,
37891 depth,
37892 )?;
37893
37894 _prev_end_offset = cur_offset + envelope_size;
37895
37896 Ok(())
37897 }
37898 }
37899
37900 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalTable {
37901 #[inline(always)]
37902 fn new_empty() -> Self {
37903 Self::default()
37904 }
37905
37906 unsafe fn decode(
37907 &mut self,
37908 decoder: &mut fidl::encoding::Decoder<'_, D>,
37909 offset: usize,
37910 mut depth: fidl::encoding::Depth,
37911 ) -> fidl::Result<()> {
37912 decoder.debug_check_bounds::<Self>(offset);
37913 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37914 None => return Err(fidl::Error::NotNullable),
37915 Some(len) => len,
37916 };
37917 if len == 0 {
37919 return Ok(());
37920 };
37921 depth.increment()?;
37922 let envelope_size = 8;
37923 let bytes_len = len * envelope_size;
37924 let offset = decoder.out_of_line_offset(bytes_len)?;
37925 let mut _next_ordinal_to_read = 0;
37927 let mut next_offset = offset;
37928 let end_offset = offset + bytes_len;
37929 _next_ordinal_to_read += 1;
37930 if next_offset >= end_offset {
37931 return Ok(());
37932 }
37933
37934 while _next_ordinal_to_read < 1 {
37936 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37937 _next_ordinal_to_read += 1;
37938 next_offset += envelope_size;
37939 }
37940
37941 let next_out_of_line = decoder.next_out_of_line();
37942 let handles_before = decoder.remaining_handles();
37943 if let Some((inlined, num_bytes, num_handles)) =
37944 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37945 {
37946 let member_inline_size =
37947 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37948 if inlined != (member_inline_size <= 4) {
37949 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37950 }
37951 let inner_offset;
37952 let mut inner_depth = depth.clone();
37953 if inlined {
37954 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37955 inner_offset = next_offset;
37956 } else {
37957 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37958 inner_depth.increment()?;
37959 }
37960 let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
37961 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37962 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37963 {
37964 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37965 }
37966 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37967 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37968 }
37969 }
37970
37971 next_offset += envelope_size;
37972 _next_ordinal_to_read += 1;
37973 if next_offset >= end_offset {
37974 return Ok(());
37975 }
37976
37977 while _next_ordinal_to_read < 2 {
37979 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37980 _next_ordinal_to_read += 1;
37981 next_offset += envelope_size;
37982 }
37983
37984 let next_out_of_line = decoder.next_out_of_line();
37985 let handles_before = decoder.remaining_handles();
37986 if let Some((inlined, num_bytes, num_handles)) =
37987 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37988 {
37989 let member_inline_size =
37990 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37991 if inlined != (member_inline_size <= 4) {
37992 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37993 }
37994 let inner_offset;
37995 let mut inner_depth = depth.clone();
37996 if inlined {
37997 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37998 inner_offset = next_offset;
37999 } else {
38000 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38001 inner_depth.increment()?;
38002 }
38003 let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38004 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38005 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38006 {
38007 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38008 }
38009 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38010 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38011 }
38012 }
38013
38014 next_offset += envelope_size;
38015 _next_ordinal_to_read += 1;
38016 if next_offset >= end_offset {
38017 return Ok(());
38018 }
38019
38020 while _next_ordinal_to_read < 4 {
38022 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38023 _next_ordinal_to_read += 1;
38024 next_offset += envelope_size;
38025 }
38026
38027 let next_out_of_line = decoder.next_out_of_line();
38028 let handles_before = decoder.remaining_handles();
38029 if let Some((inlined, num_bytes, num_handles)) =
38030 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38031 {
38032 let member_inline_size =
38033 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38034 if inlined != (member_inline_size <= 4) {
38035 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38036 }
38037 let inner_offset;
38038 let mut inner_depth = depth.clone();
38039 if inlined {
38040 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38041 inner_offset = next_offset;
38042 } else {
38043 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38044 inner_depth.increment()?;
38045 }
38046 let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38047 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38048 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38049 {
38050 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38051 }
38052 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38053 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38054 }
38055 }
38056
38057 next_offset += envelope_size;
38058
38059 while next_offset < end_offset {
38061 _next_ordinal_to_read += 1;
38062 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38063 next_offset += envelope_size;
38064 }
38065
38066 Ok(())
38067 }
38068 }
38069
38070 impl SimpleTable {
38071 #[inline(always)]
38072 fn max_ordinal_present(&self) -> u64 {
38073 if let Some(_) = self.y {
38074 return 5;
38075 }
38076 if let Some(_) = self.x {
38077 return 1;
38078 }
38079 0
38080 }
38081 }
38082
38083 impl fidl::encoding::ValueTypeMarker for SimpleTable {
38084 type Borrowed<'a> = &'a Self;
38085 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38086 value
38087 }
38088 }
38089
38090 unsafe impl fidl::encoding::TypeMarker for SimpleTable {
38091 type Owned = Self;
38092
38093 #[inline(always)]
38094 fn inline_align(_context: fidl::encoding::Context) -> usize {
38095 8
38096 }
38097
38098 #[inline(always)]
38099 fn inline_size(_context: fidl::encoding::Context) -> usize {
38100 16
38101 }
38102 }
38103
38104 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTable, D>
38105 for &SimpleTable
38106 {
38107 unsafe fn encode(
38108 self,
38109 encoder: &mut fidl::encoding::Encoder<'_, D>,
38110 offset: usize,
38111 mut depth: fidl::encoding::Depth,
38112 ) -> fidl::Result<()> {
38113 encoder.debug_check_bounds::<SimpleTable>(offset);
38114 let max_ordinal: u64 = self.max_ordinal_present();
38116 encoder.write_num(max_ordinal, offset);
38117 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38118 if max_ordinal == 0 {
38120 return Ok(());
38121 }
38122 depth.increment()?;
38123 let envelope_size = 8;
38124 let bytes_len = max_ordinal as usize * envelope_size;
38125 #[allow(unused_variables)]
38126 let offset = encoder.out_of_line_offset(bytes_len);
38127 let mut _prev_end_offset: usize = 0;
38128 if 1 > max_ordinal {
38129 return Ok(());
38130 }
38131
38132 let cur_offset: usize = (1 - 1) * envelope_size;
38135
38136 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38138
38139 fidl::encoding::encode_in_envelope_optional::<i64, D>(
38144 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38145 encoder,
38146 offset + cur_offset,
38147 depth,
38148 )?;
38149
38150 _prev_end_offset = cur_offset + envelope_size;
38151 if 5 > max_ordinal {
38152 return Ok(());
38153 }
38154
38155 let cur_offset: usize = (5 - 1) * envelope_size;
38158
38159 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38161
38162 fidl::encoding::encode_in_envelope_optional::<i64, D>(
38167 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38168 encoder,
38169 offset + cur_offset,
38170 depth,
38171 )?;
38172
38173 _prev_end_offset = cur_offset + envelope_size;
38174
38175 Ok(())
38176 }
38177 }
38178
38179 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTable {
38180 #[inline(always)]
38181 fn new_empty() -> Self {
38182 Self::default()
38183 }
38184
38185 unsafe fn decode(
38186 &mut self,
38187 decoder: &mut fidl::encoding::Decoder<'_, D>,
38188 offset: usize,
38189 mut depth: fidl::encoding::Depth,
38190 ) -> fidl::Result<()> {
38191 decoder.debug_check_bounds::<Self>(offset);
38192 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38193 None => return Err(fidl::Error::NotNullable),
38194 Some(len) => len,
38195 };
38196 if len == 0 {
38198 return Ok(());
38199 };
38200 depth.increment()?;
38201 let envelope_size = 8;
38202 let bytes_len = len * envelope_size;
38203 let offset = decoder.out_of_line_offset(bytes_len)?;
38204 let mut _next_ordinal_to_read = 0;
38206 let mut next_offset = offset;
38207 let end_offset = offset + bytes_len;
38208 _next_ordinal_to_read += 1;
38209 if next_offset >= end_offset {
38210 return Ok(());
38211 }
38212
38213 while _next_ordinal_to_read < 1 {
38215 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38216 _next_ordinal_to_read += 1;
38217 next_offset += envelope_size;
38218 }
38219
38220 let next_out_of_line = decoder.next_out_of_line();
38221 let handles_before = decoder.remaining_handles();
38222 if let Some((inlined, num_bytes, num_handles)) =
38223 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38224 {
38225 let member_inline_size =
38226 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38227 if inlined != (member_inline_size <= 4) {
38228 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38229 }
38230 let inner_offset;
38231 let mut inner_depth = depth.clone();
38232 if inlined {
38233 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38234 inner_offset = next_offset;
38235 } else {
38236 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38237 inner_depth.increment()?;
38238 }
38239 let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38240 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38241 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38242 {
38243 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38244 }
38245 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38246 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38247 }
38248 }
38249
38250 next_offset += envelope_size;
38251 _next_ordinal_to_read += 1;
38252 if next_offset >= end_offset {
38253 return Ok(());
38254 }
38255
38256 while _next_ordinal_to_read < 5 {
38258 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38259 _next_ordinal_to_read += 1;
38260 next_offset += envelope_size;
38261 }
38262
38263 let next_out_of_line = decoder.next_out_of_line();
38264 let handles_before = decoder.remaining_handles();
38265 if let Some((inlined, num_bytes, num_handles)) =
38266 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38267 {
38268 let member_inline_size =
38269 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38270 if inlined != (member_inline_size <= 4) {
38271 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38272 }
38273 let inner_offset;
38274 let mut inner_depth = depth.clone();
38275 if inlined {
38276 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38277 inner_offset = next_offset;
38278 } else {
38279 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38280 inner_depth.increment()?;
38281 }
38282 let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38283 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38284 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38285 {
38286 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38287 }
38288 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38289 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38290 }
38291 }
38292
38293 next_offset += envelope_size;
38294
38295 while next_offset < end_offset {
38297 _next_ordinal_to_read += 1;
38298 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38299 next_offset += envelope_size;
38300 }
38301
38302 Ok(())
38303 }
38304 }
38305
38306 impl TableFieldInlined {
38307 #[inline(always)]
38308 fn max_ordinal_present(&self) -> u64 {
38309 if let Some(_) = self.f {
38310 return 1;
38311 }
38312 0
38313 }
38314 }
38315
38316 impl fidl::encoding::ValueTypeMarker for TableFieldInlined {
38317 type Borrowed<'a> = &'a Self;
38318 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38319 value
38320 }
38321 }
38322
38323 unsafe impl fidl::encoding::TypeMarker for TableFieldInlined {
38324 type Owned = Self;
38325
38326 #[inline(always)]
38327 fn inline_align(_context: fidl::encoding::Context) -> usize {
38328 8
38329 }
38330
38331 #[inline(always)]
38332 fn inline_size(_context: fidl::encoding::Context) -> usize {
38333 16
38334 }
38335 }
38336
38337 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldInlined, D>
38338 for &TableFieldInlined
38339 {
38340 unsafe fn encode(
38341 self,
38342 encoder: &mut fidl::encoding::Encoder<'_, D>,
38343 offset: usize,
38344 mut depth: fidl::encoding::Depth,
38345 ) -> fidl::Result<()> {
38346 encoder.debug_check_bounds::<TableFieldInlined>(offset);
38347 let max_ordinal: u64 = self.max_ordinal_present();
38349 encoder.write_num(max_ordinal, offset);
38350 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38351 if max_ordinal == 0 {
38353 return Ok(());
38354 }
38355 depth.increment()?;
38356 let envelope_size = 8;
38357 let bytes_len = max_ordinal as usize * envelope_size;
38358 #[allow(unused_variables)]
38359 let offset = encoder.out_of_line_offset(bytes_len);
38360 let mut _prev_end_offset: usize = 0;
38361 if 1 > max_ordinal {
38362 return Ok(());
38363 }
38364
38365 let cur_offset: usize = (1 - 1) * envelope_size;
38368
38369 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38371
38372 fidl::encoding::encode_in_envelope_optional::<i32, D>(
38377 self.f.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
38378 encoder,
38379 offset + cur_offset,
38380 depth,
38381 )?;
38382
38383 _prev_end_offset = cur_offset + envelope_size;
38384
38385 Ok(())
38386 }
38387 }
38388
38389 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldInlined {
38390 #[inline(always)]
38391 fn new_empty() -> Self {
38392 Self::default()
38393 }
38394
38395 unsafe fn decode(
38396 &mut self,
38397 decoder: &mut fidl::encoding::Decoder<'_, D>,
38398 offset: usize,
38399 mut depth: fidl::encoding::Depth,
38400 ) -> fidl::Result<()> {
38401 decoder.debug_check_bounds::<Self>(offset);
38402 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38403 None => return Err(fidl::Error::NotNullable),
38404 Some(len) => len,
38405 };
38406 if len == 0 {
38408 return Ok(());
38409 };
38410 depth.increment()?;
38411 let envelope_size = 8;
38412 let bytes_len = len * envelope_size;
38413 let offset = decoder.out_of_line_offset(bytes_len)?;
38414 let mut _next_ordinal_to_read = 0;
38416 let mut next_offset = offset;
38417 let end_offset = offset + bytes_len;
38418 _next_ordinal_to_read += 1;
38419 if next_offset >= end_offset {
38420 return Ok(());
38421 }
38422
38423 while _next_ordinal_to_read < 1 {
38425 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38426 _next_ordinal_to_read += 1;
38427 next_offset += envelope_size;
38428 }
38429
38430 let next_out_of_line = decoder.next_out_of_line();
38431 let handles_before = decoder.remaining_handles();
38432 if let Some((inlined, num_bytes, num_handles)) =
38433 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38434 {
38435 let member_inline_size =
38436 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38437 if inlined != (member_inline_size <= 4) {
38438 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38439 }
38440 let inner_offset;
38441 let mut inner_depth = depth.clone();
38442 if inlined {
38443 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38444 inner_offset = next_offset;
38445 } else {
38446 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38447 inner_depth.increment()?;
38448 }
38449 let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i32, D));
38450 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
38451 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38452 {
38453 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38454 }
38455 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38456 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38457 }
38458 }
38459
38460 next_offset += envelope_size;
38461
38462 while next_offset < end_offset {
38464 _next_ordinal_to_read += 1;
38465 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38466 next_offset += envelope_size;
38467 }
38468
38469 Ok(())
38470 }
38471 }
38472
38473 impl TableFieldOutOfLine {
38474 #[inline(always)]
38475 fn max_ordinal_present(&self) -> u64 {
38476 if let Some(_) = self.f {
38477 return 1;
38478 }
38479 0
38480 }
38481 }
38482
38483 impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLine {
38484 type Borrowed<'a> = &'a Self;
38485 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38486 value
38487 }
38488 }
38489
38490 unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLine {
38491 type Owned = Self;
38492
38493 #[inline(always)]
38494 fn inline_align(_context: fidl::encoding::Context) -> usize {
38495 8
38496 }
38497
38498 #[inline(always)]
38499 fn inline_size(_context: fidl::encoding::Context) -> usize {
38500 16
38501 }
38502 }
38503
38504 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldOutOfLine, D>
38505 for &TableFieldOutOfLine
38506 {
38507 unsafe fn encode(
38508 self,
38509 encoder: &mut fidl::encoding::Encoder<'_, D>,
38510 offset: usize,
38511 mut depth: fidl::encoding::Depth,
38512 ) -> fidl::Result<()> {
38513 encoder.debug_check_bounds::<TableFieldOutOfLine>(offset);
38514 let max_ordinal: u64 = self.max_ordinal_present();
38516 encoder.write_num(max_ordinal, offset);
38517 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38518 if max_ordinal == 0 {
38520 return Ok(());
38521 }
38522 depth.increment()?;
38523 let envelope_size = 8;
38524 let bytes_len = max_ordinal as usize * envelope_size;
38525 #[allow(unused_variables)]
38526 let offset = encoder.out_of_line_offset(bytes_len);
38527 let mut _prev_end_offset: usize = 0;
38528 if 1 > max_ordinal {
38529 return Ok(());
38530 }
38531
38532 let cur_offset: usize = (1 - 1) * envelope_size;
38535
38536 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38538
38539 fidl::encoding::encode_in_envelope_optional::<i64, D>(
38544 self.f.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38545 encoder,
38546 offset + cur_offset,
38547 depth,
38548 )?;
38549
38550 _prev_end_offset = cur_offset + envelope_size;
38551
38552 Ok(())
38553 }
38554 }
38555
38556 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldOutOfLine {
38557 #[inline(always)]
38558 fn new_empty() -> Self {
38559 Self::default()
38560 }
38561
38562 unsafe fn decode(
38563 &mut self,
38564 decoder: &mut fidl::encoding::Decoder<'_, D>,
38565 offset: usize,
38566 mut depth: fidl::encoding::Depth,
38567 ) -> fidl::Result<()> {
38568 decoder.debug_check_bounds::<Self>(offset);
38569 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38570 None => return Err(fidl::Error::NotNullable),
38571 Some(len) => len,
38572 };
38573 if len == 0 {
38575 return Ok(());
38576 };
38577 depth.increment()?;
38578 let envelope_size = 8;
38579 let bytes_len = len * envelope_size;
38580 let offset = decoder.out_of_line_offset(bytes_len)?;
38581 let mut _next_ordinal_to_read = 0;
38583 let mut next_offset = offset;
38584 let end_offset = offset + bytes_len;
38585 _next_ordinal_to_read += 1;
38586 if next_offset >= end_offset {
38587 return Ok(());
38588 }
38589
38590 while _next_ordinal_to_read < 1 {
38592 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38593 _next_ordinal_to_read += 1;
38594 next_offset += envelope_size;
38595 }
38596
38597 let next_out_of_line = decoder.next_out_of_line();
38598 let handles_before = decoder.remaining_handles();
38599 if let Some((inlined, num_bytes, num_handles)) =
38600 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38601 {
38602 let member_inline_size =
38603 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38604 if inlined != (member_inline_size <= 4) {
38605 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38606 }
38607 let inner_offset;
38608 let mut inner_depth = depth.clone();
38609 if inlined {
38610 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38611 inner_offset = next_offset;
38612 } else {
38613 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38614 inner_depth.increment()?;
38615 }
38616 let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i64, D));
38617 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38618 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38619 {
38620 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38621 }
38622 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38623 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38624 }
38625 }
38626
38627 next_offset += envelope_size;
38628
38629 while next_offset < end_offset {
38631 _next_ordinal_to_read += 1;
38632 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38633 next_offset += envelope_size;
38634 }
38635
38636 Ok(())
38637 }
38638 }
38639
38640 impl TableFieldUnknown {
38641 #[inline(always)]
38642 fn max_ordinal_present(&self) -> u64 {
38643 0
38644 }
38645 }
38646
38647 impl fidl::encoding::ValueTypeMarker for TableFieldUnknown {
38648 type Borrowed<'a> = &'a Self;
38649 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38650 value
38651 }
38652 }
38653
38654 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknown {
38655 type Owned = Self;
38656
38657 #[inline(always)]
38658 fn inline_align(_context: fidl::encoding::Context) -> usize {
38659 8
38660 }
38661
38662 #[inline(always)]
38663 fn inline_size(_context: fidl::encoding::Context) -> usize {
38664 16
38665 }
38666 }
38667
38668 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldUnknown, D>
38669 for &TableFieldUnknown
38670 {
38671 unsafe fn encode(
38672 self,
38673 encoder: &mut fidl::encoding::Encoder<'_, D>,
38674 offset: usize,
38675 mut depth: fidl::encoding::Depth,
38676 ) -> fidl::Result<()> {
38677 encoder.debug_check_bounds::<TableFieldUnknown>(offset);
38678 let max_ordinal: u64 = self.max_ordinal_present();
38680 encoder.write_num(max_ordinal, offset);
38681 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38682 if max_ordinal == 0 {
38684 return Ok(());
38685 }
38686 depth.increment()?;
38687 let envelope_size = 8;
38688 let bytes_len = max_ordinal as usize * envelope_size;
38689 #[allow(unused_variables)]
38690 let offset = encoder.out_of_line_offset(bytes_len);
38691 let mut _prev_end_offset: usize = 0;
38692
38693 Ok(())
38694 }
38695 }
38696
38697 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldUnknown {
38698 #[inline(always)]
38699 fn new_empty() -> Self {
38700 Self::default()
38701 }
38702
38703 unsafe fn decode(
38704 &mut self,
38705 decoder: &mut fidl::encoding::Decoder<'_, D>,
38706 offset: usize,
38707 mut depth: fidl::encoding::Depth,
38708 ) -> fidl::Result<()> {
38709 decoder.debug_check_bounds::<Self>(offset);
38710 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38711 None => return Err(fidl::Error::NotNullable),
38712 Some(len) => len,
38713 };
38714 if len == 0 {
38716 return Ok(());
38717 };
38718 depth.increment()?;
38719 let envelope_size = 8;
38720 let bytes_len = len * envelope_size;
38721 let offset = decoder.out_of_line_offset(bytes_len)?;
38722 let mut _next_ordinal_to_read = 0;
38724 let mut next_offset = offset;
38725 let end_offset = offset + bytes_len;
38726
38727 while next_offset < end_offset {
38729 _next_ordinal_to_read += 1;
38730 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38731 next_offset += envelope_size;
38732 }
38733
38734 Ok(())
38735 }
38736 }
38737
38738 impl TableFieldUnsetFlexibleEnumInlined {
38739 #[inline(always)]
38740 fn max_ordinal_present(&self) -> u64 {
38741 if let Some(_) = self.always_set {
38742 return 3;
38743 }
38744 if let Some(_) = self.unsigned_enum {
38745 return 2;
38746 }
38747 if let Some(_) = self.signed_enum {
38748 return 1;
38749 }
38750 0
38751 }
38752 }
38753
38754 impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlined {
38755 type Borrowed<'a> = &'a Self;
38756 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38757 value
38758 }
38759 }
38760
38761 unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlined {
38762 type Owned = Self;
38763
38764 #[inline(always)]
38765 fn inline_align(_context: fidl::encoding::Context) -> usize {
38766 8
38767 }
38768
38769 #[inline(always)]
38770 fn inline_size(_context: fidl::encoding::Context) -> usize {
38771 16
38772 }
38773 }
38774
38775 unsafe impl<D: fidl::encoding::ResourceDialect>
38776 fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>
38777 for &TableFieldUnsetFlexibleEnumInlined
38778 {
38779 unsafe fn encode(
38780 self,
38781 encoder: &mut fidl::encoding::Encoder<'_, D>,
38782 offset: usize,
38783 mut depth: fidl::encoding::Depth,
38784 ) -> fidl::Result<()> {
38785 encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlined>(offset);
38786 let max_ordinal: u64 = self.max_ordinal_present();
38788 encoder.write_num(max_ordinal, offset);
38789 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38790 if max_ordinal == 0 {
38792 return Ok(());
38793 }
38794 depth.increment()?;
38795 let envelope_size = 8;
38796 let bytes_len = max_ordinal as usize * envelope_size;
38797 #[allow(unused_variables)]
38798 let offset = encoder.out_of_line_offset(bytes_len);
38799 let mut _prev_end_offset: usize = 0;
38800 if 1 > max_ordinal {
38801 return Ok(());
38802 }
38803
38804 let cur_offset: usize = (1 - 1) * envelope_size;
38807
38808 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38810
38811 fidl::encoding::encode_in_envelope_optional::<SignedEnum, D>(
38816 self.signed_enum
38817 .as_ref()
38818 .map(<SignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
38819 encoder,
38820 offset + cur_offset,
38821 depth,
38822 )?;
38823
38824 _prev_end_offset = cur_offset + envelope_size;
38825 if 2 > max_ordinal {
38826 return Ok(());
38827 }
38828
38829 let cur_offset: usize = (2 - 1) * envelope_size;
38832
38833 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38835
38836 fidl::encoding::encode_in_envelope_optional::<UnsignedEnum, D>(
38841 self.unsigned_enum
38842 .as_ref()
38843 .map(<UnsignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
38844 encoder,
38845 offset + cur_offset,
38846 depth,
38847 )?;
38848
38849 _prev_end_offset = cur_offset + envelope_size;
38850 if 3 > max_ordinal {
38851 return Ok(());
38852 }
38853
38854 let cur_offset: usize = (3 - 1) * envelope_size;
38857
38858 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38860
38861 fidl::encoding::encode_in_envelope_optional::<bool, D>(
38866 self.always_set.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
38867 encoder,
38868 offset + cur_offset,
38869 depth,
38870 )?;
38871
38872 _prev_end_offset = cur_offset + envelope_size;
38873
38874 Ok(())
38875 }
38876 }
38877
38878 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
38879 for TableFieldUnsetFlexibleEnumInlined
38880 {
38881 #[inline(always)]
38882 fn new_empty() -> Self {
38883 Self::default()
38884 }
38885
38886 unsafe fn decode(
38887 &mut self,
38888 decoder: &mut fidl::encoding::Decoder<'_, D>,
38889 offset: usize,
38890 mut depth: fidl::encoding::Depth,
38891 ) -> fidl::Result<()> {
38892 decoder.debug_check_bounds::<Self>(offset);
38893 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38894 None => return Err(fidl::Error::NotNullable),
38895 Some(len) => len,
38896 };
38897 if len == 0 {
38899 return Ok(());
38900 };
38901 depth.increment()?;
38902 let envelope_size = 8;
38903 let bytes_len = len * envelope_size;
38904 let offset = decoder.out_of_line_offset(bytes_len)?;
38905 let mut _next_ordinal_to_read = 0;
38907 let mut next_offset = offset;
38908 let end_offset = offset + bytes_len;
38909 _next_ordinal_to_read += 1;
38910 if next_offset >= end_offset {
38911 return Ok(());
38912 }
38913
38914 while _next_ordinal_to_read < 1 {
38916 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38917 _next_ordinal_to_read += 1;
38918 next_offset += envelope_size;
38919 }
38920
38921 let next_out_of_line = decoder.next_out_of_line();
38922 let handles_before = decoder.remaining_handles();
38923 if let Some((inlined, num_bytes, num_handles)) =
38924 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38925 {
38926 let member_inline_size =
38927 <SignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38928 if inlined != (member_inline_size <= 4) {
38929 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38930 }
38931 let inner_offset;
38932 let mut inner_depth = depth.clone();
38933 if inlined {
38934 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38935 inner_offset = next_offset;
38936 } else {
38937 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38938 inner_depth.increment()?;
38939 }
38940 let val_ref =
38941 self.signed_enum.get_or_insert_with(|| fidl::new_empty!(SignedEnum, D));
38942 fidl::decode!(SignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
38943 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38944 {
38945 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38946 }
38947 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38948 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38949 }
38950 }
38951
38952 next_offset += envelope_size;
38953 _next_ordinal_to_read += 1;
38954 if next_offset >= end_offset {
38955 return Ok(());
38956 }
38957
38958 while _next_ordinal_to_read < 2 {
38960 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38961 _next_ordinal_to_read += 1;
38962 next_offset += envelope_size;
38963 }
38964
38965 let next_out_of_line = decoder.next_out_of_line();
38966 let handles_before = decoder.remaining_handles();
38967 if let Some((inlined, num_bytes, num_handles)) =
38968 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38969 {
38970 let member_inline_size =
38971 <UnsignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38972 if inlined != (member_inline_size <= 4) {
38973 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38974 }
38975 let inner_offset;
38976 let mut inner_depth = depth.clone();
38977 if inlined {
38978 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38979 inner_offset = next_offset;
38980 } else {
38981 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38982 inner_depth.increment()?;
38983 }
38984 let val_ref =
38985 self.unsigned_enum.get_or_insert_with(|| fidl::new_empty!(UnsignedEnum, D));
38986 fidl::decode!(UnsignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
38987 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38988 {
38989 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38990 }
38991 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38992 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38993 }
38994 }
38995
38996 next_offset += envelope_size;
38997 _next_ordinal_to_read += 1;
38998 if next_offset >= end_offset {
38999 return Ok(());
39000 }
39001
39002 while _next_ordinal_to_read < 3 {
39004 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39005 _next_ordinal_to_read += 1;
39006 next_offset += envelope_size;
39007 }
39008
39009 let next_out_of_line = decoder.next_out_of_line();
39010 let handles_before = decoder.remaining_handles();
39011 if let Some((inlined, num_bytes, num_handles)) =
39012 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39013 {
39014 let member_inline_size =
39015 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39016 if inlined != (member_inline_size <= 4) {
39017 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39018 }
39019 let inner_offset;
39020 let mut inner_depth = depth.clone();
39021 if inlined {
39022 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39023 inner_offset = next_offset;
39024 } else {
39025 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39026 inner_depth.increment()?;
39027 }
39028 let val_ref = self.always_set.get_or_insert_with(|| fidl::new_empty!(bool, D));
39029 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
39030 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39031 {
39032 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39033 }
39034 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39035 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39036 }
39037 }
39038
39039 next_offset += envelope_size;
39040
39041 while next_offset < end_offset {
39043 _next_ordinal_to_read += 1;
39044 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39045 next_offset += envelope_size;
39046 }
39047
39048 Ok(())
39049 }
39050 }
39051
39052 impl TableNoFields {
39053 #[inline(always)]
39054 fn max_ordinal_present(&self) -> u64 {
39055 0
39056 }
39057 }
39058
39059 impl fidl::encoding::ValueTypeMarker for TableNoFields {
39060 type Borrowed<'a> = &'a Self;
39061 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39062 value
39063 }
39064 }
39065
39066 unsafe impl fidl::encoding::TypeMarker for TableNoFields {
39067 type Owned = Self;
39068
39069 #[inline(always)]
39070 fn inline_align(_context: fidl::encoding::Context) -> usize {
39071 8
39072 }
39073
39074 #[inline(always)]
39075 fn inline_size(_context: fidl::encoding::Context) -> usize {
39076 16
39077 }
39078 }
39079
39080 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableNoFields, D>
39081 for &TableNoFields
39082 {
39083 unsafe fn encode(
39084 self,
39085 encoder: &mut fidl::encoding::Encoder<'_, D>,
39086 offset: usize,
39087 mut depth: fidl::encoding::Depth,
39088 ) -> fidl::Result<()> {
39089 encoder.debug_check_bounds::<TableNoFields>(offset);
39090 let max_ordinal: u64 = self.max_ordinal_present();
39092 encoder.write_num(max_ordinal, offset);
39093 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39094 if max_ordinal == 0 {
39096 return Ok(());
39097 }
39098 depth.increment()?;
39099 let envelope_size = 8;
39100 let bytes_len = max_ordinal as usize * envelope_size;
39101 #[allow(unused_variables)]
39102 let offset = encoder.out_of_line_offset(bytes_len);
39103 let mut _prev_end_offset: usize = 0;
39104
39105 Ok(())
39106 }
39107 }
39108
39109 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableNoFields {
39110 #[inline(always)]
39111 fn new_empty() -> Self {
39112 Self::default()
39113 }
39114
39115 unsafe fn decode(
39116 &mut self,
39117 decoder: &mut fidl::encoding::Decoder<'_, D>,
39118 offset: usize,
39119 mut depth: fidl::encoding::Depth,
39120 ) -> fidl::Result<()> {
39121 decoder.debug_check_bounds::<Self>(offset);
39122 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39123 None => return Err(fidl::Error::NotNullable),
39124 Some(len) => len,
39125 };
39126 if len == 0 {
39128 return Ok(());
39129 };
39130 depth.increment()?;
39131 let envelope_size = 8;
39132 let bytes_len = len * envelope_size;
39133 let offset = decoder.out_of_line_offset(bytes_len)?;
39134 let mut _next_ordinal_to_read = 0;
39136 let mut next_offset = offset;
39137 let end_offset = offset + bytes_len;
39138
39139 while next_offset < end_offset {
39141 _next_ordinal_to_read += 1;
39142 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39143 next_offset += envelope_size;
39144 }
39145
39146 Ok(())
39147 }
39148 }
39149
39150 impl TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
39151 #[inline(always)]
39152 fn max_ordinal_present(&self) -> u64 {
39153 if let Some(_) = self.member {
39154 return 3;
39155 }
39156 0
39157 }
39158 }
39159
39160 impl fidl::encoding::ValueTypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
39161 type Borrowed<'a> = &'a Self;
39162 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39163 value
39164 }
39165 }
39166
39167 unsafe impl fidl::encoding::TypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
39168 type Owned = Self;
39169
39170 #[inline(always)]
39171 fn inline_align(_context: fidl::encoding::Context) -> usize {
39172 8
39173 }
39174
39175 #[inline(always)]
39176 fn inline_size(_context: fidl::encoding::Context) -> usize {
39177 16
39178 }
39179 }
39180
39181 unsafe impl<D: fidl::encoding::ResourceDialect>
39182 fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>
39183 for &TableOfUnionThenXUnionThenTableThenXUnionThenUnion
39184 {
39185 unsafe fn encode(
39186 self,
39187 encoder: &mut fidl::encoding::Encoder<'_, D>,
39188 offset: usize,
39189 mut depth: fidl::encoding::Depth,
39190 ) -> fidl::Result<()> {
39191 encoder
39192 .debug_check_bounds::<TableOfUnionThenXUnionThenTableThenXUnionThenUnion>(offset);
39193 let max_ordinal: u64 = self.max_ordinal_present();
39195 encoder.write_num(max_ordinal, offset);
39196 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39197 if max_ordinal == 0 {
39199 return Ok(());
39200 }
39201 depth.increment()?;
39202 let envelope_size = 8;
39203 let bytes_len = max_ordinal as usize * envelope_size;
39204 #[allow(unused_variables)]
39205 let offset = encoder.out_of_line_offset(bytes_len);
39206 let mut _prev_end_offset: usize = 0;
39207 if 3 > max_ordinal {
39208 return Ok(());
39209 }
39210
39211 let cur_offset: usize = (3 - 1) * envelope_size;
39214
39215 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39217
39218 fidl::encoding::encode_in_envelope_optional::<UnionOfXUnionThenTableThenXUnionThenUnion, D>(
39223 self.member.as_ref().map(<UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow),
39224 encoder, offset + cur_offset, depth
39225 )?;
39226
39227 _prev_end_offset = cur_offset + envelope_size;
39228
39229 Ok(())
39230 }
39231 }
39232
39233 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39234 for TableOfUnionThenXUnionThenTableThenXUnionThenUnion
39235 {
39236 #[inline(always)]
39237 fn new_empty() -> Self {
39238 Self::default()
39239 }
39240
39241 unsafe fn decode(
39242 &mut self,
39243 decoder: &mut fidl::encoding::Decoder<'_, D>,
39244 offset: usize,
39245 mut depth: fidl::encoding::Depth,
39246 ) -> fidl::Result<()> {
39247 decoder.debug_check_bounds::<Self>(offset);
39248 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39249 None => return Err(fidl::Error::NotNullable),
39250 Some(len) => len,
39251 };
39252 if len == 0 {
39254 return Ok(());
39255 };
39256 depth.increment()?;
39257 let envelope_size = 8;
39258 let bytes_len = len * envelope_size;
39259 let offset = decoder.out_of_line_offset(bytes_len)?;
39260 let mut _next_ordinal_to_read = 0;
39262 let mut next_offset = offset;
39263 let end_offset = offset + bytes_len;
39264 _next_ordinal_to_read += 1;
39265 if next_offset >= end_offset {
39266 return Ok(());
39267 }
39268
39269 while _next_ordinal_to_read < 3 {
39271 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39272 _next_ordinal_to_read += 1;
39273 next_offset += envelope_size;
39274 }
39275
39276 let next_out_of_line = decoder.next_out_of_line();
39277 let handles_before = decoder.remaining_handles();
39278 if let Some((inlined, num_bytes, num_handles)) =
39279 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39280 {
39281 let member_inline_size = <UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39282 if inlined != (member_inline_size <= 4) {
39283 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39284 }
39285 let inner_offset;
39286 let mut inner_depth = depth.clone();
39287 if inlined {
39288 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39289 inner_offset = next_offset;
39290 } else {
39291 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39292 inner_depth.increment()?;
39293 }
39294 let val_ref = self.member.get_or_insert_with(|| {
39295 fidl::new_empty!(UnionOfXUnionThenTableThenXUnionThenUnion, D)
39296 });
39297 fidl::decode!(
39298 UnionOfXUnionThenTableThenXUnionThenUnion,
39299 D,
39300 val_ref,
39301 decoder,
39302 inner_offset,
39303 inner_depth
39304 )?;
39305 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39306 {
39307 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39308 }
39309 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39310 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39311 }
39312 }
39313
39314 next_offset += envelope_size;
39315
39316 while next_offset < end_offset {
39318 _next_ordinal_to_read += 1;
39319 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39320 next_offset += envelope_size;
39321 }
39322
39323 Ok(())
39324 }
39325 }
39326
39327 impl TableOfXUnionThenUnion {
39328 #[inline(always)]
39329 fn max_ordinal_present(&self) -> u64 {
39330 if let Some(_) = self.member {
39331 return 2;
39332 }
39333 0
39334 }
39335 }
39336
39337 impl fidl::encoding::ValueTypeMarker for TableOfXUnionThenUnion {
39338 type Borrowed<'a> = &'a Self;
39339 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39340 value
39341 }
39342 }
39343
39344 unsafe impl fidl::encoding::TypeMarker for TableOfXUnionThenUnion {
39345 type Owned = Self;
39346
39347 #[inline(always)]
39348 fn inline_align(_context: fidl::encoding::Context) -> usize {
39349 8
39350 }
39351
39352 #[inline(always)]
39353 fn inline_size(_context: fidl::encoding::Context) -> usize {
39354 16
39355 }
39356 }
39357
39358 unsafe impl<D: fidl::encoding::ResourceDialect>
39359 fidl::encoding::Encode<TableOfXUnionThenUnion, D> for &TableOfXUnionThenUnion
39360 {
39361 unsafe fn encode(
39362 self,
39363 encoder: &mut fidl::encoding::Encoder<'_, D>,
39364 offset: usize,
39365 mut depth: fidl::encoding::Depth,
39366 ) -> fidl::Result<()> {
39367 encoder.debug_check_bounds::<TableOfXUnionThenUnion>(offset);
39368 let max_ordinal: u64 = self.max_ordinal_present();
39370 encoder.write_num(max_ordinal, offset);
39371 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39372 if max_ordinal == 0 {
39374 return Ok(());
39375 }
39376 depth.increment()?;
39377 let envelope_size = 8;
39378 let bytes_len = max_ordinal as usize * envelope_size;
39379 #[allow(unused_variables)]
39380 let offset = encoder.out_of_line_offset(bytes_len);
39381 let mut _prev_end_offset: usize = 0;
39382 if 2 > max_ordinal {
39383 return Ok(());
39384 }
39385
39386 let cur_offset: usize = (2 - 1) * envelope_size;
39389
39390 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39392
39393 fidl::encoding::encode_in_envelope_optional::<XUnionOfUnion, D>(
39398 self.member
39399 .as_ref()
39400 .map(<XUnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow),
39401 encoder,
39402 offset + cur_offset,
39403 depth,
39404 )?;
39405
39406 _prev_end_offset = cur_offset + envelope_size;
39407
39408 Ok(())
39409 }
39410 }
39411
39412 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39413 for TableOfXUnionThenUnion
39414 {
39415 #[inline(always)]
39416 fn new_empty() -> Self {
39417 Self::default()
39418 }
39419
39420 unsafe fn decode(
39421 &mut self,
39422 decoder: &mut fidl::encoding::Decoder<'_, D>,
39423 offset: usize,
39424 mut depth: fidl::encoding::Depth,
39425 ) -> fidl::Result<()> {
39426 decoder.debug_check_bounds::<Self>(offset);
39427 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39428 None => return Err(fidl::Error::NotNullable),
39429 Some(len) => len,
39430 };
39431 if len == 0 {
39433 return Ok(());
39434 };
39435 depth.increment()?;
39436 let envelope_size = 8;
39437 let bytes_len = len * envelope_size;
39438 let offset = decoder.out_of_line_offset(bytes_len)?;
39439 let mut _next_ordinal_to_read = 0;
39441 let mut next_offset = offset;
39442 let end_offset = offset + bytes_len;
39443 _next_ordinal_to_read += 1;
39444 if next_offset >= end_offset {
39445 return Ok(());
39446 }
39447
39448 while _next_ordinal_to_read < 2 {
39450 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39451 _next_ordinal_to_read += 1;
39452 next_offset += envelope_size;
39453 }
39454
39455 let next_out_of_line = decoder.next_out_of_line();
39456 let handles_before = decoder.remaining_handles();
39457 if let Some((inlined, num_bytes, num_handles)) =
39458 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39459 {
39460 let member_inline_size =
39461 <XUnionOfUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39462 if inlined != (member_inline_size <= 4) {
39463 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39464 }
39465 let inner_offset;
39466 let mut inner_depth = depth.clone();
39467 if inlined {
39468 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39469 inner_offset = next_offset;
39470 } else {
39471 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39472 inner_depth.increment()?;
39473 }
39474 let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(XUnionOfUnion, D));
39475 fidl::decode!(XUnionOfUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
39476 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39477 {
39478 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39479 }
39480 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39481 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39482 }
39483 }
39484
39485 next_offset += envelope_size;
39486
39487 while next_offset < end_offset {
39489 _next_ordinal_to_read += 1;
39490 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39491 next_offset += envelope_size;
39492 }
39493
39494 Ok(())
39495 }
39496 }
39497
39498 impl TableStructWithReservedSandwich {
39499 #[inline(always)]
39500 fn max_ordinal_present(&self) -> u64 {
39501 if let Some(_) = self.s2 {
39502 return 3;
39503 }
39504 if let Some(_) = self.s1 {
39505 return 2;
39506 }
39507 0
39508 }
39509 }
39510
39511 impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwich {
39512 type Borrowed<'a> = &'a Self;
39513 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39514 value
39515 }
39516 }
39517
39518 unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwich {
39519 type Owned = Self;
39520
39521 #[inline(always)]
39522 fn inline_align(_context: fidl::encoding::Context) -> usize {
39523 8
39524 }
39525
39526 #[inline(always)]
39527 fn inline_size(_context: fidl::encoding::Context) -> usize {
39528 16
39529 }
39530 }
39531
39532 unsafe impl<D: fidl::encoding::ResourceDialect>
39533 fidl::encoding::Encode<TableStructWithReservedSandwich, D>
39534 for &TableStructWithReservedSandwich
39535 {
39536 unsafe fn encode(
39537 self,
39538 encoder: &mut fidl::encoding::Encoder<'_, D>,
39539 offset: usize,
39540 mut depth: fidl::encoding::Depth,
39541 ) -> fidl::Result<()> {
39542 encoder.debug_check_bounds::<TableStructWithReservedSandwich>(offset);
39543 let max_ordinal: u64 = self.max_ordinal_present();
39545 encoder.write_num(max_ordinal, offset);
39546 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39547 if max_ordinal == 0 {
39549 return Ok(());
39550 }
39551 depth.increment()?;
39552 let envelope_size = 8;
39553 let bytes_len = max_ordinal as usize * envelope_size;
39554 #[allow(unused_variables)]
39555 let offset = encoder.out_of_line_offset(bytes_len);
39556 let mut _prev_end_offset: usize = 0;
39557 if 2 > max_ordinal {
39558 return Ok(());
39559 }
39560
39561 let cur_offset: usize = (2 - 1) * envelope_size;
39564
39565 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39567
39568 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39573 self.s1
39574 .as_ref()
39575 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39576 encoder,
39577 offset + cur_offset,
39578 depth,
39579 )?;
39580
39581 _prev_end_offset = cur_offset + envelope_size;
39582 if 3 > max_ordinal {
39583 return Ok(());
39584 }
39585
39586 let cur_offset: usize = (3 - 1) * envelope_size;
39589
39590 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39592
39593 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39598 self.s2
39599 .as_ref()
39600 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39601 encoder,
39602 offset + cur_offset,
39603 depth,
39604 )?;
39605
39606 _prev_end_offset = cur_offset + envelope_size;
39607
39608 Ok(())
39609 }
39610 }
39611
39612 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39613 for TableStructWithReservedSandwich
39614 {
39615 #[inline(always)]
39616 fn new_empty() -> Self {
39617 Self::default()
39618 }
39619
39620 unsafe fn decode(
39621 &mut self,
39622 decoder: &mut fidl::encoding::Decoder<'_, D>,
39623 offset: usize,
39624 mut depth: fidl::encoding::Depth,
39625 ) -> fidl::Result<()> {
39626 decoder.debug_check_bounds::<Self>(offset);
39627 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39628 None => return Err(fidl::Error::NotNullable),
39629 Some(len) => len,
39630 };
39631 if len == 0 {
39633 return Ok(());
39634 };
39635 depth.increment()?;
39636 let envelope_size = 8;
39637 let bytes_len = len * envelope_size;
39638 let offset = decoder.out_of_line_offset(bytes_len)?;
39639 let mut _next_ordinal_to_read = 0;
39641 let mut next_offset = offset;
39642 let end_offset = offset + bytes_len;
39643 _next_ordinal_to_read += 1;
39644 if next_offset >= end_offset {
39645 return Ok(());
39646 }
39647
39648 while _next_ordinal_to_read < 2 {
39650 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39651 _next_ordinal_to_read += 1;
39652 next_offset += envelope_size;
39653 }
39654
39655 let next_out_of_line = decoder.next_out_of_line();
39656 let handles_before = decoder.remaining_handles();
39657 if let Some((inlined, num_bytes, num_handles)) =
39658 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39659 {
39660 let member_inline_size =
39661 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39662 if inlined != (member_inline_size <= 4) {
39663 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39664 }
39665 let inner_offset;
39666 let mut inner_depth = depth.clone();
39667 if inlined {
39668 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39669 inner_offset = next_offset;
39670 } else {
39671 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39672 inner_depth.increment()?;
39673 }
39674 let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
39675 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
39676 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39677 {
39678 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39679 }
39680 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39681 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39682 }
39683 }
39684
39685 next_offset += envelope_size;
39686 _next_ordinal_to_read += 1;
39687 if next_offset >= end_offset {
39688 return Ok(());
39689 }
39690
39691 while _next_ordinal_to_read < 3 {
39693 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39694 _next_ordinal_to_read += 1;
39695 next_offset += envelope_size;
39696 }
39697
39698 let next_out_of_line = decoder.next_out_of_line();
39699 let handles_before = decoder.remaining_handles();
39700 if let Some((inlined, num_bytes, num_handles)) =
39701 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39702 {
39703 let member_inline_size =
39704 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39705 if inlined != (member_inline_size <= 4) {
39706 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39707 }
39708 let inner_offset;
39709 let mut inner_depth = depth.clone();
39710 if inlined {
39711 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39712 inner_offset = next_offset;
39713 } else {
39714 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39715 inner_depth.increment()?;
39716 }
39717 let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
39718 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
39719 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39720 {
39721 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39722 }
39723 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39724 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39725 }
39726 }
39727
39728 next_offset += envelope_size;
39729
39730 while next_offset < end_offset {
39732 _next_ordinal_to_read += 1;
39733 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39734 next_offset += envelope_size;
39735 }
39736
39737 Ok(())
39738 }
39739 }
39740
39741 impl TableStructWithUint32Sandwich {
39742 #[inline(always)]
39743 fn max_ordinal_present(&self) -> u64 {
39744 if let Some(_) = self.i2 {
39745 return 4;
39746 }
39747 if let Some(_) = self.s2 {
39748 return 3;
39749 }
39750 if let Some(_) = self.s1 {
39751 return 2;
39752 }
39753 if let Some(_) = self.i {
39754 return 1;
39755 }
39756 0
39757 }
39758 }
39759
39760 impl fidl::encoding::ValueTypeMarker for TableStructWithUint32Sandwich {
39761 type Borrowed<'a> = &'a Self;
39762 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39763 value
39764 }
39765 }
39766
39767 unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32Sandwich {
39768 type Owned = Self;
39769
39770 #[inline(always)]
39771 fn inline_align(_context: fidl::encoding::Context) -> usize {
39772 8
39773 }
39774
39775 #[inline(always)]
39776 fn inline_size(_context: fidl::encoding::Context) -> usize {
39777 16
39778 }
39779 }
39780
39781 unsafe impl<D: fidl::encoding::ResourceDialect>
39782 fidl::encoding::Encode<TableStructWithUint32Sandwich, D>
39783 for &TableStructWithUint32Sandwich
39784 {
39785 unsafe fn encode(
39786 self,
39787 encoder: &mut fidl::encoding::Encoder<'_, D>,
39788 offset: usize,
39789 mut depth: fidl::encoding::Depth,
39790 ) -> fidl::Result<()> {
39791 encoder.debug_check_bounds::<TableStructWithUint32Sandwich>(offset);
39792 let max_ordinal: u64 = self.max_ordinal_present();
39794 encoder.write_num(max_ordinal, offset);
39795 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39796 if max_ordinal == 0 {
39798 return Ok(());
39799 }
39800 depth.increment()?;
39801 let envelope_size = 8;
39802 let bytes_len = max_ordinal as usize * envelope_size;
39803 #[allow(unused_variables)]
39804 let offset = encoder.out_of_line_offset(bytes_len);
39805 let mut _prev_end_offset: usize = 0;
39806 if 1 > max_ordinal {
39807 return Ok(());
39808 }
39809
39810 let cur_offset: usize = (1 - 1) * envelope_size;
39813
39814 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39816
39817 fidl::encoding::encode_in_envelope_optional::<u32, D>(
39822 self.i.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
39823 encoder,
39824 offset + cur_offset,
39825 depth,
39826 )?;
39827
39828 _prev_end_offset = cur_offset + envelope_size;
39829 if 2 > max_ordinal {
39830 return Ok(());
39831 }
39832
39833 let cur_offset: usize = (2 - 1) * envelope_size;
39836
39837 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39839
39840 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39845 self.s1
39846 .as_ref()
39847 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39848 encoder,
39849 offset + cur_offset,
39850 depth,
39851 )?;
39852
39853 _prev_end_offset = cur_offset + envelope_size;
39854 if 3 > max_ordinal {
39855 return Ok(());
39856 }
39857
39858 let cur_offset: usize = (3 - 1) * envelope_size;
39861
39862 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39864
39865 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39870 self.s2
39871 .as_ref()
39872 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39873 encoder,
39874 offset + cur_offset,
39875 depth,
39876 )?;
39877
39878 _prev_end_offset = cur_offset + envelope_size;
39879 if 4 > max_ordinal {
39880 return Ok(());
39881 }
39882
39883 let cur_offset: usize = (4 - 1) * envelope_size;
39886
39887 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39889
39890 fidl::encoding::encode_in_envelope_optional::<u32, D>(
39895 self.i2.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
39896 encoder,
39897 offset + cur_offset,
39898 depth,
39899 )?;
39900
39901 _prev_end_offset = cur_offset + envelope_size;
39902
39903 Ok(())
39904 }
39905 }
39906
39907 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39908 for TableStructWithUint32Sandwich
39909 {
39910 #[inline(always)]
39911 fn new_empty() -> Self {
39912 Self::default()
39913 }
39914
39915 unsafe fn decode(
39916 &mut self,
39917 decoder: &mut fidl::encoding::Decoder<'_, D>,
39918 offset: usize,
39919 mut depth: fidl::encoding::Depth,
39920 ) -> fidl::Result<()> {
39921 decoder.debug_check_bounds::<Self>(offset);
39922 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39923 None => return Err(fidl::Error::NotNullable),
39924 Some(len) => len,
39925 };
39926 if len == 0 {
39928 return Ok(());
39929 };
39930 depth.increment()?;
39931 let envelope_size = 8;
39932 let bytes_len = len * envelope_size;
39933 let offset = decoder.out_of_line_offset(bytes_len)?;
39934 let mut _next_ordinal_to_read = 0;
39936 let mut next_offset = offset;
39937 let end_offset = offset + bytes_len;
39938 _next_ordinal_to_read += 1;
39939 if next_offset >= end_offset {
39940 return Ok(());
39941 }
39942
39943 while _next_ordinal_to_read < 1 {
39945 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39946 _next_ordinal_to_read += 1;
39947 next_offset += envelope_size;
39948 }
39949
39950 let next_out_of_line = decoder.next_out_of_line();
39951 let handles_before = decoder.remaining_handles();
39952 if let Some((inlined, num_bytes, num_handles)) =
39953 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39954 {
39955 let member_inline_size =
39956 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39957 if inlined != (member_inline_size <= 4) {
39958 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39959 }
39960 let inner_offset;
39961 let mut inner_depth = depth.clone();
39962 if inlined {
39963 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39964 inner_offset = next_offset;
39965 } else {
39966 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39967 inner_depth.increment()?;
39968 }
39969 let val_ref = self.i.get_or_insert_with(|| fidl::new_empty!(u32, D));
39970 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
39971 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39972 {
39973 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39974 }
39975 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39976 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39977 }
39978 }
39979
39980 next_offset += envelope_size;
39981 _next_ordinal_to_read += 1;
39982 if next_offset >= end_offset {
39983 return Ok(());
39984 }
39985
39986 while _next_ordinal_to_read < 2 {
39988 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39989 _next_ordinal_to_read += 1;
39990 next_offset += envelope_size;
39991 }
39992
39993 let next_out_of_line = decoder.next_out_of_line();
39994 let handles_before = decoder.remaining_handles();
39995 if let Some((inlined, num_bytes, num_handles)) =
39996 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39997 {
39998 let member_inline_size =
39999 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40000 if inlined != (member_inline_size <= 4) {
40001 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40002 }
40003 let inner_offset;
40004 let mut inner_depth = depth.clone();
40005 if inlined {
40006 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40007 inner_offset = next_offset;
40008 } else {
40009 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40010 inner_depth.increment()?;
40011 }
40012 let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40013 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40014 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40015 {
40016 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40017 }
40018 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40019 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40020 }
40021 }
40022
40023 next_offset += envelope_size;
40024 _next_ordinal_to_read += 1;
40025 if next_offset >= end_offset {
40026 return Ok(());
40027 }
40028
40029 while _next_ordinal_to_read < 3 {
40031 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40032 _next_ordinal_to_read += 1;
40033 next_offset += envelope_size;
40034 }
40035
40036 let next_out_of_line = decoder.next_out_of_line();
40037 let handles_before = decoder.remaining_handles();
40038 if let Some((inlined, num_bytes, num_handles)) =
40039 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40040 {
40041 let member_inline_size =
40042 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40043 if inlined != (member_inline_size <= 4) {
40044 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40045 }
40046 let inner_offset;
40047 let mut inner_depth = depth.clone();
40048 if inlined {
40049 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40050 inner_offset = next_offset;
40051 } else {
40052 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40053 inner_depth.increment()?;
40054 }
40055 let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40056 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40057 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40058 {
40059 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40060 }
40061 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40062 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40063 }
40064 }
40065
40066 next_offset += envelope_size;
40067 _next_ordinal_to_read += 1;
40068 if next_offset >= end_offset {
40069 return Ok(());
40070 }
40071
40072 while _next_ordinal_to_read < 4 {
40074 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40075 _next_ordinal_to_read += 1;
40076 next_offset += envelope_size;
40077 }
40078
40079 let next_out_of_line = decoder.next_out_of_line();
40080 let handles_before = decoder.remaining_handles();
40081 if let Some((inlined, num_bytes, num_handles)) =
40082 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40083 {
40084 let member_inline_size =
40085 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40086 if inlined != (member_inline_size <= 4) {
40087 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40088 }
40089 let inner_offset;
40090 let mut inner_depth = depth.clone();
40091 if inlined {
40092 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40093 inner_offset = next_offset;
40094 } else {
40095 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40096 inner_depth.increment()?;
40097 }
40098 let val_ref = self.i2.get_or_insert_with(|| fidl::new_empty!(u32, D));
40099 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
40100 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40101 {
40102 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40103 }
40104 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40105 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40106 }
40107 }
40108
40109 next_offset += envelope_size;
40110
40111 while next_offset < end_offset {
40113 _next_ordinal_to_read += 1;
40114 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40115 next_offset += envelope_size;
40116 }
40117
40118 Ok(())
40119 }
40120 }
40121
40122 impl TableWithEmptyStruct {
40123 #[inline(always)]
40124 fn max_ordinal_present(&self) -> u64 {
40125 if let Some(_) = self.s {
40126 return 1;
40127 }
40128 0
40129 }
40130 }
40131
40132 impl fidl::encoding::ValueTypeMarker for TableWithEmptyStruct {
40133 type Borrowed<'a> = &'a Self;
40134 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40135 value
40136 }
40137 }
40138
40139 unsafe impl fidl::encoding::TypeMarker for TableWithEmptyStruct {
40140 type Owned = Self;
40141
40142 #[inline(always)]
40143 fn inline_align(_context: fidl::encoding::Context) -> usize {
40144 8
40145 }
40146
40147 #[inline(always)]
40148 fn inline_size(_context: fidl::encoding::Context) -> usize {
40149 16
40150 }
40151 }
40152
40153 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithEmptyStruct, D>
40154 for &TableWithEmptyStruct
40155 {
40156 unsafe fn encode(
40157 self,
40158 encoder: &mut fidl::encoding::Encoder<'_, D>,
40159 offset: usize,
40160 mut depth: fidl::encoding::Depth,
40161 ) -> fidl::Result<()> {
40162 encoder.debug_check_bounds::<TableWithEmptyStruct>(offset);
40163 let max_ordinal: u64 = self.max_ordinal_present();
40165 encoder.write_num(max_ordinal, offset);
40166 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40167 if max_ordinal == 0 {
40169 return Ok(());
40170 }
40171 depth.increment()?;
40172 let envelope_size = 8;
40173 let bytes_len = max_ordinal as usize * envelope_size;
40174 #[allow(unused_variables)]
40175 let offset = encoder.out_of_line_offset(bytes_len);
40176 let mut _prev_end_offset: usize = 0;
40177 if 1 > max_ordinal {
40178 return Ok(());
40179 }
40180
40181 let cur_offset: usize = (1 - 1) * envelope_size;
40184
40185 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40187
40188 fidl::encoding::encode_in_envelope_optional::<EmptyStruct, D>(
40193 self.s.as_ref().map(<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow),
40194 encoder,
40195 offset + cur_offset,
40196 depth,
40197 )?;
40198
40199 _prev_end_offset = cur_offset + envelope_size;
40200
40201 Ok(())
40202 }
40203 }
40204
40205 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithEmptyStruct {
40206 #[inline(always)]
40207 fn new_empty() -> Self {
40208 Self::default()
40209 }
40210
40211 unsafe fn decode(
40212 &mut self,
40213 decoder: &mut fidl::encoding::Decoder<'_, D>,
40214 offset: usize,
40215 mut depth: fidl::encoding::Depth,
40216 ) -> fidl::Result<()> {
40217 decoder.debug_check_bounds::<Self>(offset);
40218 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40219 None => return Err(fidl::Error::NotNullable),
40220 Some(len) => len,
40221 };
40222 if len == 0 {
40224 return Ok(());
40225 };
40226 depth.increment()?;
40227 let envelope_size = 8;
40228 let bytes_len = len * envelope_size;
40229 let offset = decoder.out_of_line_offset(bytes_len)?;
40230 let mut _next_ordinal_to_read = 0;
40232 let mut next_offset = offset;
40233 let end_offset = offset + bytes_len;
40234 _next_ordinal_to_read += 1;
40235 if next_offset >= end_offset {
40236 return Ok(());
40237 }
40238
40239 while _next_ordinal_to_read < 1 {
40241 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40242 _next_ordinal_to_read += 1;
40243 next_offset += envelope_size;
40244 }
40245
40246 let next_out_of_line = decoder.next_out_of_line();
40247 let handles_before = decoder.remaining_handles();
40248 if let Some((inlined, num_bytes, num_handles)) =
40249 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40250 {
40251 let member_inline_size =
40252 <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40253 if inlined != (member_inline_size <= 4) {
40254 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40255 }
40256 let inner_offset;
40257 let mut inner_depth = depth.clone();
40258 if inlined {
40259 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40260 inner_offset = next_offset;
40261 } else {
40262 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40263 inner_depth.increment()?;
40264 }
40265 let val_ref = self.s.get_or_insert_with(|| fidl::new_empty!(EmptyStruct, D));
40266 fidl::decode!(EmptyStruct, D, val_ref, decoder, inner_offset, inner_depth)?;
40267 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40268 {
40269 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40270 }
40271 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40272 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40273 }
40274 }
40275
40276 next_offset += envelope_size;
40277
40278 while next_offset < end_offset {
40280 _next_ordinal_to_read += 1;
40281 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40282 next_offset += envelope_size;
40283 }
40284
40285 Ok(())
40286 }
40287 }
40288
40289 impl TableWithGaps {
40290 #[inline(always)]
40291 fn max_ordinal_present(&self) -> u64 {
40292 if let Some(_) = self.fourth {
40293 return 4;
40294 }
40295 if let Some(_) = self.second {
40296 return 2;
40297 }
40298 0
40299 }
40300 }
40301
40302 impl fidl::encoding::ValueTypeMarker for TableWithGaps {
40303 type Borrowed<'a> = &'a Self;
40304 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40305 value
40306 }
40307 }
40308
40309 unsafe impl fidl::encoding::TypeMarker for TableWithGaps {
40310 type Owned = Self;
40311
40312 #[inline(always)]
40313 fn inline_align(_context: fidl::encoding::Context) -> usize {
40314 8
40315 }
40316
40317 #[inline(always)]
40318 fn inline_size(_context: fidl::encoding::Context) -> usize {
40319 16
40320 }
40321 }
40322
40323 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithGaps, D>
40324 for &TableWithGaps
40325 {
40326 unsafe fn encode(
40327 self,
40328 encoder: &mut fidl::encoding::Encoder<'_, D>,
40329 offset: usize,
40330 mut depth: fidl::encoding::Depth,
40331 ) -> fidl::Result<()> {
40332 encoder.debug_check_bounds::<TableWithGaps>(offset);
40333 let max_ordinal: u64 = self.max_ordinal_present();
40335 encoder.write_num(max_ordinal, offset);
40336 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40337 if max_ordinal == 0 {
40339 return Ok(());
40340 }
40341 depth.increment()?;
40342 let envelope_size = 8;
40343 let bytes_len = max_ordinal as usize * envelope_size;
40344 #[allow(unused_variables)]
40345 let offset = encoder.out_of_line_offset(bytes_len);
40346 let mut _prev_end_offset: usize = 0;
40347 if 2 > max_ordinal {
40348 return Ok(());
40349 }
40350
40351 let cur_offset: usize = (2 - 1) * envelope_size;
40354
40355 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40357
40358 fidl::encoding::encode_in_envelope_optional::<i32, D>(
40363 self.second.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
40364 encoder,
40365 offset + cur_offset,
40366 depth,
40367 )?;
40368
40369 _prev_end_offset = cur_offset + envelope_size;
40370 if 4 > max_ordinal {
40371 return Ok(());
40372 }
40373
40374 let cur_offset: usize = (4 - 1) * envelope_size;
40377
40378 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40380
40381 fidl::encoding::encode_in_envelope_optional::<i32, D>(
40386 self.fourth.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
40387 encoder,
40388 offset + cur_offset,
40389 depth,
40390 )?;
40391
40392 _prev_end_offset = cur_offset + envelope_size;
40393
40394 Ok(())
40395 }
40396 }
40397
40398 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithGaps {
40399 #[inline(always)]
40400 fn new_empty() -> Self {
40401 Self::default()
40402 }
40403
40404 unsafe fn decode(
40405 &mut self,
40406 decoder: &mut fidl::encoding::Decoder<'_, D>,
40407 offset: usize,
40408 mut depth: fidl::encoding::Depth,
40409 ) -> fidl::Result<()> {
40410 decoder.debug_check_bounds::<Self>(offset);
40411 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40412 None => return Err(fidl::Error::NotNullable),
40413 Some(len) => len,
40414 };
40415 if len == 0 {
40417 return Ok(());
40418 };
40419 depth.increment()?;
40420 let envelope_size = 8;
40421 let bytes_len = len * envelope_size;
40422 let offset = decoder.out_of_line_offset(bytes_len)?;
40423 let mut _next_ordinal_to_read = 0;
40425 let mut next_offset = offset;
40426 let end_offset = offset + bytes_len;
40427 _next_ordinal_to_read += 1;
40428 if next_offset >= end_offset {
40429 return Ok(());
40430 }
40431
40432 while _next_ordinal_to_read < 2 {
40434 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40435 _next_ordinal_to_read += 1;
40436 next_offset += envelope_size;
40437 }
40438
40439 let next_out_of_line = decoder.next_out_of_line();
40440 let handles_before = decoder.remaining_handles();
40441 if let Some((inlined, num_bytes, num_handles)) =
40442 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40443 {
40444 let member_inline_size =
40445 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40446 if inlined != (member_inline_size <= 4) {
40447 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40448 }
40449 let inner_offset;
40450 let mut inner_depth = depth.clone();
40451 if inlined {
40452 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40453 inner_offset = next_offset;
40454 } else {
40455 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40456 inner_depth.increment()?;
40457 }
40458 let val_ref = self.second.get_or_insert_with(|| fidl::new_empty!(i32, D));
40459 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
40460 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40461 {
40462 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40463 }
40464 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40465 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40466 }
40467 }
40468
40469 next_offset += envelope_size;
40470 _next_ordinal_to_read += 1;
40471 if next_offset >= end_offset {
40472 return Ok(());
40473 }
40474
40475 while _next_ordinal_to_read < 4 {
40477 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40478 _next_ordinal_to_read += 1;
40479 next_offset += envelope_size;
40480 }
40481
40482 let next_out_of_line = decoder.next_out_of_line();
40483 let handles_before = decoder.remaining_handles();
40484 if let Some((inlined, num_bytes, num_handles)) =
40485 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40486 {
40487 let member_inline_size =
40488 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40489 if inlined != (member_inline_size <= 4) {
40490 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40491 }
40492 let inner_offset;
40493 let mut inner_depth = depth.clone();
40494 if inlined {
40495 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40496 inner_offset = next_offset;
40497 } else {
40498 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40499 inner_depth.increment()?;
40500 }
40501 let val_ref = self.fourth.get_or_insert_with(|| fidl::new_empty!(i32, D));
40502 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
40503 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40504 {
40505 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40506 }
40507 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40508 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40509 }
40510 }
40511
40512 next_offset += envelope_size;
40513
40514 while next_offset < end_offset {
40516 _next_ordinal_to_read += 1;
40517 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40518 next_offset += envelope_size;
40519 }
40520
40521 Ok(())
40522 }
40523 }
40524
40525 impl TableWithReservedFieldThenUnion {
40526 #[inline(always)]
40527 fn max_ordinal_present(&self) -> u64 {
40528 if let Some(_) = self.uv {
40529 return 2;
40530 }
40531 0
40532 }
40533 }
40534
40535 impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnion {
40536 type Borrowed<'a> = &'a Self;
40537 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40538 value
40539 }
40540 }
40541
40542 unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnion {
40543 type Owned = Self;
40544
40545 #[inline(always)]
40546 fn inline_align(_context: fidl::encoding::Context) -> usize {
40547 8
40548 }
40549
40550 #[inline(always)]
40551 fn inline_size(_context: fidl::encoding::Context) -> usize {
40552 16
40553 }
40554 }
40555
40556 unsafe impl<D: fidl::encoding::ResourceDialect>
40557 fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>
40558 for &TableWithReservedFieldThenUnion
40559 {
40560 unsafe fn encode(
40561 self,
40562 encoder: &mut fidl::encoding::Encoder<'_, D>,
40563 offset: usize,
40564 mut depth: fidl::encoding::Depth,
40565 ) -> fidl::Result<()> {
40566 encoder.debug_check_bounds::<TableWithReservedFieldThenUnion>(offset);
40567 let max_ordinal: u64 = self.max_ordinal_present();
40569 encoder.write_num(max_ordinal, offset);
40570 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40571 if max_ordinal == 0 {
40573 return Ok(());
40574 }
40575 depth.increment()?;
40576 let envelope_size = 8;
40577 let bytes_len = max_ordinal as usize * envelope_size;
40578 #[allow(unused_variables)]
40579 let offset = encoder.out_of_line_offset(bytes_len);
40580 let mut _prev_end_offset: usize = 0;
40581 if 2 > max_ordinal {
40582 return Ok(());
40583 }
40584
40585 let cur_offset: usize = (2 - 1) * envelope_size;
40588
40589 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40591
40592 fidl::encoding::encode_in_envelope_optional::<UnionSize8Align4, D>(
40597 self.uv.as_ref().map(<UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow),
40598 encoder,
40599 offset + cur_offset,
40600 depth,
40601 )?;
40602
40603 _prev_end_offset = cur_offset + envelope_size;
40604
40605 Ok(())
40606 }
40607 }
40608
40609 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40610 for TableWithReservedFieldThenUnion
40611 {
40612 #[inline(always)]
40613 fn new_empty() -> Self {
40614 Self::default()
40615 }
40616
40617 unsafe fn decode(
40618 &mut self,
40619 decoder: &mut fidl::encoding::Decoder<'_, D>,
40620 offset: usize,
40621 mut depth: fidl::encoding::Depth,
40622 ) -> fidl::Result<()> {
40623 decoder.debug_check_bounds::<Self>(offset);
40624 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40625 None => return Err(fidl::Error::NotNullable),
40626 Some(len) => len,
40627 };
40628 if len == 0 {
40630 return Ok(());
40631 };
40632 depth.increment()?;
40633 let envelope_size = 8;
40634 let bytes_len = len * envelope_size;
40635 let offset = decoder.out_of_line_offset(bytes_len)?;
40636 let mut _next_ordinal_to_read = 0;
40638 let mut next_offset = offset;
40639 let end_offset = offset + bytes_len;
40640 _next_ordinal_to_read += 1;
40641 if next_offset >= end_offset {
40642 return Ok(());
40643 }
40644
40645 while _next_ordinal_to_read < 2 {
40647 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40648 _next_ordinal_to_read += 1;
40649 next_offset += envelope_size;
40650 }
40651
40652 let next_out_of_line = decoder.next_out_of_line();
40653 let handles_before = decoder.remaining_handles();
40654 if let Some((inlined, num_bytes, num_handles)) =
40655 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40656 {
40657 let member_inline_size =
40658 <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40659 if inlined != (member_inline_size <= 4) {
40660 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40661 }
40662 let inner_offset;
40663 let mut inner_depth = depth.clone();
40664 if inlined {
40665 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40666 inner_offset = next_offset;
40667 } else {
40668 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40669 inner_depth.increment()?;
40670 }
40671 let val_ref = self.uv.get_or_insert_with(|| fidl::new_empty!(UnionSize8Align4, D));
40672 fidl::decode!(UnionSize8Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
40673 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40674 {
40675 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40676 }
40677 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40678 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40679 }
40680 }
40681
40682 next_offset += envelope_size;
40683
40684 while next_offset < end_offset {
40686 _next_ordinal_to_read += 1;
40687 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40688 next_offset += envelope_size;
40689 }
40690
40691 Ok(())
40692 }
40693 }
40694
40695 impl TableWithStringAndVector {
40696 #[inline(always)]
40697 fn max_ordinal_present(&self) -> u64 {
40698 if let Some(_) = self.baz {
40699 return 3;
40700 }
40701 if let Some(_) = self.bar {
40702 return 2;
40703 }
40704 if let Some(_) = self.foo {
40705 return 1;
40706 }
40707 0
40708 }
40709 }
40710
40711 impl fidl::encoding::ValueTypeMarker for TableWithStringAndVector {
40712 type Borrowed<'a> = &'a Self;
40713 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40714 value
40715 }
40716 }
40717
40718 unsafe impl fidl::encoding::TypeMarker for TableWithStringAndVector {
40719 type Owned = Self;
40720
40721 #[inline(always)]
40722 fn inline_align(_context: fidl::encoding::Context) -> usize {
40723 8
40724 }
40725
40726 #[inline(always)]
40727 fn inline_size(_context: fidl::encoding::Context) -> usize {
40728 16
40729 }
40730 }
40731
40732 unsafe impl<D: fidl::encoding::ResourceDialect>
40733 fidl::encoding::Encode<TableWithStringAndVector, D> for &TableWithStringAndVector
40734 {
40735 unsafe fn encode(
40736 self,
40737 encoder: &mut fidl::encoding::Encoder<'_, D>,
40738 offset: usize,
40739 mut depth: fidl::encoding::Depth,
40740 ) -> fidl::Result<()> {
40741 encoder.debug_check_bounds::<TableWithStringAndVector>(offset);
40742 let max_ordinal: u64 = self.max_ordinal_present();
40744 encoder.write_num(max_ordinal, offset);
40745 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40746 if max_ordinal == 0 {
40748 return Ok(());
40749 }
40750 depth.increment()?;
40751 let envelope_size = 8;
40752 let bytes_len = max_ordinal as usize * envelope_size;
40753 #[allow(unused_variables)]
40754 let offset = encoder.out_of_line_offset(bytes_len);
40755 let mut _prev_end_offset: usize = 0;
40756 if 1 > max_ordinal {
40757 return Ok(());
40758 }
40759
40760 let cur_offset: usize = (1 - 1) * envelope_size;
40763
40764 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40766
40767 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
40772 self.foo.as_ref().map(
40773 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
40774 ),
40775 encoder,
40776 offset + cur_offset,
40777 depth,
40778 )?;
40779
40780 _prev_end_offset = cur_offset + envelope_size;
40781 if 2 > max_ordinal {
40782 return Ok(());
40783 }
40784
40785 let cur_offset: usize = (2 - 1) * envelope_size;
40788
40789 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40791
40792 fidl::encoding::encode_in_envelope_optional::<i32, D>(
40797 self.bar.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
40798 encoder,
40799 offset + cur_offset,
40800 depth,
40801 )?;
40802
40803 _prev_end_offset = cur_offset + envelope_size;
40804 if 3 > max_ordinal {
40805 return Ok(());
40806 }
40807
40808 let cur_offset: usize = (3 - 1) * envelope_size;
40811
40812 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40814
40815 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
40820 self.baz.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
40821 encoder, offset + cur_offset, depth
40822 )?;
40823
40824 _prev_end_offset = cur_offset + envelope_size;
40825
40826 Ok(())
40827 }
40828 }
40829
40830 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40831 for TableWithStringAndVector
40832 {
40833 #[inline(always)]
40834 fn new_empty() -> Self {
40835 Self::default()
40836 }
40837
40838 unsafe fn decode(
40839 &mut self,
40840 decoder: &mut fidl::encoding::Decoder<'_, D>,
40841 offset: usize,
40842 mut depth: fidl::encoding::Depth,
40843 ) -> fidl::Result<()> {
40844 decoder.debug_check_bounds::<Self>(offset);
40845 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40846 None => return Err(fidl::Error::NotNullable),
40847 Some(len) => len,
40848 };
40849 if len == 0 {
40851 return Ok(());
40852 };
40853 depth.increment()?;
40854 let envelope_size = 8;
40855 let bytes_len = len * envelope_size;
40856 let offset = decoder.out_of_line_offset(bytes_len)?;
40857 let mut _next_ordinal_to_read = 0;
40859 let mut next_offset = offset;
40860 let end_offset = offset + bytes_len;
40861 _next_ordinal_to_read += 1;
40862 if next_offset >= end_offset {
40863 return Ok(());
40864 }
40865
40866 while _next_ordinal_to_read < 1 {
40868 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40869 _next_ordinal_to_read += 1;
40870 next_offset += envelope_size;
40871 }
40872
40873 let next_out_of_line = decoder.next_out_of_line();
40874 let handles_before = decoder.remaining_handles();
40875 if let Some((inlined, num_bytes, num_handles)) =
40876 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40877 {
40878 let member_inline_size =
40879 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
40880 decoder.context,
40881 );
40882 if inlined != (member_inline_size <= 4) {
40883 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40884 }
40885 let inner_offset;
40886 let mut inner_depth = depth.clone();
40887 if inlined {
40888 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40889 inner_offset = next_offset;
40890 } else {
40891 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40892 inner_depth.increment()?;
40893 }
40894 let val_ref = self
40895 .foo
40896 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
40897 fidl::decode!(
40898 fidl::encoding::UnboundedString,
40899 D,
40900 val_ref,
40901 decoder,
40902 inner_offset,
40903 inner_depth
40904 )?;
40905 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40906 {
40907 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40908 }
40909 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40910 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40911 }
40912 }
40913
40914 next_offset += envelope_size;
40915 _next_ordinal_to_read += 1;
40916 if next_offset >= end_offset {
40917 return Ok(());
40918 }
40919
40920 while _next_ordinal_to_read < 2 {
40922 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40923 _next_ordinal_to_read += 1;
40924 next_offset += envelope_size;
40925 }
40926
40927 let next_out_of_line = decoder.next_out_of_line();
40928 let handles_before = decoder.remaining_handles();
40929 if let Some((inlined, num_bytes, num_handles)) =
40930 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40931 {
40932 let member_inline_size =
40933 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40934 if inlined != (member_inline_size <= 4) {
40935 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40936 }
40937 let inner_offset;
40938 let mut inner_depth = depth.clone();
40939 if inlined {
40940 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40941 inner_offset = next_offset;
40942 } else {
40943 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40944 inner_depth.increment()?;
40945 }
40946 let val_ref = self.bar.get_or_insert_with(|| fidl::new_empty!(i32, D));
40947 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
40948 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40949 {
40950 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40951 }
40952 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40953 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40954 }
40955 }
40956
40957 next_offset += envelope_size;
40958 _next_ordinal_to_read += 1;
40959 if next_offset >= end_offset {
40960 return Ok(());
40961 }
40962
40963 while _next_ordinal_to_read < 3 {
40965 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40966 _next_ordinal_to_read += 1;
40967 next_offset += envelope_size;
40968 }
40969
40970 let next_out_of_line = decoder.next_out_of_line();
40971 let handles_before = decoder.remaining_handles();
40972 if let Some((inlined, num_bytes, num_handles)) =
40973 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40974 {
40975 let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40976 if inlined != (member_inline_size <= 4) {
40977 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40978 }
40979 let inner_offset;
40980 let mut inner_depth = depth.clone();
40981 if inlined {
40982 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40983 inner_offset = next_offset;
40984 } else {
40985 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40986 inner_depth.increment()?;
40987 }
40988 let val_ref = self.baz.get_or_insert_with(|| {
40989 fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
40990 });
40991 fidl::decode!(
40992 fidl::encoding::UnboundedVector<u8>,
40993 D,
40994 val_ref,
40995 decoder,
40996 inner_offset,
40997 inner_depth
40998 )?;
40999 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41000 {
41001 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41002 }
41003 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41004 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41005 }
41006 }
41007
41008 next_offset += envelope_size;
41009
41010 while next_offset < end_offset {
41012 _next_ordinal_to_read += 1;
41013 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41014 next_offset += envelope_size;
41015 }
41016
41017 Ok(())
41018 }
41019 }
41020
41021 impl TableWithUnionSize12Align4 {
41022 #[inline(always)]
41023 fn max_ordinal_present(&self) -> u64 {
41024 if let Some(_) = self.after {
41025 return 5;
41026 }
41027 if let Some(_) = self.member {
41028 return 3;
41029 }
41030 if let Some(_) = self.before {
41031 return 1;
41032 }
41033 0
41034 }
41035 }
41036
41037 impl fidl::encoding::ValueTypeMarker for TableWithUnionSize12Align4 {
41038 type Borrowed<'a> = &'a Self;
41039 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41040 value
41041 }
41042 }
41043
41044 unsafe impl fidl::encoding::TypeMarker for TableWithUnionSize12Align4 {
41045 type Owned = Self;
41046
41047 #[inline(always)]
41048 fn inline_align(_context: fidl::encoding::Context) -> usize {
41049 8
41050 }
41051
41052 #[inline(always)]
41053 fn inline_size(_context: fidl::encoding::Context) -> usize {
41054 16
41055 }
41056 }
41057
41058 unsafe impl<D: fidl::encoding::ResourceDialect>
41059 fidl::encoding::Encode<TableWithUnionSize12Align4, D> for &TableWithUnionSize12Align4
41060 {
41061 unsafe fn encode(
41062 self,
41063 encoder: &mut fidl::encoding::Encoder<'_, D>,
41064 offset: usize,
41065 mut depth: fidl::encoding::Depth,
41066 ) -> fidl::Result<()> {
41067 encoder.debug_check_bounds::<TableWithUnionSize12Align4>(offset);
41068 let max_ordinal: u64 = self.max_ordinal_present();
41070 encoder.write_num(max_ordinal, offset);
41071 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41072 if max_ordinal == 0 {
41074 return Ok(());
41075 }
41076 depth.increment()?;
41077 let envelope_size = 8;
41078 let bytes_len = max_ordinal as usize * envelope_size;
41079 #[allow(unused_variables)]
41080 let offset = encoder.out_of_line_offset(bytes_len);
41081 let mut _prev_end_offset: usize = 0;
41082 if 1 > max_ordinal {
41083 return Ok(());
41084 }
41085
41086 let cur_offset: usize = (1 - 1) * envelope_size;
41089
41090 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41092
41093 fidl::encoding::encode_in_envelope_optional::<u8, D>(
41098 self.before.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
41099 encoder,
41100 offset + cur_offset,
41101 depth,
41102 )?;
41103
41104 _prev_end_offset = cur_offset + envelope_size;
41105 if 3 > max_ordinal {
41106 return Ok(());
41107 }
41108
41109 let cur_offset: usize = (3 - 1) * envelope_size;
41112
41113 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41115
41116 fidl::encoding::encode_in_envelope_optional::<UnionSize12Align4, D>(
41121 self.member
41122 .as_ref()
41123 .map(<UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow),
41124 encoder,
41125 offset + cur_offset,
41126 depth,
41127 )?;
41128
41129 _prev_end_offset = cur_offset + envelope_size;
41130 if 5 > max_ordinal {
41131 return Ok(());
41132 }
41133
41134 let cur_offset: usize = (5 - 1) * envelope_size;
41137
41138 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41140
41141 fidl::encoding::encode_in_envelope_optional::<u8, D>(
41146 self.after.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
41147 encoder,
41148 offset + cur_offset,
41149 depth,
41150 )?;
41151
41152 _prev_end_offset = cur_offset + envelope_size;
41153
41154 Ok(())
41155 }
41156 }
41157
41158 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41159 for TableWithUnionSize12Align4
41160 {
41161 #[inline(always)]
41162 fn new_empty() -> Self {
41163 Self::default()
41164 }
41165
41166 unsafe fn decode(
41167 &mut self,
41168 decoder: &mut fidl::encoding::Decoder<'_, D>,
41169 offset: usize,
41170 mut depth: fidl::encoding::Depth,
41171 ) -> fidl::Result<()> {
41172 decoder.debug_check_bounds::<Self>(offset);
41173 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41174 None => return Err(fidl::Error::NotNullable),
41175 Some(len) => len,
41176 };
41177 if len == 0 {
41179 return Ok(());
41180 };
41181 depth.increment()?;
41182 let envelope_size = 8;
41183 let bytes_len = len * envelope_size;
41184 let offset = decoder.out_of_line_offset(bytes_len)?;
41185 let mut _next_ordinal_to_read = 0;
41187 let mut next_offset = offset;
41188 let end_offset = offset + bytes_len;
41189 _next_ordinal_to_read += 1;
41190 if next_offset >= end_offset {
41191 return Ok(());
41192 }
41193
41194 while _next_ordinal_to_read < 1 {
41196 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41197 _next_ordinal_to_read += 1;
41198 next_offset += envelope_size;
41199 }
41200
41201 let next_out_of_line = decoder.next_out_of_line();
41202 let handles_before = decoder.remaining_handles();
41203 if let Some((inlined, num_bytes, num_handles)) =
41204 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41205 {
41206 let member_inline_size =
41207 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41208 if inlined != (member_inline_size <= 4) {
41209 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41210 }
41211 let inner_offset;
41212 let mut inner_depth = depth.clone();
41213 if inlined {
41214 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41215 inner_offset = next_offset;
41216 } else {
41217 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41218 inner_depth.increment()?;
41219 }
41220 let val_ref = self.before.get_or_insert_with(|| fidl::new_empty!(u8, D));
41221 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
41222 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41223 {
41224 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41225 }
41226 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41227 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41228 }
41229 }
41230
41231 next_offset += envelope_size;
41232 _next_ordinal_to_read += 1;
41233 if next_offset >= end_offset {
41234 return Ok(());
41235 }
41236
41237 while _next_ordinal_to_read < 3 {
41239 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41240 _next_ordinal_to_read += 1;
41241 next_offset += envelope_size;
41242 }
41243
41244 let next_out_of_line = decoder.next_out_of_line();
41245 let handles_before = decoder.remaining_handles();
41246 if let Some((inlined, num_bytes, num_handles)) =
41247 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41248 {
41249 let member_inline_size =
41250 <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41251 if inlined != (member_inline_size <= 4) {
41252 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41253 }
41254 let inner_offset;
41255 let mut inner_depth = depth.clone();
41256 if inlined {
41257 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41258 inner_offset = next_offset;
41259 } else {
41260 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41261 inner_depth.increment()?;
41262 }
41263 let val_ref =
41264 self.member.get_or_insert_with(|| fidl::new_empty!(UnionSize12Align4, D));
41265 fidl::decode!(UnionSize12Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
41266 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41267 {
41268 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41269 }
41270 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41271 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41272 }
41273 }
41274
41275 next_offset += envelope_size;
41276 _next_ordinal_to_read += 1;
41277 if next_offset >= end_offset {
41278 return Ok(());
41279 }
41280
41281 while _next_ordinal_to_read < 5 {
41283 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41284 _next_ordinal_to_read += 1;
41285 next_offset += envelope_size;
41286 }
41287
41288 let next_out_of_line = decoder.next_out_of_line();
41289 let handles_before = decoder.remaining_handles();
41290 if let Some((inlined, num_bytes, num_handles)) =
41291 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41292 {
41293 let member_inline_size =
41294 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41295 if inlined != (member_inline_size <= 4) {
41296 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41297 }
41298 let inner_offset;
41299 let mut inner_depth = depth.clone();
41300 if inlined {
41301 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41302 inner_offset = next_offset;
41303 } else {
41304 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41305 inner_depth.increment()?;
41306 }
41307 let val_ref = self.after.get_or_insert_with(|| fidl::new_empty!(u8, D));
41308 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
41309 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41310 {
41311 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41312 }
41313 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41314 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41315 }
41316 }
41317
41318 next_offset += envelope_size;
41319
41320 while next_offset < end_offset {
41322 _next_ordinal_to_read += 1;
41323 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41324 next_offset += envelope_size;
41325 }
41326
41327 Ok(())
41328 }
41329 }
41330
41331 impl TableWithXUnion {
41332 #[inline(always)]
41333 fn max_ordinal_present(&self) -> u64 {
41334 if let Some(_) = self.member {
41335 return 1;
41336 }
41337 0
41338 }
41339 }
41340
41341 impl fidl::encoding::ValueTypeMarker for TableWithXUnion {
41342 type Borrowed<'a> = &'a Self;
41343 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41344 value
41345 }
41346 }
41347
41348 unsafe impl fidl::encoding::TypeMarker for TableWithXUnion {
41349 type Owned = Self;
41350
41351 #[inline(always)]
41352 fn inline_align(_context: fidl::encoding::Context) -> usize {
41353 8
41354 }
41355
41356 #[inline(always)]
41357 fn inline_size(_context: fidl::encoding::Context) -> usize {
41358 16
41359 }
41360 }
41361
41362 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithXUnion, D>
41363 for &TableWithXUnion
41364 {
41365 unsafe fn encode(
41366 self,
41367 encoder: &mut fidl::encoding::Encoder<'_, D>,
41368 offset: usize,
41369 mut depth: fidl::encoding::Depth,
41370 ) -> fidl::Result<()> {
41371 encoder.debug_check_bounds::<TableWithXUnion>(offset);
41372 let max_ordinal: u64 = self.max_ordinal_present();
41374 encoder.write_num(max_ordinal, offset);
41375 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41376 if max_ordinal == 0 {
41378 return Ok(());
41379 }
41380 depth.increment()?;
41381 let envelope_size = 8;
41382 let bytes_len = max_ordinal as usize * envelope_size;
41383 #[allow(unused_variables)]
41384 let offset = encoder.out_of_line_offset(bytes_len);
41385 let mut _prev_end_offset: usize = 0;
41386 if 1 > max_ordinal {
41387 return Ok(());
41388 }
41389
41390 let cur_offset: usize = (1 - 1) * envelope_size;
41393
41394 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41396
41397 fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
41402 self.member.as_ref().map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
41403 encoder,
41404 offset + cur_offset,
41405 depth,
41406 )?;
41407
41408 _prev_end_offset = cur_offset + envelope_size;
41409
41410 Ok(())
41411 }
41412 }
41413
41414 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithXUnion {
41415 #[inline(always)]
41416 fn new_empty() -> Self {
41417 Self::default()
41418 }
41419
41420 unsafe fn decode(
41421 &mut self,
41422 decoder: &mut fidl::encoding::Decoder<'_, D>,
41423 offset: usize,
41424 mut depth: fidl::encoding::Depth,
41425 ) -> fidl::Result<()> {
41426 decoder.debug_check_bounds::<Self>(offset);
41427 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41428 None => return Err(fidl::Error::NotNullable),
41429 Some(len) => len,
41430 };
41431 if len == 0 {
41433 return Ok(());
41434 };
41435 depth.increment()?;
41436 let envelope_size = 8;
41437 let bytes_len = len * envelope_size;
41438 let offset = decoder.out_of_line_offset(bytes_len)?;
41439 let mut _next_ordinal_to_read = 0;
41441 let mut next_offset = offset;
41442 let end_offset = offset + bytes_len;
41443 _next_ordinal_to_read += 1;
41444 if next_offset >= end_offset {
41445 return Ok(());
41446 }
41447
41448 while _next_ordinal_to_read < 1 {
41450 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41451 _next_ordinal_to_read += 1;
41452 next_offset += envelope_size;
41453 }
41454
41455 let next_out_of_line = decoder.next_out_of_line();
41456 let handles_before = decoder.remaining_handles();
41457 if let Some((inlined, num_bytes, num_handles)) =
41458 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41459 {
41460 let member_inline_size =
41461 <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41462 if inlined != (member_inline_size <= 4) {
41463 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41464 }
41465 let inner_offset;
41466 let mut inner_depth = depth.clone();
41467 if inlined {
41468 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41469 inner_offset = next_offset;
41470 } else {
41471 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41472 inner_depth.increment()?;
41473 }
41474 let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
41475 fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
41476 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41477 {
41478 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41479 }
41480 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41481 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41482 }
41483 }
41484
41485 next_offset += envelope_size;
41486
41487 while next_offset < end_offset {
41489 _next_ordinal_to_read += 1;
41490 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41491 next_offset += envelope_size;
41492 }
41493
41494 Ok(())
41495 }
41496 }
41497
41498 impl TransformerSimpleTable {
41499 #[inline(always)]
41500 fn max_ordinal_present(&self) -> u64 {
41501 if let Some(_) = self.value {
41502 return 1;
41503 }
41504 0
41505 }
41506 }
41507
41508 impl fidl::encoding::ValueTypeMarker for TransformerSimpleTable {
41509 type Borrowed<'a> = &'a Self;
41510 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41511 value
41512 }
41513 }
41514
41515 unsafe impl fidl::encoding::TypeMarker for TransformerSimpleTable {
41516 type Owned = Self;
41517
41518 #[inline(always)]
41519 fn inline_align(_context: fidl::encoding::Context) -> usize {
41520 8
41521 }
41522
41523 #[inline(always)]
41524 fn inline_size(_context: fidl::encoding::Context) -> usize {
41525 16
41526 }
41527 }
41528
41529 unsafe impl<D: fidl::encoding::ResourceDialect>
41530 fidl::encoding::Encode<TransformerSimpleTable, D> for &TransformerSimpleTable
41531 {
41532 unsafe fn encode(
41533 self,
41534 encoder: &mut fidl::encoding::Encoder<'_, D>,
41535 offset: usize,
41536 mut depth: fidl::encoding::Depth,
41537 ) -> fidl::Result<()> {
41538 encoder.debug_check_bounds::<TransformerSimpleTable>(offset);
41539 let max_ordinal: u64 = self.max_ordinal_present();
41541 encoder.write_num(max_ordinal, offset);
41542 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41543 if max_ordinal == 0 {
41545 return Ok(());
41546 }
41547 depth.increment()?;
41548 let envelope_size = 8;
41549 let bytes_len = max_ordinal as usize * envelope_size;
41550 #[allow(unused_variables)]
41551 let offset = encoder.out_of_line_offset(bytes_len);
41552 let mut _prev_end_offset: usize = 0;
41553 if 1 > max_ordinal {
41554 return Ok(());
41555 }
41556
41557 let cur_offset: usize = (1 - 1) * envelope_size;
41560
41561 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41563
41564 fidl::encoding::encode_in_envelope_optional::<u32, D>(
41569 self.value.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
41570 encoder,
41571 offset + cur_offset,
41572 depth,
41573 )?;
41574
41575 _prev_end_offset = cur_offset + envelope_size;
41576
41577 Ok(())
41578 }
41579 }
41580
41581 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41582 for TransformerSimpleTable
41583 {
41584 #[inline(always)]
41585 fn new_empty() -> Self {
41586 Self::default()
41587 }
41588
41589 unsafe fn decode(
41590 &mut self,
41591 decoder: &mut fidl::encoding::Decoder<'_, D>,
41592 offset: usize,
41593 mut depth: fidl::encoding::Depth,
41594 ) -> fidl::Result<()> {
41595 decoder.debug_check_bounds::<Self>(offset);
41596 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41597 None => return Err(fidl::Error::NotNullable),
41598 Some(len) => len,
41599 };
41600 if len == 0 {
41602 return Ok(());
41603 };
41604 depth.increment()?;
41605 let envelope_size = 8;
41606 let bytes_len = len * envelope_size;
41607 let offset = decoder.out_of_line_offset(bytes_len)?;
41608 let mut _next_ordinal_to_read = 0;
41610 let mut next_offset = offset;
41611 let end_offset = offset + bytes_len;
41612 _next_ordinal_to_read += 1;
41613 if next_offset >= end_offset {
41614 return Ok(());
41615 }
41616
41617 while _next_ordinal_to_read < 1 {
41619 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41620 _next_ordinal_to_read += 1;
41621 next_offset += envelope_size;
41622 }
41623
41624 let next_out_of_line = decoder.next_out_of_line();
41625 let handles_before = decoder.remaining_handles();
41626 if let Some((inlined, num_bytes, num_handles)) =
41627 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41628 {
41629 let member_inline_size =
41630 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41631 if inlined != (member_inline_size <= 4) {
41632 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41633 }
41634 let inner_offset;
41635 let mut inner_depth = depth.clone();
41636 if inlined {
41637 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41638 inner_offset = next_offset;
41639 } else {
41640 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41641 inner_depth.increment()?;
41642 }
41643 let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u32, D));
41644 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
41645 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41646 {
41647 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41648 }
41649 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41650 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41651 }
41652 }
41653
41654 next_offset += envelope_size;
41655
41656 while next_offset < end_offset {
41658 _next_ordinal_to_read += 1;
41659 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41660 next_offset += envelope_size;
41661 }
41662
41663 Ok(())
41664 }
41665 }
41666
41667 impl XUnionInTable {
41668 #[inline(always)]
41669 fn max_ordinal_present(&self) -> u64 {
41670 if let Some(_) = self.after {
41671 return 3;
41672 }
41673 if let Some(_) = self.xu {
41674 return 2;
41675 }
41676 if let Some(_) = self.before {
41677 return 1;
41678 }
41679 0
41680 }
41681 }
41682
41683 impl fidl::encoding::ValueTypeMarker for XUnionInTable {
41684 type Borrowed<'a> = &'a Self;
41685 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41686 value
41687 }
41688 }
41689
41690 unsafe impl fidl::encoding::TypeMarker for XUnionInTable {
41691 type Owned = Self;
41692
41693 #[inline(always)]
41694 fn inline_align(_context: fidl::encoding::Context) -> usize {
41695 8
41696 }
41697
41698 #[inline(always)]
41699 fn inline_size(_context: fidl::encoding::Context) -> usize {
41700 16
41701 }
41702 }
41703
41704 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionInTable, D>
41705 for &XUnionInTable
41706 {
41707 unsafe fn encode(
41708 self,
41709 encoder: &mut fidl::encoding::Encoder<'_, D>,
41710 offset: usize,
41711 mut depth: fidl::encoding::Depth,
41712 ) -> fidl::Result<()> {
41713 encoder.debug_check_bounds::<XUnionInTable>(offset);
41714 let max_ordinal: u64 = self.max_ordinal_present();
41716 encoder.write_num(max_ordinal, offset);
41717 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41718 if max_ordinal == 0 {
41720 return Ok(());
41721 }
41722 depth.increment()?;
41723 let envelope_size = 8;
41724 let bytes_len = max_ordinal as usize * envelope_size;
41725 #[allow(unused_variables)]
41726 let offset = encoder.out_of_line_offset(bytes_len);
41727 let mut _prev_end_offset: usize = 0;
41728 if 1 > max_ordinal {
41729 return Ok(());
41730 }
41731
41732 let cur_offset: usize = (1 - 1) * envelope_size;
41735
41736 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41738
41739 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
41744 self.before.as_ref().map(
41745 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
41746 ),
41747 encoder,
41748 offset + cur_offset,
41749 depth,
41750 )?;
41751
41752 _prev_end_offset = cur_offset + envelope_size;
41753 if 2 > max_ordinal {
41754 return Ok(());
41755 }
41756
41757 let cur_offset: usize = (2 - 1) * envelope_size;
41760
41761 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41763
41764 fidl::encoding::encode_in_envelope_optional::<SampleXUnion, D>(
41769 self.xu.as_ref().map(<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow),
41770 encoder,
41771 offset + cur_offset,
41772 depth,
41773 )?;
41774
41775 _prev_end_offset = cur_offset + envelope_size;
41776 if 3 > max_ordinal {
41777 return Ok(());
41778 }
41779
41780 let cur_offset: usize = (3 - 1) * envelope_size;
41783
41784 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41786
41787 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
41792 self.after.as_ref().map(
41793 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
41794 ),
41795 encoder,
41796 offset + cur_offset,
41797 depth,
41798 )?;
41799
41800 _prev_end_offset = cur_offset + envelope_size;
41801
41802 Ok(())
41803 }
41804 }
41805
41806 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionInTable {
41807 #[inline(always)]
41808 fn new_empty() -> Self {
41809 Self::default()
41810 }
41811
41812 unsafe fn decode(
41813 &mut self,
41814 decoder: &mut fidl::encoding::Decoder<'_, D>,
41815 offset: usize,
41816 mut depth: fidl::encoding::Depth,
41817 ) -> fidl::Result<()> {
41818 decoder.debug_check_bounds::<Self>(offset);
41819 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41820 None => return Err(fidl::Error::NotNullable),
41821 Some(len) => len,
41822 };
41823 if len == 0 {
41825 return Ok(());
41826 };
41827 depth.increment()?;
41828 let envelope_size = 8;
41829 let bytes_len = len * envelope_size;
41830 let offset = decoder.out_of_line_offset(bytes_len)?;
41831 let mut _next_ordinal_to_read = 0;
41833 let mut next_offset = offset;
41834 let end_offset = offset + bytes_len;
41835 _next_ordinal_to_read += 1;
41836 if next_offset >= end_offset {
41837 return Ok(());
41838 }
41839
41840 while _next_ordinal_to_read < 1 {
41842 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41843 _next_ordinal_to_read += 1;
41844 next_offset += envelope_size;
41845 }
41846
41847 let next_out_of_line = decoder.next_out_of_line();
41848 let handles_before = decoder.remaining_handles();
41849 if let Some((inlined, num_bytes, num_handles)) =
41850 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41851 {
41852 let member_inline_size =
41853 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
41854 decoder.context,
41855 );
41856 if inlined != (member_inline_size <= 4) {
41857 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41858 }
41859 let inner_offset;
41860 let mut inner_depth = depth.clone();
41861 if inlined {
41862 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41863 inner_offset = next_offset;
41864 } else {
41865 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41866 inner_depth.increment()?;
41867 }
41868 let val_ref = self
41869 .before
41870 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
41871 fidl::decode!(
41872 fidl::encoding::UnboundedString,
41873 D,
41874 val_ref,
41875 decoder,
41876 inner_offset,
41877 inner_depth
41878 )?;
41879 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41880 {
41881 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41882 }
41883 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41884 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41885 }
41886 }
41887
41888 next_offset += envelope_size;
41889 _next_ordinal_to_read += 1;
41890 if next_offset >= end_offset {
41891 return Ok(());
41892 }
41893
41894 while _next_ordinal_to_read < 2 {
41896 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41897 _next_ordinal_to_read += 1;
41898 next_offset += envelope_size;
41899 }
41900
41901 let next_out_of_line = decoder.next_out_of_line();
41902 let handles_before = decoder.remaining_handles();
41903 if let Some((inlined, num_bytes, num_handles)) =
41904 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41905 {
41906 let member_inline_size =
41907 <SampleXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41908 if inlined != (member_inline_size <= 4) {
41909 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41910 }
41911 let inner_offset;
41912 let mut inner_depth = depth.clone();
41913 if inlined {
41914 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41915 inner_offset = next_offset;
41916 } else {
41917 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41918 inner_depth.increment()?;
41919 }
41920 let val_ref = self.xu.get_or_insert_with(|| fidl::new_empty!(SampleXUnion, D));
41921 fidl::decode!(SampleXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
41922 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41923 {
41924 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41925 }
41926 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41927 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41928 }
41929 }
41930
41931 next_offset += envelope_size;
41932 _next_ordinal_to_read += 1;
41933 if next_offset >= end_offset {
41934 return Ok(());
41935 }
41936
41937 while _next_ordinal_to_read < 3 {
41939 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41940 _next_ordinal_to_read += 1;
41941 next_offset += envelope_size;
41942 }
41943
41944 let next_out_of_line = decoder.next_out_of_line();
41945 let handles_before = decoder.remaining_handles();
41946 if let Some((inlined, num_bytes, num_handles)) =
41947 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41948 {
41949 let member_inline_size =
41950 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
41951 decoder.context,
41952 );
41953 if inlined != (member_inline_size <= 4) {
41954 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41955 }
41956 let inner_offset;
41957 let mut inner_depth = depth.clone();
41958 if inlined {
41959 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41960 inner_offset = next_offset;
41961 } else {
41962 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41963 inner_depth.increment()?;
41964 }
41965 let val_ref = self
41966 .after
41967 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
41968 fidl::decode!(
41969 fidl::encoding::UnboundedString,
41970 D,
41971 val_ref,
41972 decoder,
41973 inner_offset,
41974 inner_depth
41975 )?;
41976 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41977 {
41978 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41979 }
41980 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41981 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41982 }
41983 }
41984
41985 next_offset += envelope_size;
41986
41987 while next_offset < end_offset {
41989 _next_ordinal_to_read += 1;
41990 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41991 next_offset += envelope_size;
41992 }
41993
41994 Ok(())
41995 }
41996 }
41997
41998 impl fidl::encoding::ValueTypeMarker for CompatUnion {
41999 type Borrowed<'a> = &'a Self;
42000 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42001 value
42002 }
42003 }
42004
42005 unsafe impl fidl::encoding::TypeMarker for CompatUnion {
42006 type Owned = Self;
42007
42008 #[inline(always)]
42009 fn inline_align(_context: fidl::encoding::Context) -> usize {
42010 8
42011 }
42012
42013 #[inline(always)]
42014 fn inline_size(_context: fidl::encoding::Context) -> usize {
42015 16
42016 }
42017 }
42018
42019 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatUnion, D>
42020 for &CompatUnion
42021 {
42022 #[inline]
42023 unsafe fn encode(
42024 self,
42025 encoder: &mut fidl::encoding::Encoder<'_, D>,
42026 offset: usize,
42027 _depth: fidl::encoding::Depth,
42028 ) -> fidl::Result<()> {
42029 encoder.debug_check_bounds::<CompatUnion>(offset);
42030 encoder.write_num::<u64>(self.ordinal(), offset);
42031 match self {
42032 CompatUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
42033 fidl::encoding::UnboundedString,
42034 D,
42035 >(
42036 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
42037 val,
42038 ),
42039 encoder,
42040 offset + 8,
42041 _depth,
42042 ),
42043 CompatUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
42044 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
42045 encoder,
42046 offset + 8,
42047 _depth,
42048 ),
42049 }
42050 }
42051 }
42052
42053 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatUnion {
42054 #[inline(always)]
42055 fn new_empty() -> Self {
42056 Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
42057 }
42058
42059 #[inline]
42060 unsafe fn decode(
42061 &mut self,
42062 decoder: &mut fidl::encoding::Decoder<'_, D>,
42063 offset: usize,
42064 mut depth: fidl::encoding::Depth,
42065 ) -> fidl::Result<()> {
42066 decoder.debug_check_bounds::<Self>(offset);
42067 #[allow(unused_variables)]
42068 let next_out_of_line = decoder.next_out_of_line();
42069 let handles_before = decoder.remaining_handles();
42070 let (ordinal, inlined, num_bytes, num_handles) =
42071 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42072
42073 let member_inline_size = match ordinal {
42074 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
42075 decoder.context,
42076 ),
42077 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42078 _ => return Err(fidl::Error::UnknownUnionTag),
42079 };
42080
42081 if inlined != (member_inline_size <= 4) {
42082 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42083 }
42084 let _inner_offset;
42085 if inlined {
42086 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42087 _inner_offset = offset + 8;
42088 } else {
42089 depth.increment()?;
42090 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42091 }
42092 match ordinal {
42093 1 => {
42094 #[allow(irrefutable_let_patterns)]
42095 if let CompatUnion::S(_) = self {
42096 } else {
42098 *self =
42100 CompatUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
42101 }
42102 #[allow(irrefutable_let_patterns)]
42103 if let CompatUnion::S(ref mut val) = self {
42104 fidl::decode!(
42105 fidl::encoding::UnboundedString,
42106 D,
42107 val,
42108 decoder,
42109 _inner_offset,
42110 depth
42111 )?;
42112 } else {
42113 unreachable!()
42114 }
42115 }
42116 2 => {
42117 #[allow(irrefutable_let_patterns)]
42118 if let CompatUnion::B(_) = self {
42119 } else {
42121 *self = CompatUnion::B(fidl::new_empty!(bool, D));
42123 }
42124 #[allow(irrefutable_let_patterns)]
42125 if let CompatUnion::B(ref mut val) = self {
42126 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
42127 } else {
42128 unreachable!()
42129 }
42130 }
42131 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42132 }
42133 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42134 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42135 }
42136 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42137 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42138 }
42139 Ok(())
42140 }
42141 }
42142
42143 impl fidl::encoding::ValueTypeMarker for CompatXUnion {
42144 type Borrowed<'a> = &'a Self;
42145 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42146 value
42147 }
42148 }
42149
42150 unsafe impl fidl::encoding::TypeMarker for CompatXUnion {
42151 type Owned = Self;
42152
42153 #[inline(always)]
42154 fn inline_align(_context: fidl::encoding::Context) -> usize {
42155 8
42156 }
42157
42158 #[inline(always)]
42159 fn inline_size(_context: fidl::encoding::Context) -> usize {
42160 16
42161 }
42162 }
42163
42164 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatXUnion, D>
42165 for &CompatXUnion
42166 {
42167 #[inline]
42168 unsafe fn encode(
42169 self,
42170 encoder: &mut fidl::encoding::Encoder<'_, D>,
42171 offset: usize,
42172 _depth: fidl::encoding::Depth,
42173 ) -> fidl::Result<()> {
42174 encoder.debug_check_bounds::<CompatXUnion>(offset);
42175 encoder.write_num::<u64>(self.ordinal(), offset);
42176 match self {
42177 CompatXUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
42178 fidl::encoding::UnboundedString,
42179 D,
42180 >(
42181 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
42182 val,
42183 ),
42184 encoder,
42185 offset + 8,
42186 _depth,
42187 ),
42188 CompatXUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
42189 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
42190 encoder,
42191 offset + 8,
42192 _depth,
42193 ),
42194 CompatXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
42195 }
42196 }
42197 }
42198
42199 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatXUnion {
42200 #[inline(always)]
42201 fn new_empty() -> Self {
42202 Self::__SourceBreaking { unknown_ordinal: 0 }
42203 }
42204
42205 #[inline]
42206 unsafe fn decode(
42207 &mut self,
42208 decoder: &mut fidl::encoding::Decoder<'_, D>,
42209 offset: usize,
42210 mut depth: fidl::encoding::Depth,
42211 ) -> fidl::Result<()> {
42212 decoder.debug_check_bounds::<Self>(offset);
42213 #[allow(unused_variables)]
42214 let next_out_of_line = decoder.next_out_of_line();
42215 let handles_before = decoder.remaining_handles();
42216 let (ordinal, inlined, num_bytes, num_handles) =
42217 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42218
42219 let member_inline_size = match ordinal {
42220 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
42221 decoder.context,
42222 ),
42223 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42224 0 => return Err(fidl::Error::UnknownUnionTag),
42225 _ => num_bytes as usize,
42226 };
42227
42228 if inlined != (member_inline_size <= 4) {
42229 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42230 }
42231 let _inner_offset;
42232 if inlined {
42233 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42234 _inner_offset = offset + 8;
42235 } else {
42236 depth.increment()?;
42237 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42238 }
42239 match ordinal {
42240 1 => {
42241 #[allow(irrefutable_let_patterns)]
42242 if let CompatXUnion::S(_) = self {
42243 } else {
42245 *self =
42247 CompatXUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
42248 }
42249 #[allow(irrefutable_let_patterns)]
42250 if let CompatXUnion::S(ref mut val) = self {
42251 fidl::decode!(
42252 fidl::encoding::UnboundedString,
42253 D,
42254 val,
42255 decoder,
42256 _inner_offset,
42257 depth
42258 )?;
42259 } else {
42260 unreachable!()
42261 }
42262 }
42263 2 => {
42264 #[allow(irrefutable_let_patterns)]
42265 if let CompatXUnion::B(_) = self {
42266 } else {
42268 *self = CompatXUnion::B(fidl::new_empty!(bool, D));
42270 }
42271 #[allow(irrefutable_let_patterns)]
42272 if let CompatXUnion::B(ref mut val) = self {
42273 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
42274 } else {
42275 unreachable!()
42276 }
42277 }
42278 #[allow(deprecated)]
42279 ordinal => {
42280 for _ in 0..num_handles {
42281 decoder.drop_next_handle()?;
42282 }
42283 *self = CompatXUnion::__SourceBreaking { unknown_ordinal: ordinal };
42284 }
42285 }
42286 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42287 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42288 }
42289 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42290 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42291 }
42292 Ok(())
42293 }
42294 }
42295
42296 impl fidl::encoding::ValueTypeMarker for EmptyFlexibleUnion {
42297 type Borrowed<'a> = &'a Self;
42298 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42299 value
42300 }
42301 }
42302
42303 unsafe impl fidl::encoding::TypeMarker for EmptyFlexibleUnion {
42304 type Owned = Self;
42305
42306 #[inline(always)]
42307 fn inline_align(_context: fidl::encoding::Context) -> usize {
42308 8
42309 }
42310
42311 #[inline(always)]
42312 fn inline_size(_context: fidl::encoding::Context) -> usize {
42313 16
42314 }
42315 }
42316
42317 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyFlexibleUnion, D>
42318 for &EmptyFlexibleUnion
42319 {
42320 #[inline]
42321 unsafe fn encode(
42322 self,
42323 encoder: &mut fidl::encoding::Encoder<'_, D>,
42324 offset: usize,
42325 _depth: fidl::encoding::Depth,
42326 ) -> fidl::Result<()> {
42327 encoder.debug_check_bounds::<EmptyFlexibleUnion>(offset);
42328 encoder.write_num::<u64>(self.ordinal(), offset);
42329 match self {
42330 EmptyFlexibleUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
42331 }
42332 }
42333 }
42334
42335 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyFlexibleUnion {
42336 #[inline(always)]
42337 fn new_empty() -> Self {
42338 Self::__SourceBreaking { unknown_ordinal: 0 }
42339 }
42340
42341 #[inline]
42342 unsafe fn decode(
42343 &mut self,
42344 decoder: &mut fidl::encoding::Decoder<'_, D>,
42345 offset: usize,
42346 mut depth: fidl::encoding::Depth,
42347 ) -> fidl::Result<()> {
42348 decoder.debug_check_bounds::<Self>(offset);
42349 #[allow(unused_variables)]
42350 let next_out_of_line = decoder.next_out_of_line();
42351 let handles_before = decoder.remaining_handles();
42352 let (ordinal, inlined, num_bytes, num_handles) =
42353 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42354
42355 let member_inline_size = match ordinal {
42356 0 => return Err(fidl::Error::UnknownUnionTag),
42357 _ => num_bytes as usize,
42358 };
42359
42360 if inlined != (member_inline_size <= 4) {
42361 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42362 }
42363 let _inner_offset;
42364 if inlined {
42365 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42366 _inner_offset = offset + 8;
42367 } else {
42368 depth.increment()?;
42369 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42370 }
42371 match ordinal {
42372 #[allow(deprecated)]
42373 ordinal => {
42374 for _ in 0..num_handles {
42375 decoder.drop_next_handle()?;
42376 }
42377 *self = EmptyFlexibleUnion::__SourceBreaking { unknown_ordinal: ordinal };
42378 }
42379 }
42380 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42381 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42382 }
42383 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42384 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42385 }
42386 Ok(())
42387 }
42388 }
42389
42390 impl fidl::encoding::ValueTypeMarker for EmptyStructUnion {
42391 type Borrowed<'a> = &'a Self;
42392 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42393 value
42394 }
42395 }
42396
42397 unsafe impl fidl::encoding::TypeMarker for EmptyStructUnion {
42398 type Owned = Self;
42399
42400 #[inline(always)]
42401 fn inline_align(_context: fidl::encoding::Context) -> usize {
42402 8
42403 }
42404
42405 #[inline(always)]
42406 fn inline_size(_context: fidl::encoding::Context) -> usize {
42407 16
42408 }
42409 }
42410
42411 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructUnion, D>
42412 for &EmptyStructUnion
42413 {
42414 #[inline]
42415 unsafe fn encode(
42416 self,
42417 encoder: &mut fidl::encoding::Encoder<'_, D>,
42418 offset: usize,
42419 _depth: fidl::encoding::Depth,
42420 ) -> fidl::Result<()> {
42421 encoder.debug_check_bounds::<EmptyStructUnion>(offset);
42422 encoder.write_num::<u64>(self.ordinal(), offset);
42423 match self {
42424 EmptyStructUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
42425 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
42426 encoder,
42427 offset + 8,
42428 _depth,
42429 ),
42430 EmptyStructUnion::Es(ref val) => {
42431 fidl::encoding::encode_in_envelope::<TransformerEmptyStruct, D>(
42432 <TransformerEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
42433 encoder,
42434 offset + 8,
42435 _depth,
42436 )
42437 }
42438 }
42439 }
42440 }
42441
42442 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructUnion {
42443 #[inline(always)]
42444 fn new_empty() -> Self {
42445 Self::Unused(fidl::new_empty!(u8, D))
42446 }
42447
42448 #[inline]
42449 unsafe fn decode(
42450 &mut self,
42451 decoder: &mut fidl::encoding::Decoder<'_, D>,
42452 offset: usize,
42453 mut depth: fidl::encoding::Depth,
42454 ) -> fidl::Result<()> {
42455 decoder.debug_check_bounds::<Self>(offset);
42456 #[allow(unused_variables)]
42457 let next_out_of_line = decoder.next_out_of_line();
42458 let handles_before = decoder.remaining_handles();
42459 let (ordinal, inlined, num_bytes, num_handles) =
42460 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42461
42462 let member_inline_size = match ordinal {
42463 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42464 2 => <TransformerEmptyStruct as fidl::encoding::TypeMarker>::inline_size(
42465 decoder.context,
42466 ),
42467 _ => return Err(fidl::Error::UnknownUnionTag),
42468 };
42469
42470 if inlined != (member_inline_size <= 4) {
42471 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42472 }
42473 let _inner_offset;
42474 if inlined {
42475 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42476 _inner_offset = offset + 8;
42477 } else {
42478 depth.increment()?;
42479 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42480 }
42481 match ordinal {
42482 1 => {
42483 #[allow(irrefutable_let_patterns)]
42484 if let EmptyStructUnion::Unused(_) = self {
42485 } else {
42487 *self = EmptyStructUnion::Unused(fidl::new_empty!(u8, D));
42489 }
42490 #[allow(irrefutable_let_patterns)]
42491 if let EmptyStructUnion::Unused(ref mut val) = self {
42492 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
42493 } else {
42494 unreachable!()
42495 }
42496 }
42497 2 => {
42498 #[allow(irrefutable_let_patterns)]
42499 if let EmptyStructUnion::Es(_) = self {
42500 } else {
42502 *self = EmptyStructUnion::Es(fidl::new_empty!(TransformerEmptyStruct, D));
42504 }
42505 #[allow(irrefutable_let_patterns)]
42506 if let EmptyStructUnion::Es(ref mut val) = self {
42507 fidl::decode!(
42508 TransformerEmptyStruct,
42509 D,
42510 val,
42511 decoder,
42512 _inner_offset,
42513 depth
42514 )?;
42515 } else {
42516 unreachable!()
42517 }
42518 }
42519 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42520 }
42521 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42522 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42523 }
42524 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42525 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42526 }
42527 Ok(())
42528 }
42529 }
42530
42531 impl fidl::encoding::ValueTypeMarker for FidlvizUnion {
42532 type Borrowed<'a> = &'a Self;
42533 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42534 value
42535 }
42536 }
42537
42538 unsafe impl fidl::encoding::TypeMarker for FidlvizUnion {
42539 type Owned = Self;
42540
42541 #[inline(always)]
42542 fn inline_align(_context: fidl::encoding::Context) -> usize {
42543 8
42544 }
42545
42546 #[inline(always)]
42547 fn inline_size(_context: fidl::encoding::Context) -> usize {
42548 16
42549 }
42550 }
42551
42552 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizUnion, D>
42553 for &FidlvizUnion
42554 {
42555 #[inline]
42556 unsafe fn encode(
42557 self,
42558 encoder: &mut fidl::encoding::Encoder<'_, D>,
42559 offset: usize,
42560 _depth: fidl::encoding::Depth,
42561 ) -> fidl::Result<()> {
42562 encoder.debug_check_bounds::<FidlvizUnion>(offset);
42563 encoder.write_num::<u64>(self.ordinal(), offset);
42564 match self {
42565 FidlvizUnion::F7(ref val) => fidl::encoding::encode_in_envelope::<
42566 fidl::encoding::UnboundedString,
42567 D,
42568 >(
42569 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
42570 val,
42571 ),
42572 encoder,
42573 offset + 8,
42574 _depth,
42575 ),
42576 }
42577 }
42578 }
42579
42580 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizUnion {
42581 #[inline(always)]
42582 fn new_empty() -> Self {
42583 Self::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D))
42584 }
42585
42586 #[inline]
42587 unsafe fn decode(
42588 &mut self,
42589 decoder: &mut fidl::encoding::Decoder<'_, D>,
42590 offset: usize,
42591 mut depth: fidl::encoding::Depth,
42592 ) -> fidl::Result<()> {
42593 decoder.debug_check_bounds::<Self>(offset);
42594 #[allow(unused_variables)]
42595 let next_out_of_line = decoder.next_out_of_line();
42596 let handles_before = decoder.remaining_handles();
42597 let (ordinal, inlined, num_bytes, num_handles) =
42598 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42599
42600 let member_inline_size = match ordinal {
42601 7 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
42602 decoder.context,
42603 ),
42604 _ => return Err(fidl::Error::UnknownUnionTag),
42605 };
42606
42607 if inlined != (member_inline_size <= 4) {
42608 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42609 }
42610 let _inner_offset;
42611 if inlined {
42612 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42613 _inner_offset = offset + 8;
42614 } else {
42615 depth.increment()?;
42616 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42617 }
42618 match ordinal {
42619 7 => {
42620 #[allow(irrefutable_let_patterns)]
42621 if let FidlvizUnion::F7(_) = self {
42622 } else {
42624 *self =
42626 FidlvizUnion::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D));
42627 }
42628 #[allow(irrefutable_let_patterns)]
42629 if let FidlvizUnion::F7(ref mut val) = self {
42630 fidl::decode!(
42631 fidl::encoding::UnboundedString,
42632 D,
42633 val,
42634 decoder,
42635 _inner_offset,
42636 depth
42637 )?;
42638 } else {
42639 unreachable!()
42640 }
42641 }
42642 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42643 }
42644 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42645 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42646 }
42647 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42648 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42649 }
42650 Ok(())
42651 }
42652 }
42653
42654 impl fidl::encoding::ValueTypeMarker for GoldenUnion {
42655 type Borrowed<'a> = &'a Self;
42656 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42657 value
42658 }
42659 }
42660
42661 unsafe impl fidl::encoding::TypeMarker for GoldenUnion {
42662 type Owned = Self;
42663
42664 #[inline(always)]
42665 fn inline_align(_context: fidl::encoding::Context) -> usize {
42666 8
42667 }
42668
42669 #[inline(always)]
42670 fn inline_size(_context: fidl::encoding::Context) -> usize {
42671 16
42672 }
42673 }
42674
42675 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnion, D>
42676 for &GoldenUnion
42677 {
42678 #[inline]
42679 unsafe fn encode(
42680 self,
42681 encoder: &mut fidl::encoding::Encoder<'_, D>,
42682 offset: usize,
42683 _depth: fidl::encoding::Depth,
42684 ) -> fidl::Result<()> {
42685 encoder.debug_check_bounds::<GoldenUnion>(offset);
42686 encoder.write_num::<u64>(self.ordinal(), offset);
42687 match self {
42688 GoldenUnion::V(ref val) => fidl::encoding::encode_in_envelope::<i16, D>(
42689 <i16 as fidl::encoding::ValueTypeMarker>::borrow(val),
42690 encoder,
42691 offset + 8,
42692 _depth,
42693 ),
42694 }
42695 }
42696 }
42697
42698 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnion {
42699 #[inline(always)]
42700 fn new_empty() -> Self {
42701 Self::V(fidl::new_empty!(i16, D))
42702 }
42703
42704 #[inline]
42705 unsafe fn decode(
42706 &mut self,
42707 decoder: &mut fidl::encoding::Decoder<'_, D>,
42708 offset: usize,
42709 mut depth: fidl::encoding::Depth,
42710 ) -> fidl::Result<()> {
42711 decoder.debug_check_bounds::<Self>(offset);
42712 #[allow(unused_variables)]
42713 let next_out_of_line = decoder.next_out_of_line();
42714 let handles_before = decoder.remaining_handles();
42715 let (ordinal, inlined, num_bytes, num_handles) =
42716 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42717
42718 let member_inline_size = match ordinal {
42719 1 => <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42720 _ => return Err(fidl::Error::UnknownUnionTag),
42721 };
42722
42723 if inlined != (member_inline_size <= 4) {
42724 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42725 }
42726 let _inner_offset;
42727 if inlined {
42728 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42729 _inner_offset = offset + 8;
42730 } else {
42731 depth.increment()?;
42732 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42733 }
42734 match ordinal {
42735 1 => {
42736 #[allow(irrefutable_let_patterns)]
42737 if let GoldenUnion::V(_) = self {
42738 } else {
42740 *self = GoldenUnion::V(fidl::new_empty!(i16, D));
42742 }
42743 #[allow(irrefutable_let_patterns)]
42744 if let GoldenUnion::V(ref mut val) = self {
42745 fidl::decode!(i16, D, val, decoder, _inner_offset, depth)?;
42746 } else {
42747 unreachable!()
42748 }
42749 }
42750 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42751 }
42752 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42753 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42754 }
42755 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42756 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42757 }
42758 Ok(())
42759 }
42760 }
42761
42762 impl fidl::encoding::ValueTypeMarker for IpAddressConfig {
42763 type Borrowed<'a> = &'a Self;
42764 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42765 value
42766 }
42767 }
42768
42769 unsafe impl fidl::encoding::TypeMarker for IpAddressConfig {
42770 type Owned = Self;
42771
42772 #[inline(always)]
42773 fn inline_align(_context: fidl::encoding::Context) -> usize {
42774 8
42775 }
42776
42777 #[inline(always)]
42778 fn inline_size(_context: fidl::encoding::Context) -> usize {
42779 16
42780 }
42781 }
42782
42783 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpAddressConfig, D>
42784 for &IpAddressConfig
42785 {
42786 #[inline]
42787 unsafe fn encode(
42788 self,
42789 encoder: &mut fidl::encoding::Encoder<'_, D>,
42790 offset: usize,
42791 _depth: fidl::encoding::Depth,
42792 ) -> fidl::Result<()> {
42793 encoder.debug_check_bounds::<IpAddressConfig>(offset);
42794 encoder.write_num::<u64>(self.ordinal(), offset);
42795 match self {
42796 IpAddressConfig::PaddingSize24Align4(ref val) => {
42797 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u32, 6>, D>(
42798 <fidl::encoding::Array<u32, 6> as fidl::encoding::ValueTypeMarker>::borrow(
42799 val,
42800 ),
42801 encoder,
42802 offset + 8,
42803 _depth,
42804 )
42805 }
42806 IpAddressConfig::Dhcp(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
42807 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
42808 encoder,
42809 offset + 8,
42810 _depth,
42811 ),
42812 }
42813 }
42814 }
42815
42816 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpAddressConfig {
42817 #[inline(always)]
42818 fn new_empty() -> Self {
42819 Self::PaddingSize24Align4(fidl::new_empty!(fidl::encoding::Array<u32, 6>, D))
42820 }
42821
42822 #[inline]
42823 unsafe fn decode(
42824 &mut self,
42825 decoder: &mut fidl::encoding::Decoder<'_, D>,
42826 offset: usize,
42827 mut depth: fidl::encoding::Depth,
42828 ) -> fidl::Result<()> {
42829 decoder.debug_check_bounds::<Self>(offset);
42830 #[allow(unused_variables)]
42831 let next_out_of_line = decoder.next_out_of_line();
42832 let handles_before = decoder.remaining_handles();
42833 let (ordinal, inlined, num_bytes, num_handles) =
42834 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42835
42836 let member_inline_size = match ordinal {
42837 1 => <fidl::encoding::Array<u32, 6> as fidl::encoding::TypeMarker>::inline_size(
42838 decoder.context,
42839 ),
42840 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42841 _ => return Err(fidl::Error::UnknownUnionTag),
42842 };
42843
42844 if inlined != (member_inline_size <= 4) {
42845 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42846 }
42847 let _inner_offset;
42848 if inlined {
42849 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42850 _inner_offset = offset + 8;
42851 } else {
42852 depth.increment()?;
42853 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42854 }
42855 match ordinal {
42856 1 => {
42857 #[allow(irrefutable_let_patterns)]
42858 if let IpAddressConfig::PaddingSize24Align4(_) = self {
42859 } else {
42861 *self = IpAddressConfig::PaddingSize24Align4(
42863 fidl::new_empty!(fidl::encoding::Array<u32, 6>, D),
42864 );
42865 }
42866 #[allow(irrefutable_let_patterns)]
42867 if let IpAddressConfig::PaddingSize24Align4(ref mut val) = self {
42868 fidl::decode!(fidl::encoding::Array<u32, 6>, D, val, decoder, _inner_offset, depth)?;
42869 } else {
42870 unreachable!()
42871 }
42872 }
42873 2 => {
42874 #[allow(irrefutable_let_patterns)]
42875 if let IpAddressConfig::Dhcp(_) = self {
42876 } else {
42878 *self = IpAddressConfig::Dhcp(fidl::new_empty!(bool, D));
42880 }
42881 #[allow(irrefutable_let_patterns)]
42882 if let IpAddressConfig::Dhcp(ref mut val) = self {
42883 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
42884 } else {
42885 unreachable!()
42886 }
42887 }
42888 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42889 }
42890 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42891 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42892 }
42893 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42894 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42895 }
42896 Ok(())
42897 }
42898 }
42899
42900 impl fidl::encoding::ValueTypeMarker for MutualRecursionUnion {
42901 type Borrowed<'a> = &'a Self;
42902 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42903 value
42904 }
42905 }
42906
42907 unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnion {
42908 type Owned = Self;
42909
42910 #[inline(always)]
42911 fn inline_align(_context: fidl::encoding::Context) -> usize {
42912 8
42913 }
42914
42915 #[inline(always)]
42916 fn inline_size(_context: fidl::encoding::Context) -> usize {
42917 16
42918 }
42919 }
42920
42921 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MutualRecursionUnion, D>
42922 for &MutualRecursionUnion
42923 {
42924 #[inline]
42925 unsafe fn encode(
42926 self,
42927 encoder: &mut fidl::encoding::Encoder<'_, D>,
42928 offset: usize,
42929 _depth: fidl::encoding::Depth,
42930 ) -> fidl::Result<()> {
42931 encoder.debug_check_bounds::<MutualRecursionUnion>(offset);
42932 encoder.write_num::<u64>(self.ordinal(), offset);
42933 match self {
42934 MutualRecursionUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
42935 MutualRecursionUnionStruct,
42936 D,
42937 >(
42938 <MutualRecursionUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
42939 encoder,
42940 offset + 8,
42941 _depth,
42942 ),
42943 }
42944 }
42945 }
42946
42947 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MutualRecursionUnion {
42948 #[inline(always)]
42949 fn new_empty() -> Self {
42950 Self::S(fidl::new_empty!(MutualRecursionUnionStruct, D))
42951 }
42952
42953 #[inline]
42954 unsafe fn decode(
42955 &mut self,
42956 decoder: &mut fidl::encoding::Decoder<'_, D>,
42957 offset: usize,
42958 mut depth: fidl::encoding::Depth,
42959 ) -> fidl::Result<()> {
42960 decoder.debug_check_bounds::<Self>(offset);
42961 #[allow(unused_variables)]
42962 let next_out_of_line = decoder.next_out_of_line();
42963 let handles_before = decoder.remaining_handles();
42964 let (ordinal, inlined, num_bytes, num_handles) =
42965 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42966
42967 let member_inline_size = match ordinal {
42968 1 => <MutualRecursionUnionStruct as fidl::encoding::TypeMarker>::inline_size(
42969 decoder.context,
42970 ),
42971 _ => return Err(fidl::Error::UnknownUnionTag),
42972 };
42973
42974 if inlined != (member_inline_size <= 4) {
42975 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42976 }
42977 let _inner_offset;
42978 if inlined {
42979 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42980 _inner_offset = offset + 8;
42981 } else {
42982 depth.increment()?;
42983 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42984 }
42985 match ordinal {
42986 1 => {
42987 #[allow(irrefutable_let_patterns)]
42988 if let MutualRecursionUnion::S(_) = self {
42989 } else {
42991 *self = MutualRecursionUnion::S(fidl::new_empty!(
42993 MutualRecursionUnionStruct,
42994 D
42995 ));
42996 }
42997 #[allow(irrefutable_let_patterns)]
42998 if let MutualRecursionUnion::S(ref mut val) = self {
42999 fidl::decode!(
43000 MutualRecursionUnionStruct,
43001 D,
43002 val,
43003 decoder,
43004 _inner_offset,
43005 depth
43006 )?;
43007 } else {
43008 unreachable!()
43009 }
43010 }
43011 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43012 }
43013 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43014 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43015 }
43016 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43017 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43018 }
43019 Ok(())
43020 }
43021 }
43022
43023 impl fidl::encoding::ValueTypeMarker for PaddedUnion {
43024 type Borrowed<'a> = &'a Self;
43025 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43026 value
43027 }
43028 }
43029
43030 unsafe impl fidl::encoding::TypeMarker for PaddedUnion {
43031 type Owned = Self;
43032
43033 #[inline(always)]
43034 fn inline_align(_context: fidl::encoding::Context) -> usize {
43035 8
43036 }
43037
43038 #[inline(always)]
43039 fn inline_size(_context: fidl::encoding::Context) -> usize {
43040 16
43041 }
43042 }
43043
43044 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnion, D>
43045 for &PaddedUnion
43046 {
43047 #[inline]
43048 unsafe fn encode(
43049 self,
43050 encoder: &mut fidl::encoding::Encoder<'_, D>,
43051 offset: usize,
43052 _depth: fidl::encoding::Depth,
43053 ) -> fidl::Result<()> {
43054 encoder.debug_check_bounds::<PaddedUnion>(offset);
43055 encoder.write_num::<u64>(self.ordinal(), offset);
43056 match self {
43057 PaddedUnion::Field(ref val) => fidl::encoding::encode_in_envelope::<i8, D>(
43058 <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
43059 encoder,
43060 offset + 8,
43061 _depth,
43062 ),
43063 }
43064 }
43065 }
43066
43067 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnion {
43068 #[inline(always)]
43069 fn new_empty() -> Self {
43070 Self::Field(fidl::new_empty!(i8, D))
43071 }
43072
43073 #[inline]
43074 unsafe fn decode(
43075 &mut self,
43076 decoder: &mut fidl::encoding::Decoder<'_, D>,
43077 offset: usize,
43078 mut depth: fidl::encoding::Depth,
43079 ) -> fidl::Result<()> {
43080 decoder.debug_check_bounds::<Self>(offset);
43081 #[allow(unused_variables)]
43082 let next_out_of_line = decoder.next_out_of_line();
43083 let handles_before = decoder.remaining_handles();
43084 let (ordinal, inlined, num_bytes, num_handles) =
43085 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43086
43087 let member_inline_size = match ordinal {
43088 1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43089 _ => return Err(fidl::Error::UnknownUnionTag),
43090 };
43091
43092 if inlined != (member_inline_size <= 4) {
43093 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43094 }
43095 let _inner_offset;
43096 if inlined {
43097 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43098 _inner_offset = offset + 8;
43099 } else {
43100 depth.increment()?;
43101 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43102 }
43103 match ordinal {
43104 1 => {
43105 #[allow(irrefutable_let_patterns)]
43106 if let PaddedUnion::Field(_) = self {
43107 } else {
43109 *self = PaddedUnion::Field(fidl::new_empty!(i8, D));
43111 }
43112 #[allow(irrefutable_let_patterns)]
43113 if let PaddedUnion::Field(ref mut val) = self {
43114 fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
43115 } else {
43116 unreachable!()
43117 }
43118 }
43119 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43120 }
43121 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43122 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43123 }
43124 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43125 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43126 }
43127 Ok(())
43128 }
43129 }
43130
43131 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnion {
43132 type Borrowed<'a> = &'a Self;
43133 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43134 value
43135 }
43136 }
43137
43138 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnion {
43139 type Owned = Self;
43140
43141 #[inline(always)]
43142 fn inline_align(_context: fidl::encoding::Context) -> usize {
43143 8
43144 }
43145
43146 #[inline(always)]
43147 fn inline_size(_context: fidl::encoding::Context) -> usize {
43148 16
43149 }
43150 }
43151
43152 unsafe impl<D: fidl::encoding::ResourceDialect>
43153 fidl::encoding::Encode<RecursiveOptionalAndUnion, D> for &RecursiveOptionalAndUnion
43154 {
43155 #[inline]
43156 unsafe fn encode(
43157 self,
43158 encoder: &mut fidl::encoding::Encoder<'_, D>,
43159 offset: usize,
43160 _depth: fidl::encoding::Depth,
43161 ) -> fidl::Result<()> {
43162 encoder.debug_check_bounds::<RecursiveOptionalAndUnion>(offset);
43163 encoder.write_num::<u64>(self.ordinal(), offset);
43164 match self {
43165 RecursiveOptionalAndUnion::RecursiveOptional(ref val) => {
43166 fidl::encoding::encode_in_envelope::<RecursiveOptionalStruct, D>(
43167 <RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
43168 encoder,
43169 offset + 8,
43170 _depth,
43171 )
43172 }
43173 }
43174 }
43175 }
43176
43177 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
43178 for RecursiveOptionalAndUnion
43179 {
43180 #[inline(always)]
43181 fn new_empty() -> Self {
43182 Self::RecursiveOptional(fidl::new_empty!(RecursiveOptionalStruct, D))
43183 }
43184
43185 #[inline]
43186 unsafe fn decode(
43187 &mut self,
43188 decoder: &mut fidl::encoding::Decoder<'_, D>,
43189 offset: usize,
43190 mut depth: fidl::encoding::Depth,
43191 ) -> fidl::Result<()> {
43192 decoder.debug_check_bounds::<Self>(offset);
43193 #[allow(unused_variables)]
43194 let next_out_of_line = decoder.next_out_of_line();
43195 let handles_before = decoder.remaining_handles();
43196 let (ordinal, inlined, num_bytes, num_handles) =
43197 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43198
43199 let member_inline_size = match ordinal {
43200 1 => <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
43201 decoder.context,
43202 ),
43203 _ => return Err(fidl::Error::UnknownUnionTag),
43204 };
43205
43206 if inlined != (member_inline_size <= 4) {
43207 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43208 }
43209 let _inner_offset;
43210 if inlined {
43211 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43212 _inner_offset = offset + 8;
43213 } else {
43214 depth.increment()?;
43215 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43216 }
43217 match ordinal {
43218 1 => {
43219 #[allow(irrefutable_let_patterns)]
43220 if let RecursiveOptionalAndUnion::RecursiveOptional(_) = self {
43221 } else {
43223 *self = RecursiveOptionalAndUnion::RecursiveOptional(fidl::new_empty!(
43225 RecursiveOptionalStruct,
43226 D
43227 ));
43228 }
43229 #[allow(irrefutable_let_patterns)]
43230 if let RecursiveOptionalAndUnion::RecursiveOptional(ref mut val) = self {
43231 fidl::decode!(
43232 RecursiveOptionalStruct,
43233 D,
43234 val,
43235 decoder,
43236 _inner_offset,
43237 depth
43238 )?;
43239 } else {
43240 unreachable!()
43241 }
43242 }
43243 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43244 }
43245 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43246 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43247 }
43248 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43249 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43250 }
43251 Ok(())
43252 }
43253 }
43254
43255 impl fidl::encoding::ValueTypeMarker for RecursiveUnion {
43256 type Borrowed<'a> = &'a Self;
43257 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43258 value
43259 }
43260 }
43261
43262 unsafe impl fidl::encoding::TypeMarker for RecursiveUnion {
43263 type Owned = Self;
43264
43265 #[inline(always)]
43266 fn inline_align(_context: fidl::encoding::Context) -> usize {
43267 8
43268 }
43269
43270 #[inline(always)]
43271 fn inline_size(_context: fidl::encoding::Context) -> usize {
43272 16
43273 }
43274 }
43275
43276 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnion, D>
43277 for &RecursiveUnion
43278 {
43279 #[inline]
43280 unsafe fn encode(
43281 self,
43282 encoder: &mut fidl::encoding::Encoder<'_, D>,
43283 offset: usize,
43284 _depth: fidl::encoding::Depth,
43285 ) -> fidl::Result<()> {
43286 encoder.debug_check_bounds::<RecursiveUnion>(offset);
43287 encoder.write_num::<u64>(self.ordinal(), offset);
43288 match self {
43289 RecursiveUnion::S(ref val) => {
43290 fidl::encoding::encode_in_envelope::<RecursiveUnionStruct, D>(
43291 <RecursiveUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
43292 encoder,
43293 offset + 8,
43294 _depth,
43295 )
43296 }
43297 RecursiveUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
43298 }
43299 }
43300 }
43301
43302 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnion {
43303 #[inline(always)]
43304 fn new_empty() -> Self {
43305 Self::__SourceBreaking { unknown_ordinal: 0 }
43306 }
43307
43308 #[inline]
43309 unsafe fn decode(
43310 &mut self,
43311 decoder: &mut fidl::encoding::Decoder<'_, D>,
43312 offset: usize,
43313 mut depth: fidl::encoding::Depth,
43314 ) -> fidl::Result<()> {
43315 decoder.debug_check_bounds::<Self>(offset);
43316 #[allow(unused_variables)]
43317 let next_out_of_line = decoder.next_out_of_line();
43318 let handles_before = decoder.remaining_handles();
43319 let (ordinal, inlined, num_bytes, num_handles) =
43320 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43321
43322 let member_inline_size = match ordinal {
43323 1 => <RecursiveUnionStruct as fidl::encoding::TypeMarker>::inline_size(
43324 decoder.context,
43325 ),
43326 0 => return Err(fidl::Error::UnknownUnionTag),
43327 _ => num_bytes as usize,
43328 };
43329
43330 if inlined != (member_inline_size <= 4) {
43331 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43332 }
43333 let _inner_offset;
43334 if inlined {
43335 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43336 _inner_offset = offset + 8;
43337 } else {
43338 depth.increment()?;
43339 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43340 }
43341 match ordinal {
43342 1 => {
43343 #[allow(irrefutable_let_patterns)]
43344 if let RecursiveUnion::S(_) = self {
43345 } else {
43347 *self = RecursiveUnion::S(fidl::new_empty!(RecursiveUnionStruct, D));
43349 }
43350 #[allow(irrefutable_let_patterns)]
43351 if let RecursiveUnion::S(ref mut val) = self {
43352 fidl::decode!(RecursiveUnionStruct, D, val, decoder, _inner_offset, depth)?;
43353 } else {
43354 unreachable!()
43355 }
43356 }
43357 #[allow(deprecated)]
43358 ordinal => {
43359 for _ in 0..num_handles {
43360 decoder.drop_next_handle()?;
43361 }
43362 *self = RecursiveUnion::__SourceBreaking { unknown_ordinal: ordinal };
43363 }
43364 }
43365 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43366 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43367 }
43368 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43369 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43370 }
43371 Ok(())
43372 }
43373 }
43374
43375 impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnion {
43376 type Borrowed<'a> = &'a Self;
43377 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43378 value
43379 }
43380 }
43381
43382 unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnion {
43383 type Owned = Self;
43384
43385 #[inline(always)]
43386 fn inline_align(_context: fidl::encoding::Context) -> usize {
43387 8
43388 }
43389
43390 #[inline(always)]
43391 fn inline_size(_context: fidl::encoding::Context) -> usize {
43392 16
43393 }
43394 }
43395
43396 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorUnion, D>
43397 for &RecursiveVectorUnion
43398 {
43399 #[inline]
43400 unsafe fn encode(
43401 self,
43402 encoder: &mut fidl::encoding::Encoder<'_, D>,
43403 offset: usize,
43404 _depth: fidl::encoding::Depth,
43405 ) -> fidl::Result<()> {
43406 encoder.debug_check_bounds::<RecursiveVectorUnion>(offset);
43407 encoder.write_num::<u64>(self.ordinal(), offset);
43408 match self {
43409 RecursiveVectorUnion::Vec(ref val) => fidl::encoding::encode_in_envelope::<
43410 fidl::encoding::UnboundedVector<
43411 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43412 >,
43413 D,
43414 >(
43415 <fidl::encoding::UnboundedVector<
43416 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43417 > as fidl::encoding::ValueTypeMarker>::borrow(val),
43418 encoder,
43419 offset + 8,
43420 _depth,
43421 ),
43422 }
43423 }
43424 }
43425
43426 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorUnion {
43427 #[inline(always)]
43428 fn new_empty() -> Self {
43429 Self::Vec(fidl::new_empty!(
43430 fidl::encoding::UnboundedVector<
43431 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43432 >,
43433 D
43434 ))
43435 }
43436
43437 #[inline]
43438 unsafe fn decode(
43439 &mut self,
43440 decoder: &mut fidl::encoding::Decoder<'_, D>,
43441 offset: usize,
43442 mut depth: fidl::encoding::Depth,
43443 ) -> fidl::Result<()> {
43444 decoder.debug_check_bounds::<Self>(offset);
43445 #[allow(unused_variables)]
43446 let next_out_of_line = decoder.next_out_of_line();
43447 let handles_before = decoder.remaining_handles();
43448 let (ordinal, inlined, num_bytes, num_handles) =
43449 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43450
43451 let member_inline_size = match ordinal {
43452 1 => <fidl::encoding::UnboundedVector<
43453 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43454 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43455 _ => return Err(fidl::Error::UnknownUnionTag),
43456 };
43457
43458 if inlined != (member_inline_size <= 4) {
43459 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43460 }
43461 let _inner_offset;
43462 if inlined {
43463 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43464 _inner_offset = offset + 8;
43465 } else {
43466 depth.increment()?;
43467 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43468 }
43469 match ordinal {
43470 1 => {
43471 #[allow(irrefutable_let_patterns)]
43472 if let RecursiveVectorUnion::Vec(_) = self {
43473 } else {
43475 *self = RecursiveVectorUnion::Vec(fidl::new_empty!(
43477 fidl::encoding::UnboundedVector<
43478 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43479 >,
43480 D
43481 ));
43482 }
43483 #[allow(irrefutable_let_patterns)]
43484 if let RecursiveVectorUnion::Vec(ref mut val) = self {
43485 fidl::decode!(
43486 fidl::encoding::UnboundedVector<
43487 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43488 >,
43489 D,
43490 val,
43491 decoder,
43492 _inner_offset,
43493 depth
43494 )?;
43495 } else {
43496 unreachable!()
43497 }
43498 }
43499 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43500 }
43501 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43502 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43503 }
43504 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43505 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43506 }
43507 Ok(())
43508 }
43509 }
43510
43511 impl fidl::encoding::ValueTypeMarker for Regression9Result {
43512 type Borrowed<'a> = &'a Self;
43513 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43514 value
43515 }
43516 }
43517
43518 unsafe impl fidl::encoding::TypeMarker for Regression9Result {
43519 type Owned = Self;
43520
43521 #[inline(always)]
43522 fn inline_align(_context: fidl::encoding::Context) -> usize {
43523 8
43524 }
43525
43526 #[inline(always)]
43527 fn inline_size(_context: fidl::encoding::Context) -> usize {
43528 16
43529 }
43530 }
43531
43532 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Result, D>
43533 for &Regression9Result
43534 {
43535 #[inline]
43536 unsafe fn encode(
43537 self,
43538 encoder: &mut fidl::encoding::Encoder<'_, D>,
43539 offset: usize,
43540 _depth: fidl::encoding::Depth,
43541 ) -> fidl::Result<()> {
43542 encoder.debug_check_bounds::<Regression9Result>(offset);
43543 encoder.write_num::<u64>(self.ordinal(), offset);
43544 match self {
43545 Regression9Result::Ok(ref val) => {
43546 fidl::encoding::encode_in_envelope::<Regression9Value, D>(
43547 <Regression9Value as fidl::encoding::ValueTypeMarker>::borrow(val),
43548 encoder,
43549 offset + 8,
43550 _depth,
43551 )
43552 }
43553 Regression9Result::Error(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43554 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43555 encoder,
43556 offset + 8,
43557 _depth,
43558 ),
43559 }
43560 }
43561 }
43562
43563 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Result {
43564 #[inline(always)]
43565 fn new_empty() -> Self {
43566 Self::Ok(fidl::new_empty!(Regression9Value, D))
43567 }
43568
43569 #[inline]
43570 unsafe fn decode(
43571 &mut self,
43572 decoder: &mut fidl::encoding::Decoder<'_, D>,
43573 offset: usize,
43574 mut depth: fidl::encoding::Depth,
43575 ) -> fidl::Result<()> {
43576 decoder.debug_check_bounds::<Self>(offset);
43577 #[allow(unused_variables)]
43578 let next_out_of_line = decoder.next_out_of_line();
43579 let handles_before = decoder.remaining_handles();
43580 let (ordinal, inlined, num_bytes, num_handles) =
43581 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43582
43583 let member_inline_size = match ordinal {
43584 1 => <Regression9Value as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43585 2 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43586 _ => return Err(fidl::Error::UnknownUnionTag),
43587 };
43588
43589 if inlined != (member_inline_size <= 4) {
43590 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43591 }
43592 let _inner_offset;
43593 if inlined {
43594 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43595 _inner_offset = offset + 8;
43596 } else {
43597 depth.increment()?;
43598 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43599 }
43600 match ordinal {
43601 1 => {
43602 #[allow(irrefutable_let_patterns)]
43603 if let Regression9Result::Ok(_) = self {
43604 } else {
43606 *self = Regression9Result::Ok(fidl::new_empty!(Regression9Value, D));
43608 }
43609 #[allow(irrefutable_let_patterns)]
43610 if let Regression9Result::Ok(ref mut val) = self {
43611 fidl::decode!(Regression9Value, D, val, decoder, _inner_offset, depth)?;
43612 } else {
43613 unreachable!()
43614 }
43615 }
43616 2 => {
43617 #[allow(irrefutable_let_patterns)]
43618 if let Regression9Result::Error(_) = self {
43619 } else {
43621 *self = Regression9Result::Error(fidl::new_empty!(u32, D));
43623 }
43624 #[allow(irrefutable_let_patterns)]
43625 if let Regression9Result::Error(ref mut val) = self {
43626 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
43627 } else {
43628 unreachable!()
43629 }
43630 }
43631 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43632 }
43633 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43634 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43635 }
43636 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43637 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43638 }
43639 Ok(())
43640 }
43641 }
43642
43643 impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnion {
43644 type Borrowed<'a> = &'a Self;
43645 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43646 value
43647 }
43648 }
43649
43650 unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnion {
43651 type Owned = Self;
43652
43653 #[inline(always)]
43654 fn inline_align(_context: fidl::encoding::Context) -> usize {
43655 8
43656 }
43657
43658 #[inline(always)]
43659 fn inline_size(_context: fidl::encoding::Context) -> usize {
43660 16
43661 }
43662 }
43663
43664 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalUnion, D>
43665 for &ReverseOrdinalUnion
43666 {
43667 #[inline]
43668 unsafe fn encode(
43669 self,
43670 encoder: &mut fidl::encoding::Encoder<'_, D>,
43671 offset: usize,
43672 _depth: fidl::encoding::Depth,
43673 ) -> fidl::Result<()> {
43674 encoder.debug_check_bounds::<ReverseOrdinalUnion>(offset);
43675 encoder.write_num::<u64>(self.ordinal(), offset);
43676 match self {
43677 ReverseOrdinalUnion::Z(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43678 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43679 encoder,
43680 offset + 8,
43681 _depth,
43682 ),
43683 ReverseOrdinalUnion::Y(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
43684 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
43685 encoder,
43686 offset + 8,
43687 _depth,
43688 ),
43689 ReverseOrdinalUnion::X(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
43690 <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
43691 encoder,
43692 offset + 8,
43693 _depth,
43694 ),
43695 }
43696 }
43697 }
43698
43699 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalUnion {
43700 #[inline(always)]
43701 fn new_empty() -> Self {
43702 Self::Z(fidl::new_empty!(u32, D))
43703 }
43704
43705 #[inline]
43706 unsafe fn decode(
43707 &mut self,
43708 decoder: &mut fidl::encoding::Decoder<'_, D>,
43709 offset: usize,
43710 mut depth: fidl::encoding::Depth,
43711 ) -> fidl::Result<()> {
43712 decoder.debug_check_bounds::<Self>(offset);
43713 #[allow(unused_variables)]
43714 let next_out_of_line = decoder.next_out_of_line();
43715 let handles_before = decoder.remaining_handles();
43716 let (ordinal, inlined, num_bytes, num_handles) =
43717 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43718
43719 let member_inline_size = match ordinal {
43720 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43721 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43722 4 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43723 _ => return Err(fidl::Error::UnknownUnionTag),
43724 };
43725
43726 if inlined != (member_inline_size <= 4) {
43727 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43728 }
43729 let _inner_offset;
43730 if inlined {
43731 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43732 _inner_offset = offset + 8;
43733 } else {
43734 depth.increment()?;
43735 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43736 }
43737 match ordinal {
43738 1 => {
43739 #[allow(irrefutable_let_patterns)]
43740 if let ReverseOrdinalUnion::Z(_) = self {
43741 } else {
43743 *self = ReverseOrdinalUnion::Z(fidl::new_empty!(u32, D));
43745 }
43746 #[allow(irrefutable_let_patterns)]
43747 if let ReverseOrdinalUnion::Z(ref mut val) = self {
43748 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
43749 } else {
43750 unreachable!()
43751 }
43752 }
43753 2 => {
43754 #[allow(irrefutable_let_patterns)]
43755 if let ReverseOrdinalUnion::Y(_) = self {
43756 } else {
43758 *self = ReverseOrdinalUnion::Y(fidl::new_empty!(bool, D));
43760 }
43761 #[allow(irrefutable_let_patterns)]
43762 if let ReverseOrdinalUnion::Y(ref mut val) = self {
43763 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
43764 } else {
43765 unreachable!()
43766 }
43767 }
43768 4 => {
43769 #[allow(irrefutable_let_patterns)]
43770 if let ReverseOrdinalUnion::X(_) = self {
43771 } else {
43773 *self = ReverseOrdinalUnion::X(fidl::new_empty!(i64, D));
43775 }
43776 #[allow(irrefutable_let_patterns)]
43777 if let ReverseOrdinalUnion::X(ref mut val) = self {
43778 fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
43779 } else {
43780 unreachable!()
43781 }
43782 }
43783 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43784 }
43785 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43786 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43787 }
43788 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43789 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43790 }
43791 Ok(())
43792 }
43793 }
43794
43795 impl fidl::encoding::ValueTypeMarker for SampleStrictXUnion {
43796 type Borrowed<'a> = &'a Self;
43797 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43798 value
43799 }
43800 }
43801
43802 unsafe impl fidl::encoding::TypeMarker for SampleStrictXUnion {
43803 type Owned = Self;
43804
43805 #[inline(always)]
43806 fn inline_align(_context: fidl::encoding::Context) -> usize {
43807 8
43808 }
43809
43810 #[inline(always)]
43811 fn inline_size(_context: fidl::encoding::Context) -> usize {
43812 16
43813 }
43814 }
43815
43816 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleStrictXUnion, D>
43817 for &SampleStrictXUnion
43818 {
43819 #[inline]
43820 unsafe fn encode(
43821 self,
43822 encoder: &mut fidl::encoding::Encoder<'_, D>,
43823 offset: usize,
43824 _depth: fidl::encoding::Depth,
43825 ) -> fidl::Result<()> {
43826 encoder.debug_check_bounds::<SampleStrictXUnion>(offset);
43827 encoder.write_num::<u64>(self.ordinal(), offset);
43828 match self {
43829 SampleStrictXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43830 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43831 encoder,
43832 offset + 8,
43833 _depth,
43834 ),
43835 SampleStrictXUnion::Su(ref val) => {
43836 fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
43837 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
43838 encoder,
43839 offset + 8,
43840 _depth,
43841 )
43842 }
43843 SampleStrictXUnion::St(ref val) => {
43844 fidl::encoding::encode_in_envelope::<SimpleTable, D>(
43845 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
43846 encoder,
43847 offset + 8,
43848 _depth,
43849 )
43850 }
43851 }
43852 }
43853 }
43854
43855 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleStrictXUnion {
43856 #[inline(always)]
43857 fn new_empty() -> Self {
43858 Self::U(fidl::new_empty!(u32, D))
43859 }
43860
43861 #[inline]
43862 unsafe fn decode(
43863 &mut self,
43864 decoder: &mut fidl::encoding::Decoder<'_, D>,
43865 offset: usize,
43866 mut depth: fidl::encoding::Depth,
43867 ) -> fidl::Result<()> {
43868 decoder.debug_check_bounds::<Self>(offset);
43869 #[allow(unused_variables)]
43870 let next_out_of_line = decoder.next_out_of_line();
43871 let handles_before = decoder.remaining_handles();
43872 let (ordinal, inlined, num_bytes, num_handles) =
43873 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43874
43875 let member_inline_size = match ordinal {
43876 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43877 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43878 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43879 _ => return Err(fidl::Error::UnknownUnionTag),
43880 };
43881
43882 if inlined != (member_inline_size <= 4) {
43883 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43884 }
43885 let _inner_offset;
43886 if inlined {
43887 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43888 _inner_offset = offset + 8;
43889 } else {
43890 depth.increment()?;
43891 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43892 }
43893 match ordinal {
43894 1 => {
43895 #[allow(irrefutable_let_patterns)]
43896 if let SampleStrictXUnion::U(_) = self {
43897 } else {
43899 *self = SampleStrictXUnion::U(fidl::new_empty!(u32, D));
43901 }
43902 #[allow(irrefutable_let_patterns)]
43903 if let SampleStrictXUnion::U(ref mut val) = self {
43904 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
43905 } else {
43906 unreachable!()
43907 }
43908 }
43909 2 => {
43910 #[allow(irrefutable_let_patterns)]
43911 if let SampleStrictXUnion::Su(_) = self {
43912 } else {
43914 *self = SampleStrictXUnion::Su(fidl::new_empty!(SimpleUnion, D));
43916 }
43917 #[allow(irrefutable_let_patterns)]
43918 if let SampleStrictXUnion::Su(ref mut val) = self {
43919 fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
43920 } else {
43921 unreachable!()
43922 }
43923 }
43924 3 => {
43925 #[allow(irrefutable_let_patterns)]
43926 if let SampleStrictXUnion::St(_) = self {
43927 } else {
43929 *self = SampleStrictXUnion::St(fidl::new_empty!(SimpleTable, D));
43931 }
43932 #[allow(irrefutable_let_patterns)]
43933 if let SampleStrictXUnion::St(ref mut val) = self {
43934 fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
43935 } else {
43936 unreachable!()
43937 }
43938 }
43939 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43940 }
43941 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43942 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43943 }
43944 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43945 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43946 }
43947 Ok(())
43948 }
43949 }
43950
43951 impl fidl::encoding::ValueTypeMarker for SampleXUnion {
43952 type Borrowed<'a> = &'a Self;
43953 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43954 value
43955 }
43956 }
43957
43958 unsafe impl fidl::encoding::TypeMarker for SampleXUnion {
43959 type Owned = Self;
43960
43961 #[inline(always)]
43962 fn inline_align(_context: fidl::encoding::Context) -> usize {
43963 8
43964 }
43965
43966 #[inline(always)]
43967 fn inline_size(_context: fidl::encoding::Context) -> usize {
43968 16
43969 }
43970 }
43971
43972 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleXUnion, D>
43973 for &SampleXUnion
43974 {
43975 #[inline]
43976 unsafe fn encode(
43977 self,
43978 encoder: &mut fidl::encoding::Encoder<'_, D>,
43979 offset: usize,
43980 _depth: fidl::encoding::Depth,
43981 ) -> fidl::Result<()> {
43982 encoder.debug_check_bounds::<SampleXUnion>(offset);
43983 encoder.write_num::<u64>(self.ordinal(), offset);
43984 match self {
43985 SampleXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43986 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43987 encoder,
43988 offset + 8,
43989 _depth,
43990 ),
43991 SampleXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
43992 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
43993 encoder,
43994 offset + 8,
43995 _depth,
43996 ),
43997 SampleXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
43998 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
43999 encoder,
44000 offset + 8,
44001 _depth,
44002 ),
44003 SampleXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
44004 }
44005 }
44006 }
44007
44008 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleXUnion {
44009 #[inline(always)]
44010 fn new_empty() -> Self {
44011 Self::__SourceBreaking { unknown_ordinal: 0 }
44012 }
44013
44014 #[inline]
44015 unsafe fn decode(
44016 &mut self,
44017 decoder: &mut fidl::encoding::Decoder<'_, D>,
44018 offset: usize,
44019 mut depth: fidl::encoding::Depth,
44020 ) -> fidl::Result<()> {
44021 decoder.debug_check_bounds::<Self>(offset);
44022 #[allow(unused_variables)]
44023 let next_out_of_line = decoder.next_out_of_line();
44024 let handles_before = decoder.remaining_handles();
44025 let (ordinal, inlined, num_bytes, num_handles) =
44026 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44027
44028 let member_inline_size = match ordinal {
44029 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44030 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44031 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44032 0 => return Err(fidl::Error::UnknownUnionTag),
44033 _ => num_bytes as usize,
44034 };
44035
44036 if inlined != (member_inline_size <= 4) {
44037 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44038 }
44039 let _inner_offset;
44040 if inlined {
44041 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44042 _inner_offset = offset + 8;
44043 } else {
44044 depth.increment()?;
44045 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44046 }
44047 match ordinal {
44048 1 => {
44049 #[allow(irrefutable_let_patterns)]
44050 if let SampleXUnion::U(_) = self {
44051 } else {
44053 *self = SampleXUnion::U(fidl::new_empty!(u32, D));
44055 }
44056 #[allow(irrefutable_let_patterns)]
44057 if let SampleXUnion::U(ref mut val) = self {
44058 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
44059 } else {
44060 unreachable!()
44061 }
44062 }
44063 2 => {
44064 #[allow(irrefutable_let_patterns)]
44065 if let SampleXUnion::Su(_) = self {
44066 } else {
44068 *self = SampleXUnion::Su(fidl::new_empty!(SimpleUnion, D));
44070 }
44071 #[allow(irrefutable_let_patterns)]
44072 if let SampleXUnion::Su(ref mut val) = self {
44073 fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
44074 } else {
44075 unreachable!()
44076 }
44077 }
44078 3 => {
44079 #[allow(irrefutable_let_patterns)]
44080 if let SampleXUnion::St(_) = self {
44081 } else {
44083 *self = SampleXUnion::St(fidl::new_empty!(SimpleTable, D));
44085 }
44086 #[allow(irrefutable_let_patterns)]
44087 if let SampleXUnion::St(ref mut val) = self {
44088 fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
44089 } else {
44090 unreachable!()
44091 }
44092 }
44093 #[allow(deprecated)]
44094 ordinal => {
44095 for _ in 0..num_handles {
44096 decoder.drop_next_handle()?;
44097 }
44098 *self = SampleXUnion::__SourceBreaking { unknown_ordinal: ordinal };
44099 }
44100 }
44101 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44102 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44103 }
44104 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44105 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44106 }
44107 Ok(())
44108 }
44109 }
44110
44111 impl fidl::encoding::ValueTypeMarker for SimpleUnion {
44112 type Borrowed<'a> = &'a Self;
44113 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44114 value
44115 }
44116 }
44117
44118 unsafe impl fidl::encoding::TypeMarker for SimpleUnion {
44119 type Owned = Self;
44120
44121 #[inline(always)]
44122 fn inline_align(_context: fidl::encoding::Context) -> usize {
44123 8
44124 }
44125
44126 #[inline(always)]
44127 fn inline_size(_context: fidl::encoding::Context) -> usize {
44128 16
44129 }
44130 }
44131
44132 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleUnion, D>
44133 for &SimpleUnion
44134 {
44135 #[inline]
44136 unsafe fn encode(
44137 self,
44138 encoder: &mut fidl::encoding::Encoder<'_, D>,
44139 offset: usize,
44140 _depth: fidl::encoding::Depth,
44141 ) -> fidl::Result<()> {
44142 encoder.debug_check_bounds::<SimpleUnion>(offset);
44143 encoder.write_num::<u64>(self.ordinal(), offset);
44144 match self {
44145 SimpleUnion::I32(ref val) => fidl::encoding::encode_in_envelope::<i32, D>(
44146 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44147 encoder,
44148 offset + 8,
44149 _depth,
44150 ),
44151 SimpleUnion::I64(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
44152 <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
44153 encoder,
44154 offset + 8,
44155 _depth,
44156 ),
44157 SimpleUnion::S(ref val) => fidl::encoding::encode_in_envelope::<Int64Struct, D>(
44158 <Int64Struct as fidl::encoding::ValueTypeMarker>::borrow(val),
44159 encoder,
44160 offset + 8,
44161 _depth,
44162 ),
44163 SimpleUnion::Str(ref val) => fidl::encoding::encode_in_envelope::<
44164 fidl::encoding::UnboundedString,
44165 D,
44166 >(
44167 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
44168 val,
44169 ),
44170 encoder,
44171 offset + 8,
44172 _depth,
44173 ),
44174 }
44175 }
44176 }
44177
44178 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleUnion {
44179 #[inline(always)]
44180 fn new_empty() -> Self {
44181 Self::I32(fidl::new_empty!(i32, D))
44182 }
44183
44184 #[inline]
44185 unsafe fn decode(
44186 &mut self,
44187 decoder: &mut fidl::encoding::Decoder<'_, D>,
44188 offset: usize,
44189 mut depth: fidl::encoding::Depth,
44190 ) -> fidl::Result<()> {
44191 decoder.debug_check_bounds::<Self>(offset);
44192 #[allow(unused_variables)]
44193 let next_out_of_line = decoder.next_out_of_line();
44194 let handles_before = decoder.remaining_handles();
44195 let (ordinal, inlined, num_bytes, num_handles) =
44196 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44197
44198 let member_inline_size = match ordinal {
44199 1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44200 2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44201 3 => <Int64Struct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44202 4 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
44203 decoder.context,
44204 ),
44205 _ => return Err(fidl::Error::UnknownUnionTag),
44206 };
44207
44208 if inlined != (member_inline_size <= 4) {
44209 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44210 }
44211 let _inner_offset;
44212 if inlined {
44213 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44214 _inner_offset = offset + 8;
44215 } else {
44216 depth.increment()?;
44217 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44218 }
44219 match ordinal {
44220 1 => {
44221 #[allow(irrefutable_let_patterns)]
44222 if let SimpleUnion::I32(_) = self {
44223 } else {
44225 *self = SimpleUnion::I32(fidl::new_empty!(i32, D));
44227 }
44228 #[allow(irrefutable_let_patterns)]
44229 if let SimpleUnion::I32(ref mut val) = self {
44230 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
44231 } else {
44232 unreachable!()
44233 }
44234 }
44235 2 => {
44236 #[allow(irrefutable_let_patterns)]
44237 if let SimpleUnion::I64(_) = self {
44238 } else {
44240 *self = SimpleUnion::I64(fidl::new_empty!(i64, D));
44242 }
44243 #[allow(irrefutable_let_patterns)]
44244 if let SimpleUnion::I64(ref mut val) = self {
44245 fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
44246 } else {
44247 unreachable!()
44248 }
44249 }
44250 3 => {
44251 #[allow(irrefutable_let_patterns)]
44252 if let SimpleUnion::S(_) = self {
44253 } else {
44255 *self = SimpleUnion::S(fidl::new_empty!(Int64Struct, D));
44257 }
44258 #[allow(irrefutable_let_patterns)]
44259 if let SimpleUnion::S(ref mut val) = self {
44260 fidl::decode!(Int64Struct, D, val, decoder, _inner_offset, depth)?;
44261 } else {
44262 unreachable!()
44263 }
44264 }
44265 4 => {
44266 #[allow(irrefutable_let_patterns)]
44267 if let SimpleUnion::Str(_) = self {
44268 } else {
44270 *self =
44272 SimpleUnion::Str(fidl::new_empty!(fidl::encoding::UnboundedString, D));
44273 }
44274 #[allow(irrefutable_let_patterns)]
44275 if let SimpleUnion::Str(ref mut val) = self {
44276 fidl::decode!(
44277 fidl::encoding::UnboundedString,
44278 D,
44279 val,
44280 decoder,
44281 _inner_offset,
44282 depth
44283 )?;
44284 } else {
44285 unreachable!()
44286 }
44287 }
44288 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44289 }
44290 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44291 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44292 }
44293 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44294 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44295 }
44296 Ok(())
44297 }
44298 }
44299
44300 impl fidl::encoding::ValueTypeMarker for SingleVariantUnion {
44301 type Borrowed<'a> = &'a Self;
44302 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44303 value
44304 }
44305 }
44306
44307 unsafe impl fidl::encoding::TypeMarker for SingleVariantUnion {
44308 type Owned = Self;
44309
44310 #[inline(always)]
44311 fn inline_align(_context: fidl::encoding::Context) -> usize {
44312 8
44313 }
44314
44315 #[inline(always)]
44316 fn inline_size(_context: fidl::encoding::Context) -> usize {
44317 16
44318 }
44319 }
44320
44321 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SingleVariantUnion, D>
44322 for &SingleVariantUnion
44323 {
44324 #[inline]
44325 unsafe fn encode(
44326 self,
44327 encoder: &mut fidl::encoding::Encoder<'_, D>,
44328 offset: usize,
44329 _depth: fidl::encoding::Depth,
44330 ) -> fidl::Result<()> {
44331 encoder.debug_check_bounds::<SingleVariantUnion>(offset);
44332 encoder.write_num::<u64>(self.ordinal(), offset);
44333 match self {
44334 SingleVariantUnion::X(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
44335 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44336 encoder,
44337 offset + 8,
44338 _depth,
44339 ),
44340 }
44341 }
44342 }
44343
44344 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SingleVariantUnion {
44345 #[inline(always)]
44346 fn new_empty() -> Self {
44347 Self::X(fidl::new_empty!(u32, D))
44348 }
44349
44350 #[inline]
44351 unsafe fn decode(
44352 &mut self,
44353 decoder: &mut fidl::encoding::Decoder<'_, D>,
44354 offset: usize,
44355 mut depth: fidl::encoding::Depth,
44356 ) -> fidl::Result<()> {
44357 decoder.debug_check_bounds::<Self>(offset);
44358 #[allow(unused_variables)]
44359 let next_out_of_line = decoder.next_out_of_line();
44360 let handles_before = decoder.remaining_handles();
44361 let (ordinal, inlined, num_bytes, num_handles) =
44362 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44363
44364 let member_inline_size = match ordinal {
44365 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44366 _ => return Err(fidl::Error::UnknownUnionTag),
44367 };
44368
44369 if inlined != (member_inline_size <= 4) {
44370 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44371 }
44372 let _inner_offset;
44373 if inlined {
44374 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44375 _inner_offset = offset + 8;
44376 } else {
44377 depth.increment()?;
44378 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44379 }
44380 match ordinal {
44381 1 => {
44382 #[allow(irrefutable_let_patterns)]
44383 if let SingleVariantUnion::X(_) = self {
44384 } else {
44386 *self = SingleVariantUnion::X(fidl::new_empty!(u32, D));
44388 }
44389 #[allow(irrefutable_let_patterns)]
44390 if let SingleVariantUnion::X(ref mut val) = self {
44391 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
44392 } else {
44393 unreachable!()
44394 }
44395 }
44396 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44397 }
44398 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44399 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44400 }
44401 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44402 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44403 }
44404 Ok(())
44405 }
44406 }
44407
44408 impl fidl::encoding::ValueTypeMarker for StringBoolUnion {
44409 type Borrowed<'a> = &'a Self;
44410 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44411 value
44412 }
44413 }
44414
44415 unsafe impl fidl::encoding::TypeMarker for StringBoolUnion {
44416 type Owned = Self;
44417
44418 #[inline(always)]
44419 fn inline_align(_context: fidl::encoding::Context) -> usize {
44420 8
44421 }
44422
44423 #[inline(always)]
44424 fn inline_size(_context: fidl::encoding::Context) -> usize {
44425 16
44426 }
44427 }
44428
44429 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringBoolUnion, D>
44430 for &StringBoolUnion
44431 {
44432 #[inline]
44433 unsafe fn encode(
44434 self,
44435 encoder: &mut fidl::encoding::Encoder<'_, D>,
44436 offset: usize,
44437 _depth: fidl::encoding::Depth,
44438 ) -> fidl::Result<()> {
44439 encoder.debug_check_bounds::<StringBoolUnion>(offset);
44440 encoder.write_num::<u64>(self.ordinal(), offset);
44441 match self {
44442 StringBoolUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
44443 fidl::encoding::UnboundedString,
44444 D,
44445 >(
44446 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
44447 val,
44448 ),
44449 encoder,
44450 offset + 8,
44451 _depth,
44452 ),
44453 StringBoolUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
44454 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
44455 encoder,
44456 offset + 8,
44457 _depth,
44458 ),
44459 }
44460 }
44461 }
44462
44463 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringBoolUnion {
44464 #[inline(always)]
44465 fn new_empty() -> Self {
44466 Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
44467 }
44468
44469 #[inline]
44470 unsafe fn decode(
44471 &mut self,
44472 decoder: &mut fidl::encoding::Decoder<'_, D>,
44473 offset: usize,
44474 mut depth: fidl::encoding::Depth,
44475 ) -> fidl::Result<()> {
44476 decoder.debug_check_bounds::<Self>(offset);
44477 #[allow(unused_variables)]
44478 let next_out_of_line = decoder.next_out_of_line();
44479 let handles_before = decoder.remaining_handles();
44480 let (ordinal, inlined, num_bytes, num_handles) =
44481 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44482
44483 let member_inline_size = match ordinal {
44484 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
44485 decoder.context,
44486 ),
44487 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44488 _ => return Err(fidl::Error::UnknownUnionTag),
44489 };
44490
44491 if inlined != (member_inline_size <= 4) {
44492 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44493 }
44494 let _inner_offset;
44495 if inlined {
44496 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44497 _inner_offset = offset + 8;
44498 } else {
44499 depth.increment()?;
44500 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44501 }
44502 match ordinal {
44503 1 => {
44504 #[allow(irrefutable_let_patterns)]
44505 if let StringBoolUnion::S(_) = self {
44506 } else {
44508 *self = StringBoolUnion::S(fidl::new_empty!(
44510 fidl::encoding::UnboundedString,
44511 D
44512 ));
44513 }
44514 #[allow(irrefutable_let_patterns)]
44515 if let StringBoolUnion::S(ref mut val) = self {
44516 fidl::decode!(
44517 fidl::encoding::UnboundedString,
44518 D,
44519 val,
44520 decoder,
44521 _inner_offset,
44522 depth
44523 )?;
44524 } else {
44525 unreachable!()
44526 }
44527 }
44528 2 => {
44529 #[allow(irrefutable_let_patterns)]
44530 if let StringBoolUnion::B(_) = self {
44531 } else {
44533 *self = StringBoolUnion::B(fidl::new_empty!(bool, D));
44535 }
44536 #[allow(irrefutable_let_patterns)]
44537 if let StringBoolUnion::B(ref mut val) = self {
44538 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
44539 } else {
44540 unreachable!()
44541 }
44542 }
44543 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44544 }
44545 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44546 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44547 }
44548 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44549 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44550 }
44551 Ok(())
44552 }
44553 }
44554
44555 impl fidl::encoding::ValueTypeMarker for StringUnion {
44556 type Borrowed<'a> = &'a Self;
44557 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44558 value
44559 }
44560 }
44561
44562 unsafe impl fidl::encoding::TypeMarker for StringUnion {
44563 type Owned = Self;
44564
44565 #[inline(always)]
44566 fn inline_align(_context: fidl::encoding::Context) -> usize {
44567 8
44568 }
44569
44570 #[inline(always)]
44571 fn inline_size(_context: fidl::encoding::Context) -> usize {
44572 16
44573 }
44574 }
44575
44576 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnion, D>
44577 for &StringUnion
44578 {
44579 #[inline]
44580 unsafe fn encode(
44581 self,
44582 encoder: &mut fidl::encoding::Encoder<'_, D>,
44583 offset: usize,
44584 _depth: fidl::encoding::Depth,
44585 ) -> fidl::Result<()> {
44586 encoder.debug_check_bounds::<StringUnion>(offset);
44587 encoder.write_num::<u64>(self.ordinal(), offset);
44588 match self {
44589 StringUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44590 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44591 encoder,
44592 offset + 8,
44593 _depth,
44594 ),
44595 StringUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
44596 fidl::encoding::UnboundedString,
44597 D,
44598 >(
44599 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
44600 val,
44601 ),
44602 encoder,
44603 offset + 8,
44604 _depth,
44605 ),
44606 StringUnion::U8(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44607 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44608 encoder,
44609 offset + 8,
44610 _depth,
44611 ),
44612 }
44613 }
44614 }
44615
44616 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnion {
44617 #[inline(always)]
44618 fn new_empty() -> Self {
44619 Self::Unused(fidl::new_empty!(u8, D))
44620 }
44621
44622 #[inline]
44623 unsafe fn decode(
44624 &mut self,
44625 decoder: &mut fidl::encoding::Decoder<'_, D>,
44626 offset: usize,
44627 mut depth: fidl::encoding::Depth,
44628 ) -> fidl::Result<()> {
44629 decoder.debug_check_bounds::<Self>(offset);
44630 #[allow(unused_variables)]
44631 let next_out_of_line = decoder.next_out_of_line();
44632 let handles_before = decoder.remaining_handles();
44633 let (ordinal, inlined, num_bytes, num_handles) =
44634 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44635
44636 let member_inline_size = match ordinal {
44637 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44638 2 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
44639 decoder.context,
44640 ),
44641 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44642 _ => return Err(fidl::Error::UnknownUnionTag),
44643 };
44644
44645 if inlined != (member_inline_size <= 4) {
44646 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44647 }
44648 let _inner_offset;
44649 if inlined {
44650 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44651 _inner_offset = offset + 8;
44652 } else {
44653 depth.increment()?;
44654 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44655 }
44656 match ordinal {
44657 1 => {
44658 #[allow(irrefutable_let_patterns)]
44659 if let StringUnion::Unused(_) = self {
44660 } else {
44662 *self = StringUnion::Unused(fidl::new_empty!(u8, D));
44664 }
44665 #[allow(irrefutable_let_patterns)]
44666 if let StringUnion::Unused(ref mut val) = self {
44667 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44668 } else {
44669 unreachable!()
44670 }
44671 }
44672 2 => {
44673 #[allow(irrefutable_let_patterns)]
44674 if let StringUnion::S(_) = self {
44675 } else {
44677 *self =
44679 StringUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
44680 }
44681 #[allow(irrefutable_let_patterns)]
44682 if let StringUnion::S(ref mut val) = self {
44683 fidl::decode!(
44684 fidl::encoding::UnboundedString,
44685 D,
44686 val,
44687 decoder,
44688 _inner_offset,
44689 depth
44690 )?;
44691 } else {
44692 unreachable!()
44693 }
44694 }
44695 3 => {
44696 #[allow(irrefutable_let_patterns)]
44697 if let StringUnion::U8(_) = self {
44698 } else {
44700 *self = StringUnion::U8(fidl::new_empty!(u8, D));
44702 }
44703 #[allow(irrefutable_let_patterns)]
44704 if let StringUnion::U8(ref mut val) = self {
44705 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44706 } else {
44707 unreachable!()
44708 }
44709 }
44710 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44711 }
44712 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44713 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44714 }
44715 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44716 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44717 }
44718 Ok(())
44719 }
44720 }
44721
44722 impl fidl::encoding::ValueTypeMarker for Uint8Union {
44723 type Borrowed<'a> = &'a Self;
44724 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44725 value
44726 }
44727 }
44728
44729 unsafe impl fidl::encoding::TypeMarker for Uint8Union {
44730 type Owned = Self;
44731
44732 #[inline(always)]
44733 fn inline_align(_context: fidl::encoding::Context) -> usize {
44734 8
44735 }
44736
44737 #[inline(always)]
44738 fn inline_size(_context: fidl::encoding::Context) -> usize {
44739 16
44740 }
44741 }
44742
44743 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Union, D>
44744 for &Uint8Union
44745 {
44746 #[inline]
44747 unsafe fn encode(
44748 self,
44749 encoder: &mut fidl::encoding::Encoder<'_, D>,
44750 offset: usize,
44751 _depth: fidl::encoding::Depth,
44752 ) -> fidl::Result<()> {
44753 encoder.debug_check_bounds::<Uint8Union>(offset);
44754 encoder.write_num::<u64>(self.ordinal(), offset);
44755 match self {
44756 Uint8Union::Uint8Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44757 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44758 encoder,
44759 offset + 8,
44760 _depth,
44761 ),
44762 Uint8Union::EmptyStruct(ref val) => {
44763 fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
44764 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44765 encoder,
44766 offset + 8,
44767 _depth,
44768 )
44769 }
44770 }
44771 }
44772 }
44773
44774 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Union {
44775 #[inline(always)]
44776 fn new_empty() -> Self {
44777 Self::Uint8Value(fidl::new_empty!(u8, D))
44778 }
44779
44780 #[inline]
44781 unsafe fn decode(
44782 &mut self,
44783 decoder: &mut fidl::encoding::Decoder<'_, D>,
44784 offset: usize,
44785 mut depth: fidl::encoding::Depth,
44786 ) -> fidl::Result<()> {
44787 decoder.debug_check_bounds::<Self>(offset);
44788 #[allow(unused_variables)]
44789 let next_out_of_line = decoder.next_out_of_line();
44790 let handles_before = decoder.remaining_handles();
44791 let (ordinal, inlined, num_bytes, num_handles) =
44792 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44793
44794 let member_inline_size = match ordinal {
44795 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44796 2 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44797 _ => return Err(fidl::Error::UnknownUnionTag),
44798 };
44799
44800 if inlined != (member_inline_size <= 4) {
44801 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44802 }
44803 let _inner_offset;
44804 if inlined {
44805 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44806 _inner_offset = offset + 8;
44807 } else {
44808 depth.increment()?;
44809 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44810 }
44811 match ordinal {
44812 1 => {
44813 #[allow(irrefutable_let_patterns)]
44814 if let Uint8Union::Uint8Value(_) = self {
44815 } else {
44817 *self = Uint8Union::Uint8Value(fidl::new_empty!(u8, D));
44819 }
44820 #[allow(irrefutable_let_patterns)]
44821 if let Uint8Union::Uint8Value(ref mut val) = self {
44822 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44823 } else {
44824 unreachable!()
44825 }
44826 }
44827 2 => {
44828 #[allow(irrefutable_let_patterns)]
44829 if let Uint8Union::EmptyStruct(_) = self {
44830 } else {
44832 *self = Uint8Union::EmptyStruct(fidl::new_empty!(EmptyStruct, D));
44834 }
44835 #[allow(irrefutable_let_patterns)]
44836 if let Uint8Union::EmptyStruct(ref mut val) = self {
44837 fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
44838 } else {
44839 unreachable!()
44840 }
44841 }
44842 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44843 }
44844 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44845 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44846 }
44847 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44848 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44849 }
44850 Ok(())
44851 }
44852 }
44853
44854 impl fidl::encoding::ValueTypeMarker for UnionAtTheBottom {
44855 type Borrowed<'a> = &'a Self;
44856 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44857 value
44858 }
44859 }
44860
44861 unsafe impl fidl::encoding::TypeMarker for UnionAtTheBottom {
44862 type Owned = Self;
44863
44864 #[inline(always)]
44865 fn inline_align(_context: fidl::encoding::Context) -> usize {
44866 8
44867 }
44868
44869 #[inline(always)]
44870 fn inline_size(_context: fidl::encoding::Context) -> usize {
44871 16
44872 }
44873 }
44874
44875 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionAtTheBottom, D>
44876 for &UnionAtTheBottom
44877 {
44878 #[inline]
44879 unsafe fn encode(
44880 self,
44881 encoder: &mut fidl::encoding::Encoder<'_, D>,
44882 offset: usize,
44883 _depth: fidl::encoding::Depth,
44884 ) -> fidl::Result<()> {
44885 encoder.debug_check_bounds::<UnionAtTheBottom>(offset);
44886 encoder.write_num::<u64>(self.ordinal(), offset);
44887 match self {
44888 UnionAtTheBottom::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44889 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44890 encoder,
44891 offset + 8,
44892 _depth,
44893 ),
44894 UnionAtTheBottom::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44895 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44896 encoder,
44897 offset + 8,
44898 _depth,
44899 ),
44900 UnionAtTheBottom::Tiny(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44901 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44902 encoder,
44903 offset + 8,
44904 _depth,
44905 ),
44906 }
44907 }
44908 }
44909
44910 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionAtTheBottom {
44911 #[inline(always)]
44912 fn new_empty() -> Self {
44913 Self::Unused1(fidl::new_empty!(u8, D))
44914 }
44915
44916 #[inline]
44917 unsafe fn decode(
44918 &mut self,
44919 decoder: &mut fidl::encoding::Decoder<'_, D>,
44920 offset: usize,
44921 mut depth: fidl::encoding::Depth,
44922 ) -> fidl::Result<()> {
44923 decoder.debug_check_bounds::<Self>(offset);
44924 #[allow(unused_variables)]
44925 let next_out_of_line = decoder.next_out_of_line();
44926 let handles_before = decoder.remaining_handles();
44927 let (ordinal, inlined, num_bytes, num_handles) =
44928 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44929
44930 let member_inline_size = match ordinal {
44931 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44932 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44933 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44934 _ => return Err(fidl::Error::UnknownUnionTag),
44935 };
44936
44937 if inlined != (member_inline_size <= 4) {
44938 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44939 }
44940 let _inner_offset;
44941 if inlined {
44942 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44943 _inner_offset = offset + 8;
44944 } else {
44945 depth.increment()?;
44946 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44947 }
44948 match ordinal {
44949 1 => {
44950 #[allow(irrefutable_let_patterns)]
44951 if let UnionAtTheBottom::Unused1(_) = self {
44952 } else {
44954 *self = UnionAtTheBottom::Unused1(fidl::new_empty!(u8, D));
44956 }
44957 #[allow(irrefutable_let_patterns)]
44958 if let UnionAtTheBottom::Unused1(ref mut val) = self {
44959 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44960 } else {
44961 unreachable!()
44962 }
44963 }
44964 2 => {
44965 #[allow(irrefutable_let_patterns)]
44966 if let UnionAtTheBottom::Unused2(_) = self {
44967 } else {
44969 *self = UnionAtTheBottom::Unused2(fidl::new_empty!(u8, D));
44971 }
44972 #[allow(irrefutable_let_patterns)]
44973 if let UnionAtTheBottom::Unused2(ref mut val) = self {
44974 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44975 } else {
44976 unreachable!()
44977 }
44978 }
44979 3 => {
44980 #[allow(irrefutable_let_patterns)]
44981 if let UnionAtTheBottom::Tiny(_) = self {
44982 } else {
44984 *self = UnionAtTheBottom::Tiny(fidl::new_empty!(u8, D));
44986 }
44987 #[allow(irrefutable_let_patterns)]
44988 if let UnionAtTheBottom::Tiny(ref mut val) = self {
44989 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44990 } else {
44991 unreachable!()
44992 }
44993 }
44994 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44995 }
44996 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44997 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44998 }
44999 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45000 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45001 }
45002 Ok(())
45003 }
45004 }
45005
45006 impl fidl::encoding::ValueTypeMarker for UnionInlinePadding {
45007 type Borrowed<'a> = &'a Self;
45008 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45009 value
45010 }
45011 }
45012
45013 unsafe impl fidl::encoding::TypeMarker for UnionInlinePadding {
45014 type Owned = Self;
45015
45016 #[inline(always)]
45017 fn inline_align(_context: fidl::encoding::Context) -> usize {
45018 8
45019 }
45020
45021 #[inline(always)]
45022 fn inline_size(_context: fidl::encoding::Context) -> usize {
45023 16
45024 }
45025 }
45026
45027 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionInlinePadding, D>
45028 for &UnionInlinePadding
45029 {
45030 #[inline]
45031 unsafe fn encode(
45032 self,
45033 encoder: &mut fidl::encoding::Encoder<'_, D>,
45034 offset: usize,
45035 _depth: fidl::encoding::Depth,
45036 ) -> fidl::Result<()> {
45037 encoder.debug_check_bounds::<UnionInlinePadding>(offset);
45038 encoder.write_num::<u64>(self.ordinal(), offset);
45039 match self {
45040 UnionInlinePadding::ThreePaddingBytes(ref val) => {
45041 fidl::encoding::encode_in_envelope::<u8, D>(
45042 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45043 encoder,
45044 offset + 8,
45045 _depth,
45046 )
45047 }
45048 UnionInlinePadding::TwoPaddingBytes(ref val) => {
45049 fidl::encoding::encode_in_envelope::<u16, D>(
45050 <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
45051 encoder,
45052 offset + 8,
45053 _depth,
45054 )
45055 }
45056 UnionInlinePadding::OnePaddingByte(ref val) => {
45057 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u8, 3>, D>(
45058 <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(
45059 val,
45060 ),
45061 encoder,
45062 offset + 8,
45063 _depth,
45064 )
45065 }
45066 }
45067 }
45068 }
45069
45070 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionInlinePadding {
45071 #[inline(always)]
45072 fn new_empty() -> Self {
45073 Self::ThreePaddingBytes(fidl::new_empty!(u8, D))
45074 }
45075
45076 #[inline]
45077 unsafe fn decode(
45078 &mut self,
45079 decoder: &mut fidl::encoding::Decoder<'_, D>,
45080 offset: usize,
45081 mut depth: fidl::encoding::Depth,
45082 ) -> fidl::Result<()> {
45083 decoder.debug_check_bounds::<Self>(offset);
45084 #[allow(unused_variables)]
45085 let next_out_of_line = decoder.next_out_of_line();
45086 let handles_before = decoder.remaining_handles();
45087 let (ordinal, inlined, num_bytes, num_handles) =
45088 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45089
45090 let member_inline_size = match ordinal {
45091 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45092 2 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45093 3 => <fidl::encoding::Array<u8, 3> as fidl::encoding::TypeMarker>::inline_size(
45094 decoder.context,
45095 ),
45096 _ => return Err(fidl::Error::UnknownUnionTag),
45097 };
45098
45099 if inlined != (member_inline_size <= 4) {
45100 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45101 }
45102 let _inner_offset;
45103 if inlined {
45104 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45105 _inner_offset = offset + 8;
45106 } else {
45107 depth.increment()?;
45108 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45109 }
45110 match ordinal {
45111 1 => {
45112 #[allow(irrefutable_let_patterns)]
45113 if let UnionInlinePadding::ThreePaddingBytes(_) = self {
45114 } else {
45116 *self = UnionInlinePadding::ThreePaddingBytes(fidl::new_empty!(u8, D));
45118 }
45119 #[allow(irrefutable_let_patterns)]
45120 if let UnionInlinePadding::ThreePaddingBytes(ref mut val) = self {
45121 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45122 } else {
45123 unreachable!()
45124 }
45125 }
45126 2 => {
45127 #[allow(irrefutable_let_patterns)]
45128 if let UnionInlinePadding::TwoPaddingBytes(_) = self {
45129 } else {
45131 *self = UnionInlinePadding::TwoPaddingBytes(fidl::new_empty!(u16, D));
45133 }
45134 #[allow(irrefutable_let_patterns)]
45135 if let UnionInlinePadding::TwoPaddingBytes(ref mut val) = self {
45136 fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
45137 } else {
45138 unreachable!()
45139 }
45140 }
45141 3 => {
45142 #[allow(irrefutable_let_patterns)]
45143 if let UnionInlinePadding::OnePaddingByte(_) = self {
45144 } else {
45146 *self = UnionInlinePadding::OnePaddingByte(
45148 fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
45149 );
45150 }
45151 #[allow(irrefutable_let_patterns)]
45152 if let UnionInlinePadding::OnePaddingByte(ref mut val) = self {
45153 fidl::decode!(fidl::encoding::Array<u8, 3>, D, val, decoder, _inner_offset, depth)?;
45154 } else {
45155 unreachable!()
45156 }
45157 }
45158 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45159 }
45160 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45161 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45162 }
45163 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45164 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45165 }
45166 Ok(())
45167 }
45168 }
45169
45170 impl fidl::encoding::ValueTypeMarker for UnionOfTable {
45171 type Borrowed<'a> = &'a Self;
45172 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45173 value
45174 }
45175 }
45176
45177 unsafe impl fidl::encoding::TypeMarker for UnionOfTable {
45178 type Owned = Self;
45179
45180 #[inline(always)]
45181 fn inline_align(_context: fidl::encoding::Context) -> usize {
45182 8
45183 }
45184
45185 #[inline(always)]
45186 fn inline_size(_context: fidl::encoding::Context) -> usize {
45187 16
45188 }
45189 }
45190
45191 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfTable, D>
45192 for &UnionOfTable
45193 {
45194 #[inline]
45195 unsafe fn encode(
45196 self,
45197 encoder: &mut fidl::encoding::Encoder<'_, D>,
45198 offset: usize,
45199 _depth: fidl::encoding::Depth,
45200 ) -> fidl::Result<()> {
45201 encoder.debug_check_bounds::<UnionOfTable>(offset);
45202 encoder.write_num::<u64>(self.ordinal(), offset);
45203 match self {
45204 UnionOfTable::T(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
45205 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
45206 encoder,
45207 offset + 8,
45208 _depth,
45209 ),
45210 }
45211 }
45212 }
45213
45214 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfTable {
45215 #[inline(always)]
45216 fn new_empty() -> Self {
45217 Self::T(fidl::new_empty!(SimpleTable, D))
45218 }
45219
45220 #[inline]
45221 unsafe fn decode(
45222 &mut self,
45223 decoder: &mut fidl::encoding::Decoder<'_, D>,
45224 offset: usize,
45225 mut depth: fidl::encoding::Depth,
45226 ) -> fidl::Result<()> {
45227 decoder.debug_check_bounds::<Self>(offset);
45228 #[allow(unused_variables)]
45229 let next_out_of_line = decoder.next_out_of_line();
45230 let handles_before = decoder.remaining_handles();
45231 let (ordinal, inlined, num_bytes, num_handles) =
45232 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45233
45234 let member_inline_size = match ordinal {
45235 1 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45236 _ => return Err(fidl::Error::UnknownUnionTag),
45237 };
45238
45239 if inlined != (member_inline_size <= 4) {
45240 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45241 }
45242 let _inner_offset;
45243 if inlined {
45244 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45245 _inner_offset = offset + 8;
45246 } else {
45247 depth.increment()?;
45248 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45249 }
45250 match ordinal {
45251 1 => {
45252 #[allow(irrefutable_let_patterns)]
45253 if let UnionOfTable::T(_) = self {
45254 } else {
45256 *self = UnionOfTable::T(fidl::new_empty!(SimpleTable, D));
45258 }
45259 #[allow(irrefutable_let_patterns)]
45260 if let UnionOfTable::T(ref mut val) = self {
45261 fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
45262 } else {
45263 unreachable!()
45264 }
45265 }
45266 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45267 }
45268 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45269 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45270 }
45271 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45272 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45273 }
45274 Ok(())
45275 }
45276 }
45277
45278 impl fidl::encoding::ValueTypeMarker for UnionOfUnion {
45279 type Borrowed<'a> = &'a Self;
45280 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45281 value
45282 }
45283 }
45284
45285 unsafe impl fidl::encoding::TypeMarker for UnionOfUnion {
45286 type Owned = Self;
45287
45288 #[inline(always)]
45289 fn inline_align(_context: fidl::encoding::Context) -> usize {
45290 8
45291 }
45292
45293 #[inline(always)]
45294 fn inline_size(_context: fidl::encoding::Context) -> usize {
45295 16
45296 }
45297 }
45298
45299 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfUnion, D>
45300 for &UnionOfUnion
45301 {
45302 #[inline]
45303 unsafe fn encode(
45304 self,
45305 encoder: &mut fidl::encoding::Encoder<'_, D>,
45306 offset: usize,
45307 _depth: fidl::encoding::Depth,
45308 ) -> fidl::Result<()> {
45309 encoder.debug_check_bounds::<UnionOfUnion>(offset);
45310 encoder.write_num::<u64>(self.ordinal(), offset);
45311 match self {
45312 UnionOfUnion::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45313 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45314 encoder,
45315 offset + 8,
45316 _depth,
45317 ),
45318 UnionOfUnion::Size8align4(ref val) => {
45319 fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
45320 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
45321 encoder,
45322 offset + 8,
45323 _depth,
45324 )
45325 }
45326 UnionOfUnion::Size12align4(ref val) => {
45327 fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
45328 <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
45329 encoder,
45330 offset + 8,
45331 _depth,
45332 )
45333 }
45334 UnionOfUnion::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45335 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45336 encoder,
45337 offset + 8,
45338 _depth,
45339 ),
45340 UnionOfUnion::Size24align8(ref val) => {
45341 fidl::encoding::encode_in_envelope::<UnionSize24Align8, D>(
45342 <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45343 encoder,
45344 offset + 8,
45345 _depth,
45346 )
45347 }
45348 }
45349 }
45350 }
45351
45352 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfUnion {
45353 #[inline(always)]
45354 fn new_empty() -> Self {
45355 Self::Unused1(fidl::new_empty!(u8, D))
45356 }
45357
45358 #[inline]
45359 unsafe fn decode(
45360 &mut self,
45361 decoder: &mut fidl::encoding::Decoder<'_, D>,
45362 offset: usize,
45363 mut depth: fidl::encoding::Depth,
45364 ) -> fidl::Result<()> {
45365 decoder.debug_check_bounds::<Self>(offset);
45366 #[allow(unused_variables)]
45367 let next_out_of_line = decoder.next_out_of_line();
45368 let handles_before = decoder.remaining_handles();
45369 let (ordinal, inlined, num_bytes, num_handles) =
45370 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45371
45372 let member_inline_size = match ordinal {
45373 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45374 2 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45375 3 => {
45376 <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
45377 }
45378 4 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45379 5 => {
45380 <UnionSize24Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
45381 }
45382 _ => return Err(fidl::Error::UnknownUnionTag),
45383 };
45384
45385 if inlined != (member_inline_size <= 4) {
45386 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45387 }
45388 let _inner_offset;
45389 if inlined {
45390 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45391 _inner_offset = offset + 8;
45392 } else {
45393 depth.increment()?;
45394 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45395 }
45396 match ordinal {
45397 1 => {
45398 #[allow(irrefutable_let_patterns)]
45399 if let UnionOfUnion::Unused1(_) = self {
45400 } else {
45402 *self = UnionOfUnion::Unused1(fidl::new_empty!(u8, D));
45404 }
45405 #[allow(irrefutable_let_patterns)]
45406 if let UnionOfUnion::Unused1(ref mut val) = self {
45407 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45408 } else {
45409 unreachable!()
45410 }
45411 }
45412 2 => {
45413 #[allow(irrefutable_let_patterns)]
45414 if let UnionOfUnion::Size8align4(_) = self {
45415 } else {
45417 *self = UnionOfUnion::Size8align4(fidl::new_empty!(UnionSize8Align4, D));
45419 }
45420 #[allow(irrefutable_let_patterns)]
45421 if let UnionOfUnion::Size8align4(ref mut val) = self {
45422 fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
45423 } else {
45424 unreachable!()
45425 }
45426 }
45427 3 => {
45428 #[allow(irrefutable_let_patterns)]
45429 if let UnionOfUnion::Size12align4(_) = self {
45430 } else {
45432 *self = UnionOfUnion::Size12align4(fidl::new_empty!(UnionSize12Align4, D));
45434 }
45435 #[allow(irrefutable_let_patterns)]
45436 if let UnionOfUnion::Size12align4(ref mut val) = self {
45437 fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
45438 } else {
45439 unreachable!()
45440 }
45441 }
45442 4 => {
45443 #[allow(irrefutable_let_patterns)]
45444 if let UnionOfUnion::Unused2(_) = self {
45445 } else {
45447 *self = UnionOfUnion::Unused2(fidl::new_empty!(u8, D));
45449 }
45450 #[allow(irrefutable_let_patterns)]
45451 if let UnionOfUnion::Unused2(ref mut val) = self {
45452 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45453 } else {
45454 unreachable!()
45455 }
45456 }
45457 5 => {
45458 #[allow(irrefutable_let_patterns)]
45459 if let UnionOfUnion::Size24align8(_) = self {
45460 } else {
45462 *self = UnionOfUnion::Size24align8(fidl::new_empty!(UnionSize24Align8, D));
45464 }
45465 #[allow(irrefutable_let_patterns)]
45466 if let UnionOfUnion::Size24align8(ref mut val) = self {
45467 fidl::decode!(UnionSize24Align8, D, val, decoder, _inner_offset, depth)?;
45468 } else {
45469 unreachable!()
45470 }
45471 }
45472 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45473 }
45474 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45475 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45476 }
45477 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45478 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45479 }
45480 Ok(())
45481 }
45482 }
45483
45484 impl fidl::encoding::ValueTypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
45485 type Borrowed<'a> = &'a Self;
45486 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45487 value
45488 }
45489 }
45490
45491 unsafe impl fidl::encoding::TypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
45492 type Owned = Self;
45493
45494 #[inline(always)]
45495 fn inline_align(_context: fidl::encoding::Context) -> usize {
45496 8
45497 }
45498
45499 #[inline(always)]
45500 fn inline_size(_context: fidl::encoding::Context) -> usize {
45501 16
45502 }
45503 }
45504
45505 unsafe impl<D: fidl::encoding::ResourceDialect>
45506 fidl::encoding::Encode<UnionOfXUnionThenTableThenXUnionThenUnion, D>
45507 for &UnionOfXUnionThenTableThenXUnionThenUnion
45508 {
45509 #[inline]
45510 unsafe fn encode(
45511 self,
45512 encoder: &mut fidl::encoding::Encoder<'_, D>,
45513 offset: usize,
45514 _depth: fidl::encoding::Depth,
45515 ) -> fidl::Result<()> {
45516 encoder.debug_check_bounds::<UnionOfXUnionThenTableThenXUnionThenUnion>(offset);
45517 encoder.write_num::<u64>(self.ordinal(), offset);
45518 match self {
45519 UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref val) => {
45520 fidl::encoding::encode_in_envelope::<u8, D>(
45521 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45522 encoder, offset + 8, _depth
45523 )
45524 }
45525 UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref val) => {
45526 fidl::encoding::encode_in_envelope::<XUnionOfTableThenXUnionThenUnion, D>(
45527 <XUnionOfTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
45528 encoder, offset + 8, _depth
45529 )
45530 }
45531 }
45532 }
45533 }
45534
45535 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
45536 for UnionOfXUnionThenTableThenXUnionThenUnion
45537 {
45538 #[inline(always)]
45539 fn new_empty() -> Self {
45540 Self::Unused1(fidl::new_empty!(u8, D))
45541 }
45542
45543 #[inline]
45544 unsafe fn decode(
45545 &mut self,
45546 decoder: &mut fidl::encoding::Decoder<'_, D>,
45547 offset: usize,
45548 mut depth: fidl::encoding::Depth,
45549 ) -> fidl::Result<()> {
45550 decoder.debug_check_bounds::<Self>(offset);
45551 #[allow(unused_variables)]
45552 let next_out_of_line = decoder.next_out_of_line();
45553 let handles_before = decoder.remaining_handles();
45554 let (ordinal, inlined, num_bytes, num_handles) =
45555 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45556
45557 let member_inline_size = match ordinal {
45558 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45559 3 => <XUnionOfTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
45560 decoder.context,
45561 ),
45562 _ => return Err(fidl::Error::UnknownUnionTag),
45563 };
45564
45565 if inlined != (member_inline_size <= 4) {
45566 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45567 }
45568 let _inner_offset;
45569 if inlined {
45570 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45571 _inner_offset = offset + 8;
45572 } else {
45573 depth.increment()?;
45574 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45575 }
45576 match ordinal {
45577 1 => {
45578 #[allow(irrefutable_let_patterns)]
45579 if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(_) = self {
45580 } else {
45582 *self = UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(
45584 fidl::new_empty!(u8, D),
45585 );
45586 }
45587 #[allow(irrefutable_let_patterns)]
45588 if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref mut val) = self {
45589 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45590 } else {
45591 unreachable!()
45592 }
45593 }
45594 3 => {
45595 #[allow(irrefutable_let_patterns)]
45596 if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(_) = self {
45597 } else {
45599 *self = UnionOfXUnionThenTableThenXUnionThenUnion::Variant(
45601 fidl::new_empty!(XUnionOfTableThenXUnionThenUnion, D),
45602 );
45603 }
45604 #[allow(irrefutable_let_patterns)]
45605 if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref mut val) = self {
45606 fidl::decode!(
45607 XUnionOfTableThenXUnionThenUnion,
45608 D,
45609 val,
45610 decoder,
45611 _inner_offset,
45612 depth
45613 )?;
45614 } else {
45615 unreachable!()
45616 }
45617 }
45618 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45619 }
45620 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45621 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45622 }
45623 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45624 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45625 }
45626 Ok(())
45627 }
45628 }
45629
45630 impl fidl::encoding::ValueTypeMarker for UnionSize12Align4 {
45631 type Borrowed<'a> = &'a Self;
45632 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45633 value
45634 }
45635 }
45636
45637 unsafe impl fidl::encoding::TypeMarker for UnionSize12Align4 {
45638 type Owned = Self;
45639
45640 #[inline(always)]
45641 fn inline_align(_context: fidl::encoding::Context) -> usize {
45642 8
45643 }
45644
45645 #[inline(always)]
45646 fn inline_size(_context: fidl::encoding::Context) -> usize {
45647 16
45648 }
45649 }
45650
45651 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize12Align4, D>
45652 for &UnionSize12Align4
45653 {
45654 #[inline]
45655 unsafe fn encode(
45656 self,
45657 encoder: &mut fidl::encoding::Encoder<'_, D>,
45658 offset: usize,
45659 _depth: fidl::encoding::Depth,
45660 ) -> fidl::Result<()> {
45661 encoder.debug_check_bounds::<UnionSize12Align4>(offset);
45662 encoder.write_num::<u64>(self.ordinal(), offset);
45663 match self {
45664 UnionSize12Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45665 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45666 encoder,
45667 offset + 8,
45668 _depth,
45669 ),
45670 UnionSize12Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45671 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45672 encoder,
45673 offset + 8,
45674 _depth,
45675 ),
45676 UnionSize12Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45677 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45678 encoder,
45679 offset + 8,
45680 _depth,
45681 ),
45682 UnionSize12Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
45683 fidl::encoding::Array<u8, 6>,
45684 D,
45685 >(
45686 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
45687 encoder,
45688 offset + 8,
45689 _depth,
45690 ),
45691 }
45692 }
45693 }
45694
45695 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize12Align4 {
45696 #[inline(always)]
45697 fn new_empty() -> Self {
45698 Self::Unused1(fidl::new_empty!(u8, D))
45699 }
45700
45701 #[inline]
45702 unsafe fn decode(
45703 &mut self,
45704 decoder: &mut fidl::encoding::Decoder<'_, D>,
45705 offset: usize,
45706 mut depth: fidl::encoding::Depth,
45707 ) -> fidl::Result<()> {
45708 decoder.debug_check_bounds::<Self>(offset);
45709 #[allow(unused_variables)]
45710 let next_out_of_line = decoder.next_out_of_line();
45711 let handles_before = decoder.remaining_handles();
45712 let (ordinal, inlined, num_bytes, num_handles) =
45713 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45714
45715 let member_inline_size = match ordinal {
45716 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45717 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45718 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45719 4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
45720 decoder.context,
45721 ),
45722 _ => return Err(fidl::Error::UnknownUnionTag),
45723 };
45724
45725 if inlined != (member_inline_size <= 4) {
45726 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45727 }
45728 let _inner_offset;
45729 if inlined {
45730 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45731 _inner_offset = offset + 8;
45732 } else {
45733 depth.increment()?;
45734 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45735 }
45736 match ordinal {
45737 1 => {
45738 #[allow(irrefutable_let_patterns)]
45739 if let UnionSize12Align4::Unused1(_) = self {
45740 } else {
45742 *self = UnionSize12Align4::Unused1(fidl::new_empty!(u8, D));
45744 }
45745 #[allow(irrefutable_let_patterns)]
45746 if let UnionSize12Align4::Unused1(ref mut val) = self {
45747 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45748 } else {
45749 unreachable!()
45750 }
45751 }
45752 2 => {
45753 #[allow(irrefutable_let_patterns)]
45754 if let UnionSize12Align4::Unused2(_) = self {
45755 } else {
45757 *self = UnionSize12Align4::Unused2(fidl::new_empty!(u8, D));
45759 }
45760 #[allow(irrefutable_let_patterns)]
45761 if let UnionSize12Align4::Unused2(ref mut val) = self {
45762 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45763 } else {
45764 unreachable!()
45765 }
45766 }
45767 3 => {
45768 #[allow(irrefutable_let_patterns)]
45769 if let UnionSize12Align4::Unused3(_) = self {
45770 } else {
45772 *self = UnionSize12Align4::Unused3(fidl::new_empty!(u8, D));
45774 }
45775 #[allow(irrefutable_let_patterns)]
45776 if let UnionSize12Align4::Unused3(ref mut val) = self {
45777 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45778 } else {
45779 unreachable!()
45780 }
45781 }
45782 4 => {
45783 #[allow(irrefutable_let_patterns)]
45784 if let UnionSize12Align4::Variant(_) = self {
45785 } else {
45787 *self = UnionSize12Align4::Variant(
45789 fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
45790 );
45791 }
45792 #[allow(irrefutable_let_patterns)]
45793 if let UnionSize12Align4::Variant(ref mut val) = self {
45794 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
45795 } else {
45796 unreachable!()
45797 }
45798 }
45799 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45800 }
45801 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45802 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45803 }
45804 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45805 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45806 }
45807 Ok(())
45808 }
45809 }
45810
45811 impl fidl::encoding::ValueTypeMarker for UnionSize24Align8 {
45812 type Borrowed<'a> = &'a Self;
45813 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45814 value
45815 }
45816 }
45817
45818 unsafe impl fidl::encoding::TypeMarker for UnionSize24Align8 {
45819 type Owned = Self;
45820
45821 #[inline(always)]
45822 fn inline_align(_context: fidl::encoding::Context) -> usize {
45823 8
45824 }
45825
45826 #[inline(always)]
45827 fn inline_size(_context: fidl::encoding::Context) -> usize {
45828 16
45829 }
45830 }
45831
45832 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize24Align8, D>
45833 for &UnionSize24Align8
45834 {
45835 #[inline]
45836 unsafe fn encode(
45837 self,
45838 encoder: &mut fidl::encoding::Encoder<'_, D>,
45839 offset: usize,
45840 _depth: fidl::encoding::Depth,
45841 ) -> fidl::Result<()> {
45842 encoder.debug_check_bounds::<UnionSize24Align8>(offset);
45843 encoder.write_num::<u64>(self.ordinal(), offset);
45844 match self {
45845 UnionSize24Align8::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45846 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45847 encoder,
45848 offset + 8,
45849 _depth,
45850 ),
45851 UnionSize24Align8::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45852 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45853 encoder,
45854 offset + 8,
45855 _depth,
45856 ),
45857 UnionSize24Align8::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45858 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45859 encoder,
45860 offset + 8,
45861 _depth,
45862 ),
45863 UnionSize24Align8::Variant(ref val) => {
45864 fidl::encoding::encode_in_envelope::<StructSize16Align8, D>(
45865 <StructSize16Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45866 encoder,
45867 offset + 8,
45868 _depth,
45869 )
45870 }
45871 }
45872 }
45873 }
45874
45875 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize24Align8 {
45876 #[inline(always)]
45877 fn new_empty() -> Self {
45878 Self::Unused1(fidl::new_empty!(u8, D))
45879 }
45880
45881 #[inline]
45882 unsafe fn decode(
45883 &mut self,
45884 decoder: &mut fidl::encoding::Decoder<'_, D>,
45885 offset: usize,
45886 mut depth: fidl::encoding::Depth,
45887 ) -> fidl::Result<()> {
45888 decoder.debug_check_bounds::<Self>(offset);
45889 #[allow(unused_variables)]
45890 let next_out_of_line = decoder.next_out_of_line();
45891 let handles_before = decoder.remaining_handles();
45892 let (ordinal, inlined, num_bytes, num_handles) =
45893 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45894
45895 let member_inline_size = match ordinal {
45896 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45897 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45898 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45899 4 => {
45900 <StructSize16Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
45901 }
45902 _ => return Err(fidl::Error::UnknownUnionTag),
45903 };
45904
45905 if inlined != (member_inline_size <= 4) {
45906 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45907 }
45908 let _inner_offset;
45909 if inlined {
45910 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45911 _inner_offset = offset + 8;
45912 } else {
45913 depth.increment()?;
45914 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45915 }
45916 match ordinal {
45917 1 => {
45918 #[allow(irrefutable_let_patterns)]
45919 if let UnionSize24Align8::Unused1(_) = self {
45920 } else {
45922 *self = UnionSize24Align8::Unused1(fidl::new_empty!(u8, D));
45924 }
45925 #[allow(irrefutable_let_patterns)]
45926 if let UnionSize24Align8::Unused1(ref mut val) = self {
45927 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45928 } else {
45929 unreachable!()
45930 }
45931 }
45932 2 => {
45933 #[allow(irrefutable_let_patterns)]
45934 if let UnionSize24Align8::Unused2(_) = self {
45935 } else {
45937 *self = UnionSize24Align8::Unused2(fidl::new_empty!(u8, D));
45939 }
45940 #[allow(irrefutable_let_patterns)]
45941 if let UnionSize24Align8::Unused2(ref mut val) = self {
45942 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45943 } else {
45944 unreachable!()
45945 }
45946 }
45947 3 => {
45948 #[allow(irrefutable_let_patterns)]
45949 if let UnionSize24Align8::Unused3(_) = self {
45950 } else {
45952 *self = UnionSize24Align8::Unused3(fidl::new_empty!(u8, D));
45954 }
45955 #[allow(irrefutable_let_patterns)]
45956 if let UnionSize24Align8::Unused3(ref mut val) = self {
45957 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45958 } else {
45959 unreachable!()
45960 }
45961 }
45962 4 => {
45963 #[allow(irrefutable_let_patterns)]
45964 if let UnionSize24Align8::Variant(_) = self {
45965 } else {
45967 *self = UnionSize24Align8::Variant(fidl::new_empty!(StructSize16Align8, D));
45969 }
45970 #[allow(irrefutable_let_patterns)]
45971 if let UnionSize24Align8::Variant(ref mut val) = self {
45972 fidl::decode!(StructSize16Align8, D, val, decoder, _inner_offset, depth)?;
45973 } else {
45974 unreachable!()
45975 }
45976 }
45977 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45978 }
45979 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45980 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45981 }
45982 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45983 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45984 }
45985 Ok(())
45986 }
45987 }
45988
45989 impl fidl::encoding::ValueTypeMarker for UnionSize36Align4 {
45990 type Borrowed<'a> = &'a Self;
45991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45992 value
45993 }
45994 }
45995
45996 unsafe impl fidl::encoding::TypeMarker for UnionSize36Align4 {
45997 type Owned = Self;
45998
45999 #[inline(always)]
46000 fn inline_align(_context: fidl::encoding::Context) -> usize {
46001 8
46002 }
46003
46004 #[inline(always)]
46005 fn inline_size(_context: fidl::encoding::Context) -> usize {
46006 16
46007 }
46008 }
46009
46010 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize36Align4, D>
46011 for &UnionSize36Align4
46012 {
46013 #[inline]
46014 unsafe fn encode(
46015 self,
46016 encoder: &mut fidl::encoding::Encoder<'_, D>,
46017 offset: usize,
46018 _depth: fidl::encoding::Depth,
46019 ) -> fidl::Result<()> {
46020 encoder.debug_check_bounds::<UnionSize36Align4>(offset);
46021 encoder.write_num::<u64>(self.ordinal(), offset);
46022 match self {
46023 UnionSize36Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46024 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46025 encoder,
46026 offset + 8,
46027 _depth,
46028 ),
46029 UnionSize36Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46030 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46031 encoder,
46032 offset + 8,
46033 _depth,
46034 ),
46035 UnionSize36Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46036 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46037 encoder,
46038 offset + 8,
46039 _depth,
46040 ),
46041 UnionSize36Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
46042 fidl::encoding::Array<u8, 32>,
46043 D,
46044 >(
46045 <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(val),
46046 encoder,
46047 offset + 8,
46048 _depth,
46049 ),
46050 }
46051 }
46052 }
46053
46054 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize36Align4 {
46055 #[inline(always)]
46056 fn new_empty() -> Self {
46057 Self::Unused1(fidl::new_empty!(u8, D))
46058 }
46059
46060 #[inline]
46061 unsafe fn decode(
46062 &mut self,
46063 decoder: &mut fidl::encoding::Decoder<'_, D>,
46064 offset: usize,
46065 mut depth: fidl::encoding::Depth,
46066 ) -> fidl::Result<()> {
46067 decoder.debug_check_bounds::<Self>(offset);
46068 #[allow(unused_variables)]
46069 let next_out_of_line = decoder.next_out_of_line();
46070 let handles_before = decoder.remaining_handles();
46071 let (ordinal, inlined, num_bytes, num_handles) =
46072 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46073
46074 let member_inline_size = match ordinal {
46075 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46076 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46077 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46078 4 => <fidl::encoding::Array<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
46079 decoder.context,
46080 ),
46081 _ => return Err(fidl::Error::UnknownUnionTag),
46082 };
46083
46084 if inlined != (member_inline_size <= 4) {
46085 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46086 }
46087 let _inner_offset;
46088 if inlined {
46089 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46090 _inner_offset = offset + 8;
46091 } else {
46092 depth.increment()?;
46093 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46094 }
46095 match ordinal {
46096 1 => {
46097 #[allow(irrefutable_let_patterns)]
46098 if let UnionSize36Align4::Unused1(_) = self {
46099 } else {
46101 *self = UnionSize36Align4::Unused1(fidl::new_empty!(u8, D));
46103 }
46104 #[allow(irrefutable_let_patterns)]
46105 if let UnionSize36Align4::Unused1(ref mut val) = self {
46106 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46107 } else {
46108 unreachable!()
46109 }
46110 }
46111 2 => {
46112 #[allow(irrefutable_let_patterns)]
46113 if let UnionSize36Align4::Unused2(_) = self {
46114 } else {
46116 *self = UnionSize36Align4::Unused2(fidl::new_empty!(u8, D));
46118 }
46119 #[allow(irrefutable_let_patterns)]
46120 if let UnionSize36Align4::Unused2(ref mut val) = self {
46121 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46122 } else {
46123 unreachable!()
46124 }
46125 }
46126 3 => {
46127 #[allow(irrefutable_let_patterns)]
46128 if let UnionSize36Align4::Unused3(_) = self {
46129 } else {
46131 *self = UnionSize36Align4::Unused3(fidl::new_empty!(u8, D));
46133 }
46134 #[allow(irrefutable_let_patterns)]
46135 if let UnionSize36Align4::Unused3(ref mut val) = self {
46136 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46137 } else {
46138 unreachable!()
46139 }
46140 }
46141 4 => {
46142 #[allow(irrefutable_let_patterns)]
46143 if let UnionSize36Align4::Variant(_) = self {
46144 } else {
46146 *self = UnionSize36Align4::Variant(
46148 fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
46149 );
46150 }
46151 #[allow(irrefutable_let_patterns)]
46152 if let UnionSize36Align4::Variant(ref mut val) = self {
46153 fidl::decode!(fidl::encoding::Array<u8, 32>, D, val, decoder, _inner_offset, depth)?;
46154 } else {
46155 unreachable!()
46156 }
46157 }
46158 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46159 }
46160 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46161 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46162 }
46163 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46164 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46165 }
46166 Ok(())
46167 }
46168 }
46169
46170 impl fidl::encoding::ValueTypeMarker for UnionSize8Align4 {
46171 type Borrowed<'a> = &'a Self;
46172 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46173 value
46174 }
46175 }
46176
46177 unsafe impl fidl::encoding::TypeMarker for UnionSize8Align4 {
46178 type Owned = Self;
46179
46180 #[inline(always)]
46181 fn inline_align(_context: fidl::encoding::Context) -> usize {
46182 8
46183 }
46184
46185 #[inline(always)]
46186 fn inline_size(_context: fidl::encoding::Context) -> usize {
46187 16
46188 }
46189 }
46190
46191 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize8Align4, D>
46192 for &UnionSize8Align4
46193 {
46194 #[inline]
46195 unsafe fn encode(
46196 self,
46197 encoder: &mut fidl::encoding::Encoder<'_, D>,
46198 offset: usize,
46199 _depth: fidl::encoding::Depth,
46200 ) -> fidl::Result<()> {
46201 encoder.debug_check_bounds::<UnionSize8Align4>(offset);
46202 encoder.write_num::<u64>(self.ordinal(), offset);
46203 match self {
46204 UnionSize8Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46205 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46206 encoder,
46207 offset + 8,
46208 _depth,
46209 ),
46210 UnionSize8Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46211 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46212 encoder,
46213 offset + 8,
46214 _depth,
46215 ),
46216 UnionSize8Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
46217 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
46218 encoder,
46219 offset + 8,
46220 _depth,
46221 ),
46222 }
46223 }
46224 }
46225
46226 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize8Align4 {
46227 #[inline(always)]
46228 fn new_empty() -> Self {
46229 Self::Unused1(fidl::new_empty!(u8, D))
46230 }
46231
46232 #[inline]
46233 unsafe fn decode(
46234 &mut self,
46235 decoder: &mut fidl::encoding::Decoder<'_, D>,
46236 offset: usize,
46237 mut depth: fidl::encoding::Depth,
46238 ) -> fidl::Result<()> {
46239 decoder.debug_check_bounds::<Self>(offset);
46240 #[allow(unused_variables)]
46241 let next_out_of_line = decoder.next_out_of_line();
46242 let handles_before = decoder.remaining_handles();
46243 let (ordinal, inlined, num_bytes, num_handles) =
46244 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46245
46246 let member_inline_size = match ordinal {
46247 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46248 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46249 3 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46250 _ => return Err(fidl::Error::UnknownUnionTag),
46251 };
46252
46253 if inlined != (member_inline_size <= 4) {
46254 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46255 }
46256 let _inner_offset;
46257 if inlined {
46258 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46259 _inner_offset = offset + 8;
46260 } else {
46261 depth.increment()?;
46262 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46263 }
46264 match ordinal {
46265 1 => {
46266 #[allow(irrefutable_let_patterns)]
46267 if let UnionSize8Align4::Unused1(_) = self {
46268 } else {
46270 *self = UnionSize8Align4::Unused1(fidl::new_empty!(u8, D));
46272 }
46273 #[allow(irrefutable_let_patterns)]
46274 if let UnionSize8Align4::Unused1(ref mut val) = self {
46275 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46276 } else {
46277 unreachable!()
46278 }
46279 }
46280 2 => {
46281 #[allow(irrefutable_let_patterns)]
46282 if let UnionSize8Align4::Unused2(_) = self {
46283 } else {
46285 *self = UnionSize8Align4::Unused2(fidl::new_empty!(u8, D));
46287 }
46288 #[allow(irrefutable_let_patterns)]
46289 if let UnionSize8Align4::Unused2(ref mut val) = self {
46290 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46291 } else {
46292 unreachable!()
46293 }
46294 }
46295 3 => {
46296 #[allow(irrefutable_let_patterns)]
46297 if let UnionSize8Align4::Variant(_) = self {
46298 } else {
46300 *self = UnionSize8Align4::Variant(fidl::new_empty!(u32, D));
46302 }
46303 #[allow(irrefutable_let_patterns)]
46304 if let UnionSize8Align4::Variant(ref mut val) = self {
46305 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
46306 } else {
46307 unreachable!()
46308 }
46309 }
46310 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46311 }
46312 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46313 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46314 }
46315 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46316 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46317 }
46318 Ok(())
46319 }
46320 }
46321
46322 impl fidl::encoding::ValueTypeMarker for UnionWithBoundString {
46323 type Borrowed<'a> = &'a Self;
46324 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46325 value
46326 }
46327 }
46328
46329 unsafe impl fidl::encoding::TypeMarker for UnionWithBoundString {
46330 type Owned = Self;
46331
46332 #[inline(always)]
46333 fn inline_align(_context: fidl::encoding::Context) -> usize {
46334 8
46335 }
46336
46337 #[inline(always)]
46338 fn inline_size(_context: fidl::encoding::Context) -> usize {
46339 16
46340 }
46341 }
46342
46343 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithBoundString, D>
46344 for &UnionWithBoundString
46345 {
46346 #[inline]
46347 unsafe fn encode(
46348 self,
46349 encoder: &mut fidl::encoding::Encoder<'_, D>,
46350 offset: usize,
46351 _depth: fidl::encoding::Depth,
46352 ) -> fidl::Result<()> {
46353 encoder.debug_check_bounds::<UnionWithBoundString>(offset);
46354 encoder.write_num::<u64>(self.ordinal(), offset);
46355 match self {
46356 UnionWithBoundString::BoundFiveStr(ref val) => fidl::encoding::encode_in_envelope::<
46357 fidl::encoding::BoundedString<5>,
46358 D,
46359 >(
46360 <fidl::encoding::BoundedString<5> as fidl::encoding::ValueTypeMarker>::borrow(
46361 val,
46362 ),
46363 encoder,
46364 offset + 8,
46365 _depth,
46366 ),
46367 }
46368 }
46369 }
46370
46371 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithBoundString {
46372 #[inline(always)]
46373 fn new_empty() -> Self {
46374 Self::BoundFiveStr(fidl::new_empty!(fidl::encoding::BoundedString<5>, D))
46375 }
46376
46377 #[inline]
46378 unsafe fn decode(
46379 &mut self,
46380 decoder: &mut fidl::encoding::Decoder<'_, D>,
46381 offset: usize,
46382 mut depth: fidl::encoding::Depth,
46383 ) -> fidl::Result<()> {
46384 decoder.debug_check_bounds::<Self>(offset);
46385 #[allow(unused_variables)]
46386 let next_out_of_line = decoder.next_out_of_line();
46387 let handles_before = decoder.remaining_handles();
46388 let (ordinal, inlined, num_bytes, num_handles) =
46389 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46390
46391 let member_inline_size = match ordinal {
46392 1 => <fidl::encoding::BoundedString<5> as fidl::encoding::TypeMarker>::inline_size(
46393 decoder.context,
46394 ),
46395 _ => return Err(fidl::Error::UnknownUnionTag),
46396 };
46397
46398 if inlined != (member_inline_size <= 4) {
46399 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46400 }
46401 let _inner_offset;
46402 if inlined {
46403 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46404 _inner_offset = offset + 8;
46405 } else {
46406 depth.increment()?;
46407 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46408 }
46409 match ordinal {
46410 1 => {
46411 #[allow(irrefutable_let_patterns)]
46412 if let UnionWithBoundString::BoundFiveStr(_) = self {
46413 } else {
46415 *self = UnionWithBoundString::BoundFiveStr(fidl::new_empty!(
46417 fidl::encoding::BoundedString<5>,
46418 D
46419 ));
46420 }
46421 #[allow(irrefutable_let_patterns)]
46422 if let UnionWithBoundString::BoundFiveStr(ref mut val) = self {
46423 fidl::decode!(
46424 fidl::encoding::BoundedString<5>,
46425 D,
46426 val,
46427 decoder,
46428 _inner_offset,
46429 depth
46430 )?;
46431 } else {
46432 unreachable!()
46433 }
46434 }
46435 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46436 }
46437 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46438 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46439 }
46440 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46441 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46442 }
46443 Ok(())
46444 }
46445 }
46446
46447 impl fidl::encoding::ValueTypeMarker for UnionWithEmptyStruct {
46448 type Borrowed<'a> = &'a Self;
46449 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46450 value
46451 }
46452 }
46453
46454 unsafe impl fidl::encoding::TypeMarker for UnionWithEmptyStruct {
46455 type Owned = Self;
46456
46457 #[inline(always)]
46458 fn inline_align(_context: fidl::encoding::Context) -> usize {
46459 8
46460 }
46461
46462 #[inline(always)]
46463 fn inline_size(_context: fidl::encoding::Context) -> usize {
46464 16
46465 }
46466 }
46467
46468 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithEmptyStruct, D>
46469 for &UnionWithEmptyStruct
46470 {
46471 #[inline]
46472 unsafe fn encode(
46473 self,
46474 encoder: &mut fidl::encoding::Encoder<'_, D>,
46475 offset: usize,
46476 _depth: fidl::encoding::Depth,
46477 ) -> fidl::Result<()> {
46478 encoder.debug_check_bounds::<UnionWithEmptyStruct>(offset);
46479 encoder.write_num::<u64>(self.ordinal(), offset);
46480 match self {
46481 UnionWithEmptyStruct::S(ref val) => {
46482 fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
46483 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
46484 encoder,
46485 offset + 8,
46486 _depth,
46487 )
46488 }
46489 UnionWithEmptyStruct::ForceAlignmentOf8(ref val) => {
46490 fidl::encoding::encode_in_envelope::<u64, D>(
46491 <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
46492 encoder,
46493 offset + 8,
46494 _depth,
46495 )
46496 }
46497 }
46498 }
46499 }
46500
46501 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithEmptyStruct {
46502 #[inline(always)]
46503 fn new_empty() -> Self {
46504 Self::S(fidl::new_empty!(EmptyStruct, D))
46505 }
46506
46507 #[inline]
46508 unsafe fn decode(
46509 &mut self,
46510 decoder: &mut fidl::encoding::Decoder<'_, D>,
46511 offset: usize,
46512 mut depth: fidl::encoding::Depth,
46513 ) -> fidl::Result<()> {
46514 decoder.debug_check_bounds::<Self>(offset);
46515 #[allow(unused_variables)]
46516 let next_out_of_line = decoder.next_out_of_line();
46517 let handles_before = decoder.remaining_handles();
46518 let (ordinal, inlined, num_bytes, num_handles) =
46519 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46520
46521 let member_inline_size = match ordinal {
46522 1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46523 2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46524 _ => return Err(fidl::Error::UnknownUnionTag),
46525 };
46526
46527 if inlined != (member_inline_size <= 4) {
46528 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46529 }
46530 let _inner_offset;
46531 if inlined {
46532 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46533 _inner_offset = offset + 8;
46534 } else {
46535 depth.increment()?;
46536 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46537 }
46538 match ordinal {
46539 1 => {
46540 #[allow(irrefutable_let_patterns)]
46541 if let UnionWithEmptyStruct::S(_) = self {
46542 } else {
46544 *self = UnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
46546 }
46547 #[allow(irrefutable_let_patterns)]
46548 if let UnionWithEmptyStruct::S(ref mut val) = self {
46549 fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
46550 } else {
46551 unreachable!()
46552 }
46553 }
46554 2 => {
46555 #[allow(irrefutable_let_patterns)]
46556 if let UnionWithEmptyStruct::ForceAlignmentOf8(_) = self {
46557 } else {
46559 *self = UnionWithEmptyStruct::ForceAlignmentOf8(fidl::new_empty!(u64, D));
46561 }
46562 #[allow(irrefutable_let_patterns)]
46563 if let UnionWithEmptyStruct::ForceAlignmentOf8(ref mut val) = self {
46564 fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
46565 } else {
46566 unreachable!()
46567 }
46568 }
46569 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46570 }
46571 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46572 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46573 }
46574 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46575 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46576 }
46577 Ok(())
46578 }
46579 }
46580
46581 impl fidl::encoding::ValueTypeMarker for UnionWithRegression10Table {
46582 type Borrowed<'a> = &'a Self;
46583 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46584 value
46585 }
46586 }
46587
46588 unsafe impl fidl::encoding::TypeMarker for UnionWithRegression10Table {
46589 type Owned = Self;
46590
46591 #[inline(always)]
46592 fn inline_align(_context: fidl::encoding::Context) -> usize {
46593 8
46594 }
46595
46596 #[inline(always)]
46597 fn inline_size(_context: fidl::encoding::Context) -> usize {
46598 16
46599 }
46600 }
46601
46602 unsafe impl<D: fidl::encoding::ResourceDialect>
46603 fidl::encoding::Encode<UnionWithRegression10Table, D> for &UnionWithRegression10Table
46604 {
46605 #[inline]
46606 unsafe fn encode(
46607 self,
46608 encoder: &mut fidl::encoding::Encoder<'_, D>,
46609 offset: usize,
46610 _depth: fidl::encoding::Depth,
46611 ) -> fidl::Result<()> {
46612 encoder.debug_check_bounds::<UnionWithRegression10Table>(offset);
46613 encoder.write_num::<u64>(self.ordinal(), offset);
46614 match self {
46615 UnionWithRegression10Table::Unused(ref val) => {
46616 fidl::encoding::encode_in_envelope::<u8, D>(
46617 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46618 encoder,
46619 offset + 8,
46620 _depth,
46621 )
46622 }
46623 UnionWithRegression10Table::AtV2(ref val) => {
46624 fidl::encoding::encode_in_envelope::<Regression10TableV2, D>(
46625 <Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(val),
46626 encoder,
46627 offset + 8,
46628 _depth,
46629 )
46630 }
46631 }
46632 }
46633 }
46634
46635 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46636 for UnionWithRegression10Table
46637 {
46638 #[inline(always)]
46639 fn new_empty() -> Self {
46640 Self::Unused(fidl::new_empty!(u8, D))
46641 }
46642
46643 #[inline]
46644 unsafe fn decode(
46645 &mut self,
46646 decoder: &mut fidl::encoding::Decoder<'_, D>,
46647 offset: usize,
46648 mut depth: fidl::encoding::Depth,
46649 ) -> fidl::Result<()> {
46650 decoder.debug_check_bounds::<Self>(offset);
46651 #[allow(unused_variables)]
46652 let next_out_of_line = decoder.next_out_of_line();
46653 let handles_before = decoder.remaining_handles();
46654 let (ordinal, inlined, num_bytes, num_handles) =
46655 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46656
46657 let member_inline_size = match ordinal {
46658 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46659 3 => <Regression10TableV2 as fidl::encoding::TypeMarker>::inline_size(
46660 decoder.context,
46661 ),
46662 _ => return Err(fidl::Error::UnknownUnionTag),
46663 };
46664
46665 if inlined != (member_inline_size <= 4) {
46666 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46667 }
46668 let _inner_offset;
46669 if inlined {
46670 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46671 _inner_offset = offset + 8;
46672 } else {
46673 depth.increment()?;
46674 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46675 }
46676 match ordinal {
46677 1 => {
46678 #[allow(irrefutable_let_patterns)]
46679 if let UnionWithRegression10Table::Unused(_) = self {
46680 } else {
46682 *self = UnionWithRegression10Table::Unused(fidl::new_empty!(u8, D));
46684 }
46685 #[allow(irrefutable_let_patterns)]
46686 if let UnionWithRegression10Table::Unused(ref mut val) = self {
46687 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46688 } else {
46689 unreachable!()
46690 }
46691 }
46692 3 => {
46693 #[allow(irrefutable_let_patterns)]
46694 if let UnionWithRegression10Table::AtV2(_) = self {
46695 } else {
46697 *self = UnionWithRegression10Table::AtV2(fidl::new_empty!(
46699 Regression10TableV2,
46700 D
46701 ));
46702 }
46703 #[allow(irrefutable_let_patterns)]
46704 if let UnionWithRegression10Table::AtV2(ref mut val) = self {
46705 fidl::decode!(Regression10TableV2, D, val, decoder, _inner_offset, depth)?;
46706 } else {
46707 unreachable!()
46708 }
46709 }
46710 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46711 }
46712 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46713 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46714 }
46715 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46716 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46717 }
46718 Ok(())
46719 }
46720 }
46721
46722 impl fidl::encoding::ValueTypeMarker for UnionWithVectorOfVectors {
46723 type Borrowed<'a> = &'a Self;
46724 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46725 value
46726 }
46727 }
46728
46729 unsafe impl fidl::encoding::TypeMarker for UnionWithVectorOfVectors {
46730 type Owned = Self;
46731
46732 #[inline(always)]
46733 fn inline_align(_context: fidl::encoding::Context) -> usize {
46734 8
46735 }
46736
46737 #[inline(always)]
46738 fn inline_size(_context: fidl::encoding::Context) -> usize {
46739 16
46740 }
46741 }
46742
46743 unsafe impl<D: fidl::encoding::ResourceDialect>
46744 fidl::encoding::Encode<UnionWithVectorOfVectors, D> for &UnionWithVectorOfVectors
46745 {
46746 #[inline]
46747 unsafe fn encode(
46748 self,
46749 encoder: &mut fidl::encoding::Encoder<'_, D>,
46750 offset: usize,
46751 _depth: fidl::encoding::Depth,
46752 ) -> fidl::Result<()> {
46753 encoder.debug_check_bounds::<UnionWithVectorOfVectors>(offset);
46754 encoder.write_num::<u64>(self.ordinal(), offset);
46755 match self {
46756 UnionWithVectorOfVectors::V(ref val) => fidl::encoding::encode_in_envelope::<
46757 fidl::encoding::UnboundedVector<
46758 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46759 >,
46760 D,
46761 >(
46762 <fidl::encoding::UnboundedVector<
46763 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46764 > as fidl::encoding::ValueTypeMarker>::borrow(val),
46765 encoder,
46766 offset + 8,
46767 _depth,
46768 ),
46769 }
46770 }
46771 }
46772
46773 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46774 for UnionWithVectorOfVectors
46775 {
46776 #[inline(always)]
46777 fn new_empty() -> Self {
46778 Self::V(fidl::new_empty!(
46779 fidl::encoding::UnboundedVector<
46780 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46781 >,
46782 D
46783 ))
46784 }
46785
46786 #[inline]
46787 unsafe fn decode(
46788 &mut self,
46789 decoder: &mut fidl::encoding::Decoder<'_, D>,
46790 offset: usize,
46791 mut depth: fidl::encoding::Depth,
46792 ) -> fidl::Result<()> {
46793 decoder.debug_check_bounds::<Self>(offset);
46794 #[allow(unused_variables)]
46795 let next_out_of_line = decoder.next_out_of_line();
46796 let handles_before = decoder.remaining_handles();
46797 let (ordinal, inlined, num_bytes, num_handles) =
46798 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46799
46800 let member_inline_size = match ordinal {
46801 1 => <fidl::encoding::UnboundedVector<
46802 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46803 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46804 _ => return Err(fidl::Error::UnknownUnionTag),
46805 };
46806
46807 if inlined != (member_inline_size <= 4) {
46808 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46809 }
46810 let _inner_offset;
46811 if inlined {
46812 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46813 _inner_offset = offset + 8;
46814 } else {
46815 depth.increment()?;
46816 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46817 }
46818 match ordinal {
46819 1 => {
46820 #[allow(irrefutable_let_patterns)]
46821 if let UnionWithVectorOfVectors::V(_) = self {
46822 } else {
46824 *self = UnionWithVectorOfVectors::V(fidl::new_empty!(
46826 fidl::encoding::UnboundedVector<
46827 fidl::encoding::UnboundedVector<
46828 fidl::encoding::Boxed<StructSize3Align1>,
46829 >,
46830 >,
46831 D
46832 ));
46833 }
46834 #[allow(irrefutable_let_patterns)]
46835 if let UnionWithVectorOfVectors::V(ref mut val) = self {
46836 fidl::decode!(
46837 fidl::encoding::UnboundedVector<
46838 fidl::encoding::UnboundedVector<
46839 fidl::encoding::Boxed<StructSize3Align1>,
46840 >,
46841 >,
46842 D,
46843 val,
46844 decoder,
46845 _inner_offset,
46846 depth
46847 )?;
46848 } else {
46849 unreachable!()
46850 }
46851 }
46852 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46853 }
46854 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46855 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46856 }
46857 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46858 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46859 }
46860 Ok(())
46861 }
46862 }
46863
46864 impl fidl::encoding::ValueTypeMarker for XUnionOfTableThenXUnionThenUnion {
46865 type Borrowed<'a> = &'a Self;
46866 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46867 value
46868 }
46869 }
46870
46871 unsafe impl fidl::encoding::TypeMarker for XUnionOfTableThenXUnionThenUnion {
46872 type Owned = Self;
46873
46874 #[inline(always)]
46875 fn inline_align(_context: fidl::encoding::Context) -> usize {
46876 8
46877 }
46878
46879 #[inline(always)]
46880 fn inline_size(_context: fidl::encoding::Context) -> usize {
46881 16
46882 }
46883 }
46884
46885 unsafe impl<D: fidl::encoding::ResourceDialect>
46886 fidl::encoding::Encode<XUnionOfTableThenXUnionThenUnion, D>
46887 for &XUnionOfTableThenXUnionThenUnion
46888 {
46889 #[inline]
46890 unsafe fn encode(
46891 self,
46892 encoder: &mut fidl::encoding::Encoder<'_, D>,
46893 offset: usize,
46894 _depth: fidl::encoding::Depth,
46895 ) -> fidl::Result<()> {
46896 encoder.debug_check_bounds::<XUnionOfTableThenXUnionThenUnion>(offset);
46897 encoder.write_num::<u64>(self.ordinal(), offset);
46898 match self {
46899 XUnionOfTableThenXUnionThenUnion::Variant(ref val) => {
46900 fidl::encoding::encode_in_envelope::<TableOfXUnionThenUnion, D>(
46901 <TableOfXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
46902 encoder,
46903 offset + 8,
46904 _depth,
46905 )
46906 }
46907 XUnionOfTableThenXUnionThenUnion::__SourceBreaking { .. } => {
46908 Err(fidl::Error::UnknownUnionTag)
46909 }
46910 }
46911 }
46912 }
46913
46914 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46915 for XUnionOfTableThenXUnionThenUnion
46916 {
46917 #[inline(always)]
46918 fn new_empty() -> Self {
46919 Self::__SourceBreaking { unknown_ordinal: 0 }
46920 }
46921
46922 #[inline]
46923 unsafe fn decode(
46924 &mut self,
46925 decoder: &mut fidl::encoding::Decoder<'_, D>,
46926 offset: usize,
46927 mut depth: fidl::encoding::Depth,
46928 ) -> fidl::Result<()> {
46929 decoder.debug_check_bounds::<Self>(offset);
46930 #[allow(unused_variables)]
46931 let next_out_of_line = decoder.next_out_of_line();
46932 let handles_before = decoder.remaining_handles();
46933 let (ordinal, inlined, num_bytes, num_handles) =
46934 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46935
46936 let member_inline_size = match ordinal {
46937 1 => <TableOfXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
46938 decoder.context,
46939 ),
46940 0 => return Err(fidl::Error::UnknownUnionTag),
46941 _ => num_bytes as usize,
46942 };
46943
46944 if inlined != (member_inline_size <= 4) {
46945 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46946 }
46947 let _inner_offset;
46948 if inlined {
46949 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46950 _inner_offset = offset + 8;
46951 } else {
46952 depth.increment()?;
46953 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46954 }
46955 match ordinal {
46956 1 => {
46957 #[allow(irrefutable_let_patterns)]
46958 if let XUnionOfTableThenXUnionThenUnion::Variant(_) = self {
46959 } else {
46961 *self = XUnionOfTableThenXUnionThenUnion::Variant(fidl::new_empty!(
46963 TableOfXUnionThenUnion,
46964 D
46965 ));
46966 }
46967 #[allow(irrefutable_let_patterns)]
46968 if let XUnionOfTableThenXUnionThenUnion::Variant(ref mut val) = self {
46969 fidl::decode!(
46970 TableOfXUnionThenUnion,
46971 D,
46972 val,
46973 decoder,
46974 _inner_offset,
46975 depth
46976 )?;
46977 } else {
46978 unreachable!()
46979 }
46980 }
46981 #[allow(deprecated)]
46982 ordinal => {
46983 for _ in 0..num_handles {
46984 decoder.drop_next_handle()?;
46985 }
46986 *self = XUnionOfTableThenXUnionThenUnion::__SourceBreaking {
46987 unknown_ordinal: ordinal,
46988 };
46989 }
46990 }
46991 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46992 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46993 }
46994 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46995 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46996 }
46997 Ok(())
46998 }
46999 }
47000
47001 impl fidl::encoding::ValueTypeMarker for XUnionOfUnion {
47002 type Borrowed<'a> = &'a Self;
47003 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47004 value
47005 }
47006 }
47007
47008 unsafe impl fidl::encoding::TypeMarker for XUnionOfUnion {
47009 type Owned = Self;
47010
47011 #[inline(always)]
47012 fn inline_align(_context: fidl::encoding::Context) -> usize {
47013 8
47014 }
47015
47016 #[inline(always)]
47017 fn inline_size(_context: fidl::encoding::Context) -> usize {
47018 16
47019 }
47020 }
47021
47022 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionOfUnion, D>
47023 for &XUnionOfUnion
47024 {
47025 #[inline]
47026 unsafe fn encode(
47027 self,
47028 encoder: &mut fidl::encoding::Encoder<'_, D>,
47029 offset: usize,
47030 _depth: fidl::encoding::Depth,
47031 ) -> fidl::Result<()> {
47032 encoder.debug_check_bounds::<XUnionOfUnion>(offset);
47033 encoder.write_num::<u64>(self.ordinal(), offset);
47034 match self {
47035 XUnionOfUnion::Variant(ref val) => {
47036 fidl::encoding::encode_in_envelope::<UnionAtTheBottom, D>(
47037 <UnionAtTheBottom as fidl::encoding::ValueTypeMarker>::borrow(val),
47038 encoder,
47039 offset + 8,
47040 _depth,
47041 )
47042 }
47043 XUnionOfUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47044 }
47045 }
47046 }
47047
47048 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionOfUnion {
47049 #[inline(always)]
47050 fn new_empty() -> Self {
47051 Self::__SourceBreaking { unknown_ordinal: 0 }
47052 }
47053
47054 #[inline]
47055 unsafe fn decode(
47056 &mut self,
47057 decoder: &mut fidl::encoding::Decoder<'_, D>,
47058 offset: usize,
47059 mut depth: fidl::encoding::Depth,
47060 ) -> fidl::Result<()> {
47061 decoder.debug_check_bounds::<Self>(offset);
47062 #[allow(unused_variables)]
47063 let next_out_of_line = decoder.next_out_of_line();
47064 let handles_before = decoder.remaining_handles();
47065 let (ordinal, inlined, num_bytes, num_handles) =
47066 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47067
47068 let member_inline_size = match ordinal {
47069 1 => <UnionAtTheBottom as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47070 0 => return Err(fidl::Error::UnknownUnionTag),
47071 _ => num_bytes as usize,
47072 };
47073
47074 if inlined != (member_inline_size <= 4) {
47075 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47076 }
47077 let _inner_offset;
47078 if inlined {
47079 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47080 _inner_offset = offset + 8;
47081 } else {
47082 depth.increment()?;
47083 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47084 }
47085 match ordinal {
47086 1 => {
47087 #[allow(irrefutable_let_patterns)]
47088 if let XUnionOfUnion::Variant(_) = self {
47089 } else {
47091 *self = XUnionOfUnion::Variant(fidl::new_empty!(UnionAtTheBottom, D));
47093 }
47094 #[allow(irrefutable_let_patterns)]
47095 if let XUnionOfUnion::Variant(ref mut val) = self {
47096 fidl::decode!(UnionAtTheBottom, D, val, decoder, _inner_offset, depth)?;
47097 } else {
47098 unreachable!()
47099 }
47100 }
47101 #[allow(deprecated)]
47102 ordinal => {
47103 for _ in 0..num_handles {
47104 decoder.drop_next_handle()?;
47105 }
47106 *self = XUnionOfUnion::__SourceBreaking { unknown_ordinal: ordinal };
47107 }
47108 }
47109 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47110 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47111 }
47112 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47113 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47114 }
47115 Ok(())
47116 }
47117 }
47118
47119 impl fidl::encoding::ValueTypeMarker for XUnionWithEmptyStruct {
47120 type Borrowed<'a> = &'a Self;
47121 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47122 value
47123 }
47124 }
47125
47126 unsafe impl fidl::encoding::TypeMarker for XUnionWithEmptyStruct {
47127 type Owned = Self;
47128
47129 #[inline(always)]
47130 fn inline_align(_context: fidl::encoding::Context) -> usize {
47131 8
47132 }
47133
47134 #[inline(always)]
47135 fn inline_size(_context: fidl::encoding::Context) -> usize {
47136 16
47137 }
47138 }
47139
47140 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithEmptyStruct, D>
47141 for &XUnionWithEmptyStruct
47142 {
47143 #[inline]
47144 unsafe fn encode(
47145 self,
47146 encoder: &mut fidl::encoding::Encoder<'_, D>,
47147 offset: usize,
47148 _depth: fidl::encoding::Depth,
47149 ) -> fidl::Result<()> {
47150 encoder.debug_check_bounds::<XUnionWithEmptyStruct>(offset);
47151 encoder.write_num::<u64>(self.ordinal(), offset);
47152 match self {
47153 XUnionWithEmptyStruct::S(ref val) => {
47154 fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
47155 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
47156 encoder,
47157 offset + 8,
47158 _depth,
47159 )
47160 }
47161 XUnionWithEmptyStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47162 }
47163 }
47164 }
47165
47166 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithEmptyStruct {
47167 #[inline(always)]
47168 fn new_empty() -> Self {
47169 Self::__SourceBreaking { unknown_ordinal: 0 }
47170 }
47171
47172 #[inline]
47173 unsafe fn decode(
47174 &mut self,
47175 decoder: &mut fidl::encoding::Decoder<'_, D>,
47176 offset: usize,
47177 mut depth: fidl::encoding::Depth,
47178 ) -> fidl::Result<()> {
47179 decoder.debug_check_bounds::<Self>(offset);
47180 #[allow(unused_variables)]
47181 let next_out_of_line = decoder.next_out_of_line();
47182 let handles_before = decoder.remaining_handles();
47183 let (ordinal, inlined, num_bytes, num_handles) =
47184 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47185
47186 let member_inline_size = match ordinal {
47187 1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47188 0 => return Err(fidl::Error::UnknownUnionTag),
47189 _ => num_bytes as usize,
47190 };
47191
47192 if inlined != (member_inline_size <= 4) {
47193 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47194 }
47195 let _inner_offset;
47196 if inlined {
47197 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47198 _inner_offset = offset + 8;
47199 } else {
47200 depth.increment()?;
47201 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47202 }
47203 match ordinal {
47204 1 => {
47205 #[allow(irrefutable_let_patterns)]
47206 if let XUnionWithEmptyStruct::S(_) = self {
47207 } else {
47209 *self = XUnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
47211 }
47212 #[allow(irrefutable_let_patterns)]
47213 if let XUnionWithEmptyStruct::S(ref mut val) = self {
47214 fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
47215 } else {
47216 unreachable!()
47217 }
47218 }
47219 #[allow(deprecated)]
47220 ordinal => {
47221 for _ in 0..num_handles {
47222 decoder.drop_next_handle()?;
47223 }
47224 *self = XUnionWithEmptyStruct::__SourceBreaking { unknown_ordinal: ordinal };
47225 }
47226 }
47227 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47228 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47229 }
47230 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47231 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47232 }
47233 Ok(())
47234 }
47235 }
47236
47237 impl fidl::encoding::ValueTypeMarker for XUnionWithStruct {
47238 type Borrowed<'a> = &'a Self;
47239 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47240 value
47241 }
47242 }
47243
47244 unsafe impl fidl::encoding::TypeMarker for XUnionWithStruct {
47245 type Owned = Self;
47246
47247 #[inline(always)]
47248 fn inline_align(_context: fidl::encoding::Context) -> usize {
47249 8
47250 }
47251
47252 #[inline(always)]
47253 fn inline_size(_context: fidl::encoding::Context) -> usize {
47254 16
47255 }
47256 }
47257
47258 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithStruct, D>
47259 for &XUnionWithStruct
47260 {
47261 #[inline]
47262 unsafe fn encode(
47263 self,
47264 encoder: &mut fidl::encoding::Encoder<'_, D>,
47265 offset: usize,
47266 _depth: fidl::encoding::Depth,
47267 ) -> fidl::Result<()> {
47268 encoder.debug_check_bounds::<XUnionWithStruct>(offset);
47269 encoder.write_num::<u64>(self.ordinal(), offset);
47270 match self {
47271 XUnionWithStruct::S(ref val) => {
47272 fidl::encoding::encode_in_envelope::<StructSize3Align1, D>(
47273 <StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow(val),
47274 encoder,
47275 offset + 8,
47276 _depth,
47277 )
47278 }
47279 XUnionWithStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47280 }
47281 }
47282 }
47283
47284 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithStruct {
47285 #[inline(always)]
47286 fn new_empty() -> Self {
47287 Self::__SourceBreaking { unknown_ordinal: 0 }
47288 }
47289
47290 #[inline]
47291 unsafe fn decode(
47292 &mut self,
47293 decoder: &mut fidl::encoding::Decoder<'_, D>,
47294 offset: usize,
47295 mut depth: fidl::encoding::Depth,
47296 ) -> fidl::Result<()> {
47297 decoder.debug_check_bounds::<Self>(offset);
47298 #[allow(unused_variables)]
47299 let next_out_of_line = decoder.next_out_of_line();
47300 let handles_before = decoder.remaining_handles();
47301 let (ordinal, inlined, num_bytes, num_handles) =
47302 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47303
47304 let member_inline_size = match ordinal {
47305 1 => {
47306 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
47307 }
47308 0 => return Err(fidl::Error::UnknownUnionTag),
47309 _ => num_bytes as usize,
47310 };
47311
47312 if inlined != (member_inline_size <= 4) {
47313 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47314 }
47315 let _inner_offset;
47316 if inlined {
47317 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47318 _inner_offset = offset + 8;
47319 } else {
47320 depth.increment()?;
47321 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47322 }
47323 match ordinal {
47324 1 => {
47325 #[allow(irrefutable_let_patterns)]
47326 if let XUnionWithStruct::S(_) = self {
47327 } else {
47329 *self = XUnionWithStruct::S(fidl::new_empty!(StructSize3Align1, D));
47331 }
47332 #[allow(irrefutable_let_patterns)]
47333 if let XUnionWithStruct::S(ref mut val) = self {
47334 fidl::decode!(StructSize3Align1, D, val, decoder, _inner_offset, depth)?;
47335 } else {
47336 unreachable!()
47337 }
47338 }
47339 #[allow(deprecated)]
47340 ordinal => {
47341 for _ in 0..num_handles {
47342 decoder.drop_next_handle()?;
47343 }
47344 *self = XUnionWithStruct::__SourceBreaking { unknown_ordinal: ordinal };
47345 }
47346 }
47347 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47348 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47349 }
47350 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47351 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47352 }
47353 Ok(())
47354 }
47355 }
47356
47357 impl fidl::encoding::ValueTypeMarker for XUnionWithUnions {
47358 type Borrowed<'a> = &'a Self;
47359 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47360 value
47361 }
47362 }
47363
47364 unsafe impl fidl::encoding::TypeMarker for XUnionWithUnions {
47365 type Owned = Self;
47366
47367 #[inline(always)]
47368 fn inline_align(_context: fidl::encoding::Context) -> usize {
47369 8
47370 }
47371
47372 #[inline(always)]
47373 fn inline_size(_context: fidl::encoding::Context) -> usize {
47374 16
47375 }
47376 }
47377
47378 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithUnions, D>
47379 for &XUnionWithUnions
47380 {
47381 #[inline]
47382 unsafe fn encode(
47383 self,
47384 encoder: &mut fidl::encoding::Encoder<'_, D>,
47385 offset: usize,
47386 _depth: fidl::encoding::Depth,
47387 ) -> fidl::Result<()> {
47388 encoder.debug_check_bounds::<XUnionWithUnions>(offset);
47389 encoder.write_num::<u64>(self.ordinal(), offset);
47390 match self {
47391 XUnionWithUnions::U1(ref val) => {
47392 fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
47393 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
47394 encoder,
47395 offset + 8,
47396 _depth,
47397 )
47398 }
47399 XUnionWithUnions::U2(ref val) => {
47400 fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
47401 <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
47402 encoder,
47403 offset + 8,
47404 _depth,
47405 )
47406 }
47407 XUnionWithUnions::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47408 }
47409 }
47410 }
47411
47412 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithUnions {
47413 #[inline(always)]
47414 fn new_empty() -> Self {
47415 Self::__SourceBreaking { unknown_ordinal: 0 }
47416 }
47417
47418 #[inline]
47419 unsafe fn decode(
47420 &mut self,
47421 decoder: &mut fidl::encoding::Decoder<'_, D>,
47422 offset: usize,
47423 mut depth: fidl::encoding::Depth,
47424 ) -> fidl::Result<()> {
47425 decoder.debug_check_bounds::<Self>(offset);
47426 #[allow(unused_variables)]
47427 let next_out_of_line = decoder.next_out_of_line();
47428 let handles_before = decoder.remaining_handles();
47429 let (ordinal, inlined, num_bytes, num_handles) =
47430 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47431
47432 let member_inline_size = match ordinal {
47433 1 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47434 2 => {
47435 <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
47436 }
47437 0 => return Err(fidl::Error::UnknownUnionTag),
47438 _ => num_bytes as usize,
47439 };
47440
47441 if inlined != (member_inline_size <= 4) {
47442 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47443 }
47444 let _inner_offset;
47445 if inlined {
47446 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47447 _inner_offset = offset + 8;
47448 } else {
47449 depth.increment()?;
47450 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47451 }
47452 match ordinal {
47453 1 => {
47454 #[allow(irrefutable_let_patterns)]
47455 if let XUnionWithUnions::U1(_) = self {
47456 } else {
47458 *self = XUnionWithUnions::U1(fidl::new_empty!(UnionSize8Align4, D));
47460 }
47461 #[allow(irrefutable_let_patterns)]
47462 if let XUnionWithUnions::U1(ref mut val) = self {
47463 fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
47464 } else {
47465 unreachable!()
47466 }
47467 }
47468 2 => {
47469 #[allow(irrefutable_let_patterns)]
47470 if let XUnionWithUnions::U2(_) = self {
47471 } else {
47473 *self = XUnionWithUnions::U2(fidl::new_empty!(UnionSize12Align4, D));
47475 }
47476 #[allow(irrefutable_let_patterns)]
47477 if let XUnionWithUnions::U2(ref mut val) = self {
47478 fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
47479 } else {
47480 unreachable!()
47481 }
47482 }
47483 #[allow(deprecated)]
47484 ordinal => {
47485 for _ in 0..num_handles {
47486 decoder.drop_next_handle()?;
47487 }
47488 *self = XUnionWithUnions::__SourceBreaking { unknown_ordinal: ordinal };
47489 }
47490 }
47491 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47492 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47493 }
47494 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47495 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47496 }
47497 Ok(())
47498 }
47499 }
47500
47501 impl fidl::encoding::ValueTypeMarker for XUnionWithXUnion {
47502 type Borrowed<'a> = &'a Self;
47503 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47504 value
47505 }
47506 }
47507
47508 unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnion {
47509 type Owned = Self;
47510
47511 #[inline(always)]
47512 fn inline_align(_context: fidl::encoding::Context) -> usize {
47513 8
47514 }
47515
47516 #[inline(always)]
47517 fn inline_size(_context: fidl::encoding::Context) -> usize {
47518 16
47519 }
47520 }
47521
47522 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithXUnion, D>
47523 for &XUnionWithXUnion
47524 {
47525 #[inline]
47526 unsafe fn encode(
47527 self,
47528 encoder: &mut fidl::encoding::Encoder<'_, D>,
47529 offset: usize,
47530 _depth: fidl::encoding::Depth,
47531 ) -> fidl::Result<()> {
47532 encoder.debug_check_bounds::<XUnionWithXUnion>(offset);
47533 encoder.write_num::<u64>(self.ordinal(), offset);
47534 match self {
47535 XUnionWithXUnion::Xu(ref val) => {
47536 fidl::encoding::encode_in_envelope::<XUnionWithStruct, D>(
47537 <XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
47538 encoder,
47539 offset + 8,
47540 _depth,
47541 )
47542 }
47543 XUnionWithXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47544 }
47545 }
47546 }
47547
47548 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithXUnion {
47549 #[inline(always)]
47550 fn new_empty() -> Self {
47551 Self::__SourceBreaking { unknown_ordinal: 0 }
47552 }
47553
47554 #[inline]
47555 unsafe fn decode(
47556 &mut self,
47557 decoder: &mut fidl::encoding::Decoder<'_, D>,
47558 offset: usize,
47559 mut depth: fidl::encoding::Depth,
47560 ) -> fidl::Result<()> {
47561 decoder.debug_check_bounds::<Self>(offset);
47562 #[allow(unused_variables)]
47563 let next_out_of_line = decoder.next_out_of_line();
47564 let handles_before = decoder.remaining_handles();
47565 let (ordinal, inlined, num_bytes, num_handles) =
47566 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47567
47568 let member_inline_size = match ordinal {
47569 1 => <XUnionWithStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47570 0 => return Err(fidl::Error::UnknownUnionTag),
47571 _ => num_bytes as usize,
47572 };
47573
47574 if inlined != (member_inline_size <= 4) {
47575 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47576 }
47577 let _inner_offset;
47578 if inlined {
47579 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47580 _inner_offset = offset + 8;
47581 } else {
47582 depth.increment()?;
47583 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47584 }
47585 match ordinal {
47586 1 => {
47587 #[allow(irrefutable_let_patterns)]
47588 if let XUnionWithXUnion::Xu(_) = self {
47589 } else {
47591 *self = XUnionWithXUnion::Xu(fidl::new_empty!(XUnionWithStruct, D));
47593 }
47594 #[allow(irrefutable_let_patterns)]
47595 if let XUnionWithXUnion::Xu(ref mut val) = self {
47596 fidl::decode!(XUnionWithStruct, D, val, decoder, _inner_offset, depth)?;
47597 } else {
47598 unreachable!()
47599 }
47600 }
47601 #[allow(deprecated)]
47602 ordinal => {
47603 for _ in 0..num_handles {
47604 decoder.drop_next_handle()?;
47605 }
47606 *self = XUnionWithXUnion::__SourceBreaking { unknown_ordinal: ordinal };
47607 }
47608 }
47609 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47610 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47611 }
47612 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47613 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47614 }
47615 Ok(())
47616 }
47617 }
47618}