fidl_test_conformance__common/
fidl_test_conformance__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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/// Pattern that matches an unknown `EmptyEnum` member.
249#[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/// Pattern that matches an unknown `FlexibleEnumInt16` member.
365#[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/// Pattern that matches an unknown `FlexibleEnumInt32` member.
425#[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/// Pattern that matches an unknown `FlexibleEnumInt64` member.
485#[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/// Pattern that matches an unknown `FlexibleEnumInt8` member.
545#[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/// Pattern that matches an unknown `FlexibleEnumUint16` member.
605#[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/// Pattern that matches an unknown `FlexibleEnumUint32` member.
665#[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/// Pattern that matches an unknown `FlexibleEnumUint64` member.
725#[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/// Pattern that matches an unknown `FlexibleEnumUint8` member.
785#[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/// Pattern that matches an unknown `SignedEnum` member.
865#[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/// Pattern that matches an unknown `UnsignedEnum` member.
1105#[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 StringWithLimitInArray {
2869    pub a: [String; 2],
2870}
2871
2872impl fidl::Persistable for StringWithLimitInArray {}
2873
2874#[derive(Clone, Debug, PartialEq)]
2875pub struct StringWithLimitInTable {
2876    pub t: TableWithStringWithLimit,
2877}
2878
2879impl fidl::Persistable for StringWithLimitInTable {}
2880
2881#[derive(Clone, Debug, PartialEq)]
2882pub struct StringWithLimitInUnion {
2883    pub u: UnionWithStringWithLimit,
2884}
2885
2886impl fidl::Persistable for StringWithLimitInUnion {}
2887
2888#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2889pub struct StringWithLimitInVector {
2890    pub v: Vec<Option<String>>,
2891}
2892
2893impl fidl::Persistable for StringWithLimitInVector {}
2894
2895#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2896pub struct StringWrapper {
2897    pub str: String,
2898}
2899
2900impl fidl::Persistable for StringWrapper {}
2901
2902#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2903#[repr(C)]
2904pub struct Struct1Byte {
2905    pub a: i8,
2906}
2907
2908impl fidl::Persistable for Struct1Byte {}
2909
2910#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2911#[repr(C)]
2912pub struct Struct2Byte {
2913    pub a: i16,
2914}
2915
2916impl fidl::Persistable for Struct2Byte {}
2917
2918#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2919#[repr(C)]
2920pub struct Struct3Byte {
2921    pub a: i16,
2922    pub b: i8,
2923}
2924
2925impl fidl::Persistable for Struct3Byte {}
2926
2927#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2928#[repr(C)]
2929pub struct Struct4Byte {
2930    pub a: i32,
2931}
2932
2933impl fidl::Persistable for Struct4Byte {}
2934
2935#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2936#[repr(C)]
2937pub struct Struct5Byte {
2938    pub a: i32,
2939    pub b: i8,
2940}
2941
2942impl fidl::Persistable for Struct5Byte {}
2943
2944#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2945#[repr(C)]
2946pub struct Struct6Byte {
2947    pub a: i32,
2948    pub b: i16,
2949}
2950
2951impl fidl::Persistable for Struct6Byte {}
2952
2953#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2954#[repr(C)]
2955pub struct Struct7Byte {
2956    pub a: i32,
2957    pub b: i16,
2958    pub c: i8,
2959}
2960
2961impl fidl::Persistable for Struct7Byte {}
2962
2963#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2964#[repr(C)]
2965pub struct Struct8Byte {
2966    pub a: i64,
2967}
2968
2969impl fidl::Persistable for Struct8Byte {}
2970
2971#[derive(Clone, Debug, PartialEq)]
2972pub struct StructOfEmptyFlexibleUnion {
2973    pub empty: EmptyFlexibleUnion,
2974}
2975
2976impl fidl::Persistable for StructOfEmptyFlexibleUnion {}
2977
2978#[derive(Clone, Debug, PartialEq)]
2979pub struct StructOfEmptyTable {
2980    pub table: EmptyTable,
2981}
2982
2983impl fidl::Persistable for StructOfEmptyTable {}
2984
2985#[derive(Clone, Debug, PartialEq)]
2986pub struct StructOfReverseOrdinalTable {
2987    pub table: ReverseOrdinalTable,
2988}
2989
2990impl fidl::Persistable for StructOfReverseOrdinalTable {}
2991
2992#[derive(Clone, Debug, PartialEq)]
2993pub struct StructOfSimpleTable {
2994    pub table: SimpleTable,
2995}
2996
2997impl fidl::Persistable for StructOfSimpleTable {}
2998
2999#[derive(Clone, Debug, PartialEq)]
3000pub struct StructOfTableWithGaps {
3001    pub table: TableWithGaps,
3002}
3003
3004impl fidl::Persistable for StructOfTableWithGaps {}
3005
3006#[derive(Clone, Debug, PartialEq)]
3007pub struct StructOfTableWithStringAndVector {
3008    pub table: TableWithStringAndVector,
3009}
3010
3011impl fidl::Persistable for StructOfTableWithStringAndVector {}
3012
3013#[derive(Clone, Debug, PartialEq)]
3014pub struct StructOfTableWithXUnion {
3015    pub value: TableWithXUnion,
3016}
3017
3018impl fidl::Persistable for StructOfTableWithXUnion {}
3019
3020#[derive(Clone, Debug, PartialEq)]
3021pub struct StructOfUnionOfTable {
3022    pub u: UnionOfTable,
3023}
3024
3025impl fidl::Persistable for StructOfUnionOfTable {}
3026
3027#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3028#[repr(C)]
3029pub struct StructSize16Align8 {
3030    pub f1: u64,
3031    pub f2: u64,
3032}
3033
3034impl fidl::Persistable for StructSize16Align8 {}
3035
3036#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3037#[repr(C)]
3038pub struct StructSize3Align1 {
3039    pub three_bytes: [u8; 3],
3040}
3041
3042impl fidl::Persistable for StructSize3Align1 {}
3043
3044#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3045#[repr(C)]
3046pub struct StructSize3Align2 {
3047    pub f1: u16,
3048    pub f2: u8,
3049}
3050
3051impl fidl::Persistable for StructSize3Align2 {}
3052
3053#[derive(Clone, Debug, PartialEq)]
3054pub struct StructTableNoFields {
3055    pub t: TableNoFields,
3056}
3057
3058impl fidl::Persistable for StructTableNoFields {}
3059
3060#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3061pub struct StructWithArrays {
3062    pub arr_int: [i32; 2],
3063    pub arr_string: [String; 2],
3064    pub arr_nullable_string: [Option<String>; 2],
3065    pub arr_struct: [StructWithInt; 2],
3066    pub arr_nullable_struct: [Option<Box<StructWithInt>>; 2],
3067    pub arr_arr_int: [[i32; 3]; 2],
3068}
3069
3070impl fidl::Persistable for StructWithArrays {}
3071
3072#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3073#[repr(C)]
3074pub struct StructWithInt {
3075    pub x: i32,
3076}
3077
3078impl fidl::Persistable for StructWithInt {}
3079
3080#[derive(Clone, Debug, PartialEq)]
3081pub struct StructWithOptionals {
3082    pub s: EmptyStruct,
3083    pub s2: Option<Box<EmptyStruct>>,
3084    pub t: TableWithEmptyStruct,
3085    pub xu: XUnionWithEmptyStruct,
3086    pub xu2: Option<Box<XUnionWithEmptyStruct>>,
3087    pub u: UnionWithEmptyStruct,
3088    pub u2: Option<Box<UnionWithEmptyStruct>>,
3089}
3090
3091impl fidl::Persistable for StructWithOptionals {}
3092
3093#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3094pub struct StructWithVectors {
3095    pub vec_empty: Vec<i32>,
3096    pub vec_int: Vec<i32>,
3097    pub vec_string: Vec<String>,
3098    pub vec_nullable_string: Vec<Option<String>>,
3099    pub vec_struct: Vec<StructWithInt>,
3100    pub vec_nullable_struct: Vec<Option<Box<StructWithInt>>>,
3101    pub vec_vec_int: Vec<Vec<i32>>,
3102}
3103
3104impl fidl::Persistable for StructWithVectors {}
3105
3106#[derive(Clone, Debug, PartialEq)]
3107pub struct TableFieldInlinedStruct {
3108    pub t: TableFieldInlined,
3109}
3110
3111impl fidl::Persistable for TableFieldInlinedStruct {}
3112
3113#[derive(Clone, Debug, PartialEq)]
3114pub struct TableFieldOutOfLineStruct {
3115    pub t: TableFieldOutOfLine,
3116}
3117
3118impl fidl::Persistable for TableFieldOutOfLineStruct {}
3119
3120#[derive(Clone, Debug, PartialEq)]
3121pub struct TableFieldUnknownStruct {
3122    pub t: TableFieldUnknown,
3123}
3124
3125impl fidl::Persistable for TableFieldUnknownStruct {}
3126
3127#[derive(Clone, Debug, PartialEq)]
3128pub struct TableFieldUnsetFlexibleEnumInlinedStruct {
3129    pub t: TableFieldUnsetFlexibleEnumInlined,
3130}
3131
3132impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlinedStruct {}
3133
3134#[derive(Clone, Debug, PartialEq)]
3135pub struct TableStructWithReservedSandwichStruct {
3136    pub table: TableStructWithReservedSandwich,
3137}
3138
3139impl fidl::Persistable for TableStructWithReservedSandwichStruct {}
3140
3141#[derive(Clone, Debug, PartialEq)]
3142pub struct TableStructWithUint32SandwichStruct {
3143    pub table: TableStructWithUint32Sandwich,
3144}
3145
3146impl fidl::Persistable for TableStructWithUint32SandwichStruct {}
3147
3148#[derive(Clone, Debug, PartialEq)]
3149pub struct TableWithReservedFieldThenUnionStruct {
3150    pub t: TableWithReservedFieldThenUnion,
3151}
3152
3153impl fidl::Persistable for TableWithReservedFieldThenUnionStruct {}
3154
3155#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3156pub struct TestAddEthernetDeviceRequest {
3157    pub topological_path: String,
3158    pub config: InterfaceConfig,
3159    pub this_should_be_a_handle: u32,
3160}
3161
3162impl fidl::Persistable for TestAddEthernetDeviceRequest {}
3163
3164#[derive(Clone, Debug, PartialEq)]
3165pub struct TestFlexibleXUnionInStruct {
3166    pub xu: SampleXUnion,
3167}
3168
3169impl fidl::Persistable for TestFlexibleXUnionInStruct {}
3170
3171#[derive(Clone, Debug, PartialEq)]
3172pub struct TestInlineXUnionInStruct {
3173    pub before: String,
3174    pub xu: SampleXUnion,
3175    pub after: String,
3176}
3177
3178impl fidl::Persistable for TestInlineXUnionInStruct {}
3179
3180#[derive(Clone, Debug, PartialEq)]
3181pub struct TestOptionalFlexibleXUnionInStruct {
3182    pub xu: Option<Box<SampleXUnion>>,
3183}
3184
3185impl fidl::Persistable for TestOptionalFlexibleXUnionInStruct {}
3186
3187#[derive(Clone, Debug, PartialEq)]
3188pub struct TestOptionalStrictXUnionInStruct {
3189    pub xu: Option<Box<SampleStrictXUnion>>,
3190}
3191
3192impl fidl::Persistable for TestOptionalStrictXUnionInStruct {}
3193
3194#[derive(Clone, Debug, PartialEq)]
3195pub struct TestOptionalXUnionInStruct {
3196    pub before: String,
3197    pub xu: Option<Box<SampleXUnion>>,
3198    pub after: String,
3199}
3200
3201impl fidl::Persistable for TestOptionalXUnionInStruct {}
3202
3203#[derive(Clone, Debug, PartialEq)]
3204pub struct TestStrictXUnionInStruct {
3205    pub xu: SampleStrictXUnion,
3206}
3207
3208impl fidl::Persistable for TestStrictXUnionInStruct {}
3209
3210#[derive(Clone, Debug, PartialEq)]
3211pub struct TestXUnionInTable {
3212    pub value: XUnionInTable,
3213}
3214
3215impl fidl::Persistable for TestXUnionInTable {}
3216
3217#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3218#[repr(C)]
3219pub struct ThreeByte {
3220    pub elem1: u8,
3221    pub elem2: u8,
3222    pub elem3: u8,
3223}
3224
3225impl fidl::Persistable for ThreeByte {}
3226
3227#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3228#[repr(C)]
3229pub struct ThreeByteInArray {
3230    pub elems: [ThreeByte; 3],
3231}
3232
3233impl fidl::Persistable for ThreeByteInArray {}
3234
3235#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3236#[repr(C)]
3237pub struct ThreeByteInStruct {
3238    pub elem1: ThreeByte,
3239    pub elem2: ThreeByte,
3240    pub elem3: ThreeByte,
3241}
3242
3243impl fidl::Persistable for ThreeByteInStruct {}
3244
3245#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3246pub struct ThreeByteInVector {
3247    pub elems: Vec<ThreeByte>,
3248}
3249
3250impl fidl::Persistable for ThreeByteInVector {}
3251
3252#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3253#[repr(C)]
3254pub struct TransactionHeader {
3255    pub tx_id: u32,
3256    pub flags: [u8; 3],
3257    pub magic_number: u8,
3258    pub ordinal: u64,
3259}
3260
3261impl fidl::Persistable for TransactionHeader {}
3262
3263#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3264pub struct TransformerEmptyStruct;
3265
3266impl fidl::Persistable for TransformerEmptyStruct {}
3267
3268#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3269pub struct TwoEmptyStructsInStruct {
3270    pub a: EmptyStruct,
3271    pub b: EmptyStruct,
3272}
3273
3274impl fidl::Persistable for TwoEmptyStructsInStruct {}
3275
3276#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3277pub struct TwoEmptyStructsInStructInVectorInStruct {
3278    pub v: Vec<TwoEmptyStructsInStruct>,
3279}
3280
3281impl fidl::Persistable for TwoEmptyStructsInStructInVectorInStruct {}
3282
3283#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3284pub struct TwoLayerStructInnerBool {
3285    pub s: OneLayerStructWithBool,
3286    pub a: u64,
3287}
3288
3289impl fidl::Persistable for TwoLayerStructInnerBool {}
3290
3291#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3292#[repr(C)]
3293pub struct TwoLayerStructInnerPaddingAlign4 {
3294    pub s: OneLayerStructWithPaddingAlign4,
3295    pub a: u32,
3296}
3297
3298impl fidl::Persistable for TwoLayerStructInnerPaddingAlign4 {}
3299
3300#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3301#[repr(C)]
3302pub struct TwoLayerStructInnerPaddingAlign8 {
3303    pub s: OneLayerStructWithPaddingAlign8,
3304    pub a: u64,
3305}
3306
3307impl fidl::Persistable for TwoLayerStructInnerPaddingAlign8 {}
3308
3309#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3310#[repr(C)]
3311pub struct TwoLayerStructNoPaddingAlign4 {
3312    pub s: OneLayerStructNoPaddingAlign4,
3313    pub a: u32,
3314}
3315
3316impl fidl::Persistable for TwoLayerStructNoPaddingAlign4 {}
3317
3318#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3319#[repr(C)]
3320pub struct TwoLayerStructNoPaddingAlign8 {
3321    pub s: OneLayerStructNoPaddingAlign8,
3322    pub a: u64,
3323}
3324
3325impl fidl::Persistable for TwoLayerStructNoPaddingAlign8 {}
3326
3327#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3328#[repr(C)]
3329pub struct Uint16Struct {
3330    pub val: u16,
3331}
3332
3333impl fidl::Persistable for Uint16Struct {}
3334
3335#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3336#[repr(C)]
3337pub struct Uint32Struct {
3338    pub val: u32,
3339}
3340
3341impl fidl::Persistable for Uint32Struct {}
3342
3343#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3344#[repr(C)]
3345pub struct Uint64Struct {
3346    pub val: u64,
3347}
3348
3349impl fidl::Persistable for Uint64Struct {}
3350
3351#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3352#[repr(C)]
3353pub struct Uint64Uint32Uint16Uint8 {
3354    pub f1: u64,
3355    pub f2: u32,
3356    pub f3: u16,
3357    pub f4: u8,
3358}
3359
3360impl fidl::Persistable for Uint64Uint32Uint16Uint8 {}
3361
3362#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3363#[repr(C)]
3364pub struct Uint8Struct {
3365    pub val: u8,
3366}
3367
3368impl fidl::Persistable for Uint8Struct {}
3369
3370#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3371#[repr(C)]
3372pub struct Uint8Uint16Uint32Uint64 {
3373    pub f1: u8,
3374    pub f2: u16,
3375    pub f3: u32,
3376    pub f4: u64,
3377}
3378
3379impl fidl::Persistable for Uint8Uint16Uint32Uint64 {}
3380
3381#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3382pub struct Uint8UnionStruct {
3383    pub u: Uint8Union,
3384}
3385
3386impl fidl::Persistable for Uint8UnionStruct {}
3387
3388#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3389pub struct UnboundedNonnullableString {
3390    pub s0: String,
3391}
3392
3393impl fidl::Persistable for UnboundedNonnullableString {}
3394
3395#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3396pub struct UnboundedNonnullableVectorOfUint32s {
3397    pub vu0: Vec<u32>,
3398}
3399
3400impl fidl::Persistable for UnboundedNonnullableVectorOfUint32s {}
3401
3402#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3403pub struct UnboundedNullableString {
3404    pub s0: Option<String>,
3405}
3406
3407impl fidl::Persistable for UnboundedNullableString {}
3408
3409#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3410pub struct UnboundedNullableVectorOfUint32s {
3411    pub vu0: Option<Vec<u32>>,
3412}
3413
3414impl fidl::Persistable for UnboundedNullableVectorOfUint32s {}
3415
3416#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3417pub struct UnionInlinePaddingStruct {
3418    pub u: UnionInlinePadding,
3419}
3420
3421impl fidl::Persistable for UnionInlinePaddingStruct {}
3422
3423#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3424pub struct UnionWithBoundStringStruct {
3425    pub v: UnionWithBoundString,
3426}
3427
3428impl fidl::Persistable for UnionWithBoundStringStruct {}
3429
3430#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3431pub struct UpdatePolicy {
3432    pub fetch_if_absent: bool,
3433    pub allow_old_versions: bool,
3434}
3435
3436impl fidl::Persistable for UpdatePolicy {}
3437
3438#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3439pub struct VectorOfByteVector {
3440    pub v: Vec<Vec<u8>>,
3441}
3442
3443impl fidl::Persistable for VectorOfByteVector {}
3444
3445#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3446pub struct VectorOfEnumStruct {
3447    pub v: Vec<StrictEnumInt16>,
3448}
3449
3450impl fidl::Persistable for VectorOfEnumStruct {}
3451
3452#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3453pub struct VectorOfStrings {
3454    pub v: Vec<String>,
3455}
3456
3457impl fidl::Persistable for VectorOfStrings {}
3458
3459#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3460pub struct VectorWithLimit {
3461    pub v: Vec<u8>,
3462}
3463
3464impl fidl::Persistable for VectorWithLimit {}
3465
3466#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3467pub struct VectorWithLimitInArray {
3468    pub a: [Option<Vec<u8>>; 2],
3469}
3470
3471impl fidl::Persistable for VectorWithLimitInArray {}
3472
3473#[derive(Clone, Debug, PartialEq)]
3474pub struct VectorWithLimitInTable {
3475    pub t: TableWithVectorWithLimit,
3476}
3477
3478impl fidl::Persistable for VectorWithLimitInTable {}
3479
3480#[derive(Clone, Debug, PartialEq)]
3481pub struct VectorWithLimitInUnion {
3482    pub u: UnionWithVectorWithLimit,
3483}
3484
3485impl fidl::Persistable for VectorWithLimitInUnion {}
3486
3487#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3488pub struct VectorWithLimitInVector {
3489    pub v: Vec<Vec<u8>>,
3490}
3491
3492impl fidl::Persistable for VectorWithLimitInVector {}
3493
3494#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3495pub struct VectorWrapper {
3496    pub v: Vec<u8>,
3497}
3498
3499impl fidl::Persistable for VectorWrapper {}
3500
3501#[derive(Clone, Debug, PartialEq)]
3502pub struct XUnionWithStructStruct {
3503    pub xu: XUnionWithStruct,
3504}
3505
3506impl fidl::Persistable for XUnionWithStructStruct {}
3507
3508#[derive(Clone, Debug, PartialEq)]
3509pub struct XUnionWithXUnionStruct {
3510    pub xu: XUnionWithXUnion,
3511}
3512
3513impl fidl::Persistable for XUnionWithXUnionStruct {}
3514
3515#[derive(Clone, Debug, Default, PartialEq)]
3516pub struct CompatTableString {
3517    pub s: Option<String>,
3518    #[doc(hidden)]
3519    pub __source_breaking: fidl::marker::SourceBreaking,
3520}
3521
3522impl fidl::Persistable for CompatTableString {}
3523
3524#[derive(Clone, Debug, Default, PartialEq)]
3525pub struct CompatTableValue {
3526    pub union_member: Option<CompatUnion>,
3527    pub array_member: Option<[u32; 3]>,
3528    pub table_member: Option<CompatTableString>,
3529    pub xunion_member: Option<CompatXUnion>,
3530    #[doc(hidden)]
3531    pub __source_breaking: fidl::marker::SourceBreaking,
3532}
3533
3534impl fidl::Persistable for CompatTableValue {}
3535
3536#[derive(Clone, Debug, Default, PartialEq)]
3537pub struct EmptyTable {
3538    #[doc(hidden)]
3539    pub __source_breaking: fidl::marker::SourceBreaking,
3540}
3541
3542impl fidl::Persistable for EmptyTable {}
3543
3544#[derive(Clone, Debug, Default, PartialEq)]
3545pub struct FidlvizTable {
3546    pub f1: Option<bool>,
3547    pub f3: Option<bool>,
3548    #[doc(hidden)]
3549    pub __source_breaking: fidl::marker::SourceBreaking,
3550}
3551
3552impl fidl::Persistable for FidlvizTable {}
3553
3554#[derive(Clone, Debug, Default, PartialEq)]
3555pub struct GoldenTable {
3556    pub v: Option<i16>,
3557    #[doc(hidden)]
3558    pub __source_breaking: fidl::marker::SourceBreaking,
3559}
3560
3561impl fidl::Persistable for GoldenTable {}
3562
3563#[derive(Clone, Debug, Default, PartialEq)]
3564pub struct PaddedTable {
3565    pub field: Option<i8>,
3566    #[doc(hidden)]
3567    pub __source_breaking: fidl::marker::SourceBreaking,
3568}
3569
3570impl fidl::Persistable for PaddedTable {}
3571
3572#[derive(Clone, Debug, Default, PartialEq)]
3573pub struct RecursiveOptionalAndTable {
3574    pub recursive_optional: Option<RecursiveOptionalStruct>,
3575    #[doc(hidden)]
3576    pub __source_breaking: fidl::marker::SourceBreaking,
3577}
3578
3579impl fidl::Persistable for RecursiveOptionalAndTable {}
3580
3581#[derive(Clone, Debug, Default, PartialEq)]
3582pub struct RecursiveTable {
3583    pub s: Option<RecursiveTableOptionalHolder>,
3584    #[doc(hidden)]
3585    pub __source_breaking: fidl::marker::SourceBreaking,
3586}
3587
3588impl fidl::Persistable for RecursiveTable {}
3589
3590#[derive(Clone, Debug, Default, PartialEq)]
3591pub struct Regression10TableV1 {
3592    pub member1: Option<u64>,
3593    #[doc(hidden)]
3594    pub __source_breaking: fidl::marker::SourceBreaking,
3595}
3596
3597impl fidl::Persistable for Regression10TableV1 {}
3598
3599#[derive(Clone, Debug, Default, PartialEq)]
3600pub struct Regression10TableV2 {
3601    pub member1: Option<u64>,
3602    pub member2: Option<u64>,
3603    #[doc(hidden)]
3604    pub __source_breaking: fidl::marker::SourceBreaking,
3605}
3606
3607impl fidl::Persistable for Regression10TableV2 {}
3608
3609#[derive(Clone, Debug, Default, PartialEq)]
3610pub struct Regression10TableV3 {
3611    pub x: Option<i64>,
3612    pub y: Option<i64>,
3613    pub z: Option<i64>,
3614    #[doc(hidden)]
3615    pub __source_breaking: fidl::marker::SourceBreaking,
3616}
3617
3618impl fidl::Persistable for Regression10TableV3 {}
3619
3620#[derive(Clone, Debug, Default, PartialEq)]
3621pub struct ReverseOrdinalTable {
3622    pub z: Option<i64>,
3623    pub y: Option<i64>,
3624    pub x: Option<i64>,
3625    #[doc(hidden)]
3626    pub __source_breaking: fidl::marker::SourceBreaking,
3627}
3628
3629impl fidl::Persistable for ReverseOrdinalTable {}
3630
3631#[derive(Clone, Debug, Default, PartialEq)]
3632pub struct SimpleTable {
3633    pub x: Option<i64>,
3634    pub y: Option<i64>,
3635    #[doc(hidden)]
3636    pub __source_breaking: fidl::marker::SourceBreaking,
3637}
3638
3639impl fidl::Persistable for SimpleTable {}
3640
3641#[derive(Clone, Debug, Default, PartialEq)]
3642pub struct TableFieldInlined {
3643    pub f: Option<i32>,
3644    #[doc(hidden)]
3645    pub __source_breaking: fidl::marker::SourceBreaking,
3646}
3647
3648impl fidl::Persistable for TableFieldInlined {}
3649
3650#[derive(Clone, Debug, Default, PartialEq)]
3651pub struct TableFieldOutOfLine {
3652    pub f: Option<i64>,
3653    #[doc(hidden)]
3654    pub __source_breaking: fidl::marker::SourceBreaking,
3655}
3656
3657impl fidl::Persistable for TableFieldOutOfLine {}
3658
3659#[derive(Clone, Debug, Default, PartialEq)]
3660pub struct TableFieldUnknown {
3661    #[doc(hidden)]
3662    pub __source_breaking: fidl::marker::SourceBreaking,
3663}
3664
3665impl fidl::Persistable for TableFieldUnknown {}
3666
3667#[derive(Clone, Debug, Default, PartialEq)]
3668pub struct TableFieldUnsetFlexibleEnumInlined {
3669    pub signed_enum: Option<SignedEnum>,
3670    pub unsigned_enum: Option<UnsignedEnum>,
3671    pub always_set: Option<bool>,
3672    #[doc(hidden)]
3673    pub __source_breaking: fidl::marker::SourceBreaking,
3674}
3675
3676impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlined {}
3677
3678#[derive(Clone, Debug, Default, PartialEq)]
3679pub struct TableNoFields {
3680    #[doc(hidden)]
3681    pub __source_breaking: fidl::marker::SourceBreaking,
3682}
3683
3684impl fidl::Persistable for TableNoFields {}
3685
3686#[derive(Clone, Debug, Default, PartialEq)]
3687pub struct TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
3688    pub member: Option<UnionOfXUnionThenTableThenXUnionThenUnion>,
3689    #[doc(hidden)]
3690    pub __source_breaking: fidl::marker::SourceBreaking,
3691}
3692
3693impl fidl::Persistable for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {}
3694
3695#[derive(Clone, Debug, Default, PartialEq)]
3696pub struct TableOfXUnionThenUnion {
3697    pub member: Option<XUnionOfUnion>,
3698    #[doc(hidden)]
3699    pub __source_breaking: fidl::marker::SourceBreaking,
3700}
3701
3702impl fidl::Persistable for TableOfXUnionThenUnion {}
3703
3704#[derive(Clone, Debug, Default, PartialEq)]
3705pub struct TableStructWithReservedSandwich {
3706    pub s1: Option<StructSize3Align1>,
3707    pub s2: Option<StructSize3Align1>,
3708    #[doc(hidden)]
3709    pub __source_breaking: fidl::marker::SourceBreaking,
3710}
3711
3712impl fidl::Persistable for TableStructWithReservedSandwich {}
3713
3714#[derive(Clone, Debug, Default, PartialEq)]
3715pub struct TableStructWithUint32Sandwich {
3716    pub i: Option<u32>,
3717    pub s1: Option<StructSize3Align1>,
3718    pub s2: Option<StructSize3Align1>,
3719    pub i2: Option<u32>,
3720    #[doc(hidden)]
3721    pub __source_breaking: fidl::marker::SourceBreaking,
3722}
3723
3724impl fidl::Persistable for TableStructWithUint32Sandwich {}
3725
3726#[derive(Clone, Debug, Default, PartialEq)]
3727pub struct TableWithEmptyStruct {
3728    pub s: Option<EmptyStruct>,
3729    #[doc(hidden)]
3730    pub __source_breaking: fidl::marker::SourceBreaking,
3731}
3732
3733impl fidl::Persistable for TableWithEmptyStruct {}
3734
3735#[derive(Clone, Debug, Default, PartialEq)]
3736pub struct TableWithGaps {
3737    pub second: Option<i32>,
3738    pub fourth: Option<i32>,
3739    #[doc(hidden)]
3740    pub __source_breaking: fidl::marker::SourceBreaking,
3741}
3742
3743impl fidl::Persistable for TableWithGaps {}
3744
3745#[derive(Clone, Debug, Default, PartialEq)]
3746pub struct TableWithReservedFieldThenUnion {
3747    pub uv: Option<UnionSize8Align4>,
3748    #[doc(hidden)]
3749    pub __source_breaking: fidl::marker::SourceBreaking,
3750}
3751
3752impl fidl::Persistable for TableWithReservedFieldThenUnion {}
3753
3754#[derive(Clone, Debug, Default, PartialEq)]
3755pub struct TableWithStringAndVector {
3756    pub foo: Option<String>,
3757    pub bar: Option<i32>,
3758    pub baz: Option<Vec<u8>>,
3759    #[doc(hidden)]
3760    pub __source_breaking: fidl::marker::SourceBreaking,
3761}
3762
3763impl fidl::Persistable for TableWithStringAndVector {}
3764
3765#[derive(Clone, Debug, Default, PartialEq)]
3766pub struct TableWithStringWithLimit {
3767    pub s: Option<String>,
3768    #[doc(hidden)]
3769    pub __source_breaking: fidl::marker::SourceBreaking,
3770}
3771
3772impl fidl::Persistable for TableWithStringWithLimit {}
3773
3774#[derive(Clone, Debug, Default, PartialEq)]
3775pub struct TableWithUnionSize12Align4 {
3776    pub before: Option<u8>,
3777    pub member: Option<UnionSize12Align4>,
3778    pub after: Option<u8>,
3779    #[doc(hidden)]
3780    pub __source_breaking: fidl::marker::SourceBreaking,
3781}
3782
3783impl fidl::Persistable for TableWithUnionSize12Align4 {}
3784
3785#[derive(Clone, Debug, Default, PartialEq)]
3786pub struct TableWithVectorWithLimit {
3787    pub v: Option<Vec<u8>>,
3788    #[doc(hidden)]
3789    pub __source_breaking: fidl::marker::SourceBreaking,
3790}
3791
3792impl fidl::Persistable for TableWithVectorWithLimit {}
3793
3794#[derive(Clone, Debug, Default, PartialEq)]
3795pub struct TableWithXUnion {
3796    pub member: Option<CompatXUnion>,
3797    #[doc(hidden)]
3798    pub __source_breaking: fidl::marker::SourceBreaking,
3799}
3800
3801impl fidl::Persistable for TableWithXUnion {}
3802
3803#[derive(Clone, Debug, Default, PartialEq)]
3804pub struct TransformerSimpleTable {
3805    pub value: Option<u32>,
3806    #[doc(hidden)]
3807    pub __source_breaking: fidl::marker::SourceBreaking,
3808}
3809
3810impl fidl::Persistable for TransformerSimpleTable {}
3811
3812#[derive(Clone, Debug, Default, PartialEq)]
3813pub struct XUnionInTable {
3814    pub before: Option<String>,
3815    pub xu: Option<SampleXUnion>,
3816    pub after: Option<String>,
3817    #[doc(hidden)]
3818    pub __source_breaking: fidl::marker::SourceBreaking,
3819}
3820
3821impl fidl::Persistable for XUnionInTable {}
3822
3823#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3824pub enum CompatUnion {
3825    S(String),
3826    B(bool),
3827}
3828
3829impl CompatUnion {
3830    #[inline]
3831    pub fn ordinal(&self) -> u64 {
3832        match *self {
3833            Self::S(_) => 1,
3834            Self::B(_) => 2,
3835        }
3836    }
3837}
3838
3839impl fidl::Persistable for CompatUnion {}
3840
3841#[derive(Clone, Debug)]
3842pub enum CompatXUnion {
3843    S(String),
3844    B(bool),
3845    #[doc(hidden)]
3846    __SourceBreaking {
3847        unknown_ordinal: u64,
3848    },
3849}
3850
3851/// Pattern that matches an unknown `CompatXUnion` member.
3852#[macro_export]
3853macro_rules! CompatXUnionUnknown {
3854    () => {
3855        _
3856    };
3857}
3858
3859// Custom PartialEq so that unknown variants are not equal to themselves.
3860impl PartialEq for CompatXUnion {
3861    fn eq(&self, other: &Self) -> bool {
3862        match (self, other) {
3863            (Self::S(x), Self::S(y)) => *x == *y,
3864            (Self::B(x), Self::B(y)) => *x == *y,
3865            _ => false,
3866        }
3867    }
3868}
3869
3870impl CompatXUnion {
3871    #[inline]
3872    pub fn ordinal(&self) -> u64 {
3873        match *self {
3874            Self::S(_) => 1,
3875            Self::B(_) => 2,
3876            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3877        }
3878    }
3879
3880    #[inline]
3881    pub fn unknown_variant_for_testing() -> Self {
3882        Self::__SourceBreaking { unknown_ordinal: 0 }
3883    }
3884
3885    #[inline]
3886    pub fn is_unknown(&self) -> bool {
3887        match self {
3888            Self::__SourceBreaking { .. } => true,
3889            _ => false,
3890        }
3891    }
3892}
3893
3894impl fidl::Persistable for CompatXUnion {}
3895
3896#[derive(Clone, Debug)]
3897pub enum EmptyFlexibleUnion {
3898    #[doc(hidden)]
3899    __SourceBreaking { unknown_ordinal: u64 },
3900}
3901
3902/// Pattern that matches an unknown `EmptyFlexibleUnion` member.
3903#[macro_export]
3904macro_rules! EmptyFlexibleUnionUnknown {
3905    () => {
3906        _
3907    };
3908}
3909
3910// Custom PartialEq so that unknown variants are not equal to themselves.
3911impl PartialEq for EmptyFlexibleUnion {
3912    fn eq(&self, other: &Self) -> bool {
3913        match (self, other) {
3914            _ => false,
3915        }
3916    }
3917}
3918
3919impl EmptyFlexibleUnion {
3920    #[inline]
3921    pub fn ordinal(&self) -> u64 {
3922        match *self {
3923            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3924        }
3925    }
3926
3927    #[inline]
3928    pub fn unknown_variant_for_testing() -> Self {
3929        Self::__SourceBreaking { unknown_ordinal: 0 }
3930    }
3931
3932    #[inline]
3933    pub fn is_unknown(&self) -> bool {
3934        match self {
3935            Self::__SourceBreaking { .. } => true,
3936        }
3937    }
3938}
3939
3940impl fidl::Persistable for EmptyFlexibleUnion {}
3941
3942#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3943pub enum EmptyStructUnion {
3944    Unused(u8),
3945    Es(TransformerEmptyStruct),
3946}
3947
3948impl EmptyStructUnion {
3949    #[inline]
3950    pub fn ordinal(&self) -> u64 {
3951        match *self {
3952            Self::Unused(_) => 1,
3953            Self::Es(_) => 2,
3954        }
3955    }
3956}
3957
3958impl fidl::Persistable for EmptyStructUnion {}
3959
3960#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3961pub enum FidlvizUnion {
3962    F7(String),
3963}
3964
3965impl FidlvizUnion {
3966    #[inline]
3967    pub fn ordinal(&self) -> u64 {
3968        match *self {
3969            Self::F7(_) => 7,
3970        }
3971    }
3972}
3973
3974impl fidl::Persistable for FidlvizUnion {}
3975
3976#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3977pub enum GoldenUnion {
3978    V(i16),
3979}
3980
3981impl GoldenUnion {
3982    #[inline]
3983    pub fn ordinal(&self) -> u64 {
3984        match *self {
3985            Self::V(_) => 1,
3986        }
3987    }
3988}
3989
3990impl fidl::Persistable for GoldenUnion {}
3991
3992#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3993pub enum IpAddressConfig {
3994    PaddingSize24Align4([u32; 6]),
3995    Dhcp(bool),
3996}
3997
3998impl IpAddressConfig {
3999    #[inline]
4000    pub fn ordinal(&self) -> u64 {
4001        match *self {
4002            Self::PaddingSize24Align4(_) => 1,
4003            Self::Dhcp(_) => 2,
4004        }
4005    }
4006}
4007
4008impl fidl::Persistable for IpAddressConfig {}
4009
4010#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4011pub enum MutualRecursionUnion {
4012    S(MutualRecursionUnionStruct),
4013}
4014
4015impl MutualRecursionUnion {
4016    #[inline]
4017    pub fn ordinal(&self) -> u64 {
4018        match *self {
4019            Self::S(_) => 1,
4020        }
4021    }
4022}
4023
4024impl fidl::Persistable for MutualRecursionUnion {}
4025
4026#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4027pub enum PaddedUnion {
4028    Field(i8),
4029}
4030
4031impl PaddedUnion {
4032    #[inline]
4033    pub fn ordinal(&self) -> u64 {
4034        match *self {
4035            Self::Field(_) => 1,
4036        }
4037    }
4038}
4039
4040impl fidl::Persistable for PaddedUnion {}
4041
4042#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4043pub enum RecursiveOptionalAndUnion {
4044    RecursiveOptional(RecursiveOptionalStruct),
4045}
4046
4047impl RecursiveOptionalAndUnion {
4048    #[inline]
4049    pub fn ordinal(&self) -> u64 {
4050        match *self {
4051            Self::RecursiveOptional(_) => 1,
4052        }
4053    }
4054}
4055
4056impl fidl::Persistable for RecursiveOptionalAndUnion {}
4057
4058#[derive(Clone, Debug)]
4059pub enum RecursiveUnion {
4060    S(RecursiveUnionStruct),
4061    #[doc(hidden)]
4062    __SourceBreaking {
4063        unknown_ordinal: u64,
4064    },
4065}
4066
4067/// Pattern that matches an unknown `RecursiveUnion` member.
4068#[macro_export]
4069macro_rules! RecursiveUnionUnknown {
4070    () => {
4071        _
4072    };
4073}
4074
4075// Custom PartialEq so that unknown variants are not equal to themselves.
4076impl PartialEq for RecursiveUnion {
4077    fn eq(&self, other: &Self) -> bool {
4078        match (self, other) {
4079            (Self::S(x), Self::S(y)) => *x == *y,
4080            _ => false,
4081        }
4082    }
4083}
4084
4085impl RecursiveUnion {
4086    #[inline]
4087    pub fn ordinal(&self) -> u64 {
4088        match *self {
4089            Self::S(_) => 1,
4090            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4091        }
4092    }
4093
4094    #[inline]
4095    pub fn unknown_variant_for_testing() -> Self {
4096        Self::__SourceBreaking { unknown_ordinal: 0 }
4097    }
4098
4099    #[inline]
4100    pub fn is_unknown(&self) -> bool {
4101        match self {
4102            Self::__SourceBreaking { .. } => true,
4103            _ => false,
4104        }
4105    }
4106}
4107
4108impl fidl::Persistable for RecursiveUnion {}
4109
4110#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4111pub enum RecursiveVectorUnion {
4112    Vec(Vec<Option<Box<RecursiveVectorUnion>>>),
4113}
4114
4115impl RecursiveVectorUnion {
4116    #[inline]
4117    pub fn ordinal(&self) -> u64 {
4118        match *self {
4119            Self::Vec(_) => 1,
4120        }
4121    }
4122}
4123
4124impl fidl::Persistable for RecursiveVectorUnion {}
4125
4126#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4127pub enum Regression9Result {
4128    Ok(Regression9Value),
4129    Error(u32),
4130}
4131
4132impl Regression9Result {
4133    #[inline]
4134    pub fn ordinal(&self) -> u64 {
4135        match *self {
4136            Self::Ok(_) => 1,
4137            Self::Error(_) => 2,
4138        }
4139    }
4140}
4141
4142impl fidl::Persistable for Regression9Result {}
4143
4144#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4145pub enum ReverseOrdinalUnion {
4146    Z(u32),
4147    Y(bool),
4148    X(i64),
4149}
4150
4151impl ReverseOrdinalUnion {
4152    #[inline]
4153    pub fn ordinal(&self) -> u64 {
4154        match *self {
4155            Self::Z(_) => 1,
4156            Self::Y(_) => 2,
4157            Self::X(_) => 4,
4158        }
4159    }
4160}
4161
4162impl fidl::Persistable for ReverseOrdinalUnion {}
4163
4164#[derive(Clone, Debug, PartialEq)]
4165pub enum SampleStrictXUnion {
4166    U(u32),
4167    Su(SimpleUnion),
4168    St(SimpleTable),
4169}
4170
4171impl SampleStrictXUnion {
4172    #[inline]
4173    pub fn ordinal(&self) -> u64 {
4174        match *self {
4175            Self::U(_) => 1,
4176            Self::Su(_) => 2,
4177            Self::St(_) => 3,
4178        }
4179    }
4180}
4181
4182impl fidl::Persistable for SampleStrictXUnion {}
4183
4184#[derive(Clone, Debug)]
4185pub enum SampleXUnion {
4186    U(u32),
4187    Su(SimpleUnion),
4188    St(SimpleTable),
4189    #[doc(hidden)]
4190    __SourceBreaking {
4191        unknown_ordinal: u64,
4192    },
4193}
4194
4195/// Pattern that matches an unknown `SampleXUnion` member.
4196#[macro_export]
4197macro_rules! SampleXUnionUnknown {
4198    () => {
4199        _
4200    };
4201}
4202
4203// Custom PartialEq so that unknown variants are not equal to themselves.
4204impl PartialEq for SampleXUnion {
4205    fn eq(&self, other: &Self) -> bool {
4206        match (self, other) {
4207            (Self::U(x), Self::U(y)) => *x == *y,
4208            (Self::Su(x), Self::Su(y)) => *x == *y,
4209            (Self::St(x), Self::St(y)) => *x == *y,
4210            _ => false,
4211        }
4212    }
4213}
4214
4215impl SampleXUnion {
4216    #[inline]
4217    pub fn ordinal(&self) -> u64 {
4218        match *self {
4219            Self::U(_) => 1,
4220            Self::Su(_) => 2,
4221            Self::St(_) => 3,
4222            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4223        }
4224    }
4225
4226    #[inline]
4227    pub fn unknown_variant_for_testing() -> Self {
4228        Self::__SourceBreaking { unknown_ordinal: 0 }
4229    }
4230
4231    #[inline]
4232    pub fn is_unknown(&self) -> bool {
4233        match self {
4234            Self::__SourceBreaking { .. } => true,
4235            _ => false,
4236        }
4237    }
4238}
4239
4240impl fidl::Persistable for SampleXUnion {}
4241
4242#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4243pub enum SimpleUnion {
4244    I32(i32),
4245    I64(i64),
4246    S(Int64Struct),
4247    Str(String),
4248}
4249
4250impl SimpleUnion {
4251    #[inline]
4252    pub fn ordinal(&self) -> u64 {
4253        match *self {
4254            Self::I32(_) => 1,
4255            Self::I64(_) => 2,
4256            Self::S(_) => 3,
4257            Self::Str(_) => 4,
4258        }
4259    }
4260}
4261
4262impl fidl::Persistable for SimpleUnion {}
4263
4264#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4265pub enum SingleVariantUnion {
4266    X(u32),
4267}
4268
4269impl SingleVariantUnion {
4270    #[inline]
4271    pub fn ordinal(&self) -> u64 {
4272        match *self {
4273            Self::X(_) => 1,
4274        }
4275    }
4276}
4277
4278impl fidl::Persistable for SingleVariantUnion {}
4279
4280#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4281pub enum StringBoolUnion {
4282    S(String),
4283    B(bool),
4284}
4285
4286impl StringBoolUnion {
4287    #[inline]
4288    pub fn ordinal(&self) -> u64 {
4289        match *self {
4290            Self::S(_) => 1,
4291            Self::B(_) => 2,
4292        }
4293    }
4294}
4295
4296impl fidl::Persistable for StringBoolUnion {}
4297
4298#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4299pub enum StringUnion {
4300    Unused(u8),
4301    S(String),
4302    U8(u8),
4303}
4304
4305impl StringUnion {
4306    #[inline]
4307    pub fn ordinal(&self) -> u64 {
4308        match *self {
4309            Self::Unused(_) => 1,
4310            Self::S(_) => 2,
4311            Self::U8(_) => 3,
4312        }
4313    }
4314}
4315
4316impl fidl::Persistable for StringUnion {}
4317
4318#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4319pub enum Uint8Union {
4320    Uint8Value(u8),
4321    EmptyStruct(EmptyStruct),
4322}
4323
4324impl Uint8Union {
4325    #[inline]
4326    pub fn ordinal(&self) -> u64 {
4327        match *self {
4328            Self::Uint8Value(_) => 1,
4329            Self::EmptyStruct(_) => 2,
4330        }
4331    }
4332}
4333
4334impl fidl::Persistable for Uint8Union {}
4335
4336#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4337pub enum UnionAtTheBottom {
4338    Unused1(u8),
4339    Unused2(u8),
4340    Tiny(u8),
4341}
4342
4343impl UnionAtTheBottom {
4344    #[inline]
4345    pub fn ordinal(&self) -> u64 {
4346        match *self {
4347            Self::Unused1(_) => 1,
4348            Self::Unused2(_) => 2,
4349            Self::Tiny(_) => 3,
4350        }
4351    }
4352}
4353
4354impl fidl::Persistable for UnionAtTheBottom {}
4355
4356#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4357pub enum UnionInlinePadding {
4358    ThreePaddingBytes(u8),
4359    TwoPaddingBytes(u16),
4360    OnePaddingByte([u8; 3]),
4361}
4362
4363impl UnionInlinePadding {
4364    #[inline]
4365    pub fn ordinal(&self) -> u64 {
4366        match *self {
4367            Self::ThreePaddingBytes(_) => 1,
4368            Self::TwoPaddingBytes(_) => 2,
4369            Self::OnePaddingByte(_) => 3,
4370        }
4371    }
4372}
4373
4374impl fidl::Persistable for UnionInlinePadding {}
4375
4376#[derive(Clone, Debug, PartialEq)]
4377pub enum UnionOfTable {
4378    T(SimpleTable),
4379}
4380
4381impl UnionOfTable {
4382    #[inline]
4383    pub fn ordinal(&self) -> u64 {
4384        match *self {
4385            Self::T(_) => 1,
4386        }
4387    }
4388}
4389
4390impl fidl::Persistable for UnionOfTable {}
4391
4392#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4393pub enum UnionOfUnion {
4394    Unused1(u8),
4395    Size8align4(UnionSize8Align4),
4396    Size12align4(UnionSize12Align4),
4397    Unused2(u8),
4398    Size24align8(UnionSize24Align8),
4399}
4400
4401impl UnionOfUnion {
4402    #[inline]
4403    pub fn ordinal(&self) -> u64 {
4404        match *self {
4405            Self::Unused1(_) => 1,
4406            Self::Size8align4(_) => 2,
4407            Self::Size12align4(_) => 3,
4408            Self::Unused2(_) => 4,
4409            Self::Size24align8(_) => 5,
4410        }
4411    }
4412}
4413
4414impl fidl::Persistable for UnionOfUnion {}
4415
4416#[derive(Clone, Debug, PartialEq)]
4417pub enum UnionOfXUnionThenTableThenXUnionThenUnion {
4418    Unused1(u8),
4419    Variant(XUnionOfTableThenXUnionThenUnion),
4420}
4421
4422impl UnionOfXUnionThenTableThenXUnionThenUnion {
4423    #[inline]
4424    pub fn ordinal(&self) -> u64 {
4425        match *self {
4426            Self::Unused1(_) => 1,
4427            Self::Variant(_) => 3,
4428        }
4429    }
4430}
4431
4432impl fidl::Persistable for UnionOfXUnionThenTableThenXUnionThenUnion {}
4433
4434#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4435pub enum UnionSize12Align4 {
4436    Unused1(u8),
4437    Unused2(u8),
4438    Unused3(u8),
4439    Variant([u8; 6]),
4440}
4441
4442impl UnionSize12Align4 {
4443    #[inline]
4444    pub fn ordinal(&self) -> u64 {
4445        match *self {
4446            Self::Unused1(_) => 1,
4447            Self::Unused2(_) => 2,
4448            Self::Unused3(_) => 3,
4449            Self::Variant(_) => 4,
4450        }
4451    }
4452}
4453
4454impl fidl::Persistable for UnionSize12Align4 {}
4455
4456#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4457pub enum UnionSize24Align8 {
4458    Unused1(u8),
4459    Unused2(u8),
4460    Unused3(u8),
4461    Variant(StructSize16Align8),
4462}
4463
4464impl UnionSize24Align8 {
4465    #[inline]
4466    pub fn ordinal(&self) -> u64 {
4467        match *self {
4468            Self::Unused1(_) => 1,
4469            Self::Unused2(_) => 2,
4470            Self::Unused3(_) => 3,
4471            Self::Variant(_) => 4,
4472        }
4473    }
4474}
4475
4476impl fidl::Persistable for UnionSize24Align8 {}
4477
4478#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4479pub enum UnionSize36Align4 {
4480    Unused1(u8),
4481    Unused2(u8),
4482    Unused3(u8),
4483    Variant([u8; 32]),
4484}
4485
4486impl UnionSize36Align4 {
4487    #[inline]
4488    pub fn ordinal(&self) -> u64 {
4489        match *self {
4490            Self::Unused1(_) => 1,
4491            Self::Unused2(_) => 2,
4492            Self::Unused3(_) => 3,
4493            Self::Variant(_) => 4,
4494        }
4495    }
4496}
4497
4498impl fidl::Persistable for UnionSize36Align4 {}
4499
4500#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4501pub enum UnionSize8Align4 {
4502    Unused1(u8),
4503    Unused2(u8),
4504    Variant(u32),
4505}
4506
4507impl UnionSize8Align4 {
4508    #[inline]
4509    pub fn ordinal(&self) -> u64 {
4510        match *self {
4511            Self::Unused1(_) => 1,
4512            Self::Unused2(_) => 2,
4513            Self::Variant(_) => 3,
4514        }
4515    }
4516}
4517
4518impl fidl::Persistable for UnionSize8Align4 {}
4519
4520#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4521pub enum UnionWithBoundString {
4522    BoundFiveStr(String),
4523}
4524
4525impl UnionWithBoundString {
4526    #[inline]
4527    pub fn ordinal(&self) -> u64 {
4528        match *self {
4529            Self::BoundFiveStr(_) => 1,
4530        }
4531    }
4532}
4533
4534impl fidl::Persistable for UnionWithBoundString {}
4535
4536#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4537pub enum UnionWithEmptyStruct {
4538    S(EmptyStruct),
4539    ForceAlignmentOf8(u64),
4540}
4541
4542impl UnionWithEmptyStruct {
4543    #[inline]
4544    pub fn ordinal(&self) -> u64 {
4545        match *self {
4546            Self::S(_) => 1,
4547            Self::ForceAlignmentOf8(_) => 2,
4548        }
4549    }
4550}
4551
4552impl fidl::Persistable for UnionWithEmptyStruct {}
4553
4554#[derive(Clone, Debug, PartialEq)]
4555pub enum UnionWithRegression10Table {
4556    Unused(u8),
4557    AtV2(Regression10TableV2),
4558}
4559
4560impl UnionWithRegression10Table {
4561    #[inline]
4562    pub fn ordinal(&self) -> u64 {
4563        match *self {
4564            Self::Unused(_) => 1,
4565            Self::AtV2(_) => 3,
4566        }
4567    }
4568}
4569
4570impl fidl::Persistable for UnionWithRegression10Table {}
4571
4572#[derive(Clone, Debug)]
4573pub enum UnionWithStringWithLimit {
4574    S(String),
4575    #[doc(hidden)]
4576    __SourceBreaking {
4577        unknown_ordinal: u64,
4578    },
4579}
4580
4581/// Pattern that matches an unknown `UnionWithStringWithLimit` member.
4582#[macro_export]
4583macro_rules! UnionWithStringWithLimitUnknown {
4584    () => {
4585        _
4586    };
4587}
4588
4589// Custom PartialEq so that unknown variants are not equal to themselves.
4590impl PartialEq for UnionWithStringWithLimit {
4591    fn eq(&self, other: &Self) -> bool {
4592        match (self, other) {
4593            (Self::S(x), Self::S(y)) => *x == *y,
4594            _ => false,
4595        }
4596    }
4597}
4598
4599impl UnionWithStringWithLimit {
4600    #[inline]
4601    pub fn ordinal(&self) -> u64 {
4602        match *self {
4603            Self::S(_) => 1,
4604            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4605        }
4606    }
4607
4608    #[inline]
4609    pub fn unknown_variant_for_testing() -> Self {
4610        Self::__SourceBreaking { unknown_ordinal: 0 }
4611    }
4612
4613    #[inline]
4614    pub fn is_unknown(&self) -> bool {
4615        match self {
4616            Self::__SourceBreaking { .. } => true,
4617            _ => false,
4618        }
4619    }
4620}
4621
4622impl fidl::Persistable for UnionWithStringWithLimit {}
4623
4624#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4625pub enum UnionWithVectorOfVectors {
4626    V(Vec<Vec<Option<Box<StructSize3Align1>>>>),
4627}
4628
4629impl UnionWithVectorOfVectors {
4630    #[inline]
4631    pub fn ordinal(&self) -> u64 {
4632        match *self {
4633            Self::V(_) => 1,
4634        }
4635    }
4636}
4637
4638impl fidl::Persistable for UnionWithVectorOfVectors {}
4639
4640#[derive(Clone, Debug)]
4641pub enum UnionWithVectorWithLimit {
4642    V(Vec<u8>),
4643    #[doc(hidden)]
4644    __SourceBreaking {
4645        unknown_ordinal: u64,
4646    },
4647}
4648
4649/// Pattern that matches an unknown `UnionWithVectorWithLimit` member.
4650#[macro_export]
4651macro_rules! UnionWithVectorWithLimitUnknown {
4652    () => {
4653        _
4654    };
4655}
4656
4657// Custom PartialEq so that unknown variants are not equal to themselves.
4658impl PartialEq for UnionWithVectorWithLimit {
4659    fn eq(&self, other: &Self) -> bool {
4660        match (self, other) {
4661            (Self::V(x), Self::V(y)) => *x == *y,
4662            _ => false,
4663        }
4664    }
4665}
4666
4667impl UnionWithVectorWithLimit {
4668    #[inline]
4669    pub fn ordinal(&self) -> u64 {
4670        match *self {
4671            Self::V(_) => 1,
4672            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4673        }
4674    }
4675
4676    #[inline]
4677    pub fn unknown_variant_for_testing() -> Self {
4678        Self::__SourceBreaking { unknown_ordinal: 0 }
4679    }
4680
4681    #[inline]
4682    pub fn is_unknown(&self) -> bool {
4683        match self {
4684            Self::__SourceBreaking { .. } => true,
4685            _ => false,
4686        }
4687    }
4688}
4689
4690impl fidl::Persistable for UnionWithVectorWithLimit {}
4691
4692#[derive(Clone, Debug)]
4693pub enum XUnionOfTableThenXUnionThenUnion {
4694    Variant(TableOfXUnionThenUnion),
4695    #[doc(hidden)]
4696    __SourceBreaking {
4697        unknown_ordinal: u64,
4698    },
4699}
4700
4701/// Pattern that matches an unknown `XUnionOfTableThenXUnionThenUnion` member.
4702#[macro_export]
4703macro_rules! XUnionOfTableThenXUnionThenUnionUnknown {
4704    () => {
4705        _
4706    };
4707}
4708
4709// Custom PartialEq so that unknown variants are not equal to themselves.
4710impl PartialEq for XUnionOfTableThenXUnionThenUnion {
4711    fn eq(&self, other: &Self) -> bool {
4712        match (self, other) {
4713            (Self::Variant(x), Self::Variant(y)) => *x == *y,
4714            _ => false,
4715        }
4716    }
4717}
4718
4719impl XUnionOfTableThenXUnionThenUnion {
4720    #[inline]
4721    pub fn ordinal(&self) -> u64 {
4722        match *self {
4723            Self::Variant(_) => 1,
4724            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4725        }
4726    }
4727
4728    #[inline]
4729    pub fn unknown_variant_for_testing() -> Self {
4730        Self::__SourceBreaking { unknown_ordinal: 0 }
4731    }
4732
4733    #[inline]
4734    pub fn is_unknown(&self) -> bool {
4735        match self {
4736            Self::__SourceBreaking { .. } => true,
4737            _ => false,
4738        }
4739    }
4740}
4741
4742impl fidl::Persistable for XUnionOfTableThenXUnionThenUnion {}
4743
4744#[derive(Clone, Debug)]
4745pub enum XUnionOfUnion {
4746    Variant(UnionAtTheBottom),
4747    #[doc(hidden)]
4748    __SourceBreaking {
4749        unknown_ordinal: u64,
4750    },
4751}
4752
4753/// Pattern that matches an unknown `XUnionOfUnion` member.
4754#[macro_export]
4755macro_rules! XUnionOfUnionUnknown {
4756    () => {
4757        _
4758    };
4759}
4760
4761// Custom PartialEq so that unknown variants are not equal to themselves.
4762impl PartialEq for XUnionOfUnion {
4763    fn eq(&self, other: &Self) -> bool {
4764        match (self, other) {
4765            (Self::Variant(x), Self::Variant(y)) => *x == *y,
4766            _ => false,
4767        }
4768    }
4769}
4770
4771impl XUnionOfUnion {
4772    #[inline]
4773    pub fn ordinal(&self) -> u64 {
4774        match *self {
4775            Self::Variant(_) => 1,
4776            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4777        }
4778    }
4779
4780    #[inline]
4781    pub fn unknown_variant_for_testing() -> Self {
4782        Self::__SourceBreaking { unknown_ordinal: 0 }
4783    }
4784
4785    #[inline]
4786    pub fn is_unknown(&self) -> bool {
4787        match self {
4788            Self::__SourceBreaking { .. } => true,
4789            _ => false,
4790        }
4791    }
4792}
4793
4794impl fidl::Persistable for XUnionOfUnion {}
4795
4796#[derive(Clone, Debug)]
4797pub enum XUnionWithEmptyStruct {
4798    S(EmptyStruct),
4799    #[doc(hidden)]
4800    __SourceBreaking {
4801        unknown_ordinal: u64,
4802    },
4803}
4804
4805/// Pattern that matches an unknown `XUnionWithEmptyStruct` member.
4806#[macro_export]
4807macro_rules! XUnionWithEmptyStructUnknown {
4808    () => {
4809        _
4810    };
4811}
4812
4813// Custom PartialEq so that unknown variants are not equal to themselves.
4814impl PartialEq for XUnionWithEmptyStruct {
4815    fn eq(&self, other: &Self) -> bool {
4816        match (self, other) {
4817            (Self::S(x), Self::S(y)) => *x == *y,
4818            _ => false,
4819        }
4820    }
4821}
4822
4823impl XUnionWithEmptyStruct {
4824    #[inline]
4825    pub fn ordinal(&self) -> u64 {
4826        match *self {
4827            Self::S(_) => 1,
4828            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4829        }
4830    }
4831
4832    #[inline]
4833    pub fn unknown_variant_for_testing() -> Self {
4834        Self::__SourceBreaking { unknown_ordinal: 0 }
4835    }
4836
4837    #[inline]
4838    pub fn is_unknown(&self) -> bool {
4839        match self {
4840            Self::__SourceBreaking { .. } => true,
4841            _ => false,
4842        }
4843    }
4844}
4845
4846impl fidl::Persistable for XUnionWithEmptyStruct {}
4847
4848#[derive(Clone, Debug)]
4849pub enum XUnionWithStruct {
4850    S(StructSize3Align1),
4851    #[doc(hidden)]
4852    __SourceBreaking {
4853        unknown_ordinal: u64,
4854    },
4855}
4856
4857/// Pattern that matches an unknown `XUnionWithStruct` member.
4858#[macro_export]
4859macro_rules! XUnionWithStructUnknown {
4860    () => {
4861        _
4862    };
4863}
4864
4865// Custom PartialEq so that unknown variants are not equal to themselves.
4866impl PartialEq for XUnionWithStruct {
4867    fn eq(&self, other: &Self) -> bool {
4868        match (self, other) {
4869            (Self::S(x), Self::S(y)) => *x == *y,
4870            _ => false,
4871        }
4872    }
4873}
4874
4875impl XUnionWithStruct {
4876    #[inline]
4877    pub fn ordinal(&self) -> u64 {
4878        match *self {
4879            Self::S(_) => 1,
4880            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4881        }
4882    }
4883
4884    #[inline]
4885    pub fn unknown_variant_for_testing() -> Self {
4886        Self::__SourceBreaking { unknown_ordinal: 0 }
4887    }
4888
4889    #[inline]
4890    pub fn is_unknown(&self) -> bool {
4891        match self {
4892            Self::__SourceBreaking { .. } => true,
4893            _ => false,
4894        }
4895    }
4896}
4897
4898impl fidl::Persistable for XUnionWithStruct {}
4899
4900#[derive(Clone, Debug)]
4901pub enum XUnionWithUnions {
4902    U1(UnionSize8Align4),
4903    U2(UnionSize12Align4),
4904    #[doc(hidden)]
4905    __SourceBreaking {
4906        unknown_ordinal: u64,
4907    },
4908}
4909
4910/// Pattern that matches an unknown `XUnionWithUnions` member.
4911#[macro_export]
4912macro_rules! XUnionWithUnionsUnknown {
4913    () => {
4914        _
4915    };
4916}
4917
4918// Custom PartialEq so that unknown variants are not equal to themselves.
4919impl PartialEq for XUnionWithUnions {
4920    fn eq(&self, other: &Self) -> bool {
4921        match (self, other) {
4922            (Self::U1(x), Self::U1(y)) => *x == *y,
4923            (Self::U2(x), Self::U2(y)) => *x == *y,
4924            _ => false,
4925        }
4926    }
4927}
4928
4929impl XUnionWithUnions {
4930    #[inline]
4931    pub fn ordinal(&self) -> u64 {
4932        match *self {
4933            Self::U1(_) => 1,
4934            Self::U2(_) => 2,
4935            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4936        }
4937    }
4938
4939    #[inline]
4940    pub fn unknown_variant_for_testing() -> Self {
4941        Self::__SourceBreaking { unknown_ordinal: 0 }
4942    }
4943
4944    #[inline]
4945    pub fn is_unknown(&self) -> bool {
4946        match self {
4947            Self::__SourceBreaking { .. } => true,
4948            _ => false,
4949        }
4950    }
4951}
4952
4953impl fidl::Persistable for XUnionWithUnions {}
4954
4955#[derive(Clone, Debug)]
4956pub enum XUnionWithXUnion {
4957    Xu(XUnionWithStruct),
4958    #[doc(hidden)]
4959    __SourceBreaking {
4960        unknown_ordinal: u64,
4961    },
4962}
4963
4964/// Pattern that matches an unknown `XUnionWithXUnion` member.
4965#[macro_export]
4966macro_rules! XUnionWithXUnionUnknown {
4967    () => {
4968        _
4969    };
4970}
4971
4972// Custom PartialEq so that unknown variants are not equal to themselves.
4973impl PartialEq for XUnionWithXUnion {
4974    fn eq(&self, other: &Self) -> bool {
4975        match (self, other) {
4976            (Self::Xu(x), Self::Xu(y)) => *x == *y,
4977            _ => false,
4978        }
4979    }
4980}
4981
4982impl XUnionWithXUnion {
4983    #[inline]
4984    pub fn ordinal(&self) -> u64 {
4985        match *self {
4986            Self::Xu(_) => 1,
4987            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4988        }
4989    }
4990
4991    #[inline]
4992    pub fn unknown_variant_for_testing() -> Self {
4993        Self::__SourceBreaking { unknown_ordinal: 0 }
4994    }
4995
4996    #[inline]
4997    pub fn is_unknown(&self) -> bool {
4998        match self {
4999            Self::__SourceBreaking { .. } => true,
5000            _ => false,
5001        }
5002    }
5003}
5004
5005impl fidl::Persistable for XUnionWithXUnion {}
5006
5007pub mod component_controller_ordinals {}
5008
5009pub mod protocol_ordinals {}
5010
5011mod internal {
5012    use super::*;
5013    unsafe impl fidl::encoding::TypeMarker for BitsUint32 {
5014        type Owned = Self;
5015
5016        #[inline(always)]
5017        fn inline_align(_context: fidl::encoding::Context) -> usize {
5018            4
5019        }
5020
5021        #[inline(always)]
5022        fn inline_size(_context: fidl::encoding::Context) -> usize {
5023            4
5024        }
5025    }
5026
5027    impl fidl::encoding::ValueTypeMarker for BitsUint32 {
5028        type Borrowed<'a> = Self;
5029        #[inline(always)]
5030        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5031            *value
5032        }
5033    }
5034
5035    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint32 {
5036        #[inline]
5037        unsafe fn encode(
5038            self,
5039            encoder: &mut fidl::encoding::Encoder<'_, D>,
5040            offset: usize,
5041            _depth: fidl::encoding::Depth,
5042        ) -> fidl::Result<()> {
5043            encoder.debug_check_bounds::<Self>(offset);
5044            if self.bits() & Self::all().bits() != self.bits() {
5045                return Err(fidl::Error::InvalidBitsValue);
5046            }
5047            encoder.write_num(self.bits(), offset);
5048            Ok(())
5049        }
5050    }
5051
5052    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint32 {
5053        #[inline(always)]
5054        fn new_empty() -> Self {
5055            Self::empty()
5056        }
5057
5058        #[inline]
5059        unsafe fn decode(
5060            &mut self,
5061            decoder: &mut fidl::encoding::Decoder<'_, D>,
5062            offset: usize,
5063            _depth: fidl::encoding::Depth,
5064        ) -> fidl::Result<()> {
5065            decoder.debug_check_bounds::<Self>(offset);
5066            let prim = decoder.read_num::<u32>(offset);
5067            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5068            Ok(())
5069        }
5070    }
5071    unsafe impl fidl::encoding::TypeMarker for BitsUint8 {
5072        type Owned = Self;
5073
5074        #[inline(always)]
5075        fn inline_align(_context: fidl::encoding::Context) -> usize {
5076            1
5077        }
5078
5079        #[inline(always)]
5080        fn inline_size(_context: fidl::encoding::Context) -> usize {
5081            1
5082        }
5083    }
5084
5085    impl fidl::encoding::ValueTypeMarker for BitsUint8 {
5086        type Borrowed<'a> = Self;
5087        #[inline(always)]
5088        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5089            *value
5090        }
5091    }
5092
5093    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint8 {
5094        #[inline]
5095        unsafe fn encode(
5096            self,
5097            encoder: &mut fidl::encoding::Encoder<'_, D>,
5098            offset: usize,
5099            _depth: fidl::encoding::Depth,
5100        ) -> fidl::Result<()> {
5101            encoder.debug_check_bounds::<Self>(offset);
5102            if self.bits() & Self::all().bits() != self.bits() {
5103                return Err(fidl::Error::InvalidBitsValue);
5104            }
5105            encoder.write_num(self.bits(), offset);
5106            Ok(())
5107        }
5108    }
5109
5110    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint8 {
5111        #[inline(always)]
5112        fn new_empty() -> Self {
5113            Self::empty()
5114        }
5115
5116        #[inline]
5117        unsafe fn decode(
5118            &mut self,
5119            decoder: &mut fidl::encoding::Decoder<'_, D>,
5120            offset: usize,
5121            _depth: fidl::encoding::Depth,
5122        ) -> fidl::Result<()> {
5123            decoder.debug_check_bounds::<Self>(offset);
5124            let prim = decoder.read_num::<u8>(offset);
5125            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5126            Ok(())
5127        }
5128    }
5129    unsafe impl fidl::encoding::TypeMarker for EmptyBits {
5130        type Owned = Self;
5131
5132        #[inline(always)]
5133        fn inline_align(_context: fidl::encoding::Context) -> usize {
5134            4
5135        }
5136
5137        #[inline(always)]
5138        fn inline_size(_context: fidl::encoding::Context) -> usize {
5139            4
5140        }
5141    }
5142
5143    impl fidl::encoding::ValueTypeMarker for EmptyBits {
5144        type Borrowed<'a> = Self;
5145        #[inline(always)]
5146        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5147            *value
5148        }
5149    }
5150
5151    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyBits {
5152        #[inline]
5153        unsafe fn encode(
5154            self,
5155            encoder: &mut fidl::encoding::Encoder<'_, D>,
5156            offset: usize,
5157            _depth: fidl::encoding::Depth,
5158        ) -> fidl::Result<()> {
5159            encoder.debug_check_bounds::<Self>(offset);
5160            encoder.write_num(self.bits(), offset);
5161            Ok(())
5162        }
5163    }
5164
5165    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBits {
5166        #[inline(always)]
5167        fn new_empty() -> Self {
5168            Self::empty()
5169        }
5170
5171        #[inline]
5172        unsafe fn decode(
5173            &mut self,
5174            decoder: &mut fidl::encoding::Decoder<'_, D>,
5175            offset: usize,
5176            _depth: fidl::encoding::Depth,
5177        ) -> fidl::Result<()> {
5178            decoder.debug_check_bounds::<Self>(offset);
5179            let prim = decoder.read_num::<u32>(offset);
5180            *self = Self::from_bits_allow_unknown(prim);
5181            Ok(())
5182        }
5183    }
5184    unsafe impl fidl::encoding::TypeMarker for FidlvizBits {
5185        type Owned = Self;
5186
5187        #[inline(always)]
5188        fn inline_align(_context: fidl::encoding::Context) -> usize {
5189            1
5190        }
5191
5192        #[inline(always)]
5193        fn inline_size(_context: fidl::encoding::Context) -> usize {
5194            1
5195        }
5196    }
5197
5198    impl fidl::encoding::ValueTypeMarker for FidlvizBits {
5199        type Borrowed<'a> = Self;
5200        #[inline(always)]
5201        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5202            *value
5203        }
5204    }
5205
5206    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizBits {
5207        #[inline]
5208        unsafe fn encode(
5209            self,
5210            encoder: &mut fidl::encoding::Encoder<'_, D>,
5211            offset: usize,
5212            _depth: fidl::encoding::Depth,
5213        ) -> fidl::Result<()> {
5214            encoder.debug_check_bounds::<Self>(offset);
5215            if self.bits() & Self::all().bits() != self.bits() {
5216                return Err(fidl::Error::InvalidBitsValue);
5217            }
5218            encoder.write_num(self.bits(), offset);
5219            Ok(())
5220        }
5221    }
5222
5223    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizBits {
5224        #[inline(always)]
5225        fn new_empty() -> Self {
5226            Self::empty()
5227        }
5228
5229        #[inline]
5230        unsafe fn decode(
5231            &mut self,
5232            decoder: &mut fidl::encoding::Decoder<'_, D>,
5233            offset: usize,
5234            _depth: fidl::encoding::Depth,
5235        ) -> fidl::Result<()> {
5236            decoder.debug_check_bounds::<Self>(offset);
5237            let prim = decoder.read_num::<u8>(offset);
5238            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5239            Ok(())
5240        }
5241    }
5242    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16 {
5243        type Owned = Self;
5244
5245        #[inline(always)]
5246        fn inline_align(_context: fidl::encoding::Context) -> usize {
5247            2
5248        }
5249
5250        #[inline(always)]
5251        fn inline_size(_context: fidl::encoding::Context) -> usize {
5252            2
5253        }
5254    }
5255
5256    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16 {
5257        type Borrowed<'a> = Self;
5258        #[inline(always)]
5259        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5260            *value
5261        }
5262    }
5263
5264    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5265        for FlexibleBitsUint16
5266    {
5267        #[inline]
5268        unsafe fn encode(
5269            self,
5270            encoder: &mut fidl::encoding::Encoder<'_, D>,
5271            offset: usize,
5272            _depth: fidl::encoding::Depth,
5273        ) -> fidl::Result<()> {
5274            encoder.debug_check_bounds::<Self>(offset);
5275            encoder.write_num(self.bits(), offset);
5276            Ok(())
5277        }
5278    }
5279
5280    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint16 {
5281        #[inline(always)]
5282        fn new_empty() -> Self {
5283            Self::empty()
5284        }
5285
5286        #[inline]
5287        unsafe fn decode(
5288            &mut self,
5289            decoder: &mut fidl::encoding::Decoder<'_, D>,
5290            offset: usize,
5291            _depth: fidl::encoding::Depth,
5292        ) -> fidl::Result<()> {
5293            decoder.debug_check_bounds::<Self>(offset);
5294            let prim = decoder.read_num::<u16>(offset);
5295            *self = Self::from_bits_allow_unknown(prim);
5296            Ok(())
5297        }
5298    }
5299    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32 {
5300        type Owned = Self;
5301
5302        #[inline(always)]
5303        fn inline_align(_context: fidl::encoding::Context) -> usize {
5304            4
5305        }
5306
5307        #[inline(always)]
5308        fn inline_size(_context: fidl::encoding::Context) -> usize {
5309            4
5310        }
5311    }
5312
5313    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32 {
5314        type Borrowed<'a> = Self;
5315        #[inline(always)]
5316        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5317            *value
5318        }
5319    }
5320
5321    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5322        for FlexibleBitsUint32
5323    {
5324        #[inline]
5325        unsafe fn encode(
5326            self,
5327            encoder: &mut fidl::encoding::Encoder<'_, D>,
5328            offset: usize,
5329            _depth: fidl::encoding::Depth,
5330        ) -> fidl::Result<()> {
5331            encoder.debug_check_bounds::<Self>(offset);
5332            encoder.write_num(self.bits(), offset);
5333            Ok(())
5334        }
5335    }
5336
5337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint32 {
5338        #[inline(always)]
5339        fn new_empty() -> Self {
5340            Self::empty()
5341        }
5342
5343        #[inline]
5344        unsafe fn decode(
5345            &mut self,
5346            decoder: &mut fidl::encoding::Decoder<'_, D>,
5347            offset: usize,
5348            _depth: fidl::encoding::Depth,
5349        ) -> fidl::Result<()> {
5350            decoder.debug_check_bounds::<Self>(offset);
5351            let prim = decoder.read_num::<u32>(offset);
5352            *self = Self::from_bits_allow_unknown(prim);
5353            Ok(())
5354        }
5355    }
5356    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64 {
5357        type Owned = Self;
5358
5359        #[inline(always)]
5360        fn inline_align(_context: fidl::encoding::Context) -> usize {
5361            8
5362        }
5363
5364        #[inline(always)]
5365        fn inline_size(_context: fidl::encoding::Context) -> usize {
5366            8
5367        }
5368    }
5369
5370    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64 {
5371        type Borrowed<'a> = Self;
5372        #[inline(always)]
5373        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5374            *value
5375        }
5376    }
5377
5378    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5379        for FlexibleBitsUint64
5380    {
5381        #[inline]
5382        unsafe fn encode(
5383            self,
5384            encoder: &mut fidl::encoding::Encoder<'_, D>,
5385            offset: usize,
5386            _depth: fidl::encoding::Depth,
5387        ) -> fidl::Result<()> {
5388            encoder.debug_check_bounds::<Self>(offset);
5389            encoder.write_num(self.bits(), offset);
5390            Ok(())
5391        }
5392    }
5393
5394    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint64 {
5395        #[inline(always)]
5396        fn new_empty() -> Self {
5397            Self::empty()
5398        }
5399
5400        #[inline]
5401        unsafe fn decode(
5402            &mut self,
5403            decoder: &mut fidl::encoding::Decoder<'_, D>,
5404            offset: usize,
5405            _depth: fidl::encoding::Depth,
5406        ) -> fidl::Result<()> {
5407            decoder.debug_check_bounds::<Self>(offset);
5408            let prim = decoder.read_num::<u64>(offset);
5409            *self = Self::from_bits_allow_unknown(prim);
5410            Ok(())
5411        }
5412    }
5413    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8 {
5414        type Owned = Self;
5415
5416        #[inline(always)]
5417        fn inline_align(_context: fidl::encoding::Context) -> usize {
5418            1
5419        }
5420
5421        #[inline(always)]
5422        fn inline_size(_context: fidl::encoding::Context) -> usize {
5423            1
5424        }
5425    }
5426
5427    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8 {
5428        type Borrowed<'a> = Self;
5429        #[inline(always)]
5430        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5431            *value
5432        }
5433    }
5434
5435    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5436        for FlexibleBitsUint8
5437    {
5438        #[inline]
5439        unsafe fn encode(
5440            self,
5441            encoder: &mut fidl::encoding::Encoder<'_, D>,
5442            offset: usize,
5443            _depth: fidl::encoding::Depth,
5444        ) -> fidl::Result<()> {
5445            encoder.debug_check_bounds::<Self>(offset);
5446            encoder.write_num(self.bits(), offset);
5447            Ok(())
5448        }
5449    }
5450
5451    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint8 {
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::<u8>(offset);
5466            *self = Self::from_bits_allow_unknown(prim);
5467            Ok(())
5468        }
5469    }
5470    unsafe impl fidl::encoding::TypeMarker for GoldenBits {
5471        type Owned = Self;
5472
5473        #[inline(always)]
5474        fn inline_align(_context: fidl::encoding::Context) -> usize {
5475            2
5476        }
5477
5478        #[inline(always)]
5479        fn inline_size(_context: fidl::encoding::Context) -> usize {
5480            2
5481        }
5482    }
5483
5484    impl fidl::encoding::ValueTypeMarker for GoldenBits {
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> for GoldenBits {
5493        #[inline]
5494        unsafe fn encode(
5495            self,
5496            encoder: &mut fidl::encoding::Encoder<'_, D>,
5497            offset: usize,
5498            _depth: fidl::encoding::Depth,
5499        ) -> fidl::Result<()> {
5500            encoder.debug_check_bounds::<Self>(offset);
5501            if self.bits() & Self::all().bits() != self.bits() {
5502                return Err(fidl::Error::InvalidBitsValue);
5503            }
5504            encoder.write_num(self.bits(), offset);
5505            Ok(())
5506        }
5507    }
5508
5509    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBits {
5510        #[inline(always)]
5511        fn new_empty() -> Self {
5512            Self::empty()
5513        }
5514
5515        #[inline]
5516        unsafe fn decode(
5517            &mut self,
5518            decoder: &mut fidl::encoding::Decoder<'_, D>,
5519            offset: usize,
5520            _depth: fidl::encoding::Depth,
5521        ) -> fidl::Result<()> {
5522            decoder.debug_check_bounds::<Self>(offset);
5523            let prim = decoder.read_num::<u16>(offset);
5524            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5525            Ok(())
5526        }
5527    }
5528    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16 {
5529        type Owned = Self;
5530
5531        #[inline(always)]
5532        fn inline_align(_context: fidl::encoding::Context) -> usize {
5533            2
5534        }
5535
5536        #[inline(always)]
5537        fn inline_size(_context: fidl::encoding::Context) -> usize {
5538            2
5539        }
5540    }
5541
5542    impl fidl::encoding::ValueTypeMarker for StrictBitsUint16 {
5543        type Borrowed<'a> = Self;
5544        #[inline(always)]
5545        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5546            *value
5547        }
5548    }
5549
5550    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5551        for StrictBitsUint16
5552    {
5553        #[inline]
5554        unsafe fn encode(
5555            self,
5556            encoder: &mut fidl::encoding::Encoder<'_, D>,
5557            offset: usize,
5558            _depth: fidl::encoding::Depth,
5559        ) -> fidl::Result<()> {
5560            encoder.debug_check_bounds::<Self>(offset);
5561            if self.bits() & Self::all().bits() != self.bits() {
5562                return Err(fidl::Error::InvalidBitsValue);
5563            }
5564            encoder.write_num(self.bits(), offset);
5565            Ok(())
5566        }
5567    }
5568
5569    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint16 {
5570        #[inline(always)]
5571        fn new_empty() -> Self {
5572            Self::empty()
5573        }
5574
5575        #[inline]
5576        unsafe fn decode(
5577            &mut self,
5578            decoder: &mut fidl::encoding::Decoder<'_, D>,
5579            offset: usize,
5580            _depth: fidl::encoding::Depth,
5581        ) -> fidl::Result<()> {
5582            decoder.debug_check_bounds::<Self>(offset);
5583            let prim = decoder.read_num::<u16>(offset);
5584            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5585            Ok(())
5586        }
5587    }
5588    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32 {
5589        type Owned = Self;
5590
5591        #[inline(always)]
5592        fn inline_align(_context: fidl::encoding::Context) -> usize {
5593            4
5594        }
5595
5596        #[inline(always)]
5597        fn inline_size(_context: fidl::encoding::Context) -> usize {
5598            4
5599        }
5600    }
5601
5602    impl fidl::encoding::ValueTypeMarker for StrictBitsUint32 {
5603        type Borrowed<'a> = Self;
5604        #[inline(always)]
5605        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5606            *value
5607        }
5608    }
5609
5610    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5611        for StrictBitsUint32
5612    {
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 StrictBitsUint32 {
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 StrictBitsUint64 {
5649        type Owned = Self;
5650
5651        #[inline(always)]
5652        fn inline_align(_context: fidl::encoding::Context) -> usize {
5653            8
5654        }
5655
5656        #[inline(always)]
5657        fn inline_size(_context: fidl::encoding::Context) -> usize {
5658            8
5659        }
5660    }
5661
5662    impl fidl::encoding::ValueTypeMarker for StrictBitsUint64 {
5663        type Borrowed<'a> = Self;
5664        #[inline(always)]
5665        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5666            *value
5667        }
5668    }
5669
5670    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5671        for StrictBitsUint64
5672    {
5673        #[inline]
5674        unsafe fn encode(
5675            self,
5676            encoder: &mut fidl::encoding::Encoder<'_, D>,
5677            offset: usize,
5678            _depth: fidl::encoding::Depth,
5679        ) -> fidl::Result<()> {
5680            encoder.debug_check_bounds::<Self>(offset);
5681            if self.bits() & Self::all().bits() != self.bits() {
5682                return Err(fidl::Error::InvalidBitsValue);
5683            }
5684            encoder.write_num(self.bits(), offset);
5685            Ok(())
5686        }
5687    }
5688
5689    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint64 {
5690        #[inline(always)]
5691        fn new_empty() -> Self {
5692            Self::empty()
5693        }
5694
5695        #[inline]
5696        unsafe fn decode(
5697            &mut self,
5698            decoder: &mut fidl::encoding::Decoder<'_, D>,
5699            offset: usize,
5700            _depth: fidl::encoding::Depth,
5701        ) -> fidl::Result<()> {
5702            decoder.debug_check_bounds::<Self>(offset);
5703            let prim = decoder.read_num::<u64>(offset);
5704            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5705            Ok(())
5706        }
5707    }
5708    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8 {
5709        type Owned = Self;
5710
5711        #[inline(always)]
5712        fn inline_align(_context: fidl::encoding::Context) -> usize {
5713            1
5714        }
5715
5716        #[inline(always)]
5717        fn inline_size(_context: fidl::encoding::Context) -> usize {
5718            1
5719        }
5720    }
5721
5722    impl fidl::encoding::ValueTypeMarker for StrictBitsUint8 {
5723        type Borrowed<'a> = Self;
5724        #[inline(always)]
5725        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5726            *value
5727        }
5728    }
5729
5730    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5731        for StrictBitsUint8
5732    {
5733        #[inline]
5734        unsafe fn encode(
5735            self,
5736            encoder: &mut fidl::encoding::Encoder<'_, D>,
5737            offset: usize,
5738            _depth: fidl::encoding::Depth,
5739        ) -> fidl::Result<()> {
5740            encoder.debug_check_bounds::<Self>(offset);
5741            if self.bits() & Self::all().bits() != self.bits() {
5742                return Err(fidl::Error::InvalidBitsValue);
5743            }
5744            encoder.write_num(self.bits(), offset);
5745            Ok(())
5746        }
5747    }
5748
5749    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8 {
5750        #[inline(always)]
5751        fn new_empty() -> Self {
5752            Self::empty()
5753        }
5754
5755        #[inline]
5756        unsafe fn decode(
5757            &mut self,
5758            decoder: &mut fidl::encoding::Decoder<'_, D>,
5759            offset: usize,
5760            _depth: fidl::encoding::Depth,
5761        ) -> fidl::Result<()> {
5762            decoder.debug_check_bounds::<Self>(offset);
5763            let prim = decoder.read_num::<u8>(offset);
5764            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5765            Ok(())
5766        }
5767    }
5768    unsafe impl fidl::encoding::TypeMarker for Rights {
5769        type Owned = Self;
5770
5771        #[inline(always)]
5772        fn inline_align(_context: fidl::encoding::Context) -> usize {
5773            4
5774        }
5775
5776        #[inline(always)]
5777        fn inline_size(_context: fidl::encoding::Context) -> usize {
5778            4
5779        }
5780    }
5781
5782    impl fidl::encoding::ValueTypeMarker for Rights {
5783        type Borrowed<'a> = Self;
5784        #[inline(always)]
5785        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5786            *value
5787        }
5788    }
5789
5790    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Rights {
5791        #[inline]
5792        unsafe fn encode(
5793            self,
5794            encoder: &mut fidl::encoding::Encoder<'_, D>,
5795            offset: usize,
5796            _depth: fidl::encoding::Depth,
5797        ) -> fidl::Result<()> {
5798            encoder.debug_check_bounds::<Self>(offset);
5799            if self.bits() & Self::all().bits() != self.bits() {
5800                return Err(fidl::Error::InvalidBitsValue);
5801            }
5802            encoder.write_num(self.bits(), offset);
5803            Ok(())
5804        }
5805    }
5806
5807    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Rights {
5808        #[inline(always)]
5809        fn new_empty() -> Self {
5810            Self::empty()
5811        }
5812
5813        #[inline]
5814        unsafe fn decode(
5815            &mut self,
5816            decoder: &mut fidl::encoding::Decoder<'_, D>,
5817            offset: usize,
5818            _depth: fidl::encoding::Depth,
5819        ) -> fidl::Result<()> {
5820            decoder.debug_check_bounds::<Self>(offset);
5821            let prim = decoder.read_num::<u32>(offset);
5822            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5823            Ok(())
5824        }
5825    }
5826    unsafe impl fidl::encoding::TypeMarker for EmptyEnum {
5827        type Owned = Self;
5828
5829        #[inline(always)]
5830        fn inline_align(_context: fidl::encoding::Context) -> usize {
5831            std::mem::align_of::<u32>()
5832        }
5833
5834        #[inline(always)]
5835        fn inline_size(_context: fidl::encoding::Context) -> usize {
5836            std::mem::size_of::<u32>()
5837        }
5838
5839        #[inline(always)]
5840        fn encode_is_copy() -> bool {
5841            false
5842        }
5843
5844        #[inline(always)]
5845        fn decode_is_copy() -> bool {
5846            false
5847        }
5848    }
5849
5850    impl fidl::encoding::ValueTypeMarker for EmptyEnum {
5851        type Borrowed<'a> = Self;
5852        #[inline(always)]
5853        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5854            *value
5855        }
5856    }
5857
5858    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyEnum {
5859        #[inline]
5860        unsafe fn encode(
5861            self,
5862            encoder: &mut fidl::encoding::Encoder<'_, D>,
5863            offset: usize,
5864            _depth: fidl::encoding::Depth,
5865        ) -> fidl::Result<()> {
5866            encoder.debug_check_bounds::<Self>(offset);
5867            encoder.write_num(self.into_primitive(), offset);
5868            Ok(())
5869        }
5870    }
5871
5872    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnum {
5873        #[inline(always)]
5874        fn new_empty() -> Self {
5875            Self::unknown()
5876        }
5877
5878        #[inline]
5879        unsafe fn decode(
5880            &mut self,
5881            decoder: &mut fidl::encoding::Decoder<'_, D>,
5882            offset: usize,
5883            _depth: fidl::encoding::Depth,
5884        ) -> fidl::Result<()> {
5885            decoder.debug_check_bounds::<Self>(offset);
5886            let prim = decoder.read_num::<u32>(offset);
5887
5888            *self = Self::from_primitive_allow_unknown(prim);
5889            Ok(())
5890        }
5891    }
5892    unsafe impl fidl::encoding::TypeMarker for EnumUint32 {
5893        type Owned = Self;
5894
5895        #[inline(always)]
5896        fn inline_align(_context: fidl::encoding::Context) -> usize {
5897            std::mem::align_of::<u32>()
5898        }
5899
5900        #[inline(always)]
5901        fn inline_size(_context: fidl::encoding::Context) -> usize {
5902            std::mem::size_of::<u32>()
5903        }
5904
5905        #[inline(always)]
5906        fn encode_is_copy() -> bool {
5907            true
5908        }
5909
5910        #[inline(always)]
5911        fn decode_is_copy() -> bool {
5912            false
5913        }
5914    }
5915
5916    impl fidl::encoding::ValueTypeMarker for EnumUint32 {
5917        type Borrowed<'a> = Self;
5918        #[inline(always)]
5919        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5920            *value
5921        }
5922    }
5923
5924    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint32 {
5925        #[inline]
5926        unsafe fn encode(
5927            self,
5928            encoder: &mut fidl::encoding::Encoder<'_, D>,
5929            offset: usize,
5930            _depth: fidl::encoding::Depth,
5931        ) -> fidl::Result<()> {
5932            encoder.debug_check_bounds::<Self>(offset);
5933            encoder.write_num(self.into_primitive(), offset);
5934            Ok(())
5935        }
5936    }
5937
5938    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint32 {
5939        #[inline(always)]
5940        fn new_empty() -> Self {
5941            Self::Member
5942        }
5943
5944        #[inline]
5945        unsafe fn decode(
5946            &mut self,
5947            decoder: &mut fidl::encoding::Decoder<'_, D>,
5948            offset: usize,
5949            _depth: fidl::encoding::Depth,
5950        ) -> fidl::Result<()> {
5951            decoder.debug_check_bounds::<Self>(offset);
5952            let prim = decoder.read_num::<u32>(offset);
5953
5954            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5955            Ok(())
5956        }
5957    }
5958    unsafe impl fidl::encoding::TypeMarker for EnumUint8 {
5959        type Owned = Self;
5960
5961        #[inline(always)]
5962        fn inline_align(_context: fidl::encoding::Context) -> usize {
5963            std::mem::align_of::<u8>()
5964        }
5965
5966        #[inline(always)]
5967        fn inline_size(_context: fidl::encoding::Context) -> usize {
5968            std::mem::size_of::<u8>()
5969        }
5970
5971        #[inline(always)]
5972        fn encode_is_copy() -> bool {
5973            true
5974        }
5975
5976        #[inline(always)]
5977        fn decode_is_copy() -> bool {
5978            false
5979        }
5980    }
5981
5982    impl fidl::encoding::ValueTypeMarker for EnumUint8 {
5983        type Borrowed<'a> = Self;
5984        #[inline(always)]
5985        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5986            *value
5987        }
5988    }
5989
5990    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint8 {
5991        #[inline]
5992        unsafe fn encode(
5993            self,
5994            encoder: &mut fidl::encoding::Encoder<'_, D>,
5995            offset: usize,
5996            _depth: fidl::encoding::Depth,
5997        ) -> fidl::Result<()> {
5998            encoder.debug_check_bounds::<Self>(offset);
5999            encoder.write_num(self.into_primitive(), offset);
6000            Ok(())
6001        }
6002    }
6003
6004    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint8 {
6005        #[inline(always)]
6006        fn new_empty() -> Self {
6007            Self::Member
6008        }
6009
6010        #[inline]
6011        unsafe fn decode(
6012            &mut self,
6013            decoder: &mut fidl::encoding::Decoder<'_, D>,
6014            offset: usize,
6015            _depth: fidl::encoding::Depth,
6016        ) -> fidl::Result<()> {
6017            decoder.debug_check_bounds::<Self>(offset);
6018            let prim = decoder.read_num::<u8>(offset);
6019
6020            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6021            Ok(())
6022        }
6023    }
6024    unsafe impl fidl::encoding::TypeMarker for FidlvizEnum {
6025        type Owned = Self;
6026
6027        #[inline(always)]
6028        fn inline_align(_context: fidl::encoding::Context) -> usize {
6029            std::mem::align_of::<u8>()
6030        }
6031
6032        #[inline(always)]
6033        fn inline_size(_context: fidl::encoding::Context) -> usize {
6034            std::mem::size_of::<u8>()
6035        }
6036
6037        #[inline(always)]
6038        fn encode_is_copy() -> bool {
6039            true
6040        }
6041
6042        #[inline(always)]
6043        fn decode_is_copy() -> bool {
6044            false
6045        }
6046    }
6047
6048    impl fidl::encoding::ValueTypeMarker for FidlvizEnum {
6049        type Borrowed<'a> = Self;
6050        #[inline(always)]
6051        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6052            *value
6053        }
6054    }
6055
6056    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizEnum {
6057        #[inline]
6058        unsafe fn encode(
6059            self,
6060            encoder: &mut fidl::encoding::Encoder<'_, D>,
6061            offset: usize,
6062            _depth: fidl::encoding::Depth,
6063        ) -> fidl::Result<()> {
6064            encoder.debug_check_bounds::<Self>(offset);
6065            encoder.write_num(self.into_primitive(), offset);
6066            Ok(())
6067        }
6068    }
6069
6070    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizEnum {
6071        #[inline(always)]
6072        fn new_empty() -> Self {
6073            Self::A
6074        }
6075
6076        #[inline]
6077        unsafe fn decode(
6078            &mut self,
6079            decoder: &mut fidl::encoding::Decoder<'_, D>,
6080            offset: usize,
6081            _depth: fidl::encoding::Depth,
6082        ) -> fidl::Result<()> {
6083            decoder.debug_check_bounds::<Self>(offset);
6084            let prim = decoder.read_num::<u8>(offset);
6085
6086            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6087            Ok(())
6088        }
6089    }
6090    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16 {
6091        type Owned = Self;
6092
6093        #[inline(always)]
6094        fn inline_align(_context: fidl::encoding::Context) -> usize {
6095            std::mem::align_of::<i16>()
6096        }
6097
6098        #[inline(always)]
6099        fn inline_size(_context: fidl::encoding::Context) -> usize {
6100            std::mem::size_of::<i16>()
6101        }
6102
6103        #[inline(always)]
6104        fn encode_is_copy() -> bool {
6105            false
6106        }
6107
6108        #[inline(always)]
6109        fn decode_is_copy() -> bool {
6110            false
6111        }
6112    }
6113
6114    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16 {
6115        type Borrowed<'a> = Self;
6116        #[inline(always)]
6117        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6118            *value
6119        }
6120    }
6121
6122    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6123        for FlexibleEnumInt16
6124    {
6125        #[inline]
6126        unsafe fn encode(
6127            self,
6128            encoder: &mut fidl::encoding::Encoder<'_, D>,
6129            offset: usize,
6130            _depth: fidl::encoding::Depth,
6131        ) -> fidl::Result<()> {
6132            encoder.debug_check_bounds::<Self>(offset);
6133            encoder.write_num(self.into_primitive(), offset);
6134            Ok(())
6135        }
6136    }
6137
6138    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt16 {
6139        #[inline(always)]
6140        fn new_empty() -> Self {
6141            Self::unknown()
6142        }
6143
6144        #[inline]
6145        unsafe fn decode(
6146            &mut self,
6147            decoder: &mut fidl::encoding::Decoder<'_, D>,
6148            offset: usize,
6149            _depth: fidl::encoding::Depth,
6150        ) -> fidl::Result<()> {
6151            decoder.debug_check_bounds::<Self>(offset);
6152            let prim = decoder.read_num::<i16>(offset);
6153
6154            *self = Self::from_primitive_allow_unknown(prim);
6155            Ok(())
6156        }
6157    }
6158    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32 {
6159        type Owned = Self;
6160
6161        #[inline(always)]
6162        fn inline_align(_context: fidl::encoding::Context) -> usize {
6163            std::mem::align_of::<i32>()
6164        }
6165
6166        #[inline(always)]
6167        fn inline_size(_context: fidl::encoding::Context) -> usize {
6168            std::mem::size_of::<i32>()
6169        }
6170
6171        #[inline(always)]
6172        fn encode_is_copy() -> bool {
6173            false
6174        }
6175
6176        #[inline(always)]
6177        fn decode_is_copy() -> bool {
6178            false
6179        }
6180    }
6181
6182    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32 {
6183        type Borrowed<'a> = Self;
6184        #[inline(always)]
6185        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6186            *value
6187        }
6188    }
6189
6190    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6191        for FlexibleEnumInt32
6192    {
6193        #[inline]
6194        unsafe fn encode(
6195            self,
6196            encoder: &mut fidl::encoding::Encoder<'_, D>,
6197            offset: usize,
6198            _depth: fidl::encoding::Depth,
6199        ) -> fidl::Result<()> {
6200            encoder.debug_check_bounds::<Self>(offset);
6201            encoder.write_num(self.into_primitive(), offset);
6202            Ok(())
6203        }
6204    }
6205
6206    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt32 {
6207        #[inline(always)]
6208        fn new_empty() -> Self {
6209            Self::unknown()
6210        }
6211
6212        #[inline]
6213        unsafe fn decode(
6214            &mut self,
6215            decoder: &mut fidl::encoding::Decoder<'_, D>,
6216            offset: usize,
6217            _depth: fidl::encoding::Depth,
6218        ) -> fidl::Result<()> {
6219            decoder.debug_check_bounds::<Self>(offset);
6220            let prim = decoder.read_num::<i32>(offset);
6221
6222            *self = Self::from_primitive_allow_unknown(prim);
6223            Ok(())
6224        }
6225    }
6226    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64 {
6227        type Owned = Self;
6228
6229        #[inline(always)]
6230        fn inline_align(_context: fidl::encoding::Context) -> usize {
6231            std::mem::align_of::<i64>()
6232        }
6233
6234        #[inline(always)]
6235        fn inline_size(_context: fidl::encoding::Context) -> usize {
6236            std::mem::size_of::<i64>()
6237        }
6238
6239        #[inline(always)]
6240        fn encode_is_copy() -> bool {
6241            false
6242        }
6243
6244        #[inline(always)]
6245        fn decode_is_copy() -> bool {
6246            false
6247        }
6248    }
6249
6250    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64 {
6251        type Borrowed<'a> = Self;
6252        #[inline(always)]
6253        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6254            *value
6255        }
6256    }
6257
6258    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6259        for FlexibleEnumInt64
6260    {
6261        #[inline]
6262        unsafe fn encode(
6263            self,
6264            encoder: &mut fidl::encoding::Encoder<'_, D>,
6265            offset: usize,
6266            _depth: fidl::encoding::Depth,
6267        ) -> fidl::Result<()> {
6268            encoder.debug_check_bounds::<Self>(offset);
6269            encoder.write_num(self.into_primitive(), offset);
6270            Ok(())
6271        }
6272    }
6273
6274    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt64 {
6275        #[inline(always)]
6276        fn new_empty() -> Self {
6277            Self::unknown()
6278        }
6279
6280        #[inline]
6281        unsafe fn decode(
6282            &mut self,
6283            decoder: &mut fidl::encoding::Decoder<'_, D>,
6284            offset: usize,
6285            _depth: fidl::encoding::Depth,
6286        ) -> fidl::Result<()> {
6287            decoder.debug_check_bounds::<Self>(offset);
6288            let prim = decoder.read_num::<i64>(offset);
6289
6290            *self = Self::from_primitive_allow_unknown(prim);
6291            Ok(())
6292        }
6293    }
6294    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8 {
6295        type Owned = Self;
6296
6297        #[inline(always)]
6298        fn inline_align(_context: fidl::encoding::Context) -> usize {
6299            std::mem::align_of::<i8>()
6300        }
6301
6302        #[inline(always)]
6303        fn inline_size(_context: fidl::encoding::Context) -> usize {
6304            std::mem::size_of::<i8>()
6305        }
6306
6307        #[inline(always)]
6308        fn encode_is_copy() -> bool {
6309            false
6310        }
6311
6312        #[inline(always)]
6313        fn decode_is_copy() -> bool {
6314            false
6315        }
6316    }
6317
6318    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8 {
6319        type Borrowed<'a> = Self;
6320        #[inline(always)]
6321        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6322            *value
6323        }
6324    }
6325
6326    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6327        for FlexibleEnumInt8
6328    {
6329        #[inline]
6330        unsafe fn encode(
6331            self,
6332            encoder: &mut fidl::encoding::Encoder<'_, D>,
6333            offset: usize,
6334            _depth: fidl::encoding::Depth,
6335        ) -> fidl::Result<()> {
6336            encoder.debug_check_bounds::<Self>(offset);
6337            encoder.write_num(self.into_primitive(), offset);
6338            Ok(())
6339        }
6340    }
6341
6342    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt8 {
6343        #[inline(always)]
6344        fn new_empty() -> Self {
6345            Self::unknown()
6346        }
6347
6348        #[inline]
6349        unsafe fn decode(
6350            &mut self,
6351            decoder: &mut fidl::encoding::Decoder<'_, D>,
6352            offset: usize,
6353            _depth: fidl::encoding::Depth,
6354        ) -> fidl::Result<()> {
6355            decoder.debug_check_bounds::<Self>(offset);
6356            let prim = decoder.read_num::<i8>(offset);
6357
6358            *self = Self::from_primitive_allow_unknown(prim);
6359            Ok(())
6360        }
6361    }
6362    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16 {
6363        type Owned = Self;
6364
6365        #[inline(always)]
6366        fn inline_align(_context: fidl::encoding::Context) -> usize {
6367            std::mem::align_of::<u16>()
6368        }
6369
6370        #[inline(always)]
6371        fn inline_size(_context: fidl::encoding::Context) -> usize {
6372            std::mem::size_of::<u16>()
6373        }
6374
6375        #[inline(always)]
6376        fn encode_is_copy() -> bool {
6377            false
6378        }
6379
6380        #[inline(always)]
6381        fn decode_is_copy() -> bool {
6382            false
6383        }
6384    }
6385
6386    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16 {
6387        type Borrowed<'a> = Self;
6388        #[inline(always)]
6389        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6390            *value
6391        }
6392    }
6393
6394    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6395        for FlexibleEnumUint16
6396    {
6397        #[inline]
6398        unsafe fn encode(
6399            self,
6400            encoder: &mut fidl::encoding::Encoder<'_, D>,
6401            offset: usize,
6402            _depth: fidl::encoding::Depth,
6403        ) -> fidl::Result<()> {
6404            encoder.debug_check_bounds::<Self>(offset);
6405            encoder.write_num(self.into_primitive(), offset);
6406            Ok(())
6407        }
6408    }
6409
6410    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint16 {
6411        #[inline(always)]
6412        fn new_empty() -> Self {
6413            Self::unknown()
6414        }
6415
6416        #[inline]
6417        unsafe fn decode(
6418            &mut self,
6419            decoder: &mut fidl::encoding::Decoder<'_, D>,
6420            offset: usize,
6421            _depth: fidl::encoding::Depth,
6422        ) -> fidl::Result<()> {
6423            decoder.debug_check_bounds::<Self>(offset);
6424            let prim = decoder.read_num::<u16>(offset);
6425
6426            *self = Self::from_primitive_allow_unknown(prim);
6427            Ok(())
6428        }
6429    }
6430    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32 {
6431        type Owned = Self;
6432
6433        #[inline(always)]
6434        fn inline_align(_context: fidl::encoding::Context) -> usize {
6435            std::mem::align_of::<u32>()
6436        }
6437
6438        #[inline(always)]
6439        fn inline_size(_context: fidl::encoding::Context) -> usize {
6440            std::mem::size_of::<u32>()
6441        }
6442
6443        #[inline(always)]
6444        fn encode_is_copy() -> bool {
6445            false
6446        }
6447
6448        #[inline(always)]
6449        fn decode_is_copy() -> bool {
6450            false
6451        }
6452    }
6453
6454    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32 {
6455        type Borrowed<'a> = Self;
6456        #[inline(always)]
6457        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6458            *value
6459        }
6460    }
6461
6462    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6463        for FlexibleEnumUint32
6464    {
6465        #[inline]
6466        unsafe fn encode(
6467            self,
6468            encoder: &mut fidl::encoding::Encoder<'_, D>,
6469            offset: usize,
6470            _depth: fidl::encoding::Depth,
6471        ) -> fidl::Result<()> {
6472            encoder.debug_check_bounds::<Self>(offset);
6473            encoder.write_num(self.into_primitive(), offset);
6474            Ok(())
6475        }
6476    }
6477
6478    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint32 {
6479        #[inline(always)]
6480        fn new_empty() -> Self {
6481            Self::unknown()
6482        }
6483
6484        #[inline]
6485        unsafe fn decode(
6486            &mut self,
6487            decoder: &mut fidl::encoding::Decoder<'_, D>,
6488            offset: usize,
6489            _depth: fidl::encoding::Depth,
6490        ) -> fidl::Result<()> {
6491            decoder.debug_check_bounds::<Self>(offset);
6492            let prim = decoder.read_num::<u32>(offset);
6493
6494            *self = Self::from_primitive_allow_unknown(prim);
6495            Ok(())
6496        }
6497    }
6498    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64 {
6499        type Owned = Self;
6500
6501        #[inline(always)]
6502        fn inline_align(_context: fidl::encoding::Context) -> usize {
6503            std::mem::align_of::<u64>()
6504        }
6505
6506        #[inline(always)]
6507        fn inline_size(_context: fidl::encoding::Context) -> usize {
6508            std::mem::size_of::<u64>()
6509        }
6510
6511        #[inline(always)]
6512        fn encode_is_copy() -> bool {
6513            false
6514        }
6515
6516        #[inline(always)]
6517        fn decode_is_copy() -> bool {
6518            false
6519        }
6520    }
6521
6522    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64 {
6523        type Borrowed<'a> = Self;
6524        #[inline(always)]
6525        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6526            *value
6527        }
6528    }
6529
6530    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6531        for FlexibleEnumUint64
6532    {
6533        #[inline]
6534        unsafe fn encode(
6535            self,
6536            encoder: &mut fidl::encoding::Encoder<'_, D>,
6537            offset: usize,
6538            _depth: fidl::encoding::Depth,
6539        ) -> fidl::Result<()> {
6540            encoder.debug_check_bounds::<Self>(offset);
6541            encoder.write_num(self.into_primitive(), offset);
6542            Ok(())
6543        }
6544    }
6545
6546    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint64 {
6547        #[inline(always)]
6548        fn new_empty() -> Self {
6549            Self::unknown()
6550        }
6551
6552        #[inline]
6553        unsafe fn decode(
6554            &mut self,
6555            decoder: &mut fidl::encoding::Decoder<'_, D>,
6556            offset: usize,
6557            _depth: fidl::encoding::Depth,
6558        ) -> fidl::Result<()> {
6559            decoder.debug_check_bounds::<Self>(offset);
6560            let prim = decoder.read_num::<u64>(offset);
6561
6562            *self = Self::from_primitive_allow_unknown(prim);
6563            Ok(())
6564        }
6565    }
6566    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8 {
6567        type Owned = Self;
6568
6569        #[inline(always)]
6570        fn inline_align(_context: fidl::encoding::Context) -> usize {
6571            std::mem::align_of::<u8>()
6572        }
6573
6574        #[inline(always)]
6575        fn inline_size(_context: fidl::encoding::Context) -> usize {
6576            std::mem::size_of::<u8>()
6577        }
6578
6579        #[inline(always)]
6580        fn encode_is_copy() -> bool {
6581            false
6582        }
6583
6584        #[inline(always)]
6585        fn decode_is_copy() -> bool {
6586            false
6587        }
6588    }
6589
6590    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8 {
6591        type Borrowed<'a> = Self;
6592        #[inline(always)]
6593        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6594            *value
6595        }
6596    }
6597
6598    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6599        for FlexibleEnumUint8
6600    {
6601        #[inline]
6602        unsafe fn encode(
6603            self,
6604            encoder: &mut fidl::encoding::Encoder<'_, D>,
6605            offset: usize,
6606            _depth: fidl::encoding::Depth,
6607        ) -> fidl::Result<()> {
6608            encoder.debug_check_bounds::<Self>(offset);
6609            encoder.write_num(self.into_primitive(), offset);
6610            Ok(())
6611        }
6612    }
6613
6614    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint8 {
6615        #[inline(always)]
6616        fn new_empty() -> Self {
6617            Self::unknown()
6618        }
6619
6620        #[inline]
6621        unsafe fn decode(
6622            &mut self,
6623            decoder: &mut fidl::encoding::Decoder<'_, D>,
6624            offset: usize,
6625            _depth: fidl::encoding::Depth,
6626        ) -> fidl::Result<()> {
6627            decoder.debug_check_bounds::<Self>(offset);
6628            let prim = decoder.read_num::<u8>(offset);
6629
6630            *self = Self::from_primitive_allow_unknown(prim);
6631            Ok(())
6632        }
6633    }
6634    unsafe impl fidl::encoding::TypeMarker for GoldenEnum {
6635        type Owned = Self;
6636
6637        #[inline(always)]
6638        fn inline_align(_context: fidl::encoding::Context) -> usize {
6639            std::mem::align_of::<u16>()
6640        }
6641
6642        #[inline(always)]
6643        fn inline_size(_context: fidl::encoding::Context) -> usize {
6644            std::mem::size_of::<u16>()
6645        }
6646
6647        #[inline(always)]
6648        fn encode_is_copy() -> bool {
6649            true
6650        }
6651
6652        #[inline(always)]
6653        fn decode_is_copy() -> bool {
6654            false
6655        }
6656    }
6657
6658    impl fidl::encoding::ValueTypeMarker for GoldenEnum {
6659        type Borrowed<'a> = Self;
6660        #[inline(always)]
6661        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6662            *value
6663        }
6664    }
6665
6666    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenEnum {
6667        #[inline]
6668        unsafe fn encode(
6669            self,
6670            encoder: &mut fidl::encoding::Encoder<'_, D>,
6671            offset: usize,
6672            _depth: fidl::encoding::Depth,
6673        ) -> fidl::Result<()> {
6674            encoder.debug_check_bounds::<Self>(offset);
6675            encoder.write_num(self.into_primitive(), offset);
6676            Ok(())
6677        }
6678    }
6679
6680    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnum {
6681        #[inline(always)]
6682        fn new_empty() -> Self {
6683            Self::A
6684        }
6685
6686        #[inline]
6687        unsafe fn decode(
6688            &mut self,
6689            decoder: &mut fidl::encoding::Decoder<'_, D>,
6690            offset: usize,
6691            _depth: fidl::encoding::Depth,
6692        ) -> fidl::Result<()> {
6693            decoder.debug_check_bounds::<Self>(offset);
6694            let prim = decoder.read_num::<u16>(offset);
6695
6696            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6697            Ok(())
6698        }
6699    }
6700    unsafe impl fidl::encoding::TypeMarker for SignedEnum {
6701        type Owned = Self;
6702
6703        #[inline(always)]
6704        fn inline_align(_context: fidl::encoding::Context) -> usize {
6705            std::mem::align_of::<i32>()
6706        }
6707
6708        #[inline(always)]
6709        fn inline_size(_context: fidl::encoding::Context) -> usize {
6710            std::mem::size_of::<i32>()
6711        }
6712
6713        #[inline(always)]
6714        fn encode_is_copy() -> bool {
6715            false
6716        }
6717
6718        #[inline(always)]
6719        fn decode_is_copy() -> bool {
6720            false
6721        }
6722    }
6723
6724    impl fidl::encoding::ValueTypeMarker for SignedEnum {
6725        type Borrowed<'a> = Self;
6726        #[inline(always)]
6727        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6728            *value
6729        }
6730    }
6731
6732    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SignedEnum {
6733        #[inline]
6734        unsafe fn encode(
6735            self,
6736            encoder: &mut fidl::encoding::Encoder<'_, D>,
6737            offset: usize,
6738            _depth: fidl::encoding::Depth,
6739        ) -> fidl::Result<()> {
6740            encoder.debug_check_bounds::<Self>(offset);
6741            encoder.write_num(self.into_primitive(), offset);
6742            Ok(())
6743        }
6744    }
6745
6746    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SignedEnum {
6747        #[inline(always)]
6748        fn new_empty() -> Self {
6749            Self::unknown()
6750        }
6751
6752        #[inline]
6753        unsafe fn decode(
6754            &mut self,
6755            decoder: &mut fidl::encoding::Decoder<'_, D>,
6756            offset: usize,
6757            _depth: fidl::encoding::Depth,
6758        ) -> fidl::Result<()> {
6759            decoder.debug_check_bounds::<Self>(offset);
6760            let prim = decoder.read_num::<i32>(offset);
6761
6762            *self = Self::from_primitive_allow_unknown(prim);
6763            Ok(())
6764        }
6765    }
6766    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16 {
6767        type Owned = Self;
6768
6769        #[inline(always)]
6770        fn inline_align(_context: fidl::encoding::Context) -> usize {
6771            std::mem::align_of::<i16>()
6772        }
6773
6774        #[inline(always)]
6775        fn inline_size(_context: fidl::encoding::Context) -> usize {
6776            std::mem::size_of::<i16>()
6777        }
6778
6779        #[inline(always)]
6780        fn encode_is_copy() -> bool {
6781            true
6782        }
6783
6784        #[inline(always)]
6785        fn decode_is_copy() -> bool {
6786            false
6787        }
6788    }
6789
6790    impl fidl::encoding::ValueTypeMarker for StrictEnumInt16 {
6791        type Borrowed<'a> = Self;
6792        #[inline(always)]
6793        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6794            *value
6795        }
6796    }
6797
6798    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6799        for StrictEnumInt16
6800    {
6801        #[inline]
6802        unsafe fn encode(
6803            self,
6804            encoder: &mut fidl::encoding::Encoder<'_, D>,
6805            offset: usize,
6806            _depth: fidl::encoding::Depth,
6807        ) -> fidl::Result<()> {
6808            encoder.debug_check_bounds::<Self>(offset);
6809            encoder.write_num(self.into_primitive(), offset);
6810            Ok(())
6811        }
6812    }
6813
6814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16 {
6815        #[inline(always)]
6816        fn new_empty() -> Self {
6817            Self::First
6818        }
6819
6820        #[inline]
6821        unsafe fn decode(
6822            &mut self,
6823            decoder: &mut fidl::encoding::Decoder<'_, D>,
6824            offset: usize,
6825            _depth: fidl::encoding::Depth,
6826        ) -> fidl::Result<()> {
6827            decoder.debug_check_bounds::<Self>(offset);
6828            let prim = decoder.read_num::<i16>(offset);
6829
6830            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6831            Ok(())
6832        }
6833    }
6834    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32 {
6835        type Owned = Self;
6836
6837        #[inline(always)]
6838        fn inline_align(_context: fidl::encoding::Context) -> usize {
6839            std::mem::align_of::<i32>()
6840        }
6841
6842        #[inline(always)]
6843        fn inline_size(_context: fidl::encoding::Context) -> usize {
6844            std::mem::size_of::<i32>()
6845        }
6846
6847        #[inline(always)]
6848        fn encode_is_copy() -> bool {
6849            true
6850        }
6851
6852        #[inline(always)]
6853        fn decode_is_copy() -> bool {
6854            false
6855        }
6856    }
6857
6858    impl fidl::encoding::ValueTypeMarker for StrictEnumInt32 {
6859        type Borrowed<'a> = Self;
6860        #[inline(always)]
6861        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6862            *value
6863        }
6864    }
6865
6866    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6867        for StrictEnumInt32
6868    {
6869        #[inline]
6870        unsafe fn encode(
6871            self,
6872            encoder: &mut fidl::encoding::Encoder<'_, D>,
6873            offset: usize,
6874            _depth: fidl::encoding::Depth,
6875        ) -> fidl::Result<()> {
6876            encoder.debug_check_bounds::<Self>(offset);
6877            encoder.write_num(self.into_primitive(), offset);
6878            Ok(())
6879        }
6880    }
6881
6882    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32 {
6883        #[inline(always)]
6884        fn new_empty() -> Self {
6885            Self::First
6886        }
6887
6888        #[inline]
6889        unsafe fn decode(
6890            &mut self,
6891            decoder: &mut fidl::encoding::Decoder<'_, D>,
6892            offset: usize,
6893            _depth: fidl::encoding::Depth,
6894        ) -> fidl::Result<()> {
6895            decoder.debug_check_bounds::<Self>(offset);
6896            let prim = decoder.read_num::<i32>(offset);
6897
6898            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6899            Ok(())
6900        }
6901    }
6902    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64 {
6903        type Owned = Self;
6904
6905        #[inline(always)]
6906        fn inline_align(_context: fidl::encoding::Context) -> usize {
6907            std::mem::align_of::<i64>()
6908        }
6909
6910        #[inline(always)]
6911        fn inline_size(_context: fidl::encoding::Context) -> usize {
6912            std::mem::size_of::<i64>()
6913        }
6914
6915        #[inline(always)]
6916        fn encode_is_copy() -> bool {
6917            true
6918        }
6919
6920        #[inline(always)]
6921        fn decode_is_copy() -> bool {
6922            false
6923        }
6924    }
6925
6926    impl fidl::encoding::ValueTypeMarker for StrictEnumInt64 {
6927        type Borrowed<'a> = Self;
6928        #[inline(always)]
6929        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6930            *value
6931        }
6932    }
6933
6934    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6935        for StrictEnumInt64
6936    {
6937        #[inline]
6938        unsafe fn encode(
6939            self,
6940            encoder: &mut fidl::encoding::Encoder<'_, D>,
6941            offset: usize,
6942            _depth: fidl::encoding::Depth,
6943        ) -> fidl::Result<()> {
6944            encoder.debug_check_bounds::<Self>(offset);
6945            encoder.write_num(self.into_primitive(), offset);
6946            Ok(())
6947        }
6948    }
6949
6950    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64 {
6951        #[inline(always)]
6952        fn new_empty() -> Self {
6953            Self::First
6954        }
6955
6956        #[inline]
6957        unsafe fn decode(
6958            &mut self,
6959            decoder: &mut fidl::encoding::Decoder<'_, D>,
6960            offset: usize,
6961            _depth: fidl::encoding::Depth,
6962        ) -> fidl::Result<()> {
6963            decoder.debug_check_bounds::<Self>(offset);
6964            let prim = decoder.read_num::<i64>(offset);
6965
6966            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6967            Ok(())
6968        }
6969    }
6970    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8 {
6971        type Owned = Self;
6972
6973        #[inline(always)]
6974        fn inline_align(_context: fidl::encoding::Context) -> usize {
6975            std::mem::align_of::<i8>()
6976        }
6977
6978        #[inline(always)]
6979        fn inline_size(_context: fidl::encoding::Context) -> usize {
6980            std::mem::size_of::<i8>()
6981        }
6982
6983        #[inline(always)]
6984        fn encode_is_copy() -> bool {
6985            true
6986        }
6987
6988        #[inline(always)]
6989        fn decode_is_copy() -> bool {
6990            false
6991        }
6992    }
6993
6994    impl fidl::encoding::ValueTypeMarker for StrictEnumInt8 {
6995        type Borrowed<'a> = Self;
6996        #[inline(always)]
6997        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6998            *value
6999        }
7000    }
7001
7002    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StrictEnumInt8 {
7003        #[inline]
7004        unsafe fn encode(
7005            self,
7006            encoder: &mut fidl::encoding::Encoder<'_, D>,
7007            offset: usize,
7008            _depth: fidl::encoding::Depth,
7009        ) -> fidl::Result<()> {
7010            encoder.debug_check_bounds::<Self>(offset);
7011            encoder.write_num(self.into_primitive(), offset);
7012            Ok(())
7013        }
7014    }
7015
7016    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8 {
7017        #[inline(always)]
7018        fn new_empty() -> Self {
7019            Self::First
7020        }
7021
7022        #[inline]
7023        unsafe fn decode(
7024            &mut self,
7025            decoder: &mut fidl::encoding::Decoder<'_, D>,
7026            offset: usize,
7027            _depth: fidl::encoding::Depth,
7028        ) -> fidl::Result<()> {
7029            decoder.debug_check_bounds::<Self>(offset);
7030            let prim = decoder.read_num::<i8>(offset);
7031
7032            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7033            Ok(())
7034        }
7035    }
7036    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16 {
7037        type Owned = Self;
7038
7039        #[inline(always)]
7040        fn inline_align(_context: fidl::encoding::Context) -> usize {
7041            std::mem::align_of::<u16>()
7042        }
7043
7044        #[inline(always)]
7045        fn inline_size(_context: fidl::encoding::Context) -> usize {
7046            std::mem::size_of::<u16>()
7047        }
7048
7049        #[inline(always)]
7050        fn encode_is_copy() -> bool {
7051            true
7052        }
7053
7054        #[inline(always)]
7055        fn decode_is_copy() -> bool {
7056            false
7057        }
7058    }
7059
7060    impl fidl::encoding::ValueTypeMarker for StrictEnumUint16 {
7061        type Borrowed<'a> = Self;
7062        #[inline(always)]
7063        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7064            *value
7065        }
7066    }
7067
7068    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7069        for StrictEnumUint16
7070    {
7071        #[inline]
7072        unsafe fn encode(
7073            self,
7074            encoder: &mut fidl::encoding::Encoder<'_, D>,
7075            offset: usize,
7076            _depth: fidl::encoding::Depth,
7077        ) -> fidl::Result<()> {
7078            encoder.debug_check_bounds::<Self>(offset);
7079            encoder.write_num(self.into_primitive(), offset);
7080            Ok(())
7081        }
7082    }
7083
7084    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint16 {
7085        #[inline(always)]
7086        fn new_empty() -> Self {
7087            Self::First
7088        }
7089
7090        #[inline]
7091        unsafe fn decode(
7092            &mut self,
7093            decoder: &mut fidl::encoding::Decoder<'_, D>,
7094            offset: usize,
7095            _depth: fidl::encoding::Depth,
7096        ) -> fidl::Result<()> {
7097            decoder.debug_check_bounds::<Self>(offset);
7098            let prim = decoder.read_num::<u16>(offset);
7099
7100            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7101            Ok(())
7102        }
7103    }
7104    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32 {
7105        type Owned = Self;
7106
7107        #[inline(always)]
7108        fn inline_align(_context: fidl::encoding::Context) -> usize {
7109            std::mem::align_of::<u32>()
7110        }
7111
7112        #[inline(always)]
7113        fn inline_size(_context: fidl::encoding::Context) -> usize {
7114            std::mem::size_of::<u32>()
7115        }
7116
7117        #[inline(always)]
7118        fn encode_is_copy() -> bool {
7119            true
7120        }
7121
7122        #[inline(always)]
7123        fn decode_is_copy() -> bool {
7124            false
7125        }
7126    }
7127
7128    impl fidl::encoding::ValueTypeMarker for StrictEnumUint32 {
7129        type Borrowed<'a> = Self;
7130        #[inline(always)]
7131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7132            *value
7133        }
7134    }
7135
7136    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7137        for StrictEnumUint32
7138    {
7139        #[inline]
7140        unsafe fn encode(
7141            self,
7142            encoder: &mut fidl::encoding::Encoder<'_, D>,
7143            offset: usize,
7144            _depth: fidl::encoding::Depth,
7145        ) -> fidl::Result<()> {
7146            encoder.debug_check_bounds::<Self>(offset);
7147            encoder.write_num(self.into_primitive(), offset);
7148            Ok(())
7149        }
7150    }
7151
7152    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint32 {
7153        #[inline(always)]
7154        fn new_empty() -> Self {
7155            Self::First
7156        }
7157
7158        #[inline]
7159        unsafe fn decode(
7160            &mut self,
7161            decoder: &mut fidl::encoding::Decoder<'_, D>,
7162            offset: usize,
7163            _depth: fidl::encoding::Depth,
7164        ) -> fidl::Result<()> {
7165            decoder.debug_check_bounds::<Self>(offset);
7166            let prim = decoder.read_num::<u32>(offset);
7167
7168            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7169            Ok(())
7170        }
7171    }
7172    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64 {
7173        type Owned = Self;
7174
7175        #[inline(always)]
7176        fn inline_align(_context: fidl::encoding::Context) -> usize {
7177            std::mem::align_of::<u64>()
7178        }
7179
7180        #[inline(always)]
7181        fn inline_size(_context: fidl::encoding::Context) -> usize {
7182            std::mem::size_of::<u64>()
7183        }
7184
7185        #[inline(always)]
7186        fn encode_is_copy() -> bool {
7187            true
7188        }
7189
7190        #[inline(always)]
7191        fn decode_is_copy() -> bool {
7192            false
7193        }
7194    }
7195
7196    impl fidl::encoding::ValueTypeMarker for StrictEnumUint64 {
7197        type Borrowed<'a> = Self;
7198        #[inline(always)]
7199        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7200            *value
7201        }
7202    }
7203
7204    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7205        for StrictEnumUint64
7206    {
7207        #[inline]
7208        unsafe fn encode(
7209            self,
7210            encoder: &mut fidl::encoding::Encoder<'_, D>,
7211            offset: usize,
7212            _depth: fidl::encoding::Depth,
7213        ) -> fidl::Result<()> {
7214            encoder.debug_check_bounds::<Self>(offset);
7215            encoder.write_num(self.into_primitive(), offset);
7216            Ok(())
7217        }
7218    }
7219
7220    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint64 {
7221        #[inline(always)]
7222        fn new_empty() -> Self {
7223            Self::First
7224        }
7225
7226        #[inline]
7227        unsafe fn decode(
7228            &mut self,
7229            decoder: &mut fidl::encoding::Decoder<'_, D>,
7230            offset: usize,
7231            _depth: fidl::encoding::Depth,
7232        ) -> fidl::Result<()> {
7233            decoder.debug_check_bounds::<Self>(offset);
7234            let prim = decoder.read_num::<u64>(offset);
7235
7236            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7237            Ok(())
7238        }
7239    }
7240    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8 {
7241        type Owned = Self;
7242
7243        #[inline(always)]
7244        fn inline_align(_context: fidl::encoding::Context) -> usize {
7245            std::mem::align_of::<u8>()
7246        }
7247
7248        #[inline(always)]
7249        fn inline_size(_context: fidl::encoding::Context) -> usize {
7250            std::mem::size_of::<u8>()
7251        }
7252
7253        #[inline(always)]
7254        fn encode_is_copy() -> bool {
7255            true
7256        }
7257
7258        #[inline(always)]
7259        fn decode_is_copy() -> bool {
7260            false
7261        }
7262    }
7263
7264    impl fidl::encoding::ValueTypeMarker for StrictEnumUint8 {
7265        type Borrowed<'a> = Self;
7266        #[inline(always)]
7267        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7268            *value
7269        }
7270    }
7271
7272    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7273        for StrictEnumUint8
7274    {
7275        #[inline]
7276        unsafe fn encode(
7277            self,
7278            encoder: &mut fidl::encoding::Encoder<'_, D>,
7279            offset: usize,
7280            _depth: fidl::encoding::Depth,
7281        ) -> fidl::Result<()> {
7282            encoder.debug_check_bounds::<Self>(offset);
7283            encoder.write_num(self.into_primitive(), offset);
7284            Ok(())
7285        }
7286    }
7287
7288    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8 {
7289        #[inline(always)]
7290        fn new_empty() -> Self {
7291            Self::First
7292        }
7293
7294        #[inline]
7295        unsafe fn decode(
7296            &mut self,
7297            decoder: &mut fidl::encoding::Decoder<'_, D>,
7298            offset: usize,
7299            _depth: fidl::encoding::Depth,
7300        ) -> fidl::Result<()> {
7301            decoder.debug_check_bounds::<Self>(offset);
7302            let prim = decoder.read_num::<u8>(offset);
7303
7304            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7305            Ok(())
7306        }
7307    }
7308    unsafe impl fidl::encoding::TypeMarker for UnsignedEnum {
7309        type Owned = Self;
7310
7311        #[inline(always)]
7312        fn inline_align(_context: fidl::encoding::Context) -> usize {
7313            std::mem::align_of::<u16>()
7314        }
7315
7316        #[inline(always)]
7317        fn inline_size(_context: fidl::encoding::Context) -> usize {
7318            std::mem::size_of::<u16>()
7319        }
7320
7321        #[inline(always)]
7322        fn encode_is_copy() -> bool {
7323            false
7324        }
7325
7326        #[inline(always)]
7327        fn decode_is_copy() -> bool {
7328            false
7329        }
7330    }
7331
7332    impl fidl::encoding::ValueTypeMarker for UnsignedEnum {
7333        type Borrowed<'a> = Self;
7334        #[inline(always)]
7335        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7336            *value
7337        }
7338    }
7339
7340    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsignedEnum {
7341        #[inline]
7342        unsafe fn encode(
7343            self,
7344            encoder: &mut fidl::encoding::Encoder<'_, D>,
7345            offset: usize,
7346            _depth: fidl::encoding::Depth,
7347        ) -> fidl::Result<()> {
7348            encoder.debug_check_bounds::<Self>(offset);
7349            encoder.write_num(self.into_primitive(), offset);
7350            Ok(())
7351        }
7352    }
7353
7354    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsignedEnum {
7355        #[inline(always)]
7356        fn new_empty() -> Self {
7357            Self::unknown()
7358        }
7359
7360        #[inline]
7361        unsafe fn decode(
7362            &mut self,
7363            decoder: &mut fidl::encoding::Decoder<'_, D>,
7364            offset: usize,
7365            _depth: fidl::encoding::Depth,
7366        ) -> fidl::Result<()> {
7367            decoder.debug_check_bounds::<Self>(offset);
7368            let prim = decoder.read_num::<u16>(offset);
7369
7370            *self = Self::from_primitive_allow_unknown(prim);
7371            Ok(())
7372        }
7373    }
7374    unsafe impl fidl::encoding::TypeMarker for ObjType {
7375        type Owned = Self;
7376
7377        #[inline(always)]
7378        fn inline_align(_context: fidl::encoding::Context) -> usize {
7379            std::mem::align_of::<u32>()
7380        }
7381
7382        #[inline(always)]
7383        fn inline_size(_context: fidl::encoding::Context) -> usize {
7384            std::mem::size_of::<u32>()
7385        }
7386
7387        #[inline(always)]
7388        fn encode_is_copy() -> bool {
7389            true
7390        }
7391
7392        #[inline(always)]
7393        fn decode_is_copy() -> bool {
7394            false
7395        }
7396    }
7397
7398    impl fidl::encoding::ValueTypeMarker for ObjType {
7399        type Borrowed<'a> = Self;
7400        #[inline(always)]
7401        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7402            *value
7403        }
7404    }
7405
7406    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ObjType {
7407        #[inline]
7408        unsafe fn encode(
7409            self,
7410            encoder: &mut fidl::encoding::Encoder<'_, D>,
7411            offset: usize,
7412            _depth: fidl::encoding::Depth,
7413        ) -> fidl::Result<()> {
7414            encoder.debug_check_bounds::<Self>(offset);
7415            encoder.write_num(self.into_primitive(), offset);
7416            Ok(())
7417        }
7418    }
7419
7420    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ObjType {
7421        #[inline(always)]
7422        fn new_empty() -> Self {
7423            Self::None
7424        }
7425
7426        #[inline]
7427        unsafe fn decode(
7428            &mut self,
7429            decoder: &mut fidl::encoding::Decoder<'_, D>,
7430            offset: usize,
7431            _depth: fidl::encoding::Depth,
7432        ) -> fidl::Result<()> {
7433            decoder.debug_check_bounds::<Self>(offset);
7434            let prim = decoder.read_num::<u32>(offset);
7435
7436            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7437            Ok(())
7438        }
7439    }
7440
7441    impl fidl::encoding::ValueTypeMarker for AliasedBool {
7442        type Borrowed<'a> = &'a Self;
7443        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7444            value
7445        }
7446    }
7447
7448    unsafe impl fidl::encoding::TypeMarker for AliasedBool {
7449        type Owned = Self;
7450
7451        #[inline(always)]
7452        fn inline_align(_context: fidl::encoding::Context) -> usize {
7453            1
7454        }
7455
7456        #[inline(always)]
7457        fn inline_size(_context: fidl::encoding::Context) -> usize {
7458            1
7459        }
7460    }
7461
7462    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedBool, D>
7463        for &AliasedBool
7464    {
7465        #[inline]
7466        unsafe fn encode(
7467            self,
7468            encoder: &mut fidl::encoding::Encoder<'_, D>,
7469            offset: usize,
7470            _depth: fidl::encoding::Depth,
7471        ) -> fidl::Result<()> {
7472            encoder.debug_check_bounds::<AliasedBool>(offset);
7473            // Delegate to tuple encoding.
7474            fidl::encoding::Encode::<AliasedBool, D>::encode(
7475                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7476                encoder,
7477                offset,
7478                _depth,
7479            )
7480        }
7481    }
7482    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7483        fidl::encoding::Encode<AliasedBool, D> for (T0,)
7484    {
7485        #[inline]
7486        unsafe fn encode(
7487            self,
7488            encoder: &mut fidl::encoding::Encoder<'_, D>,
7489            offset: usize,
7490            depth: fidl::encoding::Depth,
7491        ) -> fidl::Result<()> {
7492            encoder.debug_check_bounds::<AliasedBool>(offset);
7493            // Zero out padding regions. There's no need to apply masks
7494            // because the unmasked parts will be overwritten by fields.
7495            // Write the fields.
7496            self.0.encode(encoder, offset + 0, depth)?;
7497            Ok(())
7498        }
7499    }
7500
7501    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedBool {
7502        #[inline(always)]
7503        fn new_empty() -> Self {
7504            Self { value: fidl::new_empty!(bool, D) }
7505        }
7506
7507        #[inline]
7508        unsafe fn decode(
7509            &mut self,
7510            decoder: &mut fidl::encoding::Decoder<'_, D>,
7511            offset: usize,
7512            _depth: fidl::encoding::Depth,
7513        ) -> fidl::Result<()> {
7514            decoder.debug_check_bounds::<Self>(offset);
7515            // Verify that padding bytes are zero.
7516            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7517            Ok(())
7518        }
7519    }
7520
7521    impl fidl::encoding::ValueTypeMarker for AliasedFloat64 {
7522        type Borrowed<'a> = &'a Self;
7523        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7524            value
7525        }
7526    }
7527
7528    unsafe impl fidl::encoding::TypeMarker for AliasedFloat64 {
7529        type Owned = Self;
7530
7531        #[inline(always)]
7532        fn inline_align(_context: fidl::encoding::Context) -> usize {
7533            8
7534        }
7535
7536        #[inline(always)]
7537        fn inline_size(_context: fidl::encoding::Context) -> usize {
7538            8
7539        }
7540    }
7541
7542    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedFloat64, D>
7543        for &AliasedFloat64
7544    {
7545        #[inline]
7546        unsafe fn encode(
7547            self,
7548            encoder: &mut fidl::encoding::Encoder<'_, D>,
7549            offset: usize,
7550            _depth: fidl::encoding::Depth,
7551        ) -> fidl::Result<()> {
7552            encoder.debug_check_bounds::<AliasedFloat64>(offset);
7553            // Delegate to tuple encoding.
7554            fidl::encoding::Encode::<AliasedFloat64, D>::encode(
7555                (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7556                encoder,
7557                offset,
7558                _depth,
7559            )
7560        }
7561    }
7562    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
7563        fidl::encoding::Encode<AliasedFloat64, D> for (T0,)
7564    {
7565        #[inline]
7566        unsafe fn encode(
7567            self,
7568            encoder: &mut fidl::encoding::Encoder<'_, D>,
7569            offset: usize,
7570            depth: fidl::encoding::Depth,
7571        ) -> fidl::Result<()> {
7572            encoder.debug_check_bounds::<AliasedFloat64>(offset);
7573            // Zero out padding regions. There's no need to apply masks
7574            // because the unmasked parts will be overwritten by fields.
7575            // Write the fields.
7576            self.0.encode(encoder, offset + 0, depth)?;
7577            Ok(())
7578        }
7579    }
7580
7581    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedFloat64 {
7582        #[inline(always)]
7583        fn new_empty() -> Self {
7584            Self { value: fidl::new_empty!(f64, D) }
7585        }
7586
7587        #[inline]
7588        unsafe fn decode(
7589            &mut self,
7590            decoder: &mut fidl::encoding::Decoder<'_, D>,
7591            offset: usize,
7592            _depth: fidl::encoding::Depth,
7593        ) -> fidl::Result<()> {
7594            decoder.debug_check_bounds::<Self>(offset);
7595            // Verify that padding bytes are zero.
7596            fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
7597            Ok(())
7598        }
7599    }
7600
7601    impl fidl::encoding::ValueTypeMarker for AliasedString {
7602        type Borrowed<'a> = &'a Self;
7603        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7604            value
7605        }
7606    }
7607
7608    unsafe impl fidl::encoding::TypeMarker for AliasedString {
7609        type Owned = Self;
7610
7611        #[inline(always)]
7612        fn inline_align(_context: fidl::encoding::Context) -> usize {
7613            8
7614        }
7615
7616        #[inline(always)]
7617        fn inline_size(_context: fidl::encoding::Context) -> usize {
7618            16
7619        }
7620    }
7621
7622    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedString, D>
7623        for &AliasedString
7624    {
7625        #[inline]
7626        unsafe fn encode(
7627            self,
7628            encoder: &mut fidl::encoding::Encoder<'_, D>,
7629            offset: usize,
7630            _depth: fidl::encoding::Depth,
7631        ) -> fidl::Result<()> {
7632            encoder.debug_check_bounds::<AliasedString>(offset);
7633            // Delegate to tuple encoding.
7634            fidl::encoding::Encode::<AliasedString, D>::encode(
7635                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
7636                    &self.value,
7637                ),),
7638                encoder,
7639                offset,
7640                _depth,
7641            )
7642        }
7643    }
7644    unsafe impl<
7645        D: fidl::encoding::ResourceDialect,
7646        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
7647    > fidl::encoding::Encode<AliasedString, 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::<AliasedString>(offset);
7657            // Zero out padding regions. There's no need to apply masks
7658            // because the unmasked parts will be overwritten by fields.
7659            // Write the fields.
7660            self.0.encode(encoder, offset + 0, depth)?;
7661            Ok(())
7662        }
7663    }
7664
7665    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedString {
7666        #[inline(always)]
7667        fn new_empty() -> Self {
7668            Self { value: fidl::new_empty!(fidl::encoding::UnboundedString, 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            // Verify that padding bytes are zero.
7680            fidl::decode!(
7681                fidl::encoding::UnboundedString,
7682                D,
7683                &mut self.value,
7684                decoder,
7685                offset + 0,
7686                _depth
7687            )?;
7688            Ok(())
7689        }
7690    }
7691
7692    impl fidl::encoding::ValueTypeMarker for AliasedStruct {
7693        type Borrowed<'a> = &'a Self;
7694        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7695            value
7696        }
7697    }
7698
7699    unsafe impl fidl::encoding::TypeMarker for AliasedStruct {
7700        type Owned = Self;
7701
7702        #[inline(always)]
7703        fn inline_align(_context: fidl::encoding::Context) -> usize {
7704            1
7705        }
7706
7707        #[inline(always)]
7708        fn inline_size(_context: fidl::encoding::Context) -> usize {
7709            1
7710        }
7711    }
7712
7713    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedStruct, D>
7714        for &AliasedStruct
7715    {
7716        #[inline]
7717        unsafe fn encode(
7718            self,
7719            encoder: &mut fidl::encoding::Encoder<'_, D>,
7720            offset: usize,
7721            _depth: fidl::encoding::Depth,
7722        ) -> fidl::Result<()> {
7723            encoder.debug_check_bounds::<AliasedStruct>(offset);
7724            // Delegate to tuple encoding.
7725            fidl::encoding::Encode::<AliasedStruct, D>::encode(
7726                (<AnotherEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7727                encoder,
7728                offset,
7729                _depth,
7730            )
7731        }
7732    }
7733    unsafe impl<
7734        D: fidl::encoding::ResourceDialect,
7735        T0: fidl::encoding::Encode<AnotherEmptyStruct, D>,
7736    > fidl::encoding::Encode<AliasedStruct, D> for (T0,)
7737    {
7738        #[inline]
7739        unsafe fn encode(
7740            self,
7741            encoder: &mut fidl::encoding::Encoder<'_, D>,
7742            offset: usize,
7743            depth: fidl::encoding::Depth,
7744        ) -> fidl::Result<()> {
7745            encoder.debug_check_bounds::<AliasedStruct>(offset);
7746            // Zero out padding regions. There's no need to apply masks
7747            // because the unmasked parts will be overwritten by fields.
7748            // Write the fields.
7749            self.0.encode(encoder, offset + 0, depth)?;
7750            Ok(())
7751        }
7752    }
7753
7754    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedStruct {
7755        #[inline(always)]
7756        fn new_empty() -> Self {
7757            Self { value: fidl::new_empty!(AnotherEmptyStruct, D) }
7758        }
7759
7760        #[inline]
7761        unsafe fn decode(
7762            &mut self,
7763            decoder: &mut fidl::encoding::Decoder<'_, D>,
7764            offset: usize,
7765            _depth: fidl::encoding::Depth,
7766        ) -> fidl::Result<()> {
7767            decoder.debug_check_bounds::<Self>(offset);
7768            // Verify that padding bytes are zero.
7769            fidl::decode!(AnotherEmptyStruct, D, &mut self.value, decoder, offset + 0, _depth)?;
7770            Ok(())
7771        }
7772    }
7773
7774    impl fidl::encoding::ValueTypeMarker for AliasedUint64 {
7775        type Borrowed<'a> = &'a Self;
7776        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7777            value
7778        }
7779    }
7780
7781    unsafe impl fidl::encoding::TypeMarker for AliasedUint64 {
7782        type Owned = Self;
7783
7784        #[inline(always)]
7785        fn inline_align(_context: fidl::encoding::Context) -> usize {
7786            8
7787        }
7788
7789        #[inline(always)]
7790        fn inline_size(_context: fidl::encoding::Context) -> usize {
7791            8
7792        }
7793        #[inline(always)]
7794        fn encode_is_copy() -> bool {
7795            true
7796        }
7797
7798        #[inline(always)]
7799        fn decode_is_copy() -> bool {
7800            true
7801        }
7802    }
7803
7804    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedUint64, D>
7805        for &AliasedUint64
7806    {
7807        #[inline]
7808        unsafe fn encode(
7809            self,
7810            encoder: &mut fidl::encoding::Encoder<'_, D>,
7811            offset: usize,
7812            _depth: fidl::encoding::Depth,
7813        ) -> fidl::Result<()> {
7814            encoder.debug_check_bounds::<AliasedUint64>(offset);
7815            unsafe {
7816                // Copy the object into the buffer.
7817                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7818                (buf_ptr as *mut AliasedUint64)
7819                    .write_unaligned((self as *const AliasedUint64).read());
7820                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7821                // done second because the memcpy will write garbage to these bytes.
7822            }
7823            Ok(())
7824        }
7825    }
7826    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7827        fidl::encoding::Encode<AliasedUint64, D> for (T0,)
7828    {
7829        #[inline]
7830        unsafe fn encode(
7831            self,
7832            encoder: &mut fidl::encoding::Encoder<'_, D>,
7833            offset: usize,
7834            depth: fidl::encoding::Depth,
7835        ) -> fidl::Result<()> {
7836            encoder.debug_check_bounds::<AliasedUint64>(offset);
7837            // Zero out padding regions. There's no need to apply masks
7838            // because the unmasked parts will be overwritten by fields.
7839            // Write the fields.
7840            self.0.encode(encoder, offset + 0, depth)?;
7841            Ok(())
7842        }
7843    }
7844
7845    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedUint64 {
7846        #[inline(always)]
7847        fn new_empty() -> Self {
7848            Self { value: fidl::new_empty!(u64, D) }
7849        }
7850
7851        #[inline]
7852        unsafe fn decode(
7853            &mut self,
7854            decoder: &mut fidl::encoding::Decoder<'_, D>,
7855            offset: usize,
7856            _depth: fidl::encoding::Depth,
7857        ) -> fidl::Result<()> {
7858            decoder.debug_check_bounds::<Self>(offset);
7859            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7860            // Verify that padding bytes are zero.
7861            // Copy from the buffer into the object.
7862            unsafe {
7863                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7864            }
7865            Ok(())
7866        }
7867    }
7868
7869    impl fidl::encoding::ValueTypeMarker for AnEmptyStructInStruct {
7870        type Borrowed<'a> = &'a Self;
7871        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7872            value
7873        }
7874    }
7875
7876    unsafe impl fidl::encoding::TypeMarker for AnEmptyStructInStruct {
7877        type Owned = Self;
7878
7879        #[inline(always)]
7880        fn inline_align(_context: fidl::encoding::Context) -> usize {
7881            1
7882        }
7883
7884        #[inline(always)]
7885        fn inline_size(_context: fidl::encoding::Context) -> usize {
7886            1
7887        }
7888    }
7889
7890    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnEmptyStructInStruct, D>
7891        for &AnEmptyStructInStruct
7892    {
7893        #[inline]
7894        unsafe fn encode(
7895            self,
7896            encoder: &mut fidl::encoding::Encoder<'_, D>,
7897            offset: usize,
7898            _depth: fidl::encoding::Depth,
7899        ) -> fidl::Result<()> {
7900            encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7901            // Delegate to tuple encoding.
7902            fidl::encoding::Encode::<AnEmptyStructInStruct, D>::encode(
7903                (<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
7904                encoder,
7905                offset,
7906                _depth,
7907            )
7908        }
7909    }
7910    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStruct, D>>
7911        fidl::encoding::Encode<AnEmptyStructInStruct, D> for (T0,)
7912    {
7913        #[inline]
7914        unsafe fn encode(
7915            self,
7916            encoder: &mut fidl::encoding::Encoder<'_, D>,
7917            offset: usize,
7918            depth: fidl::encoding::Depth,
7919        ) -> fidl::Result<()> {
7920            encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7921            // Zero out padding regions. There's no need to apply masks
7922            // because the unmasked parts will be overwritten by fields.
7923            // Write the fields.
7924            self.0.encode(encoder, offset + 0, depth)?;
7925            Ok(())
7926        }
7927    }
7928
7929    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnEmptyStructInStruct {
7930        #[inline(always)]
7931        fn new_empty() -> Self {
7932            Self { v: fidl::new_empty!(EmptyStruct, D) }
7933        }
7934
7935        #[inline]
7936        unsafe fn decode(
7937            &mut self,
7938            decoder: &mut fidl::encoding::Decoder<'_, D>,
7939            offset: usize,
7940            _depth: fidl::encoding::Depth,
7941        ) -> fidl::Result<()> {
7942            decoder.debug_check_bounds::<Self>(offset);
7943            // Verify that padding bytes are zero.
7944            fidl::decode!(EmptyStruct, D, &mut self.v, decoder, offset + 0, _depth)?;
7945            Ok(())
7946        }
7947    }
7948
7949    impl fidl::encoding::ValueTypeMarker for AnotherEmptyStruct {
7950        type Borrowed<'a> = &'a Self;
7951        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7952            value
7953        }
7954    }
7955
7956    unsafe impl fidl::encoding::TypeMarker for AnotherEmptyStruct {
7957        type Owned = Self;
7958
7959        #[inline(always)]
7960        fn inline_align(_context: fidl::encoding::Context) -> usize {
7961            1
7962        }
7963
7964        #[inline(always)]
7965        fn inline_size(_context: fidl::encoding::Context) -> usize {
7966            1
7967        }
7968    }
7969
7970    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnotherEmptyStruct, D>
7971        for &AnotherEmptyStruct
7972    {
7973        #[inline]
7974        unsafe fn encode(
7975            self,
7976            encoder: &mut fidl::encoding::Encoder<'_, D>,
7977            offset: usize,
7978            _depth: fidl::encoding::Depth,
7979        ) -> fidl::Result<()> {
7980            encoder.debug_check_bounds::<AnotherEmptyStruct>(offset);
7981            encoder.write_num(0u8, offset);
7982            Ok(())
7983        }
7984    }
7985
7986    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnotherEmptyStruct {
7987        #[inline(always)]
7988        fn new_empty() -> Self {
7989            Self
7990        }
7991
7992        #[inline]
7993        unsafe fn decode(
7994            &mut self,
7995            decoder: &mut fidl::encoding::Decoder<'_, D>,
7996            offset: usize,
7997            _depth: fidl::encoding::Depth,
7998        ) -> fidl::Result<()> {
7999            decoder.debug_check_bounds::<Self>(offset);
8000            match decoder.read_num::<u8>(offset) {
8001                0 => Ok(()),
8002                _ => Err(fidl::Error::Invalid),
8003            }
8004        }
8005    }
8006
8007    impl fidl::encoding::ValueTypeMarker for ArrayStruct {
8008        type Borrowed<'a> = &'a Self;
8009        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8010            value
8011        }
8012    }
8013
8014    unsafe impl fidl::encoding::TypeMarker for ArrayStruct {
8015        type Owned = Self;
8016
8017        #[inline(always)]
8018        fn inline_align(_context: fidl::encoding::Context) -> usize {
8019            8
8020        }
8021
8022        #[inline(always)]
8023        fn inline_size(_context: fidl::encoding::Context) -> usize {
8024            96
8025        }
8026    }
8027
8028    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArrayStruct, D>
8029        for &ArrayStruct
8030    {
8031        #[inline]
8032        unsafe fn encode(
8033            self,
8034            encoder: &mut fidl::encoding::Encoder<'_, D>,
8035            offset: usize,
8036            _depth: fidl::encoding::Depth,
8037        ) -> fidl::Result<()> {
8038            encoder.debug_check_bounds::<ArrayStruct>(offset);
8039            // Delegate to tuple encoding.
8040            fidl::encoding::Encode::<ArrayStruct, D>::encode(
8041                (
8042                    <fidl::encoding::Array<StringUnion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
8043                    <fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.optional_unions),
8044                ),
8045                encoder, offset, _depth
8046            )
8047        }
8048    }
8049    unsafe impl<
8050        D: fidl::encoding::ResourceDialect,
8051        T0: fidl::encoding::Encode<fidl::encoding::Array<StringUnion, 3>, D>,
8052        T1: fidl::encoding::Encode<
8053                fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
8054                D,
8055            >,
8056    > fidl::encoding::Encode<ArrayStruct, D> for (T0, T1)
8057    {
8058        #[inline]
8059        unsafe fn encode(
8060            self,
8061            encoder: &mut fidl::encoding::Encoder<'_, D>,
8062            offset: usize,
8063            depth: fidl::encoding::Depth,
8064        ) -> fidl::Result<()> {
8065            encoder.debug_check_bounds::<ArrayStruct>(offset);
8066            // Zero out padding regions. There's no need to apply masks
8067            // because the unmasked parts will be overwritten by fields.
8068            // Write the fields.
8069            self.0.encode(encoder, offset + 0, depth)?;
8070            self.1.encode(encoder, offset + 48, depth)?;
8071            Ok(())
8072        }
8073    }
8074
8075    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArrayStruct {
8076        #[inline(always)]
8077        fn new_empty() -> Self {
8078            Self {
8079                unions: fidl::new_empty!(fidl::encoding::Array<StringUnion, 3>, D),
8080                optional_unions: fidl::new_empty!(
8081                    fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
8082                    D
8083                ),
8084            }
8085        }
8086
8087        #[inline]
8088        unsafe fn decode(
8089            &mut self,
8090            decoder: &mut fidl::encoding::Decoder<'_, D>,
8091            offset: usize,
8092            _depth: fidl::encoding::Depth,
8093        ) -> fidl::Result<()> {
8094            decoder.debug_check_bounds::<Self>(offset);
8095            // Verify that padding bytes are zero.
8096            fidl::decode!(fidl::encoding::Array<StringUnion, 3>, D, &mut self.unions, decoder, offset + 0, _depth)?;
8097            fidl::decode!(
8098                fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
8099                D,
8100                &mut self.optional_unions,
8101                decoder,
8102                offset + 48,
8103                _depth
8104            )?;
8105            Ok(())
8106        }
8107    }
8108
8109    impl fidl::encoding::ValueTypeMarker for ArrayWithInternalPadding {
8110        type Borrowed<'a> = &'a Self;
8111        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8112            value
8113        }
8114    }
8115
8116    unsafe impl fidl::encoding::TypeMarker for ArrayWithInternalPadding {
8117        type Owned = Self;
8118
8119        #[inline(always)]
8120        fn inline_align(_context: fidl::encoding::Context) -> usize {
8121            4
8122        }
8123
8124        #[inline(always)]
8125        fn inline_size(_context: fidl::encoding::Context) -> usize {
8126            16
8127        }
8128    }
8129
8130    unsafe impl<D: fidl::encoding::ResourceDialect>
8131        fidl::encoding::Encode<ArrayWithInternalPadding, D> for &ArrayWithInternalPadding
8132    {
8133        #[inline]
8134        unsafe fn encode(
8135            self,
8136            encoder: &mut fidl::encoding::Encoder<'_, D>,
8137            offset: usize,
8138            _depth: fidl::encoding::Depth,
8139        ) -> fidl::Result<()> {
8140            encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
8141            unsafe {
8142                // Copy the object into the buffer.
8143                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8144                (buf_ptr as *mut ArrayWithInternalPadding)
8145                    .write_unaligned((self as *const ArrayWithInternalPadding).read());
8146                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8147                // done second because the memcpy will write garbage to these bytes.
8148                let padding_ptr = buf_ptr.offset(0) as *mut u32;
8149                let padding_mask = 0xff000000u32;
8150                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
8151                let padding_ptr = buf_ptr.offset(8) as *mut u32;
8152                let padding_mask = 0xff000000u32;
8153                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
8154            }
8155            Ok(())
8156        }
8157    }
8158    unsafe impl<
8159        D: fidl::encoding::ResourceDialect,
8160        T0: fidl::encoding::Encode<fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D>,
8161    > fidl::encoding::Encode<ArrayWithInternalPadding, D> for (T0,)
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::<ArrayWithInternalPadding>(offset);
8171            // Zero out padding regions. There's no need to apply masks
8172            // because the unmasked parts will be overwritten by fields.
8173            // Write the fields.
8174            self.0.encode(encoder, offset + 0, depth)?;
8175            Ok(())
8176        }
8177    }
8178
8179    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8180        for ArrayWithInternalPadding
8181    {
8182        #[inline(always)]
8183        fn new_empty() -> Self {
8184            Self {
8185                v: fidl::new_empty!(fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D),
8186            }
8187        }
8188
8189        #[inline]
8190        unsafe fn decode(
8191            &mut self,
8192            decoder: &mut fidl::encoding::Decoder<'_, D>,
8193            offset: usize,
8194            _depth: fidl::encoding::Depth,
8195        ) -> fidl::Result<()> {
8196            decoder.debug_check_bounds::<Self>(offset);
8197            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8198            // Verify that padding bytes are zero.
8199            let ptr = unsafe { buf_ptr.offset(0) };
8200            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8201            let mask = 0xff000000u32;
8202            let maskedval = padval & mask;
8203            if maskedval != 0 {
8204                return Err(fidl::Error::NonZeroPadding {
8205                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8206                });
8207            }
8208            let ptr = unsafe { buf_ptr.offset(8) };
8209            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8210            let mask = 0xff000000u32;
8211            let maskedval = padval & mask;
8212            if maskedval != 0 {
8213                return Err(fidl::Error::NonZeroPadding {
8214                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8215                });
8216            }
8217            // Copy from the buffer into the object.
8218            unsafe {
8219                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
8220            }
8221            Ok(())
8222        }
8223    }
8224
8225    impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableString {
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 Bounded32NonnullableString {
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<Bounded32NonnullableString, D> for &Bounded32NonnullableString
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::<Bounded32NonnullableString>(offset);
8257            // Delegate to tuple encoding.
8258            fidl::encoding::Encode::<Bounded32NonnullableString, D>::encode(
8259                (<fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
8260                    &self.s0,
8261                ),),
8262                encoder,
8263                offset,
8264                _depth,
8265            )
8266        }
8267    }
8268    unsafe impl<
8269        D: fidl::encoding::ResourceDialect,
8270        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
8271    > fidl::encoding::Encode<Bounded32NonnullableString, D> for (T0,)
8272    {
8273        #[inline]
8274        unsafe fn encode(
8275            self,
8276            encoder: &mut fidl::encoding::Encoder<'_, D>,
8277            offset: usize,
8278            depth: fidl::encoding::Depth,
8279        ) -> fidl::Result<()> {
8280            encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8281            // Zero out padding regions. There's no need to apply masks
8282            // because the unmasked parts will be overwritten by fields.
8283            // Write the fields.
8284            self.0.encode(encoder, offset + 0, depth)?;
8285            Ok(())
8286        }
8287    }
8288
8289    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8290        for Bounded32NonnullableString
8291    {
8292        #[inline(always)]
8293        fn new_empty() -> Self {
8294            Self { s0: fidl::new_empty!(fidl::encoding::BoundedString<32>, D) }
8295        }
8296
8297        #[inline]
8298        unsafe fn decode(
8299            &mut self,
8300            decoder: &mut fidl::encoding::Decoder<'_, D>,
8301            offset: usize,
8302            _depth: fidl::encoding::Depth,
8303        ) -> fidl::Result<()> {
8304            decoder.debug_check_bounds::<Self>(offset);
8305            // Verify that padding bytes are zero.
8306            fidl::decode!(
8307                fidl::encoding::BoundedString<32>,
8308                D,
8309                &mut self.s0,
8310                decoder,
8311                offset + 0,
8312                _depth
8313            )?;
8314            Ok(())
8315        }
8316    }
8317
8318    impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableVectorOfUint32s {
8319        type Borrowed<'a> = &'a Self;
8320        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8321            value
8322        }
8323    }
8324
8325    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfUint32s {
8326        type Owned = Self;
8327
8328        #[inline(always)]
8329        fn inline_align(_context: fidl::encoding::Context) -> usize {
8330            8
8331        }
8332
8333        #[inline(always)]
8334        fn inline_size(_context: fidl::encoding::Context) -> usize {
8335            16
8336        }
8337    }
8338
8339    unsafe impl<D: fidl::encoding::ResourceDialect>
8340        fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D>
8341        for &Bounded32NonnullableVectorOfUint32s
8342    {
8343        #[inline]
8344        unsafe fn encode(
8345            self,
8346            encoder: &mut fidl::encoding::Encoder<'_, D>,
8347            offset: usize,
8348            _depth: fidl::encoding::Depth,
8349        ) -> fidl::Result<()> {
8350            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8351            // Delegate to tuple encoding.
8352            fidl::encoding::Encode::<Bounded32NonnullableVectorOfUint32s, D>::encode(
8353                (<fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
8354                    &self.vu0,
8355                ),),
8356                encoder,
8357                offset,
8358                _depth,
8359            )
8360        }
8361    }
8362    unsafe impl<
8363        D: fidl::encoding::ResourceDialect,
8364        T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
8365    > fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D> for (T0,)
8366    {
8367        #[inline]
8368        unsafe fn encode(
8369            self,
8370            encoder: &mut fidl::encoding::Encoder<'_, D>,
8371            offset: usize,
8372            depth: fidl::encoding::Depth,
8373        ) -> fidl::Result<()> {
8374            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8375            // Zero out padding regions. There's no need to apply masks
8376            // because the unmasked parts will be overwritten by fields.
8377            // Write the fields.
8378            self.0.encode(encoder, offset + 0, depth)?;
8379            Ok(())
8380        }
8381    }
8382
8383    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8384        for Bounded32NonnullableVectorOfUint32s
8385    {
8386        #[inline(always)]
8387        fn new_empty() -> Self {
8388            Self { vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D) }
8389        }
8390
8391        #[inline]
8392        unsafe fn decode(
8393            &mut self,
8394            decoder: &mut fidl::encoding::Decoder<'_, D>,
8395            offset: usize,
8396            _depth: fidl::encoding::Depth,
8397        ) -> fidl::Result<()> {
8398            decoder.debug_check_bounds::<Self>(offset);
8399            // Verify that padding bytes are zero.
8400            fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
8401            Ok(())
8402        }
8403    }
8404
8405    impl fidl::encoding::ValueTypeMarker for Bounded32NullableString {
8406        type Borrowed<'a> = &'a Self;
8407        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8408            value
8409        }
8410    }
8411
8412    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableString {
8413        type Owned = Self;
8414
8415        #[inline(always)]
8416        fn inline_align(_context: fidl::encoding::Context) -> usize {
8417            8
8418        }
8419
8420        #[inline(always)]
8421        fn inline_size(_context: fidl::encoding::Context) -> usize {
8422            16
8423        }
8424    }
8425
8426    unsafe impl<D: fidl::encoding::ResourceDialect>
8427        fidl::encoding::Encode<Bounded32NullableString, D> for &Bounded32NullableString
8428    {
8429        #[inline]
8430        unsafe fn encode(
8431            self,
8432            encoder: &mut fidl::encoding::Encoder<'_, D>,
8433            offset: usize,
8434            _depth: fidl::encoding::Depth,
8435        ) -> fidl::Result<()> {
8436            encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8437            // Delegate to tuple encoding.
8438            fidl::encoding::Encode::<Bounded32NullableString, D>::encode(
8439                (
8440                    <fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
8441                ),
8442                encoder, offset, _depth
8443            )
8444        }
8445    }
8446    unsafe impl<
8447        D: fidl::encoding::ResourceDialect,
8448        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
8449    > fidl::encoding::Encode<Bounded32NullableString, D> for (T0,)
8450    {
8451        #[inline]
8452        unsafe fn encode(
8453            self,
8454            encoder: &mut fidl::encoding::Encoder<'_, D>,
8455            offset: usize,
8456            depth: fidl::encoding::Depth,
8457        ) -> fidl::Result<()> {
8458            encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8459            // Zero out padding regions. There's no need to apply masks
8460            // because the unmasked parts will be overwritten by fields.
8461            // Write the fields.
8462            self.0.encode(encoder, offset + 0, depth)?;
8463            Ok(())
8464        }
8465    }
8466
8467    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8468        for Bounded32NullableString
8469    {
8470        #[inline(always)]
8471        fn new_empty() -> Self {
8472            Self {
8473                s0: fidl::new_empty!(
8474                    fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8475                    D
8476                ),
8477            }
8478        }
8479
8480        #[inline]
8481        unsafe fn decode(
8482            &mut self,
8483            decoder: &mut fidl::encoding::Decoder<'_, D>,
8484            offset: usize,
8485            _depth: fidl::encoding::Depth,
8486        ) -> fidl::Result<()> {
8487            decoder.debug_check_bounds::<Self>(offset);
8488            // Verify that padding bytes are zero.
8489            fidl::decode!(
8490                fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8491                D,
8492                &mut self.s0,
8493                decoder,
8494                offset + 0,
8495                _depth
8496            )?;
8497            Ok(())
8498        }
8499    }
8500
8501    impl fidl::encoding::ValueTypeMarker for Bounded32NullableVectorOfUint32s {
8502        type Borrowed<'a> = &'a Self;
8503        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8504            value
8505        }
8506    }
8507
8508    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfUint32s {
8509        type Owned = Self;
8510
8511        #[inline(always)]
8512        fn inline_align(_context: fidl::encoding::Context) -> usize {
8513            8
8514        }
8515
8516        #[inline(always)]
8517        fn inline_size(_context: fidl::encoding::Context) -> usize {
8518            16
8519        }
8520    }
8521
8522    unsafe impl<D: fidl::encoding::ResourceDialect>
8523        fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D>
8524        for &Bounded32NullableVectorOfUint32s
8525    {
8526        #[inline]
8527        unsafe fn encode(
8528            self,
8529            encoder: &mut fidl::encoding::Encoder<'_, D>,
8530            offset: usize,
8531            _depth: fidl::encoding::Depth,
8532        ) -> fidl::Result<()> {
8533            encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8534            // Delegate to tuple encoding.
8535            fidl::encoding::Encode::<Bounded32NullableVectorOfUint32s, D>::encode(
8536                (
8537                    <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
8538                ),
8539                encoder, offset, _depth
8540            )
8541        }
8542    }
8543    unsafe impl<
8544        D: fidl::encoding::ResourceDialect,
8545        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
8546    > fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D> for (T0,)
8547    {
8548        #[inline]
8549        unsafe fn encode(
8550            self,
8551            encoder: &mut fidl::encoding::Encoder<'_, D>,
8552            offset: usize,
8553            depth: fidl::encoding::Depth,
8554        ) -> fidl::Result<()> {
8555            encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8556            // Zero out padding regions. There's no need to apply masks
8557            // because the unmasked parts will be overwritten by fields.
8558            // Write the fields.
8559            self.0.encode(encoder, offset + 0, depth)?;
8560            Ok(())
8561        }
8562    }
8563
8564    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8565        for Bounded32NullableVectorOfUint32s
8566    {
8567        #[inline(always)]
8568        fn new_empty() -> Self {
8569            Self {
8570                vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
8571            }
8572        }
8573
8574        #[inline]
8575        unsafe fn decode(
8576            &mut self,
8577            decoder: &mut fidl::encoding::Decoder<'_, D>,
8578            offset: usize,
8579            _depth: fidl::encoding::Depth,
8580        ) -> fidl::Result<()> {
8581            decoder.debug_check_bounds::<Self>(offset);
8582            // Verify that padding bytes are zero.
8583            fidl::decode!(
8584                fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
8585                D,
8586                &mut self.vu0,
8587                decoder,
8588                offset + 0,
8589                _depth
8590            )?;
8591            Ok(())
8592        }
8593    }
8594
8595    impl fidl::encoding::ValueTypeMarker for CompatTable {
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 CompatTable {
8603        type Owned = Self;
8604
8605        #[inline(always)]
8606        fn inline_align(_context: fidl::encoding::Context) -> usize {
8607            8
8608        }
8609
8610        #[inline(always)]
8611        fn inline_size(_context: fidl::encoding::Context) -> usize {
8612            32
8613        }
8614    }
8615
8616    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTable, D>
8617        for &CompatTable
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::<CompatTable>(offset);
8627            // Delegate to tuple encoding.
8628            fidl::encoding::Encode::<CompatTable, D>::encode(
8629                (
8630                    <CompatTableValue as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
8631                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8632                        &self.empty,
8633                    ),
8634                ),
8635                encoder,
8636                offset,
8637                _depth,
8638            )
8639        }
8640    }
8641    unsafe impl<
8642        D: fidl::encoding::ResourceDialect,
8643        T0: fidl::encoding::Encode<CompatTableValue, D>,
8644        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8645    > fidl::encoding::Encode<CompatTable, D> for (T0, T1)
8646    {
8647        #[inline]
8648        unsafe fn encode(
8649            self,
8650            encoder: &mut fidl::encoding::Encoder<'_, D>,
8651            offset: usize,
8652            depth: fidl::encoding::Depth,
8653        ) -> fidl::Result<()> {
8654            encoder.debug_check_bounds::<CompatTable>(offset);
8655            // Zero out padding regions. There's no need to apply masks
8656            // because the unmasked parts will be overwritten by fields.
8657            // Write the fields.
8658            self.0.encode(encoder, offset + 0, depth)?;
8659            self.1.encode(encoder, offset + 16, depth)?;
8660            Ok(())
8661        }
8662    }
8663
8664    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTable {
8665        #[inline(always)]
8666        fn new_empty() -> Self {
8667            Self {
8668                value: fidl::new_empty!(CompatTableValue, D),
8669                empty: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8670            }
8671        }
8672
8673        #[inline]
8674        unsafe fn decode(
8675            &mut self,
8676            decoder: &mut fidl::encoding::Decoder<'_, D>,
8677            offset: usize,
8678            _depth: fidl::encoding::Depth,
8679        ) -> fidl::Result<()> {
8680            decoder.debug_check_bounds::<Self>(offset);
8681            // Verify that padding bytes are zero.
8682            fidl::decode!(CompatTableValue, D, &mut self.value, decoder, offset + 0, _depth)?;
8683            fidl::decode!(
8684                fidl::encoding::UnboundedString,
8685                D,
8686                &mut self.empty,
8687                decoder,
8688                offset + 16,
8689                _depth
8690            )?;
8691            Ok(())
8692        }
8693    }
8694
8695    impl fidl::encoding::ValueTypeMarker for EmptyBitsStruct {
8696        type Borrowed<'a> = &'a Self;
8697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8698            value
8699        }
8700    }
8701
8702    unsafe impl fidl::encoding::TypeMarker for EmptyBitsStruct {
8703        type Owned = Self;
8704
8705        #[inline(always)]
8706        fn inline_align(_context: fidl::encoding::Context) -> usize {
8707            4
8708        }
8709
8710        #[inline(always)]
8711        fn inline_size(_context: fidl::encoding::Context) -> usize {
8712            4
8713        }
8714    }
8715
8716    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyBitsStruct, D>
8717        for &EmptyBitsStruct
8718    {
8719        #[inline]
8720        unsafe fn encode(
8721            self,
8722            encoder: &mut fidl::encoding::Encoder<'_, D>,
8723            offset: usize,
8724            _depth: fidl::encoding::Depth,
8725        ) -> fidl::Result<()> {
8726            encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8727            // Delegate to tuple encoding.
8728            fidl::encoding::Encode::<EmptyBitsStruct, D>::encode(
8729                (<EmptyBits as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
8730                encoder,
8731                offset,
8732                _depth,
8733            )
8734        }
8735    }
8736    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyBits, D>>
8737        fidl::encoding::Encode<EmptyBitsStruct, D> for (T0,)
8738    {
8739        #[inline]
8740        unsafe fn encode(
8741            self,
8742            encoder: &mut fidl::encoding::Encoder<'_, D>,
8743            offset: usize,
8744            depth: fidl::encoding::Depth,
8745        ) -> fidl::Result<()> {
8746            encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8747            // Zero out padding regions. There's no need to apply masks
8748            // because the unmasked parts will be overwritten by fields.
8749            // Write the fields.
8750            self.0.encode(encoder, offset + 0, depth)?;
8751            Ok(())
8752        }
8753    }
8754
8755    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBitsStruct {
8756        #[inline(always)]
8757        fn new_empty() -> Self {
8758            Self { b: fidl::new_empty!(EmptyBits, D) }
8759        }
8760
8761        #[inline]
8762        unsafe fn decode(
8763            &mut self,
8764            decoder: &mut fidl::encoding::Decoder<'_, D>,
8765            offset: usize,
8766            _depth: fidl::encoding::Depth,
8767        ) -> fidl::Result<()> {
8768            decoder.debug_check_bounds::<Self>(offset);
8769            // Verify that padding bytes are zero.
8770            fidl::decode!(EmptyBits, D, &mut self.b, decoder, offset + 0, _depth)?;
8771            Ok(())
8772        }
8773    }
8774
8775    impl fidl::encoding::ValueTypeMarker for EmptyEnumStruct {
8776        type Borrowed<'a> = &'a Self;
8777        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8778            value
8779        }
8780    }
8781
8782    unsafe impl fidl::encoding::TypeMarker for EmptyEnumStruct {
8783        type Owned = Self;
8784
8785        #[inline(always)]
8786        fn inline_align(_context: fidl::encoding::Context) -> usize {
8787            4
8788        }
8789
8790        #[inline(always)]
8791        fn inline_size(_context: fidl::encoding::Context) -> usize {
8792            4
8793        }
8794    }
8795
8796    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyEnumStruct, D>
8797        for &EmptyEnumStruct
8798    {
8799        #[inline]
8800        unsafe fn encode(
8801            self,
8802            encoder: &mut fidl::encoding::Encoder<'_, D>,
8803            offset: usize,
8804            _depth: fidl::encoding::Depth,
8805        ) -> fidl::Result<()> {
8806            encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8807            // Delegate to tuple encoding.
8808            fidl::encoding::Encode::<EmptyEnumStruct, D>::encode(
8809                (<EmptyEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
8810                encoder,
8811                offset,
8812                _depth,
8813            )
8814        }
8815    }
8816    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyEnum, D>>
8817        fidl::encoding::Encode<EmptyEnumStruct, D> for (T0,)
8818    {
8819        #[inline]
8820        unsafe fn encode(
8821            self,
8822            encoder: &mut fidl::encoding::Encoder<'_, D>,
8823            offset: usize,
8824            depth: fidl::encoding::Depth,
8825        ) -> fidl::Result<()> {
8826            encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8827            // Zero out padding regions. There's no need to apply masks
8828            // because the unmasked parts will be overwritten by fields.
8829            // Write the fields.
8830            self.0.encode(encoder, offset + 0, depth)?;
8831            Ok(())
8832        }
8833    }
8834
8835    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnumStruct {
8836        #[inline(always)]
8837        fn new_empty() -> Self {
8838            Self { e: fidl::new_empty!(EmptyEnum, D) }
8839        }
8840
8841        #[inline]
8842        unsafe fn decode(
8843            &mut self,
8844            decoder: &mut fidl::encoding::Decoder<'_, D>,
8845            offset: usize,
8846            _depth: fidl::encoding::Depth,
8847        ) -> fidl::Result<()> {
8848            decoder.debug_check_bounds::<Self>(offset);
8849            // Verify that padding bytes are zero.
8850            fidl::decode!(EmptyEnum, D, &mut self.e, decoder, offset + 0, _depth)?;
8851            Ok(())
8852        }
8853    }
8854
8855    impl fidl::encoding::ValueTypeMarker for EmptyStruct {
8856        type Borrowed<'a> = &'a Self;
8857        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8858            value
8859        }
8860    }
8861
8862    unsafe impl fidl::encoding::TypeMarker for EmptyStruct {
8863        type Owned = Self;
8864
8865        #[inline(always)]
8866        fn inline_align(_context: fidl::encoding::Context) -> usize {
8867            1
8868        }
8869
8870        #[inline(always)]
8871        fn inline_size(_context: fidl::encoding::Context) -> usize {
8872            1
8873        }
8874    }
8875
8876    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStruct, D>
8877        for &EmptyStruct
8878    {
8879        #[inline]
8880        unsafe fn encode(
8881            self,
8882            encoder: &mut fidl::encoding::Encoder<'_, D>,
8883            offset: usize,
8884            _depth: fidl::encoding::Depth,
8885        ) -> fidl::Result<()> {
8886            encoder.debug_check_bounds::<EmptyStruct>(offset);
8887            encoder.write_num(0u8, offset);
8888            Ok(())
8889        }
8890    }
8891
8892    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStruct {
8893        #[inline(always)]
8894        fn new_empty() -> Self {
8895            Self
8896        }
8897
8898        #[inline]
8899        unsafe fn decode(
8900            &mut self,
8901            decoder: &mut fidl::encoding::Decoder<'_, D>,
8902            offset: usize,
8903            _depth: fidl::encoding::Depth,
8904        ) -> fidl::Result<()> {
8905            decoder.debug_check_bounds::<Self>(offset);
8906            match decoder.read_num::<u8>(offset) {
8907                0 => Ok(()),
8908                _ => Err(fidl::Error::Invalid),
8909            }
8910        }
8911    }
8912
8913    impl fidl::encoding::ValueTypeMarker for EmptyStructSandwich {
8914        type Borrowed<'a> = &'a Self;
8915        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8916            value
8917        }
8918    }
8919
8920    unsafe impl fidl::encoding::TypeMarker for EmptyStructSandwich {
8921        type Owned = Self;
8922
8923        #[inline(always)]
8924        fn inline_align(_context: fidl::encoding::Context) -> usize {
8925            8
8926        }
8927
8928        #[inline(always)]
8929        fn inline_size(_context: fidl::encoding::Context) -> usize {
8930            40
8931        }
8932    }
8933
8934    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructSandwich, D>
8935        for &EmptyStructSandwich
8936    {
8937        #[inline]
8938        unsafe fn encode(
8939            self,
8940            encoder: &mut fidl::encoding::Encoder<'_, D>,
8941            offset: usize,
8942            _depth: fidl::encoding::Depth,
8943        ) -> fidl::Result<()> {
8944            encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8945            // Delegate to tuple encoding.
8946            fidl::encoding::Encode::<EmptyStructSandwich, D>::encode(
8947                (
8948                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8949                        &self.before,
8950                    ),
8951                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
8952                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8953                        &self.after,
8954                    ),
8955                ),
8956                encoder,
8957                offset,
8958                _depth,
8959            )
8960        }
8961    }
8962    unsafe impl<
8963        D: fidl::encoding::ResourceDialect,
8964        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8965        T1: fidl::encoding::Encode<EmptyStruct, D>,
8966        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8967    > fidl::encoding::Encode<EmptyStructSandwich, D> for (T0, T1, T2)
8968    {
8969        #[inline]
8970        unsafe fn encode(
8971            self,
8972            encoder: &mut fidl::encoding::Encoder<'_, D>,
8973            offset: usize,
8974            depth: fidl::encoding::Depth,
8975        ) -> fidl::Result<()> {
8976            encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8977            // Zero out padding regions. There's no need to apply masks
8978            // because the unmasked parts will be overwritten by fields.
8979            unsafe {
8980                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8981                (ptr as *mut u64).write_unaligned(0);
8982            }
8983            // Write the fields.
8984            self.0.encode(encoder, offset + 0, depth)?;
8985            self.1.encode(encoder, offset + 16, depth)?;
8986            self.2.encode(encoder, offset + 24, depth)?;
8987            Ok(())
8988        }
8989    }
8990
8991    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructSandwich {
8992        #[inline(always)]
8993        fn new_empty() -> Self {
8994            Self {
8995                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8996                es: fidl::new_empty!(EmptyStruct, D),
8997                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8998            }
8999        }
9000
9001        #[inline]
9002        unsafe fn decode(
9003            &mut self,
9004            decoder: &mut fidl::encoding::Decoder<'_, D>,
9005            offset: usize,
9006            _depth: fidl::encoding::Depth,
9007        ) -> fidl::Result<()> {
9008            decoder.debug_check_bounds::<Self>(offset);
9009            // Verify that padding bytes are zero.
9010            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9011            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9012            let mask = 0xffffffffffffff00u64;
9013            let maskedval = padval & mask;
9014            if maskedval != 0 {
9015                return Err(fidl::Error::NonZeroPadding {
9016                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9017                });
9018            }
9019            fidl::decode!(
9020                fidl::encoding::UnboundedString,
9021                D,
9022                &mut self.before,
9023                decoder,
9024                offset + 0,
9025                _depth
9026            )?;
9027            fidl::decode!(EmptyStruct, D, &mut self.es, decoder, offset + 16, _depth)?;
9028            fidl::decode!(
9029                fidl::encoding::UnboundedString,
9030                D,
9031                &mut self.after,
9032                decoder,
9033                offset + 24,
9034                _depth
9035            )?;
9036            Ok(())
9037        }
9038    }
9039
9040    impl fidl::encoding::ValueTypeMarker for EmptyStructUnionStruct {
9041        type Borrowed<'a> = &'a Self;
9042        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9043            value
9044        }
9045    }
9046
9047    unsafe impl fidl::encoding::TypeMarker for EmptyStructUnionStruct {
9048        type Owned = Self;
9049
9050        #[inline(always)]
9051        fn inline_align(_context: fidl::encoding::Context) -> usize {
9052            8
9053        }
9054
9055        #[inline(always)]
9056        fn inline_size(_context: fidl::encoding::Context) -> usize {
9057            16
9058        }
9059    }
9060
9061    unsafe impl<D: fidl::encoding::ResourceDialect>
9062        fidl::encoding::Encode<EmptyStructUnionStruct, D> for &EmptyStructUnionStruct
9063    {
9064        #[inline]
9065        unsafe fn encode(
9066            self,
9067            encoder: &mut fidl::encoding::Encoder<'_, D>,
9068            offset: usize,
9069            _depth: fidl::encoding::Depth,
9070        ) -> fidl::Result<()> {
9071            encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
9072            // Delegate to tuple encoding.
9073            fidl::encoding::Encode::<EmptyStructUnionStruct, D>::encode(
9074                (<EmptyStructUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
9075                encoder,
9076                offset,
9077                _depth,
9078            )
9079        }
9080    }
9081    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStructUnion, D>>
9082        fidl::encoding::Encode<EmptyStructUnionStruct, D> for (T0,)
9083    {
9084        #[inline]
9085        unsafe fn encode(
9086            self,
9087            encoder: &mut fidl::encoding::Encoder<'_, D>,
9088            offset: usize,
9089            depth: fidl::encoding::Depth,
9090        ) -> fidl::Result<()> {
9091            encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
9092            // Zero out padding regions. There's no need to apply masks
9093            // because the unmasked parts will be overwritten by fields.
9094            // Write the fields.
9095            self.0.encode(encoder, offset + 0, depth)?;
9096            Ok(())
9097        }
9098    }
9099
9100    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9101        for EmptyStructUnionStruct
9102    {
9103        #[inline(always)]
9104        fn new_empty() -> Self {
9105            Self { u: fidl::new_empty!(EmptyStructUnion, D) }
9106        }
9107
9108        #[inline]
9109        unsafe fn decode(
9110            &mut self,
9111            decoder: &mut fidl::encoding::Decoder<'_, D>,
9112            offset: usize,
9113            _depth: fidl::encoding::Depth,
9114        ) -> fidl::Result<()> {
9115            decoder.debug_check_bounds::<Self>(offset);
9116            // Verify that padding bytes are zero.
9117            fidl::decode!(EmptyStructUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
9118            Ok(())
9119        }
9120    }
9121
9122    impl fidl::encoding::ValueTypeMarker for EmptyStructsInArrayInStruct {
9123        type Borrowed<'a> = &'a Self;
9124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9125            value
9126        }
9127    }
9128
9129    unsafe impl fidl::encoding::TypeMarker for EmptyStructsInArrayInStruct {
9130        type Owned = Self;
9131
9132        #[inline(always)]
9133        fn inline_align(_context: fidl::encoding::Context) -> usize {
9134            1
9135        }
9136
9137        #[inline(always)]
9138        fn inline_size(_context: fidl::encoding::Context) -> usize {
9139            4
9140        }
9141    }
9142
9143    unsafe impl<D: fidl::encoding::ResourceDialect>
9144        fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for &EmptyStructsInArrayInStruct
9145    {
9146        #[inline]
9147        unsafe fn encode(
9148            self,
9149            encoder: &mut fidl::encoding::Encoder<'_, D>,
9150            offset: usize,
9151            _depth: fidl::encoding::Depth,
9152        ) -> fidl::Result<()> {
9153            encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
9154            // Delegate to tuple encoding.
9155            fidl::encoding::Encode::<EmptyStructsInArrayInStruct, D>::encode(
9156                (
9157                    <fidl::encoding::Array<EmptyStruct, 4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
9158                ),
9159                encoder, offset, _depth
9160            )
9161        }
9162    }
9163    unsafe impl<
9164        D: fidl::encoding::ResourceDialect,
9165        T0: fidl::encoding::Encode<fidl::encoding::Array<EmptyStruct, 4>, D>,
9166    > fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for (T0,)
9167    {
9168        #[inline]
9169        unsafe fn encode(
9170            self,
9171            encoder: &mut fidl::encoding::Encoder<'_, D>,
9172            offset: usize,
9173            depth: fidl::encoding::Depth,
9174        ) -> fidl::Result<()> {
9175            encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
9176            // Zero out padding regions. There's no need to apply masks
9177            // because the unmasked parts will be overwritten by fields.
9178            // Write the fields.
9179            self.0.encode(encoder, offset + 0, depth)?;
9180            Ok(())
9181        }
9182    }
9183
9184    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9185        for EmptyStructsInArrayInStruct
9186    {
9187        #[inline(always)]
9188        fn new_empty() -> Self {
9189            Self { v: fidl::new_empty!(fidl::encoding::Array<EmptyStruct, 4>, D) }
9190        }
9191
9192        #[inline]
9193        unsafe fn decode(
9194            &mut self,
9195            decoder: &mut fidl::encoding::Decoder<'_, D>,
9196            offset: usize,
9197            _depth: fidl::encoding::Depth,
9198        ) -> fidl::Result<()> {
9199            decoder.debug_check_bounds::<Self>(offset);
9200            // Verify that padding bytes are zero.
9201            fidl::decode!(fidl::encoding::Array<EmptyStruct, 4>, D, &mut self.v, decoder, offset + 0, _depth)?;
9202            Ok(())
9203        }
9204    }
9205
9206    impl fidl::encoding::ValueTypeMarker for EmptyStructsInVectorInStruct {
9207        type Borrowed<'a> = &'a Self;
9208        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9209            value
9210        }
9211    }
9212
9213    unsafe impl fidl::encoding::TypeMarker for EmptyStructsInVectorInStruct {
9214        type Owned = Self;
9215
9216        #[inline(always)]
9217        fn inline_align(_context: fidl::encoding::Context) -> usize {
9218            8
9219        }
9220
9221        #[inline(always)]
9222        fn inline_size(_context: fidl::encoding::Context) -> usize {
9223            16
9224        }
9225    }
9226
9227    unsafe impl<D: fidl::encoding::ResourceDialect>
9228        fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for &EmptyStructsInVectorInStruct
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::<EmptyStructsInVectorInStruct>(offset);
9238            // Delegate to tuple encoding.
9239            fidl::encoding::Encode::<EmptyStructsInVectorInStruct, D>::encode(
9240                (
9241                    <fidl::encoding::UnboundedVector<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
9242                ),
9243                encoder, offset, _depth
9244            )
9245        }
9246    }
9247    unsafe impl<
9248        D: fidl::encoding::ResourceDialect,
9249        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<EmptyStruct>, D>,
9250    > fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for (T0,)
9251    {
9252        #[inline]
9253        unsafe fn encode(
9254            self,
9255            encoder: &mut fidl::encoding::Encoder<'_, D>,
9256            offset: usize,
9257            depth: fidl::encoding::Depth,
9258        ) -> fidl::Result<()> {
9259            encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9260            // Zero out padding regions. There's no need to apply masks
9261            // because the unmasked parts will be overwritten by fields.
9262            // Write the fields.
9263            self.0.encode(encoder, offset + 0, depth)?;
9264            Ok(())
9265        }
9266    }
9267
9268    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9269        for EmptyStructsInVectorInStruct
9270    {
9271        #[inline(always)]
9272        fn new_empty() -> Self {
9273            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<EmptyStruct>, D) }
9274        }
9275
9276        #[inline]
9277        unsafe fn decode(
9278            &mut self,
9279            decoder: &mut fidl::encoding::Decoder<'_, D>,
9280            offset: usize,
9281            _depth: fidl::encoding::Depth,
9282        ) -> fidl::Result<()> {
9283            decoder.debug_check_bounds::<Self>(offset);
9284            // Verify that padding bytes are zero.
9285            fidl::decode!(
9286                fidl::encoding::UnboundedVector<EmptyStruct>,
9287                D,
9288                &mut self.v,
9289                decoder,
9290                offset + 0,
9291                _depth
9292            )?;
9293            Ok(())
9294        }
9295    }
9296
9297    impl fidl::encoding::ValueTypeMarker for FidlvizStruct1 {
9298        type Borrowed<'a> = &'a Self;
9299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9300            value
9301        }
9302    }
9303
9304    unsafe impl fidl::encoding::TypeMarker for FidlvizStruct1 {
9305        type Owned = Self;
9306
9307        #[inline(always)]
9308        fn inline_align(_context: fidl::encoding::Context) -> usize {
9309            1
9310        }
9311
9312        #[inline(always)]
9313        fn inline_size(_context: fidl::encoding::Context) -> usize {
9314            1
9315        }
9316    }
9317
9318    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct1, D>
9319        for &FidlvizStruct1
9320    {
9321        #[inline]
9322        unsafe fn encode(
9323            self,
9324            encoder: &mut fidl::encoding::Encoder<'_, D>,
9325            offset: usize,
9326            _depth: fidl::encoding::Depth,
9327        ) -> fidl::Result<()> {
9328            encoder.debug_check_bounds::<FidlvizStruct1>(offset);
9329            encoder.write_num(0u8, offset);
9330            Ok(())
9331        }
9332    }
9333
9334    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct1 {
9335        #[inline(always)]
9336        fn new_empty() -> Self {
9337            Self
9338        }
9339
9340        #[inline]
9341        unsafe fn decode(
9342            &mut self,
9343            decoder: &mut fidl::encoding::Decoder<'_, D>,
9344            offset: usize,
9345            _depth: fidl::encoding::Depth,
9346        ) -> fidl::Result<()> {
9347            decoder.debug_check_bounds::<Self>(offset);
9348            match decoder.read_num::<u8>(offset) {
9349                0 => Ok(()),
9350                _ => Err(fidl::Error::Invalid),
9351            }
9352        }
9353    }
9354
9355    impl fidl::encoding::ValueTypeMarker for FidlvizStruct2 {
9356        type Borrowed<'a> = &'a Self;
9357        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9358            value
9359        }
9360    }
9361
9362    unsafe impl fidl::encoding::TypeMarker for FidlvizStruct2 {
9363        type Owned = Self;
9364
9365        #[inline(always)]
9366        fn inline_align(_context: fidl::encoding::Context) -> usize {
9367            8
9368        }
9369
9370        #[inline(always)]
9371        fn inline_size(_context: fidl::encoding::Context) -> usize {
9372            8
9373        }
9374        #[inline(always)]
9375        fn encode_is_copy() -> bool {
9376            true
9377        }
9378
9379        #[inline(always)]
9380        fn decode_is_copy() -> bool {
9381            true
9382        }
9383    }
9384
9385    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct2, D>
9386        for &FidlvizStruct2
9387    {
9388        #[inline]
9389        unsafe fn encode(
9390            self,
9391            encoder: &mut fidl::encoding::Encoder<'_, D>,
9392            offset: usize,
9393            _depth: fidl::encoding::Depth,
9394        ) -> fidl::Result<()> {
9395            encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9396            unsafe {
9397                // Copy the object into the buffer.
9398                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9399                (buf_ptr as *mut FidlvizStruct2)
9400                    .write_unaligned((self as *const FidlvizStruct2).read());
9401                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9402                // done second because the memcpy will write garbage to these bytes.
9403            }
9404            Ok(())
9405        }
9406    }
9407    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9408        fidl::encoding::Encode<FidlvizStruct2, D> for (T0,)
9409    {
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::<FidlvizStruct2>(offset);
9418            // Zero out padding regions. There's no need to apply masks
9419            // because the unmasked parts will be overwritten by fields.
9420            // Write the fields.
9421            self.0.encode(encoder, offset + 0, depth)?;
9422            Ok(())
9423        }
9424    }
9425
9426    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct2 {
9427        #[inline(always)]
9428        fn new_empty() -> Self {
9429            Self { x: fidl::new_empty!(u64, D) }
9430        }
9431
9432        #[inline]
9433        unsafe fn decode(
9434            &mut self,
9435            decoder: &mut fidl::encoding::Decoder<'_, D>,
9436            offset: usize,
9437            _depth: fidl::encoding::Depth,
9438        ) -> fidl::Result<()> {
9439            decoder.debug_check_bounds::<Self>(offset);
9440            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9441            // Verify that padding bytes are zero.
9442            // Copy from the buffer into the object.
9443            unsafe {
9444                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9445            }
9446            Ok(())
9447        }
9448    }
9449
9450    impl fidl::encoding::ValueTypeMarker for FileGetAttrResponse {
9451        type Borrowed<'a> = &'a Self;
9452        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9453            value
9454        }
9455    }
9456
9457    unsafe impl fidl::encoding::TypeMarker for FileGetAttrResponse {
9458        type Owned = Self;
9459
9460        #[inline(always)]
9461        fn inline_align(_context: fidl::encoding::Context) -> usize {
9462            8
9463        }
9464
9465        #[inline(always)]
9466        fn inline_size(_context: fidl::encoding::Context) -> usize {
9467            64
9468        }
9469    }
9470
9471    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FileGetAttrResponse, D>
9472        for &FileGetAttrResponse
9473    {
9474        #[inline]
9475        unsafe fn encode(
9476            self,
9477            encoder: &mut fidl::encoding::Encoder<'_, D>,
9478            offset: usize,
9479            _depth: fidl::encoding::Depth,
9480        ) -> fidl::Result<()> {
9481            encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9482            unsafe {
9483                // Copy the object into the buffer.
9484                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9485                (buf_ptr as *mut FileGetAttrResponse)
9486                    .write_unaligned((self as *const FileGetAttrResponse).read());
9487                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9488                // done second because the memcpy will write garbage to these bytes.
9489                let padding_ptr = buf_ptr.offset(0) as *mut u64;
9490                let padding_mask = 0xffffffff00000000u64;
9491                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9492                let padding_ptr = buf_ptr.offset(8) as *mut u64;
9493                let padding_mask = 0xffffffff00000000u64;
9494                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9495            }
9496            Ok(())
9497        }
9498    }
9499    unsafe impl<
9500        D: fidl::encoding::ResourceDialect,
9501        T0: fidl::encoding::Encode<i32, D>,
9502        T1: fidl::encoding::Encode<NodeAttributes, D>,
9503    > fidl::encoding::Encode<FileGetAttrResponse, D> for (T0, T1)
9504    {
9505        #[inline]
9506        unsafe fn encode(
9507            self,
9508            encoder: &mut fidl::encoding::Encoder<'_, D>,
9509            offset: usize,
9510            depth: fidl::encoding::Depth,
9511        ) -> fidl::Result<()> {
9512            encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9513            // Zero out padding regions. There's no need to apply masks
9514            // because the unmasked parts will be overwritten by fields.
9515            unsafe {
9516                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9517                (ptr as *mut u64).write_unaligned(0);
9518            }
9519            // Write the fields.
9520            self.0.encode(encoder, offset + 0, depth)?;
9521            self.1.encode(encoder, offset + 8, depth)?;
9522            Ok(())
9523        }
9524    }
9525
9526    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FileGetAttrResponse {
9527        #[inline(always)]
9528        fn new_empty() -> Self {
9529            Self { s: fidl::new_empty!(i32, D), attributes: fidl::new_empty!(NodeAttributes, D) }
9530        }
9531
9532        #[inline]
9533        unsafe fn decode(
9534            &mut self,
9535            decoder: &mut fidl::encoding::Decoder<'_, D>,
9536            offset: usize,
9537            _depth: fidl::encoding::Depth,
9538        ) -> fidl::Result<()> {
9539            decoder.debug_check_bounds::<Self>(offset);
9540            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9541            // Verify that padding bytes are zero.
9542            let ptr = unsafe { buf_ptr.offset(0) };
9543            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9544            let mask = 0xffffffff00000000u64;
9545            let maskedval = padval & mask;
9546            if maskedval != 0 {
9547                return Err(fidl::Error::NonZeroPadding {
9548                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9549                });
9550            }
9551            let ptr = unsafe { buf_ptr.offset(8) };
9552            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9553            let mask = 0xffffffff00000000u64;
9554            let maskedval = padval & mask;
9555            if maskedval != 0 {
9556                return Err(fidl::Error::NonZeroPadding {
9557                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9558                });
9559            }
9560            // Copy from the buffer into the object.
9561            unsafe {
9562                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 64);
9563            }
9564            Ok(())
9565        }
9566    }
9567
9568    impl fidl::encoding::ValueTypeMarker for FiveByte {
9569        type Borrowed<'a> = &'a Self;
9570        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9571            value
9572        }
9573    }
9574
9575    unsafe impl fidl::encoding::TypeMarker for FiveByte {
9576        type Owned = Self;
9577
9578        #[inline(always)]
9579        fn inline_align(_context: fidl::encoding::Context) -> usize {
9580            4
9581        }
9582
9583        #[inline(always)]
9584        fn inline_size(_context: fidl::encoding::Context) -> usize {
9585            8
9586        }
9587    }
9588
9589    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByte, D> for &FiveByte {
9590        #[inline]
9591        unsafe fn encode(
9592            self,
9593            encoder: &mut fidl::encoding::Encoder<'_, D>,
9594            offset: usize,
9595            _depth: fidl::encoding::Depth,
9596        ) -> fidl::Result<()> {
9597            encoder.debug_check_bounds::<FiveByte>(offset);
9598            unsafe {
9599                // Copy the object into the buffer.
9600                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9601                (buf_ptr as *mut FiveByte).write_unaligned((self as *const FiveByte).read());
9602                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9603                // done second because the memcpy will write garbage to these bytes.
9604                let padding_ptr = buf_ptr.offset(4) as *mut u32;
9605                let padding_mask = 0xffffff00u32;
9606                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9607            }
9608            Ok(())
9609        }
9610    }
9611    unsafe impl<
9612        D: fidl::encoding::ResourceDialect,
9613        T0: fidl::encoding::Encode<u32, D>,
9614        T1: fidl::encoding::Encode<u8, D>,
9615    > fidl::encoding::Encode<FiveByte, D> for (T0, T1)
9616    {
9617        #[inline]
9618        unsafe fn encode(
9619            self,
9620            encoder: &mut fidl::encoding::Encoder<'_, D>,
9621            offset: usize,
9622            depth: fidl::encoding::Depth,
9623        ) -> fidl::Result<()> {
9624            encoder.debug_check_bounds::<FiveByte>(offset);
9625            // Zero out padding regions. There's no need to apply masks
9626            // because the unmasked parts will be overwritten by fields.
9627            unsafe {
9628                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
9629                (ptr as *mut u32).write_unaligned(0);
9630            }
9631            // Write the fields.
9632            self.0.encode(encoder, offset + 0, depth)?;
9633            self.1.encode(encoder, offset + 4, depth)?;
9634            Ok(())
9635        }
9636    }
9637
9638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByte {
9639        #[inline(always)]
9640        fn new_empty() -> Self {
9641            Self { elem1: fidl::new_empty!(u32, D), elem2: fidl::new_empty!(u8, D) }
9642        }
9643
9644        #[inline]
9645        unsafe fn decode(
9646            &mut self,
9647            decoder: &mut fidl::encoding::Decoder<'_, D>,
9648            offset: usize,
9649            _depth: fidl::encoding::Depth,
9650        ) -> fidl::Result<()> {
9651            decoder.debug_check_bounds::<Self>(offset);
9652            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9653            // Verify that padding bytes are zero.
9654            let ptr = unsafe { buf_ptr.offset(4) };
9655            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9656            let mask = 0xffffff00u32;
9657            let maskedval = padval & mask;
9658            if maskedval != 0 {
9659                return Err(fidl::Error::NonZeroPadding {
9660                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9661                });
9662            }
9663            // Copy from the buffer into the object.
9664            unsafe {
9665                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9666            }
9667            Ok(())
9668        }
9669    }
9670
9671    impl fidl::encoding::ValueTypeMarker for FiveByteInArray {
9672        type Borrowed<'a> = &'a Self;
9673        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9674            value
9675        }
9676    }
9677
9678    unsafe impl fidl::encoding::TypeMarker for FiveByteInArray {
9679        type Owned = Self;
9680
9681        #[inline(always)]
9682        fn inline_align(_context: fidl::encoding::Context) -> usize {
9683            4
9684        }
9685
9686        #[inline(always)]
9687        fn inline_size(_context: fidl::encoding::Context) -> usize {
9688            24
9689        }
9690    }
9691
9692    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInArray, D>
9693        for &FiveByteInArray
9694    {
9695        #[inline]
9696        unsafe fn encode(
9697            self,
9698            encoder: &mut fidl::encoding::Encoder<'_, D>,
9699            offset: usize,
9700            _depth: fidl::encoding::Depth,
9701        ) -> fidl::Result<()> {
9702            encoder.debug_check_bounds::<FiveByteInArray>(offset);
9703            unsafe {
9704                // Copy the object into the buffer.
9705                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9706                (buf_ptr as *mut FiveByteInArray)
9707                    .write_unaligned((self as *const FiveByteInArray).read());
9708                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9709                // done second because the memcpy will write garbage to these bytes.
9710                let padding_ptr = buf_ptr.offset(4) as *mut u32;
9711                let padding_mask = 0xffffff00u32;
9712                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9713                let padding_ptr = buf_ptr.offset(12) as *mut u32;
9714                let padding_mask = 0xffffff00u32;
9715                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9716                let padding_ptr = buf_ptr.offset(20) as *mut u32;
9717                let padding_mask = 0xffffff00u32;
9718                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9719            }
9720            Ok(())
9721        }
9722    }
9723    unsafe impl<
9724        D: fidl::encoding::ResourceDialect,
9725        T0: fidl::encoding::Encode<fidl::encoding::Array<FiveByte, 3>, D>,
9726    > fidl::encoding::Encode<FiveByteInArray, D> for (T0,)
9727    {
9728        #[inline]
9729        unsafe fn encode(
9730            self,
9731            encoder: &mut fidl::encoding::Encoder<'_, D>,
9732            offset: usize,
9733            depth: fidl::encoding::Depth,
9734        ) -> fidl::Result<()> {
9735            encoder.debug_check_bounds::<FiveByteInArray>(offset);
9736            // Zero out padding regions. There's no need to apply masks
9737            // because the unmasked parts will be overwritten by fields.
9738            // Write the fields.
9739            self.0.encode(encoder, offset + 0, depth)?;
9740            Ok(())
9741        }
9742    }
9743
9744    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInArray {
9745        #[inline(always)]
9746        fn new_empty() -> Self {
9747            Self { elems: fidl::new_empty!(fidl::encoding::Array<FiveByte, 3>, D) }
9748        }
9749
9750        #[inline]
9751        unsafe fn decode(
9752            &mut self,
9753            decoder: &mut fidl::encoding::Decoder<'_, D>,
9754            offset: usize,
9755            _depth: fidl::encoding::Depth,
9756        ) -> fidl::Result<()> {
9757            decoder.debug_check_bounds::<Self>(offset);
9758            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9759            // Verify that padding bytes are zero.
9760            let ptr = unsafe { buf_ptr.offset(4) };
9761            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9762            let mask = 0xffffff00u32;
9763            let maskedval = padval & mask;
9764            if maskedval != 0 {
9765                return Err(fidl::Error::NonZeroPadding {
9766                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9767                });
9768            }
9769            let ptr = unsafe { buf_ptr.offset(12) };
9770            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9771            let mask = 0xffffff00u32;
9772            let maskedval = padval & mask;
9773            if maskedval != 0 {
9774                return Err(fidl::Error::NonZeroPadding {
9775                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9776                });
9777            }
9778            let ptr = unsafe { buf_ptr.offset(20) };
9779            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9780            let mask = 0xffffff00u32;
9781            let maskedval = padval & mask;
9782            if maskedval != 0 {
9783                return Err(fidl::Error::NonZeroPadding {
9784                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9785                });
9786            }
9787            // Copy from the buffer into the object.
9788            unsafe {
9789                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9790            }
9791            Ok(())
9792        }
9793    }
9794
9795    impl fidl::encoding::ValueTypeMarker for FiveByteInStruct {
9796        type Borrowed<'a> = &'a Self;
9797        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9798            value
9799        }
9800    }
9801
9802    unsafe impl fidl::encoding::TypeMarker for FiveByteInStruct {
9803        type Owned = Self;
9804
9805        #[inline(always)]
9806        fn inline_align(_context: fidl::encoding::Context) -> usize {
9807            4
9808        }
9809
9810        #[inline(always)]
9811        fn inline_size(_context: fidl::encoding::Context) -> usize {
9812            24
9813        }
9814    }
9815
9816    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInStruct, D>
9817        for &FiveByteInStruct
9818    {
9819        #[inline]
9820        unsafe fn encode(
9821            self,
9822            encoder: &mut fidl::encoding::Encoder<'_, D>,
9823            offset: usize,
9824            _depth: fidl::encoding::Depth,
9825        ) -> fidl::Result<()> {
9826            encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9827            unsafe {
9828                // Copy the object into the buffer.
9829                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9830                (buf_ptr as *mut FiveByteInStruct)
9831                    .write_unaligned((self as *const FiveByteInStruct).read());
9832                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9833                // done second because the memcpy will write garbage to these bytes.
9834                let padding_ptr = buf_ptr.offset(4) as *mut u32;
9835                let padding_mask = 0xffffff00u32;
9836                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9837                let padding_ptr = buf_ptr.offset(12) as *mut u32;
9838                let padding_mask = 0xffffff00u32;
9839                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9840                let padding_ptr = buf_ptr.offset(20) as *mut u32;
9841                let padding_mask = 0xffffff00u32;
9842                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9843            }
9844            Ok(())
9845        }
9846    }
9847    unsafe impl<
9848        D: fidl::encoding::ResourceDialect,
9849        T0: fidl::encoding::Encode<FiveByte, D>,
9850        T1: fidl::encoding::Encode<FiveByte, D>,
9851        T2: fidl::encoding::Encode<FiveByte, D>,
9852    > fidl::encoding::Encode<FiveByteInStruct, D> for (T0, T1, T2)
9853    {
9854        #[inline]
9855        unsafe fn encode(
9856            self,
9857            encoder: &mut fidl::encoding::Encoder<'_, D>,
9858            offset: usize,
9859            depth: fidl::encoding::Depth,
9860        ) -> fidl::Result<()> {
9861            encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9862            // Zero out padding regions. There's no need to apply masks
9863            // because the unmasked parts will be overwritten by fields.
9864            // Write the fields.
9865            self.0.encode(encoder, offset + 0, depth)?;
9866            self.1.encode(encoder, offset + 8, depth)?;
9867            self.2.encode(encoder, offset + 16, depth)?;
9868            Ok(())
9869        }
9870    }
9871
9872    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInStruct {
9873        #[inline(always)]
9874        fn new_empty() -> Self {
9875            Self {
9876                elem1: fidl::new_empty!(FiveByte, D),
9877                elem2: fidl::new_empty!(FiveByte, D),
9878                elem3: fidl::new_empty!(FiveByte, D),
9879            }
9880        }
9881
9882        #[inline]
9883        unsafe fn decode(
9884            &mut self,
9885            decoder: &mut fidl::encoding::Decoder<'_, D>,
9886            offset: usize,
9887            _depth: fidl::encoding::Depth,
9888        ) -> fidl::Result<()> {
9889            decoder.debug_check_bounds::<Self>(offset);
9890            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9891            // Verify that padding bytes are zero.
9892            let ptr = unsafe { buf_ptr.offset(4) };
9893            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9894            let mask = 0xffffff00u32;
9895            let maskedval = padval & mask;
9896            if maskedval != 0 {
9897                return Err(fidl::Error::NonZeroPadding {
9898                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9899                });
9900            }
9901            let ptr = unsafe { buf_ptr.offset(12) };
9902            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9903            let mask = 0xffffff00u32;
9904            let maskedval = padval & mask;
9905            if maskedval != 0 {
9906                return Err(fidl::Error::NonZeroPadding {
9907                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9908                });
9909            }
9910            let ptr = unsafe { buf_ptr.offset(20) };
9911            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9912            let mask = 0xffffff00u32;
9913            let maskedval = padval & mask;
9914            if maskedval != 0 {
9915                return Err(fidl::Error::NonZeroPadding {
9916                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9917                });
9918            }
9919            // Copy from the buffer into the object.
9920            unsafe {
9921                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9922            }
9923            Ok(())
9924        }
9925    }
9926
9927    impl fidl::encoding::ValueTypeMarker for FiveByteInVector {
9928        type Borrowed<'a> = &'a Self;
9929        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9930            value
9931        }
9932    }
9933
9934    unsafe impl fidl::encoding::TypeMarker for FiveByteInVector {
9935        type Owned = Self;
9936
9937        #[inline(always)]
9938        fn inline_align(_context: fidl::encoding::Context) -> usize {
9939            8
9940        }
9941
9942        #[inline(always)]
9943        fn inline_size(_context: fidl::encoding::Context) -> usize {
9944            16
9945        }
9946    }
9947
9948    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInVector, D>
9949        for &FiveByteInVector
9950    {
9951        #[inline]
9952        unsafe fn encode(
9953            self,
9954            encoder: &mut fidl::encoding::Encoder<'_, D>,
9955            offset: usize,
9956            _depth: fidl::encoding::Depth,
9957        ) -> fidl::Result<()> {
9958            encoder.debug_check_bounds::<FiveByteInVector>(offset);
9959            // Delegate to tuple encoding.
9960            fidl::encoding::Encode::<FiveByteInVector, D>::encode(
9961                (
9962                    <fidl::encoding::UnboundedVector<FiveByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
9963                ),
9964                encoder, offset, _depth
9965            )
9966        }
9967    }
9968    unsafe impl<
9969        D: fidl::encoding::ResourceDialect,
9970        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<FiveByte>, D>,
9971    > fidl::encoding::Encode<FiveByteInVector, D> for (T0,)
9972    {
9973        #[inline]
9974        unsafe fn encode(
9975            self,
9976            encoder: &mut fidl::encoding::Encoder<'_, D>,
9977            offset: usize,
9978            depth: fidl::encoding::Depth,
9979        ) -> fidl::Result<()> {
9980            encoder.debug_check_bounds::<FiveByteInVector>(offset);
9981            // Zero out padding regions. There's no need to apply masks
9982            // because the unmasked parts will be overwritten by fields.
9983            // Write the fields.
9984            self.0.encode(encoder, offset + 0, depth)?;
9985            Ok(())
9986        }
9987    }
9988
9989    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInVector {
9990        #[inline(always)]
9991        fn new_empty() -> Self {
9992            Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<FiveByte>, D) }
9993        }
9994
9995        #[inline]
9996        unsafe fn decode(
9997            &mut self,
9998            decoder: &mut fidl::encoding::Decoder<'_, D>,
9999            offset: usize,
10000            _depth: fidl::encoding::Depth,
10001        ) -> fidl::Result<()> {
10002            decoder.debug_check_bounds::<Self>(offset);
10003            // Verify that padding bytes are zero.
10004            fidl::decode!(
10005                fidl::encoding::UnboundedVector<FiveByte>,
10006                D,
10007                &mut self.elems,
10008                decoder,
10009                offset + 0,
10010                _depth
10011            )?;
10012            Ok(())
10013        }
10014    }
10015
10016    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16Struct {
10017        type Borrowed<'a> = &'a Self;
10018        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10019            value
10020        }
10021    }
10022
10023    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16Struct {
10024        type Owned = Self;
10025
10026        #[inline(always)]
10027        fn inline_align(_context: fidl::encoding::Context) -> usize {
10028            2
10029        }
10030
10031        #[inline(always)]
10032        fn inline_size(_context: fidl::encoding::Context) -> usize {
10033            2
10034        }
10035    }
10036
10037    unsafe impl<D: fidl::encoding::ResourceDialect>
10038        fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for &FlexibleBitsUint16Struct
10039    {
10040        #[inline]
10041        unsafe fn encode(
10042            self,
10043            encoder: &mut fidl::encoding::Encoder<'_, D>,
10044            offset: usize,
10045            _depth: fidl::encoding::Depth,
10046        ) -> fidl::Result<()> {
10047            encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
10048            // Delegate to tuple encoding.
10049            fidl::encoding::Encode::<FlexibleBitsUint16Struct, D>::encode(
10050                (<FlexibleBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10051                encoder,
10052                offset,
10053                _depth,
10054            )
10055        }
10056    }
10057    unsafe impl<
10058        D: fidl::encoding::ResourceDialect,
10059        T0: fidl::encoding::Encode<FlexibleBitsUint16, D>,
10060    > fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for (T0,)
10061    {
10062        #[inline]
10063        unsafe fn encode(
10064            self,
10065            encoder: &mut fidl::encoding::Encoder<'_, D>,
10066            offset: usize,
10067            depth: fidl::encoding::Depth,
10068        ) -> fidl::Result<()> {
10069            encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
10070            // Zero out padding regions. There's no need to apply masks
10071            // because the unmasked parts will be overwritten by fields.
10072            // Write the fields.
10073            self.0.encode(encoder, offset + 0, depth)?;
10074            Ok(())
10075        }
10076    }
10077
10078    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10079        for FlexibleBitsUint16Struct
10080    {
10081        #[inline(always)]
10082        fn new_empty() -> Self {
10083            Self { b: fidl::new_empty!(FlexibleBitsUint16, D) }
10084        }
10085
10086        #[inline]
10087        unsafe fn decode(
10088            &mut self,
10089            decoder: &mut fidl::encoding::Decoder<'_, D>,
10090            offset: usize,
10091            _depth: fidl::encoding::Depth,
10092        ) -> fidl::Result<()> {
10093            decoder.debug_check_bounds::<Self>(offset);
10094            // Verify that padding bytes are zero.
10095            fidl::decode!(FlexibleBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
10096            Ok(())
10097        }
10098    }
10099
10100    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32Struct {
10101        type Borrowed<'a> = &'a Self;
10102        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10103            value
10104        }
10105    }
10106
10107    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32Struct {
10108        type Owned = Self;
10109
10110        #[inline(always)]
10111        fn inline_align(_context: fidl::encoding::Context) -> usize {
10112            4
10113        }
10114
10115        #[inline(always)]
10116        fn inline_size(_context: fidl::encoding::Context) -> usize {
10117            4
10118        }
10119    }
10120
10121    unsafe impl<D: fidl::encoding::ResourceDialect>
10122        fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for &FlexibleBitsUint32Struct
10123    {
10124        #[inline]
10125        unsafe fn encode(
10126            self,
10127            encoder: &mut fidl::encoding::Encoder<'_, D>,
10128            offset: usize,
10129            _depth: fidl::encoding::Depth,
10130        ) -> fidl::Result<()> {
10131            encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
10132            // Delegate to tuple encoding.
10133            fidl::encoding::Encode::<FlexibleBitsUint32Struct, D>::encode(
10134                (<FlexibleBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10135                encoder,
10136                offset,
10137                _depth,
10138            )
10139        }
10140    }
10141    unsafe impl<
10142        D: fidl::encoding::ResourceDialect,
10143        T0: fidl::encoding::Encode<FlexibleBitsUint32, D>,
10144    > fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for (T0,)
10145    {
10146        #[inline]
10147        unsafe fn encode(
10148            self,
10149            encoder: &mut fidl::encoding::Encoder<'_, D>,
10150            offset: usize,
10151            depth: fidl::encoding::Depth,
10152        ) -> fidl::Result<()> {
10153            encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
10154            // Zero out padding regions. There's no need to apply masks
10155            // because the unmasked parts will be overwritten by fields.
10156            // Write the fields.
10157            self.0.encode(encoder, offset + 0, depth)?;
10158            Ok(())
10159        }
10160    }
10161
10162    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10163        for FlexibleBitsUint32Struct
10164    {
10165        #[inline(always)]
10166        fn new_empty() -> Self {
10167            Self { b: fidl::new_empty!(FlexibleBitsUint32, D) }
10168        }
10169
10170        #[inline]
10171        unsafe fn decode(
10172            &mut self,
10173            decoder: &mut fidl::encoding::Decoder<'_, D>,
10174            offset: usize,
10175            _depth: fidl::encoding::Depth,
10176        ) -> fidl::Result<()> {
10177            decoder.debug_check_bounds::<Self>(offset);
10178            // Verify that padding bytes are zero.
10179            fidl::decode!(FlexibleBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
10180            Ok(())
10181        }
10182    }
10183
10184    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64Struct {
10185        type Borrowed<'a> = &'a Self;
10186        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10187            value
10188        }
10189    }
10190
10191    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64Struct {
10192        type Owned = Self;
10193
10194        #[inline(always)]
10195        fn inline_align(_context: fidl::encoding::Context) -> usize {
10196            8
10197        }
10198
10199        #[inline(always)]
10200        fn inline_size(_context: fidl::encoding::Context) -> usize {
10201            8
10202        }
10203    }
10204
10205    unsafe impl<D: fidl::encoding::ResourceDialect>
10206        fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for &FlexibleBitsUint64Struct
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::<FlexibleBitsUint64Struct>(offset);
10216            // Delegate to tuple encoding.
10217            fidl::encoding::Encode::<FlexibleBitsUint64Struct, D>::encode(
10218                (<FlexibleBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10219                encoder,
10220                offset,
10221                _depth,
10222            )
10223        }
10224    }
10225    unsafe impl<
10226        D: fidl::encoding::ResourceDialect,
10227        T0: fidl::encoding::Encode<FlexibleBitsUint64, D>,
10228    > fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for (T0,)
10229    {
10230        #[inline]
10231        unsafe fn encode(
10232            self,
10233            encoder: &mut fidl::encoding::Encoder<'_, D>,
10234            offset: usize,
10235            depth: fidl::encoding::Depth,
10236        ) -> fidl::Result<()> {
10237            encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10238            // Zero out padding regions. There's no need to apply masks
10239            // because the unmasked parts will be overwritten by fields.
10240            // Write the fields.
10241            self.0.encode(encoder, offset + 0, depth)?;
10242            Ok(())
10243        }
10244    }
10245
10246    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10247        for FlexibleBitsUint64Struct
10248    {
10249        #[inline(always)]
10250        fn new_empty() -> Self {
10251            Self { b: fidl::new_empty!(FlexibleBitsUint64, D) }
10252        }
10253
10254        #[inline]
10255        unsafe fn decode(
10256            &mut self,
10257            decoder: &mut fidl::encoding::Decoder<'_, D>,
10258            offset: usize,
10259            _depth: fidl::encoding::Depth,
10260        ) -> fidl::Result<()> {
10261            decoder.debug_check_bounds::<Self>(offset);
10262            // Verify that padding bytes are zero.
10263            fidl::decode!(FlexibleBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
10264            Ok(())
10265        }
10266    }
10267
10268    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8Struct {
10269        type Borrowed<'a> = &'a Self;
10270        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10271            value
10272        }
10273    }
10274
10275    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8Struct {
10276        type Owned = Self;
10277
10278        #[inline(always)]
10279        fn inline_align(_context: fidl::encoding::Context) -> usize {
10280            1
10281        }
10282
10283        #[inline(always)]
10284        fn inline_size(_context: fidl::encoding::Context) -> usize {
10285            1
10286        }
10287    }
10288
10289    unsafe impl<D: fidl::encoding::ResourceDialect>
10290        fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for &FlexibleBitsUint8Struct
10291    {
10292        #[inline]
10293        unsafe fn encode(
10294            self,
10295            encoder: &mut fidl::encoding::Encoder<'_, D>,
10296            offset: usize,
10297            _depth: fidl::encoding::Depth,
10298        ) -> fidl::Result<()> {
10299            encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10300            // Delegate to tuple encoding.
10301            fidl::encoding::Encode::<FlexibleBitsUint8Struct, D>::encode(
10302                (<FlexibleBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10303                encoder,
10304                offset,
10305                _depth,
10306            )
10307        }
10308    }
10309    unsafe impl<
10310        D: fidl::encoding::ResourceDialect,
10311        T0: fidl::encoding::Encode<FlexibleBitsUint8, D>,
10312    > fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for (T0,)
10313    {
10314        #[inline]
10315        unsafe fn encode(
10316            self,
10317            encoder: &mut fidl::encoding::Encoder<'_, D>,
10318            offset: usize,
10319            depth: fidl::encoding::Depth,
10320        ) -> fidl::Result<()> {
10321            encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10322            // Zero out padding regions. There's no need to apply masks
10323            // because the unmasked parts will be overwritten by fields.
10324            // Write the fields.
10325            self.0.encode(encoder, offset + 0, depth)?;
10326            Ok(())
10327        }
10328    }
10329
10330    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10331        for FlexibleBitsUint8Struct
10332    {
10333        #[inline(always)]
10334        fn new_empty() -> Self {
10335            Self { b: fidl::new_empty!(FlexibleBitsUint8, D) }
10336        }
10337
10338        #[inline]
10339        unsafe fn decode(
10340            &mut self,
10341            decoder: &mut fidl::encoding::Decoder<'_, D>,
10342            offset: usize,
10343            _depth: fidl::encoding::Depth,
10344        ) -> fidl::Result<()> {
10345            decoder.debug_check_bounds::<Self>(offset);
10346            // Verify that padding bytes are zero.
10347            fidl::decode!(FlexibleBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
10348            Ok(())
10349        }
10350    }
10351
10352    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16Struct {
10353        type Borrowed<'a> = &'a Self;
10354        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10355            value
10356        }
10357    }
10358
10359    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16Struct {
10360        type Owned = Self;
10361
10362        #[inline(always)]
10363        fn inline_align(_context: fidl::encoding::Context) -> usize {
10364            2
10365        }
10366
10367        #[inline(always)]
10368        fn inline_size(_context: fidl::encoding::Context) -> usize {
10369            2
10370        }
10371    }
10372
10373    unsafe impl<D: fidl::encoding::ResourceDialect>
10374        fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for &FlexibleEnumInt16Struct
10375    {
10376        #[inline]
10377        unsafe fn encode(
10378            self,
10379            encoder: &mut fidl::encoding::Encoder<'_, D>,
10380            offset: usize,
10381            _depth: fidl::encoding::Depth,
10382        ) -> fidl::Result<()> {
10383            encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10384            // Delegate to tuple encoding.
10385            fidl::encoding::Encode::<FlexibleEnumInt16Struct, D>::encode(
10386                (<FlexibleEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10387                encoder,
10388                offset,
10389                _depth,
10390            )
10391        }
10392    }
10393    unsafe impl<
10394        D: fidl::encoding::ResourceDialect,
10395        T0: fidl::encoding::Encode<FlexibleEnumInt16, D>,
10396    > fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for (T0,)
10397    {
10398        #[inline]
10399        unsafe fn encode(
10400            self,
10401            encoder: &mut fidl::encoding::Encoder<'_, D>,
10402            offset: usize,
10403            depth: fidl::encoding::Depth,
10404        ) -> fidl::Result<()> {
10405            encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10406            // Zero out padding regions. There's no need to apply masks
10407            // because the unmasked parts will be overwritten by fields.
10408            // Write the fields.
10409            self.0.encode(encoder, offset + 0, depth)?;
10410            Ok(())
10411        }
10412    }
10413
10414    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10415        for FlexibleEnumInt16Struct
10416    {
10417        #[inline(always)]
10418        fn new_empty() -> Self {
10419            Self { e: fidl::new_empty!(FlexibleEnumInt16, D) }
10420        }
10421
10422        #[inline]
10423        unsafe fn decode(
10424            &mut self,
10425            decoder: &mut fidl::encoding::Decoder<'_, D>,
10426            offset: usize,
10427            _depth: fidl::encoding::Depth,
10428        ) -> fidl::Result<()> {
10429            decoder.debug_check_bounds::<Self>(offset);
10430            // Verify that padding bytes are zero.
10431            fidl::decode!(FlexibleEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
10432            Ok(())
10433        }
10434    }
10435
10436    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32Struct {
10437        type Borrowed<'a> = &'a Self;
10438        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10439            value
10440        }
10441    }
10442
10443    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32Struct {
10444        type Owned = Self;
10445
10446        #[inline(always)]
10447        fn inline_align(_context: fidl::encoding::Context) -> usize {
10448            4
10449        }
10450
10451        #[inline(always)]
10452        fn inline_size(_context: fidl::encoding::Context) -> usize {
10453            4
10454        }
10455    }
10456
10457    unsafe impl<D: fidl::encoding::ResourceDialect>
10458        fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for &FlexibleEnumInt32Struct
10459    {
10460        #[inline]
10461        unsafe fn encode(
10462            self,
10463            encoder: &mut fidl::encoding::Encoder<'_, D>,
10464            offset: usize,
10465            _depth: fidl::encoding::Depth,
10466        ) -> fidl::Result<()> {
10467            encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10468            // Delegate to tuple encoding.
10469            fidl::encoding::Encode::<FlexibleEnumInt32Struct, D>::encode(
10470                (<FlexibleEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10471                encoder,
10472                offset,
10473                _depth,
10474            )
10475        }
10476    }
10477    unsafe impl<
10478        D: fidl::encoding::ResourceDialect,
10479        T0: fidl::encoding::Encode<FlexibleEnumInt32, D>,
10480    > fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for (T0,)
10481    {
10482        #[inline]
10483        unsafe fn encode(
10484            self,
10485            encoder: &mut fidl::encoding::Encoder<'_, D>,
10486            offset: usize,
10487            depth: fidl::encoding::Depth,
10488        ) -> fidl::Result<()> {
10489            encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10490            // Zero out padding regions. There's no need to apply masks
10491            // because the unmasked parts will be overwritten by fields.
10492            // Write the fields.
10493            self.0.encode(encoder, offset + 0, depth)?;
10494            Ok(())
10495        }
10496    }
10497
10498    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10499        for FlexibleEnumInt32Struct
10500    {
10501        #[inline(always)]
10502        fn new_empty() -> Self {
10503            Self { e: fidl::new_empty!(FlexibleEnumInt32, D) }
10504        }
10505
10506        #[inline]
10507        unsafe fn decode(
10508            &mut self,
10509            decoder: &mut fidl::encoding::Decoder<'_, D>,
10510            offset: usize,
10511            _depth: fidl::encoding::Depth,
10512        ) -> fidl::Result<()> {
10513            decoder.debug_check_bounds::<Self>(offset);
10514            // Verify that padding bytes are zero.
10515            fidl::decode!(FlexibleEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
10516            Ok(())
10517        }
10518    }
10519
10520    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64Struct {
10521        type Borrowed<'a> = &'a Self;
10522        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10523            value
10524        }
10525    }
10526
10527    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64Struct {
10528        type Owned = Self;
10529
10530        #[inline(always)]
10531        fn inline_align(_context: fidl::encoding::Context) -> usize {
10532            8
10533        }
10534
10535        #[inline(always)]
10536        fn inline_size(_context: fidl::encoding::Context) -> usize {
10537            8
10538        }
10539    }
10540
10541    unsafe impl<D: fidl::encoding::ResourceDialect>
10542        fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for &FlexibleEnumInt64Struct
10543    {
10544        #[inline]
10545        unsafe fn encode(
10546            self,
10547            encoder: &mut fidl::encoding::Encoder<'_, D>,
10548            offset: usize,
10549            _depth: fidl::encoding::Depth,
10550        ) -> fidl::Result<()> {
10551            encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10552            // Delegate to tuple encoding.
10553            fidl::encoding::Encode::<FlexibleEnumInt64Struct, D>::encode(
10554                (<FlexibleEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10555                encoder,
10556                offset,
10557                _depth,
10558            )
10559        }
10560    }
10561    unsafe impl<
10562        D: fidl::encoding::ResourceDialect,
10563        T0: fidl::encoding::Encode<FlexibleEnumInt64, D>,
10564    > fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for (T0,)
10565    {
10566        #[inline]
10567        unsafe fn encode(
10568            self,
10569            encoder: &mut fidl::encoding::Encoder<'_, D>,
10570            offset: usize,
10571            depth: fidl::encoding::Depth,
10572        ) -> fidl::Result<()> {
10573            encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10574            // Zero out padding regions. There's no need to apply masks
10575            // because the unmasked parts will be overwritten by fields.
10576            // Write the fields.
10577            self.0.encode(encoder, offset + 0, depth)?;
10578            Ok(())
10579        }
10580    }
10581
10582    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10583        for FlexibleEnumInt64Struct
10584    {
10585        #[inline(always)]
10586        fn new_empty() -> Self {
10587            Self { e: fidl::new_empty!(FlexibleEnumInt64, D) }
10588        }
10589
10590        #[inline]
10591        unsafe fn decode(
10592            &mut self,
10593            decoder: &mut fidl::encoding::Decoder<'_, D>,
10594            offset: usize,
10595            _depth: fidl::encoding::Depth,
10596        ) -> fidl::Result<()> {
10597            decoder.debug_check_bounds::<Self>(offset);
10598            // Verify that padding bytes are zero.
10599            fidl::decode!(FlexibleEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
10600            Ok(())
10601        }
10602    }
10603
10604    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8Struct {
10605        type Borrowed<'a> = &'a Self;
10606        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10607            value
10608        }
10609    }
10610
10611    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8Struct {
10612        type Owned = Self;
10613
10614        #[inline(always)]
10615        fn inline_align(_context: fidl::encoding::Context) -> usize {
10616            1
10617        }
10618
10619        #[inline(always)]
10620        fn inline_size(_context: fidl::encoding::Context) -> usize {
10621            1
10622        }
10623    }
10624
10625    unsafe impl<D: fidl::encoding::ResourceDialect>
10626        fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for &FlexibleEnumInt8Struct
10627    {
10628        #[inline]
10629        unsafe fn encode(
10630            self,
10631            encoder: &mut fidl::encoding::Encoder<'_, D>,
10632            offset: usize,
10633            _depth: fidl::encoding::Depth,
10634        ) -> fidl::Result<()> {
10635            encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10636            // Delegate to tuple encoding.
10637            fidl::encoding::Encode::<FlexibleEnumInt8Struct, D>::encode(
10638                (<FlexibleEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10639                encoder,
10640                offset,
10641                _depth,
10642            )
10643        }
10644    }
10645    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt8, D>>
10646        fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for (T0,)
10647    {
10648        #[inline]
10649        unsafe fn encode(
10650            self,
10651            encoder: &mut fidl::encoding::Encoder<'_, D>,
10652            offset: usize,
10653            depth: fidl::encoding::Depth,
10654        ) -> fidl::Result<()> {
10655            encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10656            // Zero out padding regions. There's no need to apply masks
10657            // because the unmasked parts will be overwritten by fields.
10658            // Write the fields.
10659            self.0.encode(encoder, offset + 0, depth)?;
10660            Ok(())
10661        }
10662    }
10663
10664    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10665        for FlexibleEnumInt8Struct
10666    {
10667        #[inline(always)]
10668        fn new_empty() -> Self {
10669            Self { e: fidl::new_empty!(FlexibleEnumInt8, D) }
10670        }
10671
10672        #[inline]
10673        unsafe fn decode(
10674            &mut self,
10675            decoder: &mut fidl::encoding::Decoder<'_, D>,
10676            offset: usize,
10677            _depth: fidl::encoding::Depth,
10678        ) -> fidl::Result<()> {
10679            decoder.debug_check_bounds::<Self>(offset);
10680            // Verify that padding bytes are zero.
10681            fidl::decode!(FlexibleEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
10682            Ok(())
10683        }
10684    }
10685
10686    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16Struct {
10687        type Borrowed<'a> = &'a Self;
10688        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10689            value
10690        }
10691    }
10692
10693    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16Struct {
10694        type Owned = Self;
10695
10696        #[inline(always)]
10697        fn inline_align(_context: fidl::encoding::Context) -> usize {
10698            2
10699        }
10700
10701        #[inline(always)]
10702        fn inline_size(_context: fidl::encoding::Context) -> usize {
10703            2
10704        }
10705    }
10706
10707    unsafe impl<D: fidl::encoding::ResourceDialect>
10708        fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for &FlexibleEnumUint16Struct
10709    {
10710        #[inline]
10711        unsafe fn encode(
10712            self,
10713            encoder: &mut fidl::encoding::Encoder<'_, D>,
10714            offset: usize,
10715            _depth: fidl::encoding::Depth,
10716        ) -> fidl::Result<()> {
10717            encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10718            // Delegate to tuple encoding.
10719            fidl::encoding::Encode::<FlexibleEnumUint16Struct, D>::encode(
10720                (<FlexibleEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10721                encoder,
10722                offset,
10723                _depth,
10724            )
10725        }
10726    }
10727    unsafe impl<
10728        D: fidl::encoding::ResourceDialect,
10729        T0: fidl::encoding::Encode<FlexibleEnumUint16, D>,
10730    > fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for (T0,)
10731    {
10732        #[inline]
10733        unsafe fn encode(
10734            self,
10735            encoder: &mut fidl::encoding::Encoder<'_, D>,
10736            offset: usize,
10737            depth: fidl::encoding::Depth,
10738        ) -> fidl::Result<()> {
10739            encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10740            // Zero out padding regions. There's no need to apply masks
10741            // because the unmasked parts will be overwritten by fields.
10742            // Write the fields.
10743            self.0.encode(encoder, offset + 0, depth)?;
10744            Ok(())
10745        }
10746    }
10747
10748    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10749        for FlexibleEnumUint16Struct
10750    {
10751        #[inline(always)]
10752        fn new_empty() -> Self {
10753            Self { e: fidl::new_empty!(FlexibleEnumUint16, D) }
10754        }
10755
10756        #[inline]
10757        unsafe fn decode(
10758            &mut self,
10759            decoder: &mut fidl::encoding::Decoder<'_, D>,
10760            offset: usize,
10761            _depth: fidl::encoding::Depth,
10762        ) -> fidl::Result<()> {
10763            decoder.debug_check_bounds::<Self>(offset);
10764            // Verify that padding bytes are zero.
10765            fidl::decode!(FlexibleEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
10766            Ok(())
10767        }
10768    }
10769
10770    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32Struct {
10771        type Borrowed<'a> = &'a Self;
10772        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10773            value
10774        }
10775    }
10776
10777    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32Struct {
10778        type Owned = Self;
10779
10780        #[inline(always)]
10781        fn inline_align(_context: fidl::encoding::Context) -> usize {
10782            4
10783        }
10784
10785        #[inline(always)]
10786        fn inline_size(_context: fidl::encoding::Context) -> usize {
10787            4
10788        }
10789    }
10790
10791    unsafe impl<D: fidl::encoding::ResourceDialect>
10792        fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for &FlexibleEnumUint32Struct
10793    {
10794        #[inline]
10795        unsafe fn encode(
10796            self,
10797            encoder: &mut fidl::encoding::Encoder<'_, D>,
10798            offset: usize,
10799            _depth: fidl::encoding::Depth,
10800        ) -> fidl::Result<()> {
10801            encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10802            // Delegate to tuple encoding.
10803            fidl::encoding::Encode::<FlexibleEnumUint32Struct, D>::encode(
10804                (<FlexibleEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10805                encoder,
10806                offset,
10807                _depth,
10808            )
10809        }
10810    }
10811    unsafe impl<
10812        D: fidl::encoding::ResourceDialect,
10813        T0: fidl::encoding::Encode<FlexibleEnumUint32, D>,
10814    > fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for (T0,)
10815    {
10816        #[inline]
10817        unsafe fn encode(
10818            self,
10819            encoder: &mut fidl::encoding::Encoder<'_, D>,
10820            offset: usize,
10821            depth: fidl::encoding::Depth,
10822        ) -> fidl::Result<()> {
10823            encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10824            // Zero out padding regions. There's no need to apply masks
10825            // because the unmasked parts will be overwritten by fields.
10826            // Write the fields.
10827            self.0.encode(encoder, offset + 0, depth)?;
10828            Ok(())
10829        }
10830    }
10831
10832    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10833        for FlexibleEnumUint32Struct
10834    {
10835        #[inline(always)]
10836        fn new_empty() -> Self {
10837            Self { e: fidl::new_empty!(FlexibleEnumUint32, D) }
10838        }
10839
10840        #[inline]
10841        unsafe fn decode(
10842            &mut self,
10843            decoder: &mut fidl::encoding::Decoder<'_, D>,
10844            offset: usize,
10845            _depth: fidl::encoding::Depth,
10846        ) -> fidl::Result<()> {
10847            decoder.debug_check_bounds::<Self>(offset);
10848            // Verify that padding bytes are zero.
10849            fidl::decode!(FlexibleEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
10850            Ok(())
10851        }
10852    }
10853
10854    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64Struct {
10855        type Borrowed<'a> = &'a Self;
10856        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10857            value
10858        }
10859    }
10860
10861    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64Struct {
10862        type Owned = Self;
10863
10864        #[inline(always)]
10865        fn inline_align(_context: fidl::encoding::Context) -> usize {
10866            8
10867        }
10868
10869        #[inline(always)]
10870        fn inline_size(_context: fidl::encoding::Context) -> usize {
10871            8
10872        }
10873    }
10874
10875    unsafe impl<D: fidl::encoding::ResourceDialect>
10876        fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for &FlexibleEnumUint64Struct
10877    {
10878        #[inline]
10879        unsafe fn encode(
10880            self,
10881            encoder: &mut fidl::encoding::Encoder<'_, D>,
10882            offset: usize,
10883            _depth: fidl::encoding::Depth,
10884        ) -> fidl::Result<()> {
10885            encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10886            // Delegate to tuple encoding.
10887            fidl::encoding::Encode::<FlexibleEnumUint64Struct, D>::encode(
10888                (<FlexibleEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10889                encoder,
10890                offset,
10891                _depth,
10892            )
10893        }
10894    }
10895    unsafe impl<
10896        D: fidl::encoding::ResourceDialect,
10897        T0: fidl::encoding::Encode<FlexibleEnumUint64, D>,
10898    > fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for (T0,)
10899    {
10900        #[inline]
10901        unsafe fn encode(
10902            self,
10903            encoder: &mut fidl::encoding::Encoder<'_, D>,
10904            offset: usize,
10905            depth: fidl::encoding::Depth,
10906        ) -> fidl::Result<()> {
10907            encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10908            // Zero out padding regions. There's no need to apply masks
10909            // because the unmasked parts will be overwritten by fields.
10910            // Write the fields.
10911            self.0.encode(encoder, offset + 0, depth)?;
10912            Ok(())
10913        }
10914    }
10915
10916    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10917        for FlexibleEnumUint64Struct
10918    {
10919        #[inline(always)]
10920        fn new_empty() -> Self {
10921            Self { e: fidl::new_empty!(FlexibleEnumUint64, D) }
10922        }
10923
10924        #[inline]
10925        unsafe fn decode(
10926            &mut self,
10927            decoder: &mut fidl::encoding::Decoder<'_, D>,
10928            offset: usize,
10929            _depth: fidl::encoding::Depth,
10930        ) -> fidl::Result<()> {
10931            decoder.debug_check_bounds::<Self>(offset);
10932            // Verify that padding bytes are zero.
10933            fidl::decode!(FlexibleEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
10934            Ok(())
10935        }
10936    }
10937
10938    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8Struct {
10939        type Borrowed<'a> = &'a Self;
10940        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10941            value
10942        }
10943    }
10944
10945    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8Struct {
10946        type Owned = Self;
10947
10948        #[inline(always)]
10949        fn inline_align(_context: fidl::encoding::Context) -> usize {
10950            1
10951        }
10952
10953        #[inline(always)]
10954        fn inline_size(_context: fidl::encoding::Context) -> usize {
10955            1
10956        }
10957    }
10958
10959    unsafe impl<D: fidl::encoding::ResourceDialect>
10960        fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for &FlexibleEnumUint8Struct
10961    {
10962        #[inline]
10963        unsafe fn encode(
10964            self,
10965            encoder: &mut fidl::encoding::Encoder<'_, D>,
10966            offset: usize,
10967            _depth: fidl::encoding::Depth,
10968        ) -> fidl::Result<()> {
10969            encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10970            // Delegate to tuple encoding.
10971            fidl::encoding::Encode::<FlexibleEnumUint8Struct, D>::encode(
10972                (<FlexibleEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10973                encoder,
10974                offset,
10975                _depth,
10976            )
10977        }
10978    }
10979    unsafe impl<
10980        D: fidl::encoding::ResourceDialect,
10981        T0: fidl::encoding::Encode<FlexibleEnumUint8, D>,
10982    > fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for (T0,)
10983    {
10984        #[inline]
10985        unsafe fn encode(
10986            self,
10987            encoder: &mut fidl::encoding::Encoder<'_, D>,
10988            offset: usize,
10989            depth: fidl::encoding::Depth,
10990        ) -> fidl::Result<()> {
10991            encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10992            // Zero out padding regions. There's no need to apply masks
10993            // because the unmasked parts will be overwritten by fields.
10994            // Write the fields.
10995            self.0.encode(encoder, offset + 0, depth)?;
10996            Ok(())
10997        }
10998    }
10999
11000    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11001        for FlexibleEnumUint8Struct
11002    {
11003        #[inline(always)]
11004        fn new_empty() -> Self {
11005            Self { e: fidl::new_empty!(FlexibleEnumUint8, D) }
11006        }
11007
11008        #[inline]
11009        unsafe fn decode(
11010            &mut self,
11011            decoder: &mut fidl::encoding::Decoder<'_, D>,
11012            offset: usize,
11013            _depth: fidl::encoding::Depth,
11014        ) -> fidl::Result<()> {
11015            decoder.debug_check_bounds::<Self>(offset);
11016            // Verify that padding bytes are zero.
11017            fidl::decode!(FlexibleEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
11018            Ok(())
11019        }
11020    }
11021
11022    impl fidl::encoding::ValueTypeMarker for GoldenBitsStruct {
11023        type Borrowed<'a> = &'a Self;
11024        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11025            value
11026        }
11027    }
11028
11029    unsafe impl fidl::encoding::TypeMarker for GoldenBitsStruct {
11030        type Owned = Self;
11031
11032        #[inline(always)]
11033        fn inline_align(_context: fidl::encoding::Context) -> usize {
11034            2
11035        }
11036
11037        #[inline(always)]
11038        fn inline_size(_context: fidl::encoding::Context) -> usize {
11039            2
11040        }
11041    }
11042
11043    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBitsStruct, D>
11044        for &GoldenBitsStruct
11045    {
11046        #[inline]
11047        unsafe fn encode(
11048            self,
11049            encoder: &mut fidl::encoding::Encoder<'_, D>,
11050            offset: usize,
11051            _depth: fidl::encoding::Depth,
11052        ) -> fidl::Result<()> {
11053            encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
11054            // Delegate to tuple encoding.
11055            fidl::encoding::Encode::<GoldenBitsStruct, D>::encode(
11056                (<GoldenBits as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11057                encoder,
11058                offset,
11059                _depth,
11060            )
11061        }
11062    }
11063    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenBits, D>>
11064        fidl::encoding::Encode<GoldenBitsStruct, D> for (T0,)
11065    {
11066        #[inline]
11067        unsafe fn encode(
11068            self,
11069            encoder: &mut fidl::encoding::Encoder<'_, D>,
11070            offset: usize,
11071            depth: fidl::encoding::Depth,
11072        ) -> fidl::Result<()> {
11073            encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
11074            // Zero out padding regions. There's no need to apply masks
11075            // because the unmasked parts will be overwritten by fields.
11076            // Write the fields.
11077            self.0.encode(encoder, offset + 0, depth)?;
11078            Ok(())
11079        }
11080    }
11081
11082    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBitsStruct {
11083        #[inline(always)]
11084        fn new_empty() -> Self {
11085            Self { v: fidl::new_empty!(GoldenBits, D) }
11086        }
11087
11088        #[inline]
11089        unsafe fn decode(
11090            &mut self,
11091            decoder: &mut fidl::encoding::Decoder<'_, D>,
11092            offset: usize,
11093            _depth: fidl::encoding::Depth,
11094        ) -> fidl::Result<()> {
11095            decoder.debug_check_bounds::<Self>(offset);
11096            // Verify that padding bytes are zero.
11097            fidl::decode!(GoldenBits, D, &mut self.v, decoder, offset + 0, _depth)?;
11098            Ok(())
11099        }
11100    }
11101
11102    impl fidl::encoding::ValueTypeMarker for GoldenBoolStruct {
11103        type Borrowed<'a> = &'a Self;
11104        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11105            value
11106        }
11107    }
11108
11109    unsafe impl fidl::encoding::TypeMarker for GoldenBoolStruct {
11110        type Owned = Self;
11111
11112        #[inline(always)]
11113        fn inline_align(_context: fidl::encoding::Context) -> usize {
11114            1
11115        }
11116
11117        #[inline(always)]
11118        fn inline_size(_context: fidl::encoding::Context) -> usize {
11119            1
11120        }
11121    }
11122
11123    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBoolStruct, D>
11124        for &GoldenBoolStruct
11125    {
11126        #[inline]
11127        unsafe fn encode(
11128            self,
11129            encoder: &mut fidl::encoding::Encoder<'_, D>,
11130            offset: usize,
11131            _depth: fidl::encoding::Depth,
11132        ) -> fidl::Result<()> {
11133            encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
11134            // Delegate to tuple encoding.
11135            fidl::encoding::Encode::<GoldenBoolStruct, D>::encode(
11136                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11137                encoder,
11138                offset,
11139                _depth,
11140            )
11141        }
11142    }
11143    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11144        fidl::encoding::Encode<GoldenBoolStruct, D> for (T0,)
11145    {
11146        #[inline]
11147        unsafe fn encode(
11148            self,
11149            encoder: &mut fidl::encoding::Encoder<'_, D>,
11150            offset: usize,
11151            depth: fidl::encoding::Depth,
11152        ) -> fidl::Result<()> {
11153            encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
11154            // Zero out padding regions. There's no need to apply masks
11155            // because the unmasked parts will be overwritten by fields.
11156            // Write the fields.
11157            self.0.encode(encoder, offset + 0, depth)?;
11158            Ok(())
11159        }
11160    }
11161
11162    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBoolStruct {
11163        #[inline(always)]
11164        fn new_empty() -> Self {
11165            Self { v: fidl::new_empty!(bool, D) }
11166        }
11167
11168        #[inline]
11169        unsafe fn decode(
11170            &mut self,
11171            decoder: &mut fidl::encoding::Decoder<'_, D>,
11172            offset: usize,
11173            _depth: fidl::encoding::Depth,
11174        ) -> fidl::Result<()> {
11175            decoder.debug_check_bounds::<Self>(offset);
11176            // Verify that padding bytes are zero.
11177            fidl::decode!(bool, D, &mut self.v, decoder, offset + 0, _depth)?;
11178            Ok(())
11179        }
11180    }
11181
11182    impl fidl::encoding::ValueTypeMarker for GoldenByteArrayStruct {
11183        type Borrowed<'a> = &'a Self;
11184        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11185            value
11186        }
11187    }
11188
11189    unsafe impl fidl::encoding::TypeMarker for GoldenByteArrayStruct {
11190        type Owned = Self;
11191
11192        #[inline(always)]
11193        fn inline_align(_context: fidl::encoding::Context) -> usize {
11194            1
11195        }
11196
11197        #[inline(always)]
11198        fn inline_size(_context: fidl::encoding::Context) -> usize {
11199            4
11200        }
11201        #[inline(always)]
11202        fn encode_is_copy() -> bool {
11203            true
11204        }
11205
11206        #[inline(always)]
11207        fn decode_is_copy() -> bool {
11208            true
11209        }
11210    }
11211
11212    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenByteArrayStruct, D>
11213        for &GoldenByteArrayStruct
11214    {
11215        #[inline]
11216        unsafe fn encode(
11217            self,
11218            encoder: &mut fidl::encoding::Encoder<'_, D>,
11219            offset: usize,
11220            _depth: fidl::encoding::Depth,
11221        ) -> fidl::Result<()> {
11222            encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11223            unsafe {
11224                // Copy the object into the buffer.
11225                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11226                (buf_ptr as *mut GoldenByteArrayStruct)
11227                    .write_unaligned((self as *const GoldenByteArrayStruct).read());
11228                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11229                // done second because the memcpy will write garbage to these bytes.
11230            }
11231            Ok(())
11232        }
11233    }
11234    unsafe impl<
11235        D: fidl::encoding::ResourceDialect,
11236        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 4>, D>,
11237    > fidl::encoding::Encode<GoldenByteArrayStruct, D> for (T0,)
11238    {
11239        #[inline]
11240        unsafe fn encode(
11241            self,
11242            encoder: &mut fidl::encoding::Encoder<'_, D>,
11243            offset: usize,
11244            depth: fidl::encoding::Depth,
11245        ) -> fidl::Result<()> {
11246            encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11247            // Zero out padding regions. There's no need to apply masks
11248            // because the unmasked parts will be overwritten by fields.
11249            // Write the fields.
11250            self.0.encode(encoder, offset + 0, depth)?;
11251            Ok(())
11252        }
11253    }
11254
11255    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenByteArrayStruct {
11256        #[inline(always)]
11257        fn new_empty() -> Self {
11258            Self { v: fidl::new_empty!(fidl::encoding::Array<u8, 4>, D) }
11259        }
11260
11261        #[inline]
11262        unsafe fn decode(
11263            &mut self,
11264            decoder: &mut fidl::encoding::Decoder<'_, D>,
11265            offset: usize,
11266            _depth: fidl::encoding::Depth,
11267        ) -> fidl::Result<()> {
11268            decoder.debug_check_bounds::<Self>(offset);
11269            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11270            // Verify that padding bytes are zero.
11271            // Copy from the buffer into the object.
11272            unsafe {
11273                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11274            }
11275            Ok(())
11276        }
11277    }
11278
11279    impl fidl::encoding::ValueTypeMarker for GoldenByteVectorStruct {
11280        type Borrowed<'a> = &'a Self;
11281        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11282            value
11283        }
11284    }
11285
11286    unsafe impl fidl::encoding::TypeMarker for GoldenByteVectorStruct {
11287        type Owned = Self;
11288
11289        #[inline(always)]
11290        fn inline_align(_context: fidl::encoding::Context) -> usize {
11291            8
11292        }
11293
11294        #[inline(always)]
11295        fn inline_size(_context: fidl::encoding::Context) -> usize {
11296            16
11297        }
11298    }
11299
11300    unsafe impl<D: fidl::encoding::ResourceDialect>
11301        fidl::encoding::Encode<GoldenByteVectorStruct, D> for &GoldenByteVectorStruct
11302    {
11303        #[inline]
11304        unsafe fn encode(
11305            self,
11306            encoder: &mut fidl::encoding::Encoder<'_, D>,
11307            offset: usize,
11308            _depth: fidl::encoding::Depth,
11309        ) -> fidl::Result<()> {
11310            encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11311            // Delegate to tuple encoding.
11312            fidl::encoding::Encode::<GoldenByteVectorStruct, D>::encode(
11313                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
11314                    &self.v,
11315                ),),
11316                encoder,
11317                offset,
11318                _depth,
11319            )
11320        }
11321    }
11322    unsafe impl<
11323        D: fidl::encoding::ResourceDialect,
11324        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
11325    > fidl::encoding::Encode<GoldenByteVectorStruct, D> for (T0,)
11326    {
11327        #[inline]
11328        unsafe fn encode(
11329            self,
11330            encoder: &mut fidl::encoding::Encoder<'_, D>,
11331            offset: usize,
11332            depth: fidl::encoding::Depth,
11333        ) -> fidl::Result<()> {
11334            encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11335            // Zero out padding regions. There's no need to apply masks
11336            // because the unmasked parts will be overwritten by fields.
11337            // Write the fields.
11338            self.0.encode(encoder, offset + 0, depth)?;
11339            Ok(())
11340        }
11341    }
11342
11343    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11344        for GoldenByteVectorStruct
11345    {
11346        #[inline(always)]
11347        fn new_empty() -> Self {
11348            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
11349        }
11350
11351        #[inline]
11352        unsafe fn decode(
11353            &mut self,
11354            decoder: &mut fidl::encoding::Decoder<'_, D>,
11355            offset: usize,
11356            _depth: fidl::encoding::Depth,
11357        ) -> fidl::Result<()> {
11358            decoder.debug_check_bounds::<Self>(offset);
11359            // Verify that padding bytes are zero.
11360            fidl::decode!(
11361                fidl::encoding::UnboundedVector<u8>,
11362                D,
11363                &mut self.v,
11364                decoder,
11365                offset + 0,
11366                _depth
11367            )?;
11368            Ok(())
11369        }
11370    }
11371
11372    impl fidl::encoding::ValueTypeMarker for GoldenDoubleStruct {
11373        type Borrowed<'a> = &'a Self;
11374        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11375            value
11376        }
11377    }
11378
11379    unsafe impl fidl::encoding::TypeMarker for GoldenDoubleStruct {
11380        type Owned = Self;
11381
11382        #[inline(always)]
11383        fn inline_align(_context: fidl::encoding::Context) -> usize {
11384            8
11385        }
11386
11387        #[inline(always)]
11388        fn inline_size(_context: fidl::encoding::Context) -> usize {
11389            8
11390        }
11391    }
11392
11393    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenDoubleStruct, D>
11394        for &GoldenDoubleStruct
11395    {
11396        #[inline]
11397        unsafe fn encode(
11398            self,
11399            encoder: &mut fidl::encoding::Encoder<'_, D>,
11400            offset: usize,
11401            _depth: fidl::encoding::Depth,
11402        ) -> fidl::Result<()> {
11403            encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11404            // Delegate to tuple encoding.
11405            fidl::encoding::Encode::<GoldenDoubleStruct, D>::encode(
11406                (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11407                encoder,
11408                offset,
11409                _depth,
11410            )
11411        }
11412    }
11413    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
11414        fidl::encoding::Encode<GoldenDoubleStruct, D> for (T0,)
11415    {
11416        #[inline]
11417        unsafe fn encode(
11418            self,
11419            encoder: &mut fidl::encoding::Encoder<'_, D>,
11420            offset: usize,
11421            depth: fidl::encoding::Depth,
11422        ) -> fidl::Result<()> {
11423            encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11424            // Zero out padding regions. There's no need to apply masks
11425            // because the unmasked parts will be overwritten by fields.
11426            // Write the fields.
11427            self.0.encode(encoder, offset + 0, depth)?;
11428            Ok(())
11429        }
11430    }
11431
11432    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenDoubleStruct {
11433        #[inline(always)]
11434        fn new_empty() -> Self {
11435            Self { v: fidl::new_empty!(f64, D) }
11436        }
11437
11438        #[inline]
11439        unsafe fn decode(
11440            &mut self,
11441            decoder: &mut fidl::encoding::Decoder<'_, D>,
11442            offset: usize,
11443            _depth: fidl::encoding::Depth,
11444        ) -> fidl::Result<()> {
11445            decoder.debug_check_bounds::<Self>(offset);
11446            // Verify that padding bytes are zero.
11447            fidl::decode!(f64, D, &mut self.v, decoder, offset + 0, _depth)?;
11448            Ok(())
11449        }
11450    }
11451
11452    impl fidl::encoding::ValueTypeMarker for GoldenEnumStruct {
11453        type Borrowed<'a> = &'a Self;
11454        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11455            value
11456        }
11457    }
11458
11459    unsafe impl fidl::encoding::TypeMarker for GoldenEnumStruct {
11460        type Owned = Self;
11461
11462        #[inline(always)]
11463        fn inline_align(_context: fidl::encoding::Context) -> usize {
11464            2
11465        }
11466
11467        #[inline(always)]
11468        fn inline_size(_context: fidl::encoding::Context) -> usize {
11469            2
11470        }
11471    }
11472
11473    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenEnumStruct, D>
11474        for &GoldenEnumStruct
11475    {
11476        #[inline]
11477        unsafe fn encode(
11478            self,
11479            encoder: &mut fidl::encoding::Encoder<'_, D>,
11480            offset: usize,
11481            _depth: fidl::encoding::Depth,
11482        ) -> fidl::Result<()> {
11483            encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11484            // Delegate to tuple encoding.
11485            fidl::encoding::Encode::<GoldenEnumStruct, D>::encode(
11486                (<GoldenEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11487                encoder,
11488                offset,
11489                _depth,
11490            )
11491        }
11492    }
11493    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenEnum, D>>
11494        fidl::encoding::Encode<GoldenEnumStruct, D> for (T0,)
11495    {
11496        #[inline]
11497        unsafe fn encode(
11498            self,
11499            encoder: &mut fidl::encoding::Encoder<'_, D>,
11500            offset: usize,
11501            depth: fidl::encoding::Depth,
11502        ) -> fidl::Result<()> {
11503            encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11504            // Zero out padding regions. There's no need to apply masks
11505            // because the unmasked parts will be overwritten by fields.
11506            // Write the fields.
11507            self.0.encode(encoder, offset + 0, depth)?;
11508            Ok(())
11509        }
11510    }
11511
11512    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnumStruct {
11513        #[inline(always)]
11514        fn new_empty() -> Self {
11515            Self { v: fidl::new_empty!(GoldenEnum, D) }
11516        }
11517
11518        #[inline]
11519        unsafe fn decode(
11520            &mut self,
11521            decoder: &mut fidl::encoding::Decoder<'_, D>,
11522            offset: usize,
11523            _depth: fidl::encoding::Depth,
11524        ) -> fidl::Result<()> {
11525            decoder.debug_check_bounds::<Self>(offset);
11526            // Verify that padding bytes are zero.
11527            fidl::decode!(GoldenEnum, D, &mut self.v, decoder, offset + 0, _depth)?;
11528            Ok(())
11529        }
11530    }
11531
11532    impl fidl::encoding::ValueTypeMarker for GoldenFloatStruct {
11533        type Borrowed<'a> = &'a Self;
11534        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11535            value
11536        }
11537    }
11538
11539    unsafe impl fidl::encoding::TypeMarker for GoldenFloatStruct {
11540        type Owned = Self;
11541
11542        #[inline(always)]
11543        fn inline_align(_context: fidl::encoding::Context) -> usize {
11544            4
11545        }
11546
11547        #[inline(always)]
11548        fn inline_size(_context: fidl::encoding::Context) -> usize {
11549            4
11550        }
11551    }
11552
11553    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenFloatStruct, D>
11554        for &GoldenFloatStruct
11555    {
11556        #[inline]
11557        unsafe fn encode(
11558            self,
11559            encoder: &mut fidl::encoding::Encoder<'_, D>,
11560            offset: usize,
11561            _depth: fidl::encoding::Depth,
11562        ) -> fidl::Result<()> {
11563            encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11564            // Delegate to tuple encoding.
11565            fidl::encoding::Encode::<GoldenFloatStruct, D>::encode(
11566                (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11567                encoder,
11568                offset,
11569                _depth,
11570            )
11571        }
11572    }
11573    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
11574        fidl::encoding::Encode<GoldenFloatStruct, D> for (T0,)
11575    {
11576        #[inline]
11577        unsafe fn encode(
11578            self,
11579            encoder: &mut fidl::encoding::Encoder<'_, D>,
11580            offset: usize,
11581            depth: fidl::encoding::Depth,
11582        ) -> fidl::Result<()> {
11583            encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11584            // Zero out padding regions. There's no need to apply masks
11585            // because the unmasked parts will be overwritten by fields.
11586            // Write the fields.
11587            self.0.encode(encoder, offset + 0, depth)?;
11588            Ok(())
11589        }
11590    }
11591
11592    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenFloatStruct {
11593        #[inline(always)]
11594        fn new_empty() -> Self {
11595            Self { v: fidl::new_empty!(f32, D) }
11596        }
11597
11598        #[inline]
11599        unsafe fn decode(
11600            &mut self,
11601            decoder: &mut fidl::encoding::Decoder<'_, D>,
11602            offset: usize,
11603            _depth: fidl::encoding::Depth,
11604        ) -> fidl::Result<()> {
11605            decoder.debug_check_bounds::<Self>(offset);
11606            // Verify that padding bytes are zero.
11607            fidl::decode!(f32, D, &mut self.v, decoder, offset + 0, _depth)?;
11608            Ok(())
11609        }
11610    }
11611
11612    impl fidl::encoding::ValueTypeMarker for GoldenIntStruct {
11613        type Borrowed<'a> = &'a Self;
11614        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11615            value
11616        }
11617    }
11618
11619    unsafe impl fidl::encoding::TypeMarker for GoldenIntStruct {
11620        type Owned = Self;
11621
11622        #[inline(always)]
11623        fn inline_align(_context: fidl::encoding::Context) -> usize {
11624            2
11625        }
11626
11627        #[inline(always)]
11628        fn inline_size(_context: fidl::encoding::Context) -> usize {
11629            2
11630        }
11631        #[inline(always)]
11632        fn encode_is_copy() -> bool {
11633            true
11634        }
11635
11636        #[inline(always)]
11637        fn decode_is_copy() -> bool {
11638            true
11639        }
11640    }
11641
11642    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenIntStruct, D>
11643        for &GoldenIntStruct
11644    {
11645        #[inline]
11646        unsafe fn encode(
11647            self,
11648            encoder: &mut fidl::encoding::Encoder<'_, D>,
11649            offset: usize,
11650            _depth: fidl::encoding::Depth,
11651        ) -> fidl::Result<()> {
11652            encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11653            unsafe {
11654                // Copy the object into the buffer.
11655                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11656                (buf_ptr as *mut GoldenIntStruct)
11657                    .write_unaligned((self as *const GoldenIntStruct).read());
11658                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11659                // done second because the memcpy will write garbage to these bytes.
11660            }
11661            Ok(())
11662        }
11663    }
11664    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11665        fidl::encoding::Encode<GoldenIntStruct, D> for (T0,)
11666    {
11667        #[inline]
11668        unsafe fn encode(
11669            self,
11670            encoder: &mut fidl::encoding::Encoder<'_, D>,
11671            offset: usize,
11672            depth: fidl::encoding::Depth,
11673        ) -> fidl::Result<()> {
11674            encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11675            // Zero out padding regions. There's no need to apply masks
11676            // because the unmasked parts will be overwritten by fields.
11677            // Write the fields.
11678            self.0.encode(encoder, offset + 0, depth)?;
11679            Ok(())
11680        }
11681    }
11682
11683    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenIntStruct {
11684        #[inline(always)]
11685        fn new_empty() -> Self {
11686            Self { v: fidl::new_empty!(i16, D) }
11687        }
11688
11689        #[inline]
11690        unsafe fn decode(
11691            &mut self,
11692            decoder: &mut fidl::encoding::Decoder<'_, D>,
11693            offset: usize,
11694            _depth: fidl::encoding::Depth,
11695        ) -> fidl::Result<()> {
11696            decoder.debug_check_bounds::<Self>(offset);
11697            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11698            // Verify that padding bytes are zero.
11699            // Copy from the buffer into the object.
11700            unsafe {
11701                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11702            }
11703            Ok(())
11704        }
11705    }
11706
11707    impl fidl::encoding::ValueTypeMarker for GoldenNullableByteVectorStruct {
11708        type Borrowed<'a> = &'a Self;
11709        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11710            value
11711        }
11712    }
11713
11714    unsafe impl fidl::encoding::TypeMarker for GoldenNullableByteVectorStruct {
11715        type Owned = Self;
11716
11717        #[inline(always)]
11718        fn inline_align(_context: fidl::encoding::Context) -> usize {
11719            8
11720        }
11721
11722        #[inline(always)]
11723        fn inline_size(_context: fidl::encoding::Context) -> usize {
11724            16
11725        }
11726    }
11727
11728    unsafe impl<D: fidl::encoding::ResourceDialect>
11729        fidl::encoding::Encode<GoldenNullableByteVectorStruct, D>
11730        for &GoldenNullableByteVectorStruct
11731    {
11732        #[inline]
11733        unsafe fn encode(
11734            self,
11735            encoder: &mut fidl::encoding::Encoder<'_, D>,
11736            offset: usize,
11737            _depth: fidl::encoding::Depth,
11738        ) -> fidl::Result<()> {
11739            encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11740            // Delegate to tuple encoding.
11741            fidl::encoding::Encode::<GoldenNullableByteVectorStruct, D>::encode(
11742                (
11743                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11744                ),
11745                encoder, offset, _depth
11746            )
11747        }
11748    }
11749    unsafe impl<
11750        D: fidl::encoding::ResourceDialect,
11751        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>, D>,
11752    > fidl::encoding::Encode<GoldenNullableByteVectorStruct, D> for (T0,)
11753    {
11754        #[inline]
11755        unsafe fn encode(
11756            self,
11757            encoder: &mut fidl::encoding::Encoder<'_, D>,
11758            offset: usize,
11759            depth: fidl::encoding::Depth,
11760        ) -> fidl::Result<()> {
11761            encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11762            // Zero out padding regions. There's no need to apply masks
11763            // because the unmasked parts will be overwritten by fields.
11764            // Write the fields.
11765            self.0.encode(encoder, offset + 0, depth)?;
11766            Ok(())
11767        }
11768    }
11769
11770    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11771        for GoldenNullableByteVectorStruct
11772    {
11773        #[inline(always)]
11774        fn new_empty() -> Self {
11775            Self {
11776                v: fidl::new_empty!(
11777                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11778                    D
11779                ),
11780            }
11781        }
11782
11783        #[inline]
11784        unsafe fn decode(
11785            &mut self,
11786            decoder: &mut fidl::encoding::Decoder<'_, D>,
11787            offset: usize,
11788            _depth: fidl::encoding::Depth,
11789        ) -> fidl::Result<()> {
11790            decoder.debug_check_bounds::<Self>(offset);
11791            // Verify that padding bytes are zero.
11792            fidl::decode!(
11793                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11794                D,
11795                &mut self.v,
11796                decoder,
11797                offset + 0,
11798                _depth
11799            )?;
11800            Ok(())
11801        }
11802    }
11803
11804    impl fidl::encoding::ValueTypeMarker for GoldenNullableStringStruct {
11805        type Borrowed<'a> = &'a Self;
11806        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11807            value
11808        }
11809    }
11810
11811    unsafe impl fidl::encoding::TypeMarker for GoldenNullableStringStruct {
11812        type Owned = Self;
11813
11814        #[inline(always)]
11815        fn inline_align(_context: fidl::encoding::Context) -> usize {
11816            8
11817        }
11818
11819        #[inline(always)]
11820        fn inline_size(_context: fidl::encoding::Context) -> usize {
11821            16
11822        }
11823    }
11824
11825    unsafe impl<D: fidl::encoding::ResourceDialect>
11826        fidl::encoding::Encode<GoldenNullableStringStruct, D> for &GoldenNullableStringStruct
11827    {
11828        #[inline]
11829        unsafe fn encode(
11830            self,
11831            encoder: &mut fidl::encoding::Encoder<'_, D>,
11832            offset: usize,
11833            _depth: fidl::encoding::Depth,
11834        ) -> fidl::Result<()> {
11835            encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11836            // Delegate to tuple encoding.
11837            fidl::encoding::Encode::<GoldenNullableStringStruct, D>::encode(
11838                (
11839                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11840                ),
11841                encoder, offset, _depth
11842            )
11843        }
11844    }
11845    unsafe impl<
11846        D: fidl::encoding::ResourceDialect,
11847        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
11848    > fidl::encoding::Encode<GoldenNullableStringStruct, D> for (T0,)
11849    {
11850        #[inline]
11851        unsafe fn encode(
11852            self,
11853            encoder: &mut fidl::encoding::Encoder<'_, D>,
11854            offset: usize,
11855            depth: fidl::encoding::Depth,
11856        ) -> fidl::Result<()> {
11857            encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11858            // Zero out padding regions. There's no need to apply masks
11859            // because the unmasked parts will be overwritten by fields.
11860            // Write the fields.
11861            self.0.encode(encoder, offset + 0, depth)?;
11862            Ok(())
11863        }
11864    }
11865
11866    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11867        for GoldenNullableStringStruct
11868    {
11869        #[inline(always)]
11870        fn new_empty() -> Self {
11871            Self {
11872                v: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
11873            }
11874        }
11875
11876        #[inline]
11877        unsafe fn decode(
11878            &mut self,
11879            decoder: &mut fidl::encoding::Decoder<'_, D>,
11880            offset: usize,
11881            _depth: fidl::encoding::Depth,
11882        ) -> fidl::Result<()> {
11883            decoder.debug_check_bounds::<Self>(offset);
11884            // Verify that padding bytes are zero.
11885            fidl::decode!(
11886                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
11887                D,
11888                &mut self.v,
11889                decoder,
11890                offset + 0,
11891                _depth
11892            )?;
11893            Ok(())
11894        }
11895    }
11896
11897    impl fidl::encoding::ValueTypeMarker for GoldenNullableStruct {
11898        type Borrowed<'a> = &'a Self;
11899        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11900            value
11901        }
11902    }
11903
11904    unsafe impl fidl::encoding::TypeMarker for GoldenNullableStruct {
11905        type Owned = Self;
11906
11907        #[inline(always)]
11908        fn inline_align(_context: fidl::encoding::Context) -> usize {
11909            8
11910        }
11911
11912        #[inline(always)]
11913        fn inline_size(_context: fidl::encoding::Context) -> usize {
11914            8
11915        }
11916    }
11917
11918    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenNullableStruct, D>
11919        for &GoldenNullableStruct
11920    {
11921        #[inline]
11922        unsafe fn encode(
11923            self,
11924            encoder: &mut fidl::encoding::Encoder<'_, D>,
11925            offset: usize,
11926            _depth: fidl::encoding::Depth,
11927        ) -> fidl::Result<()> {
11928            encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11929            // Delegate to tuple encoding.
11930            fidl::encoding::Encode::<GoldenNullableStruct, D>::encode(
11931                (
11932                    <fidl::encoding::Boxed<GoldenBoolStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11933                ),
11934                encoder, offset, _depth
11935            )
11936        }
11937    }
11938    unsafe impl<
11939        D: fidl::encoding::ResourceDialect,
11940        T0: fidl::encoding::Encode<fidl::encoding::Boxed<GoldenBoolStruct>, D>,
11941    > fidl::encoding::Encode<GoldenNullableStruct, D> for (T0,)
11942    {
11943        #[inline]
11944        unsafe fn encode(
11945            self,
11946            encoder: &mut fidl::encoding::Encoder<'_, D>,
11947            offset: usize,
11948            depth: fidl::encoding::Depth,
11949        ) -> fidl::Result<()> {
11950            encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11951            // Zero out padding regions. There's no need to apply masks
11952            // because the unmasked parts will be overwritten by fields.
11953            // Write the fields.
11954            self.0.encode(encoder, offset + 0, depth)?;
11955            Ok(())
11956        }
11957    }
11958
11959    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenNullableStruct {
11960        #[inline(always)]
11961        fn new_empty() -> Self {
11962            Self { v: fidl::new_empty!(fidl::encoding::Boxed<GoldenBoolStruct>, D) }
11963        }
11964
11965        #[inline]
11966        unsafe fn decode(
11967            &mut self,
11968            decoder: &mut fidl::encoding::Decoder<'_, D>,
11969            offset: usize,
11970            _depth: fidl::encoding::Depth,
11971        ) -> fidl::Result<()> {
11972            decoder.debug_check_bounds::<Self>(offset);
11973            // Verify that padding bytes are zero.
11974            fidl::decode!(
11975                fidl::encoding::Boxed<GoldenBoolStruct>,
11976                D,
11977                &mut self.v,
11978                decoder,
11979                offset + 0,
11980                _depth
11981            )?;
11982            Ok(())
11983        }
11984    }
11985
11986    impl fidl::encoding::ValueTypeMarker for GoldenNullableUnionStruct {
11987        type Borrowed<'a> = &'a Self;
11988        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11989            value
11990        }
11991    }
11992
11993    unsafe impl fidl::encoding::TypeMarker for GoldenNullableUnionStruct {
11994        type Owned = Self;
11995
11996        #[inline(always)]
11997        fn inline_align(_context: fidl::encoding::Context) -> usize {
11998            8
11999        }
12000
12001        #[inline(always)]
12002        fn inline_size(_context: fidl::encoding::Context) -> usize {
12003            16
12004        }
12005    }
12006
12007    unsafe impl<D: fidl::encoding::ResourceDialect>
12008        fidl::encoding::Encode<GoldenNullableUnionStruct, D> for &GoldenNullableUnionStruct
12009    {
12010        #[inline]
12011        unsafe fn encode(
12012            self,
12013            encoder: &mut fidl::encoding::Encoder<'_, D>,
12014            offset: usize,
12015            _depth: fidl::encoding::Depth,
12016        ) -> fidl::Result<()> {
12017            encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
12018            // Delegate to tuple encoding.
12019            fidl::encoding::Encode::<GoldenNullableUnionStruct, D>::encode(
12020                (
12021                    <fidl::encoding::OptionalUnion<GoldenUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
12022                ),
12023                encoder, offset, _depth
12024            )
12025        }
12026    }
12027    unsafe impl<
12028        D: fidl::encoding::ResourceDialect,
12029        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<GoldenUnion>, D>,
12030    > fidl::encoding::Encode<GoldenNullableUnionStruct, D> for (T0,)
12031    {
12032        #[inline]
12033        unsafe fn encode(
12034            self,
12035            encoder: &mut fidl::encoding::Encoder<'_, D>,
12036            offset: usize,
12037            depth: fidl::encoding::Depth,
12038        ) -> fidl::Result<()> {
12039            encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
12040            // Zero out padding regions. There's no need to apply masks
12041            // because the unmasked parts will be overwritten by fields.
12042            // Write the fields.
12043            self.0.encode(encoder, offset + 0, depth)?;
12044            Ok(())
12045        }
12046    }
12047
12048    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12049        for GoldenNullableUnionStruct
12050    {
12051        #[inline(always)]
12052        fn new_empty() -> Self {
12053            Self { v: fidl::new_empty!(fidl::encoding::OptionalUnion<GoldenUnion>, D) }
12054        }
12055
12056        #[inline]
12057        unsafe fn decode(
12058            &mut self,
12059            decoder: &mut fidl::encoding::Decoder<'_, D>,
12060            offset: usize,
12061            _depth: fidl::encoding::Depth,
12062        ) -> fidl::Result<()> {
12063            decoder.debug_check_bounds::<Self>(offset);
12064            // Verify that padding bytes are zero.
12065            fidl::decode!(
12066                fidl::encoding::OptionalUnion<GoldenUnion>,
12067                D,
12068                &mut self.v,
12069                decoder,
12070                offset + 0,
12071                _depth
12072            )?;
12073            Ok(())
12074        }
12075    }
12076
12077    impl fidl::encoding::ValueTypeMarker for GoldenStringStruct {
12078        type Borrowed<'a> = &'a Self;
12079        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12080            value
12081        }
12082    }
12083
12084    unsafe impl fidl::encoding::TypeMarker for GoldenStringStruct {
12085        type Owned = Self;
12086
12087        #[inline(always)]
12088        fn inline_align(_context: fidl::encoding::Context) -> usize {
12089            8
12090        }
12091
12092        #[inline(always)]
12093        fn inline_size(_context: fidl::encoding::Context) -> usize {
12094            16
12095        }
12096    }
12097
12098    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenStringStruct, D>
12099        for &GoldenStringStruct
12100    {
12101        #[inline]
12102        unsafe fn encode(
12103            self,
12104            encoder: &mut fidl::encoding::Encoder<'_, D>,
12105            offset: usize,
12106            _depth: fidl::encoding::Depth,
12107        ) -> fidl::Result<()> {
12108            encoder.debug_check_bounds::<GoldenStringStruct>(offset);
12109            // Delegate to tuple encoding.
12110            fidl::encoding::Encode::<GoldenStringStruct, D>::encode(
12111                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
12112                    &self.v,
12113                ),),
12114                encoder,
12115                offset,
12116                _depth,
12117            )
12118        }
12119    }
12120    unsafe impl<
12121        D: fidl::encoding::ResourceDialect,
12122        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
12123    > fidl::encoding::Encode<GoldenStringStruct, D> for (T0,)
12124    {
12125        #[inline]
12126        unsafe fn encode(
12127            self,
12128            encoder: &mut fidl::encoding::Encoder<'_, D>,
12129            offset: usize,
12130            depth: fidl::encoding::Depth,
12131        ) -> fidl::Result<()> {
12132            encoder.debug_check_bounds::<GoldenStringStruct>(offset);
12133            // Zero out padding regions. There's no need to apply masks
12134            // because the unmasked parts will be overwritten by fields.
12135            // Write the fields.
12136            self.0.encode(encoder, offset + 0, depth)?;
12137            Ok(())
12138        }
12139    }
12140
12141    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenStringStruct {
12142        #[inline(always)]
12143        fn new_empty() -> Self {
12144            Self { v: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
12145        }
12146
12147        #[inline]
12148        unsafe fn decode(
12149            &mut self,
12150            decoder: &mut fidl::encoding::Decoder<'_, D>,
12151            offset: usize,
12152            _depth: fidl::encoding::Depth,
12153        ) -> fidl::Result<()> {
12154            decoder.debug_check_bounds::<Self>(offset);
12155            // Verify that padding bytes are zero.
12156            fidl::decode!(
12157                fidl::encoding::UnboundedString,
12158                D,
12159                &mut self.v,
12160                decoder,
12161                offset + 0,
12162                _depth
12163            )?;
12164            Ok(())
12165        }
12166    }
12167
12168    impl fidl::encoding::ValueTypeMarker for GoldenStringWithMaxSize2 {
12169        type Borrowed<'a> = &'a Self;
12170        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12171            value
12172        }
12173    }
12174
12175    unsafe impl fidl::encoding::TypeMarker for GoldenStringWithMaxSize2 {
12176        type Owned = Self;
12177
12178        #[inline(always)]
12179        fn inline_align(_context: fidl::encoding::Context) -> usize {
12180            8
12181        }
12182
12183        #[inline(always)]
12184        fn inline_size(_context: fidl::encoding::Context) -> usize {
12185            16
12186        }
12187    }
12188
12189    unsafe impl<D: fidl::encoding::ResourceDialect>
12190        fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for &GoldenStringWithMaxSize2
12191    {
12192        #[inline]
12193        unsafe fn encode(
12194            self,
12195            encoder: &mut fidl::encoding::Encoder<'_, D>,
12196            offset: usize,
12197            _depth: fidl::encoding::Depth,
12198        ) -> fidl::Result<()> {
12199            encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12200            // Delegate to tuple encoding.
12201            fidl::encoding::Encode::<GoldenStringWithMaxSize2, D>::encode(
12202                (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
12203                    &self.s,
12204                ),),
12205                encoder,
12206                offset,
12207                _depth,
12208            )
12209        }
12210    }
12211    unsafe impl<
12212        D: fidl::encoding::ResourceDialect,
12213        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
12214    > fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for (T0,)
12215    {
12216        #[inline]
12217        unsafe fn encode(
12218            self,
12219            encoder: &mut fidl::encoding::Encoder<'_, D>,
12220            offset: usize,
12221            depth: fidl::encoding::Depth,
12222        ) -> fidl::Result<()> {
12223            encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12224            // Zero out padding regions. There's no need to apply masks
12225            // because the unmasked parts will be overwritten by fields.
12226            // Write the fields.
12227            self.0.encode(encoder, offset + 0, depth)?;
12228            Ok(())
12229        }
12230    }
12231
12232    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12233        for GoldenStringWithMaxSize2
12234    {
12235        #[inline(always)]
12236        fn new_empty() -> Self {
12237            Self { s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
12238        }
12239
12240        #[inline]
12241        unsafe fn decode(
12242            &mut self,
12243            decoder: &mut fidl::encoding::Decoder<'_, D>,
12244            offset: usize,
12245            _depth: fidl::encoding::Depth,
12246        ) -> fidl::Result<()> {
12247            decoder.debug_check_bounds::<Self>(offset);
12248            // Verify that padding bytes are zero.
12249            fidl::decode!(
12250                fidl::encoding::BoundedString<2>,
12251                D,
12252                &mut self.s,
12253                decoder,
12254                offset + 0,
12255                _depth
12256            )?;
12257            Ok(())
12258        }
12259    }
12260
12261    impl fidl::encoding::ValueTypeMarker for GoldenStructArrayStruct {
12262        type Borrowed<'a> = &'a Self;
12263        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12264            value
12265        }
12266    }
12267
12268    unsafe impl fidl::encoding::TypeMarker for GoldenStructArrayStruct {
12269        type Owned = Self;
12270
12271        #[inline(always)]
12272        fn inline_align(_context: fidl::encoding::Context) -> usize {
12273            2
12274        }
12275
12276        #[inline(always)]
12277        fn inline_size(_context: fidl::encoding::Context) -> usize {
12278            4
12279        }
12280        #[inline(always)]
12281        fn encode_is_copy() -> bool {
12282            true
12283        }
12284
12285        #[inline(always)]
12286        fn decode_is_copy() -> bool {
12287            true
12288        }
12289    }
12290
12291    unsafe impl<D: fidl::encoding::ResourceDialect>
12292        fidl::encoding::Encode<GoldenStructArrayStruct, D> for &GoldenStructArrayStruct
12293    {
12294        #[inline]
12295        unsafe fn encode(
12296            self,
12297            encoder: &mut fidl::encoding::Encoder<'_, D>,
12298            offset: usize,
12299            _depth: fidl::encoding::Depth,
12300        ) -> fidl::Result<()> {
12301            encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12302            unsafe {
12303                // Copy the object into the buffer.
12304                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12305                (buf_ptr as *mut GoldenStructArrayStruct)
12306                    .write_unaligned((self as *const GoldenStructArrayStruct).read());
12307                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12308                // done second because the memcpy will write garbage to these bytes.
12309            }
12310            Ok(())
12311        }
12312    }
12313    unsafe impl<
12314        D: fidl::encoding::ResourceDialect,
12315        T0: fidl::encoding::Encode<fidl::encoding::Array<GoldenIntStruct, 2>, D>,
12316    > fidl::encoding::Encode<GoldenStructArrayStruct, D> for (T0,)
12317    {
12318        #[inline]
12319        unsafe fn encode(
12320            self,
12321            encoder: &mut fidl::encoding::Encoder<'_, D>,
12322            offset: usize,
12323            depth: fidl::encoding::Depth,
12324        ) -> fidl::Result<()> {
12325            encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12326            // Zero out padding regions. There's no need to apply masks
12327            // because the unmasked parts will be overwritten by fields.
12328            // Write the fields.
12329            self.0.encode(encoder, offset + 0, depth)?;
12330            Ok(())
12331        }
12332    }
12333
12334    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12335        for GoldenStructArrayStruct
12336    {
12337        #[inline(always)]
12338        fn new_empty() -> Self {
12339            Self { v: fidl::new_empty!(fidl::encoding::Array<GoldenIntStruct, 2>, D) }
12340        }
12341
12342        #[inline]
12343        unsafe fn decode(
12344            &mut self,
12345            decoder: &mut fidl::encoding::Decoder<'_, D>,
12346            offset: usize,
12347            _depth: fidl::encoding::Depth,
12348        ) -> fidl::Result<()> {
12349            decoder.debug_check_bounds::<Self>(offset);
12350            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12351            // Verify that padding bytes are zero.
12352            // Copy from the buffer into the object.
12353            unsafe {
12354                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12355            }
12356            Ok(())
12357        }
12358    }
12359
12360    impl fidl::encoding::ValueTypeMarker for GoldenStructVectorStruct {
12361        type Borrowed<'a> = &'a Self;
12362        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12363            value
12364        }
12365    }
12366
12367    unsafe impl fidl::encoding::TypeMarker for GoldenStructVectorStruct {
12368        type Owned = Self;
12369
12370        #[inline(always)]
12371        fn inline_align(_context: fidl::encoding::Context) -> usize {
12372            8
12373        }
12374
12375        #[inline(always)]
12376        fn inline_size(_context: fidl::encoding::Context) -> usize {
12377            16
12378        }
12379    }
12380
12381    unsafe impl<D: fidl::encoding::ResourceDialect>
12382        fidl::encoding::Encode<GoldenStructVectorStruct, D> for &GoldenStructVectorStruct
12383    {
12384        #[inline]
12385        unsafe fn encode(
12386            self,
12387            encoder: &mut fidl::encoding::Encoder<'_, D>,
12388            offset: usize,
12389            _depth: fidl::encoding::Depth,
12390        ) -> fidl::Result<()> {
12391            encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12392            // Delegate to tuple encoding.
12393            fidl::encoding::Encode::<GoldenStructVectorStruct, D>::encode(
12394                (
12395                    <fidl::encoding::UnboundedVector<GoldenIntStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
12396                ),
12397                encoder, offset, _depth
12398            )
12399        }
12400    }
12401    unsafe impl<
12402        D: fidl::encoding::ResourceDialect,
12403        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<GoldenIntStruct>, D>,
12404    > fidl::encoding::Encode<GoldenStructVectorStruct, D> for (T0,)
12405    {
12406        #[inline]
12407        unsafe fn encode(
12408            self,
12409            encoder: &mut fidl::encoding::Encoder<'_, D>,
12410            offset: usize,
12411            depth: fidl::encoding::Depth,
12412        ) -> fidl::Result<()> {
12413            encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12414            // Zero out padding regions. There's no need to apply masks
12415            // because the unmasked parts will be overwritten by fields.
12416            // Write the fields.
12417            self.0.encode(encoder, offset + 0, depth)?;
12418            Ok(())
12419        }
12420    }
12421
12422    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12423        for GoldenStructVectorStruct
12424    {
12425        #[inline(always)]
12426        fn new_empty() -> Self {
12427            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<GoldenIntStruct>, D) }
12428        }
12429
12430        #[inline]
12431        unsafe fn decode(
12432            &mut self,
12433            decoder: &mut fidl::encoding::Decoder<'_, D>,
12434            offset: usize,
12435            _depth: fidl::encoding::Depth,
12436        ) -> fidl::Result<()> {
12437            decoder.debug_check_bounds::<Self>(offset);
12438            // Verify that padding bytes are zero.
12439            fidl::decode!(
12440                fidl::encoding::UnboundedVector<GoldenIntStruct>,
12441                D,
12442                &mut self.v,
12443                decoder,
12444                offset + 0,
12445                _depth
12446            )?;
12447            Ok(())
12448        }
12449    }
12450
12451    impl fidl::encoding::ValueTypeMarker for GoldenTableStruct {
12452        type Borrowed<'a> = &'a Self;
12453        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12454            value
12455        }
12456    }
12457
12458    unsafe impl fidl::encoding::TypeMarker for GoldenTableStruct {
12459        type Owned = Self;
12460
12461        #[inline(always)]
12462        fn inline_align(_context: fidl::encoding::Context) -> usize {
12463            8
12464        }
12465
12466        #[inline(always)]
12467        fn inline_size(_context: fidl::encoding::Context) -> usize {
12468            16
12469        }
12470    }
12471
12472    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTableStruct, D>
12473        for &GoldenTableStruct
12474    {
12475        #[inline]
12476        unsafe fn encode(
12477            self,
12478            encoder: &mut fidl::encoding::Encoder<'_, D>,
12479            offset: usize,
12480            _depth: fidl::encoding::Depth,
12481        ) -> fidl::Result<()> {
12482            encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12483            // Delegate to tuple encoding.
12484            fidl::encoding::Encode::<GoldenTableStruct, D>::encode(
12485                (<GoldenTable as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12486                encoder,
12487                offset,
12488                _depth,
12489            )
12490        }
12491    }
12492    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenTable, D>>
12493        fidl::encoding::Encode<GoldenTableStruct, D> for (T0,)
12494    {
12495        #[inline]
12496        unsafe fn encode(
12497            self,
12498            encoder: &mut fidl::encoding::Encoder<'_, D>,
12499            offset: usize,
12500            depth: fidl::encoding::Depth,
12501        ) -> fidl::Result<()> {
12502            encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12503            // Zero out padding regions. There's no need to apply masks
12504            // because the unmasked parts will be overwritten by fields.
12505            // Write the fields.
12506            self.0.encode(encoder, offset + 0, depth)?;
12507            Ok(())
12508        }
12509    }
12510
12511    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTableStruct {
12512        #[inline(always)]
12513        fn new_empty() -> Self {
12514            Self { v: fidl::new_empty!(GoldenTable, D) }
12515        }
12516
12517        #[inline]
12518        unsafe fn decode(
12519            &mut self,
12520            decoder: &mut fidl::encoding::Decoder<'_, D>,
12521            offset: usize,
12522            _depth: fidl::encoding::Depth,
12523        ) -> fidl::Result<()> {
12524            decoder.debug_check_bounds::<Self>(offset);
12525            // Verify that padding bytes are zero.
12526            fidl::decode!(GoldenTable, D, &mut self.v, decoder, offset + 0, _depth)?;
12527            Ok(())
12528        }
12529    }
12530
12531    impl fidl::encoding::ValueTypeMarker for GoldenUintStruct {
12532        type Borrowed<'a> = &'a Self;
12533        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12534            value
12535        }
12536    }
12537
12538    unsafe impl fidl::encoding::TypeMarker for GoldenUintStruct {
12539        type Owned = Self;
12540
12541        #[inline(always)]
12542        fn inline_align(_context: fidl::encoding::Context) -> usize {
12543            2
12544        }
12545
12546        #[inline(always)]
12547        fn inline_size(_context: fidl::encoding::Context) -> usize {
12548            2
12549        }
12550        #[inline(always)]
12551        fn encode_is_copy() -> bool {
12552            true
12553        }
12554
12555        #[inline(always)]
12556        fn decode_is_copy() -> bool {
12557            true
12558        }
12559    }
12560
12561    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUintStruct, D>
12562        for &GoldenUintStruct
12563    {
12564        #[inline]
12565        unsafe fn encode(
12566            self,
12567            encoder: &mut fidl::encoding::Encoder<'_, D>,
12568            offset: usize,
12569            _depth: fidl::encoding::Depth,
12570        ) -> fidl::Result<()> {
12571            encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12572            unsafe {
12573                // Copy the object into the buffer.
12574                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12575                (buf_ptr as *mut GoldenUintStruct)
12576                    .write_unaligned((self as *const GoldenUintStruct).read());
12577                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12578                // done second because the memcpy will write garbage to these bytes.
12579            }
12580            Ok(())
12581        }
12582    }
12583    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
12584        fidl::encoding::Encode<GoldenUintStruct, D> for (T0,)
12585    {
12586        #[inline]
12587        unsafe fn encode(
12588            self,
12589            encoder: &mut fidl::encoding::Encoder<'_, D>,
12590            offset: usize,
12591            depth: fidl::encoding::Depth,
12592        ) -> fidl::Result<()> {
12593            encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12594            // Zero out padding regions. There's no need to apply masks
12595            // because the unmasked parts will be overwritten by fields.
12596            // Write the fields.
12597            self.0.encode(encoder, offset + 0, depth)?;
12598            Ok(())
12599        }
12600    }
12601
12602    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUintStruct {
12603        #[inline(always)]
12604        fn new_empty() -> Self {
12605            Self { v: fidl::new_empty!(u16, D) }
12606        }
12607
12608        #[inline]
12609        unsafe fn decode(
12610            &mut self,
12611            decoder: &mut fidl::encoding::Decoder<'_, D>,
12612            offset: usize,
12613            _depth: fidl::encoding::Depth,
12614        ) -> fidl::Result<()> {
12615            decoder.debug_check_bounds::<Self>(offset);
12616            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12617            // Verify that padding bytes are zero.
12618            // Copy from the buffer into the object.
12619            unsafe {
12620                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
12621            }
12622            Ok(())
12623        }
12624    }
12625
12626    impl fidl::encoding::ValueTypeMarker for GoldenUnionStruct {
12627        type Borrowed<'a> = &'a Self;
12628        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12629            value
12630        }
12631    }
12632
12633    unsafe impl fidl::encoding::TypeMarker for GoldenUnionStruct {
12634        type Owned = Self;
12635
12636        #[inline(always)]
12637        fn inline_align(_context: fidl::encoding::Context) -> usize {
12638            8
12639        }
12640
12641        #[inline(always)]
12642        fn inline_size(_context: fidl::encoding::Context) -> usize {
12643            16
12644        }
12645    }
12646
12647    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnionStruct, D>
12648        for &GoldenUnionStruct
12649    {
12650        #[inline]
12651        unsafe fn encode(
12652            self,
12653            encoder: &mut fidl::encoding::Encoder<'_, D>,
12654            offset: usize,
12655            _depth: fidl::encoding::Depth,
12656        ) -> fidl::Result<()> {
12657            encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12658            // Delegate to tuple encoding.
12659            fidl::encoding::Encode::<GoldenUnionStruct, D>::encode(
12660                (<GoldenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12661                encoder,
12662                offset,
12663                _depth,
12664            )
12665        }
12666    }
12667    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenUnion, D>>
12668        fidl::encoding::Encode<GoldenUnionStruct, D> for (T0,)
12669    {
12670        #[inline]
12671        unsafe fn encode(
12672            self,
12673            encoder: &mut fidl::encoding::Encoder<'_, D>,
12674            offset: usize,
12675            depth: fidl::encoding::Depth,
12676        ) -> fidl::Result<()> {
12677            encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12678            // Zero out padding regions. There's no need to apply masks
12679            // because the unmasked parts will be overwritten by fields.
12680            // Write the fields.
12681            self.0.encode(encoder, offset + 0, depth)?;
12682            Ok(())
12683        }
12684    }
12685
12686    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnionStruct {
12687        #[inline(always)]
12688        fn new_empty() -> Self {
12689            Self { v: fidl::new_empty!(GoldenUnion, D) }
12690        }
12691
12692        #[inline]
12693        unsafe fn decode(
12694            &mut self,
12695            decoder: &mut fidl::encoding::Decoder<'_, D>,
12696            offset: usize,
12697            _depth: fidl::encoding::Depth,
12698        ) -> fidl::Result<()> {
12699            decoder.debug_check_bounds::<Self>(offset);
12700            // Verify that padding bytes are zero.
12701            fidl::decode!(GoldenUnion, D, &mut self.v, decoder, offset + 0, _depth)?;
12702            Ok(())
12703        }
12704    }
12705
12706    impl fidl::encoding::ValueTypeMarker for Int64Struct {
12707        type Borrowed<'a> = &'a Self;
12708        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12709            value
12710        }
12711    }
12712
12713    unsafe impl fidl::encoding::TypeMarker for Int64Struct {
12714        type Owned = Self;
12715
12716        #[inline(always)]
12717        fn inline_align(_context: fidl::encoding::Context) -> usize {
12718            8
12719        }
12720
12721        #[inline(always)]
12722        fn inline_size(_context: fidl::encoding::Context) -> usize {
12723            8
12724        }
12725        #[inline(always)]
12726        fn encode_is_copy() -> bool {
12727            true
12728        }
12729
12730        #[inline(always)]
12731        fn decode_is_copy() -> bool {
12732            true
12733        }
12734    }
12735
12736    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Int64Struct, D>
12737        for &Int64Struct
12738    {
12739        #[inline]
12740        unsafe fn encode(
12741            self,
12742            encoder: &mut fidl::encoding::Encoder<'_, D>,
12743            offset: usize,
12744            _depth: fidl::encoding::Depth,
12745        ) -> fidl::Result<()> {
12746            encoder.debug_check_bounds::<Int64Struct>(offset);
12747            unsafe {
12748                // Copy the object into the buffer.
12749                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12750                (buf_ptr as *mut Int64Struct).write_unaligned((self as *const Int64Struct).read());
12751                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12752                // done second because the memcpy will write garbage to these bytes.
12753            }
12754            Ok(())
12755        }
12756    }
12757    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
12758        fidl::encoding::Encode<Int64Struct, D> for (T0,)
12759    {
12760        #[inline]
12761        unsafe fn encode(
12762            self,
12763            encoder: &mut fidl::encoding::Encoder<'_, D>,
12764            offset: usize,
12765            depth: fidl::encoding::Depth,
12766        ) -> fidl::Result<()> {
12767            encoder.debug_check_bounds::<Int64Struct>(offset);
12768            // Zero out padding regions. There's no need to apply masks
12769            // because the unmasked parts will be overwritten by fields.
12770            // Write the fields.
12771            self.0.encode(encoder, offset + 0, depth)?;
12772            Ok(())
12773        }
12774    }
12775
12776    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Int64Struct {
12777        #[inline(always)]
12778        fn new_empty() -> Self {
12779            Self { x: fidl::new_empty!(i64, D) }
12780        }
12781
12782        #[inline]
12783        unsafe fn decode(
12784            &mut self,
12785            decoder: &mut fidl::encoding::Decoder<'_, D>,
12786            offset: usize,
12787            _depth: fidl::encoding::Depth,
12788        ) -> fidl::Result<()> {
12789            decoder.debug_check_bounds::<Self>(offset);
12790            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12791            // Verify that padding bytes are zero.
12792            // Copy from the buffer into the object.
12793            unsafe {
12794                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12795            }
12796            Ok(())
12797        }
12798    }
12799
12800    impl fidl::encoding::ValueTypeMarker for InterfaceConfig {
12801        type Borrowed<'a> = &'a Self;
12802        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12803            value
12804        }
12805    }
12806
12807    unsafe impl fidl::encoding::TypeMarker for InterfaceConfig {
12808        type Owned = Self;
12809
12810        #[inline(always)]
12811        fn inline_align(_context: fidl::encoding::Context) -> usize {
12812            8
12813        }
12814
12815        #[inline(always)]
12816        fn inline_size(_context: fidl::encoding::Context) -> usize {
12817            32
12818        }
12819    }
12820
12821    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceConfig, D>
12822        for &InterfaceConfig
12823    {
12824        #[inline]
12825        unsafe fn encode(
12826            self,
12827            encoder: &mut fidl::encoding::Encoder<'_, D>,
12828            offset: usize,
12829            _depth: fidl::encoding::Depth,
12830        ) -> fidl::Result<()> {
12831            encoder.debug_check_bounds::<InterfaceConfig>(offset);
12832            // Delegate to tuple encoding.
12833            fidl::encoding::Encode::<InterfaceConfig, D>::encode(
12834                (
12835                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
12836                        &self.name,
12837                    ),
12838                    <IpAddressConfig as fidl::encoding::ValueTypeMarker>::borrow(
12839                        &self.ip_address_config,
12840                    ),
12841                ),
12842                encoder,
12843                offset,
12844                _depth,
12845            )
12846        }
12847    }
12848    unsafe impl<
12849        D: fidl::encoding::ResourceDialect,
12850        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
12851        T1: fidl::encoding::Encode<IpAddressConfig, D>,
12852    > fidl::encoding::Encode<InterfaceConfig, D> for (T0, T1)
12853    {
12854        #[inline]
12855        unsafe fn encode(
12856            self,
12857            encoder: &mut fidl::encoding::Encoder<'_, D>,
12858            offset: usize,
12859            depth: fidl::encoding::Depth,
12860        ) -> fidl::Result<()> {
12861            encoder.debug_check_bounds::<InterfaceConfig>(offset);
12862            // Zero out padding regions. There's no need to apply masks
12863            // because the unmasked parts will be overwritten by fields.
12864            // Write the fields.
12865            self.0.encode(encoder, offset + 0, depth)?;
12866            self.1.encode(encoder, offset + 16, depth)?;
12867            Ok(())
12868        }
12869    }
12870
12871    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceConfig {
12872        #[inline(always)]
12873        fn new_empty() -> Self {
12874            Self {
12875                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
12876                ip_address_config: fidl::new_empty!(IpAddressConfig, D),
12877            }
12878        }
12879
12880        #[inline]
12881        unsafe fn decode(
12882            &mut self,
12883            decoder: &mut fidl::encoding::Decoder<'_, D>,
12884            offset: usize,
12885            _depth: fidl::encoding::Depth,
12886        ) -> fidl::Result<()> {
12887            decoder.debug_check_bounds::<Self>(offset);
12888            // Verify that padding bytes are zero.
12889            fidl::decode!(
12890                fidl::encoding::UnboundedString,
12891                D,
12892                &mut self.name,
12893                decoder,
12894                offset + 0,
12895                _depth
12896            )?;
12897            fidl::decode!(
12898                IpAddressConfig,
12899                D,
12900                &mut self.ip_address_config,
12901                decoder,
12902                offset + 16,
12903                _depth
12904            )?;
12905            Ok(())
12906        }
12907    }
12908
12909    impl fidl::encoding::ValueTypeMarker for LargeArrays {
12910        type Borrowed<'a> = &'a Self;
12911        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12912            value
12913        }
12914    }
12915
12916    unsafe impl fidl::encoding::TypeMarker for LargeArrays {
12917        type Owned = Self;
12918
12919        #[inline(always)]
12920        fn inline_align(_context: fidl::encoding::Context) -> usize {
12921            8
12922        }
12923
12924        #[inline(always)]
12925        fn inline_size(_context: fidl::encoding::Context) -> usize {
12926            648
12927        }
12928    }
12929
12930    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LargeArrays, D>
12931        for &LargeArrays
12932    {
12933        #[inline]
12934        unsafe fn encode(
12935            self,
12936            encoder: &mut fidl::encoding::Encoder<'_, D>,
12937            offset: usize,
12938            _depth: fidl::encoding::Depth,
12939        ) -> fidl::Result<()> {
12940            encoder.debug_check_bounds::<LargeArrays>(offset);
12941            // Delegate to tuple encoding.
12942            fidl::encoding::Encode::<LargeArrays, D>::encode(
12943                (
12944                    <fidl::encoding::Array<
12945                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12946                        33,
12947                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.a33),
12948                    <fidl::encoding::Array<u8, 100> as fidl::encoding::ValueTypeMarker>::borrow(
12949                        &self.a100,
12950                    ),
12951                    <fidl::encoding::UnboundedVector<
12952                        fidl::encoding::Array<
12953                            fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12954                            200,
12955                        >,
12956                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.nested),
12957                ),
12958                encoder,
12959                offset,
12960                _depth,
12961            )
12962        }
12963    }
12964    unsafe impl<
12965        D: fidl::encoding::ResourceDialect,
12966        T0: fidl::encoding::Encode<
12967                fidl::encoding::Array<
12968                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12969                    33,
12970                >,
12971                D,
12972            >,
12973        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 100>, D>,
12974        T2: fidl::encoding::Encode<
12975                fidl::encoding::UnboundedVector<
12976                    fidl::encoding::Array<
12977                        fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12978                        200,
12979                    >,
12980                >,
12981                D,
12982            >,
12983    > fidl::encoding::Encode<LargeArrays, D> for (T0, T1, T2)
12984    {
12985        #[inline]
12986        unsafe fn encode(
12987            self,
12988            encoder: &mut fidl::encoding::Encoder<'_, D>,
12989            offset: usize,
12990            depth: fidl::encoding::Depth,
12991        ) -> fidl::Result<()> {
12992            encoder.debug_check_bounds::<LargeArrays>(offset);
12993            // Zero out padding regions. There's no need to apply masks
12994            // because the unmasked parts will be overwritten by fields.
12995            unsafe {
12996                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(624);
12997                (ptr as *mut u64).write_unaligned(0);
12998            }
12999            // Write the fields.
13000            self.0.encode(encoder, offset + 0, depth)?;
13001            self.1.encode(encoder, offset + 528, depth)?;
13002            self.2.encode(encoder, offset + 632, depth)?;
13003            Ok(())
13004        }
13005    }
13006
13007    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LargeArrays {
13008        #[inline(always)]
13009        fn new_empty() -> Self {
13010            Self {
13011                a33: fidl::new_empty!(
13012                    fidl::encoding::Array<
13013                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13014                        33,
13015                    >,
13016                    D
13017                ),
13018                a100: fidl::new_empty!(fidl::encoding::Array<u8, 100>, D),
13019                nested: fidl::new_empty!(
13020                    fidl::encoding::UnboundedVector<
13021                        fidl::encoding::Array<
13022                            fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
13023                            200,
13024                        >,
13025                    >,
13026                    D
13027                ),
13028            }
13029        }
13030
13031        #[inline]
13032        unsafe fn decode(
13033            &mut self,
13034            decoder: &mut fidl::encoding::Decoder<'_, D>,
13035            offset: usize,
13036            _depth: fidl::encoding::Depth,
13037        ) -> fidl::Result<()> {
13038            decoder.debug_check_bounds::<Self>(offset);
13039            // Verify that padding bytes are zero.
13040            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(624) };
13041            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13042            let mask = 0xffffffff00000000u64;
13043            let maskedval = padval & mask;
13044            if maskedval != 0 {
13045                return Err(fidl::Error::NonZeroPadding {
13046                    padding_start: offset + 624 + ((mask as u64).trailing_zeros() / 8) as usize,
13047                });
13048            }
13049            fidl::decode!(
13050                fidl::encoding::Array<
13051                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13052                    33,
13053                >,
13054                D,
13055                &mut self.a33,
13056                decoder,
13057                offset + 0,
13058                _depth
13059            )?;
13060            fidl::decode!(fidl::encoding::Array<u8, 100>, D, &mut self.a100, decoder, offset + 528, _depth)?;
13061            fidl::decode!(
13062                fidl::encoding::UnboundedVector<
13063                    fidl::encoding::Array<
13064                        fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
13065                        200,
13066                    >,
13067                >,
13068                D,
13069                &mut self.nested,
13070                decoder,
13071                offset + 632,
13072                _depth
13073            )?;
13074            Ok(())
13075        }
13076    }
13077
13078    impl fidl::encoding::ValueTypeMarker for Length2StringWrapper {
13079        type Borrowed<'a> = &'a Self;
13080        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13081            value
13082        }
13083    }
13084
13085    unsafe impl fidl::encoding::TypeMarker for Length2StringWrapper {
13086        type Owned = Self;
13087
13088        #[inline(always)]
13089        fn inline_align(_context: fidl::encoding::Context) -> usize {
13090            8
13091        }
13092
13093        #[inline(always)]
13094        fn inline_size(_context: fidl::encoding::Context) -> usize {
13095            16
13096        }
13097    }
13098
13099    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Length2StringWrapper, D>
13100        for &Length2StringWrapper
13101    {
13102        #[inline]
13103        unsafe fn encode(
13104            self,
13105            encoder: &mut fidl::encoding::Encoder<'_, D>,
13106            offset: usize,
13107            _depth: fidl::encoding::Depth,
13108        ) -> fidl::Result<()> {
13109            encoder.debug_check_bounds::<Length2StringWrapper>(offset);
13110            // Delegate to tuple encoding.
13111            fidl::encoding::Encode::<Length2StringWrapper, D>::encode(
13112                (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
13113                    &self.length_2_string,
13114                ),),
13115                encoder,
13116                offset,
13117                _depth,
13118            )
13119        }
13120    }
13121    unsafe impl<
13122        D: fidl::encoding::ResourceDialect,
13123        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
13124    > fidl::encoding::Encode<Length2StringWrapper, D> for (T0,)
13125    {
13126        #[inline]
13127        unsafe fn encode(
13128            self,
13129            encoder: &mut fidl::encoding::Encoder<'_, D>,
13130            offset: usize,
13131            depth: fidl::encoding::Depth,
13132        ) -> fidl::Result<()> {
13133            encoder.debug_check_bounds::<Length2StringWrapper>(offset);
13134            // Zero out padding regions. There's no need to apply masks
13135            // because the unmasked parts will be overwritten by fields.
13136            // Write the fields.
13137            self.0.encode(encoder, offset + 0, depth)?;
13138            Ok(())
13139        }
13140    }
13141
13142    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Length2StringWrapper {
13143        #[inline(always)]
13144        fn new_empty() -> Self {
13145            Self { length_2_string: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
13146        }
13147
13148        #[inline]
13149        unsafe fn decode(
13150            &mut self,
13151            decoder: &mut fidl::encoding::Decoder<'_, D>,
13152            offset: usize,
13153            _depth: fidl::encoding::Depth,
13154        ) -> fidl::Result<()> {
13155            decoder.debug_check_bounds::<Self>(offset);
13156            // Verify that padding bytes are zero.
13157            fidl::decode!(
13158                fidl::encoding::BoundedString<2>,
13159                D,
13160                &mut self.length_2_string,
13161                decoder,
13162                offset + 0,
13163                _depth
13164            )?;
13165            Ok(())
13166        }
13167    }
13168
13169    impl fidl::encoding::ValueTypeMarker for LotsOfVectors {
13170        type Borrowed<'a> = &'a Self;
13171        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13172            value
13173        }
13174    }
13175
13176    unsafe impl fidl::encoding::TypeMarker for LotsOfVectors {
13177        type Owned = Self;
13178
13179        #[inline(always)]
13180        fn inline_align(_context: fidl::encoding::Context) -> usize {
13181            8
13182        }
13183
13184        #[inline(always)]
13185        fn inline_size(_context: fidl::encoding::Context) -> usize {
13186            144
13187        }
13188    }
13189
13190    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LotsOfVectors, D>
13191        for &LotsOfVectors
13192    {
13193        #[inline]
13194        unsafe fn encode(
13195            self,
13196            encoder: &mut fidl::encoding::Encoder<'_, D>,
13197            offset: usize,
13198            _depth: fidl::encoding::Depth,
13199        ) -> fidl::Result<()> {
13200            encoder.debug_check_bounds::<LotsOfVectors>(offset);
13201            // Delegate to tuple encoding.
13202            fidl::encoding::Encode::<LotsOfVectors, D>::encode(
13203                (
13204                    <fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v1),
13205                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v2),
13206                    <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v3),
13207                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v4),
13208                    <fidl::encoding::UnboundedVector<i8> as fidl::encoding::ValueTypeMarker>::borrow(&self.v5),
13209                    <fidl::encoding::UnboundedVector<i16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v6),
13210                    <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v7),
13211                    <fidl::encoding::UnboundedVector<i64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v8),
13212                    <fidl::encoding::UnboundedVector<bool> as fidl::encoding::ValueTypeMarker>::borrow(&self.v9),
13213                ),
13214                encoder, offset, _depth
13215            )
13216        }
13217    }
13218    unsafe impl<
13219        D: fidl::encoding::ResourceDialect,
13220        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>, D>,
13221        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13222        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
13223        T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
13224        T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i8>, D>,
13225        T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i16>, D>,
13226        T6: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
13227        T7: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i64>, D>,
13228        T8: fidl::encoding::Encode<fidl::encoding::UnboundedVector<bool>, D>,
13229    > fidl::encoding::Encode<LotsOfVectors, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
13230    {
13231        #[inline]
13232        unsafe fn encode(
13233            self,
13234            encoder: &mut fidl::encoding::Encoder<'_, D>,
13235            offset: usize,
13236            depth: fidl::encoding::Depth,
13237        ) -> fidl::Result<()> {
13238            encoder.debug_check_bounds::<LotsOfVectors>(offset);
13239            // Zero out padding regions. There's no need to apply masks
13240            // because the unmasked parts will be overwritten by fields.
13241            // Write the fields.
13242            self.0.encode(encoder, offset + 0, depth)?;
13243            self.1.encode(encoder, offset + 16, depth)?;
13244            self.2.encode(encoder, offset + 32, depth)?;
13245            self.3.encode(encoder, offset + 48, depth)?;
13246            self.4.encode(encoder, offset + 64, depth)?;
13247            self.5.encode(encoder, offset + 80, depth)?;
13248            self.6.encode(encoder, offset + 96, depth)?;
13249            self.7.encode(encoder, offset + 112, depth)?;
13250            self.8.encode(encoder, offset + 128, depth)?;
13251            Ok(())
13252        }
13253    }
13254
13255    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LotsOfVectors {
13256        #[inline(always)]
13257        fn new_empty() -> Self {
13258            Self {
13259                v1: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>, D),
13260                v2: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13261                v3: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
13262                v4: fidl::new_empty!(
13263                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13264                    D
13265                ),
13266                v5: fidl::new_empty!(fidl::encoding::UnboundedVector<i8>, D),
13267                v6: fidl::new_empty!(fidl::encoding::UnboundedVector<i16>, D),
13268                v7: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
13269                v8: fidl::new_empty!(fidl::encoding::UnboundedVector<i64>, D),
13270                v9: fidl::new_empty!(fidl::encoding::UnboundedVector<bool>, D),
13271            }
13272        }
13273
13274        #[inline]
13275        unsafe fn decode(
13276            &mut self,
13277            decoder: &mut fidl::encoding::Decoder<'_, D>,
13278            offset: usize,
13279            _depth: fidl::encoding::Depth,
13280        ) -> fidl::Result<()> {
13281            decoder.debug_check_bounds::<Self>(offset);
13282            // Verify that padding bytes are zero.
13283            fidl::decode!(
13284                fidl::encoding::UnboundedVector<u16>,
13285                D,
13286                &mut self.v1,
13287                decoder,
13288                offset + 0,
13289                _depth
13290            )?;
13291            fidl::decode!(
13292                fidl::encoding::UnboundedVector<u32>,
13293                D,
13294                &mut self.v2,
13295                decoder,
13296                offset + 16,
13297                _depth
13298            )?;
13299            fidl::decode!(
13300                fidl::encoding::UnboundedVector<u64>,
13301                D,
13302                &mut self.v3,
13303                decoder,
13304                offset + 32,
13305                _depth
13306            )?;
13307            fidl::decode!(
13308                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13309                D,
13310                &mut self.v4,
13311                decoder,
13312                offset + 48,
13313                _depth
13314            )?;
13315            fidl::decode!(
13316                fidl::encoding::UnboundedVector<i8>,
13317                D,
13318                &mut self.v5,
13319                decoder,
13320                offset + 64,
13321                _depth
13322            )?;
13323            fidl::decode!(
13324                fidl::encoding::UnboundedVector<i16>,
13325                D,
13326                &mut self.v6,
13327                decoder,
13328                offset + 80,
13329                _depth
13330            )?;
13331            fidl::decode!(
13332                fidl::encoding::UnboundedVector<i32>,
13333                D,
13334                &mut self.v7,
13335                decoder,
13336                offset + 96,
13337                _depth
13338            )?;
13339            fidl::decode!(
13340                fidl::encoding::UnboundedVector<i64>,
13341                D,
13342                &mut self.v8,
13343                decoder,
13344                offset + 112,
13345                _depth
13346            )?;
13347            fidl::decode!(
13348                fidl::encoding::UnboundedVector<bool>,
13349                D,
13350                &mut self.v9,
13351                decoder,
13352                offset + 128,
13353                _depth
13354            )?;
13355            Ok(())
13356        }
13357    }
13358
13359    impl fidl::encoding::ValueTypeMarker for MixedFieldsBody {
13360        type Borrowed<'a> = &'a Self;
13361        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13362            value
13363        }
13364    }
13365
13366    unsafe impl fidl::encoding::TypeMarker for MixedFieldsBody {
13367        type Owned = Self;
13368
13369        #[inline(always)]
13370        fn inline_align(_context: fidl::encoding::Context) -> usize {
13371            8
13372        }
13373
13374        #[inline(always)]
13375        fn inline_size(_context: fidl::encoding::Context) -> usize {
13376            64
13377        }
13378    }
13379
13380    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsBody, D>
13381        for &MixedFieldsBody
13382    {
13383        #[inline]
13384        unsafe fn encode(
13385            self,
13386            encoder: &mut fidl::encoding::Encoder<'_, D>,
13387            offset: usize,
13388            _depth: fidl::encoding::Depth,
13389        ) -> fidl::Result<()> {
13390            encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13391            // Delegate to tuple encoding.
13392            fidl::encoding::Encode::<MixedFieldsBody, D>::encode(
13393                (
13394                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
13395                    <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13396                        &self.first_union,
13397                    ),
13398                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_start),
13399                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_end),
13400                    <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13401                        &self.second_union,
13402                    ),
13403                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
13404                ),
13405                encoder,
13406                offset,
13407                _depth,
13408            )
13409        }
13410    }
13411    unsafe impl<
13412        D: fidl::encoding::ResourceDialect,
13413        T0: fidl::encoding::Encode<u32, D>,
13414        T1: fidl::encoding::Encode<UnionSize8Align4, D>,
13415        T2: fidl::encoding::Encode<u16, D>,
13416        T3: fidl::encoding::Encode<u64, D>,
13417        T4: fidl::encoding::Encode<UnionSize8Align4, D>,
13418        T5: fidl::encoding::Encode<u32, D>,
13419    > fidl::encoding::Encode<MixedFieldsBody, D> for (T0, T1, T2, T3, T4, T5)
13420    {
13421        #[inline]
13422        unsafe fn encode(
13423            self,
13424            encoder: &mut fidl::encoding::Encoder<'_, D>,
13425            offset: usize,
13426            depth: fidl::encoding::Depth,
13427        ) -> fidl::Result<()> {
13428            encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13429            // Zero out padding regions. There's no need to apply masks
13430            // because the unmasked parts will be overwritten by fields.
13431            unsafe {
13432                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
13433                (ptr as *mut u64).write_unaligned(0);
13434            }
13435            unsafe {
13436                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
13437                (ptr as *mut u64).write_unaligned(0);
13438            }
13439            unsafe {
13440                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
13441                (ptr as *mut u64).write_unaligned(0);
13442            }
13443            // Write the fields.
13444            self.0.encode(encoder, offset + 0, depth)?;
13445            self.1.encode(encoder, offset + 8, depth)?;
13446            self.2.encode(encoder, offset + 24, depth)?;
13447            self.3.encode(encoder, offset + 32, depth)?;
13448            self.4.encode(encoder, offset + 40, depth)?;
13449            self.5.encode(encoder, offset + 56, depth)?;
13450            Ok(())
13451        }
13452    }
13453
13454    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsBody {
13455        #[inline(always)]
13456        fn new_empty() -> Self {
13457            Self {
13458                before: fidl::new_empty!(u32, D),
13459                first_union: fidl::new_empty!(UnionSize8Align4, D),
13460                middle_start: fidl::new_empty!(u16, D),
13461                middle_end: fidl::new_empty!(u64, D),
13462                second_union: fidl::new_empty!(UnionSize8Align4, D),
13463                after: fidl::new_empty!(u32, D),
13464            }
13465        }
13466
13467        #[inline]
13468        unsafe fn decode(
13469            &mut self,
13470            decoder: &mut fidl::encoding::Decoder<'_, D>,
13471            offset: usize,
13472            _depth: fidl::encoding::Depth,
13473        ) -> fidl::Result<()> {
13474            decoder.debug_check_bounds::<Self>(offset);
13475            // Verify that padding bytes are zero.
13476            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
13477            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13478            let mask = 0xffffffff00000000u64;
13479            let maskedval = padval & mask;
13480            if maskedval != 0 {
13481                return Err(fidl::Error::NonZeroPadding {
13482                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
13483                });
13484            }
13485            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
13486            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13487            let mask = 0xffffffffffff0000u64;
13488            let maskedval = padval & mask;
13489            if maskedval != 0 {
13490                return Err(fidl::Error::NonZeroPadding {
13491                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
13492                });
13493            }
13494            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
13495            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13496            let mask = 0xffffffff00000000u64;
13497            let maskedval = padval & mask;
13498            if maskedval != 0 {
13499                return Err(fidl::Error::NonZeroPadding {
13500                    padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
13501                });
13502            }
13503            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
13504            fidl::decode!(UnionSize8Align4, D, &mut self.first_union, decoder, offset + 8, _depth)?;
13505            fidl::decode!(u16, D, &mut self.middle_start, decoder, offset + 24, _depth)?;
13506            fidl::decode!(u64, D, &mut self.middle_end, decoder, offset + 32, _depth)?;
13507            fidl::decode!(
13508                UnionSize8Align4,
13509                D,
13510                &mut self.second_union,
13511                decoder,
13512                offset + 40,
13513                _depth
13514            )?;
13515            fidl::decode!(u32, D, &mut self.after, decoder, offset + 56, _depth)?;
13516            Ok(())
13517        }
13518    }
13519
13520    impl fidl::encoding::ValueTypeMarker for MixedFieldsMessage {
13521        type Borrowed<'a> = &'a Self;
13522        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13523            value
13524        }
13525    }
13526
13527    unsafe impl fidl::encoding::TypeMarker for MixedFieldsMessage {
13528        type Owned = Self;
13529
13530        #[inline(always)]
13531        fn inline_align(_context: fidl::encoding::Context) -> usize {
13532            8
13533        }
13534
13535        #[inline(always)]
13536        fn inline_size(_context: fidl::encoding::Context) -> usize {
13537            80
13538        }
13539    }
13540
13541    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsMessage, D>
13542        for &MixedFieldsMessage
13543    {
13544        #[inline]
13545        unsafe fn encode(
13546            self,
13547            encoder: &mut fidl::encoding::Encoder<'_, D>,
13548            offset: usize,
13549            _depth: fidl::encoding::Depth,
13550        ) -> fidl::Result<()> {
13551            encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13552            // Delegate to tuple encoding.
13553            fidl::encoding::Encode::<MixedFieldsMessage, D>::encode(
13554                (
13555                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
13556                    <MixedFieldsBody as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
13557                ),
13558                encoder,
13559                offset,
13560                _depth,
13561            )
13562        }
13563    }
13564    unsafe impl<
13565        D: fidl::encoding::ResourceDialect,
13566        T0: fidl::encoding::Encode<TransactionHeader, D>,
13567        T1: fidl::encoding::Encode<MixedFieldsBody, D>,
13568    > fidl::encoding::Encode<MixedFieldsMessage, D> for (T0, T1)
13569    {
13570        #[inline]
13571        unsafe fn encode(
13572            self,
13573            encoder: &mut fidl::encoding::Encoder<'_, D>,
13574            offset: usize,
13575            depth: fidl::encoding::Depth,
13576        ) -> fidl::Result<()> {
13577            encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13578            // Zero out padding regions. There's no need to apply masks
13579            // because the unmasked parts will be overwritten by fields.
13580            // Write the fields.
13581            self.0.encode(encoder, offset + 0, depth)?;
13582            self.1.encode(encoder, offset + 16, depth)?;
13583            Ok(())
13584        }
13585    }
13586
13587    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsMessage {
13588        #[inline(always)]
13589        fn new_empty() -> Self {
13590            Self {
13591                header: fidl::new_empty!(TransactionHeader, D),
13592                body: fidl::new_empty!(MixedFieldsBody, D),
13593            }
13594        }
13595
13596        #[inline]
13597        unsafe fn decode(
13598            &mut self,
13599            decoder: &mut fidl::encoding::Decoder<'_, D>,
13600            offset: usize,
13601            _depth: fidl::encoding::Depth,
13602        ) -> fidl::Result<()> {
13603            decoder.debug_check_bounds::<Self>(offset);
13604            // Verify that padding bytes are zero.
13605            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
13606            fidl::decode!(MixedFieldsBody, D, &mut self.body, decoder, offset + 16, _depth)?;
13607            Ok(())
13608        }
13609    }
13610
13611    impl fidl::encoding::ValueTypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13612        type Borrowed<'a> = &'a Self;
13613        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13614            value
13615        }
13616    }
13617
13618    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13619        type Owned = Self;
13620
13621        #[inline(always)]
13622        fn inline_align(_context: fidl::encoding::Context) -> usize {
13623            8
13624        }
13625
13626        #[inline(always)]
13627        fn inline_size(_context: fidl::encoding::Context) -> usize {
13628            32
13629        }
13630    }
13631
13632    unsafe impl<D: fidl::encoding::ResourceDialect>
13633        fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D>
13634        for &MultipleBoundedNonnullableVectorsOfUint32s
13635    {
13636        #[inline]
13637        unsafe fn encode(
13638            self,
13639            encoder: &mut fidl::encoding::Encoder<'_, D>,
13640            offset: usize,
13641            _depth: fidl::encoding::Depth,
13642        ) -> fidl::Result<()> {
13643            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13644            // Delegate to tuple encoding.
13645            fidl::encoding::Encode::<MultipleBoundedNonnullableVectorsOfUint32s, D>::encode(
13646                (
13647                    <fidl::encoding::Vector<u32, 2> as fidl::encoding::ValueTypeMarker>::borrow(
13648                        &self.vu0,
13649                    ),
13650                    <fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
13651                        &self.vu1,
13652                    ),
13653                ),
13654                encoder,
13655                offset,
13656                _depth,
13657            )
13658        }
13659    }
13660    unsafe impl<
13661        D: fidl::encoding::ResourceDialect,
13662        T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 2>, D>,
13663        T1: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
13664    > fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D> for (T0, T1)
13665    {
13666        #[inline]
13667        unsafe fn encode(
13668            self,
13669            encoder: &mut fidl::encoding::Encoder<'_, D>,
13670            offset: usize,
13671            depth: fidl::encoding::Depth,
13672        ) -> fidl::Result<()> {
13673            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13674            // Zero out padding regions. There's no need to apply masks
13675            // because the unmasked parts will be overwritten by fields.
13676            // Write the fields.
13677            self.0.encode(encoder, offset + 0, depth)?;
13678            self.1.encode(encoder, offset + 16, depth)?;
13679            Ok(())
13680        }
13681    }
13682
13683    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13684        for MultipleBoundedNonnullableVectorsOfUint32s
13685    {
13686        #[inline(always)]
13687        fn new_empty() -> Self {
13688            Self {
13689                vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 2>, D),
13690                vu1: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D),
13691            }
13692        }
13693
13694        #[inline]
13695        unsafe fn decode(
13696            &mut self,
13697            decoder: &mut fidl::encoding::Decoder<'_, D>,
13698            offset: usize,
13699            _depth: fidl::encoding::Depth,
13700        ) -> fidl::Result<()> {
13701            decoder.debug_check_bounds::<Self>(offset);
13702            // Verify that padding bytes are zero.
13703            fidl::decode!(fidl::encoding::Vector<u32, 2>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
13704            fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu1, decoder, offset + 16, _depth)?;
13705            Ok(())
13706        }
13707    }
13708
13709    impl fidl::encoding::ValueTypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13710        type Borrowed<'a> = &'a Self;
13711        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13712            value
13713        }
13714    }
13715
13716    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13717        type Owned = Self;
13718
13719        #[inline(always)]
13720        fn inline_align(_context: fidl::encoding::Context) -> usize {
13721            8
13722        }
13723
13724        #[inline(always)]
13725        fn inline_size(_context: fidl::encoding::Context) -> usize {
13726            32
13727        }
13728    }
13729
13730    unsafe impl<D: fidl::encoding::ResourceDialect>
13731        fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D>
13732        for &MultipleBoundedNullableVectorsOfUint32s
13733    {
13734        #[inline]
13735        unsafe fn encode(
13736            self,
13737            encoder: &mut fidl::encoding::Encoder<'_, D>,
13738            offset: usize,
13739            _depth: fidl::encoding::Depth,
13740        ) -> fidl::Result<()> {
13741            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13742            // Delegate to tuple encoding.
13743            fidl::encoding::Encode::<MultipleBoundedNullableVectorsOfUint32s, D>::encode(
13744                (
13745                    <fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13746                    <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13747                ),
13748                encoder, offset, _depth
13749            )
13750        }
13751    }
13752    unsafe impl<
13753        D: fidl::encoding::ResourceDialect,
13754        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D>,
13755        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
13756    > fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D> for (T0, T1)
13757    {
13758        #[inline]
13759        unsafe fn encode(
13760            self,
13761            encoder: &mut fidl::encoding::Encoder<'_, D>,
13762            offset: usize,
13763            depth: fidl::encoding::Depth,
13764        ) -> fidl::Result<()> {
13765            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13766            // Zero out padding regions. There's no need to apply masks
13767            // because the unmasked parts will be overwritten by fields.
13768            // Write the fields.
13769            self.0.encode(encoder, offset + 0, depth)?;
13770            self.1.encode(encoder, offset + 16, depth)?;
13771            Ok(())
13772        }
13773    }
13774
13775    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13776        for MultipleBoundedNullableVectorsOfUint32s
13777    {
13778        #[inline(always)]
13779        fn new_empty() -> Self {
13780            Self {
13781                vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D),
13782                vu1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
13783            }
13784        }
13785
13786        #[inline]
13787        unsafe fn decode(
13788            &mut self,
13789            decoder: &mut fidl::encoding::Decoder<'_, D>,
13790            offset: usize,
13791            _depth: fidl::encoding::Depth,
13792        ) -> fidl::Result<()> {
13793            decoder.debug_check_bounds::<Self>(offset);
13794            // Verify that padding bytes are zero.
13795            fidl::decode!(
13796                fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>,
13797                D,
13798                &mut self.vu0,
13799                decoder,
13800                offset + 0,
13801                _depth
13802            )?;
13803            fidl::decode!(
13804                fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
13805                D,
13806                &mut self.vu1,
13807                decoder,
13808                offset + 16,
13809                _depth
13810            )?;
13811            Ok(())
13812        }
13813    }
13814
13815    impl fidl::encoding::ValueTypeMarker for MultipleNonnullableStrings {
13816        type Borrowed<'a> = &'a Self;
13817        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13818            value
13819        }
13820    }
13821
13822    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableStrings {
13823        type Owned = Self;
13824
13825        #[inline(always)]
13826        fn inline_align(_context: fidl::encoding::Context) -> usize {
13827            8
13828        }
13829
13830        #[inline(always)]
13831        fn inline_size(_context: fidl::encoding::Context) -> usize {
13832            32
13833        }
13834    }
13835
13836    unsafe impl<D: fidl::encoding::ResourceDialect>
13837        fidl::encoding::Encode<MultipleNonnullableStrings, D> for &MultipleNonnullableStrings
13838    {
13839        #[inline]
13840        unsafe fn encode(
13841            self,
13842            encoder: &mut fidl::encoding::Encoder<'_, D>,
13843            offset: usize,
13844            _depth: fidl::encoding::Depth,
13845        ) -> fidl::Result<()> {
13846            encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13847            // Delegate to tuple encoding.
13848            fidl::encoding::Encode::<MultipleNonnullableStrings, D>::encode(
13849                (
13850                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13851                        &self.s0,
13852                    ),
13853                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13854                        &self.s1,
13855                    ),
13856                ),
13857                encoder,
13858                offset,
13859                _depth,
13860            )
13861        }
13862    }
13863    unsafe impl<
13864        D: fidl::encoding::ResourceDialect,
13865        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13866        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13867    > fidl::encoding::Encode<MultipleNonnullableStrings, D> for (T0, T1)
13868    {
13869        #[inline]
13870        unsafe fn encode(
13871            self,
13872            encoder: &mut fidl::encoding::Encoder<'_, D>,
13873            offset: usize,
13874            depth: fidl::encoding::Depth,
13875        ) -> fidl::Result<()> {
13876            encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13877            // Zero out padding regions. There's no need to apply masks
13878            // because the unmasked parts will be overwritten by fields.
13879            // Write the fields.
13880            self.0.encode(encoder, offset + 0, depth)?;
13881            self.1.encode(encoder, offset + 16, depth)?;
13882            Ok(())
13883        }
13884    }
13885
13886    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13887        for MultipleNonnullableStrings
13888    {
13889        #[inline(always)]
13890        fn new_empty() -> Self {
13891            Self {
13892                s0: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13893                s1: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13894            }
13895        }
13896
13897        #[inline]
13898        unsafe fn decode(
13899            &mut self,
13900            decoder: &mut fidl::encoding::Decoder<'_, D>,
13901            offset: usize,
13902            _depth: fidl::encoding::Depth,
13903        ) -> fidl::Result<()> {
13904            decoder.debug_check_bounds::<Self>(offset);
13905            // Verify that padding bytes are zero.
13906            fidl::decode!(
13907                fidl::encoding::UnboundedString,
13908                D,
13909                &mut self.s0,
13910                decoder,
13911                offset + 0,
13912                _depth
13913            )?;
13914            fidl::decode!(
13915                fidl::encoding::UnboundedString,
13916                D,
13917                &mut self.s1,
13918                decoder,
13919                offset + 16,
13920                _depth
13921            )?;
13922            Ok(())
13923        }
13924    }
13925
13926    impl fidl::encoding::ValueTypeMarker for MultipleNonnullableVectorsOfUint32s {
13927        type Borrowed<'a> = &'a Self;
13928        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13929            value
13930        }
13931    }
13932
13933    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableVectorsOfUint32s {
13934        type Owned = Self;
13935
13936        #[inline(always)]
13937        fn inline_align(_context: fidl::encoding::Context) -> usize {
13938            8
13939        }
13940
13941        #[inline(always)]
13942        fn inline_size(_context: fidl::encoding::Context) -> usize {
13943            32
13944        }
13945    }
13946
13947    unsafe impl<D: fidl::encoding::ResourceDialect>
13948        fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D>
13949        for &MultipleNonnullableVectorsOfUint32s
13950    {
13951        #[inline]
13952        unsafe fn encode(
13953            self,
13954            encoder: &mut fidl::encoding::Encoder<'_, D>,
13955            offset: usize,
13956            _depth: fidl::encoding::Depth,
13957        ) -> fidl::Result<()> {
13958            encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13959            // Delegate to tuple encoding.
13960            fidl::encoding::Encode::<MultipleNonnullableVectorsOfUint32s, D>::encode(
13961                (
13962                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13963                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13964                ),
13965                encoder, offset, _depth
13966            )
13967        }
13968    }
13969    unsafe impl<
13970        D: fidl::encoding::ResourceDialect,
13971        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13972        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13973    > fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D> for (T0, T1)
13974    {
13975        #[inline]
13976        unsafe fn encode(
13977            self,
13978            encoder: &mut fidl::encoding::Encoder<'_, D>,
13979            offset: usize,
13980            depth: fidl::encoding::Depth,
13981        ) -> fidl::Result<()> {
13982            encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13983            // Zero out padding regions. There's no need to apply masks
13984            // because the unmasked parts will be overwritten by fields.
13985            // Write the fields.
13986            self.0.encode(encoder, offset + 0, depth)?;
13987            self.1.encode(encoder, offset + 16, depth)?;
13988            Ok(())
13989        }
13990    }
13991
13992    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13993        for MultipleNonnullableVectorsOfUint32s
13994    {
13995        #[inline(always)]
13996        fn new_empty() -> Self {
13997            Self {
13998                vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13999                vu1: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
14000            }
14001        }
14002
14003        #[inline]
14004        unsafe fn decode(
14005            &mut self,
14006            decoder: &mut fidl::encoding::Decoder<'_, D>,
14007            offset: usize,
14008            _depth: fidl::encoding::Depth,
14009        ) -> fidl::Result<()> {
14010            decoder.debug_check_bounds::<Self>(offset);
14011            // Verify that padding bytes are zero.
14012            fidl::decode!(
14013                fidl::encoding::UnboundedVector<u32>,
14014                D,
14015                &mut self.vu0,
14016                decoder,
14017                offset + 0,
14018                _depth
14019            )?;
14020            fidl::decode!(
14021                fidl::encoding::UnboundedVector<u32>,
14022                D,
14023                &mut self.vu1,
14024                decoder,
14025                offset + 16,
14026                _depth
14027            )?;
14028            Ok(())
14029        }
14030    }
14031
14032    impl fidl::encoding::ValueTypeMarker for MultipleNullableStrings {
14033        type Borrowed<'a> = &'a Self;
14034        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14035            value
14036        }
14037    }
14038
14039    unsafe impl fidl::encoding::TypeMarker for MultipleNullableStrings {
14040        type Owned = Self;
14041
14042        #[inline(always)]
14043        fn inline_align(_context: fidl::encoding::Context) -> usize {
14044            8
14045        }
14046
14047        #[inline(always)]
14048        fn inline_size(_context: fidl::encoding::Context) -> usize {
14049            32
14050        }
14051    }
14052
14053    unsafe impl<D: fidl::encoding::ResourceDialect>
14054        fidl::encoding::Encode<MultipleNullableStrings, D> for &MultipleNullableStrings
14055    {
14056        #[inline]
14057        unsafe fn encode(
14058            self,
14059            encoder: &mut fidl::encoding::Encoder<'_, D>,
14060            offset: usize,
14061            _depth: fidl::encoding::Depth,
14062        ) -> fidl::Result<()> {
14063            encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
14064            // Delegate to tuple encoding.
14065            fidl::encoding::Encode::<MultipleNullableStrings, D>::encode(
14066                (
14067                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
14068                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s1),
14069                ),
14070                encoder, offset, _depth
14071            )
14072        }
14073    }
14074    unsafe impl<
14075        D: fidl::encoding::ResourceDialect,
14076        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
14077        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
14078    > fidl::encoding::Encode<MultipleNullableStrings, D> for (T0, T1)
14079    {
14080        #[inline]
14081        unsafe fn encode(
14082            self,
14083            encoder: &mut fidl::encoding::Encoder<'_, D>,
14084            offset: usize,
14085            depth: fidl::encoding::Depth,
14086        ) -> fidl::Result<()> {
14087            encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
14088            // Zero out padding regions. There's no need to apply masks
14089            // because the unmasked parts will be overwritten by fields.
14090            // Write the fields.
14091            self.0.encode(encoder, offset + 0, depth)?;
14092            self.1.encode(encoder, offset + 16, depth)?;
14093            Ok(())
14094        }
14095    }
14096
14097    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14098        for MultipleNullableStrings
14099    {
14100        #[inline(always)]
14101        fn new_empty() -> Self {
14102            Self {
14103                s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
14104                s1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
14105            }
14106        }
14107
14108        #[inline]
14109        unsafe fn decode(
14110            &mut self,
14111            decoder: &mut fidl::encoding::Decoder<'_, D>,
14112            offset: usize,
14113            _depth: fidl::encoding::Depth,
14114        ) -> fidl::Result<()> {
14115            decoder.debug_check_bounds::<Self>(offset);
14116            // Verify that padding bytes are zero.
14117            fidl::decode!(
14118                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14119                D,
14120                &mut self.s0,
14121                decoder,
14122                offset + 0,
14123                _depth
14124            )?;
14125            fidl::decode!(
14126                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14127                D,
14128                &mut self.s1,
14129                decoder,
14130                offset + 16,
14131                _depth
14132            )?;
14133            Ok(())
14134        }
14135    }
14136
14137    impl fidl::encoding::ValueTypeMarker for MultipleShortNonnullableStrings {
14138        type Borrowed<'a> = &'a Self;
14139        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14140            value
14141        }
14142    }
14143
14144    unsafe impl fidl::encoding::TypeMarker for MultipleShortNonnullableStrings {
14145        type Owned = Self;
14146
14147        #[inline(always)]
14148        fn inline_align(_context: fidl::encoding::Context) -> usize {
14149            8
14150        }
14151
14152        #[inline(always)]
14153        fn inline_size(_context: fidl::encoding::Context) -> usize {
14154            32
14155        }
14156    }
14157
14158    unsafe impl<D: fidl::encoding::ResourceDialect>
14159        fidl::encoding::Encode<MultipleShortNonnullableStrings, D>
14160        for &MultipleShortNonnullableStrings
14161    {
14162        #[inline]
14163        unsafe fn encode(
14164            self,
14165            encoder: &mut fidl::encoding::Encoder<'_, D>,
14166            offset: usize,
14167            _depth: fidl::encoding::Depth,
14168        ) -> fidl::Result<()> {
14169            encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
14170            // Delegate to tuple encoding.
14171            fidl::encoding::Encode::<MultipleShortNonnullableStrings, D>::encode(
14172                (
14173                    <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
14174                        &self.s0,
14175                    ),
14176                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
14177                        &self.s1,
14178                    ),
14179                ),
14180                encoder,
14181                offset,
14182                _depth,
14183            )
14184        }
14185    }
14186    unsafe impl<
14187        D: fidl::encoding::ResourceDialect,
14188        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
14189        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
14190    > fidl::encoding::Encode<MultipleShortNonnullableStrings, D> for (T0, T1)
14191    {
14192        #[inline]
14193        unsafe fn encode(
14194            self,
14195            encoder: &mut fidl::encoding::Encoder<'_, D>,
14196            offset: usize,
14197            depth: fidl::encoding::Depth,
14198        ) -> fidl::Result<()> {
14199            encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
14200            // Zero out padding regions. There's no need to apply masks
14201            // because the unmasked parts will be overwritten by fields.
14202            // Write the fields.
14203            self.0.encode(encoder, offset + 0, depth)?;
14204            self.1.encode(encoder, offset + 16, depth)?;
14205            Ok(())
14206        }
14207    }
14208
14209    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14210        for MultipleShortNonnullableStrings
14211    {
14212        #[inline(always)]
14213        fn new_empty() -> Self {
14214            Self {
14215                s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14216                s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14217            }
14218        }
14219
14220        #[inline]
14221        unsafe fn decode(
14222            &mut self,
14223            decoder: &mut fidl::encoding::Decoder<'_, D>,
14224            offset: usize,
14225            _depth: fidl::encoding::Depth,
14226        ) -> fidl::Result<()> {
14227            decoder.debug_check_bounds::<Self>(offset);
14228            // Verify that padding bytes are zero.
14229            fidl::decode!(
14230                fidl::encoding::BoundedString<4>,
14231                D,
14232                &mut self.s0,
14233                decoder,
14234                offset + 0,
14235                _depth
14236            )?;
14237            fidl::decode!(
14238                fidl::encoding::BoundedString<32>,
14239                D,
14240                &mut self.s1,
14241                decoder,
14242                offset + 16,
14243                _depth
14244            )?;
14245            Ok(())
14246        }
14247    }
14248
14249    impl fidl::encoding::ValueTypeMarker for MultipleShortNullableStrings {
14250        type Borrowed<'a> = &'a Self;
14251        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14252            value
14253        }
14254    }
14255
14256    unsafe impl fidl::encoding::TypeMarker for MultipleShortNullableStrings {
14257        type Owned = Self;
14258
14259        #[inline(always)]
14260        fn inline_align(_context: fidl::encoding::Context) -> usize {
14261            8
14262        }
14263
14264        #[inline(always)]
14265        fn inline_size(_context: fidl::encoding::Context) -> usize {
14266            32
14267        }
14268    }
14269
14270    unsafe impl<D: fidl::encoding::ResourceDialect>
14271        fidl::encoding::Encode<MultipleShortNullableStrings, D> for &MultipleShortNullableStrings
14272    {
14273        #[inline]
14274        unsafe fn encode(
14275            self,
14276            encoder: &mut fidl::encoding::Encoder<'_, D>,
14277            offset: usize,
14278            _depth: fidl::encoding::Depth,
14279        ) -> fidl::Result<()> {
14280            encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14281            // Delegate to tuple encoding.
14282            fidl::encoding::Encode::<MultipleShortNullableStrings, D>::encode(
14283                (
14284                    <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
14285                        &self.s0,
14286                    ),
14287                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
14288                        &self.s1,
14289                    ),
14290                ),
14291                encoder,
14292                offset,
14293                _depth,
14294            )
14295        }
14296    }
14297    unsafe impl<
14298        D: fidl::encoding::ResourceDialect,
14299        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
14300        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
14301    > fidl::encoding::Encode<MultipleShortNullableStrings, D> for (T0, T1)
14302    {
14303        #[inline]
14304        unsafe fn encode(
14305            self,
14306            encoder: &mut fidl::encoding::Encoder<'_, D>,
14307            offset: usize,
14308            depth: fidl::encoding::Depth,
14309        ) -> fidl::Result<()> {
14310            encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14311            // Zero out padding regions. There's no need to apply masks
14312            // because the unmasked parts will be overwritten by fields.
14313            // Write the fields.
14314            self.0.encode(encoder, offset + 0, depth)?;
14315            self.1.encode(encoder, offset + 16, depth)?;
14316            Ok(())
14317        }
14318    }
14319
14320    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14321        for MultipleShortNullableStrings
14322    {
14323        #[inline(always)]
14324        fn new_empty() -> Self {
14325            Self {
14326                s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14327                s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14328            }
14329        }
14330
14331        #[inline]
14332        unsafe fn decode(
14333            &mut self,
14334            decoder: &mut fidl::encoding::Decoder<'_, D>,
14335            offset: usize,
14336            _depth: fidl::encoding::Depth,
14337        ) -> fidl::Result<()> {
14338            decoder.debug_check_bounds::<Self>(offset);
14339            // Verify that padding bytes are zero.
14340            fidl::decode!(
14341                fidl::encoding::BoundedString<4>,
14342                D,
14343                &mut self.s0,
14344                decoder,
14345                offset + 0,
14346                _depth
14347            )?;
14348            fidl::decode!(
14349                fidl::encoding::BoundedString<32>,
14350                D,
14351                &mut self.s1,
14352                decoder,
14353                offset + 16,
14354                _depth
14355            )?;
14356            Ok(())
14357        }
14358    }
14359
14360    impl fidl::encoding::ValueTypeMarker for MutualRecursionUnionStruct {
14361        type Borrowed<'a> = &'a Self;
14362        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14363            value
14364        }
14365    }
14366
14367    unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnionStruct {
14368        type Owned = Self;
14369
14370        #[inline(always)]
14371        fn inline_align(_context: fidl::encoding::Context) -> usize {
14372            8
14373        }
14374
14375        #[inline(always)]
14376        fn inline_size(_context: fidl::encoding::Context) -> usize {
14377            16
14378        }
14379    }
14380
14381    unsafe impl<D: fidl::encoding::ResourceDialect>
14382        fidl::encoding::Encode<MutualRecursionUnionStruct, D> for &MutualRecursionUnionStruct
14383    {
14384        #[inline]
14385        unsafe fn encode(
14386            self,
14387            encoder: &mut fidl::encoding::Encoder<'_, D>,
14388            offset: usize,
14389            _depth: fidl::encoding::Depth,
14390        ) -> fidl::Result<()> {
14391            encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14392            // Delegate to tuple encoding.
14393            fidl::encoding::Encode::<MutualRecursionUnionStruct, D>::encode(
14394                (
14395                    <fidl::encoding::OptionalUnion<MutualRecursionUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
14396                ),
14397                encoder, offset, _depth
14398            )
14399        }
14400    }
14401    unsafe impl<
14402        D: fidl::encoding::ResourceDialect,
14403        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<MutualRecursionUnion>, D>,
14404    > fidl::encoding::Encode<MutualRecursionUnionStruct, D> for (T0,)
14405    {
14406        #[inline]
14407        unsafe fn encode(
14408            self,
14409            encoder: &mut fidl::encoding::Encoder<'_, D>,
14410            offset: usize,
14411            depth: fidl::encoding::Depth,
14412        ) -> fidl::Result<()> {
14413            encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14414            // Zero out padding regions. There's no need to apply masks
14415            // because the unmasked parts will be overwritten by fields.
14416            // Write the fields.
14417            self.0.encode(encoder, offset + 0, depth)?;
14418            Ok(())
14419        }
14420    }
14421
14422    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14423        for MutualRecursionUnionStruct
14424    {
14425        #[inline(always)]
14426        fn new_empty() -> Self {
14427            Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<MutualRecursionUnion>, D) }
14428        }
14429
14430        #[inline]
14431        unsafe fn decode(
14432            &mut self,
14433            decoder: &mut fidl::encoding::Decoder<'_, D>,
14434            offset: usize,
14435            _depth: fidl::encoding::Depth,
14436        ) -> fidl::Result<()> {
14437            decoder.debug_check_bounds::<Self>(offset);
14438            // Verify that padding bytes are zero.
14439            fidl::decode!(
14440                fidl::encoding::OptionalUnion<MutualRecursionUnion>,
14441                D,
14442                &mut self.u,
14443                decoder,
14444                offset + 0,
14445                _depth
14446            )?;
14447            Ok(())
14448        }
14449    }
14450
14451    impl fidl::encoding::ValueTypeMarker for MyBool {
14452        type Borrowed<'a> = &'a Self;
14453        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14454            value
14455        }
14456    }
14457
14458    unsafe impl fidl::encoding::TypeMarker for MyBool {
14459        type Owned = Self;
14460
14461        #[inline(always)]
14462        fn inline_align(_context: fidl::encoding::Context) -> usize {
14463            1
14464        }
14465
14466        #[inline(always)]
14467        fn inline_size(_context: fidl::encoding::Context) -> usize {
14468            1
14469        }
14470    }
14471
14472    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyBool, D> for &MyBool {
14473        #[inline]
14474        unsafe fn encode(
14475            self,
14476            encoder: &mut fidl::encoding::Encoder<'_, D>,
14477            offset: usize,
14478            _depth: fidl::encoding::Depth,
14479        ) -> fidl::Result<()> {
14480            encoder.debug_check_bounds::<MyBool>(offset);
14481            // Delegate to tuple encoding.
14482            fidl::encoding::Encode::<MyBool, D>::encode(
14483                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14484                encoder,
14485                offset,
14486                _depth,
14487            )
14488        }
14489    }
14490    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
14491        fidl::encoding::Encode<MyBool, D> for (T0,)
14492    {
14493        #[inline]
14494        unsafe fn encode(
14495            self,
14496            encoder: &mut fidl::encoding::Encoder<'_, D>,
14497            offset: usize,
14498            depth: fidl::encoding::Depth,
14499        ) -> fidl::Result<()> {
14500            encoder.debug_check_bounds::<MyBool>(offset);
14501            // Zero out padding regions. There's no need to apply masks
14502            // because the unmasked parts will be overwritten by fields.
14503            // Write the fields.
14504            self.0.encode(encoder, offset + 0, depth)?;
14505            Ok(())
14506        }
14507    }
14508
14509    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyBool {
14510        #[inline(always)]
14511        fn new_empty() -> Self {
14512            Self { value: fidl::new_empty!(bool, D) }
14513        }
14514
14515        #[inline]
14516        unsafe fn decode(
14517            &mut self,
14518            decoder: &mut fidl::encoding::Decoder<'_, D>,
14519            offset: usize,
14520            _depth: fidl::encoding::Depth,
14521        ) -> fidl::Result<()> {
14522            decoder.debug_check_bounds::<Self>(offset);
14523            // Verify that padding bytes are zero.
14524            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
14525            Ok(())
14526        }
14527    }
14528
14529    impl fidl::encoding::ValueTypeMarker for MyByte {
14530        type Borrowed<'a> = &'a Self;
14531        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14532            value
14533        }
14534    }
14535
14536    unsafe impl fidl::encoding::TypeMarker for MyByte {
14537        type Owned = Self;
14538
14539        #[inline(always)]
14540        fn inline_align(_context: fidl::encoding::Context) -> usize {
14541            1
14542        }
14543
14544        #[inline(always)]
14545        fn inline_size(_context: fidl::encoding::Context) -> usize {
14546            1
14547        }
14548        #[inline(always)]
14549        fn encode_is_copy() -> bool {
14550            true
14551        }
14552
14553        #[inline(always)]
14554        fn decode_is_copy() -> bool {
14555            true
14556        }
14557    }
14558
14559    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyByte, D> for &MyByte {
14560        #[inline]
14561        unsafe fn encode(
14562            self,
14563            encoder: &mut fidl::encoding::Encoder<'_, D>,
14564            offset: usize,
14565            _depth: fidl::encoding::Depth,
14566        ) -> fidl::Result<()> {
14567            encoder.debug_check_bounds::<MyByte>(offset);
14568            unsafe {
14569                // Copy the object into the buffer.
14570                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14571                (buf_ptr as *mut MyByte).write_unaligned((self as *const MyByte).read());
14572                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14573                // done second because the memcpy will write garbage to these bytes.
14574            }
14575            Ok(())
14576        }
14577    }
14578    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
14579        fidl::encoding::Encode<MyByte, D> for (T0,)
14580    {
14581        #[inline]
14582        unsafe fn encode(
14583            self,
14584            encoder: &mut fidl::encoding::Encoder<'_, D>,
14585            offset: usize,
14586            depth: fidl::encoding::Depth,
14587        ) -> fidl::Result<()> {
14588            encoder.debug_check_bounds::<MyByte>(offset);
14589            // Zero out padding regions. There's no need to apply masks
14590            // because the unmasked parts will be overwritten by fields.
14591            // Write the fields.
14592            self.0.encode(encoder, offset + 0, depth)?;
14593            Ok(())
14594        }
14595    }
14596
14597    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyByte {
14598        #[inline(always)]
14599        fn new_empty() -> Self {
14600            Self { value: fidl::new_empty!(u8, D) }
14601        }
14602
14603        #[inline]
14604        unsafe fn decode(
14605            &mut self,
14606            decoder: &mut fidl::encoding::Decoder<'_, D>,
14607            offset: usize,
14608            _depth: fidl::encoding::Depth,
14609        ) -> fidl::Result<()> {
14610            decoder.debug_check_bounds::<Self>(offset);
14611            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14612            // Verify that padding bytes are zero.
14613            // Copy from the buffer into the object.
14614            unsafe {
14615                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
14616            }
14617            Ok(())
14618        }
14619    }
14620
14621    impl fidl::encoding::ValueTypeMarker for MyFloat32 {
14622        type Borrowed<'a> = &'a Self;
14623        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14624            value
14625        }
14626    }
14627
14628    unsafe impl fidl::encoding::TypeMarker for MyFloat32 {
14629        type Owned = Self;
14630
14631        #[inline(always)]
14632        fn inline_align(_context: fidl::encoding::Context) -> usize {
14633            4
14634        }
14635
14636        #[inline(always)]
14637        fn inline_size(_context: fidl::encoding::Context) -> usize {
14638            4
14639        }
14640    }
14641
14642    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat32, D>
14643        for &MyFloat32
14644    {
14645        #[inline]
14646        unsafe fn encode(
14647            self,
14648            encoder: &mut fidl::encoding::Encoder<'_, D>,
14649            offset: usize,
14650            _depth: fidl::encoding::Depth,
14651        ) -> fidl::Result<()> {
14652            encoder.debug_check_bounds::<MyFloat32>(offset);
14653            // Delegate to tuple encoding.
14654            fidl::encoding::Encode::<MyFloat32, D>::encode(
14655                (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14656                encoder,
14657                offset,
14658                _depth,
14659            )
14660        }
14661    }
14662    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
14663        fidl::encoding::Encode<MyFloat32, D> for (T0,)
14664    {
14665        #[inline]
14666        unsafe fn encode(
14667            self,
14668            encoder: &mut fidl::encoding::Encoder<'_, D>,
14669            offset: usize,
14670            depth: fidl::encoding::Depth,
14671        ) -> fidl::Result<()> {
14672            encoder.debug_check_bounds::<MyFloat32>(offset);
14673            // Zero out padding regions. There's no need to apply masks
14674            // because the unmasked parts will be overwritten by fields.
14675            // Write the fields.
14676            self.0.encode(encoder, offset + 0, depth)?;
14677            Ok(())
14678        }
14679    }
14680
14681    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat32 {
14682        #[inline(always)]
14683        fn new_empty() -> Self {
14684            Self { value: fidl::new_empty!(f32, D) }
14685        }
14686
14687        #[inline]
14688        unsafe fn decode(
14689            &mut self,
14690            decoder: &mut fidl::encoding::Decoder<'_, D>,
14691            offset: usize,
14692            _depth: fidl::encoding::Depth,
14693        ) -> fidl::Result<()> {
14694            decoder.debug_check_bounds::<Self>(offset);
14695            // Verify that padding bytes are zero.
14696            fidl::decode!(f32, D, &mut self.value, decoder, offset + 0, _depth)?;
14697            Ok(())
14698        }
14699    }
14700
14701    impl fidl::encoding::ValueTypeMarker for MyFloat64 {
14702        type Borrowed<'a> = &'a Self;
14703        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14704            value
14705        }
14706    }
14707
14708    unsafe impl fidl::encoding::TypeMarker for MyFloat64 {
14709        type Owned = Self;
14710
14711        #[inline(always)]
14712        fn inline_align(_context: fidl::encoding::Context) -> usize {
14713            8
14714        }
14715
14716        #[inline(always)]
14717        fn inline_size(_context: fidl::encoding::Context) -> usize {
14718            8
14719        }
14720    }
14721
14722    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat64, D>
14723        for &MyFloat64
14724    {
14725        #[inline]
14726        unsafe fn encode(
14727            self,
14728            encoder: &mut fidl::encoding::Encoder<'_, D>,
14729            offset: usize,
14730            _depth: fidl::encoding::Depth,
14731        ) -> fidl::Result<()> {
14732            encoder.debug_check_bounds::<MyFloat64>(offset);
14733            // Delegate to tuple encoding.
14734            fidl::encoding::Encode::<MyFloat64, D>::encode(
14735                (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14736                encoder,
14737                offset,
14738                _depth,
14739            )
14740        }
14741    }
14742    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
14743        fidl::encoding::Encode<MyFloat64, D> for (T0,)
14744    {
14745        #[inline]
14746        unsafe fn encode(
14747            self,
14748            encoder: &mut fidl::encoding::Encoder<'_, D>,
14749            offset: usize,
14750            depth: fidl::encoding::Depth,
14751        ) -> fidl::Result<()> {
14752            encoder.debug_check_bounds::<MyFloat64>(offset);
14753            // Zero out padding regions. There's no need to apply masks
14754            // because the unmasked parts will be overwritten by fields.
14755            // Write the fields.
14756            self.0.encode(encoder, offset + 0, depth)?;
14757            Ok(())
14758        }
14759    }
14760
14761    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat64 {
14762        #[inline(always)]
14763        fn new_empty() -> Self {
14764            Self { value: fidl::new_empty!(f64, D) }
14765        }
14766
14767        #[inline]
14768        unsafe fn decode(
14769            &mut self,
14770            decoder: &mut fidl::encoding::Decoder<'_, D>,
14771            offset: usize,
14772            _depth: fidl::encoding::Depth,
14773        ) -> fidl::Result<()> {
14774            decoder.debug_check_bounds::<Self>(offset);
14775            // Verify that padding bytes are zero.
14776            fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
14777            Ok(())
14778        }
14779    }
14780
14781    impl fidl::encoding::ValueTypeMarker for MyInt16 {
14782        type Borrowed<'a> = &'a Self;
14783        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14784            value
14785        }
14786    }
14787
14788    unsafe impl fidl::encoding::TypeMarker for MyInt16 {
14789        type Owned = Self;
14790
14791        #[inline(always)]
14792        fn inline_align(_context: fidl::encoding::Context) -> usize {
14793            2
14794        }
14795
14796        #[inline(always)]
14797        fn inline_size(_context: fidl::encoding::Context) -> usize {
14798            2
14799        }
14800        #[inline(always)]
14801        fn encode_is_copy() -> bool {
14802            true
14803        }
14804
14805        #[inline(always)]
14806        fn decode_is_copy() -> bool {
14807            true
14808        }
14809    }
14810
14811    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt16, D> for &MyInt16 {
14812        #[inline]
14813        unsafe fn encode(
14814            self,
14815            encoder: &mut fidl::encoding::Encoder<'_, D>,
14816            offset: usize,
14817            _depth: fidl::encoding::Depth,
14818        ) -> fidl::Result<()> {
14819            encoder.debug_check_bounds::<MyInt16>(offset);
14820            unsafe {
14821                // Copy the object into the buffer.
14822                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14823                (buf_ptr as *mut MyInt16).write_unaligned((self as *const MyInt16).read());
14824                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14825                // done second because the memcpy will write garbage to these bytes.
14826            }
14827            Ok(())
14828        }
14829    }
14830    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
14831        fidl::encoding::Encode<MyInt16, D> for (T0,)
14832    {
14833        #[inline]
14834        unsafe fn encode(
14835            self,
14836            encoder: &mut fidl::encoding::Encoder<'_, D>,
14837            offset: usize,
14838            depth: fidl::encoding::Depth,
14839        ) -> fidl::Result<()> {
14840            encoder.debug_check_bounds::<MyInt16>(offset);
14841            // Zero out padding regions. There's no need to apply masks
14842            // because the unmasked parts will be overwritten by fields.
14843            // Write the fields.
14844            self.0.encode(encoder, offset + 0, depth)?;
14845            Ok(())
14846        }
14847    }
14848
14849    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt16 {
14850        #[inline(always)]
14851        fn new_empty() -> Self {
14852            Self { value: fidl::new_empty!(i16, D) }
14853        }
14854
14855        #[inline]
14856        unsafe fn decode(
14857            &mut self,
14858            decoder: &mut fidl::encoding::Decoder<'_, D>,
14859            offset: usize,
14860            _depth: fidl::encoding::Depth,
14861        ) -> fidl::Result<()> {
14862            decoder.debug_check_bounds::<Self>(offset);
14863            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14864            // Verify that padding bytes are zero.
14865            // Copy from the buffer into the object.
14866            unsafe {
14867                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
14868            }
14869            Ok(())
14870        }
14871    }
14872
14873    impl fidl::encoding::ValueTypeMarker for MyInt32 {
14874        type Borrowed<'a> = &'a Self;
14875        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14876            value
14877        }
14878    }
14879
14880    unsafe impl fidl::encoding::TypeMarker for MyInt32 {
14881        type Owned = Self;
14882
14883        #[inline(always)]
14884        fn inline_align(_context: fidl::encoding::Context) -> usize {
14885            4
14886        }
14887
14888        #[inline(always)]
14889        fn inline_size(_context: fidl::encoding::Context) -> usize {
14890            4
14891        }
14892        #[inline(always)]
14893        fn encode_is_copy() -> bool {
14894            true
14895        }
14896
14897        #[inline(always)]
14898        fn decode_is_copy() -> bool {
14899            true
14900        }
14901    }
14902
14903    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt32, D> for &MyInt32 {
14904        #[inline]
14905        unsafe fn encode(
14906            self,
14907            encoder: &mut fidl::encoding::Encoder<'_, D>,
14908            offset: usize,
14909            _depth: fidl::encoding::Depth,
14910        ) -> fidl::Result<()> {
14911            encoder.debug_check_bounds::<MyInt32>(offset);
14912            unsafe {
14913                // Copy the object into the buffer.
14914                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14915                (buf_ptr as *mut MyInt32).write_unaligned((self as *const MyInt32).read());
14916                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14917                // done second because the memcpy will write garbage to these bytes.
14918            }
14919            Ok(())
14920        }
14921    }
14922    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
14923        fidl::encoding::Encode<MyInt32, D> for (T0,)
14924    {
14925        #[inline]
14926        unsafe fn encode(
14927            self,
14928            encoder: &mut fidl::encoding::Encoder<'_, D>,
14929            offset: usize,
14930            depth: fidl::encoding::Depth,
14931        ) -> fidl::Result<()> {
14932            encoder.debug_check_bounds::<MyInt32>(offset);
14933            // Zero out padding regions. There's no need to apply masks
14934            // because the unmasked parts will be overwritten by fields.
14935            // Write the fields.
14936            self.0.encode(encoder, offset + 0, depth)?;
14937            Ok(())
14938        }
14939    }
14940
14941    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt32 {
14942        #[inline(always)]
14943        fn new_empty() -> Self {
14944            Self { value: fidl::new_empty!(i32, D) }
14945        }
14946
14947        #[inline]
14948        unsafe fn decode(
14949            &mut self,
14950            decoder: &mut fidl::encoding::Decoder<'_, D>,
14951            offset: usize,
14952            _depth: fidl::encoding::Depth,
14953        ) -> fidl::Result<()> {
14954            decoder.debug_check_bounds::<Self>(offset);
14955            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14956            // Verify that padding bytes are zero.
14957            // Copy from the buffer into the object.
14958            unsafe {
14959                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14960            }
14961            Ok(())
14962        }
14963    }
14964
14965    impl fidl::encoding::ValueTypeMarker for MyInt64 {
14966        type Borrowed<'a> = &'a Self;
14967        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14968            value
14969        }
14970    }
14971
14972    unsafe impl fidl::encoding::TypeMarker for MyInt64 {
14973        type Owned = Self;
14974
14975        #[inline(always)]
14976        fn inline_align(_context: fidl::encoding::Context) -> usize {
14977            8
14978        }
14979
14980        #[inline(always)]
14981        fn inline_size(_context: fidl::encoding::Context) -> usize {
14982            8
14983        }
14984        #[inline(always)]
14985        fn encode_is_copy() -> bool {
14986            true
14987        }
14988
14989        #[inline(always)]
14990        fn decode_is_copy() -> bool {
14991            true
14992        }
14993    }
14994
14995    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt64, D> for &MyInt64 {
14996        #[inline]
14997        unsafe fn encode(
14998            self,
14999            encoder: &mut fidl::encoding::Encoder<'_, D>,
15000            offset: usize,
15001            _depth: fidl::encoding::Depth,
15002        ) -> fidl::Result<()> {
15003            encoder.debug_check_bounds::<MyInt64>(offset);
15004            unsafe {
15005                // Copy the object into the buffer.
15006                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15007                (buf_ptr as *mut MyInt64).write_unaligned((self as *const MyInt64).read());
15008                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15009                // done second because the memcpy will write garbage to these bytes.
15010            }
15011            Ok(())
15012        }
15013    }
15014    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
15015        fidl::encoding::Encode<MyInt64, D> for (T0,)
15016    {
15017        #[inline]
15018        unsafe fn encode(
15019            self,
15020            encoder: &mut fidl::encoding::Encoder<'_, D>,
15021            offset: usize,
15022            depth: fidl::encoding::Depth,
15023        ) -> fidl::Result<()> {
15024            encoder.debug_check_bounds::<MyInt64>(offset);
15025            // Zero out padding regions. There's no need to apply masks
15026            // because the unmasked parts will be overwritten by fields.
15027            // Write the fields.
15028            self.0.encode(encoder, offset + 0, depth)?;
15029            Ok(())
15030        }
15031    }
15032
15033    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt64 {
15034        #[inline(always)]
15035        fn new_empty() -> Self {
15036            Self { value: fidl::new_empty!(i64, D) }
15037        }
15038
15039        #[inline]
15040        unsafe fn decode(
15041            &mut self,
15042            decoder: &mut fidl::encoding::Decoder<'_, D>,
15043            offset: usize,
15044            _depth: fidl::encoding::Depth,
15045        ) -> fidl::Result<()> {
15046            decoder.debug_check_bounds::<Self>(offset);
15047            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15048            // Verify that padding bytes are zero.
15049            // Copy from the buffer into the object.
15050            unsafe {
15051                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15052            }
15053            Ok(())
15054        }
15055    }
15056
15057    impl fidl::encoding::ValueTypeMarker for MyInt8 {
15058        type Borrowed<'a> = &'a Self;
15059        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15060            value
15061        }
15062    }
15063
15064    unsafe impl fidl::encoding::TypeMarker for MyInt8 {
15065        type Owned = Self;
15066
15067        #[inline(always)]
15068        fn inline_align(_context: fidl::encoding::Context) -> usize {
15069            1
15070        }
15071
15072        #[inline(always)]
15073        fn inline_size(_context: fidl::encoding::Context) -> usize {
15074            1
15075        }
15076        #[inline(always)]
15077        fn encode_is_copy() -> bool {
15078            true
15079        }
15080
15081        #[inline(always)]
15082        fn decode_is_copy() -> bool {
15083            true
15084        }
15085    }
15086
15087    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt8, D> for &MyInt8 {
15088        #[inline]
15089        unsafe fn encode(
15090            self,
15091            encoder: &mut fidl::encoding::Encoder<'_, D>,
15092            offset: usize,
15093            _depth: fidl::encoding::Depth,
15094        ) -> fidl::Result<()> {
15095            encoder.debug_check_bounds::<MyInt8>(offset);
15096            unsafe {
15097                // Copy the object into the buffer.
15098                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15099                (buf_ptr as *mut MyInt8).write_unaligned((self as *const MyInt8).read());
15100                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15101                // done second because the memcpy will write garbage to these bytes.
15102            }
15103            Ok(())
15104        }
15105    }
15106    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
15107        fidl::encoding::Encode<MyInt8, D> for (T0,)
15108    {
15109        #[inline]
15110        unsafe fn encode(
15111            self,
15112            encoder: &mut fidl::encoding::Encoder<'_, D>,
15113            offset: usize,
15114            depth: fidl::encoding::Depth,
15115        ) -> fidl::Result<()> {
15116            encoder.debug_check_bounds::<MyInt8>(offset);
15117            // Zero out padding regions. There's no need to apply masks
15118            // because the unmasked parts will be overwritten by fields.
15119            // Write the fields.
15120            self.0.encode(encoder, offset + 0, depth)?;
15121            Ok(())
15122        }
15123    }
15124
15125    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt8 {
15126        #[inline(always)]
15127        fn new_empty() -> Self {
15128            Self { value: fidl::new_empty!(i8, D) }
15129        }
15130
15131        #[inline]
15132        unsafe fn decode(
15133            &mut self,
15134            decoder: &mut fidl::encoding::Decoder<'_, D>,
15135            offset: usize,
15136            _depth: fidl::encoding::Depth,
15137        ) -> fidl::Result<()> {
15138            decoder.debug_check_bounds::<Self>(offset);
15139            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15140            // Verify that padding bytes are zero.
15141            // Copy from the buffer into the object.
15142            unsafe {
15143                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
15144            }
15145            Ok(())
15146        }
15147    }
15148
15149    impl fidl::encoding::ValueTypeMarker for MyUint16 {
15150        type Borrowed<'a> = &'a Self;
15151        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15152            value
15153        }
15154    }
15155
15156    unsafe impl fidl::encoding::TypeMarker for MyUint16 {
15157        type Owned = Self;
15158
15159        #[inline(always)]
15160        fn inline_align(_context: fidl::encoding::Context) -> usize {
15161            2
15162        }
15163
15164        #[inline(always)]
15165        fn inline_size(_context: fidl::encoding::Context) -> usize {
15166            2
15167        }
15168        #[inline(always)]
15169        fn encode_is_copy() -> bool {
15170            true
15171        }
15172
15173        #[inline(always)]
15174        fn decode_is_copy() -> bool {
15175            true
15176        }
15177    }
15178
15179    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint16, D> for &MyUint16 {
15180        #[inline]
15181        unsafe fn encode(
15182            self,
15183            encoder: &mut fidl::encoding::Encoder<'_, D>,
15184            offset: usize,
15185            _depth: fidl::encoding::Depth,
15186        ) -> fidl::Result<()> {
15187            encoder.debug_check_bounds::<MyUint16>(offset);
15188            unsafe {
15189                // Copy the object into the buffer.
15190                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15191                (buf_ptr as *mut MyUint16).write_unaligned((self as *const MyUint16).read());
15192                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15193                // done second because the memcpy will write garbage to these bytes.
15194            }
15195            Ok(())
15196        }
15197    }
15198    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
15199        fidl::encoding::Encode<MyUint16, D> for (T0,)
15200    {
15201        #[inline]
15202        unsafe fn encode(
15203            self,
15204            encoder: &mut fidl::encoding::Encoder<'_, D>,
15205            offset: usize,
15206            depth: fidl::encoding::Depth,
15207        ) -> fidl::Result<()> {
15208            encoder.debug_check_bounds::<MyUint16>(offset);
15209            // Zero out padding regions. There's no need to apply masks
15210            // because the unmasked parts will be overwritten by fields.
15211            // Write the fields.
15212            self.0.encode(encoder, offset + 0, depth)?;
15213            Ok(())
15214        }
15215    }
15216
15217    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint16 {
15218        #[inline(always)]
15219        fn new_empty() -> Self {
15220            Self { value: fidl::new_empty!(u16, D) }
15221        }
15222
15223        #[inline]
15224        unsafe fn decode(
15225            &mut self,
15226            decoder: &mut fidl::encoding::Decoder<'_, D>,
15227            offset: usize,
15228            _depth: fidl::encoding::Depth,
15229        ) -> fidl::Result<()> {
15230            decoder.debug_check_bounds::<Self>(offset);
15231            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15232            // Verify that padding bytes are zero.
15233            // Copy from the buffer into the object.
15234            unsafe {
15235                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
15236            }
15237            Ok(())
15238        }
15239    }
15240
15241    impl fidl::encoding::ValueTypeMarker for MyUint32 {
15242        type Borrowed<'a> = &'a Self;
15243        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15244            value
15245        }
15246    }
15247
15248    unsafe impl fidl::encoding::TypeMarker for MyUint32 {
15249        type Owned = Self;
15250
15251        #[inline(always)]
15252        fn inline_align(_context: fidl::encoding::Context) -> usize {
15253            4
15254        }
15255
15256        #[inline(always)]
15257        fn inline_size(_context: fidl::encoding::Context) -> usize {
15258            4
15259        }
15260        #[inline(always)]
15261        fn encode_is_copy() -> bool {
15262            true
15263        }
15264
15265        #[inline(always)]
15266        fn decode_is_copy() -> bool {
15267            true
15268        }
15269    }
15270
15271    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint32, D> for &MyUint32 {
15272        #[inline]
15273        unsafe fn encode(
15274            self,
15275            encoder: &mut fidl::encoding::Encoder<'_, D>,
15276            offset: usize,
15277            _depth: fidl::encoding::Depth,
15278        ) -> fidl::Result<()> {
15279            encoder.debug_check_bounds::<MyUint32>(offset);
15280            unsafe {
15281                // Copy the object into the buffer.
15282                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15283                (buf_ptr as *mut MyUint32).write_unaligned((self as *const MyUint32).read());
15284                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15285                // done second because the memcpy will write garbage to these bytes.
15286            }
15287            Ok(())
15288        }
15289    }
15290    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
15291        fidl::encoding::Encode<MyUint32, D> for (T0,)
15292    {
15293        #[inline]
15294        unsafe fn encode(
15295            self,
15296            encoder: &mut fidl::encoding::Encoder<'_, D>,
15297            offset: usize,
15298            depth: fidl::encoding::Depth,
15299        ) -> fidl::Result<()> {
15300            encoder.debug_check_bounds::<MyUint32>(offset);
15301            // Zero out padding regions. There's no need to apply masks
15302            // because the unmasked parts will be overwritten by fields.
15303            // Write the fields.
15304            self.0.encode(encoder, offset + 0, depth)?;
15305            Ok(())
15306        }
15307    }
15308
15309    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint32 {
15310        #[inline(always)]
15311        fn new_empty() -> Self {
15312            Self { value: fidl::new_empty!(u32, D) }
15313        }
15314
15315        #[inline]
15316        unsafe fn decode(
15317            &mut self,
15318            decoder: &mut fidl::encoding::Decoder<'_, D>,
15319            offset: usize,
15320            _depth: fidl::encoding::Depth,
15321        ) -> fidl::Result<()> {
15322            decoder.debug_check_bounds::<Self>(offset);
15323            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15324            // Verify that padding bytes are zero.
15325            // Copy from the buffer into the object.
15326            unsafe {
15327                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
15328            }
15329            Ok(())
15330        }
15331    }
15332
15333    impl fidl::encoding::ValueTypeMarker for MyUint64 {
15334        type Borrowed<'a> = &'a Self;
15335        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15336            value
15337        }
15338    }
15339
15340    unsafe impl fidl::encoding::TypeMarker for MyUint64 {
15341        type Owned = Self;
15342
15343        #[inline(always)]
15344        fn inline_align(_context: fidl::encoding::Context) -> usize {
15345            8
15346        }
15347
15348        #[inline(always)]
15349        fn inline_size(_context: fidl::encoding::Context) -> usize {
15350            8
15351        }
15352        #[inline(always)]
15353        fn encode_is_copy() -> bool {
15354            true
15355        }
15356
15357        #[inline(always)]
15358        fn decode_is_copy() -> bool {
15359            true
15360        }
15361    }
15362
15363    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint64, D> for &MyUint64 {
15364        #[inline]
15365        unsafe fn encode(
15366            self,
15367            encoder: &mut fidl::encoding::Encoder<'_, D>,
15368            offset: usize,
15369            _depth: fidl::encoding::Depth,
15370        ) -> fidl::Result<()> {
15371            encoder.debug_check_bounds::<MyUint64>(offset);
15372            unsafe {
15373                // Copy the object into the buffer.
15374                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15375                (buf_ptr as *mut MyUint64).write_unaligned((self as *const MyUint64).read());
15376                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15377                // done second because the memcpy will write garbage to these bytes.
15378            }
15379            Ok(())
15380        }
15381    }
15382    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
15383        fidl::encoding::Encode<MyUint64, D> for (T0,)
15384    {
15385        #[inline]
15386        unsafe fn encode(
15387            self,
15388            encoder: &mut fidl::encoding::Encoder<'_, D>,
15389            offset: usize,
15390            depth: fidl::encoding::Depth,
15391        ) -> fidl::Result<()> {
15392            encoder.debug_check_bounds::<MyUint64>(offset);
15393            // Zero out padding regions. There's no need to apply masks
15394            // because the unmasked parts will be overwritten by fields.
15395            // Write the fields.
15396            self.0.encode(encoder, offset + 0, depth)?;
15397            Ok(())
15398        }
15399    }
15400
15401    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint64 {
15402        #[inline(always)]
15403        fn new_empty() -> Self {
15404            Self { value: fidl::new_empty!(u64, D) }
15405        }
15406
15407        #[inline]
15408        unsafe fn decode(
15409            &mut self,
15410            decoder: &mut fidl::encoding::Decoder<'_, D>,
15411            offset: usize,
15412            _depth: fidl::encoding::Depth,
15413        ) -> fidl::Result<()> {
15414            decoder.debug_check_bounds::<Self>(offset);
15415            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15416            // Verify that padding bytes are zero.
15417            // Copy from the buffer into the object.
15418            unsafe {
15419                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15420            }
15421            Ok(())
15422        }
15423    }
15424
15425    impl fidl::encoding::ValueTypeMarker for MyUint8 {
15426        type Borrowed<'a> = &'a Self;
15427        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15428            value
15429        }
15430    }
15431
15432    unsafe impl fidl::encoding::TypeMarker for MyUint8 {
15433        type Owned = Self;
15434
15435        #[inline(always)]
15436        fn inline_align(_context: fidl::encoding::Context) -> usize {
15437            1
15438        }
15439
15440        #[inline(always)]
15441        fn inline_size(_context: fidl::encoding::Context) -> usize {
15442            1
15443        }
15444        #[inline(always)]
15445        fn encode_is_copy() -> bool {
15446            true
15447        }
15448
15449        #[inline(always)]
15450        fn decode_is_copy() -> bool {
15451            true
15452        }
15453    }
15454
15455    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint8, D> for &MyUint8 {
15456        #[inline]
15457        unsafe fn encode(
15458            self,
15459            encoder: &mut fidl::encoding::Encoder<'_, D>,
15460            offset: usize,
15461            _depth: fidl::encoding::Depth,
15462        ) -> fidl::Result<()> {
15463            encoder.debug_check_bounds::<MyUint8>(offset);
15464            unsafe {
15465                // Copy the object into the buffer.
15466                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15467                (buf_ptr as *mut MyUint8).write_unaligned((self as *const MyUint8).read());
15468                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15469                // done second because the memcpy will write garbage to these bytes.
15470            }
15471            Ok(())
15472        }
15473    }
15474    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
15475        fidl::encoding::Encode<MyUint8, D> for (T0,)
15476    {
15477        #[inline]
15478        unsafe fn encode(
15479            self,
15480            encoder: &mut fidl::encoding::Encoder<'_, D>,
15481            offset: usize,
15482            depth: fidl::encoding::Depth,
15483        ) -> fidl::Result<()> {
15484            encoder.debug_check_bounds::<MyUint8>(offset);
15485            // Zero out padding regions. There's no need to apply masks
15486            // because the unmasked parts will be overwritten by fields.
15487            // Write the fields.
15488            self.0.encode(encoder, offset + 0, depth)?;
15489            Ok(())
15490        }
15491    }
15492
15493    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint8 {
15494        #[inline(always)]
15495        fn new_empty() -> Self {
15496            Self { value: fidl::new_empty!(u8, D) }
15497        }
15498
15499        #[inline]
15500        unsafe fn decode(
15501            &mut self,
15502            decoder: &mut fidl::encoding::Decoder<'_, D>,
15503            offset: usize,
15504            _depth: fidl::encoding::Depth,
15505        ) -> fidl::Result<()> {
15506            decoder.debug_check_bounds::<Self>(offset);
15507            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15508            // Verify that padding bytes are zero.
15509            // Copy from the buffer into the object.
15510            unsafe {
15511                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
15512            }
15513            Ok(())
15514        }
15515    }
15516
15517    impl fidl::encoding::ValueTypeMarker for NoCodingTablesStressor {
15518        type Borrowed<'a> = &'a Self;
15519        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15520            value
15521        }
15522    }
15523
15524    unsafe impl fidl::encoding::TypeMarker for NoCodingTablesStressor {
15525        type Owned = Self;
15526
15527        #[inline(always)]
15528        fn inline_align(_context: fidl::encoding::Context) -> usize {
15529            8
15530        }
15531
15532        #[inline(always)]
15533        fn inline_size(_context: fidl::encoding::Context) -> usize {
15534            136
15535        }
15536    }
15537
15538    unsafe impl<D: fidl::encoding::ResourceDialect>
15539        fidl::encoding::Encode<NoCodingTablesStressor, D> for &NoCodingTablesStressor
15540    {
15541        #[inline]
15542        unsafe fn encode(
15543            self,
15544            encoder: &mut fidl::encoding::Encoder<'_, D>,
15545            offset: usize,
15546            _depth: fidl::encoding::Depth,
15547        ) -> fidl::Result<()> {
15548            encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15549            // Delegate to tuple encoding.
15550            fidl::encoding::Encode::<NoCodingTablesStressor, D>::encode(
15551                (
15552                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
15553                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
15554                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u1),
15555                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
15556                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
15557                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
15558                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
15559                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
15560                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u3),
15561                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
15562                    <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15563                        &self.p1,
15564                    ),
15565                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
15566                    <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15567                        &self.p2,
15568                    ),
15569                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
15570                ),
15571                encoder,
15572                offset,
15573                _depth,
15574            )
15575        }
15576    }
15577    unsafe impl<
15578        D: fidl::encoding::ResourceDialect,
15579        T0: fidl::encoding::Encode<u64, D>,
15580        T1: fidl::encoding::Encode<u64, D>,
15581        T2: fidl::encoding::Encode<UnionSize36Align4, D>,
15582        T3: fidl::encoding::Encode<u64, D>,
15583        T4: fidl::encoding::Encode<u64, D>,
15584        T5: fidl::encoding::Encode<UnionSize36Align4, D>,
15585        T6: fidl::encoding::Encode<u64, D>,
15586        T7: fidl::encoding::Encode<u64, D>,
15587        T8: fidl::encoding::Encode<UnionSize36Align4, D>,
15588        T9: fidl::encoding::Encode<u64, D>,
15589        T10: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15590        T11: fidl::encoding::Encode<u64, D>,
15591        T12: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15592        T13: fidl::encoding::Encode<u64, D>,
15593    > fidl::encoding::Encode<NoCodingTablesStressor, D>
15594        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
15595    {
15596        #[inline]
15597        unsafe fn encode(
15598            self,
15599            encoder: &mut fidl::encoding::Encoder<'_, D>,
15600            offset: usize,
15601            depth: fidl::encoding::Depth,
15602        ) -> fidl::Result<()> {
15603            encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15604            // Zero out padding regions. There's no need to apply masks
15605            // because the unmasked parts will be overwritten by fields.
15606            // Write the fields.
15607            self.0.encode(encoder, offset + 0, depth)?;
15608            self.1.encode(encoder, offset + 8, depth)?;
15609            self.2.encode(encoder, offset + 16, depth)?;
15610            self.3.encode(encoder, offset + 32, depth)?;
15611            self.4.encode(encoder, offset + 40, depth)?;
15612            self.5.encode(encoder, offset + 48, depth)?;
15613            self.6.encode(encoder, offset + 64, depth)?;
15614            self.7.encode(encoder, offset + 72, depth)?;
15615            self.8.encode(encoder, offset + 80, depth)?;
15616            self.9.encode(encoder, offset + 96, depth)?;
15617            self.10.encode(encoder, offset + 104, depth)?;
15618            self.11.encode(encoder, offset + 112, depth)?;
15619            self.12.encode(encoder, offset + 120, depth)?;
15620            self.13.encode(encoder, offset + 128, depth)?;
15621            Ok(())
15622        }
15623    }
15624
15625    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15626        for NoCodingTablesStressor
15627    {
15628        #[inline(always)]
15629        fn new_empty() -> Self {
15630            Self {
15631                f1: fidl::new_empty!(u64, D),
15632                f2: fidl::new_empty!(u64, D),
15633                u1: fidl::new_empty!(UnionSize36Align4, D),
15634                f3: fidl::new_empty!(u64, D),
15635                f4: fidl::new_empty!(u64, D),
15636                u2: fidl::new_empty!(UnionSize36Align4, D),
15637                f5: fidl::new_empty!(u64, D),
15638                f6: fidl::new_empty!(u64, D),
15639                u3: fidl::new_empty!(UnionSize36Align4, D),
15640                f7: fidl::new_empty!(u64, D),
15641                p1: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15642                f8: fidl::new_empty!(u64, D),
15643                p2: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15644                f9: fidl::new_empty!(u64, D),
15645            }
15646        }
15647
15648        #[inline]
15649        unsafe fn decode(
15650            &mut self,
15651            decoder: &mut fidl::encoding::Decoder<'_, D>,
15652            offset: usize,
15653            _depth: fidl::encoding::Depth,
15654        ) -> fidl::Result<()> {
15655            decoder.debug_check_bounds::<Self>(offset);
15656            // Verify that padding bytes are zero.
15657            fidl::decode!(u64, D, &mut self.f1, decoder, offset + 0, _depth)?;
15658            fidl::decode!(u64, D, &mut self.f2, decoder, offset + 8, _depth)?;
15659            fidl::decode!(UnionSize36Align4, D, &mut self.u1, decoder, offset + 16, _depth)?;
15660            fidl::decode!(u64, D, &mut self.f3, decoder, offset + 32, _depth)?;
15661            fidl::decode!(u64, D, &mut self.f4, decoder, offset + 40, _depth)?;
15662            fidl::decode!(UnionSize36Align4, D, &mut self.u2, decoder, offset + 48, _depth)?;
15663            fidl::decode!(u64, D, &mut self.f5, decoder, offset + 64, _depth)?;
15664            fidl::decode!(u64, D, &mut self.f6, decoder, offset + 72, _depth)?;
15665            fidl::decode!(UnionSize36Align4, D, &mut self.u3, decoder, offset + 80, _depth)?;
15666            fidl::decode!(u64, D, &mut self.f7, decoder, offset + 96, _depth)?;
15667            fidl::decode!(
15668                fidl::encoding::Boxed<Size8Align8>,
15669                D,
15670                &mut self.p1,
15671                decoder,
15672                offset + 104,
15673                _depth
15674            )?;
15675            fidl::decode!(u64, D, &mut self.f8, decoder, offset + 112, _depth)?;
15676            fidl::decode!(
15677                fidl::encoding::Boxed<Size8Align8>,
15678                D,
15679                &mut self.p2,
15680                decoder,
15681                offset + 120,
15682                _depth
15683            )?;
15684            fidl::decode!(u64, D, &mut self.f9, decoder, offset + 128, _depth)?;
15685            Ok(())
15686        }
15687    }
15688
15689    impl fidl::encoding::ValueTypeMarker for NodeAttributes {
15690        type Borrowed<'a> = &'a Self;
15691        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15692            value
15693        }
15694    }
15695
15696    unsafe impl fidl::encoding::TypeMarker for NodeAttributes {
15697        type Owned = Self;
15698
15699        #[inline(always)]
15700        fn inline_align(_context: fidl::encoding::Context) -> usize {
15701            8
15702        }
15703
15704        #[inline(always)]
15705        fn inline_size(_context: fidl::encoding::Context) -> usize {
15706            56
15707        }
15708    }
15709
15710    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NodeAttributes, D>
15711        for &NodeAttributes
15712    {
15713        #[inline]
15714        unsafe fn encode(
15715            self,
15716            encoder: &mut fidl::encoding::Encoder<'_, D>,
15717            offset: usize,
15718            _depth: fidl::encoding::Depth,
15719        ) -> fidl::Result<()> {
15720            encoder.debug_check_bounds::<NodeAttributes>(offset);
15721            unsafe {
15722                // Copy the object into the buffer.
15723                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15724                (buf_ptr as *mut NodeAttributes)
15725                    .write_unaligned((self as *const NodeAttributes).read());
15726                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15727                // done second because the memcpy will write garbage to these bytes.
15728                let padding_ptr = buf_ptr.offset(0) as *mut u64;
15729                let padding_mask = 0xffffffff00000000u64;
15730                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
15731            }
15732            Ok(())
15733        }
15734    }
15735    unsafe impl<
15736        D: fidl::encoding::ResourceDialect,
15737        T0: fidl::encoding::Encode<u32, D>,
15738        T1: fidl::encoding::Encode<u64, D>,
15739        T2: fidl::encoding::Encode<u64, D>,
15740        T3: fidl::encoding::Encode<u64, D>,
15741        T4: fidl::encoding::Encode<u64, D>,
15742        T5: fidl::encoding::Encode<u64, D>,
15743        T6: fidl::encoding::Encode<u64, D>,
15744    > fidl::encoding::Encode<NodeAttributes, D> for (T0, T1, T2, T3, T4, T5, T6)
15745    {
15746        #[inline]
15747        unsafe fn encode(
15748            self,
15749            encoder: &mut fidl::encoding::Encoder<'_, D>,
15750            offset: usize,
15751            depth: fidl::encoding::Depth,
15752        ) -> fidl::Result<()> {
15753            encoder.debug_check_bounds::<NodeAttributes>(offset);
15754            // Zero out padding regions. There's no need to apply masks
15755            // because the unmasked parts will be overwritten by fields.
15756            unsafe {
15757                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
15758                (ptr as *mut u64).write_unaligned(0);
15759            }
15760            // Write the fields.
15761            self.0.encode(encoder, offset + 0, depth)?;
15762            self.1.encode(encoder, offset + 8, depth)?;
15763            self.2.encode(encoder, offset + 16, depth)?;
15764            self.3.encode(encoder, offset + 24, depth)?;
15765            self.4.encode(encoder, offset + 32, depth)?;
15766            self.5.encode(encoder, offset + 40, depth)?;
15767            self.6.encode(encoder, offset + 48, depth)?;
15768            Ok(())
15769        }
15770    }
15771
15772    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeAttributes {
15773        #[inline(always)]
15774        fn new_empty() -> Self {
15775            Self {
15776                mode: fidl::new_empty!(u32, D),
15777                id: fidl::new_empty!(u64, D),
15778                content_size: fidl::new_empty!(u64, D),
15779                storage_size: fidl::new_empty!(u64, D),
15780                link_count: fidl::new_empty!(u64, D),
15781                creation_time: fidl::new_empty!(u64, D),
15782                modification_time: fidl::new_empty!(u64, D),
15783            }
15784        }
15785
15786        #[inline]
15787        unsafe fn decode(
15788            &mut self,
15789            decoder: &mut fidl::encoding::Decoder<'_, D>,
15790            offset: usize,
15791            _depth: fidl::encoding::Depth,
15792        ) -> fidl::Result<()> {
15793            decoder.debug_check_bounds::<Self>(offset);
15794            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15795            // Verify that padding bytes are zero.
15796            let ptr = unsafe { buf_ptr.offset(0) };
15797            let padval = unsafe { (ptr as *const u64).read_unaligned() };
15798            let mask = 0xffffffff00000000u64;
15799            let maskedval = padval & mask;
15800            if maskedval != 0 {
15801                return Err(fidl::Error::NonZeroPadding {
15802                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
15803                });
15804            }
15805            // Copy from the buffer into the object.
15806            unsafe {
15807                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 56);
15808            }
15809            Ok(())
15810        }
15811    }
15812
15813    impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign4 {
15814        type Borrowed<'a> = &'a Self;
15815        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15816            value
15817        }
15818    }
15819
15820    unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign4 {
15821        type Owned = Self;
15822
15823        #[inline(always)]
15824        fn inline_align(_context: fidl::encoding::Context) -> usize {
15825            4
15826        }
15827
15828        #[inline(always)]
15829        fn inline_size(_context: fidl::encoding::Context) -> usize {
15830            8
15831        }
15832        #[inline(always)]
15833        fn encode_is_copy() -> bool {
15834            true
15835        }
15836
15837        #[inline(always)]
15838        fn decode_is_copy() -> bool {
15839            true
15840        }
15841    }
15842
15843    unsafe impl<D: fidl::encoding::ResourceDialect>
15844        fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>
15845        for &OneLayerStructNoPaddingAlign4
15846    {
15847        #[inline]
15848        unsafe fn encode(
15849            self,
15850            encoder: &mut fidl::encoding::Encoder<'_, D>,
15851            offset: usize,
15852            _depth: fidl::encoding::Depth,
15853        ) -> fidl::Result<()> {
15854            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15855            unsafe {
15856                // Copy the object into the buffer.
15857                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15858                (buf_ptr as *mut OneLayerStructNoPaddingAlign4)
15859                    .write_unaligned((self as *const OneLayerStructNoPaddingAlign4).read());
15860                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15861                // done second because the memcpy will write garbage to these bytes.
15862            }
15863            Ok(())
15864        }
15865    }
15866    unsafe impl<
15867        D: fidl::encoding::ResourceDialect,
15868        T0: fidl::encoding::Encode<u16, D>,
15869        T1: fidl::encoding::Encode<u8, D>,
15870        T2: fidl::encoding::Encode<u8, D>,
15871        T3: fidl::encoding::Encode<u32, D>,
15872    > fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D> for (T0, T1, T2, T3)
15873    {
15874        #[inline]
15875        unsafe fn encode(
15876            self,
15877            encoder: &mut fidl::encoding::Encoder<'_, D>,
15878            offset: usize,
15879            depth: fidl::encoding::Depth,
15880        ) -> fidl::Result<()> {
15881            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15882            // Zero out padding regions. There's no need to apply masks
15883            // because the unmasked parts will be overwritten by fields.
15884            // Write the fields.
15885            self.0.encode(encoder, offset + 0, depth)?;
15886            self.1.encode(encoder, offset + 2, depth)?;
15887            self.2.encode(encoder, offset + 3, depth)?;
15888            self.3.encode(encoder, offset + 4, depth)?;
15889            Ok(())
15890        }
15891    }
15892
15893    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15894        for OneLayerStructNoPaddingAlign4
15895    {
15896        #[inline(always)]
15897        fn new_empty() -> Self {
15898            Self {
15899                a: fidl::new_empty!(u16, D),
15900                b: fidl::new_empty!(u8, D),
15901                c: fidl::new_empty!(u8, D),
15902                d: fidl::new_empty!(u32, D),
15903            }
15904        }
15905
15906        #[inline]
15907        unsafe fn decode(
15908            &mut self,
15909            decoder: &mut fidl::encoding::Decoder<'_, D>,
15910            offset: usize,
15911            _depth: fidl::encoding::Depth,
15912        ) -> fidl::Result<()> {
15913            decoder.debug_check_bounds::<Self>(offset);
15914            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15915            // Verify that padding bytes are zero.
15916            // Copy from the buffer into the object.
15917            unsafe {
15918                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15919            }
15920            Ok(())
15921        }
15922    }
15923
15924    impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign8 {
15925        type Borrowed<'a> = &'a Self;
15926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15927            value
15928        }
15929    }
15930
15931    unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign8 {
15932        type Owned = Self;
15933
15934        #[inline(always)]
15935        fn inline_align(_context: fidl::encoding::Context) -> usize {
15936            8
15937        }
15938
15939        #[inline(always)]
15940        fn inline_size(_context: fidl::encoding::Context) -> usize {
15941            16
15942        }
15943        #[inline(always)]
15944        fn encode_is_copy() -> bool {
15945            true
15946        }
15947
15948        #[inline(always)]
15949        fn decode_is_copy() -> bool {
15950            true
15951        }
15952    }
15953
15954    unsafe impl<D: fidl::encoding::ResourceDialect>
15955        fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>
15956        for &OneLayerStructNoPaddingAlign8
15957    {
15958        #[inline]
15959        unsafe fn encode(
15960            self,
15961            encoder: &mut fidl::encoding::Encoder<'_, D>,
15962            offset: usize,
15963            _depth: fidl::encoding::Depth,
15964        ) -> fidl::Result<()> {
15965            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15966            unsafe {
15967                // Copy the object into the buffer.
15968                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15969                (buf_ptr as *mut OneLayerStructNoPaddingAlign8)
15970                    .write_unaligned((self as *const OneLayerStructNoPaddingAlign8).read());
15971                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15972                // done second because the memcpy will write garbage to these bytes.
15973            }
15974            Ok(())
15975        }
15976    }
15977    unsafe impl<
15978        D: fidl::encoding::ResourceDialect,
15979        T0: fidl::encoding::Encode<u32, D>,
15980        T1: fidl::encoding::Encode<u16, D>,
15981        T2: fidl::encoding::Encode<u16, D>,
15982        T3: fidl::encoding::Encode<u64, D>,
15983    > fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D> for (T0, T1, T2, T3)
15984    {
15985        #[inline]
15986        unsafe fn encode(
15987            self,
15988            encoder: &mut fidl::encoding::Encoder<'_, D>,
15989            offset: usize,
15990            depth: fidl::encoding::Depth,
15991        ) -> fidl::Result<()> {
15992            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15993            // Zero out padding regions. There's no need to apply masks
15994            // because the unmasked parts will be overwritten by fields.
15995            // Write the fields.
15996            self.0.encode(encoder, offset + 0, depth)?;
15997            self.1.encode(encoder, offset + 4, depth)?;
15998            self.2.encode(encoder, offset + 6, depth)?;
15999            self.3.encode(encoder, offset + 8, depth)?;
16000            Ok(())
16001        }
16002    }
16003
16004    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16005        for OneLayerStructNoPaddingAlign8
16006    {
16007        #[inline(always)]
16008        fn new_empty() -> Self {
16009            Self {
16010                a: fidl::new_empty!(u32, D),
16011                b: fidl::new_empty!(u16, D),
16012                c: fidl::new_empty!(u16, D),
16013                d: fidl::new_empty!(u64, D),
16014            }
16015        }
16016
16017        #[inline]
16018        unsafe fn decode(
16019            &mut self,
16020            decoder: &mut fidl::encoding::Decoder<'_, D>,
16021            offset: usize,
16022            _depth: fidl::encoding::Depth,
16023        ) -> fidl::Result<()> {
16024            decoder.debug_check_bounds::<Self>(offset);
16025            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16026            // Verify that padding bytes are zero.
16027            // Copy from the buffer into the object.
16028            unsafe {
16029                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
16030            }
16031            Ok(())
16032        }
16033    }
16034
16035    impl fidl::encoding::ValueTypeMarker for OneLayerStructWithBool {
16036        type Borrowed<'a> = &'a Self;
16037        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16038            value
16039        }
16040    }
16041
16042    unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithBool {
16043        type Owned = Self;
16044
16045        #[inline(always)]
16046        fn inline_align(_context: fidl::encoding::Context) -> usize {
16047            4
16048        }
16049
16050        #[inline(always)]
16051        fn inline_size(_context: fidl::encoding::Context) -> usize {
16052            8
16053        }
16054    }
16055
16056    unsafe impl<D: fidl::encoding::ResourceDialect>
16057        fidl::encoding::Encode<OneLayerStructWithBool, D> for &OneLayerStructWithBool
16058    {
16059        #[inline]
16060        unsafe fn encode(
16061            self,
16062            encoder: &mut fidl::encoding::Encoder<'_, D>,
16063            offset: usize,
16064            _depth: fidl::encoding::Depth,
16065        ) -> fidl::Result<()> {
16066            encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
16067            // Delegate to tuple encoding.
16068            fidl::encoding::Encode::<OneLayerStructWithBool, D>::encode(
16069                (
16070                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16071                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16072                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.c),
16073                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.d),
16074                ),
16075                encoder,
16076                offset,
16077                _depth,
16078            )
16079        }
16080    }
16081    unsafe impl<
16082        D: fidl::encoding::ResourceDialect,
16083        T0: fidl::encoding::Encode<bool, D>,
16084        T1: fidl::encoding::Encode<u8, D>,
16085        T2: fidl::encoding::Encode<u16, D>,
16086        T3: fidl::encoding::Encode<u32, D>,
16087    > fidl::encoding::Encode<OneLayerStructWithBool, D> for (T0, T1, T2, T3)
16088    {
16089        #[inline]
16090        unsafe fn encode(
16091            self,
16092            encoder: &mut fidl::encoding::Encoder<'_, D>,
16093            offset: usize,
16094            depth: fidl::encoding::Depth,
16095        ) -> fidl::Result<()> {
16096            encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
16097            // Zero out padding regions. There's no need to apply masks
16098            // because the unmasked parts will be overwritten by fields.
16099            // Write the fields.
16100            self.0.encode(encoder, offset + 0, depth)?;
16101            self.1.encode(encoder, offset + 1, depth)?;
16102            self.2.encode(encoder, offset + 2, depth)?;
16103            self.3.encode(encoder, offset + 4, depth)?;
16104            Ok(())
16105        }
16106    }
16107
16108    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16109        for OneLayerStructWithBool
16110    {
16111        #[inline(always)]
16112        fn new_empty() -> Self {
16113            Self {
16114                a: fidl::new_empty!(bool, D),
16115                b: fidl::new_empty!(u8, D),
16116                c: fidl::new_empty!(u16, D),
16117                d: fidl::new_empty!(u32, D),
16118            }
16119        }
16120
16121        #[inline]
16122        unsafe fn decode(
16123            &mut self,
16124            decoder: &mut fidl::encoding::Decoder<'_, D>,
16125            offset: usize,
16126            _depth: fidl::encoding::Depth,
16127        ) -> fidl::Result<()> {
16128            decoder.debug_check_bounds::<Self>(offset);
16129            // Verify that padding bytes are zero.
16130            fidl::decode!(bool, D, &mut self.a, decoder, offset + 0, _depth)?;
16131            fidl::decode!(u8, D, &mut self.b, decoder, offset + 1, _depth)?;
16132            fidl::decode!(u16, D, &mut self.c, decoder, offset + 2, _depth)?;
16133            fidl::decode!(u32, D, &mut self.d, decoder, offset + 4, _depth)?;
16134            Ok(())
16135        }
16136    }
16137
16138    impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign4 {
16139        type Borrowed<'a> = &'a Self;
16140        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16141            value
16142        }
16143    }
16144
16145    unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign4 {
16146        type Owned = Self;
16147
16148        #[inline(always)]
16149        fn inline_align(_context: fidl::encoding::Context) -> usize {
16150            4
16151        }
16152
16153        #[inline(always)]
16154        fn inline_size(_context: fidl::encoding::Context) -> usize {
16155            8
16156        }
16157    }
16158
16159    unsafe impl<D: fidl::encoding::ResourceDialect>
16160        fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>
16161        for &OneLayerStructWithPaddingAlign4
16162    {
16163        #[inline]
16164        unsafe fn encode(
16165            self,
16166            encoder: &mut fidl::encoding::Encoder<'_, D>,
16167            offset: usize,
16168            _depth: fidl::encoding::Depth,
16169        ) -> fidl::Result<()> {
16170            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
16171            unsafe {
16172                // Copy the object into the buffer.
16173                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
16174                (buf_ptr as *mut OneLayerStructWithPaddingAlign4)
16175                    .write_unaligned((self as *const OneLayerStructWithPaddingAlign4).read());
16176                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
16177                // done second because the memcpy will write garbage to these bytes.
16178                let padding_ptr = buf_ptr.offset(0) as *mut u32;
16179                let padding_mask = 0xff000000u32;
16180                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
16181            }
16182            Ok(())
16183        }
16184    }
16185    unsafe impl<
16186        D: fidl::encoding::ResourceDialect,
16187        T0: fidl::encoding::Encode<u16, D>,
16188        T1: fidl::encoding::Encode<u8, D>,
16189        T2: fidl::encoding::Encode<u32, D>,
16190    > fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D> for (T0, T1, T2)
16191    {
16192        #[inline]
16193        unsafe fn encode(
16194            self,
16195            encoder: &mut fidl::encoding::Encoder<'_, D>,
16196            offset: usize,
16197            depth: fidl::encoding::Depth,
16198        ) -> fidl::Result<()> {
16199            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
16200            // Zero out padding regions. There's no need to apply masks
16201            // because the unmasked parts will be overwritten by fields.
16202            unsafe {
16203                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16204                (ptr as *mut u32).write_unaligned(0);
16205            }
16206            // Write the fields.
16207            self.0.encode(encoder, offset + 0, depth)?;
16208            self.1.encode(encoder, offset + 2, depth)?;
16209            self.2.encode(encoder, offset + 4, depth)?;
16210            Ok(())
16211        }
16212    }
16213
16214    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16215        for OneLayerStructWithPaddingAlign4
16216    {
16217        #[inline(always)]
16218        fn new_empty() -> Self {
16219            Self {
16220                a: fidl::new_empty!(u16, D),
16221                b: fidl::new_empty!(u8, D),
16222                c: fidl::new_empty!(u32, D),
16223            }
16224        }
16225
16226        #[inline]
16227        unsafe fn decode(
16228            &mut self,
16229            decoder: &mut fidl::encoding::Decoder<'_, D>,
16230            offset: usize,
16231            _depth: fidl::encoding::Depth,
16232        ) -> fidl::Result<()> {
16233            decoder.debug_check_bounds::<Self>(offset);
16234            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16235            // Verify that padding bytes are zero.
16236            let ptr = unsafe { buf_ptr.offset(0) };
16237            let padval = unsafe { (ptr as *const u32).read_unaligned() };
16238            let mask = 0xff000000u32;
16239            let maskedval = padval & mask;
16240            if maskedval != 0 {
16241                return Err(fidl::Error::NonZeroPadding {
16242                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16243                });
16244            }
16245            // Copy from the buffer into the object.
16246            unsafe {
16247                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
16248            }
16249            Ok(())
16250        }
16251    }
16252
16253    impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign8 {
16254        type Borrowed<'a> = &'a Self;
16255        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16256            value
16257        }
16258    }
16259
16260    unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign8 {
16261        type Owned = Self;
16262
16263        #[inline(always)]
16264        fn inline_align(_context: fidl::encoding::Context) -> usize {
16265            8
16266        }
16267
16268        #[inline(always)]
16269        fn inline_size(_context: fidl::encoding::Context) -> usize {
16270            16
16271        }
16272    }
16273
16274    unsafe impl<D: fidl::encoding::ResourceDialect>
16275        fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>
16276        for &OneLayerStructWithPaddingAlign8
16277    {
16278        #[inline]
16279        unsafe fn encode(
16280            self,
16281            encoder: &mut fidl::encoding::Encoder<'_, D>,
16282            offset: usize,
16283            _depth: fidl::encoding::Depth,
16284        ) -> fidl::Result<()> {
16285            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16286            unsafe {
16287                // Copy the object into the buffer.
16288                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
16289                (buf_ptr as *mut OneLayerStructWithPaddingAlign8)
16290                    .write_unaligned((self as *const OneLayerStructWithPaddingAlign8).read());
16291                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
16292                // done second because the memcpy will write garbage to these bytes.
16293                let padding_ptr = buf_ptr.offset(0) as *mut u64;
16294                let padding_mask = 0xffff000000000000u64;
16295                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
16296            }
16297            Ok(())
16298        }
16299    }
16300    unsafe impl<
16301        D: fidl::encoding::ResourceDialect,
16302        T0: fidl::encoding::Encode<u32, D>,
16303        T1: fidl::encoding::Encode<u16, D>,
16304        T2: fidl::encoding::Encode<u64, D>,
16305    > fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D> for (T0, T1, T2)
16306    {
16307        #[inline]
16308        unsafe fn encode(
16309            self,
16310            encoder: &mut fidl::encoding::Encoder<'_, D>,
16311            offset: usize,
16312            depth: fidl::encoding::Depth,
16313        ) -> fidl::Result<()> {
16314            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16315            // Zero out padding regions. There's no need to apply masks
16316            // because the unmasked parts will be overwritten by fields.
16317            unsafe {
16318                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16319                (ptr as *mut u64).write_unaligned(0);
16320            }
16321            // Write the fields.
16322            self.0.encode(encoder, offset + 0, depth)?;
16323            self.1.encode(encoder, offset + 4, depth)?;
16324            self.2.encode(encoder, offset + 8, depth)?;
16325            Ok(())
16326        }
16327    }
16328
16329    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16330        for OneLayerStructWithPaddingAlign8
16331    {
16332        #[inline(always)]
16333        fn new_empty() -> Self {
16334            Self {
16335                a: fidl::new_empty!(u32, D),
16336                b: fidl::new_empty!(u16, D),
16337                c: fidl::new_empty!(u64, D),
16338            }
16339        }
16340
16341        #[inline]
16342        unsafe fn decode(
16343            &mut self,
16344            decoder: &mut fidl::encoding::Decoder<'_, D>,
16345            offset: usize,
16346            _depth: fidl::encoding::Depth,
16347        ) -> fidl::Result<()> {
16348            decoder.debug_check_bounds::<Self>(offset);
16349            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16350            // Verify that padding bytes are zero.
16351            let ptr = unsafe { buf_ptr.offset(0) };
16352            let padval = unsafe { (ptr as *const u64).read_unaligned() };
16353            let mask = 0xffff000000000000u64;
16354            let maskedval = padval & mask;
16355            if maskedval != 0 {
16356                return Err(fidl::Error::NonZeroPadding {
16357                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16358                });
16359            }
16360            // Copy from the buffer into the object.
16361            unsafe {
16362                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
16363            }
16364            Ok(())
16365        }
16366    }
16367
16368    impl fidl::encoding::ValueTypeMarker for OptionalEmptyStructWrapper {
16369        type Borrowed<'a> = &'a Self;
16370        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16371            value
16372        }
16373    }
16374
16375    unsafe impl fidl::encoding::TypeMarker for OptionalEmptyStructWrapper {
16376        type Owned = Self;
16377
16378        #[inline(always)]
16379        fn inline_align(_context: fidl::encoding::Context) -> usize {
16380            8
16381        }
16382
16383        #[inline(always)]
16384        fn inline_size(_context: fidl::encoding::Context) -> usize {
16385            8
16386        }
16387    }
16388
16389    unsafe impl<D: fidl::encoding::ResourceDialect>
16390        fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for &OptionalEmptyStructWrapper
16391    {
16392        #[inline]
16393        unsafe fn encode(
16394            self,
16395            encoder: &mut fidl::encoding::Encoder<'_, D>,
16396            offset: usize,
16397            _depth: fidl::encoding::Depth,
16398        ) -> fidl::Result<()> {
16399            encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16400            // Delegate to tuple encoding.
16401            fidl::encoding::Encode::<OptionalEmptyStructWrapper, D>::encode(
16402                (<fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(
16403                    &self.s,
16404                ),),
16405                encoder,
16406                offset,
16407                _depth,
16408            )
16409        }
16410    }
16411    unsafe impl<
16412        D: fidl::encoding::ResourceDialect,
16413        T0: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
16414    > fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for (T0,)
16415    {
16416        #[inline]
16417        unsafe fn encode(
16418            self,
16419            encoder: &mut fidl::encoding::Encoder<'_, D>,
16420            offset: usize,
16421            depth: fidl::encoding::Depth,
16422        ) -> fidl::Result<()> {
16423            encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16424            // Zero out padding regions. There's no need to apply masks
16425            // because the unmasked parts will be overwritten by fields.
16426            // Write the fields.
16427            self.0.encode(encoder, offset + 0, depth)?;
16428            Ok(())
16429        }
16430    }
16431
16432    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16433        for OptionalEmptyStructWrapper
16434    {
16435        #[inline(always)]
16436        fn new_empty() -> Self {
16437            Self { s: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D) }
16438        }
16439
16440        #[inline]
16441        unsafe fn decode(
16442            &mut self,
16443            decoder: &mut fidl::encoding::Decoder<'_, D>,
16444            offset: usize,
16445            _depth: fidl::encoding::Depth,
16446        ) -> fidl::Result<()> {
16447            decoder.debug_check_bounds::<Self>(offset);
16448            // Verify that padding bytes are zero.
16449            fidl::decode!(
16450                fidl::encoding::Boxed<EmptyStruct>,
16451                D,
16452                &mut self.s,
16453                decoder,
16454                offset + 0,
16455                _depth
16456            )?;
16457            Ok(())
16458        }
16459    }
16460
16461    impl fidl::encoding::ValueTypeMarker for OptionalStringWrapper {
16462        type Borrowed<'a> = &'a Self;
16463        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16464            value
16465        }
16466    }
16467
16468    unsafe impl fidl::encoding::TypeMarker for OptionalStringWrapper {
16469        type Owned = Self;
16470
16471        #[inline(always)]
16472        fn inline_align(_context: fidl::encoding::Context) -> usize {
16473            8
16474        }
16475
16476        #[inline(always)]
16477        fn inline_size(_context: fidl::encoding::Context) -> usize {
16478            16
16479        }
16480    }
16481
16482    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalStringWrapper, D>
16483        for &OptionalStringWrapper
16484    {
16485        #[inline]
16486        unsafe fn encode(
16487            self,
16488            encoder: &mut fidl::encoding::Encoder<'_, D>,
16489            offset: usize,
16490            _depth: fidl::encoding::Depth,
16491        ) -> fidl::Result<()> {
16492            encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16493            // Delegate to tuple encoding.
16494            fidl::encoding::Encode::<OptionalStringWrapper, D>::encode(
16495                (
16496                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
16497                ),
16498                encoder, offset, _depth
16499            )
16500        }
16501    }
16502    unsafe impl<
16503        D: fidl::encoding::ResourceDialect,
16504        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
16505    > fidl::encoding::Encode<OptionalStringWrapper, D> for (T0,)
16506    {
16507        #[inline]
16508        unsafe fn encode(
16509            self,
16510            encoder: &mut fidl::encoding::Encoder<'_, D>,
16511            offset: usize,
16512            depth: fidl::encoding::Depth,
16513        ) -> fidl::Result<()> {
16514            encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16515            // Zero out padding regions. There's no need to apply masks
16516            // because the unmasked parts will be overwritten by fields.
16517            // Write the fields.
16518            self.0.encode(encoder, offset + 0, depth)?;
16519            Ok(())
16520        }
16521    }
16522
16523    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalStringWrapper {
16524        #[inline(always)]
16525        fn new_empty() -> Self {
16526            Self {
16527                str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
16528            }
16529        }
16530
16531        #[inline]
16532        unsafe fn decode(
16533            &mut self,
16534            decoder: &mut fidl::encoding::Decoder<'_, D>,
16535            offset: usize,
16536            _depth: fidl::encoding::Depth,
16537        ) -> fidl::Result<()> {
16538            decoder.debug_check_bounds::<Self>(offset);
16539            // Verify that padding bytes are zero.
16540            fidl::decode!(
16541                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
16542                D,
16543                &mut self.str,
16544                decoder,
16545                offset + 0,
16546                _depth
16547            )?;
16548            Ok(())
16549        }
16550    }
16551
16552    impl fidl::encoding::ValueTypeMarker for OptionalVectorWrapper {
16553        type Borrowed<'a> = &'a Self;
16554        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16555            value
16556        }
16557    }
16558
16559    unsafe impl fidl::encoding::TypeMarker for OptionalVectorWrapper {
16560        type Owned = Self;
16561
16562        #[inline(always)]
16563        fn inline_align(_context: fidl::encoding::Context) -> usize {
16564            8
16565        }
16566
16567        #[inline(always)]
16568        fn inline_size(_context: fidl::encoding::Context) -> usize {
16569            16
16570        }
16571    }
16572
16573    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalVectorWrapper, D>
16574        for &OptionalVectorWrapper
16575    {
16576        #[inline]
16577        unsafe fn encode(
16578            self,
16579            encoder: &mut fidl::encoding::Encoder<'_, D>,
16580            offset: usize,
16581            _depth: fidl::encoding::Depth,
16582        ) -> fidl::Result<()> {
16583            encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16584            // Delegate to tuple encoding.
16585            fidl::encoding::Encode::<OptionalVectorWrapper, D>::encode(
16586                (
16587                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16588                ),
16589                encoder, offset, _depth
16590            )
16591        }
16592    }
16593    unsafe impl<
16594        D: fidl::encoding::ResourceDialect,
16595        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>, D>,
16596    > fidl::encoding::Encode<OptionalVectorWrapper, D> for (T0,)
16597    {
16598        #[inline]
16599        unsafe fn encode(
16600            self,
16601            encoder: &mut fidl::encoding::Encoder<'_, D>,
16602            offset: usize,
16603            depth: fidl::encoding::Depth,
16604        ) -> fidl::Result<()> {
16605            encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16606            // Zero out padding regions. There's no need to apply masks
16607            // because the unmasked parts will be overwritten by fields.
16608            // Write the fields.
16609            self.0.encode(encoder, offset + 0, depth)?;
16610            Ok(())
16611        }
16612    }
16613
16614    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalVectorWrapper {
16615        #[inline(always)]
16616        fn new_empty() -> Self {
16617            Self {
16618                v: fidl::new_empty!(
16619                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16620                    D
16621                ),
16622            }
16623        }
16624
16625        #[inline]
16626        unsafe fn decode(
16627            &mut self,
16628            decoder: &mut fidl::encoding::Decoder<'_, D>,
16629            offset: usize,
16630            _depth: fidl::encoding::Depth,
16631        ) -> fidl::Result<()> {
16632            decoder.debug_check_bounds::<Self>(offset);
16633            // Verify that padding bytes are zero.
16634            fidl::decode!(
16635                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16636                D,
16637                &mut self.v,
16638                decoder,
16639                offset + 0,
16640                _depth
16641            )?;
16642            Ok(())
16643        }
16644    }
16645
16646    impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed4 {
16647        type Borrowed<'a> = &'a Self;
16648        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16649            value
16650        }
16651    }
16652
16653    unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed4 {
16654        type Owned = Self;
16655
16656        #[inline(always)]
16657        fn inline_align(_context: fidl::encoding::Context) -> usize {
16658            8
16659        }
16660
16661        #[inline(always)]
16662        fn inline_size(_context: fidl::encoding::Context) -> usize {
16663            16
16664        }
16665    }
16666
16667    unsafe impl<D: fidl::encoding::ResourceDialect>
16668        fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for &OutOfLinePaddingZeroed4
16669    {
16670        #[inline]
16671        unsafe fn encode(
16672            self,
16673            encoder: &mut fidl::encoding::Encoder<'_, D>,
16674            offset: usize,
16675            _depth: fidl::encoding::Depth,
16676        ) -> fidl::Result<()> {
16677            encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16678            // Delegate to tuple encoding.
16679            fidl::encoding::Encode::<OutOfLinePaddingZeroed4, D>::encode(
16680                (
16681                    <fidl::encoding::Boxed<Uint32Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16682                    <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16683                ),
16684                encoder, offset, _depth
16685            )
16686        }
16687    }
16688    unsafe impl<
16689        D: fidl::encoding::ResourceDialect,
16690        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint32Struct>, D>,
16691        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16692    > fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for (T0, T1)
16693    {
16694        #[inline]
16695        unsafe fn encode(
16696            self,
16697            encoder: &mut fidl::encoding::Encoder<'_, D>,
16698            offset: usize,
16699            depth: fidl::encoding::Depth,
16700        ) -> fidl::Result<()> {
16701            encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16702            // Zero out padding regions. There's no need to apply masks
16703            // because the unmasked parts will be overwritten by fields.
16704            // Write the fields.
16705            self.0.encode(encoder, offset + 0, depth)?;
16706            self.1.encode(encoder, offset + 8, depth)?;
16707            Ok(())
16708        }
16709    }
16710
16711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16712        for OutOfLinePaddingZeroed4
16713    {
16714        #[inline(always)]
16715        fn new_empty() -> Self {
16716            Self {
16717                a: fidl::new_empty!(fidl::encoding::Boxed<Uint32Struct>, D),
16718                b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16719            }
16720        }
16721
16722        #[inline]
16723        unsafe fn decode(
16724            &mut self,
16725            decoder: &mut fidl::encoding::Decoder<'_, D>,
16726            offset: usize,
16727            _depth: fidl::encoding::Depth,
16728        ) -> fidl::Result<()> {
16729            decoder.debug_check_bounds::<Self>(offset);
16730            // Verify that padding bytes are zero.
16731            fidl::decode!(
16732                fidl::encoding::Boxed<Uint32Struct>,
16733                D,
16734                &mut self.a,
16735                decoder,
16736                offset + 0,
16737                _depth
16738            )?;
16739            fidl::decode!(
16740                fidl::encoding::Boxed<Uint64Struct>,
16741                D,
16742                &mut self.b,
16743                decoder,
16744                offset + 8,
16745                _depth
16746            )?;
16747            Ok(())
16748        }
16749    }
16750
16751    impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed6 {
16752        type Borrowed<'a> = &'a Self;
16753        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16754            value
16755        }
16756    }
16757
16758    unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed6 {
16759        type Owned = Self;
16760
16761        #[inline(always)]
16762        fn inline_align(_context: fidl::encoding::Context) -> usize {
16763            8
16764        }
16765
16766        #[inline(always)]
16767        fn inline_size(_context: fidl::encoding::Context) -> usize {
16768            16
16769        }
16770    }
16771
16772    unsafe impl<D: fidl::encoding::ResourceDialect>
16773        fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for &OutOfLinePaddingZeroed6
16774    {
16775        #[inline]
16776        unsafe fn encode(
16777            self,
16778            encoder: &mut fidl::encoding::Encoder<'_, D>,
16779            offset: usize,
16780            _depth: fidl::encoding::Depth,
16781        ) -> fidl::Result<()> {
16782            encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16783            // Delegate to tuple encoding.
16784            fidl::encoding::Encode::<OutOfLinePaddingZeroed6, D>::encode(
16785                (
16786                    <fidl::encoding::Boxed<Uint16Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16787                    <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16788                ),
16789                encoder, offset, _depth
16790            )
16791        }
16792    }
16793    unsafe impl<
16794        D: fidl::encoding::ResourceDialect,
16795        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint16Struct>, D>,
16796        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16797    > fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for (T0, T1)
16798    {
16799        #[inline]
16800        unsafe fn encode(
16801            self,
16802            encoder: &mut fidl::encoding::Encoder<'_, D>,
16803            offset: usize,
16804            depth: fidl::encoding::Depth,
16805        ) -> fidl::Result<()> {
16806            encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16807            // Zero out padding regions. There's no need to apply masks
16808            // because the unmasked parts will be overwritten by fields.
16809            // Write the fields.
16810            self.0.encode(encoder, offset + 0, depth)?;
16811            self.1.encode(encoder, offset + 8, depth)?;
16812            Ok(())
16813        }
16814    }
16815
16816    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16817        for OutOfLinePaddingZeroed6
16818    {
16819        #[inline(always)]
16820        fn new_empty() -> Self {
16821            Self {
16822                a: fidl::new_empty!(fidl::encoding::Boxed<Uint16Struct>, D),
16823                b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16824            }
16825        }
16826
16827        #[inline]
16828        unsafe fn decode(
16829            &mut self,
16830            decoder: &mut fidl::encoding::Decoder<'_, D>,
16831            offset: usize,
16832            _depth: fidl::encoding::Depth,
16833        ) -> fidl::Result<()> {
16834            decoder.debug_check_bounds::<Self>(offset);
16835            // Verify that padding bytes are zero.
16836            fidl::decode!(
16837                fidl::encoding::Boxed<Uint16Struct>,
16838                D,
16839                &mut self.a,
16840                decoder,
16841                offset + 0,
16842                _depth
16843            )?;
16844            fidl::decode!(
16845                fidl::encoding::Boxed<Uint64Struct>,
16846                D,
16847                &mut self.b,
16848                decoder,
16849                offset + 8,
16850                _depth
16851            )?;
16852            Ok(())
16853        }
16854    }
16855
16856    impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed7 {
16857        type Borrowed<'a> = &'a Self;
16858        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16859            value
16860        }
16861    }
16862
16863    unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed7 {
16864        type Owned = Self;
16865
16866        #[inline(always)]
16867        fn inline_align(_context: fidl::encoding::Context) -> usize {
16868            8
16869        }
16870
16871        #[inline(always)]
16872        fn inline_size(_context: fidl::encoding::Context) -> usize {
16873            16
16874        }
16875    }
16876
16877    unsafe impl<D: fidl::encoding::ResourceDialect>
16878        fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for &OutOfLinePaddingZeroed7
16879    {
16880        #[inline]
16881        unsafe fn encode(
16882            self,
16883            encoder: &mut fidl::encoding::Encoder<'_, D>,
16884            offset: usize,
16885            _depth: fidl::encoding::Depth,
16886        ) -> fidl::Result<()> {
16887            encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16888            // Delegate to tuple encoding.
16889            fidl::encoding::Encode::<OutOfLinePaddingZeroed7, D>::encode(
16890                (
16891                    <fidl::encoding::Boxed<Uint8Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16892                    <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16893                ),
16894                encoder, offset, _depth
16895            )
16896        }
16897    }
16898    unsafe impl<
16899        D: fidl::encoding::ResourceDialect,
16900        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint8Struct>, D>,
16901        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16902    > fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for (T0, T1)
16903    {
16904        #[inline]
16905        unsafe fn encode(
16906            self,
16907            encoder: &mut fidl::encoding::Encoder<'_, D>,
16908            offset: usize,
16909            depth: fidl::encoding::Depth,
16910        ) -> fidl::Result<()> {
16911            encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16912            // Zero out padding regions. There's no need to apply masks
16913            // because the unmasked parts will be overwritten by fields.
16914            // Write the fields.
16915            self.0.encode(encoder, offset + 0, depth)?;
16916            self.1.encode(encoder, offset + 8, depth)?;
16917            Ok(())
16918        }
16919    }
16920
16921    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16922        for OutOfLinePaddingZeroed7
16923    {
16924        #[inline(always)]
16925        fn new_empty() -> Self {
16926            Self {
16927                a: fidl::new_empty!(fidl::encoding::Boxed<Uint8Struct>, D),
16928                b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16929            }
16930        }
16931
16932        #[inline]
16933        unsafe fn decode(
16934            &mut self,
16935            decoder: &mut fidl::encoding::Decoder<'_, D>,
16936            offset: usize,
16937            _depth: fidl::encoding::Depth,
16938        ) -> fidl::Result<()> {
16939            decoder.debug_check_bounds::<Self>(offset);
16940            // Verify that padding bytes are zero.
16941            fidl::decode!(
16942                fidl::encoding::Boxed<Uint8Struct>,
16943                D,
16944                &mut self.a,
16945                decoder,
16946                offset + 0,
16947                _depth
16948            )?;
16949            fidl::decode!(
16950                fidl::encoding::Boxed<Uint64Struct>,
16951                D,
16952                &mut self.b,
16953                decoder,
16954                offset + 8,
16955                _depth
16956            )?;
16957            Ok(())
16958        }
16959    }
16960
16961    impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1 {
16962        type Borrowed<'a> = &'a Self;
16963        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16964            value
16965        }
16966    }
16967
16968    unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1 {
16969        type Owned = Self;
16970
16971        #[inline(always)]
16972        fn inline_align(_context: fidl::encoding::Context) -> usize {
16973            8
16974        }
16975
16976        #[inline(always)]
16977        fn inline_size(_context: fidl::encoding::Context) -> usize {
16978            48
16979        }
16980    }
16981
16982    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OutOfLineSandwich1, D>
16983        for &OutOfLineSandwich1
16984    {
16985        #[inline]
16986        unsafe fn encode(
16987            self,
16988            encoder: &mut fidl::encoding::Encoder<'_, D>,
16989            offset: usize,
16990            _depth: fidl::encoding::Depth,
16991        ) -> fidl::Result<()> {
16992            encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
16993            // Delegate to tuple encoding.
16994            fidl::encoding::Encode::<OutOfLineSandwich1, D>::encode(
16995                (
16996                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
16997                    <fidl::encoding::Vector<Sandwich1, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16998                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
16999                ),
17000                encoder, offset, _depth
17001            )
17002        }
17003    }
17004    unsafe impl<
17005        D: fidl::encoding::ResourceDialect,
17006        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17007        T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1, 1>, D>,
17008        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17009    > fidl::encoding::Encode<OutOfLineSandwich1, D> for (T0, T1, T2)
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::<OutOfLineSandwich1>(offset);
17019            // Zero out padding regions. There's no need to apply masks
17020            // because the unmasked parts will be overwritten by fields.
17021            // Write the fields.
17022            self.0.encode(encoder, offset + 0, depth)?;
17023            self.1.encode(encoder, offset + 16, depth)?;
17024            self.2.encode(encoder, offset + 32, depth)?;
17025            Ok(())
17026        }
17027    }
17028
17029    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfLineSandwich1 {
17030        #[inline(always)]
17031        fn new_empty() -> Self {
17032            Self {
17033                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17034                v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1, 1>, D),
17035                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17036            }
17037        }
17038
17039        #[inline]
17040        unsafe fn decode(
17041            &mut self,
17042            decoder: &mut fidl::encoding::Decoder<'_, D>,
17043            offset: usize,
17044            _depth: fidl::encoding::Depth,
17045        ) -> fidl::Result<()> {
17046            decoder.debug_check_bounds::<Self>(offset);
17047            // Verify that padding bytes are zero.
17048            fidl::decode!(
17049                fidl::encoding::UnboundedString,
17050                D,
17051                &mut self.before,
17052                decoder,
17053                offset + 0,
17054                _depth
17055            )?;
17056            fidl::decode!(fidl::encoding::Vector<Sandwich1, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
17057            fidl::decode!(
17058                fidl::encoding::UnboundedString,
17059                D,
17060                &mut self.after,
17061                decoder,
17062                offset + 32,
17063                _depth
17064            )?;
17065            Ok(())
17066        }
17067    }
17068
17069    impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1WithOptUnion {
17070        type Borrowed<'a> = &'a Self;
17071        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17072            value
17073        }
17074    }
17075
17076    unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1WithOptUnion {
17077        type Owned = Self;
17078
17079        #[inline(always)]
17080        fn inline_align(_context: fidl::encoding::Context) -> usize {
17081            8
17082        }
17083
17084        #[inline(always)]
17085        fn inline_size(_context: fidl::encoding::Context) -> usize {
17086            48
17087        }
17088    }
17089
17090    unsafe impl<D: fidl::encoding::ResourceDialect>
17091        fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D>
17092        for &OutOfLineSandwich1WithOptUnion
17093    {
17094        #[inline]
17095        unsafe fn encode(
17096            self,
17097            encoder: &mut fidl::encoding::Encoder<'_, D>,
17098            offset: usize,
17099            _depth: fidl::encoding::Depth,
17100        ) -> fidl::Result<()> {
17101            encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
17102            // Delegate to tuple encoding.
17103            fidl::encoding::Encode::<OutOfLineSandwich1WithOptUnion, D>::encode(
17104                (
17105                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
17106                    <fidl::encoding::Vector<Sandwich1WithOptUnion, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17107                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
17108                ),
17109                encoder, offset, _depth
17110            )
17111        }
17112    }
17113    unsafe impl<
17114        D: fidl::encoding::ResourceDialect,
17115        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17116        T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D>,
17117        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17118    > fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D> for (T0, T1, T2)
17119    {
17120        #[inline]
17121        unsafe fn encode(
17122            self,
17123            encoder: &mut fidl::encoding::Encoder<'_, D>,
17124            offset: usize,
17125            depth: fidl::encoding::Depth,
17126        ) -> fidl::Result<()> {
17127            encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
17128            // Zero out padding regions. There's no need to apply masks
17129            // because the unmasked parts will be overwritten by fields.
17130            // Write the fields.
17131            self.0.encode(encoder, offset + 0, depth)?;
17132            self.1.encode(encoder, offset + 16, depth)?;
17133            self.2.encode(encoder, offset + 32, depth)?;
17134            Ok(())
17135        }
17136    }
17137
17138    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17139        for OutOfLineSandwich1WithOptUnion
17140    {
17141        #[inline(always)]
17142        fn new_empty() -> Self {
17143            Self {
17144                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17145                v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D),
17146                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17147            }
17148        }
17149
17150        #[inline]
17151        unsafe fn decode(
17152            &mut self,
17153            decoder: &mut fidl::encoding::Decoder<'_, D>,
17154            offset: usize,
17155            _depth: fidl::encoding::Depth,
17156        ) -> fidl::Result<()> {
17157            decoder.debug_check_bounds::<Self>(offset);
17158            // Verify that padding bytes are zero.
17159            fidl::decode!(
17160                fidl::encoding::UnboundedString,
17161                D,
17162                &mut self.before,
17163                decoder,
17164                offset + 0,
17165                _depth
17166            )?;
17167            fidl::decode!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
17168            fidl::decode!(
17169                fidl::encoding::UnboundedString,
17170                D,
17171                &mut self.after,
17172                decoder,
17173                offset + 32,
17174                _depth
17175            )?;
17176            Ok(())
17177        }
17178    }
17179
17180    impl fidl::encoding::ValueTypeMarker for PaddedTableStruct {
17181        type Borrowed<'a> = &'a Self;
17182        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17183            value
17184        }
17185    }
17186
17187    unsafe impl fidl::encoding::TypeMarker for PaddedTableStruct {
17188        type Owned = Self;
17189
17190        #[inline(always)]
17191        fn inline_align(_context: fidl::encoding::Context) -> usize {
17192            8
17193        }
17194
17195        #[inline(always)]
17196        fn inline_size(_context: fidl::encoding::Context) -> usize {
17197            16
17198        }
17199    }
17200
17201    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTableStruct, D>
17202        for &PaddedTableStruct
17203    {
17204        #[inline]
17205        unsafe fn encode(
17206            self,
17207            encoder: &mut fidl::encoding::Encoder<'_, D>,
17208            offset: usize,
17209            _depth: fidl::encoding::Depth,
17210        ) -> fidl::Result<()> {
17211            encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17212            // Delegate to tuple encoding.
17213            fidl::encoding::Encode::<PaddedTableStruct, D>::encode(
17214                (<PaddedTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
17215                encoder,
17216                offset,
17217                _depth,
17218            )
17219        }
17220    }
17221    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedTable, D>>
17222        fidl::encoding::Encode<PaddedTableStruct, D> for (T0,)
17223    {
17224        #[inline]
17225        unsafe fn encode(
17226            self,
17227            encoder: &mut fidl::encoding::Encoder<'_, D>,
17228            offset: usize,
17229            depth: fidl::encoding::Depth,
17230        ) -> fidl::Result<()> {
17231            encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17232            // Zero out padding regions. There's no need to apply masks
17233            // because the unmasked parts will be overwritten by fields.
17234            // Write the fields.
17235            self.0.encode(encoder, offset + 0, depth)?;
17236            Ok(())
17237        }
17238    }
17239
17240    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTableStruct {
17241        #[inline(always)]
17242        fn new_empty() -> Self {
17243            Self { t: fidl::new_empty!(PaddedTable, D) }
17244        }
17245
17246        #[inline]
17247        unsafe fn decode(
17248            &mut self,
17249            decoder: &mut fidl::encoding::Decoder<'_, D>,
17250            offset: usize,
17251            _depth: fidl::encoding::Depth,
17252        ) -> fidl::Result<()> {
17253            decoder.debug_check_bounds::<Self>(offset);
17254            // Verify that padding bytes are zero.
17255            fidl::decode!(PaddedTable, D, &mut self.t, decoder, offset + 0, _depth)?;
17256            Ok(())
17257        }
17258    }
17259
17260    impl fidl::encoding::ValueTypeMarker for PaddedUnionStruct {
17261        type Borrowed<'a> = &'a Self;
17262        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17263            value
17264        }
17265    }
17266
17267    unsafe impl fidl::encoding::TypeMarker for PaddedUnionStruct {
17268        type Owned = Self;
17269
17270        #[inline(always)]
17271        fn inline_align(_context: fidl::encoding::Context) -> usize {
17272            8
17273        }
17274
17275        #[inline(always)]
17276        fn inline_size(_context: fidl::encoding::Context) -> usize {
17277            16
17278        }
17279    }
17280
17281    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnionStruct, D>
17282        for &PaddedUnionStruct
17283    {
17284        #[inline]
17285        unsafe fn encode(
17286            self,
17287            encoder: &mut fidl::encoding::Encoder<'_, D>,
17288            offset: usize,
17289            _depth: fidl::encoding::Depth,
17290        ) -> fidl::Result<()> {
17291            encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17292            // Delegate to tuple encoding.
17293            fidl::encoding::Encode::<PaddedUnionStruct, D>::encode(
17294                (<PaddedUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
17295                encoder,
17296                offset,
17297                _depth,
17298            )
17299        }
17300    }
17301    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedUnion, D>>
17302        fidl::encoding::Encode<PaddedUnionStruct, D> for (T0,)
17303    {
17304        #[inline]
17305        unsafe fn encode(
17306            self,
17307            encoder: &mut fidl::encoding::Encoder<'_, D>,
17308            offset: usize,
17309            depth: fidl::encoding::Depth,
17310        ) -> fidl::Result<()> {
17311            encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17312            // Zero out padding regions. There's no need to apply masks
17313            // because the unmasked parts will be overwritten by fields.
17314            // Write the fields.
17315            self.0.encode(encoder, offset + 0, depth)?;
17316            Ok(())
17317        }
17318    }
17319
17320    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnionStruct {
17321        #[inline(always)]
17322        fn new_empty() -> Self {
17323            Self { u: fidl::new_empty!(PaddedUnion, D) }
17324        }
17325
17326        #[inline]
17327        unsafe fn decode(
17328            &mut self,
17329            decoder: &mut fidl::encoding::Decoder<'_, D>,
17330            offset: usize,
17331            _depth: fidl::encoding::Depth,
17332        ) -> fidl::Result<()> {
17333            decoder.debug_check_bounds::<Self>(offset);
17334            // Verify that padding bytes are zero.
17335            fidl::decode!(PaddedUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
17336            Ok(())
17337        }
17338    }
17339
17340    impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17341        type Borrowed<'a> = &'a Self;
17342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17343            value
17344        }
17345    }
17346
17347    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17348        type Owned = Self;
17349
17350        #[inline(always)]
17351        fn inline_align(_context: fidl::encoding::Context) -> usize {
17352            2
17353        }
17354
17355        #[inline(always)]
17356        fn inline_size(_context: fidl::encoding::Context) -> usize {
17357            6
17358        }
17359    }
17360
17361    unsafe impl<D: fidl::encoding::ResourceDialect>
17362        fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D>
17363        for &PaddingAlignment2MaskMayBe4Bytes
17364    {
17365        #[inline]
17366        unsafe fn encode(
17367            self,
17368            encoder: &mut fidl::encoding::Encoder<'_, D>,
17369            offset: usize,
17370            _depth: fidl::encoding::Depth,
17371        ) -> fidl::Result<()> {
17372            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17373            unsafe {
17374                // Copy the object into the buffer.
17375                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17376                (buf_ptr as *mut PaddingAlignment2MaskMayBe4Bytes)
17377                    .write_unaligned((self as *const PaddingAlignment2MaskMayBe4Bytes).read());
17378                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17379                // done second because the memcpy will write garbage to these bytes.
17380                let padding_ptr = buf_ptr.offset(0) as *mut u16;
17381                let padding_mask = 0xff00u16;
17382                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17383            }
17384            Ok(())
17385        }
17386    }
17387    unsafe impl<
17388        D: fidl::encoding::ResourceDialect,
17389        T0: fidl::encoding::Encode<u8, D>,
17390        T1: fidl::encoding::Encode<u16, D>,
17391        T2: fidl::encoding::Encode<u16, D>,
17392    > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D> for (T0, T1, T2)
17393    {
17394        #[inline]
17395        unsafe fn encode(
17396            self,
17397            encoder: &mut fidl::encoding::Encoder<'_, D>,
17398            offset: usize,
17399            depth: fidl::encoding::Depth,
17400        ) -> fidl::Result<()> {
17401            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17402            // Zero out padding regions. There's no need to apply masks
17403            // because the unmasked parts will be overwritten by fields.
17404            unsafe {
17405                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17406                (ptr as *mut u16).write_unaligned(0);
17407            }
17408            // Write the fields.
17409            self.0.encode(encoder, offset + 0, depth)?;
17410            self.1.encode(encoder, offset + 2, depth)?;
17411            self.2.encode(encoder, offset + 4, depth)?;
17412            Ok(())
17413        }
17414    }
17415
17416    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17417        for PaddingAlignment2MaskMayBe4Bytes
17418    {
17419        #[inline(always)]
17420        fn new_empty() -> Self {
17421            Self {
17422                a: fidl::new_empty!(u8, D),
17423                b: fidl::new_empty!(u16, D),
17424                c: fidl::new_empty!(u16, D),
17425            }
17426        }
17427
17428        #[inline]
17429        unsafe fn decode(
17430            &mut self,
17431            decoder: &mut fidl::encoding::Decoder<'_, D>,
17432            offset: usize,
17433            _depth: fidl::encoding::Depth,
17434        ) -> fidl::Result<()> {
17435            decoder.debug_check_bounds::<Self>(offset);
17436            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17437            // Verify that padding bytes are zero.
17438            let ptr = unsafe { buf_ptr.offset(0) };
17439            let padval = unsafe { (ptr as *const u16).read_unaligned() };
17440            let mask = 0xff00u16;
17441            let maskedval = padval & mask;
17442            if maskedval != 0 {
17443                return Err(fidl::Error::NonZeroPadding {
17444                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17445                });
17446            }
17447            // Copy from the buffer into the object.
17448            unsafe {
17449                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
17450            }
17451            Ok(())
17452        }
17453    }
17454
17455    impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17456        type Borrowed<'a> = &'a Self;
17457        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17458            value
17459        }
17460    }
17461
17462    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17463        type Owned = Self;
17464
17465        #[inline(always)]
17466        fn inline_align(_context: fidl::encoding::Context) -> usize {
17467            8
17468        }
17469
17470        #[inline(always)]
17471        fn inline_size(_context: fidl::encoding::Context) -> usize {
17472            16
17473        }
17474    }
17475
17476    unsafe impl<D: fidl::encoding::ResourceDialect>
17477        fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D>
17478        for &PaddingAlignment2MaskMayBe4BytesVector
17479    {
17480        #[inline]
17481        unsafe fn encode(
17482            self,
17483            encoder: &mut fidl::encoding::Encoder<'_, D>,
17484            offset: usize,
17485            _depth: fidl::encoding::Depth,
17486        ) -> fidl::Result<()> {
17487            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17488            // Delegate to tuple encoding.
17489            fidl::encoding::Encode::<PaddingAlignment2MaskMayBe4BytesVector, D>::encode(
17490                (
17491                    <fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17492                ),
17493                encoder, offset, _depth
17494            )
17495        }
17496    }
17497    unsafe impl<
17498        D: fidl::encoding::ResourceDialect,
17499        T0: fidl::encoding::Encode<
17500                fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17501                D,
17502            >,
17503    > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D> for (T0,)
17504    {
17505        #[inline]
17506        unsafe fn encode(
17507            self,
17508            encoder: &mut fidl::encoding::Encoder<'_, D>,
17509            offset: usize,
17510            depth: fidl::encoding::Depth,
17511        ) -> fidl::Result<()> {
17512            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17513            // Zero out padding regions. There's no need to apply masks
17514            // because the unmasked parts will be overwritten by fields.
17515            // Write the fields.
17516            self.0.encode(encoder, offset + 0, depth)?;
17517            Ok(())
17518        }
17519    }
17520
17521    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17522        for PaddingAlignment2MaskMayBe4BytesVector
17523    {
17524        #[inline(always)]
17525        fn new_empty() -> Self {
17526            Self {
17527                v: fidl::new_empty!(
17528                    fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17529                    D
17530                ),
17531            }
17532        }
17533
17534        #[inline]
17535        unsafe fn decode(
17536            &mut self,
17537            decoder: &mut fidl::encoding::Decoder<'_, D>,
17538            offset: usize,
17539            _depth: fidl::encoding::Depth,
17540        ) -> fidl::Result<()> {
17541            decoder.debug_check_bounds::<Self>(offset);
17542            // Verify that padding bytes are zero.
17543            fidl::decode!(
17544                fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17545                D,
17546                &mut self.v,
17547                decoder,
17548                offset + 0,
17549                _depth
17550            )?;
17551            Ok(())
17552        }
17553    }
17554
17555    impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17556        type Borrowed<'a> = &'a Self;
17557        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17558            value
17559        }
17560    }
17561
17562    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17563        type Owned = Self;
17564
17565        #[inline(always)]
17566        fn inline_align(_context: fidl::encoding::Context) -> usize {
17567            4
17568        }
17569
17570        #[inline(always)]
17571        fn inline_size(_context: fidl::encoding::Context) -> usize {
17572            12
17573        }
17574    }
17575
17576    unsafe impl<D: fidl::encoding::ResourceDialect>
17577        fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D>
17578        for &PaddingAlignment4MaskMayBe8Bytes
17579    {
17580        #[inline]
17581        unsafe fn encode(
17582            self,
17583            encoder: &mut fidl::encoding::Encoder<'_, D>,
17584            offset: usize,
17585            _depth: fidl::encoding::Depth,
17586        ) -> fidl::Result<()> {
17587            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17588            unsafe {
17589                // Copy the object into the buffer.
17590                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17591                (buf_ptr as *mut PaddingAlignment4MaskMayBe8Bytes)
17592                    .write_unaligned((self as *const PaddingAlignment4MaskMayBe8Bytes).read());
17593                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17594                // done second because the memcpy will write garbage to these bytes.
17595                let padding_ptr = buf_ptr.offset(0) as *mut u32;
17596                let padding_mask = 0xffffff00u32;
17597                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17598            }
17599            Ok(())
17600        }
17601    }
17602    unsafe impl<
17603        D: fidl::encoding::ResourceDialect,
17604        T0: fidl::encoding::Encode<u8, D>,
17605        T1: fidl::encoding::Encode<u32, D>,
17606        T2: fidl::encoding::Encode<u32, D>,
17607    > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D> for (T0, T1, T2)
17608    {
17609        #[inline]
17610        unsafe fn encode(
17611            self,
17612            encoder: &mut fidl::encoding::Encoder<'_, D>,
17613            offset: usize,
17614            depth: fidl::encoding::Depth,
17615        ) -> fidl::Result<()> {
17616            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17617            // Zero out padding regions. There's no need to apply masks
17618            // because the unmasked parts will be overwritten by fields.
17619            unsafe {
17620                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17621                (ptr as *mut u32).write_unaligned(0);
17622            }
17623            // Write the fields.
17624            self.0.encode(encoder, offset + 0, depth)?;
17625            self.1.encode(encoder, offset + 4, depth)?;
17626            self.2.encode(encoder, offset + 8, depth)?;
17627            Ok(())
17628        }
17629    }
17630
17631    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17632        for PaddingAlignment4MaskMayBe8Bytes
17633    {
17634        #[inline(always)]
17635        fn new_empty() -> Self {
17636            Self {
17637                a: fidl::new_empty!(u8, D),
17638                b: fidl::new_empty!(u32, D),
17639                c: fidl::new_empty!(u32, D),
17640            }
17641        }
17642
17643        #[inline]
17644        unsafe fn decode(
17645            &mut self,
17646            decoder: &mut fidl::encoding::Decoder<'_, D>,
17647            offset: usize,
17648            _depth: fidl::encoding::Depth,
17649        ) -> fidl::Result<()> {
17650            decoder.debug_check_bounds::<Self>(offset);
17651            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17652            // Verify that padding bytes are zero.
17653            let ptr = unsafe { buf_ptr.offset(0) };
17654            let padval = unsafe { (ptr as *const u32).read_unaligned() };
17655            let mask = 0xffffff00u32;
17656            let maskedval = padval & mask;
17657            if maskedval != 0 {
17658                return Err(fidl::Error::NonZeroPadding {
17659                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17660                });
17661            }
17662            // Copy from the buffer into the object.
17663            unsafe {
17664                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
17665            }
17666            Ok(())
17667        }
17668    }
17669
17670    impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17671        type Borrowed<'a> = &'a Self;
17672        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17673            value
17674        }
17675    }
17676
17677    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17678        type Owned = Self;
17679
17680        #[inline(always)]
17681        fn inline_align(_context: fidl::encoding::Context) -> usize {
17682            8
17683        }
17684
17685        #[inline(always)]
17686        fn inline_size(_context: fidl::encoding::Context) -> usize {
17687            16
17688        }
17689    }
17690
17691    unsafe impl<D: fidl::encoding::ResourceDialect>
17692        fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D>
17693        for &PaddingAlignment4MaskMayBe8BytesVector
17694    {
17695        #[inline]
17696        unsafe fn encode(
17697            self,
17698            encoder: &mut fidl::encoding::Encoder<'_, D>,
17699            offset: usize,
17700            _depth: fidl::encoding::Depth,
17701        ) -> fidl::Result<()> {
17702            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17703            // Delegate to tuple encoding.
17704            fidl::encoding::Encode::<PaddingAlignment4MaskMayBe8BytesVector, D>::encode(
17705                (
17706                    <fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17707                ),
17708                encoder, offset, _depth
17709            )
17710        }
17711    }
17712    unsafe impl<
17713        D: fidl::encoding::ResourceDialect,
17714        T0: fidl::encoding::Encode<
17715                fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17716                D,
17717            >,
17718    > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D> for (T0,)
17719    {
17720        #[inline]
17721        unsafe fn encode(
17722            self,
17723            encoder: &mut fidl::encoding::Encoder<'_, D>,
17724            offset: usize,
17725            depth: fidl::encoding::Depth,
17726        ) -> fidl::Result<()> {
17727            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17728            // Zero out padding regions. There's no need to apply masks
17729            // because the unmasked parts will be overwritten by fields.
17730            // Write the fields.
17731            self.0.encode(encoder, offset + 0, depth)?;
17732            Ok(())
17733        }
17734    }
17735
17736    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17737        for PaddingAlignment4MaskMayBe8BytesVector
17738    {
17739        #[inline(always)]
17740        fn new_empty() -> Self {
17741            Self {
17742                v: fidl::new_empty!(
17743                    fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17744                    D
17745                ),
17746            }
17747        }
17748
17749        #[inline]
17750        unsafe fn decode(
17751            &mut self,
17752            decoder: &mut fidl::encoding::Decoder<'_, D>,
17753            offset: usize,
17754            _depth: fidl::encoding::Depth,
17755        ) -> fidl::Result<()> {
17756            decoder.debug_check_bounds::<Self>(offset);
17757            // Verify that padding bytes are zero.
17758            fidl::decode!(
17759                fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17760                D,
17761                &mut self.v,
17762                decoder,
17763                offset + 0,
17764                _depth
17765            )?;
17766            Ok(())
17767        }
17768    }
17769
17770    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int32 {
17771        type Borrowed<'a> = &'a Self;
17772        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17773            value
17774        }
17775    }
17776
17777    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int32 {
17778        type Owned = Self;
17779
17780        #[inline(always)]
17781        fn inline_align(_context: fidl::encoding::Context) -> usize {
17782            4
17783        }
17784
17785        #[inline(always)]
17786        fn inline_size(_context: fidl::encoding::Context) -> usize {
17787            8
17788        }
17789    }
17790
17791    unsafe impl<D: fidl::encoding::ResourceDialect>
17792        fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D>
17793        for &PaddingBetweenFieldsInt16Int32
17794    {
17795        #[inline]
17796        unsafe fn encode(
17797            self,
17798            encoder: &mut fidl::encoding::Encoder<'_, D>,
17799            offset: usize,
17800            _depth: fidl::encoding::Depth,
17801        ) -> fidl::Result<()> {
17802            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17803            unsafe {
17804                // Copy the object into the buffer.
17805                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17806                (buf_ptr as *mut PaddingBetweenFieldsInt16Int32)
17807                    .write_unaligned((self as *const PaddingBetweenFieldsInt16Int32).read());
17808                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17809                // done second because the memcpy will write garbage to these bytes.
17810                let padding_ptr = buf_ptr.offset(0) as *mut u32;
17811                let padding_mask = 0xffff0000u32;
17812                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17813            }
17814            Ok(())
17815        }
17816    }
17817    unsafe impl<
17818        D: fidl::encoding::ResourceDialect,
17819        T0: fidl::encoding::Encode<i16, D>,
17820        T1: fidl::encoding::Encode<i32, D>,
17821    > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D> for (T0, T1)
17822    {
17823        #[inline]
17824        unsafe fn encode(
17825            self,
17826            encoder: &mut fidl::encoding::Encoder<'_, D>,
17827            offset: usize,
17828            depth: fidl::encoding::Depth,
17829        ) -> fidl::Result<()> {
17830            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17831            // Zero out padding regions. There's no need to apply masks
17832            // because the unmasked parts will be overwritten by fields.
17833            unsafe {
17834                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17835                (ptr as *mut u32).write_unaligned(0);
17836            }
17837            // Write the fields.
17838            self.0.encode(encoder, offset + 0, depth)?;
17839            self.1.encode(encoder, offset + 4, depth)?;
17840            Ok(())
17841        }
17842    }
17843
17844    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17845        for PaddingBetweenFieldsInt16Int32
17846    {
17847        #[inline(always)]
17848        fn new_empty() -> Self {
17849            Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i32, D) }
17850        }
17851
17852        #[inline]
17853        unsafe fn decode(
17854            &mut self,
17855            decoder: &mut fidl::encoding::Decoder<'_, D>,
17856            offset: usize,
17857            _depth: fidl::encoding::Depth,
17858        ) -> fidl::Result<()> {
17859            decoder.debug_check_bounds::<Self>(offset);
17860            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17861            // Verify that padding bytes are zero.
17862            let ptr = unsafe { buf_ptr.offset(0) };
17863            let padval = unsafe { (ptr as *const u32).read_unaligned() };
17864            let mask = 0xffff0000u32;
17865            let maskedval = padval & mask;
17866            if maskedval != 0 {
17867                return Err(fidl::Error::NonZeroPadding {
17868                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17869                });
17870            }
17871            // Copy from the buffer into the object.
17872            unsafe {
17873                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
17874            }
17875            Ok(())
17876        }
17877    }
17878
17879    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int64 {
17880        type Borrowed<'a> = &'a Self;
17881        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17882            value
17883        }
17884    }
17885
17886    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int64 {
17887        type Owned = Self;
17888
17889        #[inline(always)]
17890        fn inline_align(_context: fidl::encoding::Context) -> usize {
17891            8
17892        }
17893
17894        #[inline(always)]
17895        fn inline_size(_context: fidl::encoding::Context) -> usize {
17896            16
17897        }
17898    }
17899
17900    unsafe impl<D: fidl::encoding::ResourceDialect>
17901        fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D>
17902        for &PaddingBetweenFieldsInt16Int64
17903    {
17904        #[inline]
17905        unsafe fn encode(
17906            self,
17907            encoder: &mut fidl::encoding::Encoder<'_, D>,
17908            offset: usize,
17909            _depth: fidl::encoding::Depth,
17910        ) -> fidl::Result<()> {
17911            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17912            unsafe {
17913                // Copy the object into the buffer.
17914                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17915                (buf_ptr as *mut PaddingBetweenFieldsInt16Int64)
17916                    .write_unaligned((self as *const PaddingBetweenFieldsInt16Int64).read());
17917                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17918                // done second because the memcpy will write garbage to these bytes.
17919                let padding_ptr = buf_ptr.offset(0) as *mut u64;
17920                let padding_mask = 0xffffffffffff0000u64;
17921                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17922            }
17923            Ok(())
17924        }
17925    }
17926    unsafe impl<
17927        D: fidl::encoding::ResourceDialect,
17928        T0: fidl::encoding::Encode<i16, D>,
17929        T1: fidl::encoding::Encode<i64, D>,
17930    > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D> for (T0, T1)
17931    {
17932        #[inline]
17933        unsafe fn encode(
17934            self,
17935            encoder: &mut fidl::encoding::Encoder<'_, D>,
17936            offset: usize,
17937            depth: fidl::encoding::Depth,
17938        ) -> fidl::Result<()> {
17939            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17940            // Zero out padding regions. There's no need to apply masks
17941            // because the unmasked parts will be overwritten by fields.
17942            unsafe {
17943                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17944                (ptr as *mut u64).write_unaligned(0);
17945            }
17946            // Write the fields.
17947            self.0.encode(encoder, offset + 0, depth)?;
17948            self.1.encode(encoder, offset + 8, depth)?;
17949            Ok(())
17950        }
17951    }
17952
17953    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17954        for PaddingBetweenFieldsInt16Int64
17955    {
17956        #[inline(always)]
17957        fn new_empty() -> Self {
17958            Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i64, D) }
17959        }
17960
17961        #[inline]
17962        unsafe fn decode(
17963            &mut self,
17964            decoder: &mut fidl::encoding::Decoder<'_, D>,
17965            offset: usize,
17966            _depth: fidl::encoding::Depth,
17967        ) -> fidl::Result<()> {
17968            decoder.debug_check_bounds::<Self>(offset);
17969            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17970            // Verify that padding bytes are zero.
17971            let ptr = unsafe { buf_ptr.offset(0) };
17972            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17973            let mask = 0xffffffffffff0000u64;
17974            let maskedval = padval & mask;
17975            if maskedval != 0 {
17976                return Err(fidl::Error::NonZeroPadding {
17977                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17978                });
17979            }
17980            // Copy from the buffer into the object.
17981            unsafe {
17982                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
17983            }
17984            Ok(())
17985        }
17986    }
17987
17988    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt32Int64 {
17989        type Borrowed<'a> = &'a Self;
17990        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17991            value
17992        }
17993    }
17994
17995    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt32Int64 {
17996        type Owned = Self;
17997
17998        #[inline(always)]
17999        fn inline_align(_context: fidl::encoding::Context) -> usize {
18000            8
18001        }
18002
18003        #[inline(always)]
18004        fn inline_size(_context: fidl::encoding::Context) -> usize {
18005            16
18006        }
18007    }
18008
18009    unsafe impl<D: fidl::encoding::ResourceDialect>
18010        fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D>
18011        for &PaddingBetweenFieldsInt32Int64
18012    {
18013        #[inline]
18014        unsafe fn encode(
18015            self,
18016            encoder: &mut fidl::encoding::Encoder<'_, D>,
18017            offset: usize,
18018            _depth: fidl::encoding::Depth,
18019        ) -> fidl::Result<()> {
18020            encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
18021            unsafe {
18022                // Copy the object into the buffer.
18023                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18024                (buf_ptr as *mut PaddingBetweenFieldsInt32Int64)
18025                    .write_unaligned((self as *const PaddingBetweenFieldsInt32Int64).read());
18026                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18027                // done second because the memcpy will write garbage to these bytes.
18028                let padding_ptr = buf_ptr.offset(0) as *mut u64;
18029                let padding_mask = 0xffffffff00000000u64;
18030                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18031            }
18032            Ok(())
18033        }
18034    }
18035    unsafe impl<
18036        D: fidl::encoding::ResourceDialect,
18037        T0: fidl::encoding::Encode<i32, D>,
18038        T1: fidl::encoding::Encode<i64, D>,
18039    > fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D> for (T0, T1)
18040    {
18041        #[inline]
18042        unsafe fn encode(
18043            self,
18044            encoder: &mut fidl::encoding::Encoder<'_, D>,
18045            offset: usize,
18046            depth: fidl::encoding::Depth,
18047        ) -> fidl::Result<()> {
18048            encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
18049            // Zero out padding regions. There's no need to apply masks
18050            // because the unmasked parts will be overwritten by fields.
18051            unsafe {
18052                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18053                (ptr as *mut u64).write_unaligned(0);
18054            }
18055            // Write the fields.
18056            self.0.encode(encoder, offset + 0, depth)?;
18057            self.1.encode(encoder, offset + 8, depth)?;
18058            Ok(())
18059        }
18060    }
18061
18062    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18063        for PaddingBetweenFieldsInt32Int64
18064    {
18065        #[inline(always)]
18066        fn new_empty() -> Self {
18067            Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i64, D) }
18068        }
18069
18070        #[inline]
18071        unsafe fn decode(
18072            &mut self,
18073            decoder: &mut fidl::encoding::Decoder<'_, D>,
18074            offset: usize,
18075            _depth: fidl::encoding::Depth,
18076        ) -> fidl::Result<()> {
18077            decoder.debug_check_bounds::<Self>(offset);
18078            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18079            // Verify that padding bytes are zero.
18080            let ptr = unsafe { buf_ptr.offset(0) };
18081            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18082            let mask = 0xffffffff00000000u64;
18083            let maskedval = padval & mask;
18084            if maskedval != 0 {
18085                return Err(fidl::Error::NonZeroPadding {
18086                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18087                });
18088            }
18089            // Copy from the buffer into the object.
18090            unsafe {
18091                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
18092            }
18093            Ok(())
18094        }
18095    }
18096
18097    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int16 {
18098        type Borrowed<'a> = &'a Self;
18099        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18100            value
18101        }
18102    }
18103
18104    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int16 {
18105        type Owned = Self;
18106
18107        #[inline(always)]
18108        fn inline_align(_context: fidl::encoding::Context) -> usize {
18109            2
18110        }
18111
18112        #[inline(always)]
18113        fn inline_size(_context: fidl::encoding::Context) -> usize {
18114            4
18115        }
18116    }
18117
18118    unsafe impl<D: fidl::encoding::ResourceDialect>
18119        fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D>
18120        for &PaddingBetweenFieldsInt8Int16
18121    {
18122        #[inline]
18123        unsafe fn encode(
18124            self,
18125            encoder: &mut fidl::encoding::Encoder<'_, D>,
18126            offset: usize,
18127            _depth: fidl::encoding::Depth,
18128        ) -> fidl::Result<()> {
18129            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
18130            unsafe {
18131                // Copy the object into the buffer.
18132                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18133                (buf_ptr as *mut PaddingBetweenFieldsInt8Int16)
18134                    .write_unaligned((self as *const PaddingBetweenFieldsInt8Int16).read());
18135                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18136                // done second because the memcpy will write garbage to these bytes.
18137                let padding_ptr = buf_ptr.offset(0) as *mut u16;
18138                let padding_mask = 0xff00u16;
18139                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18140            }
18141            Ok(())
18142        }
18143    }
18144    unsafe impl<
18145        D: fidl::encoding::ResourceDialect,
18146        T0: fidl::encoding::Encode<i8, D>,
18147        T1: fidl::encoding::Encode<i16, D>,
18148    > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D> for (T0, T1)
18149    {
18150        #[inline]
18151        unsafe fn encode(
18152            self,
18153            encoder: &mut fidl::encoding::Encoder<'_, D>,
18154            offset: usize,
18155            depth: fidl::encoding::Depth,
18156        ) -> fidl::Result<()> {
18157            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
18158            // Zero out padding regions. There's no need to apply masks
18159            // because the unmasked parts will be overwritten by fields.
18160            unsafe {
18161                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18162                (ptr as *mut u16).write_unaligned(0);
18163            }
18164            // Write the fields.
18165            self.0.encode(encoder, offset + 0, depth)?;
18166            self.1.encode(encoder, offset + 2, depth)?;
18167            Ok(())
18168        }
18169    }
18170
18171    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18172        for PaddingBetweenFieldsInt8Int16
18173    {
18174        #[inline(always)]
18175        fn new_empty() -> Self {
18176            Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i16, D) }
18177        }
18178
18179        #[inline]
18180        unsafe fn decode(
18181            &mut self,
18182            decoder: &mut fidl::encoding::Decoder<'_, D>,
18183            offset: usize,
18184            _depth: fidl::encoding::Depth,
18185        ) -> fidl::Result<()> {
18186            decoder.debug_check_bounds::<Self>(offset);
18187            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18188            // Verify that padding bytes are zero.
18189            let ptr = unsafe { buf_ptr.offset(0) };
18190            let padval = unsafe { (ptr as *const u16).read_unaligned() };
18191            let mask = 0xff00u16;
18192            let maskedval = padval & mask;
18193            if maskedval != 0 {
18194                return Err(fidl::Error::NonZeroPadding {
18195                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18196                });
18197            }
18198            // Copy from the buffer into the object.
18199            unsafe {
18200                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18201            }
18202            Ok(())
18203        }
18204    }
18205
18206    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int32 {
18207        type Borrowed<'a> = &'a Self;
18208        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18209            value
18210        }
18211    }
18212
18213    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int32 {
18214        type Owned = Self;
18215
18216        #[inline(always)]
18217        fn inline_align(_context: fidl::encoding::Context) -> usize {
18218            4
18219        }
18220
18221        #[inline(always)]
18222        fn inline_size(_context: fidl::encoding::Context) -> usize {
18223            8
18224        }
18225    }
18226
18227    unsafe impl<D: fidl::encoding::ResourceDialect>
18228        fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D>
18229        for &PaddingBetweenFieldsInt8Int32
18230    {
18231        #[inline]
18232        unsafe fn encode(
18233            self,
18234            encoder: &mut fidl::encoding::Encoder<'_, D>,
18235            offset: usize,
18236            _depth: fidl::encoding::Depth,
18237        ) -> fidl::Result<()> {
18238            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18239            unsafe {
18240                // Copy the object into the buffer.
18241                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18242                (buf_ptr as *mut PaddingBetweenFieldsInt8Int32)
18243                    .write_unaligned((self as *const PaddingBetweenFieldsInt8Int32).read());
18244                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18245                // done second because the memcpy will write garbage to these bytes.
18246                let padding_ptr = buf_ptr.offset(0) as *mut u32;
18247                let padding_mask = 0xffffff00u32;
18248                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18249            }
18250            Ok(())
18251        }
18252    }
18253    unsafe impl<
18254        D: fidl::encoding::ResourceDialect,
18255        T0: fidl::encoding::Encode<i8, D>,
18256        T1: fidl::encoding::Encode<i32, D>,
18257    > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D> for (T0, T1)
18258    {
18259        #[inline]
18260        unsafe fn encode(
18261            self,
18262            encoder: &mut fidl::encoding::Encoder<'_, D>,
18263            offset: usize,
18264            depth: fidl::encoding::Depth,
18265        ) -> fidl::Result<()> {
18266            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18267            // Zero out padding regions. There's no need to apply masks
18268            // because the unmasked parts will be overwritten by fields.
18269            unsafe {
18270                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18271                (ptr as *mut u32).write_unaligned(0);
18272            }
18273            // Write the fields.
18274            self.0.encode(encoder, offset + 0, depth)?;
18275            self.1.encode(encoder, offset + 4, depth)?;
18276            Ok(())
18277        }
18278    }
18279
18280    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18281        for PaddingBetweenFieldsInt8Int32
18282    {
18283        #[inline(always)]
18284        fn new_empty() -> Self {
18285            Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i32, D) }
18286        }
18287
18288        #[inline]
18289        unsafe fn decode(
18290            &mut self,
18291            decoder: &mut fidl::encoding::Decoder<'_, D>,
18292            offset: usize,
18293            _depth: fidl::encoding::Depth,
18294        ) -> fidl::Result<()> {
18295            decoder.debug_check_bounds::<Self>(offset);
18296            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18297            // Verify that padding bytes are zero.
18298            let ptr = unsafe { buf_ptr.offset(0) };
18299            let padval = unsafe { (ptr as *const u32).read_unaligned() };
18300            let mask = 0xffffff00u32;
18301            let maskedval = padval & mask;
18302            if maskedval != 0 {
18303                return Err(fidl::Error::NonZeroPadding {
18304                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18305                });
18306            }
18307            // Copy from the buffer into the object.
18308            unsafe {
18309                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18310            }
18311            Ok(())
18312        }
18313    }
18314
18315    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int64 {
18316        type Borrowed<'a> = &'a Self;
18317        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18318            value
18319        }
18320    }
18321
18322    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int64 {
18323        type Owned = Self;
18324
18325        #[inline(always)]
18326        fn inline_align(_context: fidl::encoding::Context) -> usize {
18327            8
18328        }
18329
18330        #[inline(always)]
18331        fn inline_size(_context: fidl::encoding::Context) -> usize {
18332            16
18333        }
18334    }
18335
18336    unsafe impl<D: fidl::encoding::ResourceDialect>
18337        fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D>
18338        for &PaddingBetweenFieldsInt8Int64
18339    {
18340        #[inline]
18341        unsafe fn encode(
18342            self,
18343            encoder: &mut fidl::encoding::Encoder<'_, D>,
18344            offset: usize,
18345            _depth: fidl::encoding::Depth,
18346        ) -> fidl::Result<()> {
18347            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18348            unsafe {
18349                // Copy the object into the buffer.
18350                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18351                (buf_ptr as *mut PaddingBetweenFieldsInt8Int64)
18352                    .write_unaligned((self as *const PaddingBetweenFieldsInt8Int64).read());
18353                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18354                // done second because the memcpy will write garbage to these bytes.
18355                let padding_ptr = buf_ptr.offset(0) as *mut u64;
18356                let padding_mask = 0xffffffffffffff00u64;
18357                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18358            }
18359            Ok(())
18360        }
18361    }
18362    unsafe impl<
18363        D: fidl::encoding::ResourceDialect,
18364        T0: fidl::encoding::Encode<i8, D>,
18365        T1: fidl::encoding::Encode<i64, D>,
18366    > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D> for (T0, T1)
18367    {
18368        #[inline]
18369        unsafe fn encode(
18370            self,
18371            encoder: &mut fidl::encoding::Encoder<'_, D>,
18372            offset: usize,
18373            depth: fidl::encoding::Depth,
18374        ) -> fidl::Result<()> {
18375            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18376            // Zero out padding regions. There's no need to apply masks
18377            // because the unmasked parts will be overwritten by fields.
18378            unsafe {
18379                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18380                (ptr as *mut u64).write_unaligned(0);
18381            }
18382            // Write the fields.
18383            self.0.encode(encoder, offset + 0, depth)?;
18384            self.1.encode(encoder, offset + 8, depth)?;
18385            Ok(())
18386        }
18387    }
18388
18389    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18390        for PaddingBetweenFieldsInt8Int64
18391    {
18392        #[inline(always)]
18393        fn new_empty() -> Self {
18394            Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i64, D) }
18395        }
18396
18397        #[inline]
18398        unsafe fn decode(
18399            &mut self,
18400            decoder: &mut fidl::encoding::Decoder<'_, D>,
18401            offset: usize,
18402            _depth: fidl::encoding::Depth,
18403        ) -> fidl::Result<()> {
18404            decoder.debug_check_bounds::<Self>(offset);
18405            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18406            // Verify that padding bytes are zero.
18407            let ptr = unsafe { buf_ptr.offset(0) };
18408            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18409            let mask = 0xffffffffffffff00u64;
18410            let maskedval = padval & mask;
18411            if maskedval != 0 {
18412                return Err(fidl::Error::NonZeroPadding {
18413                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18414                });
18415            }
18416            // Copy from the buffer into the object.
18417            unsafe {
18418                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
18419            }
18420            Ok(())
18421        }
18422    }
18423
18424    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject1Byte {
18425        type Borrowed<'a> = &'a Self;
18426        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18427            value
18428        }
18429    }
18430
18431    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject1Byte {
18432        type Owned = Self;
18433
18434        #[inline(always)]
18435        fn inline_align(_context: fidl::encoding::Context) -> usize {
18436            1
18437        }
18438
18439        #[inline(always)]
18440        fn inline_size(_context: fidl::encoding::Context) -> usize {
18441            1
18442        }
18443        #[inline(always)]
18444        fn encode_is_copy() -> bool {
18445            true
18446        }
18447
18448        #[inline(always)]
18449        fn decode_is_copy() -> bool {
18450            true
18451        }
18452    }
18453
18454    unsafe impl<D: fidl::encoding::ResourceDialect>
18455        fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D>
18456        for &PaddingEndOfInlineObject1Byte
18457    {
18458        #[inline]
18459        unsafe fn encode(
18460            self,
18461            encoder: &mut fidl::encoding::Encoder<'_, D>,
18462            offset: usize,
18463            _depth: fidl::encoding::Depth,
18464        ) -> fidl::Result<()> {
18465            encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18466            unsafe {
18467                // Copy the object into the buffer.
18468                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18469                (buf_ptr as *mut PaddingEndOfInlineObject1Byte)
18470                    .write_unaligned((self as *const PaddingEndOfInlineObject1Byte).read());
18471                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18472                // done second because the memcpy will write garbage to these bytes.
18473            }
18474            Ok(())
18475        }
18476    }
18477    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct1Byte, D>>
18478        fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D> for (T0,)
18479    {
18480        #[inline]
18481        unsafe fn encode(
18482            self,
18483            encoder: &mut fidl::encoding::Encoder<'_, D>,
18484            offset: usize,
18485            depth: fidl::encoding::Depth,
18486        ) -> fidl::Result<()> {
18487            encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18488            // Zero out padding regions. There's no need to apply masks
18489            // because the unmasked parts will be overwritten by fields.
18490            // Write the fields.
18491            self.0.encode(encoder, offset + 0, depth)?;
18492            Ok(())
18493        }
18494    }
18495
18496    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18497        for PaddingEndOfInlineObject1Byte
18498    {
18499        #[inline(always)]
18500        fn new_empty() -> Self {
18501            Self { a: fidl::new_empty!(Struct1Byte, D) }
18502        }
18503
18504        #[inline]
18505        unsafe fn decode(
18506            &mut self,
18507            decoder: &mut fidl::encoding::Decoder<'_, D>,
18508            offset: usize,
18509            _depth: fidl::encoding::Depth,
18510        ) -> fidl::Result<()> {
18511            decoder.debug_check_bounds::<Self>(offset);
18512            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18513            // Verify that padding bytes are zero.
18514            // Copy from the buffer into the object.
18515            unsafe {
18516                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
18517            }
18518            Ok(())
18519        }
18520    }
18521
18522    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject2Byte {
18523        type Borrowed<'a> = &'a Self;
18524        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18525            value
18526        }
18527    }
18528
18529    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject2Byte {
18530        type Owned = Self;
18531
18532        #[inline(always)]
18533        fn inline_align(_context: fidl::encoding::Context) -> usize {
18534            2
18535        }
18536
18537        #[inline(always)]
18538        fn inline_size(_context: fidl::encoding::Context) -> usize {
18539            2
18540        }
18541        #[inline(always)]
18542        fn encode_is_copy() -> bool {
18543            true
18544        }
18545
18546        #[inline(always)]
18547        fn decode_is_copy() -> bool {
18548            true
18549        }
18550    }
18551
18552    unsafe impl<D: fidl::encoding::ResourceDialect>
18553        fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D>
18554        for &PaddingEndOfInlineObject2Byte
18555    {
18556        #[inline]
18557        unsafe fn encode(
18558            self,
18559            encoder: &mut fidl::encoding::Encoder<'_, D>,
18560            offset: usize,
18561            _depth: fidl::encoding::Depth,
18562        ) -> fidl::Result<()> {
18563            encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18564            unsafe {
18565                // Copy the object into the buffer.
18566                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18567                (buf_ptr as *mut PaddingEndOfInlineObject2Byte)
18568                    .write_unaligned((self as *const PaddingEndOfInlineObject2Byte).read());
18569                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18570                // done second because the memcpy will write garbage to these bytes.
18571            }
18572            Ok(())
18573        }
18574    }
18575    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct2Byte, D>>
18576        fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D> for (T0,)
18577    {
18578        #[inline]
18579        unsafe fn encode(
18580            self,
18581            encoder: &mut fidl::encoding::Encoder<'_, D>,
18582            offset: usize,
18583            depth: fidl::encoding::Depth,
18584        ) -> fidl::Result<()> {
18585            encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18586            // Zero out padding regions. There's no need to apply masks
18587            // because the unmasked parts will be overwritten by fields.
18588            // Write the fields.
18589            self.0.encode(encoder, offset + 0, depth)?;
18590            Ok(())
18591        }
18592    }
18593
18594    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18595        for PaddingEndOfInlineObject2Byte
18596    {
18597        #[inline(always)]
18598        fn new_empty() -> Self {
18599            Self { a: fidl::new_empty!(Struct2Byte, D) }
18600        }
18601
18602        #[inline]
18603        unsafe fn decode(
18604            &mut self,
18605            decoder: &mut fidl::encoding::Decoder<'_, D>,
18606            offset: usize,
18607            _depth: fidl::encoding::Depth,
18608        ) -> fidl::Result<()> {
18609            decoder.debug_check_bounds::<Self>(offset);
18610            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18611            // Verify that padding bytes are zero.
18612            // Copy from the buffer into the object.
18613            unsafe {
18614                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
18615            }
18616            Ok(())
18617        }
18618    }
18619
18620    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject3Byte {
18621        type Borrowed<'a> = &'a Self;
18622        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18623            value
18624        }
18625    }
18626
18627    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject3Byte {
18628        type Owned = Self;
18629
18630        #[inline(always)]
18631        fn inline_align(_context: fidl::encoding::Context) -> usize {
18632            2
18633        }
18634
18635        #[inline(always)]
18636        fn inline_size(_context: fidl::encoding::Context) -> usize {
18637            4
18638        }
18639    }
18640
18641    unsafe impl<D: fidl::encoding::ResourceDialect>
18642        fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D>
18643        for &PaddingEndOfInlineObject3Byte
18644    {
18645        #[inline]
18646        unsafe fn encode(
18647            self,
18648            encoder: &mut fidl::encoding::Encoder<'_, D>,
18649            offset: usize,
18650            _depth: fidl::encoding::Depth,
18651        ) -> fidl::Result<()> {
18652            encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18653            unsafe {
18654                // Copy the object into the buffer.
18655                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18656                (buf_ptr as *mut PaddingEndOfInlineObject3Byte)
18657                    .write_unaligned((self as *const PaddingEndOfInlineObject3Byte).read());
18658                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18659                // done second because the memcpy will write garbage to these bytes.
18660                let padding_ptr = buf_ptr.offset(2) as *mut u16;
18661                let padding_mask = 0xff00u16;
18662                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18663            }
18664            Ok(())
18665        }
18666    }
18667    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct3Byte, D>>
18668        fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D> for (T0,)
18669    {
18670        #[inline]
18671        unsafe fn encode(
18672            self,
18673            encoder: &mut fidl::encoding::Encoder<'_, D>,
18674            offset: usize,
18675            depth: fidl::encoding::Depth,
18676        ) -> fidl::Result<()> {
18677            encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18678            // Zero out padding regions. There's no need to apply masks
18679            // because the unmasked parts will be overwritten by fields.
18680            // Write the fields.
18681            self.0.encode(encoder, offset + 0, depth)?;
18682            Ok(())
18683        }
18684    }
18685
18686    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18687        for PaddingEndOfInlineObject3Byte
18688    {
18689        #[inline(always)]
18690        fn new_empty() -> Self {
18691            Self { a: fidl::new_empty!(Struct3Byte, D) }
18692        }
18693
18694        #[inline]
18695        unsafe fn decode(
18696            &mut self,
18697            decoder: &mut fidl::encoding::Decoder<'_, D>,
18698            offset: usize,
18699            _depth: fidl::encoding::Depth,
18700        ) -> fidl::Result<()> {
18701            decoder.debug_check_bounds::<Self>(offset);
18702            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18703            // Verify that padding bytes are zero.
18704            let ptr = unsafe { buf_ptr.offset(2) };
18705            let padval = unsafe { (ptr as *const u16).read_unaligned() };
18706            let mask = 0xff00u16;
18707            let maskedval = padval & mask;
18708            if maskedval != 0 {
18709                return Err(fidl::Error::NonZeroPadding {
18710                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
18711                });
18712            }
18713            // Copy from the buffer into the object.
18714            unsafe {
18715                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18716            }
18717            Ok(())
18718        }
18719    }
18720
18721    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject4Byte {
18722        type Borrowed<'a> = &'a Self;
18723        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18724            value
18725        }
18726    }
18727
18728    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject4Byte {
18729        type Owned = Self;
18730
18731        #[inline(always)]
18732        fn inline_align(_context: fidl::encoding::Context) -> usize {
18733            4
18734        }
18735
18736        #[inline(always)]
18737        fn inline_size(_context: fidl::encoding::Context) -> usize {
18738            4
18739        }
18740        #[inline(always)]
18741        fn encode_is_copy() -> bool {
18742            true
18743        }
18744
18745        #[inline(always)]
18746        fn decode_is_copy() -> bool {
18747            true
18748        }
18749    }
18750
18751    unsafe impl<D: fidl::encoding::ResourceDialect>
18752        fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D>
18753        for &PaddingEndOfInlineObject4Byte
18754    {
18755        #[inline]
18756        unsafe fn encode(
18757            self,
18758            encoder: &mut fidl::encoding::Encoder<'_, D>,
18759            offset: usize,
18760            _depth: fidl::encoding::Depth,
18761        ) -> fidl::Result<()> {
18762            encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18763            unsafe {
18764                // Copy the object into the buffer.
18765                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18766                (buf_ptr as *mut PaddingEndOfInlineObject4Byte)
18767                    .write_unaligned((self as *const PaddingEndOfInlineObject4Byte).read());
18768                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18769                // done second because the memcpy will write garbage to these bytes.
18770            }
18771            Ok(())
18772        }
18773    }
18774    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct4Byte, D>>
18775        fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, 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::<PaddingEndOfInlineObject4Byte>(offset);
18785            // Zero out padding regions. There's no need to apply masks
18786            // because the unmasked parts will be overwritten by fields.
18787            // Write the fields.
18788            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 PaddingEndOfInlineObject4Byte
18795    {
18796        #[inline(always)]
18797        fn new_empty() -> Self {
18798            Self { a: fidl::new_empty!(Struct4Byte, 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            // Verify that padding bytes are zero.
18811            // Copy from the buffer into the object.
18812            unsafe {
18813                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18814            }
18815            Ok(())
18816        }
18817    }
18818
18819    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject5Byte {
18820        type Borrowed<'a> = &'a Self;
18821        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18822            value
18823        }
18824    }
18825
18826    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject5Byte {
18827        type Owned = Self;
18828
18829        #[inline(always)]
18830        fn inline_align(_context: fidl::encoding::Context) -> usize {
18831            4
18832        }
18833
18834        #[inline(always)]
18835        fn inline_size(_context: fidl::encoding::Context) -> usize {
18836            8
18837        }
18838    }
18839
18840    unsafe impl<D: fidl::encoding::ResourceDialect>
18841        fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D>
18842        for &PaddingEndOfInlineObject5Byte
18843    {
18844        #[inline]
18845        unsafe fn encode(
18846            self,
18847            encoder: &mut fidl::encoding::Encoder<'_, D>,
18848            offset: usize,
18849            _depth: fidl::encoding::Depth,
18850        ) -> fidl::Result<()> {
18851            encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18852            unsafe {
18853                // Copy the object into the buffer.
18854                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18855                (buf_ptr as *mut PaddingEndOfInlineObject5Byte)
18856                    .write_unaligned((self as *const PaddingEndOfInlineObject5Byte).read());
18857                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18858                // done second because the memcpy will write garbage to these bytes.
18859                let padding_ptr = buf_ptr.offset(4) as *mut u32;
18860                let padding_mask = 0xffffff00u32;
18861                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18862            }
18863            Ok(())
18864        }
18865    }
18866    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct5Byte, D>>
18867        fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D> for (T0,)
18868    {
18869        #[inline]
18870        unsafe fn encode(
18871            self,
18872            encoder: &mut fidl::encoding::Encoder<'_, D>,
18873            offset: usize,
18874            depth: fidl::encoding::Depth,
18875        ) -> fidl::Result<()> {
18876            encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18877            // Zero out padding regions. There's no need to apply masks
18878            // because the unmasked parts will be overwritten by fields.
18879            // Write the fields.
18880            self.0.encode(encoder, offset + 0, depth)?;
18881            Ok(())
18882        }
18883    }
18884
18885    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18886        for PaddingEndOfInlineObject5Byte
18887    {
18888        #[inline(always)]
18889        fn new_empty() -> Self {
18890            Self { a: fidl::new_empty!(Struct5Byte, D) }
18891        }
18892
18893        #[inline]
18894        unsafe fn decode(
18895            &mut self,
18896            decoder: &mut fidl::encoding::Decoder<'_, D>,
18897            offset: usize,
18898            _depth: fidl::encoding::Depth,
18899        ) -> fidl::Result<()> {
18900            decoder.debug_check_bounds::<Self>(offset);
18901            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18902            // Verify that padding bytes are zero.
18903            let ptr = unsafe { buf_ptr.offset(4) };
18904            let padval = unsafe { (ptr as *const u32).read_unaligned() };
18905            let mask = 0xffffff00u32;
18906            let maskedval = padval & mask;
18907            if maskedval != 0 {
18908                return Err(fidl::Error::NonZeroPadding {
18909                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18910                });
18911            }
18912            // Copy from the buffer into the object.
18913            unsafe {
18914                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18915            }
18916            Ok(())
18917        }
18918    }
18919
18920    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject6Byte {
18921        type Borrowed<'a> = &'a Self;
18922        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18923            value
18924        }
18925    }
18926
18927    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject6Byte {
18928        type Owned = Self;
18929
18930        #[inline(always)]
18931        fn inline_align(_context: fidl::encoding::Context) -> usize {
18932            4
18933        }
18934
18935        #[inline(always)]
18936        fn inline_size(_context: fidl::encoding::Context) -> usize {
18937            8
18938        }
18939    }
18940
18941    unsafe impl<D: fidl::encoding::ResourceDialect>
18942        fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D>
18943        for &PaddingEndOfInlineObject6Byte
18944    {
18945        #[inline]
18946        unsafe fn encode(
18947            self,
18948            encoder: &mut fidl::encoding::Encoder<'_, D>,
18949            offset: usize,
18950            _depth: fidl::encoding::Depth,
18951        ) -> fidl::Result<()> {
18952            encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18953            unsafe {
18954                // Copy the object into the buffer.
18955                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18956                (buf_ptr as *mut PaddingEndOfInlineObject6Byte)
18957                    .write_unaligned((self as *const PaddingEndOfInlineObject6Byte).read());
18958                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18959                // done second because the memcpy will write garbage to these bytes.
18960                let padding_ptr = buf_ptr.offset(4) as *mut u32;
18961                let padding_mask = 0xffff0000u32;
18962                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18963            }
18964            Ok(())
18965        }
18966    }
18967    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct6Byte, D>>
18968        fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D> for (T0,)
18969    {
18970        #[inline]
18971        unsafe fn encode(
18972            self,
18973            encoder: &mut fidl::encoding::Encoder<'_, D>,
18974            offset: usize,
18975            depth: fidl::encoding::Depth,
18976        ) -> fidl::Result<()> {
18977            encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18978            // Zero out padding regions. There's no need to apply masks
18979            // because the unmasked parts will be overwritten by fields.
18980            // Write the fields.
18981            self.0.encode(encoder, offset + 0, depth)?;
18982            Ok(())
18983        }
18984    }
18985
18986    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18987        for PaddingEndOfInlineObject6Byte
18988    {
18989        #[inline(always)]
18990        fn new_empty() -> Self {
18991            Self { a: fidl::new_empty!(Struct6Byte, D) }
18992        }
18993
18994        #[inline]
18995        unsafe fn decode(
18996            &mut self,
18997            decoder: &mut fidl::encoding::Decoder<'_, D>,
18998            offset: usize,
18999            _depth: fidl::encoding::Depth,
19000        ) -> fidl::Result<()> {
19001            decoder.debug_check_bounds::<Self>(offset);
19002            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
19003            // Verify that padding bytes are zero.
19004            let ptr = unsafe { buf_ptr.offset(4) };
19005            let padval = unsafe { (ptr as *const u32).read_unaligned() };
19006            let mask = 0xffff0000u32;
19007            let maskedval = padval & mask;
19008            if maskedval != 0 {
19009                return Err(fidl::Error::NonZeroPadding {
19010                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
19011                });
19012            }
19013            // Copy from the buffer into the object.
19014            unsafe {
19015                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
19016            }
19017            Ok(())
19018        }
19019    }
19020
19021    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject7Byte {
19022        type Borrowed<'a> = &'a Self;
19023        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19024            value
19025        }
19026    }
19027
19028    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject7Byte {
19029        type Owned = Self;
19030
19031        #[inline(always)]
19032        fn inline_align(_context: fidl::encoding::Context) -> usize {
19033            4
19034        }
19035
19036        #[inline(always)]
19037        fn inline_size(_context: fidl::encoding::Context) -> usize {
19038            8
19039        }
19040    }
19041
19042    unsafe impl<D: fidl::encoding::ResourceDialect>
19043        fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D>
19044        for &PaddingEndOfInlineObject7Byte
19045    {
19046        #[inline]
19047        unsafe fn encode(
19048            self,
19049            encoder: &mut fidl::encoding::Encoder<'_, D>,
19050            offset: usize,
19051            _depth: fidl::encoding::Depth,
19052        ) -> fidl::Result<()> {
19053            encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
19054            unsafe {
19055                // Copy the object into the buffer.
19056                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
19057                (buf_ptr as *mut PaddingEndOfInlineObject7Byte)
19058                    .write_unaligned((self as *const PaddingEndOfInlineObject7Byte).read());
19059                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
19060                // done second because the memcpy will write garbage to these bytes.
19061                let padding_ptr = buf_ptr.offset(4) as *mut u32;
19062                let padding_mask = 0xff000000u32;
19063                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
19064            }
19065            Ok(())
19066        }
19067    }
19068    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct7Byte, D>>
19069        fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D> for (T0,)
19070    {
19071        #[inline]
19072        unsafe fn encode(
19073            self,
19074            encoder: &mut fidl::encoding::Encoder<'_, D>,
19075            offset: usize,
19076            depth: fidl::encoding::Depth,
19077        ) -> fidl::Result<()> {
19078            encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
19079            // Zero out padding regions. There's no need to apply masks
19080            // because the unmasked parts will be overwritten by fields.
19081            // Write the fields.
19082            self.0.encode(encoder, offset + 0, depth)?;
19083            Ok(())
19084        }
19085    }
19086
19087    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19088        for PaddingEndOfInlineObject7Byte
19089    {
19090        #[inline(always)]
19091        fn new_empty() -> Self {
19092            Self { a: fidl::new_empty!(Struct7Byte, D) }
19093        }
19094
19095        #[inline]
19096        unsafe fn decode(
19097            &mut self,
19098            decoder: &mut fidl::encoding::Decoder<'_, D>,
19099            offset: usize,
19100            _depth: fidl::encoding::Depth,
19101        ) -> fidl::Result<()> {
19102            decoder.debug_check_bounds::<Self>(offset);
19103            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
19104            // Verify that padding bytes are zero.
19105            let ptr = unsafe { buf_ptr.offset(4) };
19106            let padval = unsafe { (ptr as *const u32).read_unaligned() };
19107            let mask = 0xff000000u32;
19108            let maskedval = padval & mask;
19109            if maskedval != 0 {
19110                return Err(fidl::Error::NonZeroPadding {
19111                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
19112                });
19113            }
19114            // Copy from the buffer into the object.
19115            unsafe {
19116                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
19117            }
19118            Ok(())
19119        }
19120    }
19121
19122    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
19123        type Borrowed<'a> = &'a Self;
19124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19125            value
19126        }
19127    }
19128
19129    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
19130        type Owned = Self;
19131
19132        #[inline(always)]
19133        fn inline_align(_context: fidl::encoding::Context) -> usize {
19134            8
19135        }
19136
19137        #[inline(always)]
19138        fn inline_size(_context: fidl::encoding::Context) -> usize {
19139            16
19140        }
19141    }
19142
19143    unsafe impl<D: fidl::encoding::ResourceDialect>
19144        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>
19145        for &PaddingEndOfInlineObjectBeforeNextObject1Byte
19146    {
19147        #[inline]
19148        unsafe fn encode(
19149            self,
19150            encoder: &mut fidl::encoding::Encoder<'_, D>,
19151            offset: usize,
19152            _depth: fidl::encoding::Depth,
19153        ) -> fidl::Result<()> {
19154            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
19155            // Delegate to tuple encoding.
19156            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>::encode(
19157                (
19158                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19159                        &self.out_of_line,
19160                    ),
19161                    <Struct1Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19162                ),
19163                encoder,
19164                offset,
19165                _depth,
19166            )
19167        }
19168    }
19169    unsafe impl<
19170        D: fidl::encoding::ResourceDialect,
19171        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19172        T1: fidl::encoding::Encode<Struct1Byte, D>,
19173    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D> for (T0, T1)
19174    {
19175        #[inline]
19176        unsafe fn encode(
19177            self,
19178            encoder: &mut fidl::encoding::Encoder<'_, D>,
19179            offset: usize,
19180            depth: fidl::encoding::Depth,
19181        ) -> fidl::Result<()> {
19182            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
19183            // Zero out padding regions. There's no need to apply masks
19184            // because the unmasked parts will be overwritten by fields.
19185            unsafe {
19186                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19187                (ptr as *mut u64).write_unaligned(0);
19188            }
19189            // Write the fields.
19190            self.0.encode(encoder, offset + 0, depth)?;
19191            self.1.encode(encoder, offset + 8, depth)?;
19192            Ok(())
19193        }
19194    }
19195
19196    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19197        for PaddingEndOfInlineObjectBeforeNextObject1Byte
19198    {
19199        #[inline(always)]
19200        fn new_empty() -> Self {
19201            Self {
19202                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19203                in_line: fidl::new_empty!(Struct1Byte, D),
19204            }
19205        }
19206
19207        #[inline]
19208        unsafe fn decode(
19209            &mut self,
19210            decoder: &mut fidl::encoding::Decoder<'_, D>,
19211            offset: usize,
19212            _depth: fidl::encoding::Depth,
19213        ) -> fidl::Result<()> {
19214            decoder.debug_check_bounds::<Self>(offset);
19215            // Verify that padding bytes are zero.
19216            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19217            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19218            let mask = 0xffffffffffffff00u64;
19219            let maskedval = padval & mask;
19220            if maskedval != 0 {
19221                return Err(fidl::Error::NonZeroPadding {
19222                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19223                });
19224            }
19225            fidl::decode!(
19226                fidl::encoding::Boxed<Struct8Byte>,
19227                D,
19228                &mut self.out_of_line,
19229                decoder,
19230                offset + 0,
19231                _depth
19232            )?;
19233            fidl::decode!(Struct1Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19234            Ok(())
19235        }
19236    }
19237
19238    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19239        type Borrowed<'a> = &'a Self;
19240        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19241            value
19242        }
19243    }
19244
19245    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19246        type Owned = Self;
19247
19248        #[inline(always)]
19249        fn inline_align(_context: fidl::encoding::Context) -> usize {
19250            8
19251        }
19252
19253        #[inline(always)]
19254        fn inline_size(_context: fidl::encoding::Context) -> usize {
19255            16
19256        }
19257    }
19258
19259    unsafe impl<D: fidl::encoding::ResourceDialect>
19260        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>
19261        for &PaddingEndOfInlineObjectBeforeNextObject2Byte
19262    {
19263        #[inline]
19264        unsafe fn encode(
19265            self,
19266            encoder: &mut fidl::encoding::Encoder<'_, D>,
19267            offset: usize,
19268            _depth: fidl::encoding::Depth,
19269        ) -> fidl::Result<()> {
19270            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19271            // Delegate to tuple encoding.
19272            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>::encode(
19273                (
19274                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19275                        &self.out_of_line,
19276                    ),
19277                    <Struct2Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19278                ),
19279                encoder,
19280                offset,
19281                _depth,
19282            )
19283        }
19284    }
19285    unsafe impl<
19286        D: fidl::encoding::ResourceDialect,
19287        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19288        T1: fidl::encoding::Encode<Struct2Byte, D>,
19289    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D> for (T0, T1)
19290    {
19291        #[inline]
19292        unsafe fn encode(
19293            self,
19294            encoder: &mut fidl::encoding::Encoder<'_, D>,
19295            offset: usize,
19296            depth: fidl::encoding::Depth,
19297        ) -> fidl::Result<()> {
19298            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19299            // Zero out padding regions. There's no need to apply masks
19300            // because the unmasked parts will be overwritten by fields.
19301            unsafe {
19302                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19303                (ptr as *mut u64).write_unaligned(0);
19304            }
19305            // Write the fields.
19306            self.0.encode(encoder, offset + 0, depth)?;
19307            self.1.encode(encoder, offset + 8, depth)?;
19308            Ok(())
19309        }
19310    }
19311
19312    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19313        for PaddingEndOfInlineObjectBeforeNextObject2Byte
19314    {
19315        #[inline(always)]
19316        fn new_empty() -> Self {
19317            Self {
19318                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19319                in_line: fidl::new_empty!(Struct2Byte, D),
19320            }
19321        }
19322
19323        #[inline]
19324        unsafe fn decode(
19325            &mut self,
19326            decoder: &mut fidl::encoding::Decoder<'_, D>,
19327            offset: usize,
19328            _depth: fidl::encoding::Depth,
19329        ) -> fidl::Result<()> {
19330            decoder.debug_check_bounds::<Self>(offset);
19331            // Verify that padding bytes are zero.
19332            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19333            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19334            let mask = 0xffffffffffff0000u64;
19335            let maskedval = padval & mask;
19336            if maskedval != 0 {
19337                return Err(fidl::Error::NonZeroPadding {
19338                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19339                });
19340            }
19341            fidl::decode!(
19342                fidl::encoding::Boxed<Struct8Byte>,
19343                D,
19344                &mut self.out_of_line,
19345                decoder,
19346                offset + 0,
19347                _depth
19348            )?;
19349            fidl::decode!(Struct2Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19350            Ok(())
19351        }
19352    }
19353
19354    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19355        type Borrowed<'a> = &'a Self;
19356        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19357            value
19358        }
19359    }
19360
19361    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19362        type Owned = Self;
19363
19364        #[inline(always)]
19365        fn inline_align(_context: fidl::encoding::Context) -> usize {
19366            8
19367        }
19368
19369        #[inline(always)]
19370        fn inline_size(_context: fidl::encoding::Context) -> usize {
19371            16
19372        }
19373    }
19374
19375    unsafe impl<D: fidl::encoding::ResourceDialect>
19376        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>
19377        for &PaddingEndOfInlineObjectBeforeNextObject3Byte
19378    {
19379        #[inline]
19380        unsafe fn encode(
19381            self,
19382            encoder: &mut fidl::encoding::Encoder<'_, D>,
19383            offset: usize,
19384            _depth: fidl::encoding::Depth,
19385        ) -> fidl::Result<()> {
19386            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19387            // Delegate to tuple encoding.
19388            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>::encode(
19389                (
19390                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19391                        &self.out_of_line,
19392                    ),
19393                    <Struct3Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19394                ),
19395                encoder,
19396                offset,
19397                _depth,
19398            )
19399        }
19400    }
19401    unsafe impl<
19402        D: fidl::encoding::ResourceDialect,
19403        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19404        T1: fidl::encoding::Encode<Struct3Byte, D>,
19405    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D> for (T0, T1)
19406    {
19407        #[inline]
19408        unsafe fn encode(
19409            self,
19410            encoder: &mut fidl::encoding::Encoder<'_, D>,
19411            offset: usize,
19412            depth: fidl::encoding::Depth,
19413        ) -> fidl::Result<()> {
19414            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19415            // Zero out padding regions. There's no need to apply masks
19416            // because the unmasked parts will be overwritten by fields.
19417            unsafe {
19418                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19419                (ptr as *mut u64).write_unaligned(0);
19420            }
19421            // Write the fields.
19422            self.0.encode(encoder, offset + 0, depth)?;
19423            self.1.encode(encoder, offset + 8, depth)?;
19424            Ok(())
19425        }
19426    }
19427
19428    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19429        for PaddingEndOfInlineObjectBeforeNextObject3Byte
19430    {
19431        #[inline(always)]
19432        fn new_empty() -> Self {
19433            Self {
19434                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19435                in_line: fidl::new_empty!(Struct3Byte, D),
19436            }
19437        }
19438
19439        #[inline]
19440        unsafe fn decode(
19441            &mut self,
19442            decoder: &mut fidl::encoding::Decoder<'_, D>,
19443            offset: usize,
19444            _depth: fidl::encoding::Depth,
19445        ) -> fidl::Result<()> {
19446            decoder.debug_check_bounds::<Self>(offset);
19447            // Verify that padding bytes are zero.
19448            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19449            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19450            let mask = 0xffffffff00000000u64;
19451            let maskedval = padval & mask;
19452            if maskedval != 0 {
19453                return Err(fidl::Error::NonZeroPadding {
19454                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19455                });
19456            }
19457            fidl::decode!(
19458                fidl::encoding::Boxed<Struct8Byte>,
19459                D,
19460                &mut self.out_of_line,
19461                decoder,
19462                offset + 0,
19463                _depth
19464            )?;
19465            fidl::decode!(Struct3Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19466            Ok(())
19467        }
19468    }
19469
19470    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19471        type Borrowed<'a> = &'a Self;
19472        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19473            value
19474        }
19475    }
19476
19477    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19478        type Owned = Self;
19479
19480        #[inline(always)]
19481        fn inline_align(_context: fidl::encoding::Context) -> usize {
19482            8
19483        }
19484
19485        #[inline(always)]
19486        fn inline_size(_context: fidl::encoding::Context) -> usize {
19487            16
19488        }
19489    }
19490
19491    unsafe impl<D: fidl::encoding::ResourceDialect>
19492        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>
19493        for &PaddingEndOfInlineObjectBeforeNextObject4Byte
19494    {
19495        #[inline]
19496        unsafe fn encode(
19497            self,
19498            encoder: &mut fidl::encoding::Encoder<'_, D>,
19499            offset: usize,
19500            _depth: fidl::encoding::Depth,
19501        ) -> fidl::Result<()> {
19502            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19503            // Delegate to tuple encoding.
19504            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>::encode(
19505                (
19506                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19507                        &self.out_of_line,
19508                    ),
19509                    <Struct4Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19510                ),
19511                encoder,
19512                offset,
19513                _depth,
19514            )
19515        }
19516    }
19517    unsafe impl<
19518        D: fidl::encoding::ResourceDialect,
19519        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19520        T1: fidl::encoding::Encode<Struct4Byte, D>,
19521    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D> for (T0, T1)
19522    {
19523        #[inline]
19524        unsafe fn encode(
19525            self,
19526            encoder: &mut fidl::encoding::Encoder<'_, D>,
19527            offset: usize,
19528            depth: fidl::encoding::Depth,
19529        ) -> fidl::Result<()> {
19530            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19531            // Zero out padding regions. There's no need to apply masks
19532            // because the unmasked parts will be overwritten by fields.
19533            unsafe {
19534                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19535                (ptr as *mut u64).write_unaligned(0);
19536            }
19537            // Write the fields.
19538            self.0.encode(encoder, offset + 0, depth)?;
19539            self.1.encode(encoder, offset + 8, depth)?;
19540            Ok(())
19541        }
19542    }
19543
19544    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19545        for PaddingEndOfInlineObjectBeforeNextObject4Byte
19546    {
19547        #[inline(always)]
19548        fn new_empty() -> Self {
19549            Self {
19550                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19551                in_line: fidl::new_empty!(Struct4Byte, D),
19552            }
19553        }
19554
19555        #[inline]
19556        unsafe fn decode(
19557            &mut self,
19558            decoder: &mut fidl::encoding::Decoder<'_, D>,
19559            offset: usize,
19560            _depth: fidl::encoding::Depth,
19561        ) -> fidl::Result<()> {
19562            decoder.debug_check_bounds::<Self>(offset);
19563            // Verify that padding bytes are zero.
19564            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19565            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19566            let mask = 0xffffffff00000000u64;
19567            let maskedval = padval & mask;
19568            if maskedval != 0 {
19569                return Err(fidl::Error::NonZeroPadding {
19570                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19571                });
19572            }
19573            fidl::decode!(
19574                fidl::encoding::Boxed<Struct8Byte>,
19575                D,
19576                &mut self.out_of_line,
19577                decoder,
19578                offset + 0,
19579                _depth
19580            )?;
19581            fidl::decode!(Struct4Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19582            Ok(())
19583        }
19584    }
19585
19586    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19587        type Borrowed<'a> = &'a Self;
19588        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19589            value
19590        }
19591    }
19592
19593    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19594        type Owned = Self;
19595
19596        #[inline(always)]
19597        fn inline_align(_context: fidl::encoding::Context) -> usize {
19598            8
19599        }
19600
19601        #[inline(always)]
19602        fn inline_size(_context: fidl::encoding::Context) -> usize {
19603            16
19604        }
19605    }
19606
19607    unsafe impl<D: fidl::encoding::ResourceDialect>
19608        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>
19609        for &PaddingEndOfInlineObjectBeforeNextObject5Byte
19610    {
19611        #[inline]
19612        unsafe fn encode(
19613            self,
19614            encoder: &mut fidl::encoding::Encoder<'_, D>,
19615            offset: usize,
19616            _depth: fidl::encoding::Depth,
19617        ) -> fidl::Result<()> {
19618            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19619            // Delegate to tuple encoding.
19620            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>::encode(
19621                (
19622                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19623                        &self.out_of_line,
19624                    ),
19625                    <Struct5Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19626                ),
19627                encoder,
19628                offset,
19629                _depth,
19630            )
19631        }
19632    }
19633    unsafe impl<
19634        D: fidl::encoding::ResourceDialect,
19635        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19636        T1: fidl::encoding::Encode<Struct5Byte, D>,
19637    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D> for (T0, T1)
19638    {
19639        #[inline]
19640        unsafe fn encode(
19641            self,
19642            encoder: &mut fidl::encoding::Encoder<'_, D>,
19643            offset: usize,
19644            depth: fidl::encoding::Depth,
19645        ) -> fidl::Result<()> {
19646            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19647            // Zero out padding regions. There's no need to apply masks
19648            // because the unmasked parts will be overwritten by fields.
19649            // Write the fields.
19650            self.0.encode(encoder, offset + 0, depth)?;
19651            self.1.encode(encoder, offset + 8, depth)?;
19652            Ok(())
19653        }
19654    }
19655
19656    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19657        for PaddingEndOfInlineObjectBeforeNextObject5Byte
19658    {
19659        #[inline(always)]
19660        fn new_empty() -> Self {
19661            Self {
19662                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19663                in_line: fidl::new_empty!(Struct5Byte, D),
19664            }
19665        }
19666
19667        #[inline]
19668        unsafe fn decode(
19669            &mut self,
19670            decoder: &mut fidl::encoding::Decoder<'_, D>,
19671            offset: usize,
19672            _depth: fidl::encoding::Depth,
19673        ) -> fidl::Result<()> {
19674            decoder.debug_check_bounds::<Self>(offset);
19675            // Verify that padding bytes are zero.
19676            fidl::decode!(
19677                fidl::encoding::Boxed<Struct8Byte>,
19678                D,
19679                &mut self.out_of_line,
19680                decoder,
19681                offset + 0,
19682                _depth
19683            )?;
19684            fidl::decode!(Struct5Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19685            Ok(())
19686        }
19687    }
19688
19689    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19690        type Borrowed<'a> = &'a Self;
19691        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19692            value
19693        }
19694    }
19695
19696    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19697        type Owned = Self;
19698
19699        #[inline(always)]
19700        fn inline_align(_context: fidl::encoding::Context) -> usize {
19701            8
19702        }
19703
19704        #[inline(always)]
19705        fn inline_size(_context: fidl::encoding::Context) -> usize {
19706            16
19707        }
19708    }
19709
19710    unsafe impl<D: fidl::encoding::ResourceDialect>
19711        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>
19712        for &PaddingEndOfInlineObjectBeforeNextObject6Byte
19713    {
19714        #[inline]
19715        unsafe fn encode(
19716            self,
19717            encoder: &mut fidl::encoding::Encoder<'_, D>,
19718            offset: usize,
19719            _depth: fidl::encoding::Depth,
19720        ) -> fidl::Result<()> {
19721            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19722            // Delegate to tuple encoding.
19723            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>::encode(
19724                (
19725                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19726                        &self.out_of_line,
19727                    ),
19728                    <Struct6Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19729                ),
19730                encoder,
19731                offset,
19732                _depth,
19733            )
19734        }
19735    }
19736    unsafe impl<
19737        D: fidl::encoding::ResourceDialect,
19738        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19739        T1: fidl::encoding::Encode<Struct6Byte, D>,
19740    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D> for (T0, T1)
19741    {
19742        #[inline]
19743        unsafe fn encode(
19744            self,
19745            encoder: &mut fidl::encoding::Encoder<'_, D>,
19746            offset: usize,
19747            depth: fidl::encoding::Depth,
19748        ) -> fidl::Result<()> {
19749            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19750            // Zero out padding regions. There's no need to apply masks
19751            // because the unmasked parts will be overwritten by fields.
19752            // Write the fields.
19753            self.0.encode(encoder, offset + 0, depth)?;
19754            self.1.encode(encoder, offset + 8, depth)?;
19755            Ok(())
19756        }
19757    }
19758
19759    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19760        for PaddingEndOfInlineObjectBeforeNextObject6Byte
19761    {
19762        #[inline(always)]
19763        fn new_empty() -> Self {
19764            Self {
19765                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19766                in_line: fidl::new_empty!(Struct6Byte, D),
19767            }
19768        }
19769
19770        #[inline]
19771        unsafe fn decode(
19772            &mut self,
19773            decoder: &mut fidl::encoding::Decoder<'_, D>,
19774            offset: usize,
19775            _depth: fidl::encoding::Depth,
19776        ) -> fidl::Result<()> {
19777            decoder.debug_check_bounds::<Self>(offset);
19778            // Verify that padding bytes are zero.
19779            fidl::decode!(
19780                fidl::encoding::Boxed<Struct8Byte>,
19781                D,
19782                &mut self.out_of_line,
19783                decoder,
19784                offset + 0,
19785                _depth
19786            )?;
19787            fidl::decode!(Struct6Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19788            Ok(())
19789        }
19790    }
19791
19792    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19793        type Borrowed<'a> = &'a Self;
19794        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19795            value
19796        }
19797    }
19798
19799    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19800        type Owned = Self;
19801
19802        #[inline(always)]
19803        fn inline_align(_context: fidl::encoding::Context) -> usize {
19804            8
19805        }
19806
19807        #[inline(always)]
19808        fn inline_size(_context: fidl::encoding::Context) -> usize {
19809            16
19810        }
19811    }
19812
19813    unsafe impl<D: fidl::encoding::ResourceDialect>
19814        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>
19815        for &PaddingEndOfInlineObjectBeforeNextObject7Byte
19816    {
19817        #[inline]
19818        unsafe fn encode(
19819            self,
19820            encoder: &mut fidl::encoding::Encoder<'_, D>,
19821            offset: usize,
19822            _depth: fidl::encoding::Depth,
19823        ) -> fidl::Result<()> {
19824            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19825            // Delegate to tuple encoding.
19826            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>::encode(
19827                (
19828                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19829                        &self.out_of_line,
19830                    ),
19831                    <Struct7Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19832                ),
19833                encoder,
19834                offset,
19835                _depth,
19836            )
19837        }
19838    }
19839    unsafe impl<
19840        D: fidl::encoding::ResourceDialect,
19841        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19842        T1: fidl::encoding::Encode<Struct7Byte, D>,
19843    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D> for (T0, T1)
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::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19853            // Zero out padding regions. There's no need to apply masks
19854            // because the unmasked parts will be overwritten by fields.
19855            // Write the fields.
19856            self.0.encode(encoder, offset + 0, depth)?;
19857            self.1.encode(encoder, offset + 8, depth)?;
19858            Ok(())
19859        }
19860    }
19861
19862    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19863        for PaddingEndOfInlineObjectBeforeNextObject7Byte
19864    {
19865        #[inline(always)]
19866        fn new_empty() -> Self {
19867            Self {
19868                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19869                in_line: fidl::new_empty!(Struct7Byte, D),
19870            }
19871        }
19872
19873        #[inline]
19874        unsafe fn decode(
19875            &mut self,
19876            decoder: &mut fidl::encoding::Decoder<'_, D>,
19877            offset: usize,
19878            _depth: fidl::encoding::Depth,
19879        ) -> fidl::Result<()> {
19880            decoder.debug_check_bounds::<Self>(offset);
19881            // Verify that padding bytes are zero.
19882            fidl::decode!(
19883                fidl::encoding::Boxed<Struct8Byte>,
19884                D,
19885                &mut self.out_of_line,
19886                decoder,
19887                offset + 0,
19888                _depth
19889            )?;
19890            fidl::decode!(Struct7Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19891            Ok(())
19892        }
19893    }
19894
19895    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject1Byte {
19896        type Borrowed<'a> = &'a Self;
19897        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19898            value
19899        }
19900    }
19901
19902    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject1Byte {
19903        type Owned = Self;
19904
19905        #[inline(always)]
19906        fn inline_align(_context: fidl::encoding::Context) -> usize {
19907            8
19908        }
19909
19910        #[inline(always)]
19911        fn inline_size(_context: fidl::encoding::Context) -> usize {
19912            8
19913        }
19914    }
19915
19916    unsafe impl<D: fidl::encoding::ResourceDialect>
19917        fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D>
19918        for &PaddingEndOfOutOfLineObject1Byte
19919    {
19920        #[inline]
19921        unsafe fn encode(
19922            self,
19923            encoder: &mut fidl::encoding::Encoder<'_, D>,
19924            offset: usize,
19925            _depth: fidl::encoding::Depth,
19926        ) -> fidl::Result<()> {
19927            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19928            // Delegate to tuple encoding.
19929            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject1Byte, D>::encode(
19930                (<fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19931                    &self.out_of_line,
19932                ),),
19933                encoder,
19934                offset,
19935                _depth,
19936            )
19937        }
19938    }
19939    unsafe impl<
19940        D: fidl::encoding::ResourceDialect,
19941        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
19942    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D> for (T0,)
19943    {
19944        #[inline]
19945        unsafe fn encode(
19946            self,
19947            encoder: &mut fidl::encoding::Encoder<'_, D>,
19948            offset: usize,
19949            depth: fidl::encoding::Depth,
19950        ) -> fidl::Result<()> {
19951            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19952            // Zero out padding regions. There's no need to apply masks
19953            // because the unmasked parts will be overwritten by fields.
19954            // Write the fields.
19955            self.0.encode(encoder, offset + 0, depth)?;
19956            Ok(())
19957        }
19958    }
19959
19960    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19961        for PaddingEndOfOutOfLineObject1Byte
19962    {
19963        #[inline(always)]
19964        fn new_empty() -> Self {
19965            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D) }
19966        }
19967
19968        #[inline]
19969        unsafe fn decode(
19970            &mut self,
19971            decoder: &mut fidl::encoding::Decoder<'_, D>,
19972            offset: usize,
19973            _depth: fidl::encoding::Depth,
19974        ) -> fidl::Result<()> {
19975            decoder.debug_check_bounds::<Self>(offset);
19976            // Verify that padding bytes are zero.
19977            fidl::decode!(
19978                fidl::encoding::Boxed<Struct1Byte>,
19979                D,
19980                &mut self.out_of_line,
19981                decoder,
19982                offset + 0,
19983                _depth
19984            )?;
19985            Ok(())
19986        }
19987    }
19988
19989    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject2Byte {
19990        type Borrowed<'a> = &'a Self;
19991        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19992            value
19993        }
19994    }
19995
19996    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject2Byte {
19997        type Owned = Self;
19998
19999        #[inline(always)]
20000        fn inline_align(_context: fidl::encoding::Context) -> usize {
20001            8
20002        }
20003
20004        #[inline(always)]
20005        fn inline_size(_context: fidl::encoding::Context) -> usize {
20006            8
20007        }
20008    }
20009
20010    unsafe impl<D: fidl::encoding::ResourceDialect>
20011        fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D>
20012        for &PaddingEndOfOutOfLineObject2Byte
20013    {
20014        #[inline]
20015        unsafe fn encode(
20016            self,
20017            encoder: &mut fidl::encoding::Encoder<'_, D>,
20018            offset: usize,
20019            _depth: fidl::encoding::Depth,
20020        ) -> fidl::Result<()> {
20021            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
20022            // Delegate to tuple encoding.
20023            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject2Byte, D>::encode(
20024                (<fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20025                    &self.out_of_line,
20026                ),),
20027                encoder,
20028                offset,
20029                _depth,
20030            )
20031        }
20032    }
20033    unsafe impl<
20034        D: fidl::encoding::ResourceDialect,
20035        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
20036    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D> for (T0,)
20037    {
20038        #[inline]
20039        unsafe fn encode(
20040            self,
20041            encoder: &mut fidl::encoding::Encoder<'_, D>,
20042            offset: usize,
20043            depth: fidl::encoding::Depth,
20044        ) -> fidl::Result<()> {
20045            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
20046            // Zero out padding regions. There's no need to apply masks
20047            // because the unmasked parts will be overwritten by fields.
20048            // Write the fields.
20049            self.0.encode(encoder, offset + 0, depth)?;
20050            Ok(())
20051        }
20052    }
20053
20054    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20055        for PaddingEndOfOutOfLineObject2Byte
20056    {
20057        #[inline(always)]
20058        fn new_empty() -> Self {
20059            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D) }
20060        }
20061
20062        #[inline]
20063        unsafe fn decode(
20064            &mut self,
20065            decoder: &mut fidl::encoding::Decoder<'_, D>,
20066            offset: usize,
20067            _depth: fidl::encoding::Depth,
20068        ) -> fidl::Result<()> {
20069            decoder.debug_check_bounds::<Self>(offset);
20070            // Verify that padding bytes are zero.
20071            fidl::decode!(
20072                fidl::encoding::Boxed<Struct2Byte>,
20073                D,
20074                &mut self.out_of_line,
20075                decoder,
20076                offset + 0,
20077                _depth
20078            )?;
20079            Ok(())
20080        }
20081    }
20082
20083    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject3Byte {
20084        type Borrowed<'a> = &'a Self;
20085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20086            value
20087        }
20088    }
20089
20090    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject3Byte {
20091        type Owned = Self;
20092
20093        #[inline(always)]
20094        fn inline_align(_context: fidl::encoding::Context) -> usize {
20095            8
20096        }
20097
20098        #[inline(always)]
20099        fn inline_size(_context: fidl::encoding::Context) -> usize {
20100            8
20101        }
20102    }
20103
20104    unsafe impl<D: fidl::encoding::ResourceDialect>
20105        fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D>
20106        for &PaddingEndOfOutOfLineObject3Byte
20107    {
20108        #[inline]
20109        unsafe fn encode(
20110            self,
20111            encoder: &mut fidl::encoding::Encoder<'_, D>,
20112            offset: usize,
20113            _depth: fidl::encoding::Depth,
20114        ) -> fidl::Result<()> {
20115            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
20116            // Delegate to tuple encoding.
20117            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject3Byte, D>::encode(
20118                (<fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20119                    &self.out_of_line,
20120                ),),
20121                encoder,
20122                offset,
20123                _depth,
20124            )
20125        }
20126    }
20127    unsafe impl<
20128        D: fidl::encoding::ResourceDialect,
20129        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
20130    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D> for (T0,)
20131    {
20132        #[inline]
20133        unsafe fn encode(
20134            self,
20135            encoder: &mut fidl::encoding::Encoder<'_, D>,
20136            offset: usize,
20137            depth: fidl::encoding::Depth,
20138        ) -> fidl::Result<()> {
20139            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
20140            // Zero out padding regions. There's no need to apply masks
20141            // because the unmasked parts will be overwritten by fields.
20142            // Write the fields.
20143            self.0.encode(encoder, offset + 0, depth)?;
20144            Ok(())
20145        }
20146    }
20147
20148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20149        for PaddingEndOfOutOfLineObject3Byte
20150    {
20151        #[inline(always)]
20152        fn new_empty() -> Self {
20153            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D) }
20154        }
20155
20156        #[inline]
20157        unsafe fn decode(
20158            &mut self,
20159            decoder: &mut fidl::encoding::Decoder<'_, D>,
20160            offset: usize,
20161            _depth: fidl::encoding::Depth,
20162        ) -> fidl::Result<()> {
20163            decoder.debug_check_bounds::<Self>(offset);
20164            // Verify that padding bytes are zero.
20165            fidl::decode!(
20166                fidl::encoding::Boxed<Struct3Byte>,
20167                D,
20168                &mut self.out_of_line,
20169                decoder,
20170                offset + 0,
20171                _depth
20172            )?;
20173            Ok(())
20174        }
20175    }
20176
20177    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject4Byte {
20178        type Borrowed<'a> = &'a Self;
20179        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20180            value
20181        }
20182    }
20183
20184    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject4Byte {
20185        type Owned = Self;
20186
20187        #[inline(always)]
20188        fn inline_align(_context: fidl::encoding::Context) -> usize {
20189            8
20190        }
20191
20192        #[inline(always)]
20193        fn inline_size(_context: fidl::encoding::Context) -> usize {
20194            8
20195        }
20196    }
20197
20198    unsafe impl<D: fidl::encoding::ResourceDialect>
20199        fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D>
20200        for &PaddingEndOfOutOfLineObject4Byte
20201    {
20202        #[inline]
20203        unsafe fn encode(
20204            self,
20205            encoder: &mut fidl::encoding::Encoder<'_, D>,
20206            offset: usize,
20207            _depth: fidl::encoding::Depth,
20208        ) -> fidl::Result<()> {
20209            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20210            // Delegate to tuple encoding.
20211            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject4Byte, D>::encode(
20212                (<fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20213                    &self.out_of_line,
20214                ),),
20215                encoder,
20216                offset,
20217                _depth,
20218            )
20219        }
20220    }
20221    unsafe impl<
20222        D: fidl::encoding::ResourceDialect,
20223        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20224    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D> for (T0,)
20225    {
20226        #[inline]
20227        unsafe fn encode(
20228            self,
20229            encoder: &mut fidl::encoding::Encoder<'_, D>,
20230            offset: usize,
20231            depth: fidl::encoding::Depth,
20232        ) -> fidl::Result<()> {
20233            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20234            // Zero out padding regions. There's no need to apply masks
20235            // because the unmasked parts will be overwritten by fields.
20236            // Write the fields.
20237            self.0.encode(encoder, offset + 0, depth)?;
20238            Ok(())
20239        }
20240    }
20241
20242    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20243        for PaddingEndOfOutOfLineObject4Byte
20244    {
20245        #[inline(always)]
20246        fn new_empty() -> Self {
20247            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D) }
20248        }
20249
20250        #[inline]
20251        unsafe fn decode(
20252            &mut self,
20253            decoder: &mut fidl::encoding::Decoder<'_, D>,
20254            offset: usize,
20255            _depth: fidl::encoding::Depth,
20256        ) -> fidl::Result<()> {
20257            decoder.debug_check_bounds::<Self>(offset);
20258            // Verify that padding bytes are zero.
20259            fidl::decode!(
20260                fidl::encoding::Boxed<Struct4Byte>,
20261                D,
20262                &mut self.out_of_line,
20263                decoder,
20264                offset + 0,
20265                _depth
20266            )?;
20267            Ok(())
20268        }
20269    }
20270
20271    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject5Byte {
20272        type Borrowed<'a> = &'a Self;
20273        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20274            value
20275        }
20276    }
20277
20278    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject5Byte {
20279        type Owned = Self;
20280
20281        #[inline(always)]
20282        fn inline_align(_context: fidl::encoding::Context) -> usize {
20283            8
20284        }
20285
20286        #[inline(always)]
20287        fn inline_size(_context: fidl::encoding::Context) -> usize {
20288            8
20289        }
20290    }
20291
20292    unsafe impl<D: fidl::encoding::ResourceDialect>
20293        fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D>
20294        for &PaddingEndOfOutOfLineObject5Byte
20295    {
20296        #[inline]
20297        unsafe fn encode(
20298            self,
20299            encoder: &mut fidl::encoding::Encoder<'_, D>,
20300            offset: usize,
20301            _depth: fidl::encoding::Depth,
20302        ) -> fidl::Result<()> {
20303            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20304            // Delegate to tuple encoding.
20305            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject5Byte, D>::encode(
20306                (<fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20307                    &self.out_of_line,
20308                ),),
20309                encoder,
20310                offset,
20311                _depth,
20312            )
20313        }
20314    }
20315    unsafe impl<
20316        D: fidl::encoding::ResourceDialect,
20317        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
20318    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D> for (T0,)
20319    {
20320        #[inline]
20321        unsafe fn encode(
20322            self,
20323            encoder: &mut fidl::encoding::Encoder<'_, D>,
20324            offset: usize,
20325            depth: fidl::encoding::Depth,
20326        ) -> fidl::Result<()> {
20327            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20328            // Zero out padding regions. There's no need to apply masks
20329            // because the unmasked parts will be overwritten by fields.
20330            // Write the fields.
20331            self.0.encode(encoder, offset + 0, depth)?;
20332            Ok(())
20333        }
20334    }
20335
20336    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20337        for PaddingEndOfOutOfLineObject5Byte
20338    {
20339        #[inline(always)]
20340        fn new_empty() -> Self {
20341            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D) }
20342        }
20343
20344        #[inline]
20345        unsafe fn decode(
20346            &mut self,
20347            decoder: &mut fidl::encoding::Decoder<'_, D>,
20348            offset: usize,
20349            _depth: fidl::encoding::Depth,
20350        ) -> fidl::Result<()> {
20351            decoder.debug_check_bounds::<Self>(offset);
20352            // Verify that padding bytes are zero.
20353            fidl::decode!(
20354                fidl::encoding::Boxed<Struct5Byte>,
20355                D,
20356                &mut self.out_of_line,
20357                decoder,
20358                offset + 0,
20359                _depth
20360            )?;
20361            Ok(())
20362        }
20363    }
20364
20365    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject6Byte {
20366        type Borrowed<'a> = &'a Self;
20367        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20368            value
20369        }
20370    }
20371
20372    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject6Byte {
20373        type Owned = Self;
20374
20375        #[inline(always)]
20376        fn inline_align(_context: fidl::encoding::Context) -> usize {
20377            8
20378        }
20379
20380        #[inline(always)]
20381        fn inline_size(_context: fidl::encoding::Context) -> usize {
20382            8
20383        }
20384    }
20385
20386    unsafe impl<D: fidl::encoding::ResourceDialect>
20387        fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D>
20388        for &PaddingEndOfOutOfLineObject6Byte
20389    {
20390        #[inline]
20391        unsafe fn encode(
20392            self,
20393            encoder: &mut fidl::encoding::Encoder<'_, D>,
20394            offset: usize,
20395            _depth: fidl::encoding::Depth,
20396        ) -> fidl::Result<()> {
20397            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20398            // Delegate to tuple encoding.
20399            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject6Byte, D>::encode(
20400                (<fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20401                    &self.out_of_line,
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<Struct6Byte>, D>,
20412    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D> for (T0,)
20413    {
20414        #[inline]
20415        unsafe fn encode(
20416            self,
20417            encoder: &mut fidl::encoding::Encoder<'_, D>,
20418            offset: usize,
20419            depth: fidl::encoding::Depth,
20420        ) -> fidl::Result<()> {
20421            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20422            // Zero out padding regions. There's no need to apply masks
20423            // because the unmasked parts will be overwritten by fields.
20424            // Write the fields.
20425            self.0.encode(encoder, offset + 0, depth)?;
20426            Ok(())
20427        }
20428    }
20429
20430    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20431        for PaddingEndOfOutOfLineObject6Byte
20432    {
20433        #[inline(always)]
20434        fn new_empty() -> Self {
20435            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D) }
20436        }
20437
20438        #[inline]
20439        unsafe fn decode(
20440            &mut self,
20441            decoder: &mut fidl::encoding::Decoder<'_, D>,
20442            offset: usize,
20443            _depth: fidl::encoding::Depth,
20444        ) -> fidl::Result<()> {
20445            decoder.debug_check_bounds::<Self>(offset);
20446            // Verify that padding bytes are zero.
20447            fidl::decode!(
20448                fidl::encoding::Boxed<Struct6Byte>,
20449                D,
20450                &mut self.out_of_line,
20451                decoder,
20452                offset + 0,
20453                _depth
20454            )?;
20455            Ok(())
20456        }
20457    }
20458
20459    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject7Byte {
20460        type Borrowed<'a> = &'a Self;
20461        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20462            value
20463        }
20464    }
20465
20466    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject7Byte {
20467        type Owned = Self;
20468
20469        #[inline(always)]
20470        fn inline_align(_context: fidl::encoding::Context) -> usize {
20471            8
20472        }
20473
20474        #[inline(always)]
20475        fn inline_size(_context: fidl::encoding::Context) -> usize {
20476            8
20477        }
20478    }
20479
20480    unsafe impl<D: fidl::encoding::ResourceDialect>
20481        fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D>
20482        for &PaddingEndOfOutOfLineObject7Byte
20483    {
20484        #[inline]
20485        unsafe fn encode(
20486            self,
20487            encoder: &mut fidl::encoding::Encoder<'_, D>,
20488            offset: usize,
20489            _depth: fidl::encoding::Depth,
20490        ) -> fidl::Result<()> {
20491            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20492            // Delegate to tuple encoding.
20493            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject7Byte, D>::encode(
20494                (<fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20495                    &self.out_of_line,
20496                ),),
20497                encoder,
20498                offset,
20499                _depth,
20500            )
20501        }
20502    }
20503    unsafe impl<
20504        D: fidl::encoding::ResourceDialect,
20505        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
20506    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D> for (T0,)
20507    {
20508        #[inline]
20509        unsafe fn encode(
20510            self,
20511            encoder: &mut fidl::encoding::Encoder<'_, D>,
20512            offset: usize,
20513            depth: fidl::encoding::Depth,
20514        ) -> fidl::Result<()> {
20515            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20516            // Zero out padding regions. There's no need to apply masks
20517            // because the unmasked parts will be overwritten by fields.
20518            // Write the fields.
20519            self.0.encode(encoder, offset + 0, depth)?;
20520            Ok(())
20521        }
20522    }
20523
20524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20525        for PaddingEndOfOutOfLineObject7Byte
20526    {
20527        #[inline(always)]
20528        fn new_empty() -> Self {
20529            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D) }
20530        }
20531
20532        #[inline]
20533        unsafe fn decode(
20534            &mut self,
20535            decoder: &mut fidl::encoding::Decoder<'_, D>,
20536            offset: usize,
20537            _depth: fidl::encoding::Depth,
20538        ) -> fidl::Result<()> {
20539            decoder.debug_check_bounds::<Self>(offset);
20540            // Verify that padding bytes are zero.
20541            fidl::decode!(
20542                fidl::encoding::Boxed<Struct7Byte>,
20543                D,
20544                &mut self.out_of_line,
20545                decoder,
20546                offset + 0,
20547                _depth
20548            )?;
20549            Ok(())
20550        }
20551    }
20552
20553    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20554        type Borrowed<'a> = &'a Self;
20555        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20556            value
20557        }
20558    }
20559
20560    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20561        type Owned = Self;
20562
20563        #[inline(always)]
20564        fn inline_align(_context: fidl::encoding::Context) -> usize {
20565            8
20566        }
20567
20568        #[inline(always)]
20569        fn inline_size(_context: fidl::encoding::Context) -> usize {
20570            16
20571        }
20572    }
20573
20574    unsafe impl<D: fidl::encoding::ResourceDialect>
20575        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D>
20576        for &PaddingInBetweenOutOfLineObjects1Byte
20577    {
20578        #[inline]
20579        unsafe fn encode(
20580            self,
20581            encoder: &mut fidl::encoding::Encoder<'_, D>,
20582            offset: usize,
20583            _depth: fidl::encoding::Depth,
20584        ) -> fidl::Result<()> {
20585            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20586            // Delegate to tuple encoding.
20587            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects1Byte, D>::encode(
20588                (
20589                    <fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20590                        &self.first,
20591                    ),
20592                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20593                        &self.second,
20594                    ),
20595                ),
20596                encoder,
20597                offset,
20598                _depth,
20599            )
20600        }
20601    }
20602    unsafe impl<
20603        D: fidl::encoding::ResourceDialect,
20604        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
20605        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20606    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D> for (T0, T1)
20607    {
20608        #[inline]
20609        unsafe fn encode(
20610            self,
20611            encoder: &mut fidl::encoding::Encoder<'_, D>,
20612            offset: usize,
20613            depth: fidl::encoding::Depth,
20614        ) -> fidl::Result<()> {
20615            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20616            // Zero out padding regions. There's no need to apply masks
20617            // because the unmasked parts will be overwritten by fields.
20618            // Write the fields.
20619            self.0.encode(encoder, offset + 0, depth)?;
20620            self.1.encode(encoder, offset + 8, depth)?;
20621            Ok(())
20622        }
20623    }
20624
20625    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20626        for PaddingInBetweenOutOfLineObjects1Byte
20627    {
20628        #[inline(always)]
20629        fn new_empty() -> Self {
20630            Self {
20631                first: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D),
20632                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20633            }
20634        }
20635
20636        #[inline]
20637        unsafe fn decode(
20638            &mut self,
20639            decoder: &mut fidl::encoding::Decoder<'_, D>,
20640            offset: usize,
20641            _depth: fidl::encoding::Depth,
20642        ) -> fidl::Result<()> {
20643            decoder.debug_check_bounds::<Self>(offset);
20644            // Verify that padding bytes are zero.
20645            fidl::decode!(
20646                fidl::encoding::Boxed<Struct1Byte>,
20647                D,
20648                &mut self.first,
20649                decoder,
20650                offset + 0,
20651                _depth
20652            )?;
20653            fidl::decode!(
20654                fidl::encoding::Boxed<Struct8Byte>,
20655                D,
20656                &mut self.second,
20657                decoder,
20658                offset + 8,
20659                _depth
20660            )?;
20661            Ok(())
20662        }
20663    }
20664
20665    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20666        type Borrowed<'a> = &'a Self;
20667        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20668            value
20669        }
20670    }
20671
20672    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20673        type Owned = Self;
20674
20675        #[inline(always)]
20676        fn inline_align(_context: fidl::encoding::Context) -> usize {
20677            8
20678        }
20679
20680        #[inline(always)]
20681        fn inline_size(_context: fidl::encoding::Context) -> usize {
20682            16
20683        }
20684    }
20685
20686    unsafe impl<D: fidl::encoding::ResourceDialect>
20687        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D>
20688        for &PaddingInBetweenOutOfLineObjects2Byte
20689    {
20690        #[inline]
20691        unsafe fn encode(
20692            self,
20693            encoder: &mut fidl::encoding::Encoder<'_, D>,
20694            offset: usize,
20695            _depth: fidl::encoding::Depth,
20696        ) -> fidl::Result<()> {
20697            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20698            // Delegate to tuple encoding.
20699            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects2Byte, D>::encode(
20700                (
20701                    <fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20702                        &self.first,
20703                    ),
20704                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20705                        &self.second,
20706                    ),
20707                ),
20708                encoder,
20709                offset,
20710                _depth,
20711            )
20712        }
20713    }
20714    unsafe impl<
20715        D: fidl::encoding::ResourceDialect,
20716        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
20717        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20718    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D> for (T0, T1)
20719    {
20720        #[inline]
20721        unsafe fn encode(
20722            self,
20723            encoder: &mut fidl::encoding::Encoder<'_, D>,
20724            offset: usize,
20725            depth: fidl::encoding::Depth,
20726        ) -> fidl::Result<()> {
20727            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20728            // Zero out padding regions. There's no need to apply masks
20729            // because the unmasked parts will be overwritten by fields.
20730            // Write the fields.
20731            self.0.encode(encoder, offset + 0, depth)?;
20732            self.1.encode(encoder, offset + 8, depth)?;
20733            Ok(())
20734        }
20735    }
20736
20737    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20738        for PaddingInBetweenOutOfLineObjects2Byte
20739    {
20740        #[inline(always)]
20741        fn new_empty() -> Self {
20742            Self {
20743                first: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D),
20744                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20745            }
20746        }
20747
20748        #[inline]
20749        unsafe fn decode(
20750            &mut self,
20751            decoder: &mut fidl::encoding::Decoder<'_, D>,
20752            offset: usize,
20753            _depth: fidl::encoding::Depth,
20754        ) -> fidl::Result<()> {
20755            decoder.debug_check_bounds::<Self>(offset);
20756            // Verify that padding bytes are zero.
20757            fidl::decode!(
20758                fidl::encoding::Boxed<Struct2Byte>,
20759                D,
20760                &mut self.first,
20761                decoder,
20762                offset + 0,
20763                _depth
20764            )?;
20765            fidl::decode!(
20766                fidl::encoding::Boxed<Struct8Byte>,
20767                D,
20768                &mut self.second,
20769                decoder,
20770                offset + 8,
20771                _depth
20772            )?;
20773            Ok(())
20774        }
20775    }
20776
20777    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20778        type Borrowed<'a> = &'a Self;
20779        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20780            value
20781        }
20782    }
20783
20784    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20785        type Owned = Self;
20786
20787        #[inline(always)]
20788        fn inline_align(_context: fidl::encoding::Context) -> usize {
20789            8
20790        }
20791
20792        #[inline(always)]
20793        fn inline_size(_context: fidl::encoding::Context) -> usize {
20794            16
20795        }
20796    }
20797
20798    unsafe impl<D: fidl::encoding::ResourceDialect>
20799        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D>
20800        for &PaddingInBetweenOutOfLineObjects3Byte
20801    {
20802        #[inline]
20803        unsafe fn encode(
20804            self,
20805            encoder: &mut fidl::encoding::Encoder<'_, D>,
20806            offset: usize,
20807            _depth: fidl::encoding::Depth,
20808        ) -> fidl::Result<()> {
20809            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20810            // Delegate to tuple encoding.
20811            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects3Byte, D>::encode(
20812                (
20813                    <fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20814                        &self.first,
20815                    ),
20816                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20817                        &self.second,
20818                    ),
20819                ),
20820                encoder,
20821                offset,
20822                _depth,
20823            )
20824        }
20825    }
20826    unsafe impl<
20827        D: fidl::encoding::ResourceDialect,
20828        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
20829        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20830    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D> for (T0, T1)
20831    {
20832        #[inline]
20833        unsafe fn encode(
20834            self,
20835            encoder: &mut fidl::encoding::Encoder<'_, D>,
20836            offset: usize,
20837            depth: fidl::encoding::Depth,
20838        ) -> fidl::Result<()> {
20839            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20840            // Zero out padding regions. There's no need to apply masks
20841            // because the unmasked parts will be overwritten by fields.
20842            // Write the fields.
20843            self.0.encode(encoder, offset + 0, depth)?;
20844            self.1.encode(encoder, offset + 8, depth)?;
20845            Ok(())
20846        }
20847    }
20848
20849    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20850        for PaddingInBetweenOutOfLineObjects3Byte
20851    {
20852        #[inline(always)]
20853        fn new_empty() -> Self {
20854            Self {
20855                first: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D),
20856                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20857            }
20858        }
20859
20860        #[inline]
20861        unsafe fn decode(
20862            &mut self,
20863            decoder: &mut fidl::encoding::Decoder<'_, D>,
20864            offset: usize,
20865            _depth: fidl::encoding::Depth,
20866        ) -> fidl::Result<()> {
20867            decoder.debug_check_bounds::<Self>(offset);
20868            // Verify that padding bytes are zero.
20869            fidl::decode!(
20870                fidl::encoding::Boxed<Struct3Byte>,
20871                D,
20872                &mut self.first,
20873                decoder,
20874                offset + 0,
20875                _depth
20876            )?;
20877            fidl::decode!(
20878                fidl::encoding::Boxed<Struct8Byte>,
20879                D,
20880                &mut self.second,
20881                decoder,
20882                offset + 8,
20883                _depth
20884            )?;
20885            Ok(())
20886        }
20887    }
20888
20889    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20890        type Borrowed<'a> = &'a Self;
20891        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20892            value
20893        }
20894    }
20895
20896    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20897        type Owned = Self;
20898
20899        #[inline(always)]
20900        fn inline_align(_context: fidl::encoding::Context) -> usize {
20901            8
20902        }
20903
20904        #[inline(always)]
20905        fn inline_size(_context: fidl::encoding::Context) -> usize {
20906            16
20907        }
20908    }
20909
20910    unsafe impl<D: fidl::encoding::ResourceDialect>
20911        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D>
20912        for &PaddingInBetweenOutOfLineObjects4Byte
20913    {
20914        #[inline]
20915        unsafe fn encode(
20916            self,
20917            encoder: &mut fidl::encoding::Encoder<'_, D>,
20918            offset: usize,
20919            _depth: fidl::encoding::Depth,
20920        ) -> fidl::Result<()> {
20921            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20922            // Delegate to tuple encoding.
20923            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects4Byte, D>::encode(
20924                (
20925                    <fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20926                        &self.first,
20927                    ),
20928                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20929                        &self.second,
20930                    ),
20931                ),
20932                encoder,
20933                offset,
20934                _depth,
20935            )
20936        }
20937    }
20938    unsafe impl<
20939        D: fidl::encoding::ResourceDialect,
20940        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20941        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20942    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D> for (T0, T1)
20943    {
20944        #[inline]
20945        unsafe fn encode(
20946            self,
20947            encoder: &mut fidl::encoding::Encoder<'_, D>,
20948            offset: usize,
20949            depth: fidl::encoding::Depth,
20950        ) -> fidl::Result<()> {
20951            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20952            // Zero out padding regions. There's no need to apply masks
20953            // because the unmasked parts will be overwritten by fields.
20954            // Write the fields.
20955            self.0.encode(encoder, offset + 0, depth)?;
20956            self.1.encode(encoder, offset + 8, depth)?;
20957            Ok(())
20958        }
20959    }
20960
20961    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20962        for PaddingInBetweenOutOfLineObjects4Byte
20963    {
20964        #[inline(always)]
20965        fn new_empty() -> Self {
20966            Self {
20967                first: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D),
20968                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20969            }
20970        }
20971
20972        #[inline]
20973        unsafe fn decode(
20974            &mut self,
20975            decoder: &mut fidl::encoding::Decoder<'_, D>,
20976            offset: usize,
20977            _depth: fidl::encoding::Depth,
20978        ) -> fidl::Result<()> {
20979            decoder.debug_check_bounds::<Self>(offset);
20980            // Verify that padding bytes are zero.
20981            fidl::decode!(
20982                fidl::encoding::Boxed<Struct4Byte>,
20983                D,
20984                &mut self.first,
20985                decoder,
20986                offset + 0,
20987                _depth
20988            )?;
20989            fidl::decode!(
20990                fidl::encoding::Boxed<Struct8Byte>,
20991                D,
20992                &mut self.second,
20993                decoder,
20994                offset + 8,
20995                _depth
20996            )?;
20997            Ok(())
20998        }
20999    }
21000
21001    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
21002        type Borrowed<'a> = &'a Self;
21003        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21004            value
21005        }
21006    }
21007
21008    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
21009        type Owned = Self;
21010
21011        #[inline(always)]
21012        fn inline_align(_context: fidl::encoding::Context) -> usize {
21013            8
21014        }
21015
21016        #[inline(always)]
21017        fn inline_size(_context: fidl::encoding::Context) -> usize {
21018            16
21019        }
21020    }
21021
21022    unsafe impl<D: fidl::encoding::ResourceDialect>
21023        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D>
21024        for &PaddingInBetweenOutOfLineObjects5Byte
21025    {
21026        #[inline]
21027        unsafe fn encode(
21028            self,
21029            encoder: &mut fidl::encoding::Encoder<'_, D>,
21030            offset: usize,
21031            _depth: fidl::encoding::Depth,
21032        ) -> fidl::Result<()> {
21033            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
21034            // Delegate to tuple encoding.
21035            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects5Byte, D>::encode(
21036                (
21037                    <fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21038                        &self.first,
21039                    ),
21040                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21041                        &self.second,
21042                    ),
21043                ),
21044                encoder,
21045                offset,
21046                _depth,
21047            )
21048        }
21049    }
21050    unsafe impl<
21051        D: fidl::encoding::ResourceDialect,
21052        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
21053        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21054    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D> for (T0, T1)
21055    {
21056        #[inline]
21057        unsafe fn encode(
21058            self,
21059            encoder: &mut fidl::encoding::Encoder<'_, D>,
21060            offset: usize,
21061            depth: fidl::encoding::Depth,
21062        ) -> fidl::Result<()> {
21063            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
21064            // Zero out padding regions. There's no need to apply masks
21065            // because the unmasked parts will be overwritten by fields.
21066            // Write the fields.
21067            self.0.encode(encoder, offset + 0, depth)?;
21068            self.1.encode(encoder, offset + 8, depth)?;
21069            Ok(())
21070        }
21071    }
21072
21073    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21074        for PaddingInBetweenOutOfLineObjects5Byte
21075    {
21076        #[inline(always)]
21077        fn new_empty() -> Self {
21078            Self {
21079                first: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D),
21080                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21081            }
21082        }
21083
21084        #[inline]
21085        unsafe fn decode(
21086            &mut self,
21087            decoder: &mut fidl::encoding::Decoder<'_, D>,
21088            offset: usize,
21089            _depth: fidl::encoding::Depth,
21090        ) -> fidl::Result<()> {
21091            decoder.debug_check_bounds::<Self>(offset);
21092            // Verify that padding bytes are zero.
21093            fidl::decode!(
21094                fidl::encoding::Boxed<Struct5Byte>,
21095                D,
21096                &mut self.first,
21097                decoder,
21098                offset + 0,
21099                _depth
21100            )?;
21101            fidl::decode!(
21102                fidl::encoding::Boxed<Struct8Byte>,
21103                D,
21104                &mut self.second,
21105                decoder,
21106                offset + 8,
21107                _depth
21108            )?;
21109            Ok(())
21110        }
21111    }
21112
21113    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
21114        type Borrowed<'a> = &'a Self;
21115        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21116            value
21117        }
21118    }
21119
21120    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
21121        type Owned = Self;
21122
21123        #[inline(always)]
21124        fn inline_align(_context: fidl::encoding::Context) -> usize {
21125            8
21126        }
21127
21128        #[inline(always)]
21129        fn inline_size(_context: fidl::encoding::Context) -> usize {
21130            16
21131        }
21132    }
21133
21134    unsafe impl<D: fidl::encoding::ResourceDialect>
21135        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D>
21136        for &PaddingInBetweenOutOfLineObjects6Byte
21137    {
21138        #[inline]
21139        unsafe fn encode(
21140            self,
21141            encoder: &mut fidl::encoding::Encoder<'_, D>,
21142            offset: usize,
21143            _depth: fidl::encoding::Depth,
21144        ) -> fidl::Result<()> {
21145            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
21146            // Delegate to tuple encoding.
21147            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects6Byte, D>::encode(
21148                (
21149                    <fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21150                        &self.first,
21151                    ),
21152                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21153                        &self.second,
21154                    ),
21155                ),
21156                encoder,
21157                offset,
21158                _depth,
21159            )
21160        }
21161    }
21162    unsafe impl<
21163        D: fidl::encoding::ResourceDialect,
21164        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
21165        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21166    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D> for (T0, T1)
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::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
21176            // Zero out padding regions. There's no need to apply masks
21177            // because the unmasked parts will be overwritten by fields.
21178            // Write the fields.
21179            self.0.encode(encoder, offset + 0, depth)?;
21180            self.1.encode(encoder, offset + 8, depth)?;
21181            Ok(())
21182        }
21183    }
21184
21185    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21186        for PaddingInBetweenOutOfLineObjects6Byte
21187    {
21188        #[inline(always)]
21189        fn new_empty() -> Self {
21190            Self {
21191                first: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D),
21192                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21193            }
21194        }
21195
21196        #[inline]
21197        unsafe fn decode(
21198            &mut self,
21199            decoder: &mut fidl::encoding::Decoder<'_, D>,
21200            offset: usize,
21201            _depth: fidl::encoding::Depth,
21202        ) -> fidl::Result<()> {
21203            decoder.debug_check_bounds::<Self>(offset);
21204            // Verify that padding bytes are zero.
21205            fidl::decode!(
21206                fidl::encoding::Boxed<Struct6Byte>,
21207                D,
21208                &mut self.first,
21209                decoder,
21210                offset + 0,
21211                _depth
21212            )?;
21213            fidl::decode!(
21214                fidl::encoding::Boxed<Struct8Byte>,
21215                D,
21216                &mut self.second,
21217                decoder,
21218                offset + 8,
21219                _depth
21220            )?;
21221            Ok(())
21222        }
21223    }
21224
21225    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21226        type Borrowed<'a> = &'a Self;
21227        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21228            value
21229        }
21230    }
21231
21232    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21233        type Owned = Self;
21234
21235        #[inline(always)]
21236        fn inline_align(_context: fidl::encoding::Context) -> usize {
21237            8
21238        }
21239
21240        #[inline(always)]
21241        fn inline_size(_context: fidl::encoding::Context) -> usize {
21242            16
21243        }
21244    }
21245
21246    unsafe impl<D: fidl::encoding::ResourceDialect>
21247        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D>
21248        for &PaddingInBetweenOutOfLineObjects7Byte
21249    {
21250        #[inline]
21251        unsafe fn encode(
21252            self,
21253            encoder: &mut fidl::encoding::Encoder<'_, D>,
21254            offset: usize,
21255            _depth: fidl::encoding::Depth,
21256        ) -> fidl::Result<()> {
21257            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21258            // Delegate to tuple encoding.
21259            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects7Byte, D>::encode(
21260                (
21261                    <fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21262                        &self.first,
21263                    ),
21264                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21265                        &self.second,
21266                    ),
21267                ),
21268                encoder,
21269                offset,
21270                _depth,
21271            )
21272        }
21273    }
21274    unsafe impl<
21275        D: fidl::encoding::ResourceDialect,
21276        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
21277        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21278    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D> for (T0, T1)
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::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21288            // Zero out padding regions. There's no need to apply masks
21289            // because the unmasked parts will be overwritten by fields.
21290            // Write the fields.
21291            self.0.encode(encoder, offset + 0, depth)?;
21292            self.1.encode(encoder, offset + 8, depth)?;
21293            Ok(())
21294        }
21295    }
21296
21297    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21298        for PaddingInBetweenOutOfLineObjects7Byte
21299    {
21300        #[inline(always)]
21301        fn new_empty() -> Self {
21302            Self {
21303                first: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D),
21304                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21305            }
21306        }
21307
21308        #[inline]
21309        unsafe fn decode(
21310            &mut self,
21311            decoder: &mut fidl::encoding::Decoder<'_, D>,
21312            offset: usize,
21313            _depth: fidl::encoding::Depth,
21314        ) -> fidl::Result<()> {
21315            decoder.debug_check_bounds::<Self>(offset);
21316            // Verify that padding bytes are zero.
21317            fidl::decode!(
21318                fidl::encoding::Boxed<Struct7Byte>,
21319                D,
21320                &mut self.first,
21321                decoder,
21322                offset + 0,
21323                _depth
21324            )?;
21325            fidl::decode!(
21326                fidl::encoding::Boxed<Struct8Byte>,
21327                D,
21328                &mut self.second,
21329                decoder,
21330                offset + 8,
21331                _depth
21332            )?;
21333            Ok(())
21334        }
21335    }
21336
21337    impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStruct {
21338        type Borrowed<'a> = &'a Self;
21339        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21340            value
21341        }
21342    }
21343
21344    unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStruct {
21345        type Owned = Self;
21346
21347        #[inline(always)]
21348        fn inline_align(_context: fidl::encoding::Context) -> usize {
21349            8
21350        }
21351
21352        #[inline(always)]
21353        fn inline_size(_context: fidl::encoding::Context) -> usize {
21354            8
21355        }
21356    }
21357
21358    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveEmptyStruct, D>
21359        for &RecursiveEmptyStruct
21360    {
21361        #[inline]
21362        unsafe fn encode(
21363            self,
21364            encoder: &mut fidl::encoding::Encoder<'_, D>,
21365            offset: usize,
21366            _depth: fidl::encoding::Depth,
21367        ) -> fidl::Result<()> {
21368            encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21369            // Delegate to tuple encoding.
21370            fidl::encoding::Encode::<RecursiveEmptyStruct, D>::encode(
21371                (
21372                    <fidl::encoding::Boxed<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21373                ),
21374                encoder, offset, _depth
21375            )
21376        }
21377    }
21378    unsafe impl<
21379        D: fidl::encoding::ResourceDialect,
21380        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveEmptyStruct>, D>,
21381    > fidl::encoding::Encode<RecursiveEmptyStruct, D> for (T0,)
21382    {
21383        #[inline]
21384        unsafe fn encode(
21385            self,
21386            encoder: &mut fidl::encoding::Encoder<'_, D>,
21387            offset: usize,
21388            depth: fidl::encoding::Depth,
21389        ) -> fidl::Result<()> {
21390            encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21391            // Zero out padding regions. There's no need to apply masks
21392            // because the unmasked parts will be overwritten by fields.
21393            // Write the fields.
21394            self.0.encode(encoder, offset + 0, depth)?;
21395            Ok(())
21396        }
21397    }
21398
21399    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveEmptyStruct {
21400        #[inline(always)]
21401        fn new_empty() -> Self {
21402            Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveEmptyStruct>, D) }
21403        }
21404
21405        #[inline]
21406        unsafe fn decode(
21407            &mut self,
21408            decoder: &mut fidl::encoding::Decoder<'_, D>,
21409            offset: usize,
21410            _depth: fidl::encoding::Depth,
21411        ) -> fidl::Result<()> {
21412            decoder.debug_check_bounds::<Self>(offset);
21413            // Verify that padding bytes are zero.
21414            fidl::decode!(
21415                fidl::encoding::Boxed<RecursiveEmptyStruct>,
21416                D,
21417                &mut self.inner,
21418                decoder,
21419                offset + 0,
21420                _depth
21421            )?;
21422            Ok(())
21423        }
21424    }
21425
21426    impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructArrayWrapper {
21427        type Borrowed<'a> = &'a Self;
21428        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21429            value
21430        }
21431    }
21432
21433    unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructArrayWrapper {
21434        type Owned = Self;
21435
21436        #[inline(always)]
21437        fn inline_align(_context: fidl::encoding::Context) -> usize {
21438            8
21439        }
21440
21441        #[inline(always)]
21442        fn inline_size(_context: fidl::encoding::Context) -> usize {
21443            8
21444        }
21445    }
21446
21447    unsafe impl<D: fidl::encoding::ResourceDialect>
21448        fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D>
21449        for &RecursiveEmptyStructArrayWrapper
21450    {
21451        #[inline]
21452        unsafe fn encode(
21453            self,
21454            encoder: &mut fidl::encoding::Encoder<'_, D>,
21455            offset: usize,
21456            _depth: fidl::encoding::Depth,
21457        ) -> fidl::Result<()> {
21458            encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21459            // Delegate to tuple encoding.
21460            fidl::encoding::Encode::<RecursiveEmptyStructArrayWrapper, D>::encode(
21461                (
21462                    <fidl::encoding::Array<RecursiveEmptyStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
21463                ),
21464                encoder, offset, _depth
21465            )
21466        }
21467    }
21468    unsafe impl<
21469        D: fidl::encoding::ResourceDialect,
21470        T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveEmptyStruct, 1>, D>,
21471    > fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D> for (T0,)
21472    {
21473        #[inline]
21474        unsafe fn encode(
21475            self,
21476            encoder: &mut fidl::encoding::Encoder<'_, D>,
21477            offset: usize,
21478            depth: fidl::encoding::Depth,
21479        ) -> fidl::Result<()> {
21480            encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21481            // Zero out padding regions. There's no need to apply masks
21482            // because the unmasked parts will be overwritten by fields.
21483            // Write the fields.
21484            self.0.encode(encoder, offset + 0, depth)?;
21485            Ok(())
21486        }
21487    }
21488
21489    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21490        for RecursiveEmptyStructArrayWrapper
21491    {
21492        #[inline(always)]
21493        fn new_empty() -> Self {
21494            Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D) }
21495        }
21496
21497        #[inline]
21498        unsafe fn decode(
21499            &mut self,
21500            decoder: &mut fidl::encoding::Decoder<'_, D>,
21501            offset: usize,
21502            _depth: fidl::encoding::Depth,
21503        ) -> fidl::Result<()> {
21504            decoder.debug_check_bounds::<Self>(offset);
21505            // Verify that padding bytes are zero.
21506            fidl::decode!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
21507            Ok(())
21508        }
21509    }
21510
21511    impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructVectorWrapper {
21512        type Borrowed<'a> = &'a Self;
21513        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21514            value
21515        }
21516    }
21517
21518    unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructVectorWrapper {
21519        type Owned = Self;
21520
21521        #[inline(always)]
21522        fn inline_align(_context: fidl::encoding::Context) -> usize {
21523            8
21524        }
21525
21526        #[inline(always)]
21527        fn inline_size(_context: fidl::encoding::Context) -> usize {
21528            16
21529        }
21530    }
21531
21532    unsafe impl<D: fidl::encoding::ResourceDialect>
21533        fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D>
21534        for &RecursiveEmptyStructVectorWrapper
21535    {
21536        #[inline]
21537        unsafe fn encode(
21538            self,
21539            encoder: &mut fidl::encoding::Encoder<'_, D>,
21540            offset: usize,
21541            _depth: fidl::encoding::Depth,
21542        ) -> fidl::Result<()> {
21543            encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21544            // Delegate to tuple encoding.
21545            fidl::encoding::Encode::<RecursiveEmptyStructVectorWrapper, D>::encode(
21546                (
21547                    <fidl::encoding::UnboundedVector<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21548                ),
21549                encoder, offset, _depth
21550            )
21551        }
21552    }
21553    unsafe impl<
21554        D: fidl::encoding::ResourceDialect,
21555        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D>,
21556    > fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D> for (T0,)
21557    {
21558        #[inline]
21559        unsafe fn encode(
21560            self,
21561            encoder: &mut fidl::encoding::Encoder<'_, D>,
21562            offset: usize,
21563            depth: fidl::encoding::Depth,
21564        ) -> fidl::Result<()> {
21565            encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21566            // Zero out padding regions. There's no need to apply masks
21567            // because the unmasked parts will be overwritten by fields.
21568            // Write the fields.
21569            self.0.encode(encoder, offset + 0, depth)?;
21570            Ok(())
21571        }
21572    }
21573
21574    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21575        for RecursiveEmptyStructVectorWrapper
21576    {
21577        #[inline(always)]
21578        fn new_empty() -> Self {
21579            Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D) }
21580        }
21581
21582        #[inline]
21583        unsafe fn decode(
21584            &mut self,
21585            decoder: &mut fidl::encoding::Decoder<'_, D>,
21586            offset: usize,
21587            _depth: fidl::encoding::Depth,
21588        ) -> fidl::Result<()> {
21589            decoder.debug_check_bounds::<Self>(offset);
21590            // Verify that padding bytes are zero.
21591            fidl::decode!(
21592                fidl::encoding::UnboundedVector<RecursiveEmptyStruct>,
21593                D,
21594                &mut self.vec,
21595                decoder,
21596                offset + 0,
21597                _depth
21598            )?;
21599            Ok(())
21600        }
21601    }
21602
21603    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTableStruct {
21604        type Borrowed<'a> = &'a Self;
21605        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21606            value
21607        }
21608    }
21609
21610    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTableStruct {
21611        type Owned = Self;
21612
21613        #[inline(always)]
21614        fn inline_align(_context: fidl::encoding::Context) -> usize {
21615            8
21616        }
21617
21618        #[inline(always)]
21619        fn inline_size(_context: fidl::encoding::Context) -> usize {
21620            16
21621        }
21622    }
21623
21624    unsafe impl<D: fidl::encoding::ResourceDialect>
21625        fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D>
21626        for &RecursiveOptionalAndTableStruct
21627    {
21628        #[inline]
21629        unsafe fn encode(
21630            self,
21631            encoder: &mut fidl::encoding::Encoder<'_, D>,
21632            offset: usize,
21633            _depth: fidl::encoding::Depth,
21634        ) -> fidl::Result<()> {
21635            encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21636            // Delegate to tuple encoding.
21637            fidl::encoding::Encode::<RecursiveOptionalAndTableStruct, D>::encode(
21638                (<RecursiveOptionalAndTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
21639                encoder,
21640                offset,
21641                _depth,
21642            )
21643        }
21644    }
21645    unsafe impl<
21646        D: fidl::encoding::ResourceDialect,
21647        T0: fidl::encoding::Encode<RecursiveOptionalAndTable, D>,
21648    > fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D> for (T0,)
21649    {
21650        #[inline]
21651        unsafe fn encode(
21652            self,
21653            encoder: &mut fidl::encoding::Encoder<'_, D>,
21654            offset: usize,
21655            depth: fidl::encoding::Depth,
21656        ) -> fidl::Result<()> {
21657            encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21658            // Zero out padding regions. There's no need to apply masks
21659            // because the unmasked parts will be overwritten by fields.
21660            // Write the fields.
21661            self.0.encode(encoder, offset + 0, depth)?;
21662            Ok(())
21663        }
21664    }
21665
21666    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21667        for RecursiveOptionalAndTableStruct
21668    {
21669        #[inline(always)]
21670        fn new_empty() -> Self {
21671            Self { t: fidl::new_empty!(RecursiveOptionalAndTable, D) }
21672        }
21673
21674        #[inline]
21675        unsafe fn decode(
21676            &mut self,
21677            decoder: &mut fidl::encoding::Decoder<'_, D>,
21678            offset: usize,
21679            _depth: fidl::encoding::Depth,
21680        ) -> fidl::Result<()> {
21681            decoder.debug_check_bounds::<Self>(offset);
21682            // Verify that padding bytes are zero.
21683            fidl::decode!(RecursiveOptionalAndTable, D, &mut self.t, decoder, offset + 0, _depth)?;
21684            Ok(())
21685        }
21686    }
21687
21688    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnionStruct {
21689        type Borrowed<'a> = &'a Self;
21690        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21691            value
21692        }
21693    }
21694
21695    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnionStruct {
21696        type Owned = Self;
21697
21698        #[inline(always)]
21699        fn inline_align(_context: fidl::encoding::Context) -> usize {
21700            8
21701        }
21702
21703        #[inline(always)]
21704        fn inline_size(_context: fidl::encoding::Context) -> usize {
21705            16
21706        }
21707    }
21708
21709    unsafe impl<D: fidl::encoding::ResourceDialect>
21710        fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D>
21711        for &RecursiveOptionalAndUnionStruct
21712    {
21713        #[inline]
21714        unsafe fn encode(
21715            self,
21716            encoder: &mut fidl::encoding::Encoder<'_, D>,
21717            offset: usize,
21718            _depth: fidl::encoding::Depth,
21719        ) -> fidl::Result<()> {
21720            encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21721            // Delegate to tuple encoding.
21722            fidl::encoding::Encode::<RecursiveOptionalAndUnionStruct, D>::encode(
21723                (<RecursiveOptionalAndUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
21724                encoder,
21725                offset,
21726                _depth,
21727            )
21728        }
21729    }
21730    unsafe impl<
21731        D: fidl::encoding::ResourceDialect,
21732        T0: fidl::encoding::Encode<RecursiveOptionalAndUnion, D>,
21733    > fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D> for (T0,)
21734    {
21735        #[inline]
21736        unsafe fn encode(
21737            self,
21738            encoder: &mut fidl::encoding::Encoder<'_, D>,
21739            offset: usize,
21740            depth: fidl::encoding::Depth,
21741        ) -> fidl::Result<()> {
21742            encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21743            // Zero out padding regions. There's no need to apply masks
21744            // because the unmasked parts will be overwritten by fields.
21745            // Write the fields.
21746            self.0.encode(encoder, offset + 0, depth)?;
21747            Ok(())
21748        }
21749    }
21750
21751    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21752        for RecursiveOptionalAndUnionStruct
21753    {
21754        #[inline(always)]
21755        fn new_empty() -> Self {
21756            Self { u: fidl::new_empty!(RecursiveOptionalAndUnion, D) }
21757        }
21758
21759        #[inline]
21760        unsafe fn decode(
21761            &mut self,
21762            decoder: &mut fidl::encoding::Decoder<'_, D>,
21763            offset: usize,
21764            _depth: fidl::encoding::Depth,
21765        ) -> fidl::Result<()> {
21766            decoder.debug_check_bounds::<Self>(offset);
21767            // Verify that padding bytes are zero.
21768            fidl::decode!(RecursiveOptionalAndUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
21769            Ok(())
21770        }
21771    }
21772
21773    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndVectorStruct {
21774        type Borrowed<'a> = &'a Self;
21775        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21776            value
21777        }
21778    }
21779
21780    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndVectorStruct {
21781        type Owned = Self;
21782
21783        #[inline(always)]
21784        fn inline_align(_context: fidl::encoding::Context) -> usize {
21785            8
21786        }
21787
21788        #[inline(always)]
21789        fn inline_size(_context: fidl::encoding::Context) -> usize {
21790            16
21791        }
21792    }
21793
21794    unsafe impl<D: fidl::encoding::ResourceDialect>
21795        fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D>
21796        for &RecursiveOptionalAndVectorStruct
21797    {
21798        #[inline]
21799        unsafe fn encode(
21800            self,
21801            encoder: &mut fidl::encoding::Encoder<'_, D>,
21802            offset: usize,
21803            _depth: fidl::encoding::Depth,
21804        ) -> fidl::Result<()> {
21805            encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21806            // Delegate to tuple encoding.
21807            fidl::encoding::Encode::<RecursiveOptionalAndVectorStruct, D>::encode(
21808                (
21809                    <fidl::encoding::UnboundedVector<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21810                ),
21811                encoder, offset, _depth
21812            )
21813        }
21814    }
21815    unsafe impl<
21816        D: fidl::encoding::ResourceDialect,
21817        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D>,
21818    > fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D> for (T0,)
21819    {
21820        #[inline]
21821        unsafe fn encode(
21822            self,
21823            encoder: &mut fidl::encoding::Encoder<'_, D>,
21824            offset: usize,
21825            depth: fidl::encoding::Depth,
21826        ) -> fidl::Result<()> {
21827            encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21828            // Zero out padding regions. There's no need to apply masks
21829            // because the unmasked parts will be overwritten by fields.
21830            // Write the fields.
21831            self.0.encode(encoder, offset + 0, depth)?;
21832            Ok(())
21833        }
21834    }
21835
21836    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21837        for RecursiveOptionalAndVectorStruct
21838    {
21839        #[inline(always)]
21840        fn new_empty() -> Self {
21841            Self {
21842                vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D),
21843            }
21844        }
21845
21846        #[inline]
21847        unsafe fn decode(
21848            &mut self,
21849            decoder: &mut fidl::encoding::Decoder<'_, D>,
21850            offset: usize,
21851            _depth: fidl::encoding::Depth,
21852        ) -> fidl::Result<()> {
21853            decoder.debug_check_bounds::<Self>(offset);
21854            // Verify that padding bytes are zero.
21855            fidl::decode!(
21856                fidl::encoding::UnboundedVector<RecursiveOptionalStruct>,
21857                D,
21858                &mut self.vec,
21859                decoder,
21860                offset + 0,
21861                _depth
21862            )?;
21863            Ok(())
21864        }
21865    }
21866
21867    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalBasicStruct {
21868        type Borrowed<'a> = &'a Self;
21869        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21870            value
21871        }
21872    }
21873
21874    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalBasicStruct {
21875        type Owned = Self;
21876
21877        #[inline(always)]
21878        fn inline_align(_context: fidl::encoding::Context) -> usize {
21879            8
21880        }
21881
21882        #[inline(always)]
21883        fn inline_size(_context: fidl::encoding::Context) -> usize {
21884            8
21885        }
21886    }
21887
21888    unsafe impl<D: fidl::encoding::ResourceDialect>
21889        fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for &RecursiveOptionalBasicStruct
21890    {
21891        #[inline]
21892        unsafe fn encode(
21893            self,
21894            encoder: &mut fidl::encoding::Encoder<'_, D>,
21895            offset: usize,
21896            _depth: fidl::encoding::Depth,
21897        ) -> fidl::Result<()> {
21898            encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21899            // Delegate to tuple encoding.
21900            fidl::encoding::Encode::<RecursiveOptionalBasicStruct, D>::encode(
21901                (
21902                    <fidl::encoding::Boxed<RecursiveOptionalBasicStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21903                ),
21904                encoder, offset, _depth
21905            )
21906        }
21907    }
21908    unsafe impl<
21909        D: fidl::encoding::ResourceDialect,
21910        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D>,
21911    > fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for (T0,)
21912    {
21913        #[inline]
21914        unsafe fn encode(
21915            self,
21916            encoder: &mut fidl::encoding::Encoder<'_, D>,
21917            offset: usize,
21918            depth: fidl::encoding::Depth,
21919        ) -> fidl::Result<()> {
21920            encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21921            // Zero out padding regions. There's no need to apply masks
21922            // because the unmasked parts will be overwritten by fields.
21923            // Write the fields.
21924            self.0.encode(encoder, offset + 0, depth)?;
21925            Ok(())
21926        }
21927    }
21928
21929    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21930        for RecursiveOptionalBasicStruct
21931    {
21932        #[inline(always)]
21933        fn new_empty() -> Self {
21934            Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D) }
21935        }
21936
21937        #[inline]
21938        unsafe fn decode(
21939            &mut self,
21940            decoder: &mut fidl::encoding::Decoder<'_, D>,
21941            offset: usize,
21942            _depth: fidl::encoding::Depth,
21943        ) -> fidl::Result<()> {
21944            decoder.debug_check_bounds::<Self>(offset);
21945            // Verify that padding bytes are zero.
21946            fidl::decode!(
21947                fidl::encoding::Boxed<RecursiveOptionalBasicStruct>,
21948                D,
21949                &mut self.inner,
21950                decoder,
21951                offset + 0,
21952                _depth
21953            )?;
21954            Ok(())
21955        }
21956    }
21957
21958    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStruct {
21959        type Borrowed<'a> = &'a Self;
21960        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21961            value
21962        }
21963    }
21964
21965    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStruct {
21966        type Owned = Self;
21967
21968        #[inline(always)]
21969        fn inline_align(_context: fidl::encoding::Context) -> usize {
21970            8
21971        }
21972
21973        #[inline(always)]
21974        fn inline_size(_context: fidl::encoding::Context) -> usize {
21975            8
21976        }
21977    }
21978
21979    unsafe impl<D: fidl::encoding::ResourceDialect>
21980        fidl::encoding::Encode<RecursiveOptionalStruct, D> for &RecursiveOptionalStruct
21981    {
21982        #[inline]
21983        unsafe fn encode(
21984            self,
21985            encoder: &mut fidl::encoding::Encoder<'_, D>,
21986            offset: usize,
21987            _depth: fidl::encoding::Depth,
21988        ) -> fidl::Result<()> {
21989            encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
21990            // Delegate to tuple encoding.
21991            fidl::encoding::Encode::<RecursiveOptionalStruct, D>::encode(
21992                (
21993                    <fidl::encoding::Boxed<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21994                ),
21995                encoder, offset, _depth
21996            )
21997        }
21998    }
21999    unsafe impl<
22000        D: fidl::encoding::ResourceDialect,
22001        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStruct>, D>,
22002    > fidl::encoding::Encode<RecursiveOptionalStruct, D> for (T0,)
22003    {
22004        #[inline]
22005        unsafe fn encode(
22006            self,
22007            encoder: &mut fidl::encoding::Encoder<'_, D>,
22008            offset: usize,
22009            depth: fidl::encoding::Depth,
22010        ) -> fidl::Result<()> {
22011            encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
22012            // Zero out padding regions. There's no need to apply masks
22013            // because the unmasked parts will be overwritten by fields.
22014            // Write the fields.
22015            self.0.encode(encoder, offset + 0, depth)?;
22016            Ok(())
22017        }
22018    }
22019
22020    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22021        for RecursiveOptionalStruct
22022    {
22023        #[inline(always)]
22024        fn new_empty() -> Self {
22025            Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalStruct>, D) }
22026        }
22027
22028        #[inline]
22029        unsafe fn decode(
22030            &mut self,
22031            decoder: &mut fidl::encoding::Decoder<'_, D>,
22032            offset: usize,
22033            _depth: fidl::encoding::Depth,
22034        ) -> fidl::Result<()> {
22035            decoder.debug_check_bounds::<Self>(offset);
22036            // Verify that padding bytes are zero.
22037            fidl::decode!(
22038                fidl::encoding::Boxed<RecursiveOptionalStruct>,
22039                D,
22040                &mut self.inner,
22041                decoder,
22042                offset + 0,
22043                _depth
22044            )?;
22045            Ok(())
22046        }
22047    }
22048
22049    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructArrayWrapper {
22050        type Borrowed<'a> = &'a Self;
22051        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22052            value
22053        }
22054    }
22055
22056    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructArrayWrapper {
22057        type Owned = Self;
22058
22059        #[inline(always)]
22060        fn inline_align(_context: fidl::encoding::Context) -> usize {
22061            8
22062        }
22063
22064        #[inline(always)]
22065        fn inline_size(_context: fidl::encoding::Context) -> usize {
22066            8
22067        }
22068    }
22069
22070    unsafe impl<D: fidl::encoding::ResourceDialect>
22071        fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D>
22072        for &RecursiveOptionalStructArrayWrapper
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::<RecursiveOptionalStructArrayWrapper>(offset);
22082            // Delegate to tuple encoding.
22083            fidl::encoding::Encode::<RecursiveOptionalStructArrayWrapper, D>::encode(
22084                (
22085                    <fidl::encoding::Array<RecursiveOptionalStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
22086                ),
22087                encoder, offset, _depth
22088            )
22089        }
22090    }
22091    unsafe impl<
22092        D: fidl::encoding::ResourceDialect,
22093        T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveOptionalStruct, 1>, D>,
22094    > fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D> for (T0,)
22095    {
22096        #[inline]
22097        unsafe fn encode(
22098            self,
22099            encoder: &mut fidl::encoding::Encoder<'_, D>,
22100            offset: usize,
22101            depth: fidl::encoding::Depth,
22102        ) -> fidl::Result<()> {
22103            encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
22104            // Zero out padding regions. There's no need to apply masks
22105            // because the unmasked parts will be overwritten by fields.
22106            // Write the fields.
22107            self.0.encode(encoder, offset + 0, depth)?;
22108            Ok(())
22109        }
22110    }
22111
22112    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22113        for RecursiveOptionalStructArrayWrapper
22114    {
22115        #[inline(always)]
22116        fn new_empty() -> Self {
22117            Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D) }
22118        }
22119
22120        #[inline]
22121        unsafe fn decode(
22122            &mut self,
22123            decoder: &mut fidl::encoding::Decoder<'_, D>,
22124            offset: usize,
22125            _depth: fidl::encoding::Depth,
22126        ) -> fidl::Result<()> {
22127            decoder.debug_check_bounds::<Self>(offset);
22128            // Verify that padding bytes are zero.
22129            fidl::decode!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
22130            Ok(())
22131        }
22132    }
22133
22134    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructWithString {
22135        type Borrowed<'a> = &'a Self;
22136        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22137            value
22138        }
22139    }
22140
22141    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructWithString {
22142        type Owned = Self;
22143
22144        #[inline(always)]
22145        fn inline_align(_context: fidl::encoding::Context) -> usize {
22146            8
22147        }
22148
22149        #[inline(always)]
22150        fn inline_size(_context: fidl::encoding::Context) -> usize {
22151            24
22152        }
22153    }
22154
22155    unsafe impl<D: fidl::encoding::ResourceDialect>
22156        fidl::encoding::Encode<RecursiveOptionalStructWithString, D>
22157        for &RecursiveOptionalStructWithString
22158    {
22159        #[inline]
22160        unsafe fn encode(
22161            self,
22162            encoder: &mut fidl::encoding::Encoder<'_, D>,
22163            offset: usize,
22164            _depth: fidl::encoding::Depth,
22165        ) -> fidl::Result<()> {
22166            encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
22167            // Delegate to tuple encoding.
22168            fidl::encoding::Encode::<RecursiveOptionalStructWithString, D>::encode(
22169                (
22170                    <fidl::encoding::Boxed<RecursiveOptionalStructWithString> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
22171                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
22172                ),
22173                encoder, offset, _depth
22174            )
22175        }
22176    }
22177    unsafe impl<
22178        D: fidl::encoding::ResourceDialect,
22179        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStructWithString>, D>,
22180        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
22181    > fidl::encoding::Encode<RecursiveOptionalStructWithString, D> for (T0, T1)
22182    {
22183        #[inline]
22184        unsafe fn encode(
22185            self,
22186            encoder: &mut fidl::encoding::Encoder<'_, D>,
22187            offset: usize,
22188            depth: fidl::encoding::Depth,
22189        ) -> fidl::Result<()> {
22190            encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
22191            // Zero out padding regions. There's no need to apply masks
22192            // because the unmasked parts will be overwritten by fields.
22193            // Write the fields.
22194            self.0.encode(encoder, offset + 0, depth)?;
22195            self.1.encode(encoder, offset + 8, depth)?;
22196            Ok(())
22197        }
22198    }
22199
22200    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22201        for RecursiveOptionalStructWithString
22202    {
22203        #[inline(always)]
22204        fn new_empty() -> Self {
22205            Self {
22206                inner: fidl::new_empty!(
22207                    fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22208                    D
22209                ),
22210                str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
22211            }
22212        }
22213
22214        #[inline]
22215        unsafe fn decode(
22216            &mut self,
22217            decoder: &mut fidl::encoding::Decoder<'_, D>,
22218            offset: usize,
22219            _depth: fidl::encoding::Depth,
22220        ) -> fidl::Result<()> {
22221            decoder.debug_check_bounds::<Self>(offset);
22222            // Verify that padding bytes are zero.
22223            fidl::decode!(
22224                fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22225                D,
22226                &mut self.inner,
22227                decoder,
22228                offset + 0,
22229                _depth
22230            )?;
22231            fidl::decode!(
22232                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
22233                D,
22234                &mut self.str,
22235                decoder,
22236                offset + 8,
22237                _depth
22238            )?;
22239            Ok(())
22240        }
22241    }
22242
22243    impl fidl::encoding::ValueTypeMarker for RecursiveTableHolder {
22244        type Borrowed<'a> = &'a Self;
22245        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22246            value
22247        }
22248    }
22249
22250    unsafe impl fidl::encoding::TypeMarker for RecursiveTableHolder {
22251        type Owned = Self;
22252
22253        #[inline(always)]
22254        fn inline_align(_context: fidl::encoding::Context) -> usize {
22255            8
22256        }
22257
22258        #[inline(always)]
22259        fn inline_size(_context: fidl::encoding::Context) -> usize {
22260            16
22261        }
22262    }
22263
22264    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTableHolder, D>
22265        for &RecursiveTableHolder
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::<RecursiveTableHolder>(offset);
22275            // Delegate to tuple encoding.
22276            fidl::encoding::Encode::<RecursiveTableHolder, D>::encode(
22277                (<RecursiveTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
22278                encoder,
22279                offset,
22280                _depth,
22281            )
22282        }
22283    }
22284    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RecursiveTable, D>>
22285        fidl::encoding::Encode<RecursiveTableHolder, D> for (T0,)
22286    {
22287        #[inline]
22288        unsafe fn encode(
22289            self,
22290            encoder: &mut fidl::encoding::Encoder<'_, D>,
22291            offset: usize,
22292            depth: fidl::encoding::Depth,
22293        ) -> fidl::Result<()> {
22294            encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22295            // Zero out padding regions. There's no need to apply masks
22296            // because the unmasked parts will be overwritten by fields.
22297            // Write the fields.
22298            self.0.encode(encoder, offset + 0, depth)?;
22299            Ok(())
22300        }
22301    }
22302
22303    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTableHolder {
22304        #[inline(always)]
22305        fn new_empty() -> Self {
22306            Self { t: fidl::new_empty!(RecursiveTable, D) }
22307        }
22308
22309        #[inline]
22310        unsafe fn decode(
22311            &mut self,
22312            decoder: &mut fidl::encoding::Decoder<'_, D>,
22313            offset: usize,
22314            _depth: fidl::encoding::Depth,
22315        ) -> fidl::Result<()> {
22316            decoder.debug_check_bounds::<Self>(offset);
22317            // Verify that padding bytes are zero.
22318            fidl::decode!(RecursiveTable, D, &mut self.t, decoder, offset + 0, _depth)?;
22319            Ok(())
22320        }
22321    }
22322
22323    impl fidl::encoding::ValueTypeMarker for RecursiveTableOptionalHolder {
22324        type Borrowed<'a> = &'a Self;
22325        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22326            value
22327        }
22328    }
22329
22330    unsafe impl fidl::encoding::TypeMarker for RecursiveTableOptionalHolder {
22331        type Owned = Self;
22332
22333        #[inline(always)]
22334        fn inline_align(_context: fidl::encoding::Context) -> usize {
22335            8
22336        }
22337
22338        #[inline(always)]
22339        fn inline_size(_context: fidl::encoding::Context) -> usize {
22340            8
22341        }
22342    }
22343
22344    unsafe impl<D: fidl::encoding::ResourceDialect>
22345        fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for &RecursiveTableOptionalHolder
22346    {
22347        #[inline]
22348        unsafe fn encode(
22349            self,
22350            encoder: &mut fidl::encoding::Encoder<'_, D>,
22351            offset: usize,
22352            _depth: fidl::encoding::Depth,
22353        ) -> fidl::Result<()> {
22354            encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22355            // Delegate to tuple encoding.
22356            fidl::encoding::Encode::<RecursiveTableOptionalHolder, D>::encode(
22357                (
22358                    <fidl::encoding::Boxed<RecursiveTableHolder> as fidl::encoding::ValueTypeMarker>::borrow(&self.o),
22359                ),
22360                encoder, offset, _depth
22361            )
22362        }
22363    }
22364    unsafe impl<
22365        D: fidl::encoding::ResourceDialect,
22366        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveTableHolder>, D>,
22367    > fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for (T0,)
22368    {
22369        #[inline]
22370        unsafe fn encode(
22371            self,
22372            encoder: &mut fidl::encoding::Encoder<'_, D>,
22373            offset: usize,
22374            depth: fidl::encoding::Depth,
22375        ) -> fidl::Result<()> {
22376            encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22377            // Zero out padding regions. There's no need to apply masks
22378            // because the unmasked parts will be overwritten by fields.
22379            // Write the fields.
22380            self.0.encode(encoder, offset + 0, depth)?;
22381            Ok(())
22382        }
22383    }
22384
22385    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22386        for RecursiveTableOptionalHolder
22387    {
22388        #[inline(always)]
22389        fn new_empty() -> Self {
22390            Self { o: fidl::new_empty!(fidl::encoding::Boxed<RecursiveTableHolder>, D) }
22391        }
22392
22393        #[inline]
22394        unsafe fn decode(
22395            &mut self,
22396            decoder: &mut fidl::encoding::Decoder<'_, D>,
22397            offset: usize,
22398            _depth: fidl::encoding::Depth,
22399        ) -> fidl::Result<()> {
22400            decoder.debug_check_bounds::<Self>(offset);
22401            // Verify that padding bytes are zero.
22402            fidl::decode!(
22403                fidl::encoding::Boxed<RecursiveTableHolder>,
22404                D,
22405                &mut self.o,
22406                decoder,
22407                offset + 0,
22408                _depth
22409            )?;
22410            Ok(())
22411        }
22412    }
22413
22414    impl fidl::encoding::ValueTypeMarker for RecursiveUnionStruct {
22415        type Borrowed<'a> = &'a Self;
22416        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22417            value
22418        }
22419    }
22420
22421    unsafe impl fidl::encoding::TypeMarker for RecursiveUnionStruct {
22422        type Owned = Self;
22423
22424        #[inline(always)]
22425        fn inline_align(_context: fidl::encoding::Context) -> usize {
22426            8
22427        }
22428
22429        #[inline(always)]
22430        fn inline_size(_context: fidl::encoding::Context) -> usize {
22431            16
22432        }
22433    }
22434
22435    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnionStruct, D>
22436        for &RecursiveUnionStruct
22437    {
22438        #[inline]
22439        unsafe fn encode(
22440            self,
22441            encoder: &mut fidl::encoding::Encoder<'_, D>,
22442            offset: usize,
22443            _depth: fidl::encoding::Depth,
22444        ) -> fidl::Result<()> {
22445            encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22446            // Delegate to tuple encoding.
22447            fidl::encoding::Encode::<RecursiveUnionStruct, D>::encode(
22448                (
22449                    <fidl::encoding::OptionalUnion<RecursiveUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
22450                ),
22451                encoder, offset, _depth
22452            )
22453        }
22454    }
22455    unsafe impl<
22456        D: fidl::encoding::ResourceDialect,
22457        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<RecursiveUnion>, D>,
22458    > fidl::encoding::Encode<RecursiveUnionStruct, D> for (T0,)
22459    {
22460        #[inline]
22461        unsafe fn encode(
22462            self,
22463            encoder: &mut fidl::encoding::Encoder<'_, D>,
22464            offset: usize,
22465            depth: fidl::encoding::Depth,
22466        ) -> fidl::Result<()> {
22467            encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22468            // Zero out padding regions. There's no need to apply masks
22469            // because the unmasked parts will be overwritten by fields.
22470            // Write the fields.
22471            self.0.encode(encoder, offset + 0, depth)?;
22472            Ok(())
22473        }
22474    }
22475
22476    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnionStruct {
22477        #[inline(always)]
22478        fn new_empty() -> Self {
22479            Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<RecursiveUnion>, D) }
22480        }
22481
22482        #[inline]
22483        unsafe fn decode(
22484            &mut self,
22485            decoder: &mut fidl::encoding::Decoder<'_, D>,
22486            offset: usize,
22487            _depth: fidl::encoding::Depth,
22488        ) -> fidl::Result<()> {
22489            decoder.debug_check_bounds::<Self>(offset);
22490            // Verify that padding bytes are zero.
22491            fidl::decode!(
22492                fidl::encoding::OptionalUnion<RecursiveUnion>,
22493                D,
22494                &mut self.u,
22495                decoder,
22496                offset + 0,
22497                _depth
22498            )?;
22499            Ok(())
22500        }
22501    }
22502
22503    impl fidl::encoding::ValueTypeMarker for RecursiveVectorStruct {
22504        type Borrowed<'a> = &'a Self;
22505        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22506            value
22507        }
22508    }
22509
22510    unsafe impl fidl::encoding::TypeMarker for RecursiveVectorStruct {
22511        type Owned = Self;
22512
22513        #[inline(always)]
22514        fn inline_align(_context: fidl::encoding::Context) -> usize {
22515            8
22516        }
22517
22518        #[inline(always)]
22519        fn inline_size(_context: fidl::encoding::Context) -> usize {
22520            16
22521        }
22522    }
22523
22524    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorStruct, D>
22525        for &RecursiveVectorStruct
22526    {
22527        #[inline]
22528        unsafe fn encode(
22529            self,
22530            encoder: &mut fidl::encoding::Encoder<'_, D>,
22531            offset: usize,
22532            _depth: fidl::encoding::Depth,
22533        ) -> fidl::Result<()> {
22534            encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22535            // Delegate to tuple encoding.
22536            fidl::encoding::Encode::<RecursiveVectorStruct, D>::encode(
22537                (
22538                    <fidl::encoding::Optional<
22539                        fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22540                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
22541                ),
22542                encoder,
22543                offset,
22544                _depth,
22545            )
22546        }
22547    }
22548    unsafe impl<
22549        D: fidl::encoding::ResourceDialect,
22550        T0: fidl::encoding::Encode<
22551                fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22552                D,
22553            >,
22554    > fidl::encoding::Encode<RecursiveVectorStruct, D> for (T0,)
22555    {
22556        #[inline]
22557        unsafe fn encode(
22558            self,
22559            encoder: &mut fidl::encoding::Encoder<'_, D>,
22560            offset: usize,
22561            depth: fidl::encoding::Depth,
22562        ) -> fidl::Result<()> {
22563            encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22564            // Zero out padding regions. There's no need to apply masks
22565            // because the unmasked parts will be overwritten by fields.
22566            // Write the fields.
22567            self.0.encode(encoder, offset + 0, depth)?;
22568            Ok(())
22569        }
22570    }
22571
22572    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorStruct {
22573        #[inline(always)]
22574        fn new_empty() -> Self {
22575            Self {
22576                vec: fidl::new_empty!(
22577                    fidl::encoding::Optional<
22578                        fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22579                    >,
22580                    D
22581                ),
22582            }
22583        }
22584
22585        #[inline]
22586        unsafe fn decode(
22587            &mut self,
22588            decoder: &mut fidl::encoding::Decoder<'_, D>,
22589            offset: usize,
22590            _depth: fidl::encoding::Depth,
22591        ) -> fidl::Result<()> {
22592            decoder.debug_check_bounds::<Self>(offset);
22593            // Verify that padding bytes are zero.
22594            fidl::decode!(
22595                fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22596                D,
22597                &mut self.vec,
22598                decoder,
22599                offset + 0,
22600                _depth
22601            )?;
22602            Ok(())
22603        }
22604    }
22605
22606    impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnionStruct {
22607        type Borrowed<'a> = &'a Self;
22608        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22609            value
22610        }
22611    }
22612
22613    unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnionStruct {
22614        type Owned = Self;
22615
22616        #[inline(always)]
22617        fn inline_align(_context: fidl::encoding::Context) -> usize {
22618            8
22619        }
22620
22621        #[inline(always)]
22622        fn inline_size(_context: fidl::encoding::Context) -> usize {
22623            16
22624        }
22625    }
22626
22627    unsafe impl<D: fidl::encoding::ResourceDialect>
22628        fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for &RecursiveVectorUnionStruct
22629    {
22630        #[inline]
22631        unsafe fn encode(
22632            self,
22633            encoder: &mut fidl::encoding::Encoder<'_, D>,
22634            offset: usize,
22635            _depth: fidl::encoding::Depth,
22636        ) -> fidl::Result<()> {
22637            encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22638            // Delegate to tuple encoding.
22639            fidl::encoding::Encode::<RecursiveVectorUnionStruct, D>::encode(
22640                (<RecursiveVectorUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
22641                encoder,
22642                offset,
22643                _depth,
22644            )
22645        }
22646    }
22647    unsafe impl<
22648        D: fidl::encoding::ResourceDialect,
22649        T0: fidl::encoding::Encode<RecursiveVectorUnion, D>,
22650    > fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for (T0,)
22651    {
22652        #[inline]
22653        unsafe fn encode(
22654            self,
22655            encoder: &mut fidl::encoding::Encoder<'_, D>,
22656            offset: usize,
22657            depth: fidl::encoding::Depth,
22658        ) -> fidl::Result<()> {
22659            encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22660            // Zero out padding regions. There's no need to apply masks
22661            // because the unmasked parts will be overwritten by fields.
22662            // Write the fields.
22663            self.0.encode(encoder, offset + 0, depth)?;
22664            Ok(())
22665        }
22666    }
22667
22668    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22669        for RecursiveVectorUnionStruct
22670    {
22671        #[inline(always)]
22672        fn new_empty() -> Self {
22673            Self { u: fidl::new_empty!(RecursiveVectorUnion, D) }
22674        }
22675
22676        #[inline]
22677        unsafe fn decode(
22678            &mut self,
22679            decoder: &mut fidl::encoding::Decoder<'_, D>,
22680            offset: usize,
22681            _depth: fidl::encoding::Depth,
22682        ) -> fidl::Result<()> {
22683            decoder.debug_check_bounds::<Self>(offset);
22684            // Verify that padding bytes are zero.
22685            fidl::decode!(RecursiveVectorUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
22686            Ok(())
22687        }
22688    }
22689
22690    impl fidl::encoding::ValueTypeMarker for Regression1 {
22691        type Borrowed<'a> = &'a Self;
22692        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22693            value
22694        }
22695    }
22696
22697    unsafe impl fidl::encoding::TypeMarker for Regression1 {
22698        type Owned = Self;
22699
22700        #[inline(always)]
22701        fn inline_align(_context: fidl::encoding::Context) -> usize {
22702            8
22703        }
22704
22705        #[inline(always)]
22706        fn inline_size(_context: fidl::encoding::Context) -> usize {
22707            32
22708        }
22709    }
22710
22711    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression1, D>
22712        for &Regression1
22713    {
22714        #[inline]
22715        unsafe fn encode(
22716            self,
22717            encoder: &mut fidl::encoding::Encoder<'_, D>,
22718            offset: usize,
22719            _depth: fidl::encoding::Depth,
22720        ) -> fidl::Result<()> {
22721            encoder.debug_check_bounds::<Regression1>(offset);
22722            unsafe {
22723                // Copy the object into the buffer.
22724                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
22725                (buf_ptr as *mut Regression1).write_unaligned((self as *const Regression1).read());
22726                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
22727                // done second because the memcpy will write garbage to these bytes.
22728                let padding_ptr = buf_ptr.offset(0) as *mut u64;
22729                let padding_mask = 0xffffff00u64;
22730                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22731                let padding_ptr = buf_ptr.offset(8) as *mut u64;
22732                let padding_mask = 0xffffffff0000ff00u64;
22733                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22734                let padding_ptr = buf_ptr.offset(24) as *mut u64;
22735                let padding_mask = 0xffffffffffffff00u64;
22736                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22737            }
22738            Ok(())
22739        }
22740    }
22741    unsafe impl<
22742        D: fidl::encoding::ResourceDialect,
22743        T0: fidl::encoding::Encode<u8, D>,
22744        T1: fidl::encoding::Encode<u32, D>,
22745        T2: fidl::encoding::Encode<u8, D>,
22746        T3: fidl::encoding::Encode<u16, D>,
22747        T4: fidl::encoding::Encode<u64, D>,
22748        T5: fidl::encoding::Encode<u8, D>,
22749    > fidl::encoding::Encode<Regression1, D> for (T0, T1, T2, T3, T4, T5)
22750    {
22751        #[inline]
22752        unsafe fn encode(
22753            self,
22754            encoder: &mut fidl::encoding::Encoder<'_, D>,
22755            offset: usize,
22756            depth: fidl::encoding::Depth,
22757        ) -> fidl::Result<()> {
22758            encoder.debug_check_bounds::<Regression1>(offset);
22759            // Zero out padding regions. There's no need to apply masks
22760            // because the unmasked parts will be overwritten by fields.
22761            unsafe {
22762                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22763                (ptr as *mut u64).write_unaligned(0);
22764            }
22765            unsafe {
22766                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
22767                (ptr as *mut u64).write_unaligned(0);
22768            }
22769            unsafe {
22770                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
22771                (ptr as *mut u64).write_unaligned(0);
22772            }
22773            // Write the fields.
22774            self.0.encode(encoder, offset + 0, depth)?;
22775            self.1.encode(encoder, offset + 4, depth)?;
22776            self.2.encode(encoder, offset + 8, depth)?;
22777            self.3.encode(encoder, offset + 10, depth)?;
22778            self.4.encode(encoder, offset + 16, depth)?;
22779            self.5.encode(encoder, offset + 24, depth)?;
22780            Ok(())
22781        }
22782    }
22783
22784    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression1 {
22785        #[inline(always)]
22786        fn new_empty() -> Self {
22787            Self {
22788                f1: fidl::new_empty!(u8, D),
22789                f2: fidl::new_empty!(u32, D),
22790                f3: fidl::new_empty!(u8, D),
22791                f4: fidl::new_empty!(u16, D),
22792                f5: fidl::new_empty!(u64, D),
22793                f6: fidl::new_empty!(u8, D),
22794            }
22795        }
22796
22797        #[inline]
22798        unsafe fn decode(
22799            &mut self,
22800            decoder: &mut fidl::encoding::Decoder<'_, D>,
22801            offset: usize,
22802            _depth: fidl::encoding::Depth,
22803        ) -> fidl::Result<()> {
22804            decoder.debug_check_bounds::<Self>(offset);
22805            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
22806            // Verify that padding bytes are zero.
22807            let ptr = unsafe { buf_ptr.offset(0) };
22808            let padval = unsafe { (ptr as *const u64).read_unaligned() };
22809            let mask = 0xffffff00u64;
22810            let maskedval = padval & mask;
22811            if maskedval != 0 {
22812                return Err(fidl::Error::NonZeroPadding {
22813                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22814                });
22815            }
22816            let ptr = unsafe { buf_ptr.offset(8) };
22817            let padval = unsafe { (ptr as *const u64).read_unaligned() };
22818            let mask = 0xffffffff0000ff00u64;
22819            let maskedval = padval & mask;
22820            if maskedval != 0 {
22821                return Err(fidl::Error::NonZeroPadding {
22822                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
22823                });
22824            }
22825            let ptr = unsafe { buf_ptr.offset(24) };
22826            let padval = unsafe { (ptr as *const u64).read_unaligned() };
22827            let mask = 0xffffffffffffff00u64;
22828            let maskedval = padval & mask;
22829            if maskedval != 0 {
22830                return Err(fidl::Error::NonZeroPadding {
22831                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
22832                });
22833            }
22834            // Copy from the buffer into the object.
22835            unsafe {
22836                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
22837            }
22838            Ok(())
22839        }
22840    }
22841
22842    impl fidl::encoding::ValueTypeMarker for Regression10V1 {
22843        type Borrowed<'a> = &'a Self;
22844        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22845            value
22846        }
22847    }
22848
22849    unsafe impl fidl::encoding::TypeMarker for Regression10V1 {
22850        type Owned = Self;
22851
22852        #[inline(always)]
22853        fn inline_align(_context: fidl::encoding::Context) -> usize {
22854            8
22855        }
22856
22857        #[inline(always)]
22858        fn inline_size(_context: fidl::encoding::Context) -> usize {
22859            16
22860        }
22861    }
22862
22863    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V1, D>
22864        for &Regression10V1
22865    {
22866        #[inline]
22867        unsafe fn encode(
22868            self,
22869            encoder: &mut fidl::encoding::Encoder<'_, D>,
22870            offset: usize,
22871            _depth: fidl::encoding::Depth,
22872        ) -> fidl::Result<()> {
22873            encoder.debug_check_bounds::<Regression10V1>(offset);
22874            // Delegate to tuple encoding.
22875            fidl::encoding::Encode::<Regression10V1, D>::encode(
22876                (<Regression10TableV1 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22877                encoder,
22878                offset,
22879                _depth,
22880            )
22881        }
22882    }
22883    unsafe impl<
22884        D: fidl::encoding::ResourceDialect,
22885        T0: fidl::encoding::Encode<Regression10TableV1, D>,
22886    > fidl::encoding::Encode<Regression10V1, D> for (T0,)
22887    {
22888        #[inline]
22889        unsafe fn encode(
22890            self,
22891            encoder: &mut fidl::encoding::Encoder<'_, D>,
22892            offset: usize,
22893            depth: fidl::encoding::Depth,
22894        ) -> fidl::Result<()> {
22895            encoder.debug_check_bounds::<Regression10V1>(offset);
22896            // Zero out padding regions. There's no need to apply masks
22897            // because the unmasked parts will be overwritten by fields.
22898            // Write the fields.
22899            self.0.encode(encoder, offset + 0, depth)?;
22900            Ok(())
22901        }
22902    }
22903
22904    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V1 {
22905        #[inline(always)]
22906        fn new_empty() -> Self {
22907            Self { table: fidl::new_empty!(Regression10TableV1, D) }
22908        }
22909
22910        #[inline]
22911        unsafe fn decode(
22912            &mut self,
22913            decoder: &mut fidl::encoding::Decoder<'_, D>,
22914            offset: usize,
22915            _depth: fidl::encoding::Depth,
22916        ) -> fidl::Result<()> {
22917            decoder.debug_check_bounds::<Self>(offset);
22918            // Verify that padding bytes are zero.
22919            fidl::decode!(Regression10TableV1, D, &mut self.table, decoder, offset + 0, _depth)?;
22920            Ok(())
22921        }
22922    }
22923
22924    impl fidl::encoding::ValueTypeMarker for Regression10V2 {
22925        type Borrowed<'a> = &'a Self;
22926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22927            value
22928        }
22929    }
22930
22931    unsafe impl fidl::encoding::TypeMarker for Regression10V2 {
22932        type Owned = Self;
22933
22934        #[inline(always)]
22935        fn inline_align(_context: fidl::encoding::Context) -> usize {
22936            8
22937        }
22938
22939        #[inline(always)]
22940        fn inline_size(_context: fidl::encoding::Context) -> usize {
22941            16
22942        }
22943    }
22944
22945    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V2, D>
22946        for &Regression10V2
22947    {
22948        #[inline]
22949        unsafe fn encode(
22950            self,
22951            encoder: &mut fidl::encoding::Encoder<'_, D>,
22952            offset: usize,
22953            _depth: fidl::encoding::Depth,
22954        ) -> fidl::Result<()> {
22955            encoder.debug_check_bounds::<Regression10V2>(offset);
22956            // Delegate to tuple encoding.
22957            fidl::encoding::Encode::<Regression10V2, D>::encode(
22958                (<Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22959                encoder,
22960                offset,
22961                _depth,
22962            )
22963        }
22964    }
22965    unsafe impl<
22966        D: fidl::encoding::ResourceDialect,
22967        T0: fidl::encoding::Encode<Regression10TableV2, D>,
22968    > fidl::encoding::Encode<Regression10V2, D> for (T0,)
22969    {
22970        #[inline]
22971        unsafe fn encode(
22972            self,
22973            encoder: &mut fidl::encoding::Encoder<'_, D>,
22974            offset: usize,
22975            depth: fidl::encoding::Depth,
22976        ) -> fidl::Result<()> {
22977            encoder.debug_check_bounds::<Regression10V2>(offset);
22978            // Zero out padding regions. There's no need to apply masks
22979            // because the unmasked parts will be overwritten by fields.
22980            // Write the fields.
22981            self.0.encode(encoder, offset + 0, depth)?;
22982            Ok(())
22983        }
22984    }
22985
22986    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V2 {
22987        #[inline(always)]
22988        fn new_empty() -> Self {
22989            Self { table: fidl::new_empty!(Regression10TableV2, D) }
22990        }
22991
22992        #[inline]
22993        unsafe fn decode(
22994            &mut self,
22995            decoder: &mut fidl::encoding::Decoder<'_, D>,
22996            offset: usize,
22997            _depth: fidl::encoding::Depth,
22998        ) -> fidl::Result<()> {
22999            decoder.debug_check_bounds::<Self>(offset);
23000            // Verify that padding bytes are zero.
23001            fidl::decode!(Regression10TableV2, D, &mut self.table, decoder, offset + 0, _depth)?;
23002            Ok(())
23003        }
23004    }
23005
23006    impl fidl::encoding::ValueTypeMarker for Regression10V3 {
23007        type Borrowed<'a> = &'a Self;
23008        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23009            value
23010        }
23011    }
23012
23013    unsafe impl fidl::encoding::TypeMarker for Regression10V3 {
23014        type Owned = Self;
23015
23016        #[inline(always)]
23017        fn inline_align(_context: fidl::encoding::Context) -> usize {
23018            8
23019        }
23020
23021        #[inline(always)]
23022        fn inline_size(_context: fidl::encoding::Context) -> usize {
23023            16
23024        }
23025    }
23026
23027    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V3, D>
23028        for &Regression10V3
23029    {
23030        #[inline]
23031        unsafe fn encode(
23032            self,
23033            encoder: &mut fidl::encoding::Encoder<'_, D>,
23034            offset: usize,
23035            _depth: fidl::encoding::Depth,
23036        ) -> fidl::Result<()> {
23037            encoder.debug_check_bounds::<Regression10V3>(offset);
23038            // Delegate to tuple encoding.
23039            fidl::encoding::Encode::<Regression10V3, D>::encode(
23040                (<Regression10TableV3 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
23041                encoder,
23042                offset,
23043                _depth,
23044            )
23045        }
23046    }
23047    unsafe impl<
23048        D: fidl::encoding::ResourceDialect,
23049        T0: fidl::encoding::Encode<Regression10TableV3, D>,
23050    > fidl::encoding::Encode<Regression10V3, D> for (T0,)
23051    {
23052        #[inline]
23053        unsafe fn encode(
23054            self,
23055            encoder: &mut fidl::encoding::Encoder<'_, D>,
23056            offset: usize,
23057            depth: fidl::encoding::Depth,
23058        ) -> fidl::Result<()> {
23059            encoder.debug_check_bounds::<Regression10V3>(offset);
23060            // Zero out padding regions. There's no need to apply masks
23061            // because the unmasked parts will be overwritten by fields.
23062            // Write the fields.
23063            self.0.encode(encoder, offset + 0, depth)?;
23064            Ok(())
23065        }
23066    }
23067
23068    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V3 {
23069        #[inline(always)]
23070        fn new_empty() -> Self {
23071            Self { table: fidl::new_empty!(Regression10TableV3, D) }
23072        }
23073
23074        #[inline]
23075        unsafe fn decode(
23076            &mut self,
23077            decoder: &mut fidl::encoding::Decoder<'_, D>,
23078            offset: usize,
23079            _depth: fidl::encoding::Depth,
23080        ) -> fidl::Result<()> {
23081            decoder.debug_check_bounds::<Self>(offset);
23082            // Verify that padding bytes are zero.
23083            fidl::decode!(Regression10TableV3, D, &mut self.table, decoder, offset + 0, _depth)?;
23084            Ok(())
23085        }
23086    }
23087
23088    impl fidl::encoding::ValueTypeMarker for Regression11 {
23089        type Borrowed<'a> = &'a Self;
23090        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23091            value
23092        }
23093    }
23094
23095    unsafe impl fidl::encoding::TypeMarker for Regression11 {
23096        type Owned = Self;
23097
23098        #[inline(always)]
23099        fn inline_align(_context: fidl::encoding::Context) -> usize {
23100            8
23101        }
23102
23103        #[inline(always)]
23104        fn inline_size(_context: fidl::encoding::Context) -> usize {
23105            16
23106        }
23107    }
23108
23109    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression11, D>
23110        for &Regression11
23111    {
23112        #[inline]
23113        unsafe fn encode(
23114            self,
23115            encoder: &mut fidl::encoding::Encoder<'_, D>,
23116            offset: usize,
23117            _depth: fidl::encoding::Depth,
23118        ) -> fidl::Result<()> {
23119            encoder.debug_check_bounds::<Regression11>(offset);
23120            // Delegate to tuple encoding.
23121            fidl::encoding::Encode::<Regression11, D>::encode(
23122                (<UnionWithRegression10Table as fidl::encoding::ValueTypeMarker>::borrow(
23123                    &self.table_of_table,
23124                ),),
23125                encoder,
23126                offset,
23127                _depth,
23128            )
23129        }
23130    }
23131    unsafe impl<
23132        D: fidl::encoding::ResourceDialect,
23133        T0: fidl::encoding::Encode<UnionWithRegression10Table, D>,
23134    > fidl::encoding::Encode<Regression11, D> for (T0,)
23135    {
23136        #[inline]
23137        unsafe fn encode(
23138            self,
23139            encoder: &mut fidl::encoding::Encoder<'_, D>,
23140            offset: usize,
23141            depth: fidl::encoding::Depth,
23142        ) -> fidl::Result<()> {
23143            encoder.debug_check_bounds::<Regression11>(offset);
23144            // Zero out padding regions. There's no need to apply masks
23145            // because the unmasked parts will be overwritten by fields.
23146            // Write the fields.
23147            self.0.encode(encoder, offset + 0, depth)?;
23148            Ok(())
23149        }
23150    }
23151
23152    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression11 {
23153        #[inline(always)]
23154        fn new_empty() -> Self {
23155            Self { table_of_table: fidl::new_empty!(UnionWithRegression10Table, D) }
23156        }
23157
23158        #[inline]
23159        unsafe fn decode(
23160            &mut self,
23161            decoder: &mut fidl::encoding::Decoder<'_, D>,
23162            offset: usize,
23163            _depth: fidl::encoding::Depth,
23164        ) -> fidl::Result<()> {
23165            decoder.debug_check_bounds::<Self>(offset);
23166            // Verify that padding bytes are zero.
23167            fidl::decode!(
23168                UnionWithRegression10Table,
23169                D,
23170                &mut self.table_of_table,
23171                decoder,
23172                offset + 0,
23173                _depth
23174            )?;
23175            Ok(())
23176        }
23177    }
23178
23179    impl fidl::encoding::ValueTypeMarker for Regression2 {
23180        type Borrowed<'a> = &'a Self;
23181        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23182            value
23183        }
23184    }
23185
23186    unsafe impl fidl::encoding::TypeMarker for Regression2 {
23187        type Owned = Self;
23188
23189        #[inline(always)]
23190        fn inline_align(_context: fidl::encoding::Context) -> usize {
23191            8
23192        }
23193
23194        #[inline(always)]
23195        fn inline_size(_context: fidl::encoding::Context) -> usize {
23196            40
23197        }
23198    }
23199
23200    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression2, D>
23201        for &Regression2
23202    {
23203        #[inline]
23204        unsafe fn encode(
23205            self,
23206            encoder: &mut fidl::encoding::Encoder<'_, D>,
23207            offset: usize,
23208            _depth: fidl::encoding::Depth,
23209        ) -> fidl::Result<()> {
23210            encoder.debug_check_bounds::<Regression2>(offset);
23211            unsafe {
23212                // Copy the object into the buffer.
23213                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23214                (buf_ptr as *mut Regression2).write_unaligned((self as *const Regression2).read());
23215                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
23216                // done second because the memcpy will write garbage to these bytes.
23217                let padding_ptr = buf_ptr.offset(0) as *mut u64;
23218                let padding_mask = 0xffffff00u64;
23219                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23220                let padding_ptr = buf_ptr.offset(8) as *mut u64;
23221                let padding_mask = 0xffffffff0000ff00u64;
23222                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23223                let padding_ptr = buf_ptr.offset(24) as *mut u64;
23224                let padding_mask = 0xffffffffffffff00u64;
23225                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23226                let padding_ptr = buf_ptr.offset(32) as *mut u64;
23227                let padding_mask = 0xffffffffffffff00u64;
23228                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23229            }
23230            Ok(())
23231        }
23232    }
23233    unsafe impl<
23234        D: fidl::encoding::ResourceDialect,
23235        T0: fidl::encoding::Encode<Regression1, D>,
23236        T1: fidl::encoding::Encode<u8, D>,
23237    > fidl::encoding::Encode<Regression2, D> for (T0, T1)
23238    {
23239        #[inline]
23240        unsafe fn encode(
23241            self,
23242            encoder: &mut fidl::encoding::Encoder<'_, D>,
23243            offset: usize,
23244            depth: fidl::encoding::Depth,
23245        ) -> fidl::Result<()> {
23246            encoder.debug_check_bounds::<Regression2>(offset);
23247            // Zero out padding regions. There's no need to apply masks
23248            // because the unmasked parts will be overwritten by fields.
23249            unsafe {
23250                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
23251                (ptr as *mut u64).write_unaligned(0);
23252            }
23253            // Write the fields.
23254            self.0.encode(encoder, offset + 0, depth)?;
23255            self.1.encode(encoder, offset + 32, depth)?;
23256            Ok(())
23257        }
23258    }
23259
23260    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression2 {
23261        #[inline(always)]
23262        fn new_empty() -> Self {
23263            Self { head: fidl::new_empty!(Regression1, D), f7: fidl::new_empty!(u8, D) }
23264        }
23265
23266        #[inline]
23267        unsafe fn decode(
23268            &mut self,
23269            decoder: &mut fidl::encoding::Decoder<'_, D>,
23270            offset: usize,
23271            _depth: fidl::encoding::Depth,
23272        ) -> fidl::Result<()> {
23273            decoder.debug_check_bounds::<Self>(offset);
23274            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23275            // Verify that padding bytes are zero.
23276            let ptr = unsafe { buf_ptr.offset(0) };
23277            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23278            let mask = 0xffffff00u64;
23279            let maskedval = padval & mask;
23280            if maskedval != 0 {
23281                return Err(fidl::Error::NonZeroPadding {
23282                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23283                });
23284            }
23285            let ptr = unsafe { buf_ptr.offset(8) };
23286            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23287            let mask = 0xffffffff0000ff00u64;
23288            let maskedval = padval & mask;
23289            if maskedval != 0 {
23290                return Err(fidl::Error::NonZeroPadding {
23291                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23292                });
23293            }
23294            let ptr = unsafe { buf_ptr.offset(24) };
23295            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23296            let mask = 0xffffffffffffff00u64;
23297            let maskedval = padval & mask;
23298            if maskedval != 0 {
23299                return Err(fidl::Error::NonZeroPadding {
23300                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23301                });
23302            }
23303            let ptr = unsafe { buf_ptr.offset(32) };
23304            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23305            let mask = 0xffffffffffffff00u64;
23306            let maskedval = padval & mask;
23307            if maskedval != 0 {
23308                return Err(fidl::Error::NonZeroPadding {
23309                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
23310                });
23311            }
23312            // Copy from the buffer into the object.
23313            unsafe {
23314                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 40);
23315            }
23316            Ok(())
23317        }
23318    }
23319
23320    impl fidl::encoding::ValueTypeMarker for Regression3 {
23321        type Borrowed<'a> = &'a Self;
23322        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23323            value
23324        }
23325    }
23326
23327    unsafe impl fidl::encoding::TypeMarker for Regression3 {
23328        type Owned = Self;
23329
23330        #[inline(always)]
23331        fn inline_align(_context: fidl::encoding::Context) -> usize {
23332            8
23333        }
23334
23335        #[inline(always)]
23336        fn inline_size(_context: fidl::encoding::Context) -> usize {
23337            8
23338        }
23339    }
23340
23341    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression3, D>
23342        for &Regression3
23343    {
23344        #[inline]
23345        unsafe fn encode(
23346            self,
23347            encoder: &mut fidl::encoding::Encoder<'_, D>,
23348            offset: usize,
23349            _depth: fidl::encoding::Depth,
23350        ) -> fidl::Result<()> {
23351            encoder.debug_check_bounds::<Regression3>(offset);
23352            // Delegate to tuple encoding.
23353            fidl::encoding::Encode::<Regression3, D>::encode(
23354                (<fidl::encoding::Boxed<Regression2> as fidl::encoding::ValueTypeMarker>::borrow(
23355                    &self.opt_value,
23356                ),),
23357                encoder,
23358                offset,
23359                _depth,
23360            )
23361        }
23362    }
23363    unsafe impl<
23364        D: fidl::encoding::ResourceDialect,
23365        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Regression2>, D>,
23366    > fidl::encoding::Encode<Regression3, D> for (T0,)
23367    {
23368        #[inline]
23369        unsafe fn encode(
23370            self,
23371            encoder: &mut fidl::encoding::Encoder<'_, D>,
23372            offset: usize,
23373            depth: fidl::encoding::Depth,
23374        ) -> fidl::Result<()> {
23375            encoder.debug_check_bounds::<Regression3>(offset);
23376            // Zero out padding regions. There's no need to apply masks
23377            // because the unmasked parts will be overwritten by fields.
23378            // Write the fields.
23379            self.0.encode(encoder, offset + 0, depth)?;
23380            Ok(())
23381        }
23382    }
23383
23384    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression3 {
23385        #[inline(always)]
23386        fn new_empty() -> Self {
23387            Self { opt_value: fidl::new_empty!(fidl::encoding::Boxed<Regression2>, D) }
23388        }
23389
23390        #[inline]
23391        unsafe fn decode(
23392            &mut self,
23393            decoder: &mut fidl::encoding::Decoder<'_, D>,
23394            offset: usize,
23395            _depth: fidl::encoding::Depth,
23396        ) -> fidl::Result<()> {
23397            decoder.debug_check_bounds::<Self>(offset);
23398            // Verify that padding bytes are zero.
23399            fidl::decode!(
23400                fidl::encoding::Boxed<Regression2>,
23401                D,
23402                &mut self.opt_value,
23403                decoder,
23404                offset + 0,
23405                _depth
23406            )?;
23407            Ok(())
23408        }
23409    }
23410
23411    impl fidl::encoding::ValueTypeMarker for Regression4 {
23412        type Borrowed<'a> = &'a Self;
23413        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23414            value
23415        }
23416    }
23417
23418    unsafe impl fidl::encoding::TypeMarker for Regression4 {
23419        type Owned = Self;
23420
23421        #[inline(always)]
23422        fn inline_align(_context: fidl::encoding::Context) -> usize {
23423            8
23424        }
23425
23426        #[inline(always)]
23427        fn inline_size(_context: fidl::encoding::Context) -> usize {
23428            32
23429        }
23430    }
23431
23432    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression4, D>
23433        for &Regression4
23434    {
23435        #[inline]
23436        unsafe fn encode(
23437            self,
23438            encoder: &mut fidl::encoding::Encoder<'_, D>,
23439            offset: usize,
23440            _depth: fidl::encoding::Depth,
23441        ) -> fidl::Result<()> {
23442            encoder.debug_check_bounds::<Regression4>(offset);
23443            unsafe {
23444                // Copy the object into the buffer.
23445                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23446                (buf_ptr as *mut Regression4).write_unaligned((self as *const Regression4).read());
23447                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
23448                // done second because the memcpy will write garbage to these bytes.
23449                let padding_ptr = buf_ptr.offset(0) as *mut u64;
23450                let padding_mask = 0xffffff00u64;
23451                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23452                let padding_ptr = buf_ptr.offset(8) as *mut u64;
23453                let padding_mask = 0xffff000000000000u64;
23454                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23455                let padding_ptr = buf_ptr.offset(24) as *mut u64;
23456                let padding_mask = 0xffffffffffffff00u64;
23457                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23458            }
23459            Ok(())
23460        }
23461    }
23462    unsafe impl<
23463        D: fidl::encoding::ResourceDialect,
23464        T0: fidl::encoding::Encode<u8, D>,
23465        T1: fidl::encoding::Encode<u32, D>,
23466        T2: fidl::encoding::Encode<StructSize3Align1, D>,
23467        T3: fidl::encoding::Encode<u8, D>,
23468        T4: fidl::encoding::Encode<u16, D>,
23469        T5: fidl::encoding::Encode<u64, D>,
23470        T6: fidl::encoding::Encode<u8, D>,
23471    > fidl::encoding::Encode<Regression4, D> for (T0, T1, T2, T3, T4, T5, T6)
23472    {
23473        #[inline]
23474        unsafe fn encode(
23475            self,
23476            encoder: &mut fidl::encoding::Encoder<'_, D>,
23477            offset: usize,
23478            depth: fidl::encoding::Depth,
23479        ) -> fidl::Result<()> {
23480            encoder.debug_check_bounds::<Regression4>(offset);
23481            // Zero out padding regions. There's no need to apply masks
23482            // because the unmasked parts will be overwritten by fields.
23483            unsafe {
23484                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23485                (ptr as *mut u64).write_unaligned(0);
23486            }
23487            unsafe {
23488                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23489                (ptr as *mut u64).write_unaligned(0);
23490            }
23491            unsafe {
23492                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23493                (ptr as *mut u64).write_unaligned(0);
23494            }
23495            // Write the fields.
23496            self.0.encode(encoder, offset + 0, depth)?;
23497            self.1.encode(encoder, offset + 4, depth)?;
23498            self.2.encode(encoder, offset + 8, depth)?;
23499            self.3.encode(encoder, offset + 11, depth)?;
23500            self.4.encode(encoder, offset + 12, depth)?;
23501            self.5.encode(encoder, offset + 16, depth)?;
23502            self.6.encode(encoder, offset + 24, depth)?;
23503            Ok(())
23504        }
23505    }
23506
23507    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression4 {
23508        #[inline(always)]
23509        fn new_empty() -> Self {
23510            Self {
23511                f1: fidl::new_empty!(u8, D),
23512                f2: fidl::new_empty!(u32, D),
23513                s1: fidl::new_empty!(StructSize3Align1, D),
23514                f3: fidl::new_empty!(u8, D),
23515                f4: fidl::new_empty!(u16, D),
23516                f5: fidl::new_empty!(u64, D),
23517                f6: fidl::new_empty!(u8, D),
23518            }
23519        }
23520
23521        #[inline]
23522        unsafe fn decode(
23523            &mut self,
23524            decoder: &mut fidl::encoding::Decoder<'_, D>,
23525            offset: usize,
23526            _depth: fidl::encoding::Depth,
23527        ) -> fidl::Result<()> {
23528            decoder.debug_check_bounds::<Self>(offset);
23529            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23530            // Verify that padding bytes are zero.
23531            let ptr = unsafe { buf_ptr.offset(0) };
23532            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23533            let mask = 0xffffff00u64;
23534            let maskedval = padval & mask;
23535            if maskedval != 0 {
23536                return Err(fidl::Error::NonZeroPadding {
23537                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23538                });
23539            }
23540            let ptr = unsafe { buf_ptr.offset(8) };
23541            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23542            let mask = 0xffff000000000000u64;
23543            let maskedval = padval & mask;
23544            if maskedval != 0 {
23545                return Err(fidl::Error::NonZeroPadding {
23546                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23547                });
23548            }
23549            let ptr = unsafe { buf_ptr.offset(24) };
23550            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23551            let mask = 0xffffffffffffff00u64;
23552            let maskedval = padval & mask;
23553            if maskedval != 0 {
23554                return Err(fidl::Error::NonZeroPadding {
23555                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23556                });
23557            }
23558            // Copy from the buffer into the object.
23559            unsafe {
23560                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
23561            }
23562            Ok(())
23563        }
23564    }
23565
23566    impl fidl::encoding::ValueTypeMarker for Regression5 {
23567        type Borrowed<'a> = &'a Self;
23568        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23569            value
23570        }
23571    }
23572
23573    unsafe impl fidl::encoding::TypeMarker for Regression5 {
23574        type Owned = Self;
23575
23576        #[inline(always)]
23577        fn inline_align(_context: fidl::encoding::Context) -> usize {
23578            8
23579        }
23580
23581        #[inline(always)]
23582        fn inline_size(_context: fidl::encoding::Context) -> usize {
23583            32
23584        }
23585    }
23586
23587    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression5, D>
23588        for &Regression5
23589    {
23590        #[inline]
23591        unsafe fn encode(
23592            self,
23593            encoder: &mut fidl::encoding::Encoder<'_, D>,
23594            offset: usize,
23595            _depth: fidl::encoding::Depth,
23596        ) -> fidl::Result<()> {
23597            encoder.debug_check_bounds::<Regression5>(offset);
23598            // Delegate to tuple encoding.
23599            fidl::encoding::Encode::<Regression5, D>::encode(
23600                (
23601                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23602                    <EnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23603                    <EnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23604                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23605                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23606                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23607                ),
23608                encoder,
23609                offset,
23610                _depth,
23611            )
23612        }
23613    }
23614    unsafe impl<
23615        D: fidl::encoding::ResourceDialect,
23616        T0: fidl::encoding::Encode<u8, D>,
23617        T1: fidl::encoding::Encode<EnumUint32, D>,
23618        T2: fidl::encoding::Encode<EnumUint8, D>,
23619        T3: fidl::encoding::Encode<u16, D>,
23620        T4: fidl::encoding::Encode<u64, D>,
23621        T5: fidl::encoding::Encode<u8, D>,
23622    > fidl::encoding::Encode<Regression5, D> for (T0, T1, T2, T3, T4, T5)
23623    {
23624        #[inline]
23625        unsafe fn encode(
23626            self,
23627            encoder: &mut fidl::encoding::Encoder<'_, D>,
23628            offset: usize,
23629            depth: fidl::encoding::Depth,
23630        ) -> fidl::Result<()> {
23631            encoder.debug_check_bounds::<Regression5>(offset);
23632            // Zero out padding regions. There's no need to apply masks
23633            // because the unmasked parts will be overwritten by fields.
23634            unsafe {
23635                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23636                (ptr as *mut u64).write_unaligned(0);
23637            }
23638            unsafe {
23639                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23640                (ptr as *mut u64).write_unaligned(0);
23641            }
23642            unsafe {
23643                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23644                (ptr as *mut u64).write_unaligned(0);
23645            }
23646            // Write the fields.
23647            self.0.encode(encoder, offset + 0, depth)?;
23648            self.1.encode(encoder, offset + 4, depth)?;
23649            self.2.encode(encoder, offset + 8, depth)?;
23650            self.3.encode(encoder, offset + 10, depth)?;
23651            self.4.encode(encoder, offset + 16, depth)?;
23652            self.5.encode(encoder, offset + 24, depth)?;
23653            Ok(())
23654        }
23655    }
23656
23657    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression5 {
23658        #[inline(always)]
23659        fn new_empty() -> Self {
23660            Self {
23661                f1: fidl::new_empty!(u8, D),
23662                f2: fidl::new_empty!(EnumUint32, D),
23663                f3: fidl::new_empty!(EnumUint8, D),
23664                f4: fidl::new_empty!(u16, D),
23665                f5: fidl::new_empty!(u64, D),
23666                f6: fidl::new_empty!(u8, D),
23667            }
23668        }
23669
23670        #[inline]
23671        unsafe fn decode(
23672            &mut self,
23673            decoder: &mut fidl::encoding::Decoder<'_, D>,
23674            offset: usize,
23675            _depth: fidl::encoding::Depth,
23676        ) -> fidl::Result<()> {
23677            decoder.debug_check_bounds::<Self>(offset);
23678            // Verify that padding bytes are zero.
23679            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23680            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23681            let mask = 0xffffff00u64;
23682            let maskedval = padval & mask;
23683            if maskedval != 0 {
23684                return Err(fidl::Error::NonZeroPadding {
23685                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23686                });
23687            }
23688            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23689            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23690            let mask = 0xffffffff0000ff00u64;
23691            let maskedval = padval & mask;
23692            if maskedval != 0 {
23693                return Err(fidl::Error::NonZeroPadding {
23694                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23695                });
23696            }
23697            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23698            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23699            let mask = 0xffffffffffffff00u64;
23700            let maskedval = padval & mask;
23701            if maskedval != 0 {
23702                return Err(fidl::Error::NonZeroPadding {
23703                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23704                });
23705            }
23706            fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23707            fidl::decode!(EnumUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23708            fidl::decode!(EnumUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23709            fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23710            fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23711            fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23712            Ok(())
23713        }
23714    }
23715
23716    impl fidl::encoding::ValueTypeMarker for Regression6 {
23717        type Borrowed<'a> = &'a Self;
23718        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23719            value
23720        }
23721    }
23722
23723    unsafe impl fidl::encoding::TypeMarker for Regression6 {
23724        type Owned = Self;
23725
23726        #[inline(always)]
23727        fn inline_align(_context: fidl::encoding::Context) -> usize {
23728            8
23729        }
23730
23731        #[inline(always)]
23732        fn inline_size(_context: fidl::encoding::Context) -> usize {
23733            32
23734        }
23735    }
23736
23737    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression6, D>
23738        for &Regression6
23739    {
23740        #[inline]
23741        unsafe fn encode(
23742            self,
23743            encoder: &mut fidl::encoding::Encoder<'_, D>,
23744            offset: usize,
23745            _depth: fidl::encoding::Depth,
23746        ) -> fidl::Result<()> {
23747            encoder.debug_check_bounds::<Regression6>(offset);
23748            // Delegate to tuple encoding.
23749            fidl::encoding::Encode::<Regression6, D>::encode(
23750                (
23751                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23752                    <BitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23753                    <BitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23754                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23755                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23756                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23757                ),
23758                encoder,
23759                offset,
23760                _depth,
23761            )
23762        }
23763    }
23764    unsafe impl<
23765        D: fidl::encoding::ResourceDialect,
23766        T0: fidl::encoding::Encode<u8, D>,
23767        T1: fidl::encoding::Encode<BitsUint32, D>,
23768        T2: fidl::encoding::Encode<BitsUint8, D>,
23769        T3: fidl::encoding::Encode<u16, D>,
23770        T4: fidl::encoding::Encode<u64, D>,
23771        T5: fidl::encoding::Encode<u8, D>,
23772    > fidl::encoding::Encode<Regression6, D> for (T0, T1, T2, T3, T4, T5)
23773    {
23774        #[inline]
23775        unsafe fn encode(
23776            self,
23777            encoder: &mut fidl::encoding::Encoder<'_, D>,
23778            offset: usize,
23779            depth: fidl::encoding::Depth,
23780        ) -> fidl::Result<()> {
23781            encoder.debug_check_bounds::<Regression6>(offset);
23782            // Zero out padding regions. There's no need to apply masks
23783            // because the unmasked parts will be overwritten by fields.
23784            unsafe {
23785                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23786                (ptr as *mut u64).write_unaligned(0);
23787            }
23788            unsafe {
23789                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23790                (ptr as *mut u64).write_unaligned(0);
23791            }
23792            unsafe {
23793                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23794                (ptr as *mut u64).write_unaligned(0);
23795            }
23796            // Write the fields.
23797            self.0.encode(encoder, offset + 0, depth)?;
23798            self.1.encode(encoder, offset + 4, depth)?;
23799            self.2.encode(encoder, offset + 8, depth)?;
23800            self.3.encode(encoder, offset + 10, depth)?;
23801            self.4.encode(encoder, offset + 16, depth)?;
23802            self.5.encode(encoder, offset + 24, depth)?;
23803            Ok(())
23804        }
23805    }
23806
23807    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression6 {
23808        #[inline(always)]
23809        fn new_empty() -> Self {
23810            Self {
23811                f1: fidl::new_empty!(u8, D),
23812                f2: fidl::new_empty!(BitsUint32, D),
23813                f3: fidl::new_empty!(BitsUint8, D),
23814                f4: fidl::new_empty!(u16, D),
23815                f5: fidl::new_empty!(u64, D),
23816                f6: fidl::new_empty!(u8, D),
23817            }
23818        }
23819
23820        #[inline]
23821        unsafe fn decode(
23822            &mut self,
23823            decoder: &mut fidl::encoding::Decoder<'_, D>,
23824            offset: usize,
23825            _depth: fidl::encoding::Depth,
23826        ) -> fidl::Result<()> {
23827            decoder.debug_check_bounds::<Self>(offset);
23828            // Verify that padding bytes are zero.
23829            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23830            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23831            let mask = 0xffffff00u64;
23832            let maskedval = padval & mask;
23833            if maskedval != 0 {
23834                return Err(fidl::Error::NonZeroPadding {
23835                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23836                });
23837            }
23838            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23839            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23840            let mask = 0xffffffff0000ff00u64;
23841            let maskedval = padval & mask;
23842            if maskedval != 0 {
23843                return Err(fidl::Error::NonZeroPadding {
23844                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23845                });
23846            }
23847            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23848            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23849            let mask = 0xffffffffffffff00u64;
23850            let maskedval = padval & mask;
23851            if maskedval != 0 {
23852                return Err(fidl::Error::NonZeroPadding {
23853                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23854                });
23855            }
23856            fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23857            fidl::decode!(BitsUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23858            fidl::decode!(BitsUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23859            fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23860            fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23861            fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23862            Ok(())
23863        }
23864    }
23865
23866    impl fidl::encoding::ValueTypeMarker for Regression7TableUnionXUnion {
23867        type Borrowed<'a> = &'a Self;
23868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23869            value
23870        }
23871    }
23872
23873    unsafe impl fidl::encoding::TypeMarker for Regression7TableUnionXUnion {
23874        type Owned = Self;
23875
23876        #[inline(always)]
23877        fn inline_align(_context: fidl::encoding::Context) -> usize {
23878            8
23879        }
23880
23881        #[inline(always)]
23882        fn inline_size(_context: fidl::encoding::Context) -> usize {
23883            16
23884        }
23885    }
23886
23887    unsafe impl<D: fidl::encoding::ResourceDialect>
23888        fidl::encoding::Encode<Regression7TableUnionXUnion, D> for &Regression7TableUnionXUnion
23889    {
23890        #[inline]
23891        unsafe fn encode(
23892            self,
23893            encoder: &mut fidl::encoding::Encoder<'_, D>,
23894            offset: usize,
23895            _depth: fidl::encoding::Depth,
23896        ) -> fidl::Result<()> {
23897            encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23898            // Delegate to tuple encoding.
23899            fidl::encoding::Encode::<Regression7TableUnionXUnion, D>::encode(
23900                (
23901                    <TableOfUnionThenXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
23902                ),
23903                encoder, offset, _depth
23904            )
23905        }
23906    }
23907    unsafe impl<
23908        D: fidl::encoding::ResourceDialect,
23909        T0: fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>,
23910    > fidl::encoding::Encode<Regression7TableUnionXUnion, D> for (T0,)
23911    {
23912        #[inline]
23913        unsafe fn encode(
23914            self,
23915            encoder: &mut fidl::encoding::Encoder<'_, D>,
23916            offset: usize,
23917            depth: fidl::encoding::Depth,
23918        ) -> fidl::Result<()> {
23919            encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23920            // Zero out padding regions. There's no need to apply masks
23921            // because the unmasked parts will be overwritten by fields.
23922            // Write the fields.
23923            self.0.encode(encoder, offset + 0, depth)?;
23924            Ok(())
23925        }
23926    }
23927
23928    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23929        for Regression7TableUnionXUnion
23930    {
23931        #[inline(always)]
23932        fn new_empty() -> Self {
23933            Self { value: fidl::new_empty!(TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D) }
23934        }
23935
23936        #[inline]
23937        unsafe fn decode(
23938            &mut self,
23939            decoder: &mut fidl::encoding::Decoder<'_, D>,
23940            offset: usize,
23941            _depth: fidl::encoding::Depth,
23942        ) -> fidl::Result<()> {
23943            decoder.debug_check_bounds::<Self>(offset);
23944            // Verify that padding bytes are zero.
23945            fidl::decode!(
23946                TableOfUnionThenXUnionThenTableThenXUnionThenUnion,
23947                D,
23948                &mut self.value,
23949                decoder,
23950                offset + 0,
23951                _depth
23952            )?;
23953            Ok(())
23954        }
23955    }
23956
23957    impl fidl::encoding::ValueTypeMarker for Regression8OptUnionSize12Align4 {
23958        type Borrowed<'a> = &'a Self;
23959        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23960            value
23961        }
23962    }
23963
23964    unsafe impl fidl::encoding::TypeMarker for Regression8OptUnionSize12Align4 {
23965        type Owned = Self;
23966
23967        #[inline(always)]
23968        fn inline_align(_context: fidl::encoding::Context) -> usize {
23969            8
23970        }
23971
23972        #[inline(always)]
23973        fn inline_size(_context: fidl::encoding::Context) -> usize {
23974            48
23975        }
23976    }
23977
23978    unsafe impl<D: fidl::encoding::ResourceDialect>
23979        fidl::encoding::Encode<Regression8OptUnionSize12Align4, D>
23980        for &Regression8OptUnionSize12Align4
23981    {
23982        #[inline]
23983        unsafe fn encode(
23984            self,
23985            encoder: &mut fidl::encoding::Encoder<'_, D>,
23986            offset: usize,
23987            _depth: fidl::encoding::Depth,
23988        ) -> fidl::Result<()> {
23989            encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
23990            // Delegate to tuple encoding.
23991            fidl::encoding::Encode::<Regression8OptUnionSize12Align4, D>::encode(
23992                (
23993                    <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union1),
23994                    <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union2),
23995                    <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union3),
23996                ),
23997                encoder, offset, _depth
23998            )
23999        }
24000    }
24001    unsafe impl<
24002        D: fidl::encoding::ResourceDialect,
24003        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
24004        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
24005        T2: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
24006    > fidl::encoding::Encode<Regression8OptUnionSize12Align4, D> for (T0, T1, T2)
24007    {
24008        #[inline]
24009        unsafe fn encode(
24010            self,
24011            encoder: &mut fidl::encoding::Encoder<'_, D>,
24012            offset: usize,
24013            depth: fidl::encoding::Depth,
24014        ) -> fidl::Result<()> {
24015            encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
24016            // Zero out padding regions. There's no need to apply masks
24017            // because the unmasked parts will be overwritten by fields.
24018            // Write the fields.
24019            self.0.encode(encoder, offset + 0, depth)?;
24020            self.1.encode(encoder, offset + 16, depth)?;
24021            self.2.encode(encoder, offset + 32, depth)?;
24022            Ok(())
24023        }
24024    }
24025
24026    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24027        for Regression8OptUnionSize12Align4
24028    {
24029        #[inline(always)]
24030        fn new_empty() -> Self {
24031            Self {
24032                opt_union1: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
24033                opt_union2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
24034                opt_union3: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
24035            }
24036        }
24037
24038        #[inline]
24039        unsafe fn decode(
24040            &mut self,
24041            decoder: &mut fidl::encoding::Decoder<'_, D>,
24042            offset: usize,
24043            _depth: fidl::encoding::Depth,
24044        ) -> fidl::Result<()> {
24045            decoder.debug_check_bounds::<Self>(offset);
24046            // Verify that padding bytes are zero.
24047            fidl::decode!(
24048                fidl::encoding::OptionalUnion<UnionSize12Align4>,
24049                D,
24050                &mut self.opt_union1,
24051                decoder,
24052                offset + 0,
24053                _depth
24054            )?;
24055            fidl::decode!(
24056                fidl::encoding::OptionalUnion<UnionSize12Align4>,
24057                D,
24058                &mut self.opt_union2,
24059                decoder,
24060                offset + 16,
24061                _depth
24062            )?;
24063            fidl::decode!(
24064                fidl::encoding::OptionalUnion<UnionSize12Align4>,
24065                D,
24066                &mut self.opt_union3,
24067                decoder,
24068                offset + 32,
24069                _depth
24070            )?;
24071            Ok(())
24072        }
24073    }
24074
24075    impl fidl::encoding::ValueTypeMarker for Regression8TableWithUnionSize12Align4 {
24076        type Borrowed<'a> = &'a Self;
24077        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24078            value
24079        }
24080    }
24081
24082    unsafe impl fidl::encoding::TypeMarker for Regression8TableWithUnionSize12Align4 {
24083        type Owned = Self;
24084
24085        #[inline(always)]
24086        fn inline_align(_context: fidl::encoding::Context) -> usize {
24087            8
24088        }
24089
24090        #[inline(always)]
24091        fn inline_size(_context: fidl::encoding::Context) -> usize {
24092            16
24093        }
24094    }
24095
24096    unsafe impl<D: fidl::encoding::ResourceDialect>
24097        fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D>
24098        for &Regression8TableWithUnionSize12Align4
24099    {
24100        #[inline]
24101        unsafe fn encode(
24102            self,
24103            encoder: &mut fidl::encoding::Encoder<'_, D>,
24104            offset: usize,
24105            _depth: fidl::encoding::Depth,
24106        ) -> fidl::Result<()> {
24107            encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
24108            // Delegate to tuple encoding.
24109            fidl::encoding::Encode::<Regression8TableWithUnionSize12Align4, D>::encode(
24110                (<TableWithUnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(
24111                    &self.value,
24112                ),),
24113                encoder,
24114                offset,
24115                _depth,
24116            )
24117        }
24118    }
24119    unsafe impl<
24120        D: fidl::encoding::ResourceDialect,
24121        T0: fidl::encoding::Encode<TableWithUnionSize12Align4, D>,
24122    > fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D> for (T0,)
24123    {
24124        #[inline]
24125        unsafe fn encode(
24126            self,
24127            encoder: &mut fidl::encoding::Encoder<'_, D>,
24128            offset: usize,
24129            depth: fidl::encoding::Depth,
24130        ) -> fidl::Result<()> {
24131            encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
24132            // Zero out padding regions. There's no need to apply masks
24133            // because the unmasked parts will be overwritten by fields.
24134            // Write the fields.
24135            self.0.encode(encoder, offset + 0, depth)?;
24136            Ok(())
24137        }
24138    }
24139
24140    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24141        for Regression8TableWithUnionSize12Align4
24142    {
24143        #[inline(always)]
24144        fn new_empty() -> Self {
24145            Self { value: fidl::new_empty!(TableWithUnionSize12Align4, D) }
24146        }
24147
24148        #[inline]
24149        unsafe fn decode(
24150            &mut self,
24151            decoder: &mut fidl::encoding::Decoder<'_, D>,
24152            offset: usize,
24153            _depth: fidl::encoding::Depth,
24154        ) -> fidl::Result<()> {
24155            decoder.debug_check_bounds::<Self>(offset);
24156            // Verify that padding bytes are zero.
24157            fidl::decode!(
24158                TableWithUnionSize12Align4,
24159                D,
24160                &mut self.value,
24161                decoder,
24162                offset + 0,
24163                _depth
24164            )?;
24165            Ok(())
24166        }
24167    }
24168
24169    impl fidl::encoding::ValueTypeMarker for Regression8VectorOfOptUnionSize12Align4 {
24170        type Borrowed<'a> = &'a Self;
24171        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24172            value
24173        }
24174    }
24175
24176    unsafe impl fidl::encoding::TypeMarker for Regression8VectorOfOptUnionSize12Align4 {
24177        type Owned = Self;
24178
24179        #[inline(always)]
24180        fn inline_align(_context: fidl::encoding::Context) -> usize {
24181            8
24182        }
24183
24184        #[inline(always)]
24185        fn inline_size(_context: fidl::encoding::Context) -> usize {
24186            16
24187        }
24188    }
24189
24190    unsafe impl<D: fidl::encoding::ResourceDialect>
24191        fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D>
24192        for &Regression8VectorOfOptUnionSize12Align4
24193    {
24194        #[inline]
24195        unsafe fn encode(
24196            self,
24197            encoder: &mut fidl::encoding::Encoder<'_, D>,
24198            offset: usize,
24199            _depth: fidl::encoding::Depth,
24200        ) -> fidl::Result<()> {
24201            encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24202            // Delegate to tuple encoding.
24203            fidl::encoding::Encode::<Regression8VectorOfOptUnionSize12Align4, D>::encode(
24204                (
24205                    <fidl::encoding::UnboundedVector<
24206                        fidl::encoding::OptionalUnion<UnionSize12Align4>,
24207                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
24208                ),
24209                encoder,
24210                offset,
24211                _depth,
24212            )
24213        }
24214    }
24215    unsafe impl<
24216        D: fidl::encoding::ResourceDialect,
24217        T0: fidl::encoding::Encode<
24218                fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24219                D,
24220            >,
24221    > fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D> for (T0,)
24222    {
24223        #[inline]
24224        unsafe fn encode(
24225            self,
24226            encoder: &mut fidl::encoding::Encoder<'_, D>,
24227            offset: usize,
24228            depth: fidl::encoding::Depth,
24229        ) -> fidl::Result<()> {
24230            encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24231            // Zero out padding regions. There's no need to apply masks
24232            // because the unmasked parts will be overwritten by fields.
24233            // Write the fields.
24234            self.0.encode(encoder, offset + 0, depth)?;
24235            Ok(())
24236        }
24237    }
24238
24239    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24240        for Regression8VectorOfOptUnionSize12Align4
24241    {
24242        #[inline(always)]
24243        fn new_empty() -> Self {
24244            Self {
24245                value: fidl::new_empty!(
24246                    fidl::encoding::UnboundedVector<
24247                        fidl::encoding::OptionalUnion<UnionSize12Align4>,
24248                    >,
24249                    D
24250                ),
24251            }
24252        }
24253
24254        #[inline]
24255        unsafe fn decode(
24256            &mut self,
24257            decoder: &mut fidl::encoding::Decoder<'_, D>,
24258            offset: usize,
24259            _depth: fidl::encoding::Depth,
24260        ) -> fidl::Result<()> {
24261            decoder.debug_check_bounds::<Self>(offset);
24262            // Verify that padding bytes are zero.
24263            fidl::decode!(
24264                fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24265                D,
24266                &mut self.value,
24267                decoder,
24268                offset + 0,
24269                _depth
24270            )?;
24271            Ok(())
24272        }
24273    }
24274
24275    impl fidl::encoding::ValueTypeMarker for Regression9Message {
24276        type Borrowed<'a> = &'a Self;
24277        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24278            value
24279        }
24280    }
24281
24282    unsafe impl fidl::encoding::TypeMarker for Regression9Message {
24283        type Owned = Self;
24284
24285        #[inline(always)]
24286        fn inline_align(_context: fidl::encoding::Context) -> usize {
24287            8
24288        }
24289
24290        #[inline(always)]
24291        fn inline_size(_context: fidl::encoding::Context) -> usize {
24292            32
24293        }
24294    }
24295
24296    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Message, D>
24297        for &Regression9Message
24298    {
24299        #[inline]
24300        unsafe fn encode(
24301            self,
24302            encoder: &mut fidl::encoding::Encoder<'_, D>,
24303            offset: usize,
24304            _depth: fidl::encoding::Depth,
24305        ) -> fidl::Result<()> {
24306            encoder.debug_check_bounds::<Regression9Message>(offset);
24307            // Delegate to tuple encoding.
24308            fidl::encoding::Encode::<Regression9Message, D>::encode(
24309                (
24310                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24311                    <Regression9Result as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24312                ),
24313                encoder,
24314                offset,
24315                _depth,
24316            )
24317        }
24318    }
24319    unsafe impl<
24320        D: fidl::encoding::ResourceDialect,
24321        T0: fidl::encoding::Encode<TransactionHeader, D>,
24322        T1: fidl::encoding::Encode<Regression9Result, D>,
24323    > fidl::encoding::Encode<Regression9Message, D> for (T0, T1)
24324    {
24325        #[inline]
24326        unsafe fn encode(
24327            self,
24328            encoder: &mut fidl::encoding::Encoder<'_, D>,
24329            offset: usize,
24330            depth: fidl::encoding::Depth,
24331        ) -> fidl::Result<()> {
24332            encoder.debug_check_bounds::<Regression9Message>(offset);
24333            // Zero out padding regions. There's no need to apply masks
24334            // because the unmasked parts will be overwritten by fields.
24335            // Write the fields.
24336            self.0.encode(encoder, offset + 0, depth)?;
24337            self.1.encode(encoder, offset + 16, depth)?;
24338            Ok(())
24339        }
24340    }
24341
24342    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Message {
24343        #[inline(always)]
24344        fn new_empty() -> Self {
24345            Self {
24346                header: fidl::new_empty!(TransactionHeader, D),
24347                body: fidl::new_empty!(Regression9Result, D),
24348            }
24349        }
24350
24351        #[inline]
24352        unsafe fn decode(
24353            &mut self,
24354            decoder: &mut fidl::encoding::Decoder<'_, D>,
24355            offset: usize,
24356            _depth: fidl::encoding::Depth,
24357        ) -> fidl::Result<()> {
24358            decoder.debug_check_bounds::<Self>(offset);
24359            // Verify that padding bytes are zero.
24360            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24361            fidl::decode!(Regression9Result, D, &mut self.body, decoder, offset + 16, _depth)?;
24362            Ok(())
24363        }
24364    }
24365
24366    impl fidl::encoding::ValueTypeMarker for Regression9Value {
24367        type Borrowed<'a> = &'a Self;
24368        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24369            value
24370        }
24371    }
24372
24373    unsafe impl fidl::encoding::TypeMarker for Regression9Value {
24374        type Owned = Self;
24375
24376        #[inline(always)]
24377        fn inline_align(_context: fidl::encoding::Context) -> usize {
24378            8
24379        }
24380
24381        #[inline(always)]
24382        fn inline_size(_context: fidl::encoding::Context) -> usize {
24383            32
24384        }
24385    }
24386
24387    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Value, D>
24388        for &Regression9Value
24389    {
24390        #[inline]
24391        unsafe fn encode(
24392            self,
24393            encoder: &mut fidl::encoding::Encoder<'_, D>,
24394            offset: usize,
24395            _depth: fidl::encoding::Depth,
24396        ) -> fidl::Result<()> {
24397            encoder.debug_check_bounds::<Regression9Value>(offset);
24398            // Delegate to tuple encoding.
24399            fidl::encoding::Encode::<Regression9Value, D>::encode(
24400                (
24401                    <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
24402                    <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
24403                ),
24404                encoder, offset, _depth
24405            )
24406        }
24407    }
24408    unsafe impl<
24409        D: fidl::encoding::ResourceDialect,
24410        T0: fidl::encoding::Encode<StringBoolUnion, D>,
24411        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
24412    > fidl::encoding::Encode<Regression9Value, D> for (T0, T1)
24413    {
24414        #[inline]
24415        unsafe fn encode(
24416            self,
24417            encoder: &mut fidl::encoding::Encoder<'_, D>,
24418            offset: usize,
24419            depth: fidl::encoding::Depth,
24420        ) -> fidl::Result<()> {
24421            encoder.debug_check_bounds::<Regression9Value>(offset);
24422            // Zero out padding regions. There's no need to apply masks
24423            // because the unmasked parts will be overwritten by fields.
24424            // Write the fields.
24425            self.0.encode(encoder, offset + 0, depth)?;
24426            self.1.encode(encoder, offset + 16, depth)?;
24427            Ok(())
24428        }
24429    }
24430
24431    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Value {
24432        #[inline(always)]
24433        fn new_empty() -> Self {
24434            Self {
24435                u: fidl::new_empty!(StringBoolUnion, D),
24436                nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
24437            }
24438        }
24439
24440        #[inline]
24441        unsafe fn decode(
24442            &mut self,
24443            decoder: &mut fidl::encoding::Decoder<'_, D>,
24444            offset: usize,
24445            _depth: fidl::encoding::Depth,
24446        ) -> fidl::Result<()> {
24447            decoder.debug_check_bounds::<Self>(offset);
24448            // Verify that padding bytes are zero.
24449            fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24450            fidl::decode!(
24451                fidl::encoding::OptionalUnion<StringBoolUnion>,
24452                D,
24453                &mut self.nullable_u,
24454                decoder,
24455                offset + 16,
24456                _depth
24457            )?;
24458            Ok(())
24459        }
24460    }
24461
24462    impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnionStruct {
24463        type Borrowed<'a> = &'a Self;
24464        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24465            value
24466        }
24467    }
24468
24469    unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnionStruct {
24470        type Owned = Self;
24471
24472        #[inline(always)]
24473        fn inline_align(_context: fidl::encoding::Context) -> usize {
24474            8
24475        }
24476
24477        #[inline(always)]
24478        fn inline_size(_context: fidl::encoding::Context) -> usize {
24479            16
24480        }
24481    }
24482
24483    unsafe impl<D: fidl::encoding::ResourceDialect>
24484        fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for &ReverseOrdinalUnionStruct
24485    {
24486        #[inline]
24487        unsafe fn encode(
24488            self,
24489            encoder: &mut fidl::encoding::Encoder<'_, D>,
24490            offset: usize,
24491            _depth: fidl::encoding::Depth,
24492        ) -> fidl::Result<()> {
24493            encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24494            // Delegate to tuple encoding.
24495            fidl::encoding::Encode::<ReverseOrdinalUnionStruct, D>::encode(
24496                (<ReverseOrdinalUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
24497                encoder,
24498                offset,
24499                _depth,
24500            )
24501        }
24502    }
24503    unsafe impl<
24504        D: fidl::encoding::ResourceDialect,
24505        T0: fidl::encoding::Encode<ReverseOrdinalUnion, D>,
24506    > fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for (T0,)
24507    {
24508        #[inline]
24509        unsafe fn encode(
24510            self,
24511            encoder: &mut fidl::encoding::Encoder<'_, D>,
24512            offset: usize,
24513            depth: fidl::encoding::Depth,
24514        ) -> fidl::Result<()> {
24515            encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24516            // Zero out padding regions. There's no need to apply masks
24517            // because the unmasked parts will be overwritten by fields.
24518            // Write the fields.
24519            self.0.encode(encoder, offset + 0, depth)?;
24520            Ok(())
24521        }
24522    }
24523
24524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24525        for ReverseOrdinalUnionStruct
24526    {
24527        #[inline(always)]
24528        fn new_empty() -> Self {
24529            Self { u: fidl::new_empty!(ReverseOrdinalUnion, D) }
24530        }
24531
24532        #[inline]
24533        unsafe fn decode(
24534            &mut self,
24535            decoder: &mut fidl::encoding::Decoder<'_, D>,
24536            offset: usize,
24537            _depth: fidl::encoding::Depth,
24538        ) -> fidl::Result<()> {
24539            decoder.debug_check_bounds::<Self>(offset);
24540            // Verify that padding bytes are zero.
24541            fidl::decode!(ReverseOrdinalUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24542            Ok(())
24543        }
24544    }
24545
24546    impl fidl::encoding::ValueTypeMarker for Sandwich1 {
24547        type Borrowed<'a> = &'a Self;
24548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24549            value
24550        }
24551    }
24552
24553    unsafe impl fidl::encoding::TypeMarker for Sandwich1 {
24554        type Owned = Self;
24555
24556        #[inline(always)]
24557        fn inline_align(_context: fidl::encoding::Context) -> usize {
24558            8
24559        }
24560
24561        #[inline(always)]
24562        fn inline_size(_context: fidl::encoding::Context) -> usize {
24563            32
24564        }
24565    }
24566
24567    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1, D>
24568        for &Sandwich1
24569    {
24570        #[inline]
24571        unsafe fn encode(
24572            self,
24573            encoder: &mut fidl::encoding::Encoder<'_, D>,
24574            offset: usize,
24575            _depth: fidl::encoding::Depth,
24576        ) -> fidl::Result<()> {
24577            encoder.debug_check_bounds::<Sandwich1>(offset);
24578            // Delegate to tuple encoding.
24579            fidl::encoding::Encode::<Sandwich1, D>::encode(
24580                (
24581                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24582                    <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24583                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24584                ),
24585                encoder,
24586                offset,
24587                _depth,
24588            )
24589        }
24590    }
24591    unsafe impl<
24592        D: fidl::encoding::ResourceDialect,
24593        T0: fidl::encoding::Encode<u32, D>,
24594        T1: fidl::encoding::Encode<UnionSize8Align4, D>,
24595        T2: fidl::encoding::Encode<u32, D>,
24596    > fidl::encoding::Encode<Sandwich1, D> for (T0, T1, T2)
24597    {
24598        #[inline]
24599        unsafe fn encode(
24600            self,
24601            encoder: &mut fidl::encoding::Encoder<'_, D>,
24602            offset: usize,
24603            depth: fidl::encoding::Depth,
24604        ) -> fidl::Result<()> {
24605            encoder.debug_check_bounds::<Sandwich1>(offset);
24606            // Zero out padding regions. There's no need to apply masks
24607            // because the unmasked parts will be overwritten by fields.
24608            unsafe {
24609                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24610                (ptr as *mut u64).write_unaligned(0);
24611            }
24612            unsafe {
24613                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24614                (ptr as *mut u64).write_unaligned(0);
24615            }
24616            // Write the fields.
24617            self.0.encode(encoder, offset + 0, depth)?;
24618            self.1.encode(encoder, offset + 8, depth)?;
24619            self.2.encode(encoder, offset + 24, depth)?;
24620            Ok(())
24621        }
24622    }
24623
24624    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1 {
24625        #[inline(always)]
24626        fn new_empty() -> Self {
24627            Self {
24628                before: fidl::new_empty!(u32, D),
24629                the_union: fidl::new_empty!(UnionSize8Align4, D),
24630                after: fidl::new_empty!(u32, D),
24631            }
24632        }
24633
24634        #[inline]
24635        unsafe fn decode(
24636            &mut self,
24637            decoder: &mut fidl::encoding::Decoder<'_, D>,
24638            offset: usize,
24639            _depth: fidl::encoding::Depth,
24640        ) -> fidl::Result<()> {
24641            decoder.debug_check_bounds::<Self>(offset);
24642            // Verify that padding bytes are zero.
24643            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24644            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24645            let mask = 0xffffffff00000000u64;
24646            let maskedval = padval & mask;
24647            if maskedval != 0 {
24648                return Err(fidl::Error::NonZeroPadding {
24649                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24650                });
24651            }
24652            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24653            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24654            let mask = 0xffffffff00000000u64;
24655            let maskedval = padval & mask;
24656            if maskedval != 0 {
24657                return Err(fidl::Error::NonZeroPadding {
24658                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24659                });
24660            }
24661            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24662            fidl::decode!(UnionSize8Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24663            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24664            Ok(())
24665        }
24666    }
24667
24668    impl fidl::encoding::ValueTypeMarker for Sandwich1Message {
24669        type Borrowed<'a> = &'a Self;
24670        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24671            value
24672        }
24673    }
24674
24675    unsafe impl fidl::encoding::TypeMarker for Sandwich1Message {
24676        type Owned = Self;
24677
24678        #[inline(always)]
24679        fn inline_align(_context: fidl::encoding::Context) -> usize {
24680            8
24681        }
24682
24683        #[inline(always)]
24684        fn inline_size(_context: fidl::encoding::Context) -> usize {
24685            48
24686        }
24687    }
24688
24689    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1Message, D>
24690        for &Sandwich1Message
24691    {
24692        #[inline]
24693        unsafe fn encode(
24694            self,
24695            encoder: &mut fidl::encoding::Encoder<'_, D>,
24696            offset: usize,
24697            _depth: fidl::encoding::Depth,
24698        ) -> fidl::Result<()> {
24699            encoder.debug_check_bounds::<Sandwich1Message>(offset);
24700            // Delegate to tuple encoding.
24701            fidl::encoding::Encode::<Sandwich1Message, D>::encode(
24702                (
24703                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24704                    <Sandwich1 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24705                ),
24706                encoder,
24707                offset,
24708                _depth,
24709            )
24710        }
24711    }
24712    unsafe impl<
24713        D: fidl::encoding::ResourceDialect,
24714        T0: fidl::encoding::Encode<TransactionHeader, D>,
24715        T1: fidl::encoding::Encode<Sandwich1, D>,
24716    > fidl::encoding::Encode<Sandwich1Message, D> for (T0, T1)
24717    {
24718        #[inline]
24719        unsafe fn encode(
24720            self,
24721            encoder: &mut fidl::encoding::Encoder<'_, D>,
24722            offset: usize,
24723            depth: fidl::encoding::Depth,
24724        ) -> fidl::Result<()> {
24725            encoder.debug_check_bounds::<Sandwich1Message>(offset);
24726            // Zero out padding regions. There's no need to apply masks
24727            // because the unmasked parts will be overwritten by fields.
24728            // Write the fields.
24729            self.0.encode(encoder, offset + 0, depth)?;
24730            self.1.encode(encoder, offset + 16, depth)?;
24731            Ok(())
24732        }
24733    }
24734
24735    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1Message {
24736        #[inline(always)]
24737        fn new_empty() -> Self {
24738            Self {
24739                header: fidl::new_empty!(TransactionHeader, D),
24740                body: fidl::new_empty!(Sandwich1, D),
24741            }
24742        }
24743
24744        #[inline]
24745        unsafe fn decode(
24746            &mut self,
24747            decoder: &mut fidl::encoding::Decoder<'_, D>,
24748            offset: usize,
24749            _depth: fidl::encoding::Depth,
24750        ) -> fidl::Result<()> {
24751            decoder.debug_check_bounds::<Self>(offset);
24752            // Verify that padding bytes are zero.
24753            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24754            fidl::decode!(Sandwich1, D, &mut self.body, decoder, offset + 16, _depth)?;
24755            Ok(())
24756        }
24757    }
24758
24759    impl fidl::encoding::ValueTypeMarker for Sandwich1WithOptUnion {
24760        type Borrowed<'a> = &'a Self;
24761        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24762            value
24763        }
24764    }
24765
24766    unsafe impl fidl::encoding::TypeMarker for Sandwich1WithOptUnion {
24767        type Owned = Self;
24768
24769        #[inline(always)]
24770        fn inline_align(_context: fidl::encoding::Context) -> usize {
24771            8
24772        }
24773
24774        #[inline(always)]
24775        fn inline_size(_context: fidl::encoding::Context) -> usize {
24776            32
24777        }
24778    }
24779
24780    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1WithOptUnion, D>
24781        for &Sandwich1WithOptUnion
24782    {
24783        #[inline]
24784        unsafe fn encode(
24785            self,
24786            encoder: &mut fidl::encoding::Encoder<'_, D>,
24787            offset: usize,
24788            _depth: fidl::encoding::Depth,
24789        ) -> fidl::Result<()> {
24790            encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24791            // Delegate to tuple encoding.
24792            fidl::encoding::Encode::<Sandwich1WithOptUnion, D>::encode(
24793                (
24794                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24795                    <fidl::encoding::OptionalUnion<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union),
24796                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24797                ),
24798                encoder, offset, _depth
24799            )
24800        }
24801    }
24802    unsafe impl<
24803        D: fidl::encoding::ResourceDialect,
24804        T0: fidl::encoding::Encode<u32, D>,
24805        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize8Align4>, D>,
24806        T2: fidl::encoding::Encode<u32, D>,
24807    > fidl::encoding::Encode<Sandwich1WithOptUnion, D> for (T0, T1, T2)
24808    {
24809        #[inline]
24810        unsafe fn encode(
24811            self,
24812            encoder: &mut fidl::encoding::Encoder<'_, D>,
24813            offset: usize,
24814            depth: fidl::encoding::Depth,
24815        ) -> fidl::Result<()> {
24816            encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24817            // Zero out padding regions. There's no need to apply masks
24818            // because the unmasked parts will be overwritten by fields.
24819            unsafe {
24820                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24821                (ptr as *mut u64).write_unaligned(0);
24822            }
24823            unsafe {
24824                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24825                (ptr as *mut u64).write_unaligned(0);
24826            }
24827            // Write the fields.
24828            self.0.encode(encoder, offset + 0, depth)?;
24829            self.1.encode(encoder, offset + 8, depth)?;
24830            self.2.encode(encoder, offset + 24, depth)?;
24831            Ok(())
24832        }
24833    }
24834
24835    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1WithOptUnion {
24836        #[inline(always)]
24837        fn new_empty() -> Self {
24838            Self {
24839                before: fidl::new_empty!(u32, D),
24840                opt_union: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize8Align4>, D),
24841                after: fidl::new_empty!(u32, D),
24842            }
24843        }
24844
24845        #[inline]
24846        unsafe fn decode(
24847            &mut self,
24848            decoder: &mut fidl::encoding::Decoder<'_, D>,
24849            offset: usize,
24850            _depth: fidl::encoding::Depth,
24851        ) -> fidl::Result<()> {
24852            decoder.debug_check_bounds::<Self>(offset);
24853            // Verify that padding bytes are zero.
24854            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24855            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24856            let mask = 0xffffffff00000000u64;
24857            let maskedval = padval & mask;
24858            if maskedval != 0 {
24859                return Err(fidl::Error::NonZeroPadding {
24860                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24861                });
24862            }
24863            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24864            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24865            let mask = 0xffffffff00000000u64;
24866            let maskedval = padval & mask;
24867            if maskedval != 0 {
24868                return Err(fidl::Error::NonZeroPadding {
24869                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24870                });
24871            }
24872            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24873            fidl::decode!(
24874                fidl::encoding::OptionalUnion<UnionSize8Align4>,
24875                D,
24876                &mut self.opt_union,
24877                decoder,
24878                offset + 8,
24879                _depth
24880            )?;
24881            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24882            Ok(())
24883        }
24884    }
24885
24886    impl fidl::encoding::ValueTypeMarker for Sandwich2 {
24887        type Borrowed<'a> = &'a Self;
24888        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24889            value
24890        }
24891    }
24892
24893    unsafe impl fidl::encoding::TypeMarker for Sandwich2 {
24894        type Owned = Self;
24895
24896        #[inline(always)]
24897        fn inline_align(_context: fidl::encoding::Context) -> usize {
24898            8
24899        }
24900
24901        #[inline(always)]
24902        fn inline_size(_context: fidl::encoding::Context) -> usize {
24903            32
24904        }
24905    }
24906
24907    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich2, D>
24908        for &Sandwich2
24909    {
24910        #[inline]
24911        unsafe fn encode(
24912            self,
24913            encoder: &mut fidl::encoding::Encoder<'_, D>,
24914            offset: usize,
24915            _depth: fidl::encoding::Depth,
24916        ) -> fidl::Result<()> {
24917            encoder.debug_check_bounds::<Sandwich2>(offset);
24918            // Delegate to tuple encoding.
24919            fidl::encoding::Encode::<Sandwich2, D>::encode(
24920                (
24921                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24922                    <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24923                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24924                ),
24925                encoder,
24926                offset,
24927                _depth,
24928            )
24929        }
24930    }
24931    unsafe impl<
24932        D: fidl::encoding::ResourceDialect,
24933        T0: fidl::encoding::Encode<u32, D>,
24934        T1: fidl::encoding::Encode<UnionSize12Align4, D>,
24935        T2: fidl::encoding::Encode<u32, D>,
24936    > fidl::encoding::Encode<Sandwich2, D> for (T0, T1, T2)
24937    {
24938        #[inline]
24939        unsafe fn encode(
24940            self,
24941            encoder: &mut fidl::encoding::Encoder<'_, D>,
24942            offset: usize,
24943            depth: fidl::encoding::Depth,
24944        ) -> fidl::Result<()> {
24945            encoder.debug_check_bounds::<Sandwich2>(offset);
24946            // Zero out padding regions. There's no need to apply masks
24947            // because the unmasked parts will be overwritten by fields.
24948            unsafe {
24949                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24950                (ptr as *mut u64).write_unaligned(0);
24951            }
24952            unsafe {
24953                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24954                (ptr as *mut u64).write_unaligned(0);
24955            }
24956            // Write the fields.
24957            self.0.encode(encoder, offset + 0, depth)?;
24958            self.1.encode(encoder, offset + 8, depth)?;
24959            self.2.encode(encoder, offset + 24, depth)?;
24960            Ok(())
24961        }
24962    }
24963
24964    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich2 {
24965        #[inline(always)]
24966        fn new_empty() -> Self {
24967            Self {
24968                before: fidl::new_empty!(u32, D),
24969                the_union: fidl::new_empty!(UnionSize12Align4, D),
24970                after: fidl::new_empty!(u32, D),
24971            }
24972        }
24973
24974        #[inline]
24975        unsafe fn decode(
24976            &mut self,
24977            decoder: &mut fidl::encoding::Decoder<'_, D>,
24978            offset: usize,
24979            _depth: fidl::encoding::Depth,
24980        ) -> fidl::Result<()> {
24981            decoder.debug_check_bounds::<Self>(offset);
24982            // Verify that padding bytes are zero.
24983            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24984            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24985            let mask = 0xffffffff00000000u64;
24986            let maskedval = padval & mask;
24987            if maskedval != 0 {
24988                return Err(fidl::Error::NonZeroPadding {
24989                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24990                });
24991            }
24992            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24993            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24994            let mask = 0xffffffff00000000u64;
24995            let maskedval = padval & mask;
24996            if maskedval != 0 {
24997                return Err(fidl::Error::NonZeroPadding {
24998                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24999                });
25000            }
25001            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25002            fidl::decode!(UnionSize12Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25003            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25004            Ok(())
25005        }
25006    }
25007
25008    impl fidl::encoding::ValueTypeMarker for Sandwich3 {
25009        type Borrowed<'a> = &'a Self;
25010        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25011            value
25012        }
25013    }
25014
25015    unsafe impl fidl::encoding::TypeMarker for Sandwich3 {
25016        type Owned = Self;
25017
25018        #[inline(always)]
25019        fn inline_align(_context: fidl::encoding::Context) -> usize {
25020            8
25021        }
25022
25023        #[inline(always)]
25024        fn inline_size(_context: fidl::encoding::Context) -> usize {
25025            32
25026        }
25027    }
25028
25029    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich3, D>
25030        for &Sandwich3
25031    {
25032        #[inline]
25033        unsafe fn encode(
25034            self,
25035            encoder: &mut fidl::encoding::Encoder<'_, D>,
25036            offset: usize,
25037            _depth: fidl::encoding::Depth,
25038        ) -> fidl::Result<()> {
25039            encoder.debug_check_bounds::<Sandwich3>(offset);
25040            // Delegate to tuple encoding.
25041            fidl::encoding::Encode::<Sandwich3, D>::encode(
25042                (
25043                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25044                    <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
25045                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25046                ),
25047                encoder,
25048                offset,
25049                _depth,
25050            )
25051        }
25052    }
25053    unsafe impl<
25054        D: fidl::encoding::ResourceDialect,
25055        T0: fidl::encoding::Encode<u32, D>,
25056        T1: fidl::encoding::Encode<UnionSize24Align8, D>,
25057        T2: fidl::encoding::Encode<u32, D>,
25058    > fidl::encoding::Encode<Sandwich3, D> for (T0, T1, T2)
25059    {
25060        #[inline]
25061        unsafe fn encode(
25062            self,
25063            encoder: &mut fidl::encoding::Encoder<'_, D>,
25064            offset: usize,
25065            depth: fidl::encoding::Depth,
25066        ) -> fidl::Result<()> {
25067            encoder.debug_check_bounds::<Sandwich3>(offset);
25068            // Zero out padding regions. There's no need to apply masks
25069            // because the unmasked parts will be overwritten by fields.
25070            unsafe {
25071                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25072                (ptr as *mut u64).write_unaligned(0);
25073            }
25074            unsafe {
25075                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25076                (ptr as *mut u64).write_unaligned(0);
25077            }
25078            // Write the fields.
25079            self.0.encode(encoder, offset + 0, depth)?;
25080            self.1.encode(encoder, offset + 8, depth)?;
25081            self.2.encode(encoder, offset + 24, depth)?;
25082            Ok(())
25083        }
25084    }
25085
25086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich3 {
25087        #[inline(always)]
25088        fn new_empty() -> Self {
25089            Self {
25090                before: fidl::new_empty!(u32, D),
25091                the_union: fidl::new_empty!(UnionSize24Align8, D),
25092                after: fidl::new_empty!(u32, D),
25093            }
25094        }
25095
25096        #[inline]
25097        unsafe fn decode(
25098            &mut self,
25099            decoder: &mut fidl::encoding::Decoder<'_, D>,
25100            offset: usize,
25101            _depth: fidl::encoding::Depth,
25102        ) -> fidl::Result<()> {
25103            decoder.debug_check_bounds::<Self>(offset);
25104            // Verify that padding bytes are zero.
25105            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25106            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25107            let mask = 0xffffffff00000000u64;
25108            let maskedval = padval & mask;
25109            if maskedval != 0 {
25110                return Err(fidl::Error::NonZeroPadding {
25111                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25112                });
25113            }
25114            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25115            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25116            let mask = 0xffffffff00000000u64;
25117            let maskedval = padval & mask;
25118            if maskedval != 0 {
25119                return Err(fidl::Error::NonZeroPadding {
25120                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25121                });
25122            }
25123            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25124            fidl::decode!(UnionSize24Align8, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25125            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25126            Ok(())
25127        }
25128    }
25129
25130    impl fidl::encoding::ValueTypeMarker for Sandwich4 {
25131        type Borrowed<'a> = &'a Self;
25132        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25133            value
25134        }
25135    }
25136
25137    unsafe impl fidl::encoding::TypeMarker for Sandwich4 {
25138        type Owned = Self;
25139
25140        #[inline(always)]
25141        fn inline_align(_context: fidl::encoding::Context) -> usize {
25142            8
25143        }
25144
25145        #[inline(always)]
25146        fn inline_size(_context: fidl::encoding::Context) -> usize {
25147            32
25148        }
25149    }
25150
25151    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4, D>
25152        for &Sandwich4
25153    {
25154        #[inline]
25155        unsafe fn encode(
25156            self,
25157            encoder: &mut fidl::encoding::Encoder<'_, D>,
25158            offset: usize,
25159            _depth: fidl::encoding::Depth,
25160        ) -> fidl::Result<()> {
25161            encoder.debug_check_bounds::<Sandwich4>(offset);
25162            // Delegate to tuple encoding.
25163            fidl::encoding::Encode::<Sandwich4, D>::encode(
25164                (
25165                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25166                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
25167                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25168                ),
25169                encoder,
25170                offset,
25171                _depth,
25172            )
25173        }
25174    }
25175    unsafe impl<
25176        D: fidl::encoding::ResourceDialect,
25177        T0: fidl::encoding::Encode<u32, D>,
25178        T1: fidl::encoding::Encode<UnionSize36Align4, D>,
25179        T2: fidl::encoding::Encode<u32, D>,
25180    > fidl::encoding::Encode<Sandwich4, D> for (T0, T1, T2)
25181    {
25182        #[inline]
25183        unsafe fn encode(
25184            self,
25185            encoder: &mut fidl::encoding::Encoder<'_, D>,
25186            offset: usize,
25187            depth: fidl::encoding::Depth,
25188        ) -> fidl::Result<()> {
25189            encoder.debug_check_bounds::<Sandwich4>(offset);
25190            // Zero out padding regions. There's no need to apply masks
25191            // because the unmasked parts will be overwritten by fields.
25192            unsafe {
25193                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25194                (ptr as *mut u64).write_unaligned(0);
25195            }
25196            unsafe {
25197                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25198                (ptr as *mut u64).write_unaligned(0);
25199            }
25200            // Write the fields.
25201            self.0.encode(encoder, offset + 0, depth)?;
25202            self.1.encode(encoder, offset + 8, depth)?;
25203            self.2.encode(encoder, offset + 24, depth)?;
25204            Ok(())
25205        }
25206    }
25207
25208    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4 {
25209        #[inline(always)]
25210        fn new_empty() -> Self {
25211            Self {
25212                before: fidl::new_empty!(u32, D),
25213                the_union: fidl::new_empty!(UnionSize36Align4, D),
25214                after: fidl::new_empty!(u32, D),
25215            }
25216        }
25217
25218        #[inline]
25219        unsafe fn decode(
25220            &mut self,
25221            decoder: &mut fidl::encoding::Decoder<'_, D>,
25222            offset: usize,
25223            _depth: fidl::encoding::Depth,
25224        ) -> fidl::Result<()> {
25225            decoder.debug_check_bounds::<Self>(offset);
25226            // Verify that padding bytes are zero.
25227            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25228            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25229            let mask = 0xffffffff00000000u64;
25230            let maskedval = padval & mask;
25231            if maskedval != 0 {
25232                return Err(fidl::Error::NonZeroPadding {
25233                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25234                });
25235            }
25236            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25237            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25238            let mask = 0xffffffff00000000u64;
25239            let maskedval = padval & mask;
25240            if maskedval != 0 {
25241                return Err(fidl::Error::NonZeroPadding {
25242                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25243                });
25244            }
25245            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25246            fidl::decode!(UnionSize36Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25247            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25248            Ok(())
25249        }
25250    }
25251
25252    impl fidl::encoding::ValueTypeMarker for Sandwich4Align8 {
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 Sandwich4Align8 {
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            40
25270        }
25271    }
25272
25273    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Align8, D>
25274        for &Sandwich4Align8
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::<Sandwich4Align8>(offset);
25284            // Delegate to tuple encoding.
25285            fidl::encoding::Encode::<Sandwich4Align8, D>::encode(
25286                (
25287                    <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25288                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.alignment8_enforcement),
25289                ),
25290                encoder,
25291                offset,
25292                _depth,
25293            )
25294        }
25295    }
25296    unsafe impl<
25297        D: fidl::encoding::ResourceDialect,
25298        T0: fidl::encoding::Encode<Sandwich4, D>,
25299        T1: fidl::encoding::Encode<u64, D>,
25300    > fidl::encoding::Encode<Sandwich4Align8, 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::<Sandwich4Align8>(offset);
25310            // Zero out padding regions. There's no need to apply masks
25311            // because the unmasked parts will be overwritten by fields.
25312            // Write the fields.
25313            self.0.encode(encoder, offset + 0, depth)?;
25314            self.1.encode(encoder, offset + 32, depth)?;
25315            Ok(())
25316        }
25317    }
25318
25319    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Align8 {
25320        #[inline(always)]
25321        fn new_empty() -> Self {
25322            Self {
25323                sandwich4: fidl::new_empty!(Sandwich4, D),
25324                alignment8_enforcement: fidl::new_empty!(u64, 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            // Verify that padding bytes are zero.
25337            fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25338            fidl::decode!(u64, D, &mut self.alignment8_enforcement, decoder, offset + 32, _depth)?;
25339            Ok(())
25340        }
25341    }
25342
25343    impl fidl::encoding::ValueTypeMarker for Sandwich4Align8WithPointer {
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 Sandwich4Align8WithPointer {
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            40
25361        }
25362    }
25363
25364    unsafe impl<D: fidl::encoding::ResourceDialect>
25365        fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for &Sandwich4Align8WithPointer
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::<Sandwich4Align8WithPointer>(offset);
25375            // Delegate to tuple encoding.
25376            fidl::encoding::Encode::<Sandwich4Align8WithPointer, D>::encode(
25377                (
25378                    <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25379                    <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
25380                        &self.alignment8_enforcement,
25381                    ),
25382                ),
25383                encoder,
25384                offset,
25385                _depth,
25386            )
25387        }
25388    }
25389    unsafe impl<
25390        D: fidl::encoding::ResourceDialect,
25391        T0: fidl::encoding::Encode<Sandwich4, D>,
25392        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
25393    > fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for (T0, T1)
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::<Sandwich4Align8WithPointer>(offset);
25403            // Zero out padding regions. There's no need to apply masks
25404            // because the unmasked parts will be overwritten by fields.
25405            // Write the fields.
25406            self.0.encode(encoder, offset + 0, depth)?;
25407            self.1.encode(encoder, offset + 32, depth)?;
25408            Ok(())
25409        }
25410    }
25411
25412    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
25413        for Sandwich4Align8WithPointer
25414    {
25415        #[inline(always)]
25416        fn new_empty() -> Self {
25417            Self {
25418                sandwich4: fidl::new_empty!(Sandwich4, D),
25419                alignment8_enforcement: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
25420            }
25421        }
25422
25423        #[inline]
25424        unsafe fn decode(
25425            &mut self,
25426            decoder: &mut fidl::encoding::Decoder<'_, D>,
25427            offset: usize,
25428            _depth: fidl::encoding::Depth,
25429        ) -> fidl::Result<()> {
25430            decoder.debug_check_bounds::<Self>(offset);
25431            // Verify that padding bytes are zero.
25432            fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25433            fidl::decode!(
25434                fidl::encoding::Boxed<Size8Align8>,
25435                D,
25436                &mut self.alignment8_enforcement,
25437                decoder,
25438                offset + 32,
25439                _depth
25440            )?;
25441            Ok(())
25442        }
25443    }
25444
25445    impl fidl::encoding::ValueTypeMarker for Sandwich4Message {
25446        type Borrowed<'a> = &'a Self;
25447        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25448            value
25449        }
25450    }
25451
25452    unsafe impl fidl::encoding::TypeMarker for Sandwich4Message {
25453        type Owned = Self;
25454
25455        #[inline(always)]
25456        fn inline_align(_context: fidl::encoding::Context) -> usize {
25457            8
25458        }
25459
25460        #[inline(always)]
25461        fn inline_size(_context: fidl::encoding::Context) -> usize {
25462            48
25463        }
25464    }
25465
25466    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Message, D>
25467        for &Sandwich4Message
25468    {
25469        #[inline]
25470        unsafe fn encode(
25471            self,
25472            encoder: &mut fidl::encoding::Encoder<'_, D>,
25473            offset: usize,
25474            _depth: fidl::encoding::Depth,
25475        ) -> fidl::Result<()> {
25476            encoder.debug_check_bounds::<Sandwich4Message>(offset);
25477            // Delegate to tuple encoding.
25478            fidl::encoding::Encode::<Sandwich4Message, D>::encode(
25479                (
25480                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25481                    <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25482                ),
25483                encoder,
25484                offset,
25485                _depth,
25486            )
25487        }
25488    }
25489    unsafe impl<
25490        D: fidl::encoding::ResourceDialect,
25491        T0: fidl::encoding::Encode<TransactionHeader, D>,
25492        T1: fidl::encoding::Encode<Sandwich4, D>,
25493    > fidl::encoding::Encode<Sandwich4Message, D> for (T0, T1)
25494    {
25495        #[inline]
25496        unsafe fn encode(
25497            self,
25498            encoder: &mut fidl::encoding::Encoder<'_, D>,
25499            offset: usize,
25500            depth: fidl::encoding::Depth,
25501        ) -> fidl::Result<()> {
25502            encoder.debug_check_bounds::<Sandwich4Message>(offset);
25503            // Zero out padding regions. There's no need to apply masks
25504            // because the unmasked parts will be overwritten by fields.
25505            // Write the fields.
25506            self.0.encode(encoder, offset + 0, depth)?;
25507            self.1.encode(encoder, offset + 16, depth)?;
25508            Ok(())
25509        }
25510    }
25511
25512    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Message {
25513        #[inline(always)]
25514        fn new_empty() -> Self {
25515            Self {
25516                header: fidl::new_empty!(TransactionHeader, D),
25517                body: fidl::new_empty!(Sandwich4, D),
25518            }
25519        }
25520
25521        #[inline]
25522        unsafe fn decode(
25523            &mut self,
25524            decoder: &mut fidl::encoding::Decoder<'_, D>,
25525            offset: usize,
25526            _depth: fidl::encoding::Depth,
25527        ) -> fidl::Result<()> {
25528            decoder.debug_check_bounds::<Self>(offset);
25529            // Verify that padding bytes are zero.
25530            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25531            fidl::decode!(Sandwich4, D, &mut self.body, decoder, offset + 16, _depth)?;
25532            Ok(())
25533        }
25534    }
25535
25536    impl fidl::encoding::ValueTypeMarker for Sandwich5 {
25537        type Borrowed<'a> = &'a Self;
25538        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25539            value
25540        }
25541    }
25542
25543    unsafe impl fidl::encoding::TypeMarker for Sandwich5 {
25544        type Owned = Self;
25545
25546        #[inline(always)]
25547        fn inline_align(_context: fidl::encoding::Context) -> usize {
25548            8
25549        }
25550
25551        #[inline(always)]
25552        fn inline_size(_context: fidl::encoding::Context) -> usize {
25553            32
25554        }
25555    }
25556
25557    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5, D>
25558        for &Sandwich5
25559    {
25560        #[inline]
25561        unsafe fn encode(
25562            self,
25563            encoder: &mut fidl::encoding::Encoder<'_, D>,
25564            offset: usize,
25565            _depth: fidl::encoding::Depth,
25566        ) -> fidl::Result<()> {
25567            encoder.debug_check_bounds::<Sandwich5>(offset);
25568            // Delegate to tuple encoding.
25569            fidl::encoding::Encode::<Sandwich5, D>::encode(
25570                (
25571                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25572                    <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
25573                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25574                ),
25575                encoder,
25576                offset,
25577                _depth,
25578            )
25579        }
25580    }
25581    unsafe impl<
25582        D: fidl::encoding::ResourceDialect,
25583        T0: fidl::encoding::Encode<u32, D>,
25584        T1: fidl::encoding::Encode<UnionOfUnion, D>,
25585        T2: fidl::encoding::Encode<u32, D>,
25586    > fidl::encoding::Encode<Sandwich5, D> for (T0, T1, T2)
25587    {
25588        #[inline]
25589        unsafe fn encode(
25590            self,
25591            encoder: &mut fidl::encoding::Encoder<'_, D>,
25592            offset: usize,
25593            depth: fidl::encoding::Depth,
25594        ) -> fidl::Result<()> {
25595            encoder.debug_check_bounds::<Sandwich5>(offset);
25596            // Zero out padding regions. There's no need to apply masks
25597            // because the unmasked parts will be overwritten by fields.
25598            unsafe {
25599                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25600                (ptr as *mut u64).write_unaligned(0);
25601            }
25602            unsafe {
25603                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25604                (ptr as *mut u64).write_unaligned(0);
25605            }
25606            // Write the fields.
25607            self.0.encode(encoder, offset + 0, depth)?;
25608            self.1.encode(encoder, offset + 8, depth)?;
25609            self.2.encode(encoder, offset + 24, depth)?;
25610            Ok(())
25611        }
25612    }
25613
25614    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5 {
25615        #[inline(always)]
25616        fn new_empty() -> Self {
25617            Self {
25618                before: fidl::new_empty!(u32, D),
25619                union_of_union: fidl::new_empty!(UnionOfUnion, D),
25620                after: fidl::new_empty!(u32, D),
25621            }
25622        }
25623
25624        #[inline]
25625        unsafe fn decode(
25626            &mut self,
25627            decoder: &mut fidl::encoding::Decoder<'_, D>,
25628            offset: usize,
25629            _depth: fidl::encoding::Depth,
25630        ) -> fidl::Result<()> {
25631            decoder.debug_check_bounds::<Self>(offset);
25632            // Verify that padding bytes are zero.
25633            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25634            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25635            let mask = 0xffffffff00000000u64;
25636            let maskedval = padval & mask;
25637            if maskedval != 0 {
25638                return Err(fidl::Error::NonZeroPadding {
25639                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25640                });
25641            }
25642            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25643            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25644            let mask = 0xffffffff00000000u64;
25645            let maskedval = padval & mask;
25646            if maskedval != 0 {
25647                return Err(fidl::Error::NonZeroPadding {
25648                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25649                });
25650            }
25651            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25652            fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
25653            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25654            Ok(())
25655        }
25656    }
25657
25658    impl fidl::encoding::ValueTypeMarker for Sandwich5Message {
25659        type Borrowed<'a> = &'a Self;
25660        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25661            value
25662        }
25663    }
25664
25665    unsafe impl fidl::encoding::TypeMarker for Sandwich5Message {
25666        type Owned = Self;
25667
25668        #[inline(always)]
25669        fn inline_align(_context: fidl::encoding::Context) -> usize {
25670            8
25671        }
25672
25673        #[inline(always)]
25674        fn inline_size(_context: fidl::encoding::Context) -> usize {
25675            48
25676        }
25677    }
25678
25679    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5Message, D>
25680        for &Sandwich5Message
25681    {
25682        #[inline]
25683        unsafe fn encode(
25684            self,
25685            encoder: &mut fidl::encoding::Encoder<'_, D>,
25686            offset: usize,
25687            _depth: fidl::encoding::Depth,
25688        ) -> fidl::Result<()> {
25689            encoder.debug_check_bounds::<Sandwich5Message>(offset);
25690            // Delegate to tuple encoding.
25691            fidl::encoding::Encode::<Sandwich5Message, D>::encode(
25692                (
25693                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25694                    <Sandwich5 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25695                ),
25696                encoder,
25697                offset,
25698                _depth,
25699            )
25700        }
25701    }
25702    unsafe impl<
25703        D: fidl::encoding::ResourceDialect,
25704        T0: fidl::encoding::Encode<TransactionHeader, D>,
25705        T1: fidl::encoding::Encode<Sandwich5, D>,
25706    > fidl::encoding::Encode<Sandwich5Message, D> for (T0, T1)
25707    {
25708        #[inline]
25709        unsafe fn encode(
25710            self,
25711            encoder: &mut fidl::encoding::Encoder<'_, D>,
25712            offset: usize,
25713            depth: fidl::encoding::Depth,
25714        ) -> fidl::Result<()> {
25715            encoder.debug_check_bounds::<Sandwich5Message>(offset);
25716            // Zero out padding regions. There's no need to apply masks
25717            // because the unmasked parts will be overwritten by fields.
25718            // Write the fields.
25719            self.0.encode(encoder, offset + 0, depth)?;
25720            self.1.encode(encoder, offset + 16, depth)?;
25721            Ok(())
25722        }
25723    }
25724
25725    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5Message {
25726        #[inline(always)]
25727        fn new_empty() -> Self {
25728            Self {
25729                header: fidl::new_empty!(TransactionHeader, D),
25730                body: fidl::new_empty!(Sandwich5, D),
25731            }
25732        }
25733
25734        #[inline]
25735        unsafe fn decode(
25736            &mut self,
25737            decoder: &mut fidl::encoding::Decoder<'_, D>,
25738            offset: usize,
25739            _depth: fidl::encoding::Depth,
25740        ) -> fidl::Result<()> {
25741            decoder.debug_check_bounds::<Self>(offset);
25742            // Verify that padding bytes are zero.
25743            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25744            fidl::decode!(Sandwich5, D, &mut self.body, decoder, offset + 16, _depth)?;
25745            Ok(())
25746        }
25747    }
25748
25749    impl fidl::encoding::ValueTypeMarker for Sandwich7 {
25750        type Borrowed<'a> = &'a Self;
25751        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25752            value
25753        }
25754    }
25755
25756    unsafe impl fidl::encoding::TypeMarker for Sandwich7 {
25757        type Owned = Self;
25758
25759        #[inline(always)]
25760        fn inline_align(_context: fidl::encoding::Context) -> usize {
25761            8
25762        }
25763
25764        #[inline(always)]
25765        fn inline_size(_context: fidl::encoding::Context) -> usize {
25766            24
25767        }
25768    }
25769
25770    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7, D>
25771        for &Sandwich7
25772    {
25773        #[inline]
25774        unsafe fn encode(
25775            self,
25776            encoder: &mut fidl::encoding::Encoder<'_, D>,
25777            offset: usize,
25778            _depth: fidl::encoding::Depth,
25779        ) -> fidl::Result<()> {
25780            encoder.debug_check_bounds::<Sandwich7>(offset);
25781            // Delegate to tuple encoding.
25782            fidl::encoding::Encode::<Sandwich7, D>::encode(
25783                (
25784                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25785                    <fidl::encoding::Boxed<Sandwich1> as fidl::encoding::ValueTypeMarker>::borrow(
25786                        &self.opt_sandwich1,
25787                    ),
25788                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25789                ),
25790                encoder,
25791                offset,
25792                _depth,
25793            )
25794        }
25795    }
25796    unsafe impl<
25797        D: fidl::encoding::ResourceDialect,
25798        T0: fidl::encoding::Encode<u32, D>,
25799        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Sandwich1>, D>,
25800        T2: fidl::encoding::Encode<u32, D>,
25801    > fidl::encoding::Encode<Sandwich7, D> for (T0, T1, T2)
25802    {
25803        #[inline]
25804        unsafe fn encode(
25805            self,
25806            encoder: &mut fidl::encoding::Encoder<'_, D>,
25807            offset: usize,
25808            depth: fidl::encoding::Depth,
25809        ) -> fidl::Result<()> {
25810            encoder.debug_check_bounds::<Sandwich7>(offset);
25811            // Zero out padding regions. There's no need to apply masks
25812            // because the unmasked parts will be overwritten by fields.
25813            unsafe {
25814                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25815                (ptr as *mut u64).write_unaligned(0);
25816            }
25817            unsafe {
25818                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
25819                (ptr as *mut u64).write_unaligned(0);
25820            }
25821            // Write the fields.
25822            self.0.encode(encoder, offset + 0, depth)?;
25823            self.1.encode(encoder, offset + 8, depth)?;
25824            self.2.encode(encoder, offset + 16, depth)?;
25825            Ok(())
25826        }
25827    }
25828
25829    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7 {
25830        #[inline(always)]
25831        fn new_empty() -> Self {
25832            Self {
25833                before: fidl::new_empty!(u32, D),
25834                opt_sandwich1: fidl::new_empty!(fidl::encoding::Boxed<Sandwich1>, D),
25835                after: fidl::new_empty!(u32, D),
25836            }
25837        }
25838
25839        #[inline]
25840        unsafe fn decode(
25841            &mut self,
25842            decoder: &mut fidl::encoding::Decoder<'_, D>,
25843            offset: usize,
25844            _depth: fidl::encoding::Depth,
25845        ) -> fidl::Result<()> {
25846            decoder.debug_check_bounds::<Self>(offset);
25847            // Verify that padding bytes are zero.
25848            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25849            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25850            let mask = 0xffffffff00000000u64;
25851            let maskedval = padval & mask;
25852            if maskedval != 0 {
25853                return Err(fidl::Error::NonZeroPadding {
25854                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25855                });
25856            }
25857            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
25858            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25859            let mask = 0xffffffff00000000u64;
25860            let maskedval = padval & mask;
25861            if maskedval != 0 {
25862                return Err(fidl::Error::NonZeroPadding {
25863                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
25864                });
25865            }
25866            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25867            fidl::decode!(
25868                fidl::encoding::Boxed<Sandwich1>,
25869                D,
25870                &mut self.opt_sandwich1,
25871                decoder,
25872                offset + 8,
25873                _depth
25874            )?;
25875            fidl::decode!(u32, D, &mut self.after, decoder, offset + 16, _depth)?;
25876            Ok(())
25877        }
25878    }
25879
25880    impl fidl::encoding::ValueTypeMarker for Sandwich7Message {
25881        type Borrowed<'a> = &'a Self;
25882        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25883            value
25884        }
25885    }
25886
25887    unsafe impl fidl::encoding::TypeMarker for Sandwich7Message {
25888        type Owned = Self;
25889
25890        #[inline(always)]
25891        fn inline_align(_context: fidl::encoding::Context) -> usize {
25892            8
25893        }
25894
25895        #[inline(always)]
25896        fn inline_size(_context: fidl::encoding::Context) -> usize {
25897            40
25898        }
25899    }
25900
25901    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7Message, D>
25902        for &Sandwich7Message
25903    {
25904        #[inline]
25905        unsafe fn encode(
25906            self,
25907            encoder: &mut fidl::encoding::Encoder<'_, D>,
25908            offset: usize,
25909            _depth: fidl::encoding::Depth,
25910        ) -> fidl::Result<()> {
25911            encoder.debug_check_bounds::<Sandwich7Message>(offset);
25912            // Delegate to tuple encoding.
25913            fidl::encoding::Encode::<Sandwich7Message, D>::encode(
25914                (
25915                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25916                    <Sandwich7 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25917                ),
25918                encoder,
25919                offset,
25920                _depth,
25921            )
25922        }
25923    }
25924    unsafe impl<
25925        D: fidl::encoding::ResourceDialect,
25926        T0: fidl::encoding::Encode<TransactionHeader, D>,
25927        T1: fidl::encoding::Encode<Sandwich7, D>,
25928    > fidl::encoding::Encode<Sandwich7Message, D> for (T0, T1)
25929    {
25930        #[inline]
25931        unsafe fn encode(
25932            self,
25933            encoder: &mut fidl::encoding::Encoder<'_, D>,
25934            offset: usize,
25935            depth: fidl::encoding::Depth,
25936        ) -> fidl::Result<()> {
25937            encoder.debug_check_bounds::<Sandwich7Message>(offset);
25938            // Zero out padding regions. There's no need to apply masks
25939            // because the unmasked parts will be overwritten by fields.
25940            // Write the fields.
25941            self.0.encode(encoder, offset + 0, depth)?;
25942            self.1.encode(encoder, offset + 16, depth)?;
25943            Ok(())
25944        }
25945    }
25946
25947    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7Message {
25948        #[inline(always)]
25949        fn new_empty() -> Self {
25950            Self {
25951                header: fidl::new_empty!(TransactionHeader, D),
25952                body: fidl::new_empty!(Sandwich7, D),
25953            }
25954        }
25955
25956        #[inline]
25957        unsafe fn decode(
25958            &mut self,
25959            decoder: &mut fidl::encoding::Decoder<'_, D>,
25960            offset: usize,
25961            _depth: fidl::encoding::Depth,
25962        ) -> fidl::Result<()> {
25963            decoder.debug_check_bounds::<Self>(offset);
25964            // Verify that padding bytes are zero.
25965            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25966            fidl::decode!(Sandwich7, D, &mut self.body, decoder, offset + 16, _depth)?;
25967            Ok(())
25968        }
25969    }
25970
25971    impl fidl::encoding::ValueTypeMarker for Sandwich8 {
25972        type Borrowed<'a> = &'a Self;
25973        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25974            value
25975        }
25976    }
25977
25978    unsafe impl fidl::encoding::TypeMarker for Sandwich8 {
25979        type Owned = Self;
25980
25981        #[inline(always)]
25982        fn inline_align(_context: fidl::encoding::Context) -> usize {
25983            8
25984        }
25985
25986        #[inline(always)]
25987        fn inline_size(_context: fidl::encoding::Context) -> usize {
25988            32
25989        }
25990    }
25991
25992    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich8, D>
25993        for &Sandwich8
25994    {
25995        #[inline]
25996        unsafe fn encode(
25997            self,
25998            encoder: &mut fidl::encoding::Encoder<'_, D>,
25999            offset: usize,
26000            _depth: fidl::encoding::Depth,
26001        ) -> fidl::Result<()> {
26002            encoder.debug_check_bounds::<Sandwich8>(offset);
26003            // Delegate to tuple encoding.
26004            fidl::encoding::Encode::<Sandwich8, D>::encode(
26005                (
26006                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
26007                    <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
26008                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
26009                ),
26010                encoder,
26011                offset,
26012                _depth,
26013            )
26014        }
26015    }
26016    unsafe impl<
26017        D: fidl::encoding::ResourceDialect,
26018        T0: fidl::encoding::Encode<u64, D>,
26019        T1: fidl::encoding::Encode<UnionOfUnion, D>,
26020        T2: fidl::encoding::Encode<u32, D>,
26021    > fidl::encoding::Encode<Sandwich8, D> for (T0, T1, T2)
26022    {
26023        #[inline]
26024        unsafe fn encode(
26025            self,
26026            encoder: &mut fidl::encoding::Encoder<'_, D>,
26027            offset: usize,
26028            depth: fidl::encoding::Depth,
26029        ) -> fidl::Result<()> {
26030            encoder.debug_check_bounds::<Sandwich8>(offset);
26031            // Zero out padding regions. There's no need to apply masks
26032            // because the unmasked parts will be overwritten by fields.
26033            unsafe {
26034                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
26035                (ptr as *mut u64).write_unaligned(0);
26036            }
26037            // Write the fields.
26038            self.0.encode(encoder, offset + 0, depth)?;
26039            self.1.encode(encoder, offset + 8, depth)?;
26040            self.2.encode(encoder, offset + 24, depth)?;
26041            Ok(())
26042        }
26043    }
26044
26045    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich8 {
26046        #[inline(always)]
26047        fn new_empty() -> Self {
26048            Self {
26049                before: fidl::new_empty!(u64, D),
26050                union_of_union: fidl::new_empty!(UnionOfUnion, D),
26051                after: fidl::new_empty!(u32, D),
26052            }
26053        }
26054
26055        #[inline]
26056        unsafe fn decode(
26057            &mut self,
26058            decoder: &mut fidl::encoding::Decoder<'_, D>,
26059            offset: usize,
26060            _depth: fidl::encoding::Depth,
26061        ) -> fidl::Result<()> {
26062            decoder.debug_check_bounds::<Self>(offset);
26063            // Verify that padding bytes are zero.
26064            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
26065            let padval = unsafe { (ptr as *const u64).read_unaligned() };
26066            let mask = 0xffffffff00000000u64;
26067            let maskedval = padval & mask;
26068            if maskedval != 0 {
26069                return Err(fidl::Error::NonZeroPadding {
26070                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
26071                });
26072            }
26073            fidl::decode!(u64, D, &mut self.before, decoder, offset + 0, _depth)?;
26074            fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
26075            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
26076            Ok(())
26077        }
26078    }
26079
26080    impl fidl::encoding::ValueTypeMarker for Sandwich9 {
26081        type Borrowed<'a> = &'a Self;
26082        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26083            value
26084        }
26085    }
26086
26087    unsafe impl fidl::encoding::TypeMarker for Sandwich9 {
26088        type Owned = Self;
26089
26090        #[inline(always)]
26091        fn inline_align(_context: fidl::encoding::Context) -> usize {
26092            8
26093        }
26094
26095        #[inline(always)]
26096        fn inline_size(_context: fidl::encoding::Context) -> usize {
26097            32
26098        }
26099    }
26100
26101    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich9, D>
26102        for &Sandwich9
26103    {
26104        #[inline]
26105        unsafe fn encode(
26106            self,
26107            encoder: &mut fidl::encoding::Encoder<'_, D>,
26108            offset: usize,
26109            _depth: fidl::encoding::Depth,
26110        ) -> fidl::Result<()> {
26111            encoder.debug_check_bounds::<Sandwich9>(offset);
26112            // Delegate to tuple encoding.
26113            fidl::encoding::Encode::<Sandwich9, D>::encode(
26114                (
26115                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
26116                    <UnionWithVectorOfVectors as fidl::encoding::ValueTypeMarker>::borrow(
26117                        &self.the_union,
26118                    ),
26119                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
26120                ),
26121                encoder,
26122                offset,
26123                _depth,
26124            )
26125        }
26126    }
26127    unsafe impl<
26128        D: fidl::encoding::ResourceDialect,
26129        T0: fidl::encoding::Encode<u16, D>,
26130        T1: fidl::encoding::Encode<UnionWithVectorOfVectors, D>,
26131        T2: fidl::encoding::Encode<u16, D>,
26132    > fidl::encoding::Encode<Sandwich9, D> for (T0, T1, T2)
26133    {
26134        #[inline]
26135        unsafe fn encode(
26136            self,
26137            encoder: &mut fidl::encoding::Encoder<'_, D>,
26138            offset: usize,
26139            depth: fidl::encoding::Depth,
26140        ) -> fidl::Result<()> {
26141            encoder.debug_check_bounds::<Sandwich9>(offset);
26142            // Zero out padding regions. There's no need to apply masks
26143            // because the unmasked parts will be overwritten by fields.
26144            unsafe {
26145                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
26146                (ptr as *mut u64).write_unaligned(0);
26147            }
26148            unsafe {
26149                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
26150                (ptr as *mut u64).write_unaligned(0);
26151            }
26152            // Write the fields.
26153            self.0.encode(encoder, offset + 0, depth)?;
26154            self.1.encode(encoder, offset + 8, depth)?;
26155            self.2.encode(encoder, offset + 24, depth)?;
26156            Ok(())
26157        }
26158    }
26159
26160    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich9 {
26161        #[inline(always)]
26162        fn new_empty() -> Self {
26163            Self {
26164                before: fidl::new_empty!(u16, D),
26165                the_union: fidl::new_empty!(UnionWithVectorOfVectors, D),
26166                after: fidl::new_empty!(u16, D),
26167            }
26168        }
26169
26170        #[inline]
26171        unsafe fn decode(
26172            &mut self,
26173            decoder: &mut fidl::encoding::Decoder<'_, D>,
26174            offset: usize,
26175            _depth: fidl::encoding::Depth,
26176        ) -> fidl::Result<()> {
26177            decoder.debug_check_bounds::<Self>(offset);
26178            // Verify that padding bytes are zero.
26179            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
26180            let padval = unsafe { (ptr as *const u64).read_unaligned() };
26181            let mask = 0xffffffffffff0000u64;
26182            let maskedval = padval & mask;
26183            if maskedval != 0 {
26184                return Err(fidl::Error::NonZeroPadding {
26185                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
26186                });
26187            }
26188            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
26189            let padval = unsafe { (ptr as *const u64).read_unaligned() };
26190            let mask = 0xffffffffffff0000u64;
26191            let maskedval = padval & mask;
26192            if maskedval != 0 {
26193                return Err(fidl::Error::NonZeroPadding {
26194                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
26195                });
26196            }
26197            fidl::decode!(u16, D, &mut self.before, decoder, offset + 0, _depth)?;
26198            fidl::decode!(
26199                UnionWithVectorOfVectors,
26200                D,
26201                &mut self.the_union,
26202                decoder,
26203                offset + 8,
26204                _depth
26205            )?;
26206            fidl::decode!(u16, D, &mut self.after, decoder, offset + 24, _depth)?;
26207            Ok(())
26208        }
26209    }
26210
26211    impl fidl::encoding::ValueTypeMarker for SimpleTableArrayStruct {
26212        type Borrowed<'a> = &'a Self;
26213        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26214            value
26215        }
26216    }
26217
26218    unsafe impl fidl::encoding::TypeMarker for SimpleTableArrayStruct {
26219        type Owned = Self;
26220
26221        #[inline(always)]
26222        fn inline_align(_context: fidl::encoding::Context) -> usize {
26223            8
26224        }
26225
26226        #[inline(always)]
26227        fn inline_size(_context: fidl::encoding::Context) -> usize {
26228            32
26229        }
26230    }
26231
26232    unsafe impl<D: fidl::encoding::ResourceDialect>
26233        fidl::encoding::Encode<SimpleTableArrayStruct, D> for &SimpleTableArrayStruct
26234    {
26235        #[inline]
26236        unsafe fn encode(
26237            self,
26238            encoder: &mut fidl::encoding::Encoder<'_, D>,
26239            offset: usize,
26240            _depth: fidl::encoding::Depth,
26241        ) -> fidl::Result<()> {
26242            encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26243            // Delegate to tuple encoding.
26244            fidl::encoding::Encode::<SimpleTableArrayStruct, D>::encode(
26245                (
26246                    <fidl::encoding::Array<TransformerSimpleTable, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_array),
26247                ),
26248                encoder, offset, _depth
26249            )
26250        }
26251    }
26252    unsafe impl<
26253        D: fidl::encoding::ResourceDialect,
26254        T0: fidl::encoding::Encode<fidl::encoding::Array<TransformerSimpleTable, 2>, D>,
26255    > fidl::encoding::Encode<SimpleTableArrayStruct, D> for (T0,)
26256    {
26257        #[inline]
26258        unsafe fn encode(
26259            self,
26260            encoder: &mut fidl::encoding::Encoder<'_, D>,
26261            offset: usize,
26262            depth: fidl::encoding::Depth,
26263        ) -> fidl::Result<()> {
26264            encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26265            // Zero out padding regions. There's no need to apply masks
26266            // because the unmasked parts will be overwritten by fields.
26267            // Write the fields.
26268            self.0.encode(encoder, offset + 0, depth)?;
26269            Ok(())
26270        }
26271    }
26272
26273    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26274        for SimpleTableArrayStruct
26275    {
26276        #[inline(always)]
26277        fn new_empty() -> Self {
26278            Self {
26279                the_array: fidl::new_empty!(fidl::encoding::Array<TransformerSimpleTable, 2>, D),
26280            }
26281        }
26282
26283        #[inline]
26284        unsafe fn decode(
26285            &mut self,
26286            decoder: &mut fidl::encoding::Decoder<'_, D>,
26287            offset: usize,
26288            _depth: fidl::encoding::Depth,
26289        ) -> fidl::Result<()> {
26290            decoder.debug_check_bounds::<Self>(offset);
26291            // Verify that padding bytes are zero.
26292            fidl::decode!(fidl::encoding::Array<TransformerSimpleTable, 2>, D, &mut self.the_array, decoder, offset + 0, _depth)?;
26293            Ok(())
26294        }
26295    }
26296
26297    impl fidl::encoding::ValueTypeMarker for SimpleTableThenUint64 {
26298        type Borrowed<'a> = &'a Self;
26299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26300            value
26301        }
26302    }
26303
26304    unsafe impl fidl::encoding::TypeMarker for SimpleTableThenUint64 {
26305        type Owned = Self;
26306
26307        #[inline(always)]
26308        fn inline_align(_context: fidl::encoding::Context) -> usize {
26309            8
26310        }
26311
26312        #[inline(always)]
26313        fn inline_size(_context: fidl::encoding::Context) -> usize {
26314            24
26315        }
26316    }
26317
26318    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTableThenUint64, D>
26319        for &SimpleTableThenUint64
26320    {
26321        #[inline]
26322        unsafe fn encode(
26323            self,
26324            encoder: &mut fidl::encoding::Encoder<'_, D>,
26325            offset: usize,
26326            _depth: fidl::encoding::Depth,
26327        ) -> fidl::Result<()> {
26328            encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26329            // Delegate to tuple encoding.
26330            fidl::encoding::Encode::<SimpleTableThenUint64, D>::encode(
26331                (
26332                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),
26333                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.number),
26334                ),
26335                encoder,
26336                offset,
26337                _depth,
26338            )
26339        }
26340    }
26341    unsafe impl<
26342        D: fidl::encoding::ResourceDialect,
26343        T0: fidl::encoding::Encode<SimpleTable, D>,
26344        T1: fidl::encoding::Encode<u64, D>,
26345    > fidl::encoding::Encode<SimpleTableThenUint64, D> for (T0, T1)
26346    {
26347        #[inline]
26348        unsafe fn encode(
26349            self,
26350            encoder: &mut fidl::encoding::Encoder<'_, D>,
26351            offset: usize,
26352            depth: fidl::encoding::Depth,
26353        ) -> fidl::Result<()> {
26354            encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26355            // Zero out padding regions. There's no need to apply masks
26356            // because the unmasked parts will be overwritten by fields.
26357            // Write the fields.
26358            self.0.encode(encoder, offset + 0, depth)?;
26359            self.1.encode(encoder, offset + 16, depth)?;
26360            Ok(())
26361        }
26362    }
26363
26364    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTableThenUint64 {
26365        #[inline(always)]
26366        fn new_empty() -> Self {
26367            Self { table: fidl::new_empty!(SimpleTable, D), number: fidl::new_empty!(u64, D) }
26368        }
26369
26370        #[inline]
26371        unsafe fn decode(
26372            &mut self,
26373            decoder: &mut fidl::encoding::Decoder<'_, D>,
26374            offset: usize,
26375            _depth: fidl::encoding::Depth,
26376        ) -> fidl::Result<()> {
26377            decoder.debug_check_bounds::<Self>(offset);
26378            // Verify that padding bytes are zero.
26379            fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
26380            fidl::decode!(u64, D, &mut self.number, decoder, offset + 16, _depth)?;
26381            Ok(())
26382        }
26383    }
26384
26385    impl fidl::encoding::ValueTypeMarker for SingleVariantUnionStruct {
26386        type Borrowed<'a> = &'a Self;
26387        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26388            value
26389        }
26390    }
26391
26392    unsafe impl fidl::encoding::TypeMarker for SingleVariantUnionStruct {
26393        type Owned = Self;
26394
26395        #[inline(always)]
26396        fn inline_align(_context: fidl::encoding::Context) -> usize {
26397            8
26398        }
26399
26400        #[inline(always)]
26401        fn inline_size(_context: fidl::encoding::Context) -> usize {
26402            16
26403        }
26404    }
26405
26406    unsafe impl<D: fidl::encoding::ResourceDialect>
26407        fidl::encoding::Encode<SingleVariantUnionStruct, D> for &SingleVariantUnionStruct
26408    {
26409        #[inline]
26410        unsafe fn encode(
26411            self,
26412            encoder: &mut fidl::encoding::Encoder<'_, D>,
26413            offset: usize,
26414            _depth: fidl::encoding::Depth,
26415        ) -> fidl::Result<()> {
26416            encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26417            // Delegate to tuple encoding.
26418            fidl::encoding::Encode::<SingleVariantUnionStruct, D>::encode(
26419                (<SingleVariantUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
26420                encoder,
26421                offset,
26422                _depth,
26423            )
26424        }
26425    }
26426    unsafe impl<
26427        D: fidl::encoding::ResourceDialect,
26428        T0: fidl::encoding::Encode<SingleVariantUnion, D>,
26429    > fidl::encoding::Encode<SingleVariantUnionStruct, D> for (T0,)
26430    {
26431        #[inline]
26432        unsafe fn encode(
26433            self,
26434            encoder: &mut fidl::encoding::Encoder<'_, D>,
26435            offset: usize,
26436            depth: fidl::encoding::Depth,
26437        ) -> fidl::Result<()> {
26438            encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26439            // Zero out padding regions. There's no need to apply masks
26440            // because the unmasked parts will be overwritten by fields.
26441            // Write the fields.
26442            self.0.encode(encoder, offset + 0, depth)?;
26443            Ok(())
26444        }
26445    }
26446
26447    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26448        for SingleVariantUnionStruct
26449    {
26450        #[inline(always)]
26451        fn new_empty() -> Self {
26452            Self { u: fidl::new_empty!(SingleVariantUnion, D) }
26453        }
26454
26455        #[inline]
26456        unsafe fn decode(
26457            &mut self,
26458            decoder: &mut fidl::encoding::Decoder<'_, D>,
26459            offset: usize,
26460            _depth: fidl::encoding::Depth,
26461        ) -> fidl::Result<()> {
26462            decoder.debug_check_bounds::<Self>(offset);
26463            // Verify that padding bytes are zero.
26464            fidl::decode!(SingleVariantUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
26465            Ok(())
26466        }
26467    }
26468
26469    impl fidl::encoding::ValueTypeMarker for Size5Alignment1 {
26470        type Borrowed<'a> = &'a Self;
26471        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26472            value
26473        }
26474    }
26475
26476    unsafe impl fidl::encoding::TypeMarker for Size5Alignment1 {
26477        type Owned = Self;
26478
26479        #[inline(always)]
26480        fn inline_align(_context: fidl::encoding::Context) -> usize {
26481            1
26482        }
26483
26484        #[inline(always)]
26485        fn inline_size(_context: fidl::encoding::Context) -> usize {
26486            5
26487        }
26488        #[inline(always)]
26489        fn encode_is_copy() -> bool {
26490            true
26491        }
26492
26493        #[inline(always)]
26494        fn decode_is_copy() -> bool {
26495            true
26496        }
26497    }
26498
26499    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1, D>
26500        for &Size5Alignment1
26501    {
26502        #[inline]
26503        unsafe fn encode(
26504            self,
26505            encoder: &mut fidl::encoding::Encoder<'_, D>,
26506            offset: usize,
26507            _depth: fidl::encoding::Depth,
26508        ) -> fidl::Result<()> {
26509            encoder.debug_check_bounds::<Size5Alignment1>(offset);
26510            unsafe {
26511                // Copy the object into the buffer.
26512                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26513                (buf_ptr as *mut Size5Alignment1)
26514                    .write_unaligned((self as *const Size5Alignment1).read());
26515                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26516                // done second because the memcpy will write garbage to these bytes.
26517            }
26518            Ok(())
26519        }
26520    }
26521    unsafe impl<
26522        D: fidl::encoding::ResourceDialect,
26523        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 5>, D>,
26524    > fidl::encoding::Encode<Size5Alignment1, D> for (T0,)
26525    {
26526        #[inline]
26527        unsafe fn encode(
26528            self,
26529            encoder: &mut fidl::encoding::Encoder<'_, D>,
26530            offset: usize,
26531            depth: fidl::encoding::Depth,
26532        ) -> fidl::Result<()> {
26533            encoder.debug_check_bounds::<Size5Alignment1>(offset);
26534            // Zero out padding regions. There's no need to apply masks
26535            // because the unmasked parts will be overwritten by fields.
26536            // Write the fields.
26537            self.0.encode(encoder, offset + 0, depth)?;
26538            Ok(())
26539        }
26540    }
26541
26542    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1 {
26543        #[inline(always)]
26544        fn new_empty() -> Self {
26545            Self { data: fidl::new_empty!(fidl::encoding::Array<u8, 5>, D) }
26546        }
26547
26548        #[inline]
26549        unsafe fn decode(
26550            &mut self,
26551            decoder: &mut fidl::encoding::Decoder<'_, D>,
26552            offset: usize,
26553            _depth: fidl::encoding::Depth,
26554        ) -> fidl::Result<()> {
26555            decoder.debug_check_bounds::<Self>(offset);
26556            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26557            // Verify that padding bytes are zero.
26558            // Copy from the buffer into the object.
26559            unsafe {
26560                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 5);
26561            }
26562            Ok(())
26563        }
26564    }
26565
26566    impl fidl::encoding::ValueTypeMarker for Size5Alignment1Array {
26567        type Borrowed<'a> = &'a Self;
26568        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26569            value
26570        }
26571    }
26572
26573    unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Array {
26574        type Owned = Self;
26575
26576        #[inline(always)]
26577        fn inline_align(_context: fidl::encoding::Context) -> usize {
26578            1
26579        }
26580
26581        #[inline(always)]
26582        fn inline_size(_context: fidl::encoding::Context) -> usize {
26583            15
26584        }
26585        #[inline(always)]
26586        fn encode_is_copy() -> bool {
26587            true
26588        }
26589
26590        #[inline(always)]
26591        fn decode_is_copy() -> bool {
26592            true
26593        }
26594    }
26595
26596    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Array, D>
26597        for &Size5Alignment1Array
26598    {
26599        #[inline]
26600        unsafe fn encode(
26601            self,
26602            encoder: &mut fidl::encoding::Encoder<'_, D>,
26603            offset: usize,
26604            _depth: fidl::encoding::Depth,
26605        ) -> fidl::Result<()> {
26606            encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26607            unsafe {
26608                // Copy the object into the buffer.
26609                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26610                (buf_ptr as *mut Size5Alignment1Array)
26611                    .write_unaligned((self as *const Size5Alignment1Array).read());
26612                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26613                // done second because the memcpy will write garbage to these bytes.
26614            }
26615            Ok(())
26616        }
26617    }
26618    unsafe impl<
26619        D: fidl::encoding::ResourceDialect,
26620        T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment1, 3>, D>,
26621    > fidl::encoding::Encode<Size5Alignment1Array, D> for (T0,)
26622    {
26623        #[inline]
26624        unsafe fn encode(
26625            self,
26626            encoder: &mut fidl::encoding::Encoder<'_, D>,
26627            offset: usize,
26628            depth: fidl::encoding::Depth,
26629        ) -> fidl::Result<()> {
26630            encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26631            // Zero out padding regions. There's no need to apply masks
26632            // because the unmasked parts will be overwritten by fields.
26633            // Write the fields.
26634            self.0.encode(encoder, offset + 0, depth)?;
26635            Ok(())
26636        }
26637    }
26638
26639    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Array {
26640        #[inline(always)]
26641        fn new_empty() -> Self {
26642            Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment1, 3>, D) }
26643        }
26644
26645        #[inline]
26646        unsafe fn decode(
26647            &mut self,
26648            decoder: &mut fidl::encoding::Decoder<'_, D>,
26649            offset: usize,
26650            _depth: fidl::encoding::Depth,
26651        ) -> fidl::Result<()> {
26652            decoder.debug_check_bounds::<Self>(offset);
26653            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26654            // Verify that padding bytes are zero.
26655            // Copy from the buffer into the object.
26656            unsafe {
26657                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 15);
26658            }
26659            Ok(())
26660        }
26661    }
26662
26663    impl fidl::encoding::ValueTypeMarker for Size5Alignment1Vector {
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 Size5Alignment1Vector {
26671        type Owned = Self;
26672
26673        #[inline(always)]
26674        fn inline_align(_context: fidl::encoding::Context) -> usize {
26675            8
26676        }
26677
26678        #[inline(always)]
26679        fn inline_size(_context: fidl::encoding::Context) -> usize {
26680            16
26681        }
26682    }
26683
26684    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Vector, D>
26685        for &Size5Alignment1Vector
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::<Size5Alignment1Vector>(offset);
26695            // Delegate to tuple encoding.
26696            fidl::encoding::Encode::<Size5Alignment1Vector, D>::encode(
26697                (
26698                    <fidl::encoding::UnboundedVector<Size5Alignment1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
26699                ),
26700                encoder, offset, _depth
26701            )
26702        }
26703    }
26704    unsafe impl<
26705        D: fidl::encoding::ResourceDialect,
26706        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment1>, D>,
26707    > fidl::encoding::Encode<Size5Alignment1Vector, D> for (T0,)
26708    {
26709        #[inline]
26710        unsafe fn encode(
26711            self,
26712            encoder: &mut fidl::encoding::Encoder<'_, D>,
26713            offset: usize,
26714            depth: fidl::encoding::Depth,
26715        ) -> fidl::Result<()> {
26716            encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26717            // Zero out padding regions. There's no need to apply masks
26718            // because the unmasked parts will be overwritten by fields.
26719            // Write the fields.
26720            self.0.encode(encoder, offset + 0, depth)?;
26721            Ok(())
26722        }
26723    }
26724
26725    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Vector {
26726        #[inline(always)]
26727        fn new_empty() -> Self {
26728            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment1>, D) }
26729        }
26730
26731        #[inline]
26732        unsafe fn decode(
26733            &mut self,
26734            decoder: &mut fidl::encoding::Decoder<'_, D>,
26735            offset: usize,
26736            _depth: fidl::encoding::Depth,
26737        ) -> fidl::Result<()> {
26738            decoder.debug_check_bounds::<Self>(offset);
26739            // Verify that padding bytes are zero.
26740            fidl::decode!(
26741                fidl::encoding::UnboundedVector<Size5Alignment1>,
26742                D,
26743                &mut self.v,
26744                decoder,
26745                offset + 0,
26746                _depth
26747            )?;
26748            Ok(())
26749        }
26750    }
26751
26752    impl fidl::encoding::ValueTypeMarker for Size5Alignment4 {
26753        type Borrowed<'a> = &'a Self;
26754        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26755            value
26756        }
26757    }
26758
26759    unsafe impl fidl::encoding::TypeMarker for Size5Alignment4 {
26760        type Owned = Self;
26761
26762        #[inline(always)]
26763        fn inline_align(_context: fidl::encoding::Context) -> usize {
26764            4
26765        }
26766
26767        #[inline(always)]
26768        fn inline_size(_context: fidl::encoding::Context) -> usize {
26769            8
26770        }
26771    }
26772
26773    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4, D>
26774        for &Size5Alignment4
26775    {
26776        #[inline]
26777        unsafe fn encode(
26778            self,
26779            encoder: &mut fidl::encoding::Encoder<'_, D>,
26780            offset: usize,
26781            _depth: fidl::encoding::Depth,
26782        ) -> fidl::Result<()> {
26783            encoder.debug_check_bounds::<Size5Alignment4>(offset);
26784            unsafe {
26785                // Copy the object into the buffer.
26786                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26787                (buf_ptr as *mut Size5Alignment4)
26788                    .write_unaligned((self as *const Size5Alignment4).read());
26789                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26790                // done second because the memcpy will write garbage to these bytes.
26791                let padding_ptr = buf_ptr.offset(4) as *mut u32;
26792                let padding_mask = 0xffffff00u32;
26793                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26794            }
26795            Ok(())
26796        }
26797    }
26798    unsafe impl<
26799        D: fidl::encoding::ResourceDialect,
26800        T0: fidl::encoding::Encode<u32, D>,
26801        T1: fidl::encoding::Encode<u8, D>,
26802    > fidl::encoding::Encode<Size5Alignment4, D> for (T0, T1)
26803    {
26804        #[inline]
26805        unsafe fn encode(
26806            self,
26807            encoder: &mut fidl::encoding::Encoder<'_, D>,
26808            offset: usize,
26809            depth: fidl::encoding::Depth,
26810        ) -> fidl::Result<()> {
26811            encoder.debug_check_bounds::<Size5Alignment4>(offset);
26812            // Zero out padding regions. There's no need to apply masks
26813            // because the unmasked parts will be overwritten by fields.
26814            unsafe {
26815                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
26816                (ptr as *mut u32).write_unaligned(0);
26817            }
26818            // Write the fields.
26819            self.0.encode(encoder, offset + 0, depth)?;
26820            self.1.encode(encoder, offset + 4, depth)?;
26821            Ok(())
26822        }
26823    }
26824
26825    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4 {
26826        #[inline(always)]
26827        fn new_empty() -> Self {
26828            Self { four: fidl::new_empty!(u32, D), one: fidl::new_empty!(u8, D) }
26829        }
26830
26831        #[inline]
26832        unsafe fn decode(
26833            &mut self,
26834            decoder: &mut fidl::encoding::Decoder<'_, D>,
26835            offset: usize,
26836            _depth: fidl::encoding::Depth,
26837        ) -> fidl::Result<()> {
26838            decoder.debug_check_bounds::<Self>(offset);
26839            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26840            // Verify that padding bytes are zero.
26841            let ptr = unsafe { buf_ptr.offset(4) };
26842            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26843            let mask = 0xffffff00u32;
26844            let maskedval = padval & mask;
26845            if maskedval != 0 {
26846                return Err(fidl::Error::NonZeroPadding {
26847                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26848                });
26849            }
26850            // Copy from the buffer into the object.
26851            unsafe {
26852                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
26853            }
26854            Ok(())
26855        }
26856    }
26857
26858    impl fidl::encoding::ValueTypeMarker for Size5Alignment4Array {
26859        type Borrowed<'a> = &'a Self;
26860        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26861            value
26862        }
26863    }
26864
26865    unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Array {
26866        type Owned = Self;
26867
26868        #[inline(always)]
26869        fn inline_align(_context: fidl::encoding::Context) -> usize {
26870            4
26871        }
26872
26873        #[inline(always)]
26874        fn inline_size(_context: fidl::encoding::Context) -> usize {
26875            24
26876        }
26877    }
26878
26879    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Array, D>
26880        for &Size5Alignment4Array
26881    {
26882        #[inline]
26883        unsafe fn encode(
26884            self,
26885            encoder: &mut fidl::encoding::Encoder<'_, D>,
26886            offset: usize,
26887            _depth: fidl::encoding::Depth,
26888        ) -> fidl::Result<()> {
26889            encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26890            unsafe {
26891                // Copy the object into the buffer.
26892                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26893                (buf_ptr as *mut Size5Alignment4Array)
26894                    .write_unaligned((self as *const Size5Alignment4Array).read());
26895                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26896                // done second because the memcpy will write garbage to these bytes.
26897                let padding_ptr = buf_ptr.offset(4) as *mut u32;
26898                let padding_mask = 0xffffff00u32;
26899                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26900                let padding_ptr = buf_ptr.offset(12) as *mut u32;
26901                let padding_mask = 0xffffff00u32;
26902                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26903                let padding_ptr = buf_ptr.offset(20) as *mut u32;
26904                let padding_mask = 0xffffff00u32;
26905                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26906            }
26907            Ok(())
26908        }
26909    }
26910    unsafe impl<
26911        D: fidl::encoding::ResourceDialect,
26912        T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment4, 3>, D>,
26913    > fidl::encoding::Encode<Size5Alignment4Array, D> for (T0,)
26914    {
26915        #[inline]
26916        unsafe fn encode(
26917            self,
26918            encoder: &mut fidl::encoding::Encoder<'_, D>,
26919            offset: usize,
26920            depth: fidl::encoding::Depth,
26921        ) -> fidl::Result<()> {
26922            encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26923            // Zero out padding regions. There's no need to apply masks
26924            // because the unmasked parts will be overwritten by fields.
26925            // Write the fields.
26926            self.0.encode(encoder, offset + 0, depth)?;
26927            Ok(())
26928        }
26929    }
26930
26931    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Array {
26932        #[inline(always)]
26933        fn new_empty() -> Self {
26934            Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment4, 3>, D) }
26935        }
26936
26937        #[inline]
26938        unsafe fn decode(
26939            &mut self,
26940            decoder: &mut fidl::encoding::Decoder<'_, D>,
26941            offset: usize,
26942            _depth: fidl::encoding::Depth,
26943        ) -> fidl::Result<()> {
26944            decoder.debug_check_bounds::<Self>(offset);
26945            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26946            // Verify that padding bytes are zero.
26947            let ptr = unsafe { buf_ptr.offset(4) };
26948            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26949            let mask = 0xffffff00u32;
26950            let maskedval = padval & mask;
26951            if maskedval != 0 {
26952                return Err(fidl::Error::NonZeroPadding {
26953                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26954                });
26955            }
26956            let ptr = unsafe { buf_ptr.offset(12) };
26957            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26958            let mask = 0xffffff00u32;
26959            let maskedval = padval & mask;
26960            if maskedval != 0 {
26961                return Err(fidl::Error::NonZeroPadding {
26962                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
26963                });
26964            }
26965            let ptr = unsafe { buf_ptr.offset(20) };
26966            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26967            let mask = 0xffffff00u32;
26968            let maskedval = padval & mask;
26969            if maskedval != 0 {
26970                return Err(fidl::Error::NonZeroPadding {
26971                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
26972                });
26973            }
26974            // Copy from the buffer into the object.
26975            unsafe {
26976                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
26977            }
26978            Ok(())
26979        }
26980    }
26981
26982    impl fidl::encoding::ValueTypeMarker for Size5Alignment4Vector {
26983        type Borrowed<'a> = &'a Self;
26984        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26985            value
26986        }
26987    }
26988
26989    unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Vector {
26990        type Owned = Self;
26991
26992        #[inline(always)]
26993        fn inline_align(_context: fidl::encoding::Context) -> usize {
26994            8
26995        }
26996
26997        #[inline(always)]
26998        fn inline_size(_context: fidl::encoding::Context) -> usize {
26999            16
27000        }
27001    }
27002
27003    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Vector, D>
27004        for &Size5Alignment4Vector
27005    {
27006        #[inline]
27007        unsafe fn encode(
27008            self,
27009            encoder: &mut fidl::encoding::Encoder<'_, D>,
27010            offset: usize,
27011            _depth: fidl::encoding::Depth,
27012        ) -> fidl::Result<()> {
27013            encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
27014            // Delegate to tuple encoding.
27015            fidl::encoding::Encode::<Size5Alignment4Vector, D>::encode(
27016                (
27017                    <fidl::encoding::UnboundedVector<Size5Alignment4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
27018                ),
27019                encoder, offset, _depth
27020            )
27021        }
27022    }
27023    unsafe impl<
27024        D: fidl::encoding::ResourceDialect,
27025        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment4>, D>,
27026    > fidl::encoding::Encode<Size5Alignment4Vector, D> for (T0,)
27027    {
27028        #[inline]
27029        unsafe fn encode(
27030            self,
27031            encoder: &mut fidl::encoding::Encoder<'_, D>,
27032            offset: usize,
27033            depth: fidl::encoding::Depth,
27034        ) -> fidl::Result<()> {
27035            encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
27036            // Zero out padding regions. There's no need to apply masks
27037            // because the unmasked parts will be overwritten by fields.
27038            // Write the fields.
27039            self.0.encode(encoder, offset + 0, depth)?;
27040            Ok(())
27041        }
27042    }
27043
27044    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Vector {
27045        #[inline(always)]
27046        fn new_empty() -> Self {
27047            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment4>, D) }
27048        }
27049
27050        #[inline]
27051        unsafe fn decode(
27052            &mut self,
27053            decoder: &mut fidl::encoding::Decoder<'_, D>,
27054            offset: usize,
27055            _depth: fidl::encoding::Depth,
27056        ) -> fidl::Result<()> {
27057            decoder.debug_check_bounds::<Self>(offset);
27058            // Verify that padding bytes are zero.
27059            fidl::decode!(
27060                fidl::encoding::UnboundedVector<Size5Alignment4>,
27061                D,
27062                &mut self.v,
27063                decoder,
27064                offset + 0,
27065                _depth
27066            )?;
27067            Ok(())
27068        }
27069    }
27070
27071    impl fidl::encoding::ValueTypeMarker for Size8Align8 {
27072        type Borrowed<'a> = &'a Self;
27073        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27074            value
27075        }
27076    }
27077
27078    unsafe impl fidl::encoding::TypeMarker for Size8Align8 {
27079        type Owned = Self;
27080
27081        #[inline(always)]
27082        fn inline_align(_context: fidl::encoding::Context) -> usize {
27083            8
27084        }
27085
27086        #[inline(always)]
27087        fn inline_size(_context: fidl::encoding::Context) -> usize {
27088            8
27089        }
27090        #[inline(always)]
27091        fn encode_is_copy() -> bool {
27092            true
27093        }
27094
27095        #[inline(always)]
27096        fn decode_is_copy() -> bool {
27097            true
27098        }
27099    }
27100
27101    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size8Align8, D>
27102        for &Size8Align8
27103    {
27104        #[inline]
27105        unsafe fn encode(
27106            self,
27107            encoder: &mut fidl::encoding::Encoder<'_, D>,
27108            offset: usize,
27109            _depth: fidl::encoding::Depth,
27110        ) -> fidl::Result<()> {
27111            encoder.debug_check_bounds::<Size8Align8>(offset);
27112            unsafe {
27113                // Copy the object into the buffer.
27114                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
27115                (buf_ptr as *mut Size8Align8).write_unaligned((self as *const Size8Align8).read());
27116                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
27117                // done second because the memcpy will write garbage to these bytes.
27118            }
27119            Ok(())
27120        }
27121    }
27122    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
27123        fidl::encoding::Encode<Size8Align8, D> for (T0,)
27124    {
27125        #[inline]
27126        unsafe fn encode(
27127            self,
27128            encoder: &mut fidl::encoding::Encoder<'_, D>,
27129            offset: usize,
27130            depth: fidl::encoding::Depth,
27131        ) -> fidl::Result<()> {
27132            encoder.debug_check_bounds::<Size8Align8>(offset);
27133            // Zero out padding regions. There's no need to apply masks
27134            // because the unmasked parts will be overwritten by fields.
27135            // Write the fields.
27136            self.0.encode(encoder, offset + 0, depth)?;
27137            Ok(())
27138        }
27139    }
27140
27141    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size8Align8 {
27142        #[inline(always)]
27143        fn new_empty() -> Self {
27144            Self { data: fidl::new_empty!(u64, D) }
27145        }
27146
27147        #[inline]
27148        unsafe fn decode(
27149            &mut self,
27150            decoder: &mut fidl::encoding::Decoder<'_, D>,
27151            offset: usize,
27152            _depth: fidl::encoding::Depth,
27153        ) -> fidl::Result<()> {
27154            decoder.debug_check_bounds::<Self>(offset);
27155            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
27156            // Verify that padding bytes are zero.
27157            // Copy from the buffer into the object.
27158            unsafe {
27159                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
27160            }
27161            Ok(())
27162        }
27163    }
27164
27165    impl fidl::encoding::ValueTypeMarker for StrictBitsUint16Struct {
27166        type Borrowed<'a> = &'a Self;
27167        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27168            value
27169        }
27170    }
27171
27172    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16Struct {
27173        type Owned = Self;
27174
27175        #[inline(always)]
27176        fn inline_align(_context: fidl::encoding::Context) -> usize {
27177            2
27178        }
27179
27180        #[inline(always)]
27181        fn inline_size(_context: fidl::encoding::Context) -> usize {
27182            2
27183        }
27184    }
27185
27186    unsafe impl<D: fidl::encoding::ResourceDialect>
27187        fidl::encoding::Encode<StrictBitsUint16Struct, D> for &StrictBitsUint16Struct
27188    {
27189        #[inline]
27190        unsafe fn encode(
27191            self,
27192            encoder: &mut fidl::encoding::Encoder<'_, D>,
27193            offset: usize,
27194            _depth: fidl::encoding::Depth,
27195        ) -> fidl::Result<()> {
27196            encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27197            // Delegate to tuple encoding.
27198            fidl::encoding::Encode::<StrictBitsUint16Struct, D>::encode(
27199                (<StrictBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27200                encoder,
27201                offset,
27202                _depth,
27203            )
27204        }
27205    }
27206    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint16, D>>
27207        fidl::encoding::Encode<StrictBitsUint16Struct, D> for (T0,)
27208    {
27209        #[inline]
27210        unsafe fn encode(
27211            self,
27212            encoder: &mut fidl::encoding::Encoder<'_, D>,
27213            offset: usize,
27214            depth: fidl::encoding::Depth,
27215        ) -> fidl::Result<()> {
27216            encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27217            // Zero out padding regions. There's no need to apply masks
27218            // because the unmasked parts will be overwritten by fields.
27219            // Write the fields.
27220            self.0.encode(encoder, offset + 0, depth)?;
27221            Ok(())
27222        }
27223    }
27224
27225    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27226        for StrictBitsUint16Struct
27227    {
27228        #[inline(always)]
27229        fn new_empty() -> Self {
27230            Self { b: fidl::new_empty!(StrictBitsUint16, D) }
27231        }
27232
27233        #[inline]
27234        unsafe fn decode(
27235            &mut self,
27236            decoder: &mut fidl::encoding::Decoder<'_, D>,
27237            offset: usize,
27238            _depth: fidl::encoding::Depth,
27239        ) -> fidl::Result<()> {
27240            decoder.debug_check_bounds::<Self>(offset);
27241            // Verify that padding bytes are zero.
27242            fidl::decode!(StrictBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
27243            Ok(())
27244        }
27245    }
27246
27247    impl fidl::encoding::ValueTypeMarker for StrictBitsUint32Struct {
27248        type Borrowed<'a> = &'a Self;
27249        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27250            value
27251        }
27252    }
27253
27254    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32Struct {
27255        type Owned = Self;
27256
27257        #[inline(always)]
27258        fn inline_align(_context: fidl::encoding::Context) -> usize {
27259            4
27260        }
27261
27262        #[inline(always)]
27263        fn inline_size(_context: fidl::encoding::Context) -> usize {
27264            4
27265        }
27266    }
27267
27268    unsafe impl<D: fidl::encoding::ResourceDialect>
27269        fidl::encoding::Encode<StrictBitsUint32Struct, D> for &StrictBitsUint32Struct
27270    {
27271        #[inline]
27272        unsafe fn encode(
27273            self,
27274            encoder: &mut fidl::encoding::Encoder<'_, D>,
27275            offset: usize,
27276            _depth: fidl::encoding::Depth,
27277        ) -> fidl::Result<()> {
27278            encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27279            // Delegate to tuple encoding.
27280            fidl::encoding::Encode::<StrictBitsUint32Struct, D>::encode(
27281                (<StrictBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27282                encoder,
27283                offset,
27284                _depth,
27285            )
27286        }
27287    }
27288    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint32, D>>
27289        fidl::encoding::Encode<StrictBitsUint32Struct, D> for (T0,)
27290    {
27291        #[inline]
27292        unsafe fn encode(
27293            self,
27294            encoder: &mut fidl::encoding::Encoder<'_, D>,
27295            offset: usize,
27296            depth: fidl::encoding::Depth,
27297        ) -> fidl::Result<()> {
27298            encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27299            // Zero out padding regions. There's no need to apply masks
27300            // because the unmasked parts will be overwritten by fields.
27301            // Write the fields.
27302            self.0.encode(encoder, offset + 0, depth)?;
27303            Ok(())
27304        }
27305    }
27306
27307    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27308        for StrictBitsUint32Struct
27309    {
27310        #[inline(always)]
27311        fn new_empty() -> Self {
27312            Self { b: fidl::new_empty!(StrictBitsUint32, D) }
27313        }
27314
27315        #[inline]
27316        unsafe fn decode(
27317            &mut self,
27318            decoder: &mut fidl::encoding::Decoder<'_, D>,
27319            offset: usize,
27320            _depth: fidl::encoding::Depth,
27321        ) -> fidl::Result<()> {
27322            decoder.debug_check_bounds::<Self>(offset);
27323            // Verify that padding bytes are zero.
27324            fidl::decode!(StrictBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
27325            Ok(())
27326        }
27327    }
27328
27329    impl fidl::encoding::ValueTypeMarker for StrictBitsUint64Struct {
27330        type Borrowed<'a> = &'a Self;
27331        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27332            value
27333        }
27334    }
27335
27336    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64Struct {
27337        type Owned = Self;
27338
27339        #[inline(always)]
27340        fn inline_align(_context: fidl::encoding::Context) -> usize {
27341            8
27342        }
27343
27344        #[inline(always)]
27345        fn inline_size(_context: fidl::encoding::Context) -> usize {
27346            8
27347        }
27348    }
27349
27350    unsafe impl<D: fidl::encoding::ResourceDialect>
27351        fidl::encoding::Encode<StrictBitsUint64Struct, D> for &StrictBitsUint64Struct
27352    {
27353        #[inline]
27354        unsafe fn encode(
27355            self,
27356            encoder: &mut fidl::encoding::Encoder<'_, D>,
27357            offset: usize,
27358            _depth: fidl::encoding::Depth,
27359        ) -> fidl::Result<()> {
27360            encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27361            // Delegate to tuple encoding.
27362            fidl::encoding::Encode::<StrictBitsUint64Struct, D>::encode(
27363                (<StrictBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27364                encoder,
27365                offset,
27366                _depth,
27367            )
27368        }
27369    }
27370    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint64, D>>
27371        fidl::encoding::Encode<StrictBitsUint64Struct, D> for (T0,)
27372    {
27373        #[inline]
27374        unsafe fn encode(
27375            self,
27376            encoder: &mut fidl::encoding::Encoder<'_, D>,
27377            offset: usize,
27378            depth: fidl::encoding::Depth,
27379        ) -> fidl::Result<()> {
27380            encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27381            // Zero out padding regions. There's no need to apply masks
27382            // because the unmasked parts will be overwritten by fields.
27383            // Write the fields.
27384            self.0.encode(encoder, offset + 0, depth)?;
27385            Ok(())
27386        }
27387    }
27388
27389    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27390        for StrictBitsUint64Struct
27391    {
27392        #[inline(always)]
27393        fn new_empty() -> Self {
27394            Self { b: fidl::new_empty!(StrictBitsUint64, D) }
27395        }
27396
27397        #[inline]
27398        unsafe fn decode(
27399            &mut self,
27400            decoder: &mut fidl::encoding::Decoder<'_, D>,
27401            offset: usize,
27402            _depth: fidl::encoding::Depth,
27403        ) -> fidl::Result<()> {
27404            decoder.debug_check_bounds::<Self>(offset);
27405            // Verify that padding bytes are zero.
27406            fidl::decode!(StrictBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
27407            Ok(())
27408        }
27409    }
27410
27411    impl fidl::encoding::ValueTypeMarker for StrictBitsUint8Struct {
27412        type Borrowed<'a> = &'a Self;
27413        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27414            value
27415        }
27416    }
27417
27418    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8Struct {
27419        type Owned = Self;
27420
27421        #[inline(always)]
27422        fn inline_align(_context: fidl::encoding::Context) -> usize {
27423            1
27424        }
27425
27426        #[inline(always)]
27427        fn inline_size(_context: fidl::encoding::Context) -> usize {
27428            1
27429        }
27430    }
27431
27432    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictBitsUint8Struct, D>
27433        for &StrictBitsUint8Struct
27434    {
27435        #[inline]
27436        unsafe fn encode(
27437            self,
27438            encoder: &mut fidl::encoding::Encoder<'_, D>,
27439            offset: usize,
27440            _depth: fidl::encoding::Depth,
27441        ) -> fidl::Result<()> {
27442            encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27443            // Delegate to tuple encoding.
27444            fidl::encoding::Encode::<StrictBitsUint8Struct, D>::encode(
27445                (<StrictBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27446                encoder,
27447                offset,
27448                _depth,
27449            )
27450        }
27451    }
27452    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint8, D>>
27453        fidl::encoding::Encode<StrictBitsUint8Struct, D> for (T0,)
27454    {
27455        #[inline]
27456        unsafe fn encode(
27457            self,
27458            encoder: &mut fidl::encoding::Encoder<'_, D>,
27459            offset: usize,
27460            depth: fidl::encoding::Depth,
27461        ) -> fidl::Result<()> {
27462            encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27463            // Zero out padding regions. There's no need to apply masks
27464            // because the unmasked parts will be overwritten by fields.
27465            // Write the fields.
27466            self.0.encode(encoder, offset + 0, depth)?;
27467            Ok(())
27468        }
27469    }
27470
27471    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8Struct {
27472        #[inline(always)]
27473        fn new_empty() -> Self {
27474            Self { b: fidl::new_empty!(StrictBitsUint8, D) }
27475        }
27476
27477        #[inline]
27478        unsafe fn decode(
27479            &mut self,
27480            decoder: &mut fidl::encoding::Decoder<'_, D>,
27481            offset: usize,
27482            _depth: fidl::encoding::Depth,
27483        ) -> fidl::Result<()> {
27484            decoder.debug_check_bounds::<Self>(offset);
27485            // Verify that padding bytes are zero.
27486            fidl::decode!(StrictBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
27487            Ok(())
27488        }
27489    }
27490
27491    impl fidl::encoding::ValueTypeMarker for StrictEnumInt16Struct {
27492        type Borrowed<'a> = &'a Self;
27493        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27494            value
27495        }
27496    }
27497
27498    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16Struct {
27499        type Owned = Self;
27500
27501        #[inline(always)]
27502        fn inline_align(_context: fidl::encoding::Context) -> usize {
27503            2
27504        }
27505
27506        #[inline(always)]
27507        fn inline_size(_context: fidl::encoding::Context) -> usize {
27508            2
27509        }
27510    }
27511
27512    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt16Struct, D>
27513        for &StrictEnumInt16Struct
27514    {
27515        #[inline]
27516        unsafe fn encode(
27517            self,
27518            encoder: &mut fidl::encoding::Encoder<'_, D>,
27519            offset: usize,
27520            _depth: fidl::encoding::Depth,
27521        ) -> fidl::Result<()> {
27522            encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27523            // Delegate to tuple encoding.
27524            fidl::encoding::Encode::<StrictEnumInt16Struct, D>::encode(
27525                (<StrictEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27526                encoder,
27527                offset,
27528                _depth,
27529            )
27530        }
27531    }
27532    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt16, D>>
27533        fidl::encoding::Encode<StrictEnumInt16Struct, D> for (T0,)
27534    {
27535        #[inline]
27536        unsafe fn encode(
27537            self,
27538            encoder: &mut fidl::encoding::Encoder<'_, D>,
27539            offset: usize,
27540            depth: fidl::encoding::Depth,
27541        ) -> fidl::Result<()> {
27542            encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27543            // Zero out padding regions. There's no need to apply masks
27544            // because the unmasked parts will be overwritten by fields.
27545            // Write the fields.
27546            self.0.encode(encoder, offset + 0, depth)?;
27547            Ok(())
27548        }
27549    }
27550
27551    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16Struct {
27552        #[inline(always)]
27553        fn new_empty() -> Self {
27554            Self { e: fidl::new_empty!(StrictEnumInt16, D) }
27555        }
27556
27557        #[inline]
27558        unsafe fn decode(
27559            &mut self,
27560            decoder: &mut fidl::encoding::Decoder<'_, D>,
27561            offset: usize,
27562            _depth: fidl::encoding::Depth,
27563        ) -> fidl::Result<()> {
27564            decoder.debug_check_bounds::<Self>(offset);
27565            // Verify that padding bytes are zero.
27566            fidl::decode!(StrictEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
27567            Ok(())
27568        }
27569    }
27570
27571    impl fidl::encoding::ValueTypeMarker for StrictEnumInt32Struct {
27572        type Borrowed<'a> = &'a Self;
27573        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27574            value
27575        }
27576    }
27577
27578    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32Struct {
27579        type Owned = Self;
27580
27581        #[inline(always)]
27582        fn inline_align(_context: fidl::encoding::Context) -> usize {
27583            4
27584        }
27585
27586        #[inline(always)]
27587        fn inline_size(_context: fidl::encoding::Context) -> usize {
27588            4
27589        }
27590    }
27591
27592    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt32Struct, D>
27593        for &StrictEnumInt32Struct
27594    {
27595        #[inline]
27596        unsafe fn encode(
27597            self,
27598            encoder: &mut fidl::encoding::Encoder<'_, D>,
27599            offset: usize,
27600            _depth: fidl::encoding::Depth,
27601        ) -> fidl::Result<()> {
27602            encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27603            // Delegate to tuple encoding.
27604            fidl::encoding::Encode::<StrictEnumInt32Struct, D>::encode(
27605                (<StrictEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27606                encoder,
27607                offset,
27608                _depth,
27609            )
27610        }
27611    }
27612    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt32, D>>
27613        fidl::encoding::Encode<StrictEnumInt32Struct, D> for (T0,)
27614    {
27615        #[inline]
27616        unsafe fn encode(
27617            self,
27618            encoder: &mut fidl::encoding::Encoder<'_, D>,
27619            offset: usize,
27620            depth: fidl::encoding::Depth,
27621        ) -> fidl::Result<()> {
27622            encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27623            // Zero out padding regions. There's no need to apply masks
27624            // because the unmasked parts will be overwritten by fields.
27625            // Write the fields.
27626            self.0.encode(encoder, offset + 0, depth)?;
27627            Ok(())
27628        }
27629    }
27630
27631    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32Struct {
27632        #[inline(always)]
27633        fn new_empty() -> Self {
27634            Self { e: fidl::new_empty!(StrictEnumInt32, D) }
27635        }
27636
27637        #[inline]
27638        unsafe fn decode(
27639            &mut self,
27640            decoder: &mut fidl::encoding::Decoder<'_, D>,
27641            offset: usize,
27642            _depth: fidl::encoding::Depth,
27643        ) -> fidl::Result<()> {
27644            decoder.debug_check_bounds::<Self>(offset);
27645            // Verify that padding bytes are zero.
27646            fidl::decode!(StrictEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
27647            Ok(())
27648        }
27649    }
27650
27651    impl fidl::encoding::ValueTypeMarker for StrictEnumInt64Struct {
27652        type Borrowed<'a> = &'a Self;
27653        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27654            value
27655        }
27656    }
27657
27658    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64Struct {
27659        type Owned = Self;
27660
27661        #[inline(always)]
27662        fn inline_align(_context: fidl::encoding::Context) -> usize {
27663            8
27664        }
27665
27666        #[inline(always)]
27667        fn inline_size(_context: fidl::encoding::Context) -> usize {
27668            8
27669        }
27670    }
27671
27672    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt64Struct, D>
27673        for &StrictEnumInt64Struct
27674    {
27675        #[inline]
27676        unsafe fn encode(
27677            self,
27678            encoder: &mut fidl::encoding::Encoder<'_, D>,
27679            offset: usize,
27680            _depth: fidl::encoding::Depth,
27681        ) -> fidl::Result<()> {
27682            encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27683            // Delegate to tuple encoding.
27684            fidl::encoding::Encode::<StrictEnumInt64Struct, D>::encode(
27685                (<StrictEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27686                encoder,
27687                offset,
27688                _depth,
27689            )
27690        }
27691    }
27692    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt64, D>>
27693        fidl::encoding::Encode<StrictEnumInt64Struct, D> for (T0,)
27694    {
27695        #[inline]
27696        unsafe fn encode(
27697            self,
27698            encoder: &mut fidl::encoding::Encoder<'_, D>,
27699            offset: usize,
27700            depth: fidl::encoding::Depth,
27701        ) -> fidl::Result<()> {
27702            encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27703            // Zero out padding regions. There's no need to apply masks
27704            // because the unmasked parts will be overwritten by fields.
27705            // Write the fields.
27706            self.0.encode(encoder, offset + 0, depth)?;
27707            Ok(())
27708        }
27709    }
27710
27711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64Struct {
27712        #[inline(always)]
27713        fn new_empty() -> Self {
27714            Self { e: fidl::new_empty!(StrictEnumInt64, D) }
27715        }
27716
27717        #[inline]
27718        unsafe fn decode(
27719            &mut self,
27720            decoder: &mut fidl::encoding::Decoder<'_, D>,
27721            offset: usize,
27722            _depth: fidl::encoding::Depth,
27723        ) -> fidl::Result<()> {
27724            decoder.debug_check_bounds::<Self>(offset);
27725            // Verify that padding bytes are zero.
27726            fidl::decode!(StrictEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
27727            Ok(())
27728        }
27729    }
27730
27731    impl fidl::encoding::ValueTypeMarker for StrictEnumInt8Struct {
27732        type Borrowed<'a> = &'a Self;
27733        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27734            value
27735        }
27736    }
27737
27738    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8Struct {
27739        type Owned = Self;
27740
27741        #[inline(always)]
27742        fn inline_align(_context: fidl::encoding::Context) -> usize {
27743            1
27744        }
27745
27746        #[inline(always)]
27747        fn inline_size(_context: fidl::encoding::Context) -> usize {
27748            1
27749        }
27750    }
27751
27752    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt8Struct, D>
27753        for &StrictEnumInt8Struct
27754    {
27755        #[inline]
27756        unsafe fn encode(
27757            self,
27758            encoder: &mut fidl::encoding::Encoder<'_, D>,
27759            offset: usize,
27760            _depth: fidl::encoding::Depth,
27761        ) -> fidl::Result<()> {
27762            encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27763            // Delegate to tuple encoding.
27764            fidl::encoding::Encode::<StrictEnumInt8Struct, D>::encode(
27765                (<StrictEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27766                encoder,
27767                offset,
27768                _depth,
27769            )
27770        }
27771    }
27772    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt8, D>>
27773        fidl::encoding::Encode<StrictEnumInt8Struct, D> for (T0,)
27774    {
27775        #[inline]
27776        unsafe fn encode(
27777            self,
27778            encoder: &mut fidl::encoding::Encoder<'_, D>,
27779            offset: usize,
27780            depth: fidl::encoding::Depth,
27781        ) -> fidl::Result<()> {
27782            encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27783            // Zero out padding regions. There's no need to apply masks
27784            // because the unmasked parts will be overwritten by fields.
27785            // Write the fields.
27786            self.0.encode(encoder, offset + 0, depth)?;
27787            Ok(())
27788        }
27789    }
27790
27791    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8Struct {
27792        #[inline(always)]
27793        fn new_empty() -> Self {
27794            Self { e: fidl::new_empty!(StrictEnumInt8, D) }
27795        }
27796
27797        #[inline]
27798        unsafe fn decode(
27799            &mut self,
27800            decoder: &mut fidl::encoding::Decoder<'_, D>,
27801            offset: usize,
27802            _depth: fidl::encoding::Depth,
27803        ) -> fidl::Result<()> {
27804            decoder.debug_check_bounds::<Self>(offset);
27805            // Verify that padding bytes are zero.
27806            fidl::decode!(StrictEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
27807            Ok(())
27808        }
27809    }
27810
27811    impl fidl::encoding::ValueTypeMarker for StrictEnumUint16Struct {
27812        type Borrowed<'a> = &'a Self;
27813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27814            value
27815        }
27816    }
27817
27818    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16Struct {
27819        type Owned = Self;
27820
27821        #[inline(always)]
27822        fn inline_align(_context: fidl::encoding::Context) -> usize {
27823            2
27824        }
27825
27826        #[inline(always)]
27827        fn inline_size(_context: fidl::encoding::Context) -> usize {
27828            2
27829        }
27830    }
27831
27832    unsafe impl<D: fidl::encoding::ResourceDialect>
27833        fidl::encoding::Encode<StrictEnumUint16Struct, D> for &StrictEnumUint16Struct
27834    {
27835        #[inline]
27836        unsafe fn encode(
27837            self,
27838            encoder: &mut fidl::encoding::Encoder<'_, D>,
27839            offset: usize,
27840            _depth: fidl::encoding::Depth,
27841        ) -> fidl::Result<()> {
27842            encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27843            // Delegate to tuple encoding.
27844            fidl::encoding::Encode::<StrictEnumUint16Struct, D>::encode(
27845                (<StrictEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27846                encoder,
27847                offset,
27848                _depth,
27849            )
27850        }
27851    }
27852    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint16, D>>
27853        fidl::encoding::Encode<StrictEnumUint16Struct, D> for (T0,)
27854    {
27855        #[inline]
27856        unsafe fn encode(
27857            self,
27858            encoder: &mut fidl::encoding::Encoder<'_, D>,
27859            offset: usize,
27860            depth: fidl::encoding::Depth,
27861        ) -> fidl::Result<()> {
27862            encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27863            // Zero out padding regions. There's no need to apply masks
27864            // because the unmasked parts will be overwritten by fields.
27865            // Write the fields.
27866            self.0.encode(encoder, offset + 0, depth)?;
27867            Ok(())
27868        }
27869    }
27870
27871    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27872        for StrictEnumUint16Struct
27873    {
27874        #[inline(always)]
27875        fn new_empty() -> Self {
27876            Self { e: fidl::new_empty!(StrictEnumUint16, D) }
27877        }
27878
27879        #[inline]
27880        unsafe fn decode(
27881            &mut self,
27882            decoder: &mut fidl::encoding::Decoder<'_, D>,
27883            offset: usize,
27884            _depth: fidl::encoding::Depth,
27885        ) -> fidl::Result<()> {
27886            decoder.debug_check_bounds::<Self>(offset);
27887            // Verify that padding bytes are zero.
27888            fidl::decode!(StrictEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
27889            Ok(())
27890        }
27891    }
27892
27893    impl fidl::encoding::ValueTypeMarker for StrictEnumUint32Struct {
27894        type Borrowed<'a> = &'a Self;
27895        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27896            value
27897        }
27898    }
27899
27900    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32Struct {
27901        type Owned = Self;
27902
27903        #[inline(always)]
27904        fn inline_align(_context: fidl::encoding::Context) -> usize {
27905            4
27906        }
27907
27908        #[inline(always)]
27909        fn inline_size(_context: fidl::encoding::Context) -> usize {
27910            4
27911        }
27912    }
27913
27914    unsafe impl<D: fidl::encoding::ResourceDialect>
27915        fidl::encoding::Encode<StrictEnumUint32Struct, D> for &StrictEnumUint32Struct
27916    {
27917        #[inline]
27918        unsafe fn encode(
27919            self,
27920            encoder: &mut fidl::encoding::Encoder<'_, D>,
27921            offset: usize,
27922            _depth: fidl::encoding::Depth,
27923        ) -> fidl::Result<()> {
27924            encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27925            // Delegate to tuple encoding.
27926            fidl::encoding::Encode::<StrictEnumUint32Struct, D>::encode(
27927                (<StrictEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27928                encoder,
27929                offset,
27930                _depth,
27931            )
27932        }
27933    }
27934    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint32, D>>
27935        fidl::encoding::Encode<StrictEnumUint32Struct, D> for (T0,)
27936    {
27937        #[inline]
27938        unsafe fn encode(
27939            self,
27940            encoder: &mut fidl::encoding::Encoder<'_, D>,
27941            offset: usize,
27942            depth: fidl::encoding::Depth,
27943        ) -> fidl::Result<()> {
27944            encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27945            // Zero out padding regions. There's no need to apply masks
27946            // because the unmasked parts will be overwritten by fields.
27947            // Write the fields.
27948            self.0.encode(encoder, offset + 0, depth)?;
27949            Ok(())
27950        }
27951    }
27952
27953    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27954        for StrictEnumUint32Struct
27955    {
27956        #[inline(always)]
27957        fn new_empty() -> Self {
27958            Self { e: fidl::new_empty!(StrictEnumUint32, D) }
27959        }
27960
27961        #[inline]
27962        unsafe fn decode(
27963            &mut self,
27964            decoder: &mut fidl::encoding::Decoder<'_, D>,
27965            offset: usize,
27966            _depth: fidl::encoding::Depth,
27967        ) -> fidl::Result<()> {
27968            decoder.debug_check_bounds::<Self>(offset);
27969            // Verify that padding bytes are zero.
27970            fidl::decode!(StrictEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
27971            Ok(())
27972        }
27973    }
27974
27975    impl fidl::encoding::ValueTypeMarker for StrictEnumUint64Struct {
27976        type Borrowed<'a> = &'a Self;
27977        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27978            value
27979        }
27980    }
27981
27982    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64Struct {
27983        type Owned = Self;
27984
27985        #[inline(always)]
27986        fn inline_align(_context: fidl::encoding::Context) -> usize {
27987            8
27988        }
27989
27990        #[inline(always)]
27991        fn inline_size(_context: fidl::encoding::Context) -> usize {
27992            8
27993        }
27994    }
27995
27996    unsafe impl<D: fidl::encoding::ResourceDialect>
27997        fidl::encoding::Encode<StrictEnumUint64Struct, D> for &StrictEnumUint64Struct
27998    {
27999        #[inline]
28000        unsafe fn encode(
28001            self,
28002            encoder: &mut fidl::encoding::Encoder<'_, D>,
28003            offset: usize,
28004            _depth: fidl::encoding::Depth,
28005        ) -> fidl::Result<()> {
28006            encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
28007            // Delegate to tuple encoding.
28008            fidl::encoding::Encode::<StrictEnumUint64Struct, D>::encode(
28009                (<StrictEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
28010                encoder,
28011                offset,
28012                _depth,
28013            )
28014        }
28015    }
28016    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint64, D>>
28017        fidl::encoding::Encode<StrictEnumUint64Struct, D> for (T0,)
28018    {
28019        #[inline]
28020        unsafe fn encode(
28021            self,
28022            encoder: &mut fidl::encoding::Encoder<'_, D>,
28023            offset: usize,
28024            depth: fidl::encoding::Depth,
28025        ) -> fidl::Result<()> {
28026            encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
28027            // Zero out padding regions. There's no need to apply masks
28028            // because the unmasked parts will be overwritten by fields.
28029            // Write the fields.
28030            self.0.encode(encoder, offset + 0, depth)?;
28031            Ok(())
28032        }
28033    }
28034
28035    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28036        for StrictEnumUint64Struct
28037    {
28038        #[inline(always)]
28039        fn new_empty() -> Self {
28040            Self { e: fidl::new_empty!(StrictEnumUint64, D) }
28041        }
28042
28043        #[inline]
28044        unsafe fn decode(
28045            &mut self,
28046            decoder: &mut fidl::encoding::Decoder<'_, D>,
28047            offset: usize,
28048            _depth: fidl::encoding::Depth,
28049        ) -> fidl::Result<()> {
28050            decoder.debug_check_bounds::<Self>(offset);
28051            // Verify that padding bytes are zero.
28052            fidl::decode!(StrictEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
28053            Ok(())
28054        }
28055    }
28056
28057    impl fidl::encoding::ValueTypeMarker for StrictEnumUint8Struct {
28058        type Borrowed<'a> = &'a Self;
28059        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28060            value
28061        }
28062    }
28063
28064    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8Struct {
28065        type Owned = Self;
28066
28067        #[inline(always)]
28068        fn inline_align(_context: fidl::encoding::Context) -> usize {
28069            1
28070        }
28071
28072        #[inline(always)]
28073        fn inline_size(_context: fidl::encoding::Context) -> usize {
28074            1
28075        }
28076    }
28077
28078    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumUint8Struct, D>
28079        for &StrictEnumUint8Struct
28080    {
28081        #[inline]
28082        unsafe fn encode(
28083            self,
28084            encoder: &mut fidl::encoding::Encoder<'_, D>,
28085            offset: usize,
28086            _depth: fidl::encoding::Depth,
28087        ) -> fidl::Result<()> {
28088            encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
28089            // Delegate to tuple encoding.
28090            fidl::encoding::Encode::<StrictEnumUint8Struct, D>::encode(
28091                (<StrictEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
28092                encoder,
28093                offset,
28094                _depth,
28095            )
28096        }
28097    }
28098    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint8, D>>
28099        fidl::encoding::Encode<StrictEnumUint8Struct, D> for (T0,)
28100    {
28101        #[inline]
28102        unsafe fn encode(
28103            self,
28104            encoder: &mut fidl::encoding::Encoder<'_, D>,
28105            offset: usize,
28106            depth: fidl::encoding::Depth,
28107        ) -> fidl::Result<()> {
28108            encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
28109            // Zero out padding regions. There's no need to apply masks
28110            // because the unmasked parts will be overwritten by fields.
28111            // Write the fields.
28112            self.0.encode(encoder, offset + 0, depth)?;
28113            Ok(())
28114        }
28115    }
28116
28117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8Struct {
28118        #[inline(always)]
28119        fn new_empty() -> Self {
28120            Self { e: fidl::new_empty!(StrictEnumUint8, D) }
28121        }
28122
28123        #[inline]
28124        unsafe fn decode(
28125            &mut self,
28126            decoder: &mut fidl::encoding::Decoder<'_, D>,
28127            offset: usize,
28128            _depth: fidl::encoding::Depth,
28129        ) -> fidl::Result<()> {
28130            decoder.debug_check_bounds::<Self>(offset);
28131            // Verify that padding bytes are zero.
28132            fidl::decode!(StrictEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
28133            Ok(())
28134        }
28135    }
28136
28137    impl fidl::encoding::ValueTypeMarker for StringUnionStruct {
28138        type Borrowed<'a> = &'a Self;
28139        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28140            value
28141        }
28142    }
28143
28144    unsafe impl fidl::encoding::TypeMarker for StringUnionStruct {
28145        type Owned = Self;
28146
28147        #[inline(always)]
28148        fn inline_align(_context: fidl::encoding::Context) -> usize {
28149            8
28150        }
28151
28152        #[inline(always)]
28153        fn inline_size(_context: fidl::encoding::Context) -> usize {
28154            32
28155        }
28156    }
28157
28158    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionStruct, D>
28159        for &StringUnionStruct
28160    {
28161        #[inline]
28162        unsafe fn encode(
28163            self,
28164            encoder: &mut fidl::encoding::Encoder<'_, D>,
28165            offset: usize,
28166            _depth: fidl::encoding::Depth,
28167        ) -> fidl::Result<()> {
28168            encoder.debug_check_bounds::<StringUnionStruct>(offset);
28169            // Delegate to tuple encoding.
28170            fidl::encoding::Encode::<StringUnionStruct, D>::encode(
28171                (
28172                    <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
28173                    <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
28174                ),
28175                encoder, offset, _depth
28176            )
28177        }
28178    }
28179    unsafe impl<
28180        D: fidl::encoding::ResourceDialect,
28181        T0: fidl::encoding::Encode<StringBoolUnion, D>,
28182        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
28183    > fidl::encoding::Encode<StringUnionStruct, D> for (T0, T1)
28184    {
28185        #[inline]
28186        unsafe fn encode(
28187            self,
28188            encoder: &mut fidl::encoding::Encoder<'_, D>,
28189            offset: usize,
28190            depth: fidl::encoding::Depth,
28191        ) -> fidl::Result<()> {
28192            encoder.debug_check_bounds::<StringUnionStruct>(offset);
28193            // Zero out padding regions. There's no need to apply masks
28194            // because the unmasked parts will be overwritten by fields.
28195            // Write the fields.
28196            self.0.encode(encoder, offset + 0, depth)?;
28197            self.1.encode(encoder, offset + 16, depth)?;
28198            Ok(())
28199        }
28200    }
28201
28202    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionStruct {
28203        #[inline(always)]
28204        fn new_empty() -> Self {
28205            Self {
28206                u: fidl::new_empty!(StringBoolUnion, D),
28207                nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
28208            }
28209        }
28210
28211        #[inline]
28212        unsafe fn decode(
28213            &mut self,
28214            decoder: &mut fidl::encoding::Decoder<'_, D>,
28215            offset: usize,
28216            _depth: fidl::encoding::Depth,
28217        ) -> fidl::Result<()> {
28218            decoder.debug_check_bounds::<Self>(offset);
28219            // Verify that padding bytes are zero.
28220            fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
28221            fidl::decode!(
28222                fidl::encoding::OptionalUnion<StringBoolUnion>,
28223                D,
28224                &mut self.nullable_u,
28225                decoder,
28226                offset + 16,
28227                _depth
28228            )?;
28229            Ok(())
28230        }
28231    }
28232
28233    impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapper {
28234        type Borrowed<'a> = &'a Self;
28235        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28236            value
28237        }
28238    }
28239
28240    unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapper {
28241        type Owned = Self;
28242
28243        #[inline(always)]
28244        fn inline_align(_context: fidl::encoding::Context) -> usize {
28245            8
28246        }
28247
28248        #[inline(always)]
28249        fn inline_size(_context: fidl::encoding::Context) -> usize {
28250            32
28251        }
28252    }
28253
28254    unsafe impl<D: fidl::encoding::ResourceDialect>
28255        fidl::encoding::Encode<StringUnionStructWrapper, D> for &StringUnionStructWrapper
28256    {
28257        #[inline]
28258        unsafe fn encode(
28259            self,
28260            encoder: &mut fidl::encoding::Encoder<'_, D>,
28261            offset: usize,
28262            _depth: fidl::encoding::Depth,
28263        ) -> fidl::Result<()> {
28264            encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28265            // Delegate to tuple encoding.
28266            fidl::encoding::Encode::<StringUnionStructWrapper, D>::encode(
28267                (<StringUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.sus),),
28268                encoder,
28269                offset,
28270                _depth,
28271            )
28272        }
28273    }
28274    unsafe impl<
28275        D: fidl::encoding::ResourceDialect,
28276        T0: fidl::encoding::Encode<StringUnionStruct, D>,
28277    > fidl::encoding::Encode<StringUnionStructWrapper, D> for (T0,)
28278    {
28279        #[inline]
28280        unsafe fn encode(
28281            self,
28282            encoder: &mut fidl::encoding::Encoder<'_, D>,
28283            offset: usize,
28284            depth: fidl::encoding::Depth,
28285        ) -> fidl::Result<()> {
28286            encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28287            // Zero out padding regions. There's no need to apply masks
28288            // because the unmasked parts will be overwritten by fields.
28289            // Write the fields.
28290            self.0.encode(encoder, offset + 0, depth)?;
28291            Ok(())
28292        }
28293    }
28294
28295    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28296        for StringUnionStructWrapper
28297    {
28298        #[inline(always)]
28299        fn new_empty() -> Self {
28300            Self { sus: fidl::new_empty!(StringUnionStruct, D) }
28301        }
28302
28303        #[inline]
28304        unsafe fn decode(
28305            &mut self,
28306            decoder: &mut fidl::encoding::Decoder<'_, D>,
28307            offset: usize,
28308            _depth: fidl::encoding::Depth,
28309        ) -> fidl::Result<()> {
28310            decoder.debug_check_bounds::<Self>(offset);
28311            // Verify that padding bytes are zero.
28312            fidl::decode!(StringUnionStruct, D, &mut self.sus, decoder, offset + 0, _depth)?;
28313            Ok(())
28314        }
28315    }
28316
28317    impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapperResponse {
28318        type Borrowed<'a> = &'a Self;
28319        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28320            value
28321        }
28322    }
28323
28324    unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapperResponse {
28325        type Owned = Self;
28326
28327        #[inline(always)]
28328        fn inline_align(_context: fidl::encoding::Context) -> usize {
28329            8
28330        }
28331
28332        #[inline(always)]
28333        fn inline_size(_context: fidl::encoding::Context) -> usize {
28334            48
28335        }
28336    }
28337
28338    unsafe impl<D: fidl::encoding::ResourceDialect>
28339        fidl::encoding::Encode<StringUnionStructWrapperResponse, D>
28340        for &StringUnionStructWrapperResponse
28341    {
28342        #[inline]
28343        unsafe fn encode(
28344            self,
28345            encoder: &mut fidl::encoding::Encoder<'_, D>,
28346            offset: usize,
28347            _depth: fidl::encoding::Depth,
28348        ) -> fidl::Result<()> {
28349            encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28350            // Delegate to tuple encoding.
28351            fidl::encoding::Encode::<StringUnionStructWrapperResponse, D>::encode(
28352                (
28353                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
28354                    <StringUnionStructWrapper as fidl::encoding::ValueTypeMarker>::borrow(
28355                        &self.body,
28356                    ),
28357                ),
28358                encoder,
28359                offset,
28360                _depth,
28361            )
28362        }
28363    }
28364    unsafe impl<
28365        D: fidl::encoding::ResourceDialect,
28366        T0: fidl::encoding::Encode<TransactionHeader, D>,
28367        T1: fidl::encoding::Encode<StringUnionStructWrapper, D>,
28368    > fidl::encoding::Encode<StringUnionStructWrapperResponse, D> for (T0, T1)
28369    {
28370        #[inline]
28371        unsafe fn encode(
28372            self,
28373            encoder: &mut fidl::encoding::Encoder<'_, D>,
28374            offset: usize,
28375            depth: fidl::encoding::Depth,
28376        ) -> fidl::Result<()> {
28377            encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28378            // Zero out padding regions. There's no need to apply masks
28379            // because the unmasked parts will be overwritten by fields.
28380            // Write the fields.
28381            self.0.encode(encoder, offset + 0, depth)?;
28382            self.1.encode(encoder, offset + 16, depth)?;
28383            Ok(())
28384        }
28385    }
28386
28387    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28388        for StringUnionStructWrapperResponse
28389    {
28390        #[inline(always)]
28391        fn new_empty() -> Self {
28392            Self {
28393                header: fidl::new_empty!(TransactionHeader, D),
28394                body: fidl::new_empty!(StringUnionStructWrapper, D),
28395            }
28396        }
28397
28398        #[inline]
28399        unsafe fn decode(
28400            &mut self,
28401            decoder: &mut fidl::encoding::Decoder<'_, D>,
28402            offset: usize,
28403            _depth: fidl::encoding::Depth,
28404        ) -> fidl::Result<()> {
28405            decoder.debug_check_bounds::<Self>(offset);
28406            // Verify that padding bytes are zero.
28407            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
28408            fidl::decode!(
28409                StringUnionStructWrapper,
28410                D,
28411                &mut self.body,
28412                decoder,
28413                offset + 16,
28414                _depth
28415            )?;
28416            Ok(())
28417        }
28418    }
28419
28420    impl fidl::encoding::ValueTypeMarker for StringUnionVector {
28421        type Borrowed<'a> = &'a Self;
28422        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28423            value
28424        }
28425    }
28426
28427    unsafe impl fidl::encoding::TypeMarker for StringUnionVector {
28428        type Owned = Self;
28429
28430        #[inline(always)]
28431        fn inline_align(_context: fidl::encoding::Context) -> usize {
28432            8
28433        }
28434
28435        #[inline(always)]
28436        fn inline_size(_context: fidl::encoding::Context) -> usize {
28437            16
28438        }
28439    }
28440
28441    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionVector, D>
28442        for &StringUnionVector
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::<StringUnionVector>(offset);
28452            // Delegate to tuple encoding.
28453            fidl::encoding::Encode::<StringUnionVector, D>::encode(
28454                (
28455                    <fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_vector),
28456                ),
28457                encoder, offset, _depth
28458            )
28459        }
28460    }
28461    unsafe impl<
28462        D: fidl::encoding::ResourceDialect,
28463        T0: fidl::encoding::Encode<
28464                fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28465                D,
28466            >,
28467    > fidl::encoding::Encode<StringUnionVector, D> for (T0,)
28468    {
28469        #[inline]
28470        unsafe fn encode(
28471            self,
28472            encoder: &mut fidl::encoding::Encoder<'_, D>,
28473            offset: usize,
28474            depth: fidl::encoding::Depth,
28475        ) -> fidl::Result<()> {
28476            encoder.debug_check_bounds::<StringUnionVector>(offset);
28477            // Zero out padding regions. There's no need to apply masks
28478            // because the unmasked parts will be overwritten by fields.
28479            // Write the fields.
28480            self.0.encode(encoder, offset + 0, depth)?;
28481            Ok(())
28482        }
28483    }
28484
28485    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionVector {
28486        #[inline(always)]
28487        fn new_empty() -> Self {
28488            Self {
28489                the_vector: fidl::new_empty!(
28490                    fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28491                    D
28492                ),
28493            }
28494        }
28495
28496        #[inline]
28497        unsafe fn decode(
28498            &mut self,
28499            decoder: &mut fidl::encoding::Decoder<'_, D>,
28500            offset: usize,
28501            _depth: fidl::encoding::Depth,
28502        ) -> fidl::Result<()> {
28503            decoder.debug_check_bounds::<Self>(offset);
28504            // Verify that padding bytes are zero.
28505            fidl::decode!(
28506                fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28507                D,
28508                &mut self.the_vector,
28509                decoder,
28510                offset + 0,
28511                _depth
28512            )?;
28513            Ok(())
28514        }
28515    }
28516
28517    impl fidl::encoding::ValueTypeMarker for StringWithLimitInArray {
28518        type Borrowed<'a> = &'a Self;
28519        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28520            value
28521        }
28522    }
28523
28524    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInArray {
28525        type Owned = Self;
28526
28527        #[inline(always)]
28528        fn inline_align(_context: fidl::encoding::Context) -> usize {
28529            8
28530        }
28531
28532        #[inline(always)]
28533        fn inline_size(_context: fidl::encoding::Context) -> usize {
28534            32
28535        }
28536    }
28537
28538    unsafe impl<D: fidl::encoding::ResourceDialect>
28539        fidl::encoding::Encode<StringWithLimitInArray, D> for &StringWithLimitInArray
28540    {
28541        #[inline]
28542        unsafe fn encode(
28543            self,
28544            encoder: &mut fidl::encoding::Encoder<'_, D>,
28545            offset: usize,
28546            _depth: fidl::encoding::Depth,
28547        ) -> fidl::Result<()> {
28548            encoder.debug_check_bounds::<StringWithLimitInArray>(offset);
28549            // Delegate to tuple encoding.
28550            fidl::encoding::Encode::<StringWithLimitInArray, D>::encode(
28551                (
28552                    <fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
28553                ),
28554                encoder, offset, _depth
28555            )
28556        }
28557    }
28558    unsafe impl<
28559        D: fidl::encoding::ResourceDialect,
28560        T0: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2>, D>,
28561    > fidl::encoding::Encode<StringWithLimitInArray, D> for (T0,)
28562    {
28563        #[inline]
28564        unsafe fn encode(
28565            self,
28566            encoder: &mut fidl::encoding::Encoder<'_, D>,
28567            offset: usize,
28568            depth: fidl::encoding::Depth,
28569        ) -> fidl::Result<()> {
28570            encoder.debug_check_bounds::<StringWithLimitInArray>(offset);
28571            // Zero out padding regions. There's no need to apply masks
28572            // because the unmasked parts will be overwritten by fields.
28573            // Write the fields.
28574            self.0.encode(encoder, offset + 0, depth)?;
28575            Ok(())
28576        }
28577    }
28578
28579    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28580        for StringWithLimitInArray
28581    {
28582        #[inline(always)]
28583        fn new_empty() -> Self {
28584            Self {
28585                a: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2>, D),
28586            }
28587        }
28588
28589        #[inline]
28590        unsafe fn decode(
28591            &mut self,
28592            decoder: &mut fidl::encoding::Decoder<'_, D>,
28593            offset: usize,
28594            _depth: fidl::encoding::Depth,
28595        ) -> fidl::Result<()> {
28596            decoder.debug_check_bounds::<Self>(offset);
28597            // Verify that padding bytes are zero.
28598            fidl::decode!(
28599                fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2>,
28600                D,
28601                &mut self.a,
28602                decoder,
28603                offset + 0,
28604                _depth
28605            )?;
28606            Ok(())
28607        }
28608    }
28609
28610    impl fidl::encoding::ValueTypeMarker for StringWithLimitInTable {
28611        type Borrowed<'a> = &'a Self;
28612        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28613            value
28614        }
28615    }
28616
28617    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInTable {
28618        type Owned = Self;
28619
28620        #[inline(always)]
28621        fn inline_align(_context: fidl::encoding::Context) -> usize {
28622            8
28623        }
28624
28625        #[inline(always)]
28626        fn inline_size(_context: fidl::encoding::Context) -> usize {
28627            16
28628        }
28629    }
28630
28631    unsafe impl<D: fidl::encoding::ResourceDialect>
28632        fidl::encoding::Encode<StringWithLimitInTable, D> for &StringWithLimitInTable
28633    {
28634        #[inline]
28635        unsafe fn encode(
28636            self,
28637            encoder: &mut fidl::encoding::Encoder<'_, D>,
28638            offset: usize,
28639            _depth: fidl::encoding::Depth,
28640        ) -> fidl::Result<()> {
28641            encoder.debug_check_bounds::<StringWithLimitInTable>(offset);
28642            // Delegate to tuple encoding.
28643            fidl::encoding::Encode::<StringWithLimitInTable, D>::encode(
28644                (<TableWithStringWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
28645                encoder,
28646                offset,
28647                _depth,
28648            )
28649        }
28650    }
28651    unsafe impl<
28652        D: fidl::encoding::ResourceDialect,
28653        T0: fidl::encoding::Encode<TableWithStringWithLimit, D>,
28654    > fidl::encoding::Encode<StringWithLimitInTable, D> for (T0,)
28655    {
28656        #[inline]
28657        unsafe fn encode(
28658            self,
28659            encoder: &mut fidl::encoding::Encoder<'_, D>,
28660            offset: usize,
28661            depth: fidl::encoding::Depth,
28662        ) -> fidl::Result<()> {
28663            encoder.debug_check_bounds::<StringWithLimitInTable>(offset);
28664            // Zero out padding regions. There's no need to apply masks
28665            // because the unmasked parts will be overwritten by fields.
28666            // Write the fields.
28667            self.0.encode(encoder, offset + 0, depth)?;
28668            Ok(())
28669        }
28670    }
28671
28672    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28673        for StringWithLimitInTable
28674    {
28675        #[inline(always)]
28676        fn new_empty() -> Self {
28677            Self { t: fidl::new_empty!(TableWithStringWithLimit, D) }
28678        }
28679
28680        #[inline]
28681        unsafe fn decode(
28682            &mut self,
28683            decoder: &mut fidl::encoding::Decoder<'_, D>,
28684            offset: usize,
28685            _depth: fidl::encoding::Depth,
28686        ) -> fidl::Result<()> {
28687            decoder.debug_check_bounds::<Self>(offset);
28688            // Verify that padding bytes are zero.
28689            fidl::decode!(TableWithStringWithLimit, D, &mut self.t, decoder, offset + 0, _depth)?;
28690            Ok(())
28691        }
28692    }
28693
28694    impl fidl::encoding::ValueTypeMarker for StringWithLimitInUnion {
28695        type Borrowed<'a> = &'a Self;
28696        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28697            value
28698        }
28699    }
28700
28701    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInUnion {
28702        type Owned = Self;
28703
28704        #[inline(always)]
28705        fn inline_align(_context: fidl::encoding::Context) -> usize {
28706            8
28707        }
28708
28709        #[inline(always)]
28710        fn inline_size(_context: fidl::encoding::Context) -> usize {
28711            16
28712        }
28713    }
28714
28715    unsafe impl<D: fidl::encoding::ResourceDialect>
28716        fidl::encoding::Encode<StringWithLimitInUnion, D> for &StringWithLimitInUnion
28717    {
28718        #[inline]
28719        unsafe fn encode(
28720            self,
28721            encoder: &mut fidl::encoding::Encoder<'_, D>,
28722            offset: usize,
28723            _depth: fidl::encoding::Depth,
28724        ) -> fidl::Result<()> {
28725            encoder.debug_check_bounds::<StringWithLimitInUnion>(offset);
28726            // Delegate to tuple encoding.
28727            fidl::encoding::Encode::<StringWithLimitInUnion, D>::encode(
28728                (<UnionWithStringWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
28729                encoder,
28730                offset,
28731                _depth,
28732            )
28733        }
28734    }
28735    unsafe impl<
28736        D: fidl::encoding::ResourceDialect,
28737        T0: fidl::encoding::Encode<UnionWithStringWithLimit, D>,
28738    > fidl::encoding::Encode<StringWithLimitInUnion, D> for (T0,)
28739    {
28740        #[inline]
28741        unsafe fn encode(
28742            self,
28743            encoder: &mut fidl::encoding::Encoder<'_, D>,
28744            offset: usize,
28745            depth: fidl::encoding::Depth,
28746        ) -> fidl::Result<()> {
28747            encoder.debug_check_bounds::<StringWithLimitInUnion>(offset);
28748            // Zero out padding regions. There's no need to apply masks
28749            // because the unmasked parts will be overwritten by fields.
28750            // Write the fields.
28751            self.0.encode(encoder, offset + 0, depth)?;
28752            Ok(())
28753        }
28754    }
28755
28756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28757        for StringWithLimitInUnion
28758    {
28759        #[inline(always)]
28760        fn new_empty() -> Self {
28761            Self { u: fidl::new_empty!(UnionWithStringWithLimit, D) }
28762        }
28763
28764        #[inline]
28765        unsafe fn decode(
28766            &mut self,
28767            decoder: &mut fidl::encoding::Decoder<'_, D>,
28768            offset: usize,
28769            _depth: fidl::encoding::Depth,
28770        ) -> fidl::Result<()> {
28771            decoder.debug_check_bounds::<Self>(offset);
28772            // Verify that padding bytes are zero.
28773            fidl::decode!(UnionWithStringWithLimit, D, &mut self.u, decoder, offset + 0, _depth)?;
28774            Ok(())
28775        }
28776    }
28777
28778    impl fidl::encoding::ValueTypeMarker for StringWithLimitInVector {
28779        type Borrowed<'a> = &'a Self;
28780        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28781            value
28782        }
28783    }
28784
28785    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInVector {
28786        type Owned = Self;
28787
28788        #[inline(always)]
28789        fn inline_align(_context: fidl::encoding::Context) -> usize {
28790            8
28791        }
28792
28793        #[inline(always)]
28794        fn inline_size(_context: fidl::encoding::Context) -> usize {
28795            16
28796        }
28797    }
28798
28799    unsafe impl<D: fidl::encoding::ResourceDialect>
28800        fidl::encoding::Encode<StringWithLimitInVector, D> for &StringWithLimitInVector
28801    {
28802        #[inline]
28803        unsafe fn encode(
28804            self,
28805            encoder: &mut fidl::encoding::Encoder<'_, D>,
28806            offset: usize,
28807            _depth: fidl::encoding::Depth,
28808        ) -> fidl::Result<()> {
28809            encoder.debug_check_bounds::<StringWithLimitInVector>(offset);
28810            // Delegate to tuple encoding.
28811            fidl::encoding::Encode::<StringWithLimitInVector, D>::encode(
28812                (<fidl::encoding::UnboundedVector<
28813                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28814                > as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
28815                encoder,
28816                offset,
28817                _depth,
28818            )
28819        }
28820    }
28821    unsafe impl<
28822        D: fidl::encoding::ResourceDialect,
28823        T0: fidl::encoding::Encode<
28824                fidl::encoding::UnboundedVector<
28825                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28826                >,
28827                D,
28828            >,
28829    > fidl::encoding::Encode<StringWithLimitInVector, D> for (T0,)
28830    {
28831        #[inline]
28832        unsafe fn encode(
28833            self,
28834            encoder: &mut fidl::encoding::Encoder<'_, D>,
28835            offset: usize,
28836            depth: fidl::encoding::Depth,
28837        ) -> fidl::Result<()> {
28838            encoder.debug_check_bounds::<StringWithLimitInVector>(offset);
28839            // Zero out padding regions. There's no need to apply masks
28840            // because the unmasked parts will be overwritten by fields.
28841            // Write the fields.
28842            self.0.encode(encoder, offset + 0, depth)?;
28843            Ok(())
28844        }
28845    }
28846
28847    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28848        for StringWithLimitInVector
28849    {
28850        #[inline(always)]
28851        fn new_empty() -> Self {
28852            Self {
28853                v: fidl::new_empty!(
28854                    fidl::encoding::UnboundedVector<
28855                        fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28856                    >,
28857                    D
28858                ),
28859            }
28860        }
28861
28862        #[inline]
28863        unsafe fn decode(
28864            &mut self,
28865            decoder: &mut fidl::encoding::Decoder<'_, D>,
28866            offset: usize,
28867            _depth: fidl::encoding::Depth,
28868        ) -> fidl::Result<()> {
28869            decoder.debug_check_bounds::<Self>(offset);
28870            // Verify that padding bytes are zero.
28871            fidl::decode!(
28872                fidl::encoding::UnboundedVector<
28873                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28874                >,
28875                D,
28876                &mut self.v,
28877                decoder,
28878                offset + 0,
28879                _depth
28880            )?;
28881            Ok(())
28882        }
28883    }
28884
28885    impl fidl::encoding::ValueTypeMarker for StringWrapper {
28886        type Borrowed<'a> = &'a Self;
28887        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28888            value
28889        }
28890    }
28891
28892    unsafe impl fidl::encoding::TypeMarker for StringWrapper {
28893        type Owned = Self;
28894
28895        #[inline(always)]
28896        fn inline_align(_context: fidl::encoding::Context) -> usize {
28897            8
28898        }
28899
28900        #[inline(always)]
28901        fn inline_size(_context: fidl::encoding::Context) -> usize {
28902            16
28903        }
28904    }
28905
28906    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringWrapper, D>
28907        for &StringWrapper
28908    {
28909        #[inline]
28910        unsafe fn encode(
28911            self,
28912            encoder: &mut fidl::encoding::Encoder<'_, D>,
28913            offset: usize,
28914            _depth: fidl::encoding::Depth,
28915        ) -> fidl::Result<()> {
28916            encoder.debug_check_bounds::<StringWrapper>(offset);
28917            // Delegate to tuple encoding.
28918            fidl::encoding::Encode::<StringWrapper, D>::encode(
28919                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
28920                    &self.str,
28921                ),),
28922                encoder,
28923                offset,
28924                _depth,
28925            )
28926        }
28927    }
28928    unsafe impl<
28929        D: fidl::encoding::ResourceDialect,
28930        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
28931    > fidl::encoding::Encode<StringWrapper, D> for (T0,)
28932    {
28933        #[inline]
28934        unsafe fn encode(
28935            self,
28936            encoder: &mut fidl::encoding::Encoder<'_, D>,
28937            offset: usize,
28938            depth: fidl::encoding::Depth,
28939        ) -> fidl::Result<()> {
28940            encoder.debug_check_bounds::<StringWrapper>(offset);
28941            // Zero out padding regions. There's no need to apply masks
28942            // because the unmasked parts will be overwritten by fields.
28943            // Write the fields.
28944            self.0.encode(encoder, offset + 0, depth)?;
28945            Ok(())
28946        }
28947    }
28948
28949    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringWrapper {
28950        #[inline(always)]
28951        fn new_empty() -> Self {
28952            Self { str: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
28953        }
28954
28955        #[inline]
28956        unsafe fn decode(
28957            &mut self,
28958            decoder: &mut fidl::encoding::Decoder<'_, D>,
28959            offset: usize,
28960            _depth: fidl::encoding::Depth,
28961        ) -> fidl::Result<()> {
28962            decoder.debug_check_bounds::<Self>(offset);
28963            // Verify that padding bytes are zero.
28964            fidl::decode!(
28965                fidl::encoding::UnboundedString,
28966                D,
28967                &mut self.str,
28968                decoder,
28969                offset + 0,
28970                _depth
28971            )?;
28972            Ok(())
28973        }
28974    }
28975
28976    impl fidl::encoding::ValueTypeMarker for Struct1Byte {
28977        type Borrowed<'a> = &'a Self;
28978        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28979            value
28980        }
28981    }
28982
28983    unsafe impl fidl::encoding::TypeMarker for Struct1Byte {
28984        type Owned = Self;
28985
28986        #[inline(always)]
28987        fn inline_align(_context: fidl::encoding::Context) -> usize {
28988            1
28989        }
28990
28991        #[inline(always)]
28992        fn inline_size(_context: fidl::encoding::Context) -> usize {
28993            1
28994        }
28995        #[inline(always)]
28996        fn encode_is_copy() -> bool {
28997            true
28998        }
28999
29000        #[inline(always)]
29001        fn decode_is_copy() -> bool {
29002            true
29003        }
29004    }
29005
29006    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct1Byte, D>
29007        for &Struct1Byte
29008    {
29009        #[inline]
29010        unsafe fn encode(
29011            self,
29012            encoder: &mut fidl::encoding::Encoder<'_, D>,
29013            offset: usize,
29014            _depth: fidl::encoding::Depth,
29015        ) -> fidl::Result<()> {
29016            encoder.debug_check_bounds::<Struct1Byte>(offset);
29017            unsafe {
29018                // Copy the object into the buffer.
29019                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29020                (buf_ptr as *mut Struct1Byte).write_unaligned((self as *const Struct1Byte).read());
29021                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29022                // done second because the memcpy will write garbage to these bytes.
29023            }
29024            Ok(())
29025        }
29026    }
29027    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
29028        fidl::encoding::Encode<Struct1Byte, D> for (T0,)
29029    {
29030        #[inline]
29031        unsafe fn encode(
29032            self,
29033            encoder: &mut fidl::encoding::Encoder<'_, D>,
29034            offset: usize,
29035            depth: fidl::encoding::Depth,
29036        ) -> fidl::Result<()> {
29037            encoder.debug_check_bounds::<Struct1Byte>(offset);
29038            // Zero out padding regions. There's no need to apply masks
29039            // because the unmasked parts will be overwritten by fields.
29040            // Write the fields.
29041            self.0.encode(encoder, offset + 0, depth)?;
29042            Ok(())
29043        }
29044    }
29045
29046    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct1Byte {
29047        #[inline(always)]
29048        fn new_empty() -> Self {
29049            Self { a: fidl::new_empty!(i8, D) }
29050        }
29051
29052        #[inline]
29053        unsafe fn decode(
29054            &mut self,
29055            decoder: &mut fidl::encoding::Decoder<'_, D>,
29056            offset: usize,
29057            _depth: fidl::encoding::Depth,
29058        ) -> fidl::Result<()> {
29059            decoder.debug_check_bounds::<Self>(offset);
29060            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29061            // Verify that padding bytes are zero.
29062            // Copy from the buffer into the object.
29063            unsafe {
29064                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
29065            }
29066            Ok(())
29067        }
29068    }
29069
29070    impl fidl::encoding::ValueTypeMarker for Struct2Byte {
29071        type Borrowed<'a> = &'a Self;
29072        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29073            value
29074        }
29075    }
29076
29077    unsafe impl fidl::encoding::TypeMarker for Struct2Byte {
29078        type Owned = Self;
29079
29080        #[inline(always)]
29081        fn inline_align(_context: fidl::encoding::Context) -> usize {
29082            2
29083        }
29084
29085        #[inline(always)]
29086        fn inline_size(_context: fidl::encoding::Context) -> usize {
29087            2
29088        }
29089        #[inline(always)]
29090        fn encode_is_copy() -> bool {
29091            true
29092        }
29093
29094        #[inline(always)]
29095        fn decode_is_copy() -> bool {
29096            true
29097        }
29098    }
29099
29100    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct2Byte, D>
29101        for &Struct2Byte
29102    {
29103        #[inline]
29104        unsafe fn encode(
29105            self,
29106            encoder: &mut fidl::encoding::Encoder<'_, D>,
29107            offset: usize,
29108            _depth: fidl::encoding::Depth,
29109        ) -> fidl::Result<()> {
29110            encoder.debug_check_bounds::<Struct2Byte>(offset);
29111            unsafe {
29112                // Copy the object into the buffer.
29113                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29114                (buf_ptr as *mut Struct2Byte).write_unaligned((self as *const Struct2Byte).read());
29115                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29116                // done second because the memcpy will write garbage to these bytes.
29117            }
29118            Ok(())
29119        }
29120    }
29121    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
29122        fidl::encoding::Encode<Struct2Byte, D> for (T0,)
29123    {
29124        #[inline]
29125        unsafe fn encode(
29126            self,
29127            encoder: &mut fidl::encoding::Encoder<'_, D>,
29128            offset: usize,
29129            depth: fidl::encoding::Depth,
29130        ) -> fidl::Result<()> {
29131            encoder.debug_check_bounds::<Struct2Byte>(offset);
29132            // Zero out padding regions. There's no need to apply masks
29133            // because the unmasked parts will be overwritten by fields.
29134            // Write the fields.
29135            self.0.encode(encoder, offset + 0, depth)?;
29136            Ok(())
29137        }
29138    }
29139
29140    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct2Byte {
29141        #[inline(always)]
29142        fn new_empty() -> Self {
29143            Self { a: fidl::new_empty!(i16, D) }
29144        }
29145
29146        #[inline]
29147        unsafe fn decode(
29148            &mut self,
29149            decoder: &mut fidl::encoding::Decoder<'_, D>,
29150            offset: usize,
29151            _depth: fidl::encoding::Depth,
29152        ) -> fidl::Result<()> {
29153            decoder.debug_check_bounds::<Self>(offset);
29154            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29155            // Verify that padding bytes are zero.
29156            // Copy from the buffer into the object.
29157            unsafe {
29158                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
29159            }
29160            Ok(())
29161        }
29162    }
29163
29164    impl fidl::encoding::ValueTypeMarker for Struct3Byte {
29165        type Borrowed<'a> = &'a Self;
29166        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29167            value
29168        }
29169    }
29170
29171    unsafe impl fidl::encoding::TypeMarker for Struct3Byte {
29172        type Owned = Self;
29173
29174        #[inline(always)]
29175        fn inline_align(_context: fidl::encoding::Context) -> usize {
29176            2
29177        }
29178
29179        #[inline(always)]
29180        fn inline_size(_context: fidl::encoding::Context) -> usize {
29181            4
29182        }
29183    }
29184
29185    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct3Byte, D>
29186        for &Struct3Byte
29187    {
29188        #[inline]
29189        unsafe fn encode(
29190            self,
29191            encoder: &mut fidl::encoding::Encoder<'_, D>,
29192            offset: usize,
29193            _depth: fidl::encoding::Depth,
29194        ) -> fidl::Result<()> {
29195            encoder.debug_check_bounds::<Struct3Byte>(offset);
29196            unsafe {
29197                // Copy the object into the buffer.
29198                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29199                (buf_ptr as *mut Struct3Byte).write_unaligned((self as *const Struct3Byte).read());
29200                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29201                // done second because the memcpy will write garbage to these bytes.
29202                let padding_ptr = buf_ptr.offset(2) as *mut u16;
29203                let padding_mask = 0xff00u16;
29204                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29205            }
29206            Ok(())
29207        }
29208    }
29209    unsafe impl<
29210        D: fidl::encoding::ResourceDialect,
29211        T0: fidl::encoding::Encode<i16, D>,
29212        T1: fidl::encoding::Encode<i8, D>,
29213    > fidl::encoding::Encode<Struct3Byte, D> for (T0, T1)
29214    {
29215        #[inline]
29216        unsafe fn encode(
29217            self,
29218            encoder: &mut fidl::encoding::Encoder<'_, D>,
29219            offset: usize,
29220            depth: fidl::encoding::Depth,
29221        ) -> fidl::Result<()> {
29222            encoder.debug_check_bounds::<Struct3Byte>(offset);
29223            // Zero out padding regions. There's no need to apply masks
29224            // because the unmasked parts will be overwritten by fields.
29225            unsafe {
29226                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
29227                (ptr as *mut u16).write_unaligned(0);
29228            }
29229            // Write the fields.
29230            self.0.encode(encoder, offset + 0, depth)?;
29231            self.1.encode(encoder, offset + 2, depth)?;
29232            Ok(())
29233        }
29234    }
29235
29236    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct3Byte {
29237        #[inline(always)]
29238        fn new_empty() -> Self {
29239            Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i8, D) }
29240        }
29241
29242        #[inline]
29243        unsafe fn decode(
29244            &mut self,
29245            decoder: &mut fidl::encoding::Decoder<'_, D>,
29246            offset: usize,
29247            _depth: fidl::encoding::Depth,
29248        ) -> fidl::Result<()> {
29249            decoder.debug_check_bounds::<Self>(offset);
29250            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29251            // Verify that padding bytes are zero.
29252            let ptr = unsafe { buf_ptr.offset(2) };
29253            let padval = unsafe { (ptr as *const u16).read_unaligned() };
29254            let mask = 0xff00u16;
29255            let maskedval = padval & mask;
29256            if maskedval != 0 {
29257                return Err(fidl::Error::NonZeroPadding {
29258                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
29259                });
29260            }
29261            // Copy from the buffer into the object.
29262            unsafe {
29263                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
29264            }
29265            Ok(())
29266        }
29267    }
29268
29269    impl fidl::encoding::ValueTypeMarker for Struct4Byte {
29270        type Borrowed<'a> = &'a Self;
29271        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29272            value
29273        }
29274    }
29275
29276    unsafe impl fidl::encoding::TypeMarker for Struct4Byte {
29277        type Owned = Self;
29278
29279        #[inline(always)]
29280        fn inline_align(_context: fidl::encoding::Context) -> usize {
29281            4
29282        }
29283
29284        #[inline(always)]
29285        fn inline_size(_context: fidl::encoding::Context) -> usize {
29286            4
29287        }
29288        #[inline(always)]
29289        fn encode_is_copy() -> bool {
29290            true
29291        }
29292
29293        #[inline(always)]
29294        fn decode_is_copy() -> bool {
29295            true
29296        }
29297    }
29298
29299    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct4Byte, D>
29300        for &Struct4Byte
29301    {
29302        #[inline]
29303        unsafe fn encode(
29304            self,
29305            encoder: &mut fidl::encoding::Encoder<'_, D>,
29306            offset: usize,
29307            _depth: fidl::encoding::Depth,
29308        ) -> fidl::Result<()> {
29309            encoder.debug_check_bounds::<Struct4Byte>(offset);
29310            unsafe {
29311                // Copy the object into the buffer.
29312                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29313                (buf_ptr as *mut Struct4Byte).write_unaligned((self as *const Struct4Byte).read());
29314                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29315                // done second because the memcpy will write garbage to these bytes.
29316            }
29317            Ok(())
29318        }
29319    }
29320    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
29321        fidl::encoding::Encode<Struct4Byte, D> for (T0,)
29322    {
29323        #[inline]
29324        unsafe fn encode(
29325            self,
29326            encoder: &mut fidl::encoding::Encoder<'_, D>,
29327            offset: usize,
29328            depth: fidl::encoding::Depth,
29329        ) -> fidl::Result<()> {
29330            encoder.debug_check_bounds::<Struct4Byte>(offset);
29331            // Zero out padding regions. There's no need to apply masks
29332            // because the unmasked parts will be overwritten by fields.
29333            // Write the fields.
29334            self.0.encode(encoder, offset + 0, depth)?;
29335            Ok(())
29336        }
29337    }
29338
29339    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct4Byte {
29340        #[inline(always)]
29341        fn new_empty() -> Self {
29342            Self { a: fidl::new_empty!(i32, D) }
29343        }
29344
29345        #[inline]
29346        unsafe fn decode(
29347            &mut self,
29348            decoder: &mut fidl::encoding::Decoder<'_, D>,
29349            offset: usize,
29350            _depth: fidl::encoding::Depth,
29351        ) -> fidl::Result<()> {
29352            decoder.debug_check_bounds::<Self>(offset);
29353            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29354            // Verify that padding bytes are zero.
29355            // Copy from the buffer into the object.
29356            unsafe {
29357                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
29358            }
29359            Ok(())
29360        }
29361    }
29362
29363    impl fidl::encoding::ValueTypeMarker for Struct5Byte {
29364        type Borrowed<'a> = &'a Self;
29365        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29366            value
29367        }
29368    }
29369
29370    unsafe impl fidl::encoding::TypeMarker for Struct5Byte {
29371        type Owned = Self;
29372
29373        #[inline(always)]
29374        fn inline_align(_context: fidl::encoding::Context) -> usize {
29375            4
29376        }
29377
29378        #[inline(always)]
29379        fn inline_size(_context: fidl::encoding::Context) -> usize {
29380            8
29381        }
29382    }
29383
29384    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct5Byte, D>
29385        for &Struct5Byte
29386    {
29387        #[inline]
29388        unsafe fn encode(
29389            self,
29390            encoder: &mut fidl::encoding::Encoder<'_, D>,
29391            offset: usize,
29392            _depth: fidl::encoding::Depth,
29393        ) -> fidl::Result<()> {
29394            encoder.debug_check_bounds::<Struct5Byte>(offset);
29395            unsafe {
29396                // Copy the object into the buffer.
29397                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29398                (buf_ptr as *mut Struct5Byte).write_unaligned((self as *const Struct5Byte).read());
29399                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29400                // done second because the memcpy will write garbage to these bytes.
29401                let padding_ptr = buf_ptr.offset(4) as *mut u32;
29402                let padding_mask = 0xffffff00u32;
29403                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29404            }
29405            Ok(())
29406        }
29407    }
29408    unsafe impl<
29409        D: fidl::encoding::ResourceDialect,
29410        T0: fidl::encoding::Encode<i32, D>,
29411        T1: fidl::encoding::Encode<i8, D>,
29412    > fidl::encoding::Encode<Struct5Byte, D> for (T0, T1)
29413    {
29414        #[inline]
29415        unsafe fn encode(
29416            self,
29417            encoder: &mut fidl::encoding::Encoder<'_, D>,
29418            offset: usize,
29419            depth: fidl::encoding::Depth,
29420        ) -> fidl::Result<()> {
29421            encoder.debug_check_bounds::<Struct5Byte>(offset);
29422            // Zero out padding regions. There's no need to apply masks
29423            // because the unmasked parts will be overwritten by fields.
29424            unsafe {
29425                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29426                (ptr as *mut u32).write_unaligned(0);
29427            }
29428            // Write the fields.
29429            self.0.encode(encoder, offset + 0, depth)?;
29430            self.1.encode(encoder, offset + 4, depth)?;
29431            Ok(())
29432        }
29433    }
29434
29435    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct5Byte {
29436        #[inline(always)]
29437        fn new_empty() -> Self {
29438            Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i8, D) }
29439        }
29440
29441        #[inline]
29442        unsafe fn decode(
29443            &mut self,
29444            decoder: &mut fidl::encoding::Decoder<'_, D>,
29445            offset: usize,
29446            _depth: fidl::encoding::Depth,
29447        ) -> fidl::Result<()> {
29448            decoder.debug_check_bounds::<Self>(offset);
29449            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29450            // Verify that padding bytes are zero.
29451            let ptr = unsafe { buf_ptr.offset(4) };
29452            let padval = unsafe { (ptr as *const u32).read_unaligned() };
29453            let mask = 0xffffff00u32;
29454            let maskedval = padval & mask;
29455            if maskedval != 0 {
29456                return Err(fidl::Error::NonZeroPadding {
29457                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29458                });
29459            }
29460            // Copy from the buffer into the object.
29461            unsafe {
29462                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29463            }
29464            Ok(())
29465        }
29466    }
29467
29468    impl fidl::encoding::ValueTypeMarker for Struct6Byte {
29469        type Borrowed<'a> = &'a Self;
29470        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29471            value
29472        }
29473    }
29474
29475    unsafe impl fidl::encoding::TypeMarker for Struct6Byte {
29476        type Owned = Self;
29477
29478        #[inline(always)]
29479        fn inline_align(_context: fidl::encoding::Context) -> usize {
29480            4
29481        }
29482
29483        #[inline(always)]
29484        fn inline_size(_context: fidl::encoding::Context) -> usize {
29485            8
29486        }
29487    }
29488
29489    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct6Byte, D>
29490        for &Struct6Byte
29491    {
29492        #[inline]
29493        unsafe fn encode(
29494            self,
29495            encoder: &mut fidl::encoding::Encoder<'_, D>,
29496            offset: usize,
29497            _depth: fidl::encoding::Depth,
29498        ) -> fidl::Result<()> {
29499            encoder.debug_check_bounds::<Struct6Byte>(offset);
29500            unsafe {
29501                // Copy the object into the buffer.
29502                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29503                (buf_ptr as *mut Struct6Byte).write_unaligned((self as *const Struct6Byte).read());
29504                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29505                // done second because the memcpy will write garbage to these bytes.
29506                let padding_ptr = buf_ptr.offset(4) as *mut u32;
29507                let padding_mask = 0xffff0000u32;
29508                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29509            }
29510            Ok(())
29511        }
29512    }
29513    unsafe impl<
29514        D: fidl::encoding::ResourceDialect,
29515        T0: fidl::encoding::Encode<i32, D>,
29516        T1: fidl::encoding::Encode<i16, D>,
29517    > fidl::encoding::Encode<Struct6Byte, D> for (T0, T1)
29518    {
29519        #[inline]
29520        unsafe fn encode(
29521            self,
29522            encoder: &mut fidl::encoding::Encoder<'_, D>,
29523            offset: usize,
29524            depth: fidl::encoding::Depth,
29525        ) -> fidl::Result<()> {
29526            encoder.debug_check_bounds::<Struct6Byte>(offset);
29527            // Zero out padding regions. There's no need to apply masks
29528            // because the unmasked parts will be overwritten by fields.
29529            unsafe {
29530                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29531                (ptr as *mut u32).write_unaligned(0);
29532            }
29533            // Write the fields.
29534            self.0.encode(encoder, offset + 0, depth)?;
29535            self.1.encode(encoder, offset + 4, depth)?;
29536            Ok(())
29537        }
29538    }
29539
29540    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct6Byte {
29541        #[inline(always)]
29542        fn new_empty() -> Self {
29543            Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i16, D) }
29544        }
29545
29546        #[inline]
29547        unsafe fn decode(
29548            &mut self,
29549            decoder: &mut fidl::encoding::Decoder<'_, D>,
29550            offset: usize,
29551            _depth: fidl::encoding::Depth,
29552        ) -> fidl::Result<()> {
29553            decoder.debug_check_bounds::<Self>(offset);
29554            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29555            // Verify that padding bytes are zero.
29556            let ptr = unsafe { buf_ptr.offset(4) };
29557            let padval = unsafe { (ptr as *const u32).read_unaligned() };
29558            let mask = 0xffff0000u32;
29559            let maskedval = padval & mask;
29560            if maskedval != 0 {
29561                return Err(fidl::Error::NonZeroPadding {
29562                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29563                });
29564            }
29565            // Copy from the buffer into the object.
29566            unsafe {
29567                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29568            }
29569            Ok(())
29570        }
29571    }
29572
29573    impl fidl::encoding::ValueTypeMarker for Struct7Byte {
29574        type Borrowed<'a> = &'a Self;
29575        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29576            value
29577        }
29578    }
29579
29580    unsafe impl fidl::encoding::TypeMarker for Struct7Byte {
29581        type Owned = Self;
29582
29583        #[inline(always)]
29584        fn inline_align(_context: fidl::encoding::Context) -> usize {
29585            4
29586        }
29587
29588        #[inline(always)]
29589        fn inline_size(_context: fidl::encoding::Context) -> usize {
29590            8
29591        }
29592    }
29593
29594    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct7Byte, D>
29595        for &Struct7Byte
29596    {
29597        #[inline]
29598        unsafe fn encode(
29599            self,
29600            encoder: &mut fidl::encoding::Encoder<'_, D>,
29601            offset: usize,
29602            _depth: fidl::encoding::Depth,
29603        ) -> fidl::Result<()> {
29604            encoder.debug_check_bounds::<Struct7Byte>(offset);
29605            unsafe {
29606                // Copy the object into the buffer.
29607                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29608                (buf_ptr as *mut Struct7Byte).write_unaligned((self as *const Struct7Byte).read());
29609                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29610                // done second because the memcpy will write garbage to these bytes.
29611                let padding_ptr = buf_ptr.offset(4) as *mut u32;
29612                let padding_mask = 0xff000000u32;
29613                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29614            }
29615            Ok(())
29616        }
29617    }
29618    unsafe impl<
29619        D: fidl::encoding::ResourceDialect,
29620        T0: fidl::encoding::Encode<i32, D>,
29621        T1: fidl::encoding::Encode<i16, D>,
29622        T2: fidl::encoding::Encode<i8, D>,
29623    > fidl::encoding::Encode<Struct7Byte, D> for (T0, T1, T2)
29624    {
29625        #[inline]
29626        unsafe fn encode(
29627            self,
29628            encoder: &mut fidl::encoding::Encoder<'_, D>,
29629            offset: usize,
29630            depth: fidl::encoding::Depth,
29631        ) -> fidl::Result<()> {
29632            encoder.debug_check_bounds::<Struct7Byte>(offset);
29633            // Zero out padding regions. There's no need to apply masks
29634            // because the unmasked parts will be overwritten by fields.
29635            unsafe {
29636                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29637                (ptr as *mut u32).write_unaligned(0);
29638            }
29639            // Write the fields.
29640            self.0.encode(encoder, offset + 0, depth)?;
29641            self.1.encode(encoder, offset + 4, depth)?;
29642            self.2.encode(encoder, offset + 6, depth)?;
29643            Ok(())
29644        }
29645    }
29646
29647    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct7Byte {
29648        #[inline(always)]
29649        fn new_empty() -> Self {
29650            Self {
29651                a: fidl::new_empty!(i32, D),
29652                b: fidl::new_empty!(i16, D),
29653                c: fidl::new_empty!(i8, D),
29654            }
29655        }
29656
29657        #[inline]
29658        unsafe fn decode(
29659            &mut self,
29660            decoder: &mut fidl::encoding::Decoder<'_, D>,
29661            offset: usize,
29662            _depth: fidl::encoding::Depth,
29663        ) -> fidl::Result<()> {
29664            decoder.debug_check_bounds::<Self>(offset);
29665            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29666            // Verify that padding bytes are zero.
29667            let ptr = unsafe { buf_ptr.offset(4) };
29668            let padval = unsafe { (ptr as *const u32).read_unaligned() };
29669            let mask = 0xff000000u32;
29670            let maskedval = padval & mask;
29671            if maskedval != 0 {
29672                return Err(fidl::Error::NonZeroPadding {
29673                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29674                });
29675            }
29676            // Copy from the buffer into the object.
29677            unsafe {
29678                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29679            }
29680            Ok(())
29681        }
29682    }
29683
29684    impl fidl::encoding::ValueTypeMarker for Struct8Byte {
29685        type Borrowed<'a> = &'a Self;
29686        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29687            value
29688        }
29689    }
29690
29691    unsafe impl fidl::encoding::TypeMarker for Struct8Byte {
29692        type Owned = Self;
29693
29694        #[inline(always)]
29695        fn inline_align(_context: fidl::encoding::Context) -> usize {
29696            8
29697        }
29698
29699        #[inline(always)]
29700        fn inline_size(_context: fidl::encoding::Context) -> usize {
29701            8
29702        }
29703        #[inline(always)]
29704        fn encode_is_copy() -> bool {
29705            true
29706        }
29707
29708        #[inline(always)]
29709        fn decode_is_copy() -> bool {
29710            true
29711        }
29712    }
29713
29714    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct8Byte, D>
29715        for &Struct8Byte
29716    {
29717        #[inline]
29718        unsafe fn encode(
29719            self,
29720            encoder: &mut fidl::encoding::Encoder<'_, D>,
29721            offset: usize,
29722            _depth: fidl::encoding::Depth,
29723        ) -> fidl::Result<()> {
29724            encoder.debug_check_bounds::<Struct8Byte>(offset);
29725            unsafe {
29726                // Copy the object into the buffer.
29727                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29728                (buf_ptr as *mut Struct8Byte).write_unaligned((self as *const Struct8Byte).read());
29729                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29730                // done second because the memcpy will write garbage to these bytes.
29731            }
29732            Ok(())
29733        }
29734    }
29735    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
29736        fidl::encoding::Encode<Struct8Byte, D> for (T0,)
29737    {
29738        #[inline]
29739        unsafe fn encode(
29740            self,
29741            encoder: &mut fidl::encoding::Encoder<'_, D>,
29742            offset: usize,
29743            depth: fidl::encoding::Depth,
29744        ) -> fidl::Result<()> {
29745            encoder.debug_check_bounds::<Struct8Byte>(offset);
29746            // Zero out padding regions. There's no need to apply masks
29747            // because the unmasked parts will be overwritten by fields.
29748            // Write the fields.
29749            self.0.encode(encoder, offset + 0, depth)?;
29750            Ok(())
29751        }
29752    }
29753
29754    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct8Byte {
29755        #[inline(always)]
29756        fn new_empty() -> Self {
29757            Self { a: fidl::new_empty!(i64, D) }
29758        }
29759
29760        #[inline]
29761        unsafe fn decode(
29762            &mut self,
29763            decoder: &mut fidl::encoding::Decoder<'_, D>,
29764            offset: usize,
29765            _depth: fidl::encoding::Depth,
29766        ) -> fidl::Result<()> {
29767            decoder.debug_check_bounds::<Self>(offset);
29768            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29769            // Verify that padding bytes are zero.
29770            // Copy from the buffer into the object.
29771            unsafe {
29772                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29773            }
29774            Ok(())
29775        }
29776    }
29777
29778    impl fidl::encoding::ValueTypeMarker for StructOfEmptyFlexibleUnion {
29779        type Borrowed<'a> = &'a Self;
29780        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29781            value
29782        }
29783    }
29784
29785    unsafe impl fidl::encoding::TypeMarker for StructOfEmptyFlexibleUnion {
29786        type Owned = Self;
29787
29788        #[inline(always)]
29789        fn inline_align(_context: fidl::encoding::Context) -> usize {
29790            8
29791        }
29792
29793        #[inline(always)]
29794        fn inline_size(_context: fidl::encoding::Context) -> usize {
29795            16
29796        }
29797    }
29798
29799    unsafe impl<D: fidl::encoding::ResourceDialect>
29800        fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for &StructOfEmptyFlexibleUnion
29801    {
29802        #[inline]
29803        unsafe fn encode(
29804            self,
29805            encoder: &mut fidl::encoding::Encoder<'_, D>,
29806            offset: usize,
29807            _depth: fidl::encoding::Depth,
29808        ) -> fidl::Result<()> {
29809            encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29810            // Delegate to tuple encoding.
29811            fidl::encoding::Encode::<StructOfEmptyFlexibleUnion, D>::encode(
29812                (<EmptyFlexibleUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.empty),),
29813                encoder,
29814                offset,
29815                _depth,
29816            )
29817        }
29818    }
29819    unsafe impl<
29820        D: fidl::encoding::ResourceDialect,
29821        T0: fidl::encoding::Encode<EmptyFlexibleUnion, D>,
29822    > fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for (T0,)
29823    {
29824        #[inline]
29825        unsafe fn encode(
29826            self,
29827            encoder: &mut fidl::encoding::Encoder<'_, D>,
29828            offset: usize,
29829            depth: fidl::encoding::Depth,
29830        ) -> fidl::Result<()> {
29831            encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29832            // Zero out padding regions. There's no need to apply masks
29833            // because the unmasked parts will be overwritten by fields.
29834            // Write the fields.
29835            self.0.encode(encoder, offset + 0, depth)?;
29836            Ok(())
29837        }
29838    }
29839
29840    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29841        for StructOfEmptyFlexibleUnion
29842    {
29843        #[inline(always)]
29844        fn new_empty() -> Self {
29845            Self { empty: fidl::new_empty!(EmptyFlexibleUnion, D) }
29846        }
29847
29848        #[inline]
29849        unsafe fn decode(
29850            &mut self,
29851            decoder: &mut fidl::encoding::Decoder<'_, D>,
29852            offset: usize,
29853            _depth: fidl::encoding::Depth,
29854        ) -> fidl::Result<()> {
29855            decoder.debug_check_bounds::<Self>(offset);
29856            // Verify that padding bytes are zero.
29857            fidl::decode!(EmptyFlexibleUnion, D, &mut self.empty, decoder, offset + 0, _depth)?;
29858            Ok(())
29859        }
29860    }
29861
29862    impl fidl::encoding::ValueTypeMarker for StructOfEmptyTable {
29863        type Borrowed<'a> = &'a Self;
29864        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29865            value
29866        }
29867    }
29868
29869    unsafe impl fidl::encoding::TypeMarker for StructOfEmptyTable {
29870        type Owned = Self;
29871
29872        #[inline(always)]
29873        fn inline_align(_context: fidl::encoding::Context) -> usize {
29874            8
29875        }
29876
29877        #[inline(always)]
29878        fn inline_size(_context: fidl::encoding::Context) -> usize {
29879            16
29880        }
29881    }
29882
29883    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfEmptyTable, D>
29884        for &StructOfEmptyTable
29885    {
29886        #[inline]
29887        unsafe fn encode(
29888            self,
29889            encoder: &mut fidl::encoding::Encoder<'_, D>,
29890            offset: usize,
29891            _depth: fidl::encoding::Depth,
29892        ) -> fidl::Result<()> {
29893            encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29894            // Delegate to tuple encoding.
29895            fidl::encoding::Encode::<StructOfEmptyTable, D>::encode(
29896                (<EmptyTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29897                encoder,
29898                offset,
29899                _depth,
29900            )
29901        }
29902    }
29903    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyTable, D>>
29904        fidl::encoding::Encode<StructOfEmptyTable, D> for (T0,)
29905    {
29906        #[inline]
29907        unsafe fn encode(
29908            self,
29909            encoder: &mut fidl::encoding::Encoder<'_, D>,
29910            offset: usize,
29911            depth: fidl::encoding::Depth,
29912        ) -> fidl::Result<()> {
29913            encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29914            // Zero out padding regions. There's no need to apply masks
29915            // because the unmasked parts will be overwritten by fields.
29916            // Write the fields.
29917            self.0.encode(encoder, offset + 0, depth)?;
29918            Ok(())
29919        }
29920    }
29921
29922    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfEmptyTable {
29923        #[inline(always)]
29924        fn new_empty() -> Self {
29925            Self { table: fidl::new_empty!(EmptyTable, D) }
29926        }
29927
29928        #[inline]
29929        unsafe fn decode(
29930            &mut self,
29931            decoder: &mut fidl::encoding::Decoder<'_, D>,
29932            offset: usize,
29933            _depth: fidl::encoding::Depth,
29934        ) -> fidl::Result<()> {
29935            decoder.debug_check_bounds::<Self>(offset);
29936            // Verify that padding bytes are zero.
29937            fidl::decode!(EmptyTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29938            Ok(())
29939        }
29940    }
29941
29942    impl fidl::encoding::ValueTypeMarker for StructOfReverseOrdinalTable {
29943        type Borrowed<'a> = &'a Self;
29944        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29945            value
29946        }
29947    }
29948
29949    unsafe impl fidl::encoding::TypeMarker for StructOfReverseOrdinalTable {
29950        type Owned = Self;
29951
29952        #[inline(always)]
29953        fn inline_align(_context: fidl::encoding::Context) -> usize {
29954            8
29955        }
29956
29957        #[inline(always)]
29958        fn inline_size(_context: fidl::encoding::Context) -> usize {
29959            16
29960        }
29961    }
29962
29963    unsafe impl<D: fidl::encoding::ResourceDialect>
29964        fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for &StructOfReverseOrdinalTable
29965    {
29966        #[inline]
29967        unsafe fn encode(
29968            self,
29969            encoder: &mut fidl::encoding::Encoder<'_, D>,
29970            offset: usize,
29971            _depth: fidl::encoding::Depth,
29972        ) -> fidl::Result<()> {
29973            encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29974            // Delegate to tuple encoding.
29975            fidl::encoding::Encode::<StructOfReverseOrdinalTable, D>::encode(
29976                (<ReverseOrdinalTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29977                encoder,
29978                offset,
29979                _depth,
29980            )
29981        }
29982    }
29983    unsafe impl<
29984        D: fidl::encoding::ResourceDialect,
29985        T0: fidl::encoding::Encode<ReverseOrdinalTable, D>,
29986    > fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for (T0,)
29987    {
29988        #[inline]
29989        unsafe fn encode(
29990            self,
29991            encoder: &mut fidl::encoding::Encoder<'_, D>,
29992            offset: usize,
29993            depth: fidl::encoding::Depth,
29994        ) -> fidl::Result<()> {
29995            encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29996            // Zero out padding regions. There's no need to apply masks
29997            // because the unmasked parts will be overwritten by fields.
29998            // Write the fields.
29999            self.0.encode(encoder, offset + 0, depth)?;
30000            Ok(())
30001        }
30002    }
30003
30004    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30005        for StructOfReverseOrdinalTable
30006    {
30007        #[inline(always)]
30008        fn new_empty() -> Self {
30009            Self { table: fidl::new_empty!(ReverseOrdinalTable, D) }
30010        }
30011
30012        #[inline]
30013        unsafe fn decode(
30014            &mut self,
30015            decoder: &mut fidl::encoding::Decoder<'_, D>,
30016            offset: usize,
30017            _depth: fidl::encoding::Depth,
30018        ) -> fidl::Result<()> {
30019            decoder.debug_check_bounds::<Self>(offset);
30020            // Verify that padding bytes are zero.
30021            fidl::decode!(ReverseOrdinalTable, D, &mut self.table, decoder, offset + 0, _depth)?;
30022            Ok(())
30023        }
30024    }
30025
30026    impl fidl::encoding::ValueTypeMarker for StructOfSimpleTable {
30027        type Borrowed<'a> = &'a Self;
30028        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30029            value
30030        }
30031    }
30032
30033    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleTable {
30034        type Owned = Self;
30035
30036        #[inline(always)]
30037        fn inline_align(_context: fidl::encoding::Context) -> usize {
30038            8
30039        }
30040
30041        #[inline(always)]
30042        fn inline_size(_context: fidl::encoding::Context) -> usize {
30043            16
30044        }
30045    }
30046
30047    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfSimpleTable, D>
30048        for &StructOfSimpleTable
30049    {
30050        #[inline]
30051        unsafe fn encode(
30052            self,
30053            encoder: &mut fidl::encoding::Encoder<'_, D>,
30054            offset: usize,
30055            _depth: fidl::encoding::Depth,
30056        ) -> fidl::Result<()> {
30057            encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
30058            // Delegate to tuple encoding.
30059            fidl::encoding::Encode::<StructOfSimpleTable, D>::encode(
30060                (<SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
30061                encoder,
30062                offset,
30063                _depth,
30064            )
30065        }
30066    }
30067    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SimpleTable, D>>
30068        fidl::encoding::Encode<StructOfSimpleTable, D> for (T0,)
30069    {
30070        #[inline]
30071        unsafe fn encode(
30072            self,
30073            encoder: &mut fidl::encoding::Encoder<'_, D>,
30074            offset: usize,
30075            depth: fidl::encoding::Depth,
30076        ) -> fidl::Result<()> {
30077            encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
30078            // Zero out padding regions. There's no need to apply masks
30079            // because the unmasked parts will be overwritten by fields.
30080            // Write the fields.
30081            self.0.encode(encoder, offset + 0, depth)?;
30082            Ok(())
30083        }
30084    }
30085
30086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfSimpleTable {
30087        #[inline(always)]
30088        fn new_empty() -> Self {
30089            Self { table: fidl::new_empty!(SimpleTable, D) }
30090        }
30091
30092        #[inline]
30093        unsafe fn decode(
30094            &mut self,
30095            decoder: &mut fidl::encoding::Decoder<'_, D>,
30096            offset: usize,
30097            _depth: fidl::encoding::Depth,
30098        ) -> fidl::Result<()> {
30099            decoder.debug_check_bounds::<Self>(offset);
30100            // Verify that padding bytes are zero.
30101            fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
30102            Ok(())
30103        }
30104    }
30105
30106    impl fidl::encoding::ValueTypeMarker for StructOfTableWithGaps {
30107        type Borrowed<'a> = &'a Self;
30108        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30109            value
30110        }
30111    }
30112
30113    unsafe impl fidl::encoding::TypeMarker for StructOfTableWithGaps {
30114        type Owned = Self;
30115
30116        #[inline(always)]
30117        fn inline_align(_context: fidl::encoding::Context) -> usize {
30118            8
30119        }
30120
30121        #[inline(always)]
30122        fn inline_size(_context: fidl::encoding::Context) -> usize {
30123            16
30124        }
30125    }
30126
30127    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfTableWithGaps, D>
30128        for &StructOfTableWithGaps
30129    {
30130        #[inline]
30131        unsafe fn encode(
30132            self,
30133            encoder: &mut fidl::encoding::Encoder<'_, D>,
30134            offset: usize,
30135            _depth: fidl::encoding::Depth,
30136        ) -> fidl::Result<()> {
30137            encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
30138            // Delegate to tuple encoding.
30139            fidl::encoding::Encode::<StructOfTableWithGaps, D>::encode(
30140                (<TableWithGaps as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
30141                encoder,
30142                offset,
30143                _depth,
30144            )
30145        }
30146    }
30147    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithGaps, D>>
30148        fidl::encoding::Encode<StructOfTableWithGaps, D> for (T0,)
30149    {
30150        #[inline]
30151        unsafe fn encode(
30152            self,
30153            encoder: &mut fidl::encoding::Encoder<'_, D>,
30154            offset: usize,
30155            depth: fidl::encoding::Depth,
30156        ) -> fidl::Result<()> {
30157            encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
30158            // Zero out padding regions. There's no need to apply masks
30159            // because the unmasked parts will be overwritten by fields.
30160            // Write the fields.
30161            self.0.encode(encoder, offset + 0, depth)?;
30162            Ok(())
30163        }
30164    }
30165
30166    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfTableWithGaps {
30167        #[inline(always)]
30168        fn new_empty() -> Self {
30169            Self { table: fidl::new_empty!(TableWithGaps, D) }
30170        }
30171
30172        #[inline]
30173        unsafe fn decode(
30174            &mut self,
30175            decoder: &mut fidl::encoding::Decoder<'_, D>,
30176            offset: usize,
30177            _depth: fidl::encoding::Depth,
30178        ) -> fidl::Result<()> {
30179            decoder.debug_check_bounds::<Self>(offset);
30180            // Verify that padding bytes are zero.
30181            fidl::decode!(TableWithGaps, D, &mut self.table, decoder, offset + 0, _depth)?;
30182            Ok(())
30183        }
30184    }
30185
30186    impl fidl::encoding::ValueTypeMarker for StructOfTableWithStringAndVector {
30187        type Borrowed<'a> = &'a Self;
30188        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30189            value
30190        }
30191    }
30192
30193    unsafe impl fidl::encoding::TypeMarker for StructOfTableWithStringAndVector {
30194        type Owned = Self;
30195
30196        #[inline(always)]
30197        fn inline_align(_context: fidl::encoding::Context) -> usize {
30198            8
30199        }
30200
30201        #[inline(always)]
30202        fn inline_size(_context: fidl::encoding::Context) -> usize {
30203            16
30204        }
30205    }
30206
30207    unsafe impl<D: fidl::encoding::ResourceDialect>
30208        fidl::encoding::Encode<StructOfTableWithStringAndVector, D>
30209        for &StructOfTableWithStringAndVector
30210    {
30211        #[inline]
30212        unsafe fn encode(
30213            self,
30214            encoder: &mut fidl::encoding::Encoder<'_, D>,
30215            offset: usize,
30216            _depth: fidl::encoding::Depth,
30217        ) -> fidl::Result<()> {
30218            encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
30219            // Delegate to tuple encoding.
30220            fidl::encoding::Encode::<StructOfTableWithStringAndVector, D>::encode(
30221                (<TableWithStringAndVector as fidl::encoding::ValueTypeMarker>::borrow(
30222                    &self.table,
30223                ),),
30224                encoder,
30225                offset,
30226                _depth,
30227            )
30228        }
30229    }
30230    unsafe impl<
30231        D: fidl::encoding::ResourceDialect,
30232        T0: fidl::encoding::Encode<TableWithStringAndVector, D>,
30233    > fidl::encoding::Encode<StructOfTableWithStringAndVector, D> for (T0,)
30234    {
30235        #[inline]
30236        unsafe fn encode(
30237            self,
30238            encoder: &mut fidl::encoding::Encoder<'_, D>,
30239            offset: usize,
30240            depth: fidl::encoding::Depth,
30241        ) -> fidl::Result<()> {
30242            encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
30243            // Zero out padding regions. There's no need to apply masks
30244            // because the unmasked parts will be overwritten by fields.
30245            // Write the fields.
30246            self.0.encode(encoder, offset + 0, depth)?;
30247            Ok(())
30248        }
30249    }
30250
30251    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30252        for StructOfTableWithStringAndVector
30253    {
30254        #[inline(always)]
30255        fn new_empty() -> Self {
30256            Self { table: fidl::new_empty!(TableWithStringAndVector, D) }
30257        }
30258
30259        #[inline]
30260        unsafe fn decode(
30261            &mut self,
30262            decoder: &mut fidl::encoding::Decoder<'_, D>,
30263            offset: usize,
30264            _depth: fidl::encoding::Depth,
30265        ) -> fidl::Result<()> {
30266            decoder.debug_check_bounds::<Self>(offset);
30267            // Verify that padding bytes are zero.
30268            fidl::decode!(
30269                TableWithStringAndVector,
30270                D,
30271                &mut self.table,
30272                decoder,
30273                offset + 0,
30274                _depth
30275            )?;
30276            Ok(())
30277        }
30278    }
30279
30280    impl fidl::encoding::ValueTypeMarker for StructOfTableWithXUnion {
30281        type Borrowed<'a> = &'a Self;
30282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30283            value
30284        }
30285    }
30286
30287    unsafe impl fidl::encoding::TypeMarker for StructOfTableWithXUnion {
30288        type Owned = Self;
30289
30290        #[inline(always)]
30291        fn inline_align(_context: fidl::encoding::Context) -> usize {
30292            8
30293        }
30294
30295        #[inline(always)]
30296        fn inline_size(_context: fidl::encoding::Context) -> usize {
30297            16
30298        }
30299    }
30300
30301    unsafe impl<D: fidl::encoding::ResourceDialect>
30302        fidl::encoding::Encode<StructOfTableWithXUnion, D> for &StructOfTableWithXUnion
30303    {
30304        #[inline]
30305        unsafe fn encode(
30306            self,
30307            encoder: &mut fidl::encoding::Encoder<'_, D>,
30308            offset: usize,
30309            _depth: fidl::encoding::Depth,
30310        ) -> fidl::Result<()> {
30311            encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
30312            // Delegate to tuple encoding.
30313            fidl::encoding::Encode::<StructOfTableWithXUnion, D>::encode(
30314                (<TableWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
30315                encoder,
30316                offset,
30317                _depth,
30318            )
30319        }
30320    }
30321    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithXUnion, D>>
30322        fidl::encoding::Encode<StructOfTableWithXUnion, D> for (T0,)
30323    {
30324        #[inline]
30325        unsafe fn encode(
30326            self,
30327            encoder: &mut fidl::encoding::Encoder<'_, D>,
30328            offset: usize,
30329            depth: fidl::encoding::Depth,
30330        ) -> fidl::Result<()> {
30331            encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
30332            // Zero out padding regions. There's no need to apply masks
30333            // because the unmasked parts will be overwritten by fields.
30334            // Write the fields.
30335            self.0.encode(encoder, offset + 0, depth)?;
30336            Ok(())
30337        }
30338    }
30339
30340    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30341        for StructOfTableWithXUnion
30342    {
30343        #[inline(always)]
30344        fn new_empty() -> Self {
30345            Self { value: fidl::new_empty!(TableWithXUnion, D) }
30346        }
30347
30348        #[inline]
30349        unsafe fn decode(
30350            &mut self,
30351            decoder: &mut fidl::encoding::Decoder<'_, D>,
30352            offset: usize,
30353            _depth: fidl::encoding::Depth,
30354        ) -> fidl::Result<()> {
30355            decoder.debug_check_bounds::<Self>(offset);
30356            // Verify that padding bytes are zero.
30357            fidl::decode!(TableWithXUnion, D, &mut self.value, decoder, offset + 0, _depth)?;
30358            Ok(())
30359        }
30360    }
30361
30362    impl fidl::encoding::ValueTypeMarker for StructOfUnionOfTable {
30363        type Borrowed<'a> = &'a Self;
30364        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30365            value
30366        }
30367    }
30368
30369    unsafe impl fidl::encoding::TypeMarker for StructOfUnionOfTable {
30370        type Owned = Self;
30371
30372        #[inline(always)]
30373        fn inline_align(_context: fidl::encoding::Context) -> usize {
30374            8
30375        }
30376
30377        #[inline(always)]
30378        fn inline_size(_context: fidl::encoding::Context) -> usize {
30379            16
30380        }
30381    }
30382
30383    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfUnionOfTable, D>
30384        for &StructOfUnionOfTable
30385    {
30386        #[inline]
30387        unsafe fn encode(
30388            self,
30389            encoder: &mut fidl::encoding::Encoder<'_, D>,
30390            offset: usize,
30391            _depth: fidl::encoding::Depth,
30392        ) -> fidl::Result<()> {
30393            encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
30394            // Delegate to tuple encoding.
30395            fidl::encoding::Encode::<StructOfUnionOfTable, D>::encode(
30396                (<UnionOfTable as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
30397                encoder,
30398                offset,
30399                _depth,
30400            )
30401        }
30402    }
30403    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<UnionOfTable, D>>
30404        fidl::encoding::Encode<StructOfUnionOfTable, D> for (T0,)
30405    {
30406        #[inline]
30407        unsafe fn encode(
30408            self,
30409            encoder: &mut fidl::encoding::Encoder<'_, D>,
30410            offset: usize,
30411            depth: fidl::encoding::Depth,
30412        ) -> fidl::Result<()> {
30413            encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
30414            // Zero out padding regions. There's no need to apply masks
30415            // because the unmasked parts will be overwritten by fields.
30416            // Write the fields.
30417            self.0.encode(encoder, offset + 0, depth)?;
30418            Ok(())
30419        }
30420    }
30421
30422    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfUnionOfTable {
30423        #[inline(always)]
30424        fn new_empty() -> Self {
30425            Self { u: fidl::new_empty!(UnionOfTable, D) }
30426        }
30427
30428        #[inline]
30429        unsafe fn decode(
30430            &mut self,
30431            decoder: &mut fidl::encoding::Decoder<'_, D>,
30432            offset: usize,
30433            _depth: fidl::encoding::Depth,
30434        ) -> fidl::Result<()> {
30435            decoder.debug_check_bounds::<Self>(offset);
30436            // Verify that padding bytes are zero.
30437            fidl::decode!(UnionOfTable, D, &mut self.u, decoder, offset + 0, _depth)?;
30438            Ok(())
30439        }
30440    }
30441
30442    impl fidl::encoding::ValueTypeMarker for StructSize16Align8 {
30443        type Borrowed<'a> = &'a Self;
30444        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30445            value
30446        }
30447    }
30448
30449    unsafe impl fidl::encoding::TypeMarker for StructSize16Align8 {
30450        type Owned = Self;
30451
30452        #[inline(always)]
30453        fn inline_align(_context: fidl::encoding::Context) -> usize {
30454            8
30455        }
30456
30457        #[inline(always)]
30458        fn inline_size(_context: fidl::encoding::Context) -> usize {
30459            16
30460        }
30461        #[inline(always)]
30462        fn encode_is_copy() -> bool {
30463            true
30464        }
30465
30466        #[inline(always)]
30467        fn decode_is_copy() -> bool {
30468            true
30469        }
30470    }
30471
30472    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize16Align8, D>
30473        for &StructSize16Align8
30474    {
30475        #[inline]
30476        unsafe fn encode(
30477            self,
30478            encoder: &mut fidl::encoding::Encoder<'_, D>,
30479            offset: usize,
30480            _depth: fidl::encoding::Depth,
30481        ) -> fidl::Result<()> {
30482            encoder.debug_check_bounds::<StructSize16Align8>(offset);
30483            unsafe {
30484                // Copy the object into the buffer.
30485                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30486                (buf_ptr as *mut StructSize16Align8)
30487                    .write_unaligned((self as *const StructSize16Align8).read());
30488                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
30489                // done second because the memcpy will write garbage to these bytes.
30490            }
30491            Ok(())
30492        }
30493    }
30494    unsafe impl<
30495        D: fidl::encoding::ResourceDialect,
30496        T0: fidl::encoding::Encode<u64, D>,
30497        T1: fidl::encoding::Encode<u64, D>,
30498    > fidl::encoding::Encode<StructSize16Align8, D> for (T0, T1)
30499    {
30500        #[inline]
30501        unsafe fn encode(
30502            self,
30503            encoder: &mut fidl::encoding::Encoder<'_, D>,
30504            offset: usize,
30505            depth: fidl::encoding::Depth,
30506        ) -> fidl::Result<()> {
30507            encoder.debug_check_bounds::<StructSize16Align8>(offset);
30508            // Zero out padding regions. There's no need to apply masks
30509            // because the unmasked parts will be overwritten by fields.
30510            // Write the fields.
30511            self.0.encode(encoder, offset + 0, depth)?;
30512            self.1.encode(encoder, offset + 8, depth)?;
30513            Ok(())
30514        }
30515    }
30516
30517    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize16Align8 {
30518        #[inline(always)]
30519        fn new_empty() -> Self {
30520            Self { f1: fidl::new_empty!(u64, D), f2: fidl::new_empty!(u64, D) }
30521        }
30522
30523        #[inline]
30524        unsafe fn decode(
30525            &mut self,
30526            decoder: &mut fidl::encoding::Decoder<'_, D>,
30527            offset: usize,
30528            _depth: fidl::encoding::Depth,
30529        ) -> fidl::Result<()> {
30530            decoder.debug_check_bounds::<Self>(offset);
30531            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30532            // Verify that padding bytes are zero.
30533            // Copy from the buffer into the object.
30534            unsafe {
30535                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
30536            }
30537            Ok(())
30538        }
30539    }
30540
30541    impl fidl::encoding::ValueTypeMarker for StructSize3Align1 {
30542        type Borrowed<'a> = &'a Self;
30543        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30544            value
30545        }
30546    }
30547
30548    unsafe impl fidl::encoding::TypeMarker for StructSize3Align1 {
30549        type Owned = Self;
30550
30551        #[inline(always)]
30552        fn inline_align(_context: fidl::encoding::Context) -> usize {
30553            1
30554        }
30555
30556        #[inline(always)]
30557        fn inline_size(_context: fidl::encoding::Context) -> usize {
30558            3
30559        }
30560        #[inline(always)]
30561        fn encode_is_copy() -> bool {
30562            true
30563        }
30564
30565        #[inline(always)]
30566        fn decode_is_copy() -> bool {
30567            true
30568        }
30569    }
30570
30571    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align1, D>
30572        for &StructSize3Align1
30573    {
30574        #[inline]
30575        unsafe fn encode(
30576            self,
30577            encoder: &mut fidl::encoding::Encoder<'_, D>,
30578            offset: usize,
30579            _depth: fidl::encoding::Depth,
30580        ) -> fidl::Result<()> {
30581            encoder.debug_check_bounds::<StructSize3Align1>(offset);
30582            unsafe {
30583                // Copy the object into the buffer.
30584                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30585                (buf_ptr as *mut StructSize3Align1)
30586                    .write_unaligned((self as *const StructSize3Align1).read());
30587                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
30588                // done second because the memcpy will write garbage to these bytes.
30589            }
30590            Ok(())
30591        }
30592    }
30593    unsafe impl<
30594        D: fidl::encoding::ResourceDialect,
30595        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
30596    > fidl::encoding::Encode<StructSize3Align1, D> for (T0,)
30597    {
30598        #[inline]
30599        unsafe fn encode(
30600            self,
30601            encoder: &mut fidl::encoding::Encoder<'_, D>,
30602            offset: usize,
30603            depth: fidl::encoding::Depth,
30604        ) -> fidl::Result<()> {
30605            encoder.debug_check_bounds::<StructSize3Align1>(offset);
30606            // Zero out padding regions. There's no need to apply masks
30607            // because the unmasked parts will be overwritten by fields.
30608            // Write the fields.
30609            self.0.encode(encoder, offset + 0, depth)?;
30610            Ok(())
30611        }
30612    }
30613
30614    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align1 {
30615        #[inline(always)]
30616        fn new_empty() -> Self {
30617            Self { three_bytes: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D) }
30618        }
30619
30620        #[inline]
30621        unsafe fn decode(
30622            &mut self,
30623            decoder: &mut fidl::encoding::Decoder<'_, D>,
30624            offset: usize,
30625            _depth: fidl::encoding::Depth,
30626        ) -> fidl::Result<()> {
30627            decoder.debug_check_bounds::<Self>(offset);
30628            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30629            // Verify that padding bytes are zero.
30630            // Copy from the buffer into the object.
30631            unsafe {
30632                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
30633            }
30634            Ok(())
30635        }
30636    }
30637
30638    impl fidl::encoding::ValueTypeMarker for StructSize3Align2 {
30639        type Borrowed<'a> = &'a Self;
30640        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30641            value
30642        }
30643    }
30644
30645    unsafe impl fidl::encoding::TypeMarker for StructSize3Align2 {
30646        type Owned = Self;
30647
30648        #[inline(always)]
30649        fn inline_align(_context: fidl::encoding::Context) -> usize {
30650            2
30651        }
30652
30653        #[inline(always)]
30654        fn inline_size(_context: fidl::encoding::Context) -> usize {
30655            4
30656        }
30657    }
30658
30659    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align2, D>
30660        for &StructSize3Align2
30661    {
30662        #[inline]
30663        unsafe fn encode(
30664            self,
30665            encoder: &mut fidl::encoding::Encoder<'_, D>,
30666            offset: usize,
30667            _depth: fidl::encoding::Depth,
30668        ) -> fidl::Result<()> {
30669            encoder.debug_check_bounds::<StructSize3Align2>(offset);
30670            unsafe {
30671                // Copy the object into the buffer.
30672                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30673                (buf_ptr as *mut StructSize3Align2)
30674                    .write_unaligned((self as *const StructSize3Align2).read());
30675                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
30676                // done second because the memcpy will write garbage to these bytes.
30677                let padding_ptr = buf_ptr.offset(2) as *mut u16;
30678                let padding_mask = 0xff00u16;
30679                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
30680            }
30681            Ok(())
30682        }
30683    }
30684    unsafe impl<
30685        D: fidl::encoding::ResourceDialect,
30686        T0: fidl::encoding::Encode<u16, D>,
30687        T1: fidl::encoding::Encode<u8, D>,
30688    > fidl::encoding::Encode<StructSize3Align2, D> for (T0, T1)
30689    {
30690        #[inline]
30691        unsafe fn encode(
30692            self,
30693            encoder: &mut fidl::encoding::Encoder<'_, D>,
30694            offset: usize,
30695            depth: fidl::encoding::Depth,
30696        ) -> fidl::Result<()> {
30697            encoder.debug_check_bounds::<StructSize3Align2>(offset);
30698            // Zero out padding regions. There's no need to apply masks
30699            // because the unmasked parts will be overwritten by fields.
30700            unsafe {
30701                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
30702                (ptr as *mut u16).write_unaligned(0);
30703            }
30704            // Write the fields.
30705            self.0.encode(encoder, offset + 0, depth)?;
30706            self.1.encode(encoder, offset + 2, depth)?;
30707            Ok(())
30708        }
30709    }
30710
30711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align2 {
30712        #[inline(always)]
30713        fn new_empty() -> Self {
30714            Self { f1: fidl::new_empty!(u16, D), f2: fidl::new_empty!(u8, D) }
30715        }
30716
30717        #[inline]
30718        unsafe fn decode(
30719            &mut self,
30720            decoder: &mut fidl::encoding::Decoder<'_, D>,
30721            offset: usize,
30722            _depth: fidl::encoding::Depth,
30723        ) -> fidl::Result<()> {
30724            decoder.debug_check_bounds::<Self>(offset);
30725            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30726            // Verify that padding bytes are zero.
30727            let ptr = unsafe { buf_ptr.offset(2) };
30728            let padval = unsafe { (ptr as *const u16).read_unaligned() };
30729            let mask = 0xff00u16;
30730            let maskedval = padval & mask;
30731            if maskedval != 0 {
30732                return Err(fidl::Error::NonZeroPadding {
30733                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
30734                });
30735            }
30736            // Copy from the buffer into the object.
30737            unsafe {
30738                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
30739            }
30740            Ok(())
30741        }
30742    }
30743
30744    impl fidl::encoding::ValueTypeMarker for StructTableNoFields {
30745        type Borrowed<'a> = &'a Self;
30746        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30747            value
30748        }
30749    }
30750
30751    unsafe impl fidl::encoding::TypeMarker for StructTableNoFields {
30752        type Owned = Self;
30753
30754        #[inline(always)]
30755        fn inline_align(_context: fidl::encoding::Context) -> usize {
30756            8
30757        }
30758
30759        #[inline(always)]
30760        fn inline_size(_context: fidl::encoding::Context) -> usize {
30761            16
30762        }
30763    }
30764
30765    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructTableNoFields, D>
30766        for &StructTableNoFields
30767    {
30768        #[inline]
30769        unsafe fn encode(
30770            self,
30771            encoder: &mut fidl::encoding::Encoder<'_, D>,
30772            offset: usize,
30773            _depth: fidl::encoding::Depth,
30774        ) -> fidl::Result<()> {
30775            encoder.debug_check_bounds::<StructTableNoFields>(offset);
30776            // Delegate to tuple encoding.
30777            fidl::encoding::Encode::<StructTableNoFields, D>::encode(
30778                (<TableNoFields as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30779                encoder,
30780                offset,
30781                _depth,
30782            )
30783        }
30784    }
30785    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableNoFields, D>>
30786        fidl::encoding::Encode<StructTableNoFields, D> for (T0,)
30787    {
30788        #[inline]
30789        unsafe fn encode(
30790            self,
30791            encoder: &mut fidl::encoding::Encoder<'_, D>,
30792            offset: usize,
30793            depth: fidl::encoding::Depth,
30794        ) -> fidl::Result<()> {
30795            encoder.debug_check_bounds::<StructTableNoFields>(offset);
30796            // Zero out padding regions. There's no need to apply masks
30797            // because the unmasked parts will be overwritten by fields.
30798            // Write the fields.
30799            self.0.encode(encoder, offset + 0, depth)?;
30800            Ok(())
30801        }
30802    }
30803
30804    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructTableNoFields {
30805        #[inline(always)]
30806        fn new_empty() -> Self {
30807            Self { t: fidl::new_empty!(TableNoFields, D) }
30808        }
30809
30810        #[inline]
30811        unsafe fn decode(
30812            &mut self,
30813            decoder: &mut fidl::encoding::Decoder<'_, D>,
30814            offset: usize,
30815            _depth: fidl::encoding::Depth,
30816        ) -> fidl::Result<()> {
30817            decoder.debug_check_bounds::<Self>(offset);
30818            // Verify that padding bytes are zero.
30819            fidl::decode!(TableNoFields, D, &mut self.t, decoder, offset + 0, _depth)?;
30820            Ok(())
30821        }
30822    }
30823
30824    impl fidl::encoding::ValueTypeMarker for StructWithArrays {
30825        type Borrowed<'a> = &'a Self;
30826        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30827            value
30828        }
30829    }
30830
30831    unsafe impl fidl::encoding::TypeMarker for StructWithArrays {
30832        type Owned = Self;
30833
30834        #[inline(always)]
30835        fn inline_align(_context: fidl::encoding::Context) -> usize {
30836            8
30837        }
30838
30839        #[inline(always)]
30840        fn inline_size(_context: fidl::encoding::Context) -> usize {
30841            120
30842        }
30843    }
30844
30845    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithArrays, D>
30846        for &StructWithArrays
30847    {
30848        #[inline]
30849        unsafe fn encode(
30850            self,
30851            encoder: &mut fidl::encoding::Encoder<'_, D>,
30852            offset: usize,
30853            _depth: fidl::encoding::Depth,
30854        ) -> fidl::Result<()> {
30855            encoder.debug_check_bounds::<StructWithArrays>(offset);
30856            // Delegate to tuple encoding.
30857            fidl::encoding::Encode::<StructWithArrays, D>::encode(
30858                (
30859                    <fidl::encoding::Array<i32, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_int),
30860                    <fidl::encoding::Array<fidl::encoding::UnboundedString, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_string),
30861                    <fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_string),
30862                    <fidl::encoding::Array<StructWithInt, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_struct),
30863                    <fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_struct),
30864                    <fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_arr_int),
30865                ),
30866                encoder, offset, _depth
30867            )
30868        }
30869    }
30870    unsafe impl<
30871        D: fidl::encoding::ResourceDialect,
30872        T0: fidl::encoding::Encode<fidl::encoding::Array<i32, 2>, D>,
30873        T1: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D>,
30874        T2: fidl::encoding::Encode<
30875                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30876                D,
30877            >,
30878        T3: fidl::encoding::Encode<fidl::encoding::Array<StructWithInt, 2>, D>,
30879        T4: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>, D>,
30880        T5: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>, D>,
30881    > fidl::encoding::Encode<StructWithArrays, D> for (T0, T1, T2, T3, T4, T5)
30882    {
30883        #[inline]
30884        unsafe fn encode(
30885            self,
30886            encoder: &mut fidl::encoding::Encoder<'_, D>,
30887            offset: usize,
30888            depth: fidl::encoding::Depth,
30889        ) -> fidl::Result<()> {
30890            encoder.debug_check_bounds::<StructWithArrays>(offset);
30891            // Zero out padding regions. There's no need to apply masks
30892            // because the unmasked parts will be overwritten by fields.
30893            // Write the fields.
30894            self.0.encode(encoder, offset + 0, depth)?;
30895            self.1.encode(encoder, offset + 8, depth)?;
30896            self.2.encode(encoder, offset + 40, depth)?;
30897            self.3.encode(encoder, offset + 72, depth)?;
30898            self.4.encode(encoder, offset + 80, depth)?;
30899            self.5.encode(encoder, offset + 96, depth)?;
30900            Ok(())
30901        }
30902    }
30903
30904    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithArrays {
30905        #[inline(always)]
30906        fn new_empty() -> Self {
30907            Self {
30908                arr_int: fidl::new_empty!(fidl::encoding::Array<i32, 2>, D),
30909                arr_string: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D),
30910                arr_nullable_string: fidl::new_empty!(
30911                    fidl::encoding::Array<
30912                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30913                        2,
30914                    >,
30915                    D
30916                ),
30917                arr_struct: fidl::new_empty!(fidl::encoding::Array<StructWithInt, 2>, D),
30918                arr_nullable_struct: fidl::new_empty!(
30919                    fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30920                    D
30921                ),
30922                arr_arr_int: fidl::new_empty!(
30923                    fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30924                    D
30925                ),
30926            }
30927        }
30928
30929        #[inline]
30930        unsafe fn decode(
30931            &mut self,
30932            decoder: &mut fidl::encoding::Decoder<'_, D>,
30933            offset: usize,
30934            _depth: fidl::encoding::Depth,
30935        ) -> fidl::Result<()> {
30936            decoder.debug_check_bounds::<Self>(offset);
30937            // Verify that padding bytes are zero.
30938            fidl::decode!(fidl::encoding::Array<i32, 2>, D, &mut self.arr_int, decoder, offset + 0, _depth)?;
30939            fidl::decode!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D, &mut self.arr_string, decoder, offset + 8, _depth)?;
30940            fidl::decode!(
30941                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30942                D,
30943                &mut self.arr_nullable_string,
30944                decoder,
30945                offset + 40,
30946                _depth
30947            )?;
30948            fidl::decode!(fidl::encoding::Array<StructWithInt, 2>, D, &mut self.arr_struct, decoder, offset + 72, _depth)?;
30949            fidl::decode!(
30950                fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30951                D,
30952                &mut self.arr_nullable_struct,
30953                decoder,
30954                offset + 80,
30955                _depth
30956            )?;
30957            fidl::decode!(
30958                fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30959                D,
30960                &mut self.arr_arr_int,
30961                decoder,
30962                offset + 96,
30963                _depth
30964            )?;
30965            Ok(())
30966        }
30967    }
30968
30969    impl fidl::encoding::ValueTypeMarker for StructWithInt {
30970        type Borrowed<'a> = &'a Self;
30971        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30972            value
30973        }
30974    }
30975
30976    unsafe impl fidl::encoding::TypeMarker for StructWithInt {
30977        type Owned = Self;
30978
30979        #[inline(always)]
30980        fn inline_align(_context: fidl::encoding::Context) -> usize {
30981            4
30982        }
30983
30984        #[inline(always)]
30985        fn inline_size(_context: fidl::encoding::Context) -> usize {
30986            4
30987        }
30988        #[inline(always)]
30989        fn encode_is_copy() -> bool {
30990            true
30991        }
30992
30993        #[inline(always)]
30994        fn decode_is_copy() -> bool {
30995            true
30996        }
30997    }
30998
30999    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithInt, D>
31000        for &StructWithInt
31001    {
31002        #[inline]
31003        unsafe fn encode(
31004            self,
31005            encoder: &mut fidl::encoding::Encoder<'_, D>,
31006            offset: usize,
31007            _depth: fidl::encoding::Depth,
31008        ) -> fidl::Result<()> {
31009            encoder.debug_check_bounds::<StructWithInt>(offset);
31010            unsafe {
31011                // Copy the object into the buffer.
31012                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
31013                (buf_ptr as *mut StructWithInt)
31014                    .write_unaligned((self as *const StructWithInt).read());
31015                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
31016                // done second because the memcpy will write garbage to these bytes.
31017            }
31018            Ok(())
31019        }
31020    }
31021    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
31022        fidl::encoding::Encode<StructWithInt, D> for (T0,)
31023    {
31024        #[inline]
31025        unsafe fn encode(
31026            self,
31027            encoder: &mut fidl::encoding::Encoder<'_, D>,
31028            offset: usize,
31029            depth: fidl::encoding::Depth,
31030        ) -> fidl::Result<()> {
31031            encoder.debug_check_bounds::<StructWithInt>(offset);
31032            // Zero out padding regions. There's no need to apply masks
31033            // because the unmasked parts will be overwritten by fields.
31034            // Write the fields.
31035            self.0.encode(encoder, offset + 0, depth)?;
31036            Ok(())
31037        }
31038    }
31039
31040    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithInt {
31041        #[inline(always)]
31042        fn new_empty() -> Self {
31043            Self { x: fidl::new_empty!(i32, D) }
31044        }
31045
31046        #[inline]
31047        unsafe fn decode(
31048            &mut self,
31049            decoder: &mut fidl::encoding::Decoder<'_, D>,
31050            offset: usize,
31051            _depth: fidl::encoding::Depth,
31052        ) -> fidl::Result<()> {
31053            decoder.debug_check_bounds::<Self>(offset);
31054            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
31055            // Verify that padding bytes are zero.
31056            // Copy from the buffer into the object.
31057            unsafe {
31058                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
31059            }
31060            Ok(())
31061        }
31062    }
31063
31064    impl fidl::encoding::ValueTypeMarker for StructWithOptionals {
31065        type Borrowed<'a> = &'a Self;
31066        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31067            value
31068        }
31069    }
31070
31071    unsafe impl fidl::encoding::TypeMarker for StructWithOptionals {
31072        type Owned = Self;
31073
31074        #[inline(always)]
31075        fn inline_align(_context: fidl::encoding::Context) -> usize {
31076            8
31077        }
31078
31079        #[inline(always)]
31080        fn inline_size(_context: fidl::encoding::Context) -> usize {
31081            96
31082        }
31083    }
31084
31085    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithOptionals, D>
31086        for &StructWithOptionals
31087    {
31088        #[inline]
31089        unsafe fn encode(
31090            self,
31091            encoder: &mut fidl::encoding::Encoder<'_, D>,
31092            offset: usize,
31093            _depth: fidl::encoding::Depth,
31094        ) -> fidl::Result<()> {
31095            encoder.debug_check_bounds::<StructWithOptionals>(offset);
31096            // Delegate to tuple encoding.
31097            fidl::encoding::Encode::<StructWithOptionals, D>::encode(
31098                (
31099                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
31100                    <fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.s2),
31101                    <TableWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.t),
31102                    <XUnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31103                    <fidl::encoding::OptionalUnion<XUnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu2),
31104                    <UnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
31105                    <fidl::encoding::OptionalUnion<UnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
31106                ),
31107                encoder, offset, _depth
31108            )
31109        }
31110    }
31111    unsafe impl<
31112        D: fidl::encoding::ResourceDialect,
31113        T0: fidl::encoding::Encode<EmptyStruct, D>,
31114        T1: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
31115        T2: fidl::encoding::Encode<TableWithEmptyStruct, D>,
31116        T3: fidl::encoding::Encode<XUnionWithEmptyStruct, D>,
31117        T4: fidl::encoding::Encode<fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D>,
31118        T5: fidl::encoding::Encode<UnionWithEmptyStruct, D>,
31119        T6: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D>,
31120    > fidl::encoding::Encode<StructWithOptionals, D> for (T0, T1, T2, T3, T4, T5, T6)
31121    {
31122        #[inline]
31123        unsafe fn encode(
31124            self,
31125            encoder: &mut fidl::encoding::Encoder<'_, D>,
31126            offset: usize,
31127            depth: fidl::encoding::Depth,
31128        ) -> fidl::Result<()> {
31129            encoder.debug_check_bounds::<StructWithOptionals>(offset);
31130            // Zero out padding regions. There's no need to apply masks
31131            // because the unmasked parts will be overwritten by fields.
31132            unsafe {
31133                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
31134                (ptr as *mut u64).write_unaligned(0);
31135            }
31136            // Write the fields.
31137            self.0.encode(encoder, offset + 0, depth)?;
31138            self.1.encode(encoder, offset + 8, depth)?;
31139            self.2.encode(encoder, offset + 16, depth)?;
31140            self.3.encode(encoder, offset + 32, depth)?;
31141            self.4.encode(encoder, offset + 48, depth)?;
31142            self.5.encode(encoder, offset + 64, depth)?;
31143            self.6.encode(encoder, offset + 80, depth)?;
31144            Ok(())
31145        }
31146    }
31147
31148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithOptionals {
31149        #[inline(always)]
31150        fn new_empty() -> Self {
31151            Self {
31152                s: fidl::new_empty!(EmptyStruct, D),
31153                s2: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D),
31154                t: fidl::new_empty!(TableWithEmptyStruct, D),
31155                xu: fidl::new_empty!(XUnionWithEmptyStruct, D),
31156                xu2: fidl::new_empty!(fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D),
31157                u: fidl::new_empty!(UnionWithEmptyStruct, D),
31158                u2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D),
31159            }
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            // Verify that padding bytes are zero.
31171            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
31172            let padval = unsafe { (ptr as *const u64).read_unaligned() };
31173            let mask = 0xffffffffffffff00u64;
31174            let maskedval = padval & mask;
31175            if maskedval != 0 {
31176                return Err(fidl::Error::NonZeroPadding {
31177                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
31178                });
31179            }
31180            fidl::decode!(EmptyStruct, D, &mut self.s, decoder, offset + 0, _depth)?;
31181            fidl::decode!(
31182                fidl::encoding::Boxed<EmptyStruct>,
31183                D,
31184                &mut self.s2,
31185                decoder,
31186                offset + 8,
31187                _depth
31188            )?;
31189            fidl::decode!(TableWithEmptyStruct, D, &mut self.t, decoder, offset + 16, _depth)?;
31190            fidl::decode!(XUnionWithEmptyStruct, D, &mut self.xu, decoder, offset + 32, _depth)?;
31191            fidl::decode!(
31192                fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>,
31193                D,
31194                &mut self.xu2,
31195                decoder,
31196                offset + 48,
31197                _depth
31198            )?;
31199            fidl::decode!(UnionWithEmptyStruct, D, &mut self.u, decoder, offset + 64, _depth)?;
31200            fidl::decode!(
31201                fidl::encoding::OptionalUnion<UnionWithEmptyStruct>,
31202                D,
31203                &mut self.u2,
31204                decoder,
31205                offset + 80,
31206                _depth
31207            )?;
31208            Ok(())
31209        }
31210    }
31211
31212    impl fidl::encoding::ValueTypeMarker for StructWithVectors {
31213        type Borrowed<'a> = &'a Self;
31214        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31215            value
31216        }
31217    }
31218
31219    unsafe impl fidl::encoding::TypeMarker for StructWithVectors {
31220        type Owned = Self;
31221
31222        #[inline(always)]
31223        fn inline_align(_context: fidl::encoding::Context) -> usize {
31224            8
31225        }
31226
31227        #[inline(always)]
31228        fn inline_size(_context: fidl::encoding::Context) -> usize {
31229            112
31230        }
31231    }
31232
31233    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithVectors, D>
31234        for &StructWithVectors
31235    {
31236        #[inline]
31237        unsafe fn encode(
31238            self,
31239            encoder: &mut fidl::encoding::Encoder<'_, D>,
31240            offset: usize,
31241            _depth: fidl::encoding::Depth,
31242        ) -> fidl::Result<()> {
31243            encoder.debug_check_bounds::<StructWithVectors>(offset);
31244            // Delegate to tuple encoding.
31245            fidl::encoding::Encode::<StructWithVectors, D>::encode(
31246                (
31247                    <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_empty),
31248                    <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_int),
31249                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_string),
31250                    <fidl::encoding::UnboundedVector<fidl::encoding::Optional<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_string),
31251                    <fidl::encoding::UnboundedVector<StructWithInt> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_struct),
31252                    <fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_struct),
31253                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_vec_int),
31254                ),
31255                encoder, offset, _depth
31256            )
31257        }
31258    }
31259    unsafe impl<
31260        D: fidl::encoding::ResourceDialect,
31261        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
31262        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
31263        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
31264        T3: fidl::encoding::Encode<
31265                fidl::encoding::UnboundedVector<
31266                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
31267                >,
31268                D,
31269            >,
31270        T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StructWithInt>, D>,
31271        T5: fidl::encoding::Encode<
31272                fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
31273                D,
31274            >,
31275        T6: fidl::encoding::Encode<
31276                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
31277                D,
31278            >,
31279    > fidl::encoding::Encode<StructWithVectors, D> for (T0, T1, T2, T3, T4, T5, T6)
31280    {
31281        #[inline]
31282        unsafe fn encode(
31283            self,
31284            encoder: &mut fidl::encoding::Encoder<'_, D>,
31285            offset: usize,
31286            depth: fidl::encoding::Depth,
31287        ) -> fidl::Result<()> {
31288            encoder.debug_check_bounds::<StructWithVectors>(offset);
31289            // Zero out padding regions. There's no need to apply masks
31290            // because the unmasked parts will be overwritten by fields.
31291            // Write the fields.
31292            self.0.encode(encoder, offset + 0, depth)?;
31293            self.1.encode(encoder, offset + 16, depth)?;
31294            self.2.encode(encoder, offset + 32, depth)?;
31295            self.3.encode(encoder, offset + 48, depth)?;
31296            self.4.encode(encoder, offset + 64, depth)?;
31297            self.5.encode(encoder, offset + 80, depth)?;
31298            self.6.encode(encoder, offset + 96, depth)?;
31299            Ok(())
31300        }
31301    }
31302
31303    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithVectors {
31304        #[inline(always)]
31305        fn new_empty() -> Self {
31306            Self {
31307                vec_empty: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
31308                vec_int: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
31309                vec_string: fidl::new_empty!(
31310                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
31311                    D
31312                ),
31313                vec_nullable_string: fidl::new_empty!(
31314                    fidl::encoding::UnboundedVector<
31315                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
31316                    >,
31317                    D
31318                ),
31319                vec_struct: fidl::new_empty!(fidl::encoding::UnboundedVector<StructWithInt>, D),
31320                vec_nullable_struct: fidl::new_empty!(
31321                    fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
31322                    D
31323                ),
31324                vec_vec_int: fidl::new_empty!(
31325                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
31326                    D
31327                ),
31328            }
31329        }
31330
31331        #[inline]
31332        unsafe fn decode(
31333            &mut self,
31334            decoder: &mut fidl::encoding::Decoder<'_, D>,
31335            offset: usize,
31336            _depth: fidl::encoding::Depth,
31337        ) -> fidl::Result<()> {
31338            decoder.debug_check_bounds::<Self>(offset);
31339            // Verify that padding bytes are zero.
31340            fidl::decode!(
31341                fidl::encoding::UnboundedVector<i32>,
31342                D,
31343                &mut self.vec_empty,
31344                decoder,
31345                offset + 0,
31346                _depth
31347            )?;
31348            fidl::decode!(
31349                fidl::encoding::UnboundedVector<i32>,
31350                D,
31351                &mut self.vec_int,
31352                decoder,
31353                offset + 16,
31354                _depth
31355            )?;
31356            fidl::decode!(
31357                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
31358                D,
31359                &mut self.vec_string,
31360                decoder,
31361                offset + 32,
31362                _depth
31363            )?;
31364            fidl::decode!(
31365                fidl::encoding::UnboundedVector<
31366                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
31367                >,
31368                D,
31369                &mut self.vec_nullable_string,
31370                decoder,
31371                offset + 48,
31372                _depth
31373            )?;
31374            fidl::decode!(
31375                fidl::encoding::UnboundedVector<StructWithInt>,
31376                D,
31377                &mut self.vec_struct,
31378                decoder,
31379                offset + 64,
31380                _depth
31381            )?;
31382            fidl::decode!(
31383                fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
31384                D,
31385                &mut self.vec_nullable_struct,
31386                decoder,
31387                offset + 80,
31388                _depth
31389            )?;
31390            fidl::decode!(
31391                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
31392                D,
31393                &mut self.vec_vec_int,
31394                decoder,
31395                offset + 96,
31396                _depth
31397            )?;
31398            Ok(())
31399        }
31400    }
31401
31402    impl fidl::encoding::ValueTypeMarker for TableFieldInlinedStruct {
31403        type Borrowed<'a> = &'a Self;
31404        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31405            value
31406        }
31407    }
31408
31409    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedStruct {
31410        type Owned = Self;
31411
31412        #[inline(always)]
31413        fn inline_align(_context: fidl::encoding::Context) -> usize {
31414            8
31415        }
31416
31417        #[inline(always)]
31418        fn inline_size(_context: fidl::encoding::Context) -> usize {
31419            16
31420        }
31421    }
31422
31423    unsafe impl<D: fidl::encoding::ResourceDialect>
31424        fidl::encoding::Encode<TableFieldInlinedStruct, D> for &TableFieldInlinedStruct
31425    {
31426        #[inline]
31427        unsafe fn encode(
31428            self,
31429            encoder: &mut fidl::encoding::Encoder<'_, D>,
31430            offset: usize,
31431            _depth: fidl::encoding::Depth,
31432        ) -> fidl::Result<()> {
31433            encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
31434            // Delegate to tuple encoding.
31435            fidl::encoding::Encode::<TableFieldInlinedStruct, D>::encode(
31436                (<TableFieldInlined as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31437                encoder,
31438                offset,
31439                _depth,
31440            )
31441        }
31442    }
31443    unsafe impl<
31444        D: fidl::encoding::ResourceDialect,
31445        T0: fidl::encoding::Encode<TableFieldInlined, D>,
31446    > fidl::encoding::Encode<TableFieldInlinedStruct, D> for (T0,)
31447    {
31448        #[inline]
31449        unsafe fn encode(
31450            self,
31451            encoder: &mut fidl::encoding::Encoder<'_, D>,
31452            offset: usize,
31453            depth: fidl::encoding::Depth,
31454        ) -> fidl::Result<()> {
31455            encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
31456            // Zero out padding regions. There's no need to apply masks
31457            // because the unmasked parts will be overwritten by fields.
31458            // Write the fields.
31459            self.0.encode(encoder, offset + 0, depth)?;
31460            Ok(())
31461        }
31462    }
31463
31464    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31465        for TableFieldInlinedStruct
31466    {
31467        #[inline(always)]
31468        fn new_empty() -> Self {
31469            Self { t: fidl::new_empty!(TableFieldInlined, D) }
31470        }
31471
31472        #[inline]
31473        unsafe fn decode(
31474            &mut self,
31475            decoder: &mut fidl::encoding::Decoder<'_, D>,
31476            offset: usize,
31477            _depth: fidl::encoding::Depth,
31478        ) -> fidl::Result<()> {
31479            decoder.debug_check_bounds::<Self>(offset);
31480            // Verify that padding bytes are zero.
31481            fidl::decode!(TableFieldInlined, D, &mut self.t, decoder, offset + 0, _depth)?;
31482            Ok(())
31483        }
31484    }
31485
31486    impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLineStruct {
31487        type Borrowed<'a> = &'a Self;
31488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31489            value
31490        }
31491    }
31492
31493    unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLineStruct {
31494        type Owned = Self;
31495
31496        #[inline(always)]
31497        fn inline_align(_context: fidl::encoding::Context) -> usize {
31498            8
31499        }
31500
31501        #[inline(always)]
31502        fn inline_size(_context: fidl::encoding::Context) -> usize {
31503            16
31504        }
31505    }
31506
31507    unsafe impl<D: fidl::encoding::ResourceDialect>
31508        fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for &TableFieldOutOfLineStruct
31509    {
31510        #[inline]
31511        unsafe fn encode(
31512            self,
31513            encoder: &mut fidl::encoding::Encoder<'_, D>,
31514            offset: usize,
31515            _depth: fidl::encoding::Depth,
31516        ) -> fidl::Result<()> {
31517            encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
31518            // Delegate to tuple encoding.
31519            fidl::encoding::Encode::<TableFieldOutOfLineStruct, D>::encode(
31520                (<TableFieldOutOfLine as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31521                encoder,
31522                offset,
31523                _depth,
31524            )
31525        }
31526    }
31527    unsafe impl<
31528        D: fidl::encoding::ResourceDialect,
31529        T0: fidl::encoding::Encode<TableFieldOutOfLine, D>,
31530    > fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for (T0,)
31531    {
31532        #[inline]
31533        unsafe fn encode(
31534            self,
31535            encoder: &mut fidl::encoding::Encoder<'_, D>,
31536            offset: usize,
31537            depth: fidl::encoding::Depth,
31538        ) -> fidl::Result<()> {
31539            encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
31540            // Zero out padding regions. There's no need to apply masks
31541            // because the unmasked parts will be overwritten by fields.
31542            // Write the fields.
31543            self.0.encode(encoder, offset + 0, depth)?;
31544            Ok(())
31545        }
31546    }
31547
31548    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31549        for TableFieldOutOfLineStruct
31550    {
31551        #[inline(always)]
31552        fn new_empty() -> Self {
31553            Self { t: fidl::new_empty!(TableFieldOutOfLine, D) }
31554        }
31555
31556        #[inline]
31557        unsafe fn decode(
31558            &mut self,
31559            decoder: &mut fidl::encoding::Decoder<'_, D>,
31560            offset: usize,
31561            _depth: fidl::encoding::Depth,
31562        ) -> fidl::Result<()> {
31563            decoder.debug_check_bounds::<Self>(offset);
31564            // Verify that padding bytes are zero.
31565            fidl::decode!(TableFieldOutOfLine, D, &mut self.t, decoder, offset + 0, _depth)?;
31566            Ok(())
31567        }
31568    }
31569
31570    impl fidl::encoding::ValueTypeMarker for TableFieldUnknownStruct {
31571        type Borrowed<'a> = &'a Self;
31572        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31573            value
31574        }
31575    }
31576
31577    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownStruct {
31578        type Owned = Self;
31579
31580        #[inline(always)]
31581        fn inline_align(_context: fidl::encoding::Context) -> usize {
31582            8
31583        }
31584
31585        #[inline(always)]
31586        fn inline_size(_context: fidl::encoding::Context) -> usize {
31587            16
31588        }
31589    }
31590
31591    unsafe impl<D: fidl::encoding::ResourceDialect>
31592        fidl::encoding::Encode<TableFieldUnknownStruct, D> for &TableFieldUnknownStruct
31593    {
31594        #[inline]
31595        unsafe fn encode(
31596            self,
31597            encoder: &mut fidl::encoding::Encoder<'_, D>,
31598            offset: usize,
31599            _depth: fidl::encoding::Depth,
31600        ) -> fidl::Result<()> {
31601            encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31602            // Delegate to tuple encoding.
31603            fidl::encoding::Encode::<TableFieldUnknownStruct, D>::encode(
31604                (<TableFieldUnknown as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31605                encoder,
31606                offset,
31607                _depth,
31608            )
31609        }
31610    }
31611    unsafe impl<
31612        D: fidl::encoding::ResourceDialect,
31613        T0: fidl::encoding::Encode<TableFieldUnknown, D>,
31614    > fidl::encoding::Encode<TableFieldUnknownStruct, D> for (T0,)
31615    {
31616        #[inline]
31617        unsafe fn encode(
31618            self,
31619            encoder: &mut fidl::encoding::Encoder<'_, D>,
31620            offset: usize,
31621            depth: fidl::encoding::Depth,
31622        ) -> fidl::Result<()> {
31623            encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31624            // Zero out padding regions. There's no need to apply masks
31625            // because the unmasked parts will be overwritten by fields.
31626            // Write the fields.
31627            self.0.encode(encoder, offset + 0, depth)?;
31628            Ok(())
31629        }
31630    }
31631
31632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31633        for TableFieldUnknownStruct
31634    {
31635        #[inline(always)]
31636        fn new_empty() -> Self {
31637            Self { t: fidl::new_empty!(TableFieldUnknown, D) }
31638        }
31639
31640        #[inline]
31641        unsafe fn decode(
31642            &mut self,
31643            decoder: &mut fidl::encoding::Decoder<'_, D>,
31644            offset: usize,
31645            _depth: fidl::encoding::Depth,
31646        ) -> fidl::Result<()> {
31647            decoder.debug_check_bounds::<Self>(offset);
31648            // Verify that padding bytes are zero.
31649            fidl::decode!(TableFieldUnknown, D, &mut self.t, decoder, offset + 0, _depth)?;
31650            Ok(())
31651        }
31652    }
31653
31654    impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31655        type Borrowed<'a> = &'a Self;
31656        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31657            value
31658        }
31659    }
31660
31661    unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31662        type Owned = Self;
31663
31664        #[inline(always)]
31665        fn inline_align(_context: fidl::encoding::Context) -> usize {
31666            8
31667        }
31668
31669        #[inline(always)]
31670        fn inline_size(_context: fidl::encoding::Context) -> usize {
31671            16
31672        }
31673    }
31674
31675    unsafe impl<D: fidl::encoding::ResourceDialect>
31676        fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D>
31677        for &TableFieldUnsetFlexibleEnumInlinedStruct
31678    {
31679        #[inline]
31680        unsafe fn encode(
31681            self,
31682            encoder: &mut fidl::encoding::Encoder<'_, D>,
31683            offset: usize,
31684            _depth: fidl::encoding::Depth,
31685        ) -> fidl::Result<()> {
31686            encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31687            // Delegate to tuple encoding.
31688            fidl::encoding::Encode::<TableFieldUnsetFlexibleEnumInlinedStruct, D>::encode(
31689                (<TableFieldUnsetFlexibleEnumInlined as fidl::encoding::ValueTypeMarker>::borrow(
31690                    &self.t,
31691                ),),
31692                encoder,
31693                offset,
31694                _depth,
31695            )
31696        }
31697    }
31698    unsafe impl<
31699        D: fidl::encoding::ResourceDialect,
31700        T0: fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>,
31701    > fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D> for (T0,)
31702    {
31703        #[inline]
31704        unsafe fn encode(
31705            self,
31706            encoder: &mut fidl::encoding::Encoder<'_, D>,
31707            offset: usize,
31708            depth: fidl::encoding::Depth,
31709        ) -> fidl::Result<()> {
31710            encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31711            // Zero out padding regions. There's no need to apply masks
31712            // because the unmasked parts will be overwritten by fields.
31713            // Write the fields.
31714            self.0.encode(encoder, offset + 0, depth)?;
31715            Ok(())
31716        }
31717    }
31718
31719    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31720        for TableFieldUnsetFlexibleEnumInlinedStruct
31721    {
31722        #[inline(always)]
31723        fn new_empty() -> Self {
31724            Self { t: fidl::new_empty!(TableFieldUnsetFlexibleEnumInlined, D) }
31725        }
31726
31727        #[inline]
31728        unsafe fn decode(
31729            &mut self,
31730            decoder: &mut fidl::encoding::Decoder<'_, D>,
31731            offset: usize,
31732            _depth: fidl::encoding::Depth,
31733        ) -> fidl::Result<()> {
31734            decoder.debug_check_bounds::<Self>(offset);
31735            // Verify that padding bytes are zero.
31736            fidl::decode!(
31737                TableFieldUnsetFlexibleEnumInlined,
31738                D,
31739                &mut self.t,
31740                decoder,
31741                offset + 0,
31742                _depth
31743            )?;
31744            Ok(())
31745        }
31746    }
31747
31748    impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwichStruct {
31749        type Borrowed<'a> = &'a Self;
31750        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31751            value
31752        }
31753    }
31754
31755    unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwichStruct {
31756        type Owned = Self;
31757
31758        #[inline(always)]
31759        fn inline_align(_context: fidl::encoding::Context) -> usize {
31760            8
31761        }
31762
31763        #[inline(always)]
31764        fn inline_size(_context: fidl::encoding::Context) -> usize {
31765            16
31766        }
31767    }
31768
31769    unsafe impl<D: fidl::encoding::ResourceDialect>
31770        fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D>
31771        for &TableStructWithReservedSandwichStruct
31772    {
31773        #[inline]
31774        unsafe fn encode(
31775            self,
31776            encoder: &mut fidl::encoding::Encoder<'_, D>,
31777            offset: usize,
31778            _depth: fidl::encoding::Depth,
31779        ) -> fidl::Result<()> {
31780            encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31781            // Delegate to tuple encoding.
31782            fidl::encoding::Encode::<TableStructWithReservedSandwichStruct, D>::encode(
31783                (<TableStructWithReservedSandwich as fidl::encoding::ValueTypeMarker>::borrow(
31784                    &self.table,
31785                ),),
31786                encoder,
31787                offset,
31788                _depth,
31789            )
31790        }
31791    }
31792    unsafe impl<
31793        D: fidl::encoding::ResourceDialect,
31794        T0: fidl::encoding::Encode<TableStructWithReservedSandwich, D>,
31795    > fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D> for (T0,)
31796    {
31797        #[inline]
31798        unsafe fn encode(
31799            self,
31800            encoder: &mut fidl::encoding::Encoder<'_, D>,
31801            offset: usize,
31802            depth: fidl::encoding::Depth,
31803        ) -> fidl::Result<()> {
31804            encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31805            // Zero out padding regions. There's no need to apply masks
31806            // because the unmasked parts will be overwritten by fields.
31807            // Write the fields.
31808            self.0.encode(encoder, offset + 0, depth)?;
31809            Ok(())
31810        }
31811    }
31812
31813    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31814        for TableStructWithReservedSandwichStruct
31815    {
31816        #[inline(always)]
31817        fn new_empty() -> Self {
31818            Self { table: fidl::new_empty!(TableStructWithReservedSandwich, D) }
31819        }
31820
31821        #[inline]
31822        unsafe fn decode(
31823            &mut self,
31824            decoder: &mut fidl::encoding::Decoder<'_, D>,
31825            offset: usize,
31826            _depth: fidl::encoding::Depth,
31827        ) -> fidl::Result<()> {
31828            decoder.debug_check_bounds::<Self>(offset);
31829            // Verify that padding bytes are zero.
31830            fidl::decode!(
31831                TableStructWithReservedSandwich,
31832                D,
31833                &mut self.table,
31834                decoder,
31835                offset + 0,
31836                _depth
31837            )?;
31838            Ok(())
31839        }
31840    }
31841
31842    impl fidl::encoding::ValueTypeMarker for TableStructWithUint32SandwichStruct {
31843        type Borrowed<'a> = &'a Self;
31844        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31845            value
31846        }
31847    }
31848
31849    unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32SandwichStruct {
31850        type Owned = Self;
31851
31852        #[inline(always)]
31853        fn inline_align(_context: fidl::encoding::Context) -> usize {
31854            8
31855        }
31856
31857        #[inline(always)]
31858        fn inline_size(_context: fidl::encoding::Context) -> usize {
31859            16
31860        }
31861    }
31862
31863    unsafe impl<D: fidl::encoding::ResourceDialect>
31864        fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D>
31865        for &TableStructWithUint32SandwichStruct
31866    {
31867        #[inline]
31868        unsafe fn encode(
31869            self,
31870            encoder: &mut fidl::encoding::Encoder<'_, D>,
31871            offset: usize,
31872            _depth: fidl::encoding::Depth,
31873        ) -> fidl::Result<()> {
31874            encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31875            // Delegate to tuple encoding.
31876            fidl::encoding::Encode::<TableStructWithUint32SandwichStruct, D>::encode(
31877                (<TableStructWithUint32Sandwich as fidl::encoding::ValueTypeMarker>::borrow(
31878                    &self.table,
31879                ),),
31880                encoder,
31881                offset,
31882                _depth,
31883            )
31884        }
31885    }
31886    unsafe impl<
31887        D: fidl::encoding::ResourceDialect,
31888        T0: fidl::encoding::Encode<TableStructWithUint32Sandwich, D>,
31889    > fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D> for (T0,)
31890    {
31891        #[inline]
31892        unsafe fn encode(
31893            self,
31894            encoder: &mut fidl::encoding::Encoder<'_, D>,
31895            offset: usize,
31896            depth: fidl::encoding::Depth,
31897        ) -> fidl::Result<()> {
31898            encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31899            // Zero out padding regions. There's no need to apply masks
31900            // because the unmasked parts will be overwritten by fields.
31901            // Write the fields.
31902            self.0.encode(encoder, offset + 0, depth)?;
31903            Ok(())
31904        }
31905    }
31906
31907    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31908        for TableStructWithUint32SandwichStruct
31909    {
31910        #[inline(always)]
31911        fn new_empty() -> Self {
31912            Self { table: fidl::new_empty!(TableStructWithUint32Sandwich, D) }
31913        }
31914
31915        #[inline]
31916        unsafe fn decode(
31917            &mut self,
31918            decoder: &mut fidl::encoding::Decoder<'_, D>,
31919            offset: usize,
31920            _depth: fidl::encoding::Depth,
31921        ) -> fidl::Result<()> {
31922            decoder.debug_check_bounds::<Self>(offset);
31923            // Verify that padding bytes are zero.
31924            fidl::decode!(
31925                TableStructWithUint32Sandwich,
31926                D,
31927                &mut self.table,
31928                decoder,
31929                offset + 0,
31930                _depth
31931            )?;
31932            Ok(())
31933        }
31934    }
31935
31936    impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnionStruct {
31937        type Borrowed<'a> = &'a Self;
31938        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31939            value
31940        }
31941    }
31942
31943    unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnionStruct {
31944        type Owned = Self;
31945
31946        #[inline(always)]
31947        fn inline_align(_context: fidl::encoding::Context) -> usize {
31948            8
31949        }
31950
31951        #[inline(always)]
31952        fn inline_size(_context: fidl::encoding::Context) -> usize {
31953            16
31954        }
31955    }
31956
31957    unsafe impl<D: fidl::encoding::ResourceDialect>
31958        fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D>
31959        for &TableWithReservedFieldThenUnionStruct
31960    {
31961        #[inline]
31962        unsafe fn encode(
31963            self,
31964            encoder: &mut fidl::encoding::Encoder<'_, D>,
31965            offset: usize,
31966            _depth: fidl::encoding::Depth,
31967        ) -> fidl::Result<()> {
31968            encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31969            // Delegate to tuple encoding.
31970            fidl::encoding::Encode::<TableWithReservedFieldThenUnionStruct, D>::encode(
31971                (<TableWithReservedFieldThenUnion as fidl::encoding::ValueTypeMarker>::borrow(
31972                    &self.t,
31973                ),),
31974                encoder,
31975                offset,
31976                _depth,
31977            )
31978        }
31979    }
31980    unsafe impl<
31981        D: fidl::encoding::ResourceDialect,
31982        T0: fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>,
31983    > fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D> for (T0,)
31984    {
31985        #[inline]
31986        unsafe fn encode(
31987            self,
31988            encoder: &mut fidl::encoding::Encoder<'_, D>,
31989            offset: usize,
31990            depth: fidl::encoding::Depth,
31991        ) -> fidl::Result<()> {
31992            encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31993            // Zero out padding regions. There's no need to apply masks
31994            // because the unmasked parts will be overwritten by fields.
31995            // Write the fields.
31996            self.0.encode(encoder, offset + 0, depth)?;
31997            Ok(())
31998        }
31999    }
32000
32001    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32002        for TableWithReservedFieldThenUnionStruct
32003    {
32004        #[inline(always)]
32005        fn new_empty() -> Self {
32006            Self { t: fidl::new_empty!(TableWithReservedFieldThenUnion, D) }
32007        }
32008
32009        #[inline]
32010        unsafe fn decode(
32011            &mut self,
32012            decoder: &mut fidl::encoding::Decoder<'_, D>,
32013            offset: usize,
32014            _depth: fidl::encoding::Depth,
32015        ) -> fidl::Result<()> {
32016            decoder.debug_check_bounds::<Self>(offset);
32017            // Verify that padding bytes are zero.
32018            fidl::decode!(
32019                TableWithReservedFieldThenUnion,
32020                D,
32021                &mut self.t,
32022                decoder,
32023                offset + 0,
32024                _depth
32025            )?;
32026            Ok(())
32027        }
32028    }
32029
32030    impl fidl::encoding::ValueTypeMarker for TestAddEthernetDeviceRequest {
32031        type Borrowed<'a> = &'a Self;
32032        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32033            value
32034        }
32035    }
32036
32037    unsafe impl fidl::encoding::TypeMarker for TestAddEthernetDeviceRequest {
32038        type Owned = Self;
32039
32040        #[inline(always)]
32041        fn inline_align(_context: fidl::encoding::Context) -> usize {
32042            8
32043        }
32044
32045        #[inline(always)]
32046        fn inline_size(_context: fidl::encoding::Context) -> usize {
32047            56
32048        }
32049    }
32050
32051    unsafe impl<D: fidl::encoding::ResourceDialect>
32052        fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for &TestAddEthernetDeviceRequest
32053    {
32054        #[inline]
32055        unsafe fn encode(
32056            self,
32057            encoder: &mut fidl::encoding::Encoder<'_, D>,
32058            offset: usize,
32059            _depth: fidl::encoding::Depth,
32060        ) -> fidl::Result<()> {
32061            encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
32062            // Delegate to tuple encoding.
32063            fidl::encoding::Encode::<TestAddEthernetDeviceRequest, D>::encode(
32064                (
32065                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
32066                        &self.topological_path,
32067                    ),
32068                    <InterfaceConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
32069                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
32070                ),
32071                encoder,
32072                offset,
32073                _depth,
32074            )
32075        }
32076    }
32077    unsafe impl<
32078        D: fidl::encoding::ResourceDialect,
32079        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32080        T1: fidl::encoding::Encode<InterfaceConfig, D>,
32081        T2: fidl::encoding::Encode<u32, D>,
32082    > fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for (T0, T1, T2)
32083    {
32084        #[inline]
32085        unsafe fn encode(
32086            self,
32087            encoder: &mut fidl::encoding::Encoder<'_, D>,
32088            offset: usize,
32089            depth: fidl::encoding::Depth,
32090        ) -> fidl::Result<()> {
32091            encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
32092            // Zero out padding regions. There's no need to apply masks
32093            // because the unmasked parts will be overwritten by fields.
32094            unsafe {
32095                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
32096                (ptr as *mut u64).write_unaligned(0);
32097            }
32098            // Write the fields.
32099            self.0.encode(encoder, offset + 0, depth)?;
32100            self.1.encode(encoder, offset + 16, depth)?;
32101            self.2.encode(encoder, offset + 48, depth)?;
32102            Ok(())
32103        }
32104    }
32105
32106    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32107        for TestAddEthernetDeviceRequest
32108    {
32109        #[inline(always)]
32110        fn new_empty() -> Self {
32111            Self {
32112                topological_path: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32113                config: fidl::new_empty!(InterfaceConfig, D),
32114                this_should_be_a_handle: fidl::new_empty!(u32, D),
32115            }
32116        }
32117
32118        #[inline]
32119        unsafe fn decode(
32120            &mut self,
32121            decoder: &mut fidl::encoding::Decoder<'_, D>,
32122            offset: usize,
32123            _depth: fidl::encoding::Depth,
32124        ) -> fidl::Result<()> {
32125            decoder.debug_check_bounds::<Self>(offset);
32126            // Verify that padding bytes are zero.
32127            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
32128            let padval = unsafe { (ptr as *const u64).read_unaligned() };
32129            let mask = 0xffffffff00000000u64;
32130            let maskedval = padval & mask;
32131            if maskedval != 0 {
32132                return Err(fidl::Error::NonZeroPadding {
32133                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
32134                });
32135            }
32136            fidl::decode!(
32137                fidl::encoding::UnboundedString,
32138                D,
32139                &mut self.topological_path,
32140                decoder,
32141                offset + 0,
32142                _depth
32143            )?;
32144            fidl::decode!(InterfaceConfig, D, &mut self.config, decoder, offset + 16, _depth)?;
32145            fidl::decode!(u32, D, &mut self.this_should_be_a_handle, decoder, offset + 48, _depth)?;
32146            Ok(())
32147        }
32148    }
32149
32150    impl fidl::encoding::ValueTypeMarker for TestFlexibleXUnionInStruct {
32151        type Borrowed<'a> = &'a Self;
32152        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32153            value
32154        }
32155    }
32156
32157    unsafe impl fidl::encoding::TypeMarker for TestFlexibleXUnionInStruct {
32158        type Owned = Self;
32159
32160        #[inline(always)]
32161        fn inline_align(_context: fidl::encoding::Context) -> usize {
32162            8
32163        }
32164
32165        #[inline(always)]
32166        fn inline_size(_context: fidl::encoding::Context) -> usize {
32167            16
32168        }
32169    }
32170
32171    unsafe impl<D: fidl::encoding::ResourceDialect>
32172        fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for &TestFlexibleXUnionInStruct
32173    {
32174        #[inline]
32175        unsafe fn encode(
32176            self,
32177            encoder: &mut fidl::encoding::Encoder<'_, D>,
32178            offset: usize,
32179            _depth: fidl::encoding::Depth,
32180        ) -> fidl::Result<()> {
32181            encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
32182            // Delegate to tuple encoding.
32183            fidl::encoding::Encode::<TestFlexibleXUnionInStruct, D>::encode(
32184                (<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
32185                encoder,
32186                offset,
32187                _depth,
32188            )
32189        }
32190    }
32191    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SampleXUnion, D>>
32192        fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for (T0,)
32193    {
32194        #[inline]
32195        unsafe fn encode(
32196            self,
32197            encoder: &mut fidl::encoding::Encoder<'_, D>,
32198            offset: usize,
32199            depth: fidl::encoding::Depth,
32200        ) -> fidl::Result<()> {
32201            encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
32202            // Zero out padding regions. There's no need to apply masks
32203            // because the unmasked parts will be overwritten by fields.
32204            // Write the fields.
32205            self.0.encode(encoder, offset + 0, depth)?;
32206            Ok(())
32207        }
32208    }
32209
32210    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32211        for TestFlexibleXUnionInStruct
32212    {
32213        #[inline(always)]
32214        fn new_empty() -> Self {
32215            Self { xu: fidl::new_empty!(SampleXUnion, D) }
32216        }
32217
32218        #[inline]
32219        unsafe fn decode(
32220            &mut self,
32221            decoder: &mut fidl::encoding::Decoder<'_, D>,
32222            offset: usize,
32223            _depth: fidl::encoding::Depth,
32224        ) -> fidl::Result<()> {
32225            decoder.debug_check_bounds::<Self>(offset);
32226            // Verify that padding bytes are zero.
32227            fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
32228            Ok(())
32229        }
32230    }
32231
32232    impl fidl::encoding::ValueTypeMarker for TestInlineXUnionInStruct {
32233        type Borrowed<'a> = &'a Self;
32234        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32235            value
32236        }
32237    }
32238
32239    unsafe impl fidl::encoding::TypeMarker for TestInlineXUnionInStruct {
32240        type Owned = Self;
32241
32242        #[inline(always)]
32243        fn inline_align(_context: fidl::encoding::Context) -> usize {
32244            8
32245        }
32246
32247        #[inline(always)]
32248        fn inline_size(_context: fidl::encoding::Context) -> usize {
32249            48
32250        }
32251    }
32252
32253    unsafe impl<D: fidl::encoding::ResourceDialect>
32254        fidl::encoding::Encode<TestInlineXUnionInStruct, D> for &TestInlineXUnionInStruct
32255    {
32256        #[inline]
32257        unsafe fn encode(
32258            self,
32259            encoder: &mut fidl::encoding::Encoder<'_, D>,
32260            offset: usize,
32261            _depth: fidl::encoding::Depth,
32262        ) -> fidl::Result<()> {
32263            encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
32264            // Delegate to tuple encoding.
32265            fidl::encoding::Encode::<TestInlineXUnionInStruct, D>::encode(
32266                (
32267                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
32268                        &self.before,
32269                    ),
32270                    <SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32271                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
32272                        &self.after,
32273                    ),
32274                ),
32275                encoder,
32276                offset,
32277                _depth,
32278            )
32279        }
32280    }
32281    unsafe impl<
32282        D: fidl::encoding::ResourceDialect,
32283        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32284        T1: fidl::encoding::Encode<SampleXUnion, D>,
32285        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32286    > fidl::encoding::Encode<TestInlineXUnionInStruct, D> for (T0, T1, T2)
32287    {
32288        #[inline]
32289        unsafe fn encode(
32290            self,
32291            encoder: &mut fidl::encoding::Encoder<'_, D>,
32292            offset: usize,
32293            depth: fidl::encoding::Depth,
32294        ) -> fidl::Result<()> {
32295            encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
32296            // Zero out padding regions. There's no need to apply masks
32297            // because the unmasked parts will be overwritten by fields.
32298            // Write the fields.
32299            self.0.encode(encoder, offset + 0, depth)?;
32300            self.1.encode(encoder, offset + 16, depth)?;
32301            self.2.encode(encoder, offset + 32, depth)?;
32302            Ok(())
32303        }
32304    }
32305
32306    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32307        for TestInlineXUnionInStruct
32308    {
32309        #[inline(always)]
32310        fn new_empty() -> Self {
32311            Self {
32312                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32313                xu: fidl::new_empty!(SampleXUnion, D),
32314                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32315            }
32316        }
32317
32318        #[inline]
32319        unsafe fn decode(
32320            &mut self,
32321            decoder: &mut fidl::encoding::Decoder<'_, D>,
32322            offset: usize,
32323            _depth: fidl::encoding::Depth,
32324        ) -> fidl::Result<()> {
32325            decoder.debug_check_bounds::<Self>(offset);
32326            // Verify that padding bytes are zero.
32327            fidl::decode!(
32328                fidl::encoding::UnboundedString,
32329                D,
32330                &mut self.before,
32331                decoder,
32332                offset + 0,
32333                _depth
32334            )?;
32335            fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 16, _depth)?;
32336            fidl::decode!(
32337                fidl::encoding::UnboundedString,
32338                D,
32339                &mut self.after,
32340                decoder,
32341                offset + 32,
32342                _depth
32343            )?;
32344            Ok(())
32345        }
32346    }
32347
32348    impl fidl::encoding::ValueTypeMarker for TestOptionalFlexibleXUnionInStruct {
32349        type Borrowed<'a> = &'a Self;
32350        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32351            value
32352        }
32353    }
32354
32355    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleXUnionInStruct {
32356        type Owned = Self;
32357
32358        #[inline(always)]
32359        fn inline_align(_context: fidl::encoding::Context) -> usize {
32360            8
32361        }
32362
32363        #[inline(always)]
32364        fn inline_size(_context: fidl::encoding::Context) -> usize {
32365            16
32366        }
32367    }
32368
32369    unsafe impl<D: fidl::encoding::ResourceDialect>
32370        fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D>
32371        for &TestOptionalFlexibleXUnionInStruct
32372    {
32373        #[inline]
32374        unsafe fn encode(
32375            self,
32376            encoder: &mut fidl::encoding::Encoder<'_, D>,
32377            offset: usize,
32378            _depth: fidl::encoding::Depth,
32379        ) -> fidl::Result<()> {
32380            encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
32381            // Delegate to tuple encoding.
32382            fidl::encoding::Encode::<TestOptionalFlexibleXUnionInStruct, D>::encode(
32383                (
32384                    <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32385                ),
32386                encoder, offset, _depth
32387            )
32388        }
32389    }
32390    unsafe impl<
32391        D: fidl::encoding::ResourceDialect,
32392        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
32393    > fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D> for (T0,)
32394    {
32395        #[inline]
32396        unsafe fn encode(
32397            self,
32398            encoder: &mut fidl::encoding::Encoder<'_, D>,
32399            offset: usize,
32400            depth: fidl::encoding::Depth,
32401        ) -> fidl::Result<()> {
32402            encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
32403            // Zero out padding regions. There's no need to apply masks
32404            // because the unmasked parts will be overwritten by fields.
32405            // Write the fields.
32406            self.0.encode(encoder, offset + 0, depth)?;
32407            Ok(())
32408        }
32409    }
32410
32411    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32412        for TestOptionalFlexibleXUnionInStruct
32413    {
32414        #[inline(always)]
32415        fn new_empty() -> Self {
32416            Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D) }
32417        }
32418
32419        #[inline]
32420        unsafe fn decode(
32421            &mut self,
32422            decoder: &mut fidl::encoding::Decoder<'_, D>,
32423            offset: usize,
32424            _depth: fidl::encoding::Depth,
32425        ) -> fidl::Result<()> {
32426            decoder.debug_check_bounds::<Self>(offset);
32427            // Verify that padding bytes are zero.
32428            fidl::decode!(
32429                fidl::encoding::OptionalUnion<SampleXUnion>,
32430                D,
32431                &mut self.xu,
32432                decoder,
32433                offset + 0,
32434                _depth
32435            )?;
32436            Ok(())
32437        }
32438    }
32439
32440    impl fidl::encoding::ValueTypeMarker for TestOptionalStrictXUnionInStruct {
32441        type Borrowed<'a> = &'a Self;
32442        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32443            value
32444        }
32445    }
32446
32447    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictXUnionInStruct {
32448        type Owned = Self;
32449
32450        #[inline(always)]
32451        fn inline_align(_context: fidl::encoding::Context) -> usize {
32452            8
32453        }
32454
32455        #[inline(always)]
32456        fn inline_size(_context: fidl::encoding::Context) -> usize {
32457            16
32458        }
32459    }
32460
32461    unsafe impl<D: fidl::encoding::ResourceDialect>
32462        fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D>
32463        for &TestOptionalStrictXUnionInStruct
32464    {
32465        #[inline]
32466        unsafe fn encode(
32467            self,
32468            encoder: &mut fidl::encoding::Encoder<'_, D>,
32469            offset: usize,
32470            _depth: fidl::encoding::Depth,
32471        ) -> fidl::Result<()> {
32472            encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
32473            // Delegate to tuple encoding.
32474            fidl::encoding::Encode::<TestOptionalStrictXUnionInStruct, D>::encode(
32475                (
32476                    <fidl::encoding::OptionalUnion<SampleStrictXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32477                ),
32478                encoder, offset, _depth
32479            )
32480        }
32481    }
32482    unsafe impl<
32483        D: fidl::encoding::ResourceDialect,
32484        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleStrictXUnion>, D>,
32485    > fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D> for (T0,)
32486    {
32487        #[inline]
32488        unsafe fn encode(
32489            self,
32490            encoder: &mut fidl::encoding::Encoder<'_, D>,
32491            offset: usize,
32492            depth: fidl::encoding::Depth,
32493        ) -> fidl::Result<()> {
32494            encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
32495            // Zero out padding regions. There's no need to apply masks
32496            // because the unmasked parts will be overwritten by fields.
32497            // Write the fields.
32498            self.0.encode(encoder, offset + 0, depth)?;
32499            Ok(())
32500        }
32501    }
32502
32503    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32504        for TestOptionalStrictXUnionInStruct
32505    {
32506        #[inline(always)]
32507        fn new_empty() -> Self {
32508            Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleStrictXUnion>, D) }
32509        }
32510
32511        #[inline]
32512        unsafe fn decode(
32513            &mut self,
32514            decoder: &mut fidl::encoding::Decoder<'_, D>,
32515            offset: usize,
32516            _depth: fidl::encoding::Depth,
32517        ) -> fidl::Result<()> {
32518            decoder.debug_check_bounds::<Self>(offset);
32519            // Verify that padding bytes are zero.
32520            fidl::decode!(
32521                fidl::encoding::OptionalUnion<SampleStrictXUnion>,
32522                D,
32523                &mut self.xu,
32524                decoder,
32525                offset + 0,
32526                _depth
32527            )?;
32528            Ok(())
32529        }
32530    }
32531
32532    impl fidl::encoding::ValueTypeMarker for TestOptionalXUnionInStruct {
32533        type Borrowed<'a> = &'a Self;
32534        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32535            value
32536        }
32537    }
32538
32539    unsafe impl fidl::encoding::TypeMarker for TestOptionalXUnionInStruct {
32540        type Owned = Self;
32541
32542        #[inline(always)]
32543        fn inline_align(_context: fidl::encoding::Context) -> usize {
32544            8
32545        }
32546
32547        #[inline(always)]
32548        fn inline_size(_context: fidl::encoding::Context) -> usize {
32549            48
32550        }
32551    }
32552
32553    unsafe impl<D: fidl::encoding::ResourceDialect>
32554        fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for &TestOptionalXUnionInStruct
32555    {
32556        #[inline]
32557        unsafe fn encode(
32558            self,
32559            encoder: &mut fidl::encoding::Encoder<'_, D>,
32560            offset: usize,
32561            _depth: fidl::encoding::Depth,
32562        ) -> fidl::Result<()> {
32563            encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
32564            // Delegate to tuple encoding.
32565            fidl::encoding::Encode::<TestOptionalXUnionInStruct, D>::encode(
32566                (
32567                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
32568                    <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32569                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
32570                ),
32571                encoder, offset, _depth
32572            )
32573        }
32574    }
32575    unsafe impl<
32576        D: fidl::encoding::ResourceDialect,
32577        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32578        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
32579        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32580    > fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for (T0, T1, T2)
32581    {
32582        #[inline]
32583        unsafe fn encode(
32584            self,
32585            encoder: &mut fidl::encoding::Encoder<'_, D>,
32586            offset: usize,
32587            depth: fidl::encoding::Depth,
32588        ) -> fidl::Result<()> {
32589            encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
32590            // Zero out padding regions. There's no need to apply masks
32591            // because the unmasked parts will be overwritten by fields.
32592            // Write the fields.
32593            self.0.encode(encoder, offset + 0, depth)?;
32594            self.1.encode(encoder, offset + 16, depth)?;
32595            self.2.encode(encoder, offset + 32, depth)?;
32596            Ok(())
32597        }
32598    }
32599
32600    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32601        for TestOptionalXUnionInStruct
32602    {
32603        #[inline(always)]
32604        fn new_empty() -> Self {
32605            Self {
32606                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32607                xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D),
32608                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32609            }
32610        }
32611
32612        #[inline]
32613        unsafe fn decode(
32614            &mut self,
32615            decoder: &mut fidl::encoding::Decoder<'_, D>,
32616            offset: usize,
32617            _depth: fidl::encoding::Depth,
32618        ) -> fidl::Result<()> {
32619            decoder.debug_check_bounds::<Self>(offset);
32620            // Verify that padding bytes are zero.
32621            fidl::decode!(
32622                fidl::encoding::UnboundedString,
32623                D,
32624                &mut self.before,
32625                decoder,
32626                offset + 0,
32627                _depth
32628            )?;
32629            fidl::decode!(
32630                fidl::encoding::OptionalUnion<SampleXUnion>,
32631                D,
32632                &mut self.xu,
32633                decoder,
32634                offset + 16,
32635                _depth
32636            )?;
32637            fidl::decode!(
32638                fidl::encoding::UnboundedString,
32639                D,
32640                &mut self.after,
32641                decoder,
32642                offset + 32,
32643                _depth
32644            )?;
32645            Ok(())
32646        }
32647    }
32648
32649    impl fidl::encoding::ValueTypeMarker for TestStrictXUnionInStruct {
32650        type Borrowed<'a> = &'a Self;
32651        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32652            value
32653        }
32654    }
32655
32656    unsafe impl fidl::encoding::TypeMarker for TestStrictXUnionInStruct {
32657        type Owned = Self;
32658
32659        #[inline(always)]
32660        fn inline_align(_context: fidl::encoding::Context) -> usize {
32661            8
32662        }
32663
32664        #[inline(always)]
32665        fn inline_size(_context: fidl::encoding::Context) -> usize {
32666            16
32667        }
32668    }
32669
32670    unsafe impl<D: fidl::encoding::ResourceDialect>
32671        fidl::encoding::Encode<TestStrictXUnionInStruct, D> for &TestStrictXUnionInStruct
32672    {
32673        #[inline]
32674        unsafe fn encode(
32675            self,
32676            encoder: &mut fidl::encoding::Encoder<'_, D>,
32677            offset: usize,
32678            _depth: fidl::encoding::Depth,
32679        ) -> fidl::Result<()> {
32680            encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32681            // Delegate to tuple encoding.
32682            fidl::encoding::Encode::<TestStrictXUnionInStruct, D>::encode(
32683                (<SampleStrictXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
32684                encoder,
32685                offset,
32686                _depth,
32687            )
32688        }
32689    }
32690    unsafe impl<
32691        D: fidl::encoding::ResourceDialect,
32692        T0: fidl::encoding::Encode<SampleStrictXUnion, D>,
32693    > fidl::encoding::Encode<TestStrictXUnionInStruct, D> for (T0,)
32694    {
32695        #[inline]
32696        unsafe fn encode(
32697            self,
32698            encoder: &mut fidl::encoding::Encoder<'_, D>,
32699            offset: usize,
32700            depth: fidl::encoding::Depth,
32701        ) -> fidl::Result<()> {
32702            encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32703            // Zero out padding regions. There's no need to apply masks
32704            // because the unmasked parts will be overwritten by fields.
32705            // Write the fields.
32706            self.0.encode(encoder, offset + 0, depth)?;
32707            Ok(())
32708        }
32709    }
32710
32711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32712        for TestStrictXUnionInStruct
32713    {
32714        #[inline(always)]
32715        fn new_empty() -> Self {
32716            Self { xu: fidl::new_empty!(SampleStrictXUnion, D) }
32717        }
32718
32719        #[inline]
32720        unsafe fn decode(
32721            &mut self,
32722            decoder: &mut fidl::encoding::Decoder<'_, D>,
32723            offset: usize,
32724            _depth: fidl::encoding::Depth,
32725        ) -> fidl::Result<()> {
32726            decoder.debug_check_bounds::<Self>(offset);
32727            // Verify that padding bytes are zero.
32728            fidl::decode!(SampleStrictXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
32729            Ok(())
32730        }
32731    }
32732
32733    impl fidl::encoding::ValueTypeMarker for TestXUnionInTable {
32734        type Borrowed<'a> = &'a Self;
32735        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32736            value
32737        }
32738    }
32739
32740    unsafe impl fidl::encoding::TypeMarker for TestXUnionInTable {
32741        type Owned = Self;
32742
32743        #[inline(always)]
32744        fn inline_align(_context: fidl::encoding::Context) -> usize {
32745            8
32746        }
32747
32748        #[inline(always)]
32749        fn inline_size(_context: fidl::encoding::Context) -> usize {
32750            16
32751        }
32752    }
32753
32754    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestXUnionInTable, D>
32755        for &TestXUnionInTable
32756    {
32757        #[inline]
32758        unsafe fn encode(
32759            self,
32760            encoder: &mut fidl::encoding::Encoder<'_, D>,
32761            offset: usize,
32762            _depth: fidl::encoding::Depth,
32763        ) -> fidl::Result<()> {
32764            encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32765            // Delegate to tuple encoding.
32766            fidl::encoding::Encode::<TestXUnionInTable, D>::encode(
32767                (<XUnionInTable as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
32768                encoder,
32769                offset,
32770                _depth,
32771            )
32772        }
32773    }
32774    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionInTable, D>>
32775        fidl::encoding::Encode<TestXUnionInTable, D> for (T0,)
32776    {
32777        #[inline]
32778        unsafe fn encode(
32779            self,
32780            encoder: &mut fidl::encoding::Encoder<'_, D>,
32781            offset: usize,
32782            depth: fidl::encoding::Depth,
32783        ) -> fidl::Result<()> {
32784            encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32785            // Zero out padding regions. There's no need to apply masks
32786            // because the unmasked parts will be overwritten by fields.
32787            // Write the fields.
32788            self.0.encode(encoder, offset + 0, depth)?;
32789            Ok(())
32790        }
32791    }
32792
32793    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestXUnionInTable {
32794        #[inline(always)]
32795        fn new_empty() -> Self {
32796            Self { value: fidl::new_empty!(XUnionInTable, D) }
32797        }
32798
32799        #[inline]
32800        unsafe fn decode(
32801            &mut self,
32802            decoder: &mut fidl::encoding::Decoder<'_, D>,
32803            offset: usize,
32804            _depth: fidl::encoding::Depth,
32805        ) -> fidl::Result<()> {
32806            decoder.debug_check_bounds::<Self>(offset);
32807            // Verify that padding bytes are zero.
32808            fidl::decode!(XUnionInTable, D, &mut self.value, decoder, offset + 0, _depth)?;
32809            Ok(())
32810        }
32811    }
32812
32813    impl fidl::encoding::ValueTypeMarker for ThreeByte {
32814        type Borrowed<'a> = &'a Self;
32815        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32816            value
32817        }
32818    }
32819
32820    unsafe impl fidl::encoding::TypeMarker for ThreeByte {
32821        type Owned = Self;
32822
32823        #[inline(always)]
32824        fn inline_align(_context: fidl::encoding::Context) -> usize {
32825            1
32826        }
32827
32828        #[inline(always)]
32829        fn inline_size(_context: fidl::encoding::Context) -> usize {
32830            3
32831        }
32832        #[inline(always)]
32833        fn encode_is_copy() -> bool {
32834            true
32835        }
32836
32837        #[inline(always)]
32838        fn decode_is_copy() -> bool {
32839            true
32840        }
32841    }
32842
32843    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByte, D>
32844        for &ThreeByte
32845    {
32846        #[inline]
32847        unsafe fn encode(
32848            self,
32849            encoder: &mut fidl::encoding::Encoder<'_, D>,
32850            offset: usize,
32851            _depth: fidl::encoding::Depth,
32852        ) -> fidl::Result<()> {
32853            encoder.debug_check_bounds::<ThreeByte>(offset);
32854            unsafe {
32855                // Copy the object into the buffer.
32856                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32857                (buf_ptr as *mut ThreeByte).write_unaligned((self as *const ThreeByte).read());
32858                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
32859                // done second because the memcpy will write garbage to these bytes.
32860            }
32861            Ok(())
32862        }
32863    }
32864    unsafe impl<
32865        D: fidl::encoding::ResourceDialect,
32866        T0: fidl::encoding::Encode<u8, D>,
32867        T1: fidl::encoding::Encode<u8, D>,
32868        T2: fidl::encoding::Encode<u8, D>,
32869    > fidl::encoding::Encode<ThreeByte, D> for (T0, T1, T2)
32870    {
32871        #[inline]
32872        unsafe fn encode(
32873            self,
32874            encoder: &mut fidl::encoding::Encoder<'_, D>,
32875            offset: usize,
32876            depth: fidl::encoding::Depth,
32877        ) -> fidl::Result<()> {
32878            encoder.debug_check_bounds::<ThreeByte>(offset);
32879            // Zero out padding regions. There's no need to apply masks
32880            // because the unmasked parts will be overwritten by fields.
32881            // Write the fields.
32882            self.0.encode(encoder, offset + 0, depth)?;
32883            self.1.encode(encoder, offset + 1, depth)?;
32884            self.2.encode(encoder, offset + 2, depth)?;
32885            Ok(())
32886        }
32887    }
32888
32889    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByte {
32890        #[inline(always)]
32891        fn new_empty() -> Self {
32892            Self {
32893                elem1: fidl::new_empty!(u8, D),
32894                elem2: fidl::new_empty!(u8, D),
32895                elem3: fidl::new_empty!(u8, D),
32896            }
32897        }
32898
32899        #[inline]
32900        unsafe fn decode(
32901            &mut self,
32902            decoder: &mut fidl::encoding::Decoder<'_, D>,
32903            offset: usize,
32904            _depth: fidl::encoding::Depth,
32905        ) -> fidl::Result<()> {
32906            decoder.debug_check_bounds::<Self>(offset);
32907            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32908            // Verify that padding bytes are zero.
32909            // Copy from the buffer into the object.
32910            unsafe {
32911                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
32912            }
32913            Ok(())
32914        }
32915    }
32916
32917    impl fidl::encoding::ValueTypeMarker for ThreeByteInArray {
32918        type Borrowed<'a> = &'a Self;
32919        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32920            value
32921        }
32922    }
32923
32924    unsafe impl fidl::encoding::TypeMarker for ThreeByteInArray {
32925        type Owned = Self;
32926
32927        #[inline(always)]
32928        fn inline_align(_context: fidl::encoding::Context) -> usize {
32929            1
32930        }
32931
32932        #[inline(always)]
32933        fn inline_size(_context: fidl::encoding::Context) -> usize {
32934            9
32935        }
32936        #[inline(always)]
32937        fn encode_is_copy() -> bool {
32938            true
32939        }
32940
32941        #[inline(always)]
32942        fn decode_is_copy() -> bool {
32943            true
32944        }
32945    }
32946
32947    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInArray, D>
32948        for &ThreeByteInArray
32949    {
32950        #[inline]
32951        unsafe fn encode(
32952            self,
32953            encoder: &mut fidl::encoding::Encoder<'_, D>,
32954            offset: usize,
32955            _depth: fidl::encoding::Depth,
32956        ) -> fidl::Result<()> {
32957            encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32958            unsafe {
32959                // Copy the object into the buffer.
32960                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32961                (buf_ptr as *mut ThreeByteInArray)
32962                    .write_unaligned((self as *const ThreeByteInArray).read());
32963                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
32964                // done second because the memcpy will write garbage to these bytes.
32965            }
32966            Ok(())
32967        }
32968    }
32969    unsafe impl<
32970        D: fidl::encoding::ResourceDialect,
32971        T0: fidl::encoding::Encode<fidl::encoding::Array<ThreeByte, 3>, D>,
32972    > fidl::encoding::Encode<ThreeByteInArray, D> for (T0,)
32973    {
32974        #[inline]
32975        unsafe fn encode(
32976            self,
32977            encoder: &mut fidl::encoding::Encoder<'_, D>,
32978            offset: usize,
32979            depth: fidl::encoding::Depth,
32980        ) -> fidl::Result<()> {
32981            encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32982            // Zero out padding regions. There's no need to apply masks
32983            // because the unmasked parts will be overwritten by fields.
32984            // Write the fields.
32985            self.0.encode(encoder, offset + 0, depth)?;
32986            Ok(())
32987        }
32988    }
32989
32990    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInArray {
32991        #[inline(always)]
32992        fn new_empty() -> Self {
32993            Self { elems: fidl::new_empty!(fidl::encoding::Array<ThreeByte, 3>, D) }
32994        }
32995
32996        #[inline]
32997        unsafe fn decode(
32998            &mut self,
32999            decoder: &mut fidl::encoding::Decoder<'_, D>,
33000            offset: usize,
33001            _depth: fidl::encoding::Depth,
33002        ) -> fidl::Result<()> {
33003            decoder.debug_check_bounds::<Self>(offset);
33004            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33005            // Verify that padding bytes are zero.
33006            // Copy from the buffer into the object.
33007            unsafe {
33008                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
33009            }
33010            Ok(())
33011        }
33012    }
33013
33014    impl fidl::encoding::ValueTypeMarker for ThreeByteInStruct {
33015        type Borrowed<'a> = &'a Self;
33016        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33017            value
33018        }
33019    }
33020
33021    unsafe impl fidl::encoding::TypeMarker for ThreeByteInStruct {
33022        type Owned = Self;
33023
33024        #[inline(always)]
33025        fn inline_align(_context: fidl::encoding::Context) -> usize {
33026            1
33027        }
33028
33029        #[inline(always)]
33030        fn inline_size(_context: fidl::encoding::Context) -> usize {
33031            9
33032        }
33033        #[inline(always)]
33034        fn encode_is_copy() -> bool {
33035            true
33036        }
33037
33038        #[inline(always)]
33039        fn decode_is_copy() -> bool {
33040            true
33041        }
33042    }
33043
33044    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInStruct, D>
33045        for &ThreeByteInStruct
33046    {
33047        #[inline]
33048        unsafe fn encode(
33049            self,
33050            encoder: &mut fidl::encoding::Encoder<'_, D>,
33051            offset: usize,
33052            _depth: fidl::encoding::Depth,
33053        ) -> fidl::Result<()> {
33054            encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
33055            unsafe {
33056                // Copy the object into the buffer.
33057                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33058                (buf_ptr as *mut ThreeByteInStruct)
33059                    .write_unaligned((self as *const ThreeByteInStruct).read());
33060                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33061                // done second because the memcpy will write garbage to these bytes.
33062            }
33063            Ok(())
33064        }
33065    }
33066    unsafe impl<
33067        D: fidl::encoding::ResourceDialect,
33068        T0: fidl::encoding::Encode<ThreeByte, D>,
33069        T1: fidl::encoding::Encode<ThreeByte, D>,
33070        T2: fidl::encoding::Encode<ThreeByte, D>,
33071    > fidl::encoding::Encode<ThreeByteInStruct, D> for (T0, T1, T2)
33072    {
33073        #[inline]
33074        unsafe fn encode(
33075            self,
33076            encoder: &mut fidl::encoding::Encoder<'_, D>,
33077            offset: usize,
33078            depth: fidl::encoding::Depth,
33079        ) -> fidl::Result<()> {
33080            encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
33081            // Zero out padding regions. There's no need to apply masks
33082            // because the unmasked parts will be overwritten by fields.
33083            // Write the fields.
33084            self.0.encode(encoder, offset + 0, depth)?;
33085            self.1.encode(encoder, offset + 3, depth)?;
33086            self.2.encode(encoder, offset + 6, depth)?;
33087            Ok(())
33088        }
33089    }
33090
33091    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInStruct {
33092        #[inline(always)]
33093        fn new_empty() -> Self {
33094            Self {
33095                elem1: fidl::new_empty!(ThreeByte, D),
33096                elem2: fidl::new_empty!(ThreeByte, D),
33097                elem3: fidl::new_empty!(ThreeByte, D),
33098            }
33099        }
33100
33101        #[inline]
33102        unsafe fn decode(
33103            &mut self,
33104            decoder: &mut fidl::encoding::Decoder<'_, D>,
33105            offset: usize,
33106            _depth: fidl::encoding::Depth,
33107        ) -> fidl::Result<()> {
33108            decoder.debug_check_bounds::<Self>(offset);
33109            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33110            // Verify that padding bytes are zero.
33111            // Copy from the buffer into the object.
33112            unsafe {
33113                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
33114            }
33115            Ok(())
33116        }
33117    }
33118
33119    impl fidl::encoding::ValueTypeMarker for ThreeByteInVector {
33120        type Borrowed<'a> = &'a Self;
33121        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33122            value
33123        }
33124    }
33125
33126    unsafe impl fidl::encoding::TypeMarker for ThreeByteInVector {
33127        type Owned = Self;
33128
33129        #[inline(always)]
33130        fn inline_align(_context: fidl::encoding::Context) -> usize {
33131            8
33132        }
33133
33134        #[inline(always)]
33135        fn inline_size(_context: fidl::encoding::Context) -> usize {
33136            16
33137        }
33138    }
33139
33140    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInVector, D>
33141        for &ThreeByteInVector
33142    {
33143        #[inline]
33144        unsafe fn encode(
33145            self,
33146            encoder: &mut fidl::encoding::Encoder<'_, D>,
33147            offset: usize,
33148            _depth: fidl::encoding::Depth,
33149        ) -> fidl::Result<()> {
33150            encoder.debug_check_bounds::<ThreeByteInVector>(offset);
33151            // Delegate to tuple encoding.
33152            fidl::encoding::Encode::<ThreeByteInVector, D>::encode(
33153                (
33154                    <fidl::encoding::UnboundedVector<ThreeByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
33155                ),
33156                encoder, offset, _depth
33157            )
33158        }
33159    }
33160    unsafe impl<
33161        D: fidl::encoding::ResourceDialect,
33162        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ThreeByte>, D>,
33163    > fidl::encoding::Encode<ThreeByteInVector, D> for (T0,)
33164    {
33165        #[inline]
33166        unsafe fn encode(
33167            self,
33168            encoder: &mut fidl::encoding::Encoder<'_, D>,
33169            offset: usize,
33170            depth: fidl::encoding::Depth,
33171        ) -> fidl::Result<()> {
33172            encoder.debug_check_bounds::<ThreeByteInVector>(offset);
33173            // Zero out padding regions. There's no need to apply masks
33174            // because the unmasked parts will be overwritten by fields.
33175            // Write the fields.
33176            self.0.encode(encoder, offset + 0, depth)?;
33177            Ok(())
33178        }
33179    }
33180
33181    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInVector {
33182        #[inline(always)]
33183        fn new_empty() -> Self {
33184            Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<ThreeByte>, D) }
33185        }
33186
33187        #[inline]
33188        unsafe fn decode(
33189            &mut self,
33190            decoder: &mut fidl::encoding::Decoder<'_, D>,
33191            offset: usize,
33192            _depth: fidl::encoding::Depth,
33193        ) -> fidl::Result<()> {
33194            decoder.debug_check_bounds::<Self>(offset);
33195            // Verify that padding bytes are zero.
33196            fidl::decode!(
33197                fidl::encoding::UnboundedVector<ThreeByte>,
33198                D,
33199                &mut self.elems,
33200                decoder,
33201                offset + 0,
33202                _depth
33203            )?;
33204            Ok(())
33205        }
33206    }
33207
33208    impl fidl::encoding::ValueTypeMarker for TransactionHeader {
33209        type Borrowed<'a> = &'a Self;
33210        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33211            value
33212        }
33213    }
33214
33215    unsafe impl fidl::encoding::TypeMarker for TransactionHeader {
33216        type Owned = Self;
33217
33218        #[inline(always)]
33219        fn inline_align(_context: fidl::encoding::Context) -> usize {
33220            8
33221        }
33222
33223        #[inline(always)]
33224        fn inline_size(_context: fidl::encoding::Context) -> usize {
33225            16
33226        }
33227        #[inline(always)]
33228        fn encode_is_copy() -> bool {
33229            true
33230        }
33231
33232        #[inline(always)]
33233        fn decode_is_copy() -> bool {
33234            true
33235        }
33236    }
33237
33238    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TransactionHeader, D>
33239        for &TransactionHeader
33240    {
33241        #[inline]
33242        unsafe fn encode(
33243            self,
33244            encoder: &mut fidl::encoding::Encoder<'_, D>,
33245            offset: usize,
33246            _depth: fidl::encoding::Depth,
33247        ) -> fidl::Result<()> {
33248            encoder.debug_check_bounds::<TransactionHeader>(offset);
33249            unsafe {
33250                // Copy the object into the buffer.
33251                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33252                (buf_ptr as *mut TransactionHeader)
33253                    .write_unaligned((self as *const TransactionHeader).read());
33254                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33255                // done second because the memcpy will write garbage to these bytes.
33256            }
33257            Ok(())
33258        }
33259    }
33260    unsafe impl<
33261        D: fidl::encoding::ResourceDialect,
33262        T0: fidl::encoding::Encode<u32, D>,
33263        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
33264        T2: fidl::encoding::Encode<u8, D>,
33265        T3: fidl::encoding::Encode<u64, D>,
33266    > fidl::encoding::Encode<TransactionHeader, D> for (T0, T1, T2, T3)
33267    {
33268        #[inline]
33269        unsafe fn encode(
33270            self,
33271            encoder: &mut fidl::encoding::Encoder<'_, D>,
33272            offset: usize,
33273            depth: fidl::encoding::Depth,
33274        ) -> fidl::Result<()> {
33275            encoder.debug_check_bounds::<TransactionHeader>(offset);
33276            // Zero out padding regions. There's no need to apply masks
33277            // because the unmasked parts will be overwritten by fields.
33278            // Write the fields.
33279            self.0.encode(encoder, offset + 0, depth)?;
33280            self.1.encode(encoder, offset + 4, depth)?;
33281            self.2.encode(encoder, offset + 7, depth)?;
33282            self.3.encode(encoder, offset + 8, depth)?;
33283            Ok(())
33284        }
33285    }
33286
33287    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TransactionHeader {
33288        #[inline(always)]
33289        fn new_empty() -> Self {
33290            Self {
33291                tx_id: fidl::new_empty!(u32, D),
33292                flags: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
33293                magic_number: fidl::new_empty!(u8, D),
33294                ordinal: fidl::new_empty!(u64, D),
33295            }
33296        }
33297
33298        #[inline]
33299        unsafe fn decode(
33300            &mut self,
33301            decoder: &mut fidl::encoding::Decoder<'_, D>,
33302            offset: usize,
33303            _depth: fidl::encoding::Depth,
33304        ) -> fidl::Result<()> {
33305            decoder.debug_check_bounds::<Self>(offset);
33306            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33307            // Verify that padding bytes are zero.
33308            // Copy from the buffer into the object.
33309            unsafe {
33310                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
33311            }
33312            Ok(())
33313        }
33314    }
33315
33316    impl fidl::encoding::ValueTypeMarker for TransformerEmptyStruct {
33317        type Borrowed<'a> = &'a Self;
33318        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33319            value
33320        }
33321    }
33322
33323    unsafe impl fidl::encoding::TypeMarker for TransformerEmptyStruct {
33324        type Owned = Self;
33325
33326        #[inline(always)]
33327        fn inline_align(_context: fidl::encoding::Context) -> usize {
33328            1
33329        }
33330
33331        #[inline(always)]
33332        fn inline_size(_context: fidl::encoding::Context) -> usize {
33333            1
33334        }
33335    }
33336
33337    unsafe impl<D: fidl::encoding::ResourceDialect>
33338        fidl::encoding::Encode<TransformerEmptyStruct, D> for &TransformerEmptyStruct
33339    {
33340        #[inline]
33341        unsafe fn encode(
33342            self,
33343            encoder: &mut fidl::encoding::Encoder<'_, D>,
33344            offset: usize,
33345            _depth: fidl::encoding::Depth,
33346        ) -> fidl::Result<()> {
33347            encoder.debug_check_bounds::<TransformerEmptyStruct>(offset);
33348            encoder.write_num(0u8, offset);
33349            Ok(())
33350        }
33351    }
33352
33353    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33354        for TransformerEmptyStruct
33355    {
33356        #[inline(always)]
33357        fn new_empty() -> Self {
33358            Self
33359        }
33360
33361        #[inline]
33362        unsafe fn decode(
33363            &mut self,
33364            decoder: &mut fidl::encoding::Decoder<'_, D>,
33365            offset: usize,
33366            _depth: fidl::encoding::Depth,
33367        ) -> fidl::Result<()> {
33368            decoder.debug_check_bounds::<Self>(offset);
33369            match decoder.read_num::<u8>(offset) {
33370                0 => Ok(()),
33371                _ => Err(fidl::Error::Invalid),
33372            }
33373        }
33374    }
33375
33376    impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStruct {
33377        type Borrowed<'a> = &'a Self;
33378        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33379            value
33380        }
33381    }
33382
33383    unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStruct {
33384        type Owned = Self;
33385
33386        #[inline(always)]
33387        fn inline_align(_context: fidl::encoding::Context) -> usize {
33388            1
33389        }
33390
33391        #[inline(always)]
33392        fn inline_size(_context: fidl::encoding::Context) -> usize {
33393            2
33394        }
33395    }
33396
33397    unsafe impl<D: fidl::encoding::ResourceDialect>
33398        fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for &TwoEmptyStructsInStruct
33399    {
33400        #[inline]
33401        unsafe fn encode(
33402            self,
33403            encoder: &mut fidl::encoding::Encoder<'_, D>,
33404            offset: usize,
33405            _depth: fidl::encoding::Depth,
33406        ) -> fidl::Result<()> {
33407            encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
33408            // Delegate to tuple encoding.
33409            fidl::encoding::Encode::<TwoEmptyStructsInStruct, D>::encode(
33410                (
33411                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
33412                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
33413                ),
33414                encoder,
33415                offset,
33416                _depth,
33417            )
33418        }
33419    }
33420    unsafe impl<
33421        D: fidl::encoding::ResourceDialect,
33422        T0: fidl::encoding::Encode<EmptyStruct, D>,
33423        T1: fidl::encoding::Encode<EmptyStruct, D>,
33424    > fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for (T0, T1)
33425    {
33426        #[inline]
33427        unsafe fn encode(
33428            self,
33429            encoder: &mut fidl::encoding::Encoder<'_, D>,
33430            offset: usize,
33431            depth: fidl::encoding::Depth,
33432        ) -> fidl::Result<()> {
33433            encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
33434            // Zero out padding regions. There's no need to apply masks
33435            // because the unmasked parts will be overwritten by fields.
33436            // Write the fields.
33437            self.0.encode(encoder, offset + 0, depth)?;
33438            self.1.encode(encoder, offset + 1, depth)?;
33439            Ok(())
33440        }
33441    }
33442
33443    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33444        for TwoEmptyStructsInStruct
33445    {
33446        #[inline(always)]
33447        fn new_empty() -> Self {
33448            Self { a: fidl::new_empty!(EmptyStruct, D), b: fidl::new_empty!(EmptyStruct, D) }
33449        }
33450
33451        #[inline]
33452        unsafe fn decode(
33453            &mut self,
33454            decoder: &mut fidl::encoding::Decoder<'_, D>,
33455            offset: usize,
33456            _depth: fidl::encoding::Depth,
33457        ) -> fidl::Result<()> {
33458            decoder.debug_check_bounds::<Self>(offset);
33459            // Verify that padding bytes are zero.
33460            fidl::decode!(EmptyStruct, D, &mut self.a, decoder, offset + 0, _depth)?;
33461            fidl::decode!(EmptyStruct, D, &mut self.b, decoder, offset + 1, _depth)?;
33462            Ok(())
33463        }
33464    }
33465
33466    impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStructInVectorInStruct {
33467        type Borrowed<'a> = &'a Self;
33468        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33469            value
33470        }
33471    }
33472
33473    unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStructInVectorInStruct {
33474        type Owned = Self;
33475
33476        #[inline(always)]
33477        fn inline_align(_context: fidl::encoding::Context) -> usize {
33478            8
33479        }
33480
33481        #[inline(always)]
33482        fn inline_size(_context: fidl::encoding::Context) -> usize {
33483            16
33484        }
33485    }
33486
33487    unsafe impl<D: fidl::encoding::ResourceDialect>
33488        fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D>
33489        for &TwoEmptyStructsInStructInVectorInStruct
33490    {
33491        #[inline]
33492        unsafe fn encode(
33493            self,
33494            encoder: &mut fidl::encoding::Encoder<'_, D>,
33495            offset: usize,
33496            _depth: fidl::encoding::Depth,
33497        ) -> fidl::Result<()> {
33498            encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
33499            // Delegate to tuple encoding.
33500            fidl::encoding::Encode::<TwoEmptyStructsInStructInVectorInStruct, D>::encode(
33501                (
33502                    <fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
33503                ),
33504                encoder, offset, _depth
33505            )
33506        }
33507    }
33508    unsafe impl<
33509        D: fidl::encoding::ResourceDialect,
33510        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D>,
33511    > fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D> for (T0,)
33512    {
33513        #[inline]
33514        unsafe fn encode(
33515            self,
33516            encoder: &mut fidl::encoding::Encoder<'_, D>,
33517            offset: usize,
33518            depth: fidl::encoding::Depth,
33519        ) -> fidl::Result<()> {
33520            encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
33521            // Zero out padding regions. There's no need to apply masks
33522            // because the unmasked parts will be overwritten by fields.
33523            // Write the fields.
33524            self.0.encode(encoder, offset + 0, depth)?;
33525            Ok(())
33526        }
33527    }
33528
33529    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33530        for TwoEmptyStructsInStructInVectorInStruct
33531    {
33532        #[inline(always)]
33533        fn new_empty() -> Self {
33534            Self {
33535                v: fidl::new_empty!(fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D),
33536            }
33537        }
33538
33539        #[inline]
33540        unsafe fn decode(
33541            &mut self,
33542            decoder: &mut fidl::encoding::Decoder<'_, D>,
33543            offset: usize,
33544            _depth: fidl::encoding::Depth,
33545        ) -> fidl::Result<()> {
33546            decoder.debug_check_bounds::<Self>(offset);
33547            // Verify that padding bytes are zero.
33548            fidl::decode!(
33549                fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>,
33550                D,
33551                &mut self.v,
33552                decoder,
33553                offset + 0,
33554                _depth
33555            )?;
33556            Ok(())
33557        }
33558    }
33559
33560    impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerBool {
33561        type Borrowed<'a> = &'a Self;
33562        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33563            value
33564        }
33565    }
33566
33567    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerBool {
33568        type Owned = Self;
33569
33570        #[inline(always)]
33571        fn inline_align(_context: fidl::encoding::Context) -> usize {
33572            8
33573        }
33574
33575        #[inline(always)]
33576        fn inline_size(_context: fidl::encoding::Context) -> usize {
33577            16
33578        }
33579    }
33580
33581    unsafe impl<D: fidl::encoding::ResourceDialect>
33582        fidl::encoding::Encode<TwoLayerStructInnerBool, D> for &TwoLayerStructInnerBool
33583    {
33584        #[inline]
33585        unsafe fn encode(
33586            self,
33587            encoder: &mut fidl::encoding::Encoder<'_, D>,
33588            offset: usize,
33589            _depth: fidl::encoding::Depth,
33590        ) -> fidl::Result<()> {
33591            encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33592            // Delegate to tuple encoding.
33593            fidl::encoding::Encode::<TwoLayerStructInnerBool, D>::encode(
33594                (
33595                    <OneLayerStructWithBool as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
33596                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
33597                ),
33598                encoder,
33599                offset,
33600                _depth,
33601            )
33602        }
33603    }
33604    unsafe impl<
33605        D: fidl::encoding::ResourceDialect,
33606        T0: fidl::encoding::Encode<OneLayerStructWithBool, D>,
33607        T1: fidl::encoding::Encode<u64, D>,
33608    > fidl::encoding::Encode<TwoLayerStructInnerBool, D> for (T0, T1)
33609    {
33610        #[inline]
33611        unsafe fn encode(
33612            self,
33613            encoder: &mut fidl::encoding::Encoder<'_, D>,
33614            offset: usize,
33615            depth: fidl::encoding::Depth,
33616        ) -> fidl::Result<()> {
33617            encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33618            // Zero out padding regions. There's no need to apply masks
33619            // because the unmasked parts will be overwritten by fields.
33620            // Write the fields.
33621            self.0.encode(encoder, offset + 0, depth)?;
33622            self.1.encode(encoder, offset + 8, depth)?;
33623            Ok(())
33624        }
33625    }
33626
33627    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33628        for TwoLayerStructInnerBool
33629    {
33630        #[inline(always)]
33631        fn new_empty() -> Self {
33632            Self { s: fidl::new_empty!(OneLayerStructWithBool, D), a: fidl::new_empty!(u64, D) }
33633        }
33634
33635        #[inline]
33636        unsafe fn decode(
33637            &mut self,
33638            decoder: &mut fidl::encoding::Decoder<'_, D>,
33639            offset: usize,
33640            _depth: fidl::encoding::Depth,
33641        ) -> fidl::Result<()> {
33642            decoder.debug_check_bounds::<Self>(offset);
33643            // Verify that padding bytes are zero.
33644            fidl::decode!(OneLayerStructWithBool, D, &mut self.s, decoder, offset + 0, _depth)?;
33645            fidl::decode!(u64, D, &mut self.a, decoder, offset + 8, _depth)?;
33646            Ok(())
33647        }
33648    }
33649
33650    impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign4 {
33651        type Borrowed<'a> = &'a Self;
33652        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33653            value
33654        }
33655    }
33656
33657    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign4 {
33658        type Owned = Self;
33659
33660        #[inline(always)]
33661        fn inline_align(_context: fidl::encoding::Context) -> usize {
33662            4
33663        }
33664
33665        #[inline(always)]
33666        fn inline_size(_context: fidl::encoding::Context) -> usize {
33667            12
33668        }
33669    }
33670
33671    unsafe impl<D: fidl::encoding::ResourceDialect>
33672        fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D>
33673        for &TwoLayerStructInnerPaddingAlign4
33674    {
33675        #[inline]
33676        unsafe fn encode(
33677            self,
33678            encoder: &mut fidl::encoding::Encoder<'_, D>,
33679            offset: usize,
33680            _depth: fidl::encoding::Depth,
33681        ) -> fidl::Result<()> {
33682            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33683            unsafe {
33684                // Copy the object into the buffer.
33685                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33686                (buf_ptr as *mut TwoLayerStructInnerPaddingAlign4)
33687                    .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign4).read());
33688                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33689                // done second because the memcpy will write garbage to these bytes.
33690                let padding_ptr = buf_ptr.offset(0) as *mut u32;
33691                let padding_mask = 0xff000000u32;
33692                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33693            }
33694            Ok(())
33695        }
33696    }
33697    unsafe impl<
33698        D: fidl::encoding::ResourceDialect,
33699        T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>,
33700        T1: fidl::encoding::Encode<u32, D>,
33701    > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D> for (T0, T1)
33702    {
33703        #[inline]
33704        unsafe fn encode(
33705            self,
33706            encoder: &mut fidl::encoding::Encoder<'_, D>,
33707            offset: usize,
33708            depth: fidl::encoding::Depth,
33709        ) -> fidl::Result<()> {
33710            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33711            // Zero out padding regions. There's no need to apply masks
33712            // because the unmasked parts will be overwritten by fields.
33713            // Write the fields.
33714            self.0.encode(encoder, offset + 0, depth)?;
33715            self.1.encode(encoder, offset + 8, depth)?;
33716            Ok(())
33717        }
33718    }
33719
33720    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33721        for TwoLayerStructInnerPaddingAlign4
33722    {
33723        #[inline(always)]
33724        fn new_empty() -> Self {
33725            Self {
33726                s: fidl::new_empty!(OneLayerStructWithPaddingAlign4, D),
33727                a: fidl::new_empty!(u32, D),
33728            }
33729        }
33730
33731        #[inline]
33732        unsafe fn decode(
33733            &mut self,
33734            decoder: &mut fidl::encoding::Decoder<'_, D>,
33735            offset: usize,
33736            _depth: fidl::encoding::Depth,
33737        ) -> fidl::Result<()> {
33738            decoder.debug_check_bounds::<Self>(offset);
33739            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33740            // Verify that padding bytes are zero.
33741            let ptr = unsafe { buf_ptr.offset(0) };
33742            let padval = unsafe { (ptr as *const u32).read_unaligned() };
33743            let mask = 0xff000000u32;
33744            let maskedval = padval & mask;
33745            if maskedval != 0 {
33746                return Err(fidl::Error::NonZeroPadding {
33747                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33748                });
33749            }
33750            // Copy from the buffer into the object.
33751            unsafe {
33752                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33753            }
33754            Ok(())
33755        }
33756    }
33757
33758    impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign8 {
33759        type Borrowed<'a> = &'a Self;
33760        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33761            value
33762        }
33763    }
33764
33765    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign8 {
33766        type Owned = Self;
33767
33768        #[inline(always)]
33769        fn inline_align(_context: fidl::encoding::Context) -> usize {
33770            8
33771        }
33772
33773        #[inline(always)]
33774        fn inline_size(_context: fidl::encoding::Context) -> usize {
33775            24
33776        }
33777    }
33778
33779    unsafe impl<D: fidl::encoding::ResourceDialect>
33780        fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D>
33781        for &TwoLayerStructInnerPaddingAlign8
33782    {
33783        #[inline]
33784        unsafe fn encode(
33785            self,
33786            encoder: &mut fidl::encoding::Encoder<'_, D>,
33787            offset: usize,
33788            _depth: fidl::encoding::Depth,
33789        ) -> fidl::Result<()> {
33790            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33791            unsafe {
33792                // Copy the object into the buffer.
33793                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33794                (buf_ptr as *mut TwoLayerStructInnerPaddingAlign8)
33795                    .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign8).read());
33796                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33797                // done second because the memcpy will write garbage to these bytes.
33798                let padding_ptr = buf_ptr.offset(0) as *mut u64;
33799                let padding_mask = 0xffff000000000000u64;
33800                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33801            }
33802            Ok(())
33803        }
33804    }
33805    unsafe impl<
33806        D: fidl::encoding::ResourceDialect,
33807        T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>,
33808        T1: fidl::encoding::Encode<u64, D>,
33809    > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D> for (T0, T1)
33810    {
33811        #[inline]
33812        unsafe fn encode(
33813            self,
33814            encoder: &mut fidl::encoding::Encoder<'_, D>,
33815            offset: usize,
33816            depth: fidl::encoding::Depth,
33817        ) -> fidl::Result<()> {
33818            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33819            // Zero out padding regions. There's no need to apply masks
33820            // because the unmasked parts will be overwritten by fields.
33821            // Write the fields.
33822            self.0.encode(encoder, offset + 0, depth)?;
33823            self.1.encode(encoder, offset + 16, depth)?;
33824            Ok(())
33825        }
33826    }
33827
33828    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33829        for TwoLayerStructInnerPaddingAlign8
33830    {
33831        #[inline(always)]
33832        fn new_empty() -> Self {
33833            Self {
33834                s: fidl::new_empty!(OneLayerStructWithPaddingAlign8, D),
33835                a: fidl::new_empty!(u64, D),
33836            }
33837        }
33838
33839        #[inline]
33840        unsafe fn decode(
33841            &mut self,
33842            decoder: &mut fidl::encoding::Decoder<'_, D>,
33843            offset: usize,
33844            _depth: fidl::encoding::Depth,
33845        ) -> fidl::Result<()> {
33846            decoder.debug_check_bounds::<Self>(offset);
33847            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33848            // Verify that padding bytes are zero.
33849            let ptr = unsafe { buf_ptr.offset(0) };
33850            let padval = unsafe { (ptr as *const u64).read_unaligned() };
33851            let mask = 0xffff000000000000u64;
33852            let maskedval = padval & mask;
33853            if maskedval != 0 {
33854                return Err(fidl::Error::NonZeroPadding {
33855                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33856                });
33857            }
33858            // Copy from the buffer into the object.
33859            unsafe {
33860                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
33861            }
33862            Ok(())
33863        }
33864    }
33865
33866    impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign4 {
33867        type Borrowed<'a> = &'a Self;
33868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33869            value
33870        }
33871    }
33872
33873    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign4 {
33874        type Owned = Self;
33875
33876        #[inline(always)]
33877        fn inline_align(_context: fidl::encoding::Context) -> usize {
33878            4
33879        }
33880
33881        #[inline(always)]
33882        fn inline_size(_context: fidl::encoding::Context) -> usize {
33883            12
33884        }
33885        #[inline(always)]
33886        fn encode_is_copy() -> bool {
33887            true
33888        }
33889
33890        #[inline(always)]
33891        fn decode_is_copy() -> bool {
33892            true
33893        }
33894    }
33895
33896    unsafe impl<D: fidl::encoding::ResourceDialect>
33897        fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D>
33898        for &TwoLayerStructNoPaddingAlign4
33899    {
33900        #[inline]
33901        unsafe fn encode(
33902            self,
33903            encoder: &mut fidl::encoding::Encoder<'_, D>,
33904            offset: usize,
33905            _depth: fidl::encoding::Depth,
33906        ) -> fidl::Result<()> {
33907            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33908            unsafe {
33909                // Copy the object into the buffer.
33910                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33911                (buf_ptr as *mut TwoLayerStructNoPaddingAlign4)
33912                    .write_unaligned((self as *const TwoLayerStructNoPaddingAlign4).read());
33913                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33914                // done second because the memcpy will write garbage to these bytes.
33915            }
33916            Ok(())
33917        }
33918    }
33919    unsafe impl<
33920        D: fidl::encoding::ResourceDialect,
33921        T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>,
33922        T1: fidl::encoding::Encode<u32, D>,
33923    > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D> for (T0, T1)
33924    {
33925        #[inline]
33926        unsafe fn encode(
33927            self,
33928            encoder: &mut fidl::encoding::Encoder<'_, D>,
33929            offset: usize,
33930            depth: fidl::encoding::Depth,
33931        ) -> fidl::Result<()> {
33932            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33933            // Zero out padding regions. There's no need to apply masks
33934            // because the unmasked parts will be overwritten by fields.
33935            // Write the fields.
33936            self.0.encode(encoder, offset + 0, depth)?;
33937            self.1.encode(encoder, offset + 8, depth)?;
33938            Ok(())
33939        }
33940    }
33941
33942    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33943        for TwoLayerStructNoPaddingAlign4
33944    {
33945        #[inline(always)]
33946        fn new_empty() -> Self {
33947            Self {
33948                s: fidl::new_empty!(OneLayerStructNoPaddingAlign4, D),
33949                a: fidl::new_empty!(u32, D),
33950            }
33951        }
33952
33953        #[inline]
33954        unsafe fn decode(
33955            &mut self,
33956            decoder: &mut fidl::encoding::Decoder<'_, D>,
33957            offset: usize,
33958            _depth: fidl::encoding::Depth,
33959        ) -> fidl::Result<()> {
33960            decoder.debug_check_bounds::<Self>(offset);
33961            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33962            // Verify that padding bytes are zero.
33963            // Copy from the buffer into the object.
33964            unsafe {
33965                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33966            }
33967            Ok(())
33968        }
33969    }
33970
33971    impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign8 {
33972        type Borrowed<'a> = &'a Self;
33973        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33974            value
33975        }
33976    }
33977
33978    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign8 {
33979        type Owned = Self;
33980
33981        #[inline(always)]
33982        fn inline_align(_context: fidl::encoding::Context) -> usize {
33983            8
33984        }
33985
33986        #[inline(always)]
33987        fn inline_size(_context: fidl::encoding::Context) -> usize {
33988            24
33989        }
33990        #[inline(always)]
33991        fn encode_is_copy() -> bool {
33992            true
33993        }
33994
33995        #[inline(always)]
33996        fn decode_is_copy() -> bool {
33997            true
33998        }
33999    }
34000
34001    unsafe impl<D: fidl::encoding::ResourceDialect>
34002        fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D>
34003        for &TwoLayerStructNoPaddingAlign8
34004    {
34005        #[inline]
34006        unsafe fn encode(
34007            self,
34008            encoder: &mut fidl::encoding::Encoder<'_, D>,
34009            offset: usize,
34010            _depth: fidl::encoding::Depth,
34011        ) -> fidl::Result<()> {
34012            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
34013            unsafe {
34014                // Copy the object into the buffer.
34015                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34016                (buf_ptr as *mut TwoLayerStructNoPaddingAlign8)
34017                    .write_unaligned((self as *const TwoLayerStructNoPaddingAlign8).read());
34018                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34019                // done second because the memcpy will write garbage to these bytes.
34020            }
34021            Ok(())
34022        }
34023    }
34024    unsafe impl<
34025        D: fidl::encoding::ResourceDialect,
34026        T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>,
34027        T1: fidl::encoding::Encode<u64, D>,
34028    > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D> for (T0, T1)
34029    {
34030        #[inline]
34031        unsafe fn encode(
34032            self,
34033            encoder: &mut fidl::encoding::Encoder<'_, D>,
34034            offset: usize,
34035            depth: fidl::encoding::Depth,
34036        ) -> fidl::Result<()> {
34037            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
34038            // Zero out padding regions. There's no need to apply masks
34039            // because the unmasked parts will be overwritten by fields.
34040            // Write the fields.
34041            self.0.encode(encoder, offset + 0, depth)?;
34042            self.1.encode(encoder, offset + 16, depth)?;
34043            Ok(())
34044        }
34045    }
34046
34047    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34048        for TwoLayerStructNoPaddingAlign8
34049    {
34050        #[inline(always)]
34051        fn new_empty() -> Self {
34052            Self {
34053                s: fidl::new_empty!(OneLayerStructNoPaddingAlign8, D),
34054                a: fidl::new_empty!(u64, D),
34055            }
34056        }
34057
34058        #[inline]
34059        unsafe fn decode(
34060            &mut self,
34061            decoder: &mut fidl::encoding::Decoder<'_, D>,
34062            offset: usize,
34063            _depth: fidl::encoding::Depth,
34064        ) -> fidl::Result<()> {
34065            decoder.debug_check_bounds::<Self>(offset);
34066            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34067            // Verify that padding bytes are zero.
34068            // Copy from the buffer into the object.
34069            unsafe {
34070                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
34071            }
34072            Ok(())
34073        }
34074    }
34075
34076    impl fidl::encoding::ValueTypeMarker for Uint16Struct {
34077        type Borrowed<'a> = &'a Self;
34078        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34079            value
34080        }
34081    }
34082
34083    unsafe impl fidl::encoding::TypeMarker for Uint16Struct {
34084        type Owned = Self;
34085
34086        #[inline(always)]
34087        fn inline_align(_context: fidl::encoding::Context) -> usize {
34088            2
34089        }
34090
34091        #[inline(always)]
34092        fn inline_size(_context: fidl::encoding::Context) -> usize {
34093            2
34094        }
34095        #[inline(always)]
34096        fn encode_is_copy() -> bool {
34097            true
34098        }
34099
34100        #[inline(always)]
34101        fn decode_is_copy() -> bool {
34102            true
34103        }
34104    }
34105
34106    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint16Struct, D>
34107        for &Uint16Struct
34108    {
34109        #[inline]
34110        unsafe fn encode(
34111            self,
34112            encoder: &mut fidl::encoding::Encoder<'_, D>,
34113            offset: usize,
34114            _depth: fidl::encoding::Depth,
34115        ) -> fidl::Result<()> {
34116            encoder.debug_check_bounds::<Uint16Struct>(offset);
34117            unsafe {
34118                // Copy the object into the buffer.
34119                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34120                (buf_ptr as *mut Uint16Struct)
34121                    .write_unaligned((self as *const Uint16Struct).read());
34122                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34123                // done second because the memcpy will write garbage to these bytes.
34124            }
34125            Ok(())
34126        }
34127    }
34128    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
34129        fidl::encoding::Encode<Uint16Struct, D> for (T0,)
34130    {
34131        #[inline]
34132        unsafe fn encode(
34133            self,
34134            encoder: &mut fidl::encoding::Encoder<'_, D>,
34135            offset: usize,
34136            depth: fidl::encoding::Depth,
34137        ) -> fidl::Result<()> {
34138            encoder.debug_check_bounds::<Uint16Struct>(offset);
34139            // Zero out padding regions. There's no need to apply masks
34140            // because the unmasked parts will be overwritten by fields.
34141            // Write the fields.
34142            self.0.encode(encoder, offset + 0, depth)?;
34143            Ok(())
34144        }
34145    }
34146
34147    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint16Struct {
34148        #[inline(always)]
34149        fn new_empty() -> Self {
34150            Self { val: fidl::new_empty!(u16, D) }
34151        }
34152
34153        #[inline]
34154        unsafe fn decode(
34155            &mut self,
34156            decoder: &mut fidl::encoding::Decoder<'_, D>,
34157            offset: usize,
34158            _depth: fidl::encoding::Depth,
34159        ) -> fidl::Result<()> {
34160            decoder.debug_check_bounds::<Self>(offset);
34161            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34162            // Verify that padding bytes are zero.
34163            // Copy from the buffer into the object.
34164            unsafe {
34165                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
34166            }
34167            Ok(())
34168        }
34169    }
34170
34171    impl fidl::encoding::ValueTypeMarker for Uint32Struct {
34172        type Borrowed<'a> = &'a Self;
34173        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34174            value
34175        }
34176    }
34177
34178    unsafe impl fidl::encoding::TypeMarker for Uint32Struct {
34179        type Owned = Self;
34180
34181        #[inline(always)]
34182        fn inline_align(_context: fidl::encoding::Context) -> usize {
34183            4
34184        }
34185
34186        #[inline(always)]
34187        fn inline_size(_context: fidl::encoding::Context) -> usize {
34188            4
34189        }
34190        #[inline(always)]
34191        fn encode_is_copy() -> bool {
34192            true
34193        }
34194
34195        #[inline(always)]
34196        fn decode_is_copy() -> bool {
34197            true
34198        }
34199    }
34200
34201    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint32Struct, D>
34202        for &Uint32Struct
34203    {
34204        #[inline]
34205        unsafe fn encode(
34206            self,
34207            encoder: &mut fidl::encoding::Encoder<'_, D>,
34208            offset: usize,
34209            _depth: fidl::encoding::Depth,
34210        ) -> fidl::Result<()> {
34211            encoder.debug_check_bounds::<Uint32Struct>(offset);
34212            unsafe {
34213                // Copy the object into the buffer.
34214                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34215                (buf_ptr as *mut Uint32Struct)
34216                    .write_unaligned((self as *const Uint32Struct).read());
34217                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34218                // done second because the memcpy will write garbage to these bytes.
34219            }
34220            Ok(())
34221        }
34222    }
34223    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
34224        fidl::encoding::Encode<Uint32Struct, D> for (T0,)
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::<Uint32Struct>(offset);
34234            // Zero out padding regions. There's no need to apply masks
34235            // because the unmasked parts will be overwritten by fields.
34236            // Write the fields.
34237            self.0.encode(encoder, offset + 0, depth)?;
34238            Ok(())
34239        }
34240    }
34241
34242    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint32Struct {
34243        #[inline(always)]
34244        fn new_empty() -> Self {
34245            Self { val: fidl::new_empty!(u32, D) }
34246        }
34247
34248        #[inline]
34249        unsafe fn decode(
34250            &mut self,
34251            decoder: &mut fidl::encoding::Decoder<'_, D>,
34252            offset: usize,
34253            _depth: fidl::encoding::Depth,
34254        ) -> fidl::Result<()> {
34255            decoder.debug_check_bounds::<Self>(offset);
34256            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34257            // Verify that padding bytes are zero.
34258            // Copy from the buffer into the object.
34259            unsafe {
34260                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
34261            }
34262            Ok(())
34263        }
34264    }
34265
34266    impl fidl::encoding::ValueTypeMarker for Uint64Struct {
34267        type Borrowed<'a> = &'a Self;
34268        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34269            value
34270        }
34271    }
34272
34273    unsafe impl fidl::encoding::TypeMarker for Uint64Struct {
34274        type Owned = Self;
34275
34276        #[inline(always)]
34277        fn inline_align(_context: fidl::encoding::Context) -> usize {
34278            8
34279        }
34280
34281        #[inline(always)]
34282        fn inline_size(_context: fidl::encoding::Context) -> usize {
34283            8
34284        }
34285        #[inline(always)]
34286        fn encode_is_copy() -> bool {
34287            true
34288        }
34289
34290        #[inline(always)]
34291        fn decode_is_copy() -> bool {
34292            true
34293        }
34294    }
34295
34296    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint64Struct, D>
34297        for &Uint64Struct
34298    {
34299        #[inline]
34300        unsafe fn encode(
34301            self,
34302            encoder: &mut fidl::encoding::Encoder<'_, D>,
34303            offset: usize,
34304            _depth: fidl::encoding::Depth,
34305        ) -> fidl::Result<()> {
34306            encoder.debug_check_bounds::<Uint64Struct>(offset);
34307            unsafe {
34308                // Copy the object into the buffer.
34309                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34310                (buf_ptr as *mut Uint64Struct)
34311                    .write_unaligned((self as *const Uint64Struct).read());
34312                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34313                // done second because the memcpy will write garbage to these bytes.
34314            }
34315            Ok(())
34316        }
34317    }
34318    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
34319        fidl::encoding::Encode<Uint64Struct, D> for (T0,)
34320    {
34321        #[inline]
34322        unsafe fn encode(
34323            self,
34324            encoder: &mut fidl::encoding::Encoder<'_, D>,
34325            offset: usize,
34326            depth: fidl::encoding::Depth,
34327        ) -> fidl::Result<()> {
34328            encoder.debug_check_bounds::<Uint64Struct>(offset);
34329            // Zero out padding regions. There's no need to apply masks
34330            // because the unmasked parts will be overwritten by fields.
34331            // Write the fields.
34332            self.0.encode(encoder, offset + 0, depth)?;
34333            Ok(())
34334        }
34335    }
34336
34337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint64Struct {
34338        #[inline(always)]
34339        fn new_empty() -> Self {
34340            Self { val: fidl::new_empty!(u64, D) }
34341        }
34342
34343        #[inline]
34344        unsafe fn decode(
34345            &mut self,
34346            decoder: &mut fidl::encoding::Decoder<'_, D>,
34347            offset: usize,
34348            _depth: fidl::encoding::Depth,
34349        ) -> fidl::Result<()> {
34350            decoder.debug_check_bounds::<Self>(offset);
34351            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34352            // Verify that padding bytes are zero.
34353            // Copy from the buffer into the object.
34354            unsafe {
34355                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
34356            }
34357            Ok(())
34358        }
34359    }
34360
34361    impl fidl::encoding::ValueTypeMarker for Uint64Uint32Uint16Uint8 {
34362        type Borrowed<'a> = &'a Self;
34363        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34364            value
34365        }
34366    }
34367
34368    unsafe impl fidl::encoding::TypeMarker for Uint64Uint32Uint16Uint8 {
34369        type Owned = Self;
34370
34371        #[inline(always)]
34372        fn inline_align(_context: fidl::encoding::Context) -> usize {
34373            8
34374        }
34375
34376        #[inline(always)]
34377        fn inline_size(_context: fidl::encoding::Context) -> usize {
34378            16
34379        }
34380    }
34381
34382    unsafe impl<D: fidl::encoding::ResourceDialect>
34383        fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for &Uint64Uint32Uint16Uint8
34384    {
34385        #[inline]
34386        unsafe fn encode(
34387            self,
34388            encoder: &mut fidl::encoding::Encoder<'_, D>,
34389            offset: usize,
34390            _depth: fidl::encoding::Depth,
34391        ) -> fidl::Result<()> {
34392            encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
34393            unsafe {
34394                // Copy the object into the buffer.
34395                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34396                (buf_ptr as *mut Uint64Uint32Uint16Uint8)
34397                    .write_unaligned((self as *const Uint64Uint32Uint16Uint8).read());
34398                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34399                // done second because the memcpy will write garbage to these bytes.
34400                let padding_ptr = buf_ptr.offset(8) as *mut u64;
34401                let padding_mask = 0xff00000000000000u64;
34402                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
34403            }
34404            Ok(())
34405        }
34406    }
34407    unsafe impl<
34408        D: fidl::encoding::ResourceDialect,
34409        T0: fidl::encoding::Encode<u64, D>,
34410        T1: fidl::encoding::Encode<u32, D>,
34411        T2: fidl::encoding::Encode<u16, D>,
34412        T3: fidl::encoding::Encode<u8, D>,
34413    > fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for (T0, T1, T2, T3)
34414    {
34415        #[inline]
34416        unsafe fn encode(
34417            self,
34418            encoder: &mut fidl::encoding::Encoder<'_, D>,
34419            offset: usize,
34420            depth: fidl::encoding::Depth,
34421        ) -> fidl::Result<()> {
34422            encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
34423            // Zero out padding regions. There's no need to apply masks
34424            // because the unmasked parts will be overwritten by fields.
34425            unsafe {
34426                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
34427                (ptr as *mut u64).write_unaligned(0);
34428            }
34429            // Write the fields.
34430            self.0.encode(encoder, offset + 0, depth)?;
34431            self.1.encode(encoder, offset + 8, depth)?;
34432            self.2.encode(encoder, offset + 12, depth)?;
34433            self.3.encode(encoder, offset + 14, depth)?;
34434            Ok(())
34435        }
34436    }
34437
34438    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34439        for Uint64Uint32Uint16Uint8
34440    {
34441        #[inline(always)]
34442        fn new_empty() -> Self {
34443            Self {
34444                f1: fidl::new_empty!(u64, D),
34445                f2: fidl::new_empty!(u32, D),
34446                f3: fidl::new_empty!(u16, D),
34447                f4: fidl::new_empty!(u8, D),
34448            }
34449        }
34450
34451        #[inline]
34452        unsafe fn decode(
34453            &mut self,
34454            decoder: &mut fidl::encoding::Decoder<'_, D>,
34455            offset: usize,
34456            _depth: fidl::encoding::Depth,
34457        ) -> fidl::Result<()> {
34458            decoder.debug_check_bounds::<Self>(offset);
34459            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34460            // Verify that padding bytes are zero.
34461            let ptr = unsafe { buf_ptr.offset(8) };
34462            let padval = unsafe { (ptr as *const u64).read_unaligned() };
34463            let mask = 0xff00000000000000u64;
34464            let maskedval = padval & mask;
34465            if maskedval != 0 {
34466                return Err(fidl::Error::NonZeroPadding {
34467                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
34468                });
34469            }
34470            // Copy from the buffer into the object.
34471            unsafe {
34472                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
34473            }
34474            Ok(())
34475        }
34476    }
34477
34478    impl fidl::encoding::ValueTypeMarker for Uint8Struct {
34479        type Borrowed<'a> = &'a Self;
34480        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34481            value
34482        }
34483    }
34484
34485    unsafe impl fidl::encoding::TypeMarker for Uint8Struct {
34486        type Owned = Self;
34487
34488        #[inline(always)]
34489        fn inline_align(_context: fidl::encoding::Context) -> usize {
34490            1
34491        }
34492
34493        #[inline(always)]
34494        fn inline_size(_context: fidl::encoding::Context) -> usize {
34495            1
34496        }
34497        #[inline(always)]
34498        fn encode_is_copy() -> bool {
34499            true
34500        }
34501
34502        #[inline(always)]
34503        fn decode_is_copy() -> bool {
34504            true
34505        }
34506    }
34507
34508    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Struct, D>
34509        for &Uint8Struct
34510    {
34511        #[inline]
34512        unsafe fn encode(
34513            self,
34514            encoder: &mut fidl::encoding::Encoder<'_, D>,
34515            offset: usize,
34516            _depth: fidl::encoding::Depth,
34517        ) -> fidl::Result<()> {
34518            encoder.debug_check_bounds::<Uint8Struct>(offset);
34519            unsafe {
34520                // Copy the object into the buffer.
34521                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34522                (buf_ptr as *mut Uint8Struct).write_unaligned((self as *const Uint8Struct).read());
34523                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34524                // done second because the memcpy will write garbage to these bytes.
34525            }
34526            Ok(())
34527        }
34528    }
34529    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
34530        fidl::encoding::Encode<Uint8Struct, D> for (T0,)
34531    {
34532        #[inline]
34533        unsafe fn encode(
34534            self,
34535            encoder: &mut fidl::encoding::Encoder<'_, D>,
34536            offset: usize,
34537            depth: fidl::encoding::Depth,
34538        ) -> fidl::Result<()> {
34539            encoder.debug_check_bounds::<Uint8Struct>(offset);
34540            // Zero out padding regions. There's no need to apply masks
34541            // because the unmasked parts will be overwritten by fields.
34542            // Write the fields.
34543            self.0.encode(encoder, offset + 0, depth)?;
34544            Ok(())
34545        }
34546    }
34547
34548    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Struct {
34549        #[inline(always)]
34550        fn new_empty() -> Self {
34551            Self { val: fidl::new_empty!(u8, D) }
34552        }
34553
34554        #[inline]
34555        unsafe fn decode(
34556            &mut self,
34557            decoder: &mut fidl::encoding::Decoder<'_, D>,
34558            offset: usize,
34559            _depth: fidl::encoding::Depth,
34560        ) -> fidl::Result<()> {
34561            decoder.debug_check_bounds::<Self>(offset);
34562            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34563            // Verify that padding bytes are zero.
34564            // Copy from the buffer into the object.
34565            unsafe {
34566                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
34567            }
34568            Ok(())
34569        }
34570    }
34571
34572    impl fidl::encoding::ValueTypeMarker for Uint8Uint16Uint32Uint64 {
34573        type Borrowed<'a> = &'a Self;
34574        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34575            value
34576        }
34577    }
34578
34579    unsafe impl fidl::encoding::TypeMarker for Uint8Uint16Uint32Uint64 {
34580        type Owned = Self;
34581
34582        #[inline(always)]
34583        fn inline_align(_context: fidl::encoding::Context) -> usize {
34584            8
34585        }
34586
34587        #[inline(always)]
34588        fn inline_size(_context: fidl::encoding::Context) -> usize {
34589            16
34590        }
34591    }
34592
34593    unsafe impl<D: fidl::encoding::ResourceDialect>
34594        fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for &Uint8Uint16Uint32Uint64
34595    {
34596        #[inline]
34597        unsafe fn encode(
34598            self,
34599            encoder: &mut fidl::encoding::Encoder<'_, D>,
34600            offset: usize,
34601            _depth: fidl::encoding::Depth,
34602        ) -> fidl::Result<()> {
34603            encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34604            unsafe {
34605                // Copy the object into the buffer.
34606                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34607                (buf_ptr as *mut Uint8Uint16Uint32Uint64)
34608                    .write_unaligned((self as *const Uint8Uint16Uint32Uint64).read());
34609                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34610                // done second because the memcpy will write garbage to these bytes.
34611                let padding_ptr = buf_ptr.offset(0) as *mut u64;
34612                let padding_mask = 0xff00u64;
34613                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
34614            }
34615            Ok(())
34616        }
34617    }
34618    unsafe impl<
34619        D: fidl::encoding::ResourceDialect,
34620        T0: fidl::encoding::Encode<u8, D>,
34621        T1: fidl::encoding::Encode<u16, D>,
34622        T2: fidl::encoding::Encode<u32, D>,
34623        T3: fidl::encoding::Encode<u64, D>,
34624    > fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for (T0, T1, T2, T3)
34625    {
34626        #[inline]
34627        unsafe fn encode(
34628            self,
34629            encoder: &mut fidl::encoding::Encoder<'_, D>,
34630            offset: usize,
34631            depth: fidl::encoding::Depth,
34632        ) -> fidl::Result<()> {
34633            encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34634            // Zero out padding regions. There's no need to apply masks
34635            // because the unmasked parts will be overwritten by fields.
34636            unsafe {
34637                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
34638                (ptr as *mut u64).write_unaligned(0);
34639            }
34640            // Write the fields.
34641            self.0.encode(encoder, offset + 0, depth)?;
34642            self.1.encode(encoder, offset + 2, depth)?;
34643            self.2.encode(encoder, offset + 4, depth)?;
34644            self.3.encode(encoder, offset + 8, depth)?;
34645            Ok(())
34646        }
34647    }
34648
34649    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34650        for Uint8Uint16Uint32Uint64
34651    {
34652        #[inline(always)]
34653        fn new_empty() -> Self {
34654            Self {
34655                f1: fidl::new_empty!(u8, D),
34656                f2: fidl::new_empty!(u16, D),
34657                f3: fidl::new_empty!(u32, D),
34658                f4: fidl::new_empty!(u64, D),
34659            }
34660        }
34661
34662        #[inline]
34663        unsafe fn decode(
34664            &mut self,
34665            decoder: &mut fidl::encoding::Decoder<'_, D>,
34666            offset: usize,
34667            _depth: fidl::encoding::Depth,
34668        ) -> fidl::Result<()> {
34669            decoder.debug_check_bounds::<Self>(offset);
34670            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34671            // Verify that padding bytes are zero.
34672            let ptr = unsafe { buf_ptr.offset(0) };
34673            let padval = unsafe { (ptr as *const u64).read_unaligned() };
34674            let mask = 0xff00u64;
34675            let maskedval = padval & mask;
34676            if maskedval != 0 {
34677                return Err(fidl::Error::NonZeroPadding {
34678                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
34679                });
34680            }
34681            // Copy from the buffer into the object.
34682            unsafe {
34683                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
34684            }
34685            Ok(())
34686        }
34687    }
34688
34689    impl fidl::encoding::ValueTypeMarker for Uint8UnionStruct {
34690        type Borrowed<'a> = &'a Self;
34691        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34692            value
34693        }
34694    }
34695
34696    unsafe impl fidl::encoding::TypeMarker for Uint8UnionStruct {
34697        type Owned = Self;
34698
34699        #[inline(always)]
34700        fn inline_align(_context: fidl::encoding::Context) -> usize {
34701            8
34702        }
34703
34704        #[inline(always)]
34705        fn inline_size(_context: fidl::encoding::Context) -> usize {
34706            16
34707        }
34708    }
34709
34710    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8UnionStruct, D>
34711        for &Uint8UnionStruct
34712    {
34713        #[inline]
34714        unsafe fn encode(
34715            self,
34716            encoder: &mut fidl::encoding::Encoder<'_, D>,
34717            offset: usize,
34718            _depth: fidl::encoding::Depth,
34719        ) -> fidl::Result<()> {
34720            encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34721            // Delegate to tuple encoding.
34722            fidl::encoding::Encode::<Uint8UnionStruct, D>::encode(
34723                (<Uint8Union as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
34724                encoder,
34725                offset,
34726                _depth,
34727            )
34728        }
34729    }
34730    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Uint8Union, D>>
34731        fidl::encoding::Encode<Uint8UnionStruct, D> for (T0,)
34732    {
34733        #[inline]
34734        unsafe fn encode(
34735            self,
34736            encoder: &mut fidl::encoding::Encoder<'_, D>,
34737            offset: usize,
34738            depth: fidl::encoding::Depth,
34739        ) -> fidl::Result<()> {
34740            encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34741            // Zero out padding regions. There's no need to apply masks
34742            // because the unmasked parts will be overwritten by fields.
34743            // Write the fields.
34744            self.0.encode(encoder, offset + 0, depth)?;
34745            Ok(())
34746        }
34747    }
34748
34749    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8UnionStruct {
34750        #[inline(always)]
34751        fn new_empty() -> Self {
34752            Self { u: fidl::new_empty!(Uint8Union, D) }
34753        }
34754
34755        #[inline]
34756        unsafe fn decode(
34757            &mut self,
34758            decoder: &mut fidl::encoding::Decoder<'_, D>,
34759            offset: usize,
34760            _depth: fidl::encoding::Depth,
34761        ) -> fidl::Result<()> {
34762            decoder.debug_check_bounds::<Self>(offset);
34763            // Verify that padding bytes are zero.
34764            fidl::decode!(Uint8Union, D, &mut self.u, decoder, offset + 0, _depth)?;
34765            Ok(())
34766        }
34767    }
34768
34769    impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableString {
34770        type Borrowed<'a> = &'a Self;
34771        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34772            value
34773        }
34774    }
34775
34776    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableString {
34777        type Owned = Self;
34778
34779        #[inline(always)]
34780        fn inline_align(_context: fidl::encoding::Context) -> usize {
34781            8
34782        }
34783
34784        #[inline(always)]
34785        fn inline_size(_context: fidl::encoding::Context) -> usize {
34786            16
34787        }
34788    }
34789
34790    unsafe impl<D: fidl::encoding::ResourceDialect>
34791        fidl::encoding::Encode<UnboundedNonnullableString, D> for &UnboundedNonnullableString
34792    {
34793        #[inline]
34794        unsafe fn encode(
34795            self,
34796            encoder: &mut fidl::encoding::Encoder<'_, D>,
34797            offset: usize,
34798            _depth: fidl::encoding::Depth,
34799        ) -> fidl::Result<()> {
34800            encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34801            // Delegate to tuple encoding.
34802            fidl::encoding::Encode::<UnboundedNonnullableString, D>::encode(
34803                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
34804                    &self.s0,
34805                ),),
34806                encoder,
34807                offset,
34808                _depth,
34809            )
34810        }
34811    }
34812    unsafe impl<
34813        D: fidl::encoding::ResourceDialect,
34814        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
34815    > fidl::encoding::Encode<UnboundedNonnullableString, D> for (T0,)
34816    {
34817        #[inline]
34818        unsafe fn encode(
34819            self,
34820            encoder: &mut fidl::encoding::Encoder<'_, D>,
34821            offset: usize,
34822            depth: fidl::encoding::Depth,
34823        ) -> fidl::Result<()> {
34824            encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34825            // Zero out padding regions. There's no need to apply masks
34826            // because the unmasked parts will be overwritten by fields.
34827            // Write the fields.
34828            self.0.encode(encoder, offset + 0, depth)?;
34829            Ok(())
34830        }
34831    }
34832
34833    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34834        for UnboundedNonnullableString
34835    {
34836        #[inline(always)]
34837        fn new_empty() -> Self {
34838            Self { s0: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
34839        }
34840
34841        #[inline]
34842        unsafe fn decode(
34843            &mut self,
34844            decoder: &mut fidl::encoding::Decoder<'_, D>,
34845            offset: usize,
34846            _depth: fidl::encoding::Depth,
34847        ) -> fidl::Result<()> {
34848            decoder.debug_check_bounds::<Self>(offset);
34849            // Verify that padding bytes are zero.
34850            fidl::decode!(
34851                fidl::encoding::UnboundedString,
34852                D,
34853                &mut self.s0,
34854                decoder,
34855                offset + 0,
34856                _depth
34857            )?;
34858            Ok(())
34859        }
34860    }
34861
34862    impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableVectorOfUint32s {
34863        type Borrowed<'a> = &'a Self;
34864        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34865            value
34866        }
34867    }
34868
34869    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfUint32s {
34870        type Owned = Self;
34871
34872        #[inline(always)]
34873        fn inline_align(_context: fidl::encoding::Context) -> usize {
34874            8
34875        }
34876
34877        #[inline(always)]
34878        fn inline_size(_context: fidl::encoding::Context) -> usize {
34879            16
34880        }
34881    }
34882
34883    unsafe impl<D: fidl::encoding::ResourceDialect>
34884        fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D>
34885        for &UnboundedNonnullableVectorOfUint32s
34886    {
34887        #[inline]
34888        unsafe fn encode(
34889            self,
34890            encoder: &mut fidl::encoding::Encoder<'_, D>,
34891            offset: usize,
34892            _depth: fidl::encoding::Depth,
34893        ) -> fidl::Result<()> {
34894            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34895            // Delegate to tuple encoding.
34896            fidl::encoding::Encode::<UnboundedNonnullableVectorOfUint32s, D>::encode(
34897                (
34898                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
34899                ),
34900                encoder, offset, _depth
34901            )
34902        }
34903    }
34904    unsafe impl<
34905        D: fidl::encoding::ResourceDialect,
34906        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
34907    > fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D> for (T0,)
34908    {
34909        #[inline]
34910        unsafe fn encode(
34911            self,
34912            encoder: &mut fidl::encoding::Encoder<'_, D>,
34913            offset: usize,
34914            depth: fidl::encoding::Depth,
34915        ) -> fidl::Result<()> {
34916            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34917            // Zero out padding regions. There's no need to apply masks
34918            // because the unmasked parts will be overwritten by fields.
34919            // Write the fields.
34920            self.0.encode(encoder, offset + 0, depth)?;
34921            Ok(())
34922        }
34923    }
34924
34925    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34926        for UnboundedNonnullableVectorOfUint32s
34927    {
34928        #[inline(always)]
34929        fn new_empty() -> Self {
34930            Self { vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D) }
34931        }
34932
34933        #[inline]
34934        unsafe fn decode(
34935            &mut self,
34936            decoder: &mut fidl::encoding::Decoder<'_, D>,
34937            offset: usize,
34938            _depth: fidl::encoding::Depth,
34939        ) -> fidl::Result<()> {
34940            decoder.debug_check_bounds::<Self>(offset);
34941            // Verify that padding bytes are zero.
34942            fidl::decode!(
34943                fidl::encoding::UnboundedVector<u32>,
34944                D,
34945                &mut self.vu0,
34946                decoder,
34947                offset + 0,
34948                _depth
34949            )?;
34950            Ok(())
34951        }
34952    }
34953
34954    impl fidl::encoding::ValueTypeMarker for UnboundedNullableString {
34955        type Borrowed<'a> = &'a Self;
34956        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34957            value
34958        }
34959    }
34960
34961    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableString {
34962        type Owned = Self;
34963
34964        #[inline(always)]
34965        fn inline_align(_context: fidl::encoding::Context) -> usize {
34966            8
34967        }
34968
34969        #[inline(always)]
34970        fn inline_size(_context: fidl::encoding::Context) -> usize {
34971            16
34972        }
34973    }
34974
34975    unsafe impl<D: fidl::encoding::ResourceDialect>
34976        fidl::encoding::Encode<UnboundedNullableString, D> for &UnboundedNullableString
34977    {
34978        #[inline]
34979        unsafe fn encode(
34980            self,
34981            encoder: &mut fidl::encoding::Encoder<'_, D>,
34982            offset: usize,
34983            _depth: fidl::encoding::Depth,
34984        ) -> fidl::Result<()> {
34985            encoder.debug_check_bounds::<UnboundedNullableString>(offset);
34986            // Delegate to tuple encoding.
34987            fidl::encoding::Encode::<UnboundedNullableString, D>::encode(
34988                (
34989                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
34990                ),
34991                encoder, offset, _depth
34992            )
34993        }
34994    }
34995    unsafe impl<
34996        D: fidl::encoding::ResourceDialect,
34997        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
34998    > fidl::encoding::Encode<UnboundedNullableString, D> for (T0,)
34999    {
35000        #[inline]
35001        unsafe fn encode(
35002            self,
35003            encoder: &mut fidl::encoding::Encoder<'_, D>,
35004            offset: usize,
35005            depth: fidl::encoding::Depth,
35006        ) -> fidl::Result<()> {
35007            encoder.debug_check_bounds::<UnboundedNullableString>(offset);
35008            // Zero out padding regions. There's no need to apply masks
35009            // because the unmasked parts will be overwritten by fields.
35010            // Write the fields.
35011            self.0.encode(encoder, offset + 0, depth)?;
35012            Ok(())
35013        }
35014    }
35015
35016    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35017        for UnboundedNullableString
35018    {
35019        #[inline(always)]
35020        fn new_empty() -> Self {
35021            Self {
35022                s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
35023            }
35024        }
35025
35026        #[inline]
35027        unsafe fn decode(
35028            &mut self,
35029            decoder: &mut fidl::encoding::Decoder<'_, D>,
35030            offset: usize,
35031            _depth: fidl::encoding::Depth,
35032        ) -> fidl::Result<()> {
35033            decoder.debug_check_bounds::<Self>(offset);
35034            // Verify that padding bytes are zero.
35035            fidl::decode!(
35036                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
35037                D,
35038                &mut self.s0,
35039                decoder,
35040                offset + 0,
35041                _depth
35042            )?;
35043            Ok(())
35044        }
35045    }
35046
35047    impl fidl::encoding::ValueTypeMarker for UnboundedNullableVectorOfUint32s {
35048        type Borrowed<'a> = &'a Self;
35049        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35050            value
35051        }
35052    }
35053
35054    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfUint32s {
35055        type Owned = Self;
35056
35057        #[inline(always)]
35058        fn inline_align(_context: fidl::encoding::Context) -> usize {
35059            8
35060        }
35061
35062        #[inline(always)]
35063        fn inline_size(_context: fidl::encoding::Context) -> usize {
35064            16
35065        }
35066    }
35067
35068    unsafe impl<D: fidl::encoding::ResourceDialect>
35069        fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D>
35070        for &UnboundedNullableVectorOfUint32s
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::<UnboundedNullableVectorOfUint32s>(offset);
35080            // Delegate to tuple encoding.
35081            fidl::encoding::Encode::<UnboundedNullableVectorOfUint32s, D>::encode(
35082                (
35083                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
35084                ),
35085                encoder, offset, _depth
35086            )
35087        }
35088    }
35089    unsafe impl<
35090        D: fidl::encoding::ResourceDialect,
35091        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>, D>,
35092    > fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D> for (T0,)
35093    {
35094        #[inline]
35095        unsafe fn encode(
35096            self,
35097            encoder: &mut fidl::encoding::Encoder<'_, D>,
35098            offset: usize,
35099            depth: fidl::encoding::Depth,
35100        ) -> fidl::Result<()> {
35101            encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
35102            // Zero out padding regions. There's no need to apply masks
35103            // because the unmasked parts will be overwritten by fields.
35104            // Write the fields.
35105            self.0.encode(encoder, offset + 0, depth)?;
35106            Ok(())
35107        }
35108    }
35109
35110    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35111        for UnboundedNullableVectorOfUint32s
35112    {
35113        #[inline(always)]
35114        fn new_empty() -> Self {
35115            Self {
35116                vu0: fidl::new_empty!(
35117                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
35118                    D
35119                ),
35120            }
35121        }
35122
35123        #[inline]
35124        unsafe fn decode(
35125            &mut self,
35126            decoder: &mut fidl::encoding::Decoder<'_, D>,
35127            offset: usize,
35128            _depth: fidl::encoding::Depth,
35129        ) -> fidl::Result<()> {
35130            decoder.debug_check_bounds::<Self>(offset);
35131            // Verify that padding bytes are zero.
35132            fidl::decode!(
35133                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
35134                D,
35135                &mut self.vu0,
35136                decoder,
35137                offset + 0,
35138                _depth
35139            )?;
35140            Ok(())
35141        }
35142    }
35143
35144    impl fidl::encoding::ValueTypeMarker for UnionInlinePaddingStruct {
35145        type Borrowed<'a> = &'a Self;
35146        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35147            value
35148        }
35149    }
35150
35151    unsafe impl fidl::encoding::TypeMarker for UnionInlinePaddingStruct {
35152        type Owned = Self;
35153
35154        #[inline(always)]
35155        fn inline_align(_context: fidl::encoding::Context) -> usize {
35156            8
35157        }
35158
35159        #[inline(always)]
35160        fn inline_size(_context: fidl::encoding::Context) -> usize {
35161            16
35162        }
35163    }
35164
35165    unsafe impl<D: fidl::encoding::ResourceDialect>
35166        fidl::encoding::Encode<UnionInlinePaddingStruct, D> for &UnionInlinePaddingStruct
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::<UnionInlinePaddingStruct>(offset);
35176            // Delegate to tuple encoding.
35177            fidl::encoding::Encode::<UnionInlinePaddingStruct, D>::encode(
35178                (<UnionInlinePadding as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
35179                encoder,
35180                offset,
35181                _depth,
35182            )
35183        }
35184    }
35185    unsafe impl<
35186        D: fidl::encoding::ResourceDialect,
35187        T0: fidl::encoding::Encode<UnionInlinePadding, D>,
35188    > fidl::encoding::Encode<UnionInlinePaddingStruct, D> for (T0,)
35189    {
35190        #[inline]
35191        unsafe fn encode(
35192            self,
35193            encoder: &mut fidl::encoding::Encoder<'_, D>,
35194            offset: usize,
35195            depth: fidl::encoding::Depth,
35196        ) -> fidl::Result<()> {
35197            encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
35198            // Zero out padding regions. There's no need to apply masks
35199            // because the unmasked parts will be overwritten by fields.
35200            // Write the fields.
35201            self.0.encode(encoder, offset + 0, depth)?;
35202            Ok(())
35203        }
35204    }
35205
35206    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35207        for UnionInlinePaddingStruct
35208    {
35209        #[inline(always)]
35210        fn new_empty() -> Self {
35211            Self { u: fidl::new_empty!(UnionInlinePadding, D) }
35212        }
35213
35214        #[inline]
35215        unsafe fn decode(
35216            &mut self,
35217            decoder: &mut fidl::encoding::Decoder<'_, D>,
35218            offset: usize,
35219            _depth: fidl::encoding::Depth,
35220        ) -> fidl::Result<()> {
35221            decoder.debug_check_bounds::<Self>(offset);
35222            // Verify that padding bytes are zero.
35223            fidl::decode!(UnionInlinePadding, D, &mut self.u, decoder, offset + 0, _depth)?;
35224            Ok(())
35225        }
35226    }
35227
35228    impl fidl::encoding::ValueTypeMarker for UnionWithBoundStringStruct {
35229        type Borrowed<'a> = &'a Self;
35230        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35231            value
35232        }
35233    }
35234
35235    unsafe impl fidl::encoding::TypeMarker for UnionWithBoundStringStruct {
35236        type Owned = Self;
35237
35238        #[inline(always)]
35239        fn inline_align(_context: fidl::encoding::Context) -> usize {
35240            8
35241        }
35242
35243        #[inline(always)]
35244        fn inline_size(_context: fidl::encoding::Context) -> usize {
35245            16
35246        }
35247    }
35248
35249    unsafe impl<D: fidl::encoding::ResourceDialect>
35250        fidl::encoding::Encode<UnionWithBoundStringStruct, D> for &UnionWithBoundStringStruct
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::<UnionWithBoundStringStruct>(offset);
35260            // Delegate to tuple encoding.
35261            fidl::encoding::Encode::<UnionWithBoundStringStruct, D>::encode(
35262                (<UnionWithBoundString as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
35263                encoder,
35264                offset,
35265                _depth,
35266            )
35267        }
35268    }
35269    unsafe impl<
35270        D: fidl::encoding::ResourceDialect,
35271        T0: fidl::encoding::Encode<UnionWithBoundString, D>,
35272    > fidl::encoding::Encode<UnionWithBoundStringStruct, D> for (T0,)
35273    {
35274        #[inline]
35275        unsafe fn encode(
35276            self,
35277            encoder: &mut fidl::encoding::Encoder<'_, D>,
35278            offset: usize,
35279            depth: fidl::encoding::Depth,
35280        ) -> fidl::Result<()> {
35281            encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
35282            // Zero out padding regions. There's no need to apply masks
35283            // because the unmasked parts will be overwritten by fields.
35284            // Write the fields.
35285            self.0.encode(encoder, offset + 0, depth)?;
35286            Ok(())
35287        }
35288    }
35289
35290    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35291        for UnionWithBoundStringStruct
35292    {
35293        #[inline(always)]
35294        fn new_empty() -> Self {
35295            Self { v: fidl::new_empty!(UnionWithBoundString, D) }
35296        }
35297
35298        #[inline]
35299        unsafe fn decode(
35300            &mut self,
35301            decoder: &mut fidl::encoding::Decoder<'_, D>,
35302            offset: usize,
35303            _depth: fidl::encoding::Depth,
35304        ) -> fidl::Result<()> {
35305            decoder.debug_check_bounds::<Self>(offset);
35306            // Verify that padding bytes are zero.
35307            fidl::decode!(UnionWithBoundString, D, &mut self.v, decoder, offset + 0, _depth)?;
35308            Ok(())
35309        }
35310    }
35311
35312    impl fidl::encoding::ValueTypeMarker for UpdatePolicy {
35313        type Borrowed<'a> = &'a Self;
35314        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35315            value
35316        }
35317    }
35318
35319    unsafe impl fidl::encoding::TypeMarker for UpdatePolicy {
35320        type Owned = Self;
35321
35322        #[inline(always)]
35323        fn inline_align(_context: fidl::encoding::Context) -> usize {
35324            1
35325        }
35326
35327        #[inline(always)]
35328        fn inline_size(_context: fidl::encoding::Context) -> usize {
35329            2
35330        }
35331    }
35332
35333    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UpdatePolicy, D>
35334        for &UpdatePolicy
35335    {
35336        #[inline]
35337        unsafe fn encode(
35338            self,
35339            encoder: &mut fidl::encoding::Encoder<'_, D>,
35340            offset: usize,
35341            _depth: fidl::encoding::Depth,
35342        ) -> fidl::Result<()> {
35343            encoder.debug_check_bounds::<UpdatePolicy>(offset);
35344            // Delegate to tuple encoding.
35345            fidl::encoding::Encode::<UpdatePolicy, D>::encode(
35346                (
35347                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.fetch_if_absent),
35348                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_old_versions),
35349                ),
35350                encoder,
35351                offset,
35352                _depth,
35353            )
35354        }
35355    }
35356    unsafe impl<
35357        D: fidl::encoding::ResourceDialect,
35358        T0: fidl::encoding::Encode<bool, D>,
35359        T1: fidl::encoding::Encode<bool, D>,
35360    > fidl::encoding::Encode<UpdatePolicy, D> for (T0, T1)
35361    {
35362        #[inline]
35363        unsafe fn encode(
35364            self,
35365            encoder: &mut fidl::encoding::Encoder<'_, D>,
35366            offset: usize,
35367            depth: fidl::encoding::Depth,
35368        ) -> fidl::Result<()> {
35369            encoder.debug_check_bounds::<UpdatePolicy>(offset);
35370            // Zero out padding regions. There's no need to apply masks
35371            // because the unmasked parts will be overwritten by fields.
35372            // Write the fields.
35373            self.0.encode(encoder, offset + 0, depth)?;
35374            self.1.encode(encoder, offset + 1, depth)?;
35375            Ok(())
35376        }
35377    }
35378
35379    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UpdatePolicy {
35380        #[inline(always)]
35381        fn new_empty() -> Self {
35382            Self {
35383                fetch_if_absent: fidl::new_empty!(bool, D),
35384                allow_old_versions: fidl::new_empty!(bool, D),
35385            }
35386        }
35387
35388        #[inline]
35389        unsafe fn decode(
35390            &mut self,
35391            decoder: &mut fidl::encoding::Decoder<'_, D>,
35392            offset: usize,
35393            _depth: fidl::encoding::Depth,
35394        ) -> fidl::Result<()> {
35395            decoder.debug_check_bounds::<Self>(offset);
35396            // Verify that padding bytes are zero.
35397            fidl::decode!(bool, D, &mut self.fetch_if_absent, decoder, offset + 0, _depth)?;
35398            fidl::decode!(bool, D, &mut self.allow_old_versions, decoder, offset + 1, _depth)?;
35399            Ok(())
35400        }
35401    }
35402
35403    impl fidl::encoding::ValueTypeMarker for VectorOfByteVector {
35404        type Borrowed<'a> = &'a Self;
35405        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35406            value
35407        }
35408    }
35409
35410    unsafe impl fidl::encoding::TypeMarker for VectorOfByteVector {
35411        type Owned = Self;
35412
35413        #[inline(always)]
35414        fn inline_align(_context: fidl::encoding::Context) -> usize {
35415            8
35416        }
35417
35418        #[inline(always)]
35419        fn inline_size(_context: fidl::encoding::Context) -> usize {
35420            16
35421        }
35422    }
35423
35424    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfByteVector, D>
35425        for &VectorOfByteVector
35426    {
35427        #[inline]
35428        unsafe fn encode(
35429            self,
35430            encoder: &mut fidl::encoding::Encoder<'_, D>,
35431            offset: usize,
35432            _depth: fidl::encoding::Depth,
35433        ) -> fidl::Result<()> {
35434            encoder.debug_check_bounds::<VectorOfByteVector>(offset);
35435            // Delegate to tuple encoding.
35436            fidl::encoding::Encode::<VectorOfByteVector, D>::encode(
35437                (
35438                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35439                ),
35440                encoder, offset, _depth
35441            )
35442        }
35443    }
35444    unsafe impl<
35445        D: fidl::encoding::ResourceDialect,
35446        T0: fidl::encoding::Encode<
35447                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
35448                D,
35449            >,
35450    > fidl::encoding::Encode<VectorOfByteVector, D> for (T0,)
35451    {
35452        #[inline]
35453        unsafe fn encode(
35454            self,
35455            encoder: &mut fidl::encoding::Encoder<'_, D>,
35456            offset: usize,
35457            depth: fidl::encoding::Depth,
35458        ) -> fidl::Result<()> {
35459            encoder.debug_check_bounds::<VectorOfByteVector>(offset);
35460            // Zero out padding regions. There's no need to apply masks
35461            // because the unmasked parts will be overwritten by fields.
35462            // Write the fields.
35463            self.0.encode(encoder, offset + 0, depth)?;
35464            Ok(())
35465        }
35466    }
35467
35468    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfByteVector {
35469        #[inline(always)]
35470        fn new_empty() -> Self {
35471            Self {
35472                v: fidl::new_empty!(
35473                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
35474                    D
35475                ),
35476            }
35477        }
35478
35479        #[inline]
35480        unsafe fn decode(
35481            &mut self,
35482            decoder: &mut fidl::encoding::Decoder<'_, D>,
35483            offset: usize,
35484            _depth: fidl::encoding::Depth,
35485        ) -> fidl::Result<()> {
35486            decoder.debug_check_bounds::<Self>(offset);
35487            // Verify that padding bytes are zero.
35488            fidl::decode!(
35489                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
35490                D,
35491                &mut self.v,
35492                decoder,
35493                offset + 0,
35494                _depth
35495            )?;
35496            Ok(())
35497        }
35498    }
35499
35500    impl fidl::encoding::ValueTypeMarker for VectorOfEnumStruct {
35501        type Borrowed<'a> = &'a Self;
35502        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35503            value
35504        }
35505    }
35506
35507    unsafe impl fidl::encoding::TypeMarker for VectorOfEnumStruct {
35508        type Owned = Self;
35509
35510        #[inline(always)]
35511        fn inline_align(_context: fidl::encoding::Context) -> usize {
35512            8
35513        }
35514
35515        #[inline(always)]
35516        fn inline_size(_context: fidl::encoding::Context) -> usize {
35517            16
35518        }
35519    }
35520
35521    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfEnumStruct, D>
35522        for &VectorOfEnumStruct
35523    {
35524        #[inline]
35525        unsafe fn encode(
35526            self,
35527            encoder: &mut fidl::encoding::Encoder<'_, D>,
35528            offset: usize,
35529            _depth: fidl::encoding::Depth,
35530        ) -> fidl::Result<()> {
35531            encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
35532            // Delegate to tuple encoding.
35533            fidl::encoding::Encode::<VectorOfEnumStruct, D>::encode(
35534                (
35535                    <fidl::encoding::UnboundedVector<StrictEnumInt16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35536                ),
35537                encoder, offset, _depth
35538            )
35539        }
35540    }
35541    unsafe impl<
35542        D: fidl::encoding::ResourceDialect,
35543        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StrictEnumInt16>, D>,
35544    > fidl::encoding::Encode<VectorOfEnumStruct, D> for (T0,)
35545    {
35546        #[inline]
35547        unsafe fn encode(
35548            self,
35549            encoder: &mut fidl::encoding::Encoder<'_, D>,
35550            offset: usize,
35551            depth: fidl::encoding::Depth,
35552        ) -> fidl::Result<()> {
35553            encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
35554            // Zero out padding regions. There's no need to apply masks
35555            // because the unmasked parts will be overwritten by fields.
35556            // Write the fields.
35557            self.0.encode(encoder, offset + 0, depth)?;
35558            Ok(())
35559        }
35560    }
35561
35562    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfEnumStruct {
35563        #[inline(always)]
35564        fn new_empty() -> Self {
35565            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<StrictEnumInt16>, D) }
35566        }
35567
35568        #[inline]
35569        unsafe fn decode(
35570            &mut self,
35571            decoder: &mut fidl::encoding::Decoder<'_, D>,
35572            offset: usize,
35573            _depth: fidl::encoding::Depth,
35574        ) -> fidl::Result<()> {
35575            decoder.debug_check_bounds::<Self>(offset);
35576            // Verify that padding bytes are zero.
35577            fidl::decode!(
35578                fidl::encoding::UnboundedVector<StrictEnumInt16>,
35579                D,
35580                &mut self.v,
35581                decoder,
35582                offset + 0,
35583                _depth
35584            )?;
35585            Ok(())
35586        }
35587    }
35588
35589    impl fidl::encoding::ValueTypeMarker for VectorOfStrings {
35590        type Borrowed<'a> = &'a Self;
35591        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35592            value
35593        }
35594    }
35595
35596    unsafe impl fidl::encoding::TypeMarker for VectorOfStrings {
35597        type Owned = Self;
35598
35599        #[inline(always)]
35600        fn inline_align(_context: fidl::encoding::Context) -> usize {
35601            8
35602        }
35603
35604        #[inline(always)]
35605        fn inline_size(_context: fidl::encoding::Context) -> usize {
35606            16
35607        }
35608    }
35609
35610    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfStrings, D>
35611        for &VectorOfStrings
35612    {
35613        #[inline]
35614        unsafe fn encode(
35615            self,
35616            encoder: &mut fidl::encoding::Encoder<'_, D>,
35617            offset: usize,
35618            _depth: fidl::encoding::Depth,
35619        ) -> fidl::Result<()> {
35620            encoder.debug_check_bounds::<VectorOfStrings>(offset);
35621            // Delegate to tuple encoding.
35622            fidl::encoding::Encode::<VectorOfStrings, D>::encode(
35623                (
35624                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35625                ),
35626                encoder, offset, _depth
35627            )
35628        }
35629    }
35630    unsafe impl<
35631        D: fidl::encoding::ResourceDialect,
35632        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
35633    > fidl::encoding::Encode<VectorOfStrings, D> for (T0,)
35634    {
35635        #[inline]
35636        unsafe fn encode(
35637            self,
35638            encoder: &mut fidl::encoding::Encoder<'_, D>,
35639            offset: usize,
35640            depth: fidl::encoding::Depth,
35641        ) -> fidl::Result<()> {
35642            encoder.debug_check_bounds::<VectorOfStrings>(offset);
35643            // Zero out padding regions. There's no need to apply masks
35644            // because the unmasked parts will be overwritten by fields.
35645            // Write the fields.
35646            self.0.encode(encoder, offset + 0, depth)?;
35647            Ok(())
35648        }
35649    }
35650
35651    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfStrings {
35652        #[inline(always)]
35653        fn new_empty() -> Self {
35654            Self {
35655                v: fidl::new_empty!(
35656                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35657                    D
35658                ),
35659            }
35660        }
35661
35662        #[inline]
35663        unsafe fn decode(
35664            &mut self,
35665            decoder: &mut fidl::encoding::Decoder<'_, D>,
35666            offset: usize,
35667            _depth: fidl::encoding::Depth,
35668        ) -> fidl::Result<()> {
35669            decoder.debug_check_bounds::<Self>(offset);
35670            // Verify that padding bytes are zero.
35671            fidl::decode!(
35672                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35673                D,
35674                &mut self.v,
35675                decoder,
35676                offset + 0,
35677                _depth
35678            )?;
35679            Ok(())
35680        }
35681    }
35682
35683    impl fidl::encoding::ValueTypeMarker for VectorWithLimit {
35684        type Borrowed<'a> = &'a Self;
35685        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35686            value
35687        }
35688    }
35689
35690    unsafe impl fidl::encoding::TypeMarker for VectorWithLimit {
35691        type Owned = Self;
35692
35693        #[inline(always)]
35694        fn inline_align(_context: fidl::encoding::Context) -> usize {
35695            8
35696        }
35697
35698        #[inline(always)]
35699        fn inline_size(_context: fidl::encoding::Context) -> usize {
35700            16
35701        }
35702    }
35703
35704    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWithLimit, D>
35705        for &VectorWithLimit
35706    {
35707        #[inline]
35708        unsafe fn encode(
35709            self,
35710            encoder: &mut fidl::encoding::Encoder<'_, D>,
35711            offset: usize,
35712            _depth: fidl::encoding::Depth,
35713        ) -> fidl::Result<()> {
35714            encoder.debug_check_bounds::<VectorWithLimit>(offset);
35715            // Delegate to tuple encoding.
35716            fidl::encoding::Encode::<VectorWithLimit, D>::encode(
35717                (<fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow(
35718                    &self.v,
35719                ),),
35720                encoder,
35721                offset,
35722                _depth,
35723            )
35724        }
35725    }
35726    unsafe impl<
35727        D: fidl::encoding::ResourceDialect,
35728        T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 2>, D>,
35729    > fidl::encoding::Encode<VectorWithLimit, D> for (T0,)
35730    {
35731        #[inline]
35732        unsafe fn encode(
35733            self,
35734            encoder: &mut fidl::encoding::Encoder<'_, D>,
35735            offset: usize,
35736            depth: fidl::encoding::Depth,
35737        ) -> fidl::Result<()> {
35738            encoder.debug_check_bounds::<VectorWithLimit>(offset);
35739            // Zero out padding regions. There's no need to apply masks
35740            // because the unmasked parts will be overwritten by fields.
35741            // Write the fields.
35742            self.0.encode(encoder, offset + 0, depth)?;
35743            Ok(())
35744        }
35745    }
35746
35747    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWithLimit {
35748        #[inline(always)]
35749        fn new_empty() -> Self {
35750            Self { v: fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D) }
35751        }
35752
35753        #[inline]
35754        unsafe fn decode(
35755            &mut self,
35756            decoder: &mut fidl::encoding::Decoder<'_, D>,
35757            offset: usize,
35758            _depth: fidl::encoding::Depth,
35759        ) -> fidl::Result<()> {
35760            decoder.debug_check_bounds::<Self>(offset);
35761            // Verify that padding bytes are zero.
35762            fidl::decode!(fidl::encoding::Vector<u8, 2>, D, &mut self.v, decoder, offset + 0, _depth)?;
35763            Ok(())
35764        }
35765    }
35766
35767    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInArray {
35768        type Borrowed<'a> = &'a Self;
35769        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35770            value
35771        }
35772    }
35773
35774    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInArray {
35775        type Owned = Self;
35776
35777        #[inline(always)]
35778        fn inline_align(_context: fidl::encoding::Context) -> usize {
35779            8
35780        }
35781
35782        #[inline(always)]
35783        fn inline_size(_context: fidl::encoding::Context) -> usize {
35784            32
35785        }
35786    }
35787
35788    unsafe impl<D: fidl::encoding::ResourceDialect>
35789        fidl::encoding::Encode<VectorWithLimitInArray, D> for &VectorWithLimitInArray
35790    {
35791        #[inline]
35792        unsafe fn encode(
35793            self,
35794            encoder: &mut fidl::encoding::Encoder<'_, D>,
35795            offset: usize,
35796            _depth: fidl::encoding::Depth,
35797        ) -> fidl::Result<()> {
35798            encoder.debug_check_bounds::<VectorWithLimitInArray>(offset);
35799            // Delegate to tuple encoding.
35800            fidl::encoding::Encode::<VectorWithLimitInArray, D>::encode(
35801                (
35802                    <fidl::encoding::Array<
35803                        fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>,
35804                        2,
35805                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
35806                ),
35807                encoder,
35808                offset,
35809                _depth,
35810            )
35811        }
35812    }
35813    unsafe impl<
35814        D: fidl::encoding::ResourceDialect,
35815        T0: fidl::encoding::Encode<
35816                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>, 2>,
35817                D,
35818            >,
35819    > fidl::encoding::Encode<VectorWithLimitInArray, D> for (T0,)
35820    {
35821        #[inline]
35822        unsafe fn encode(
35823            self,
35824            encoder: &mut fidl::encoding::Encoder<'_, D>,
35825            offset: usize,
35826            depth: fidl::encoding::Depth,
35827        ) -> fidl::Result<()> {
35828            encoder.debug_check_bounds::<VectorWithLimitInArray>(offset);
35829            // Zero out padding regions. There's no need to apply masks
35830            // because the unmasked parts will be overwritten by fields.
35831            // Write the fields.
35832            self.0.encode(encoder, offset + 0, depth)?;
35833            Ok(())
35834        }
35835    }
35836
35837    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35838        for VectorWithLimitInArray
35839    {
35840        #[inline(always)]
35841        fn new_empty() -> Self {
35842            Self {
35843                a: fidl::new_empty!(
35844                    fidl::encoding::Array<
35845                        fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>,
35846                        2,
35847                    >,
35848                    D
35849                ),
35850            }
35851        }
35852
35853        #[inline]
35854        unsafe fn decode(
35855            &mut self,
35856            decoder: &mut fidl::encoding::Decoder<'_, D>,
35857            offset: usize,
35858            _depth: fidl::encoding::Depth,
35859        ) -> fidl::Result<()> {
35860            decoder.debug_check_bounds::<Self>(offset);
35861            // Verify that padding bytes are zero.
35862            fidl::decode!(
35863                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>, 2>,
35864                D,
35865                &mut self.a,
35866                decoder,
35867                offset + 0,
35868                _depth
35869            )?;
35870            Ok(())
35871        }
35872    }
35873
35874    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInTable {
35875        type Borrowed<'a> = &'a Self;
35876        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35877            value
35878        }
35879    }
35880
35881    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInTable {
35882        type Owned = Self;
35883
35884        #[inline(always)]
35885        fn inline_align(_context: fidl::encoding::Context) -> usize {
35886            8
35887        }
35888
35889        #[inline(always)]
35890        fn inline_size(_context: fidl::encoding::Context) -> usize {
35891            16
35892        }
35893    }
35894
35895    unsafe impl<D: fidl::encoding::ResourceDialect>
35896        fidl::encoding::Encode<VectorWithLimitInTable, D> for &VectorWithLimitInTable
35897    {
35898        #[inline]
35899        unsafe fn encode(
35900            self,
35901            encoder: &mut fidl::encoding::Encoder<'_, D>,
35902            offset: usize,
35903            _depth: fidl::encoding::Depth,
35904        ) -> fidl::Result<()> {
35905            encoder.debug_check_bounds::<VectorWithLimitInTable>(offset);
35906            // Delegate to tuple encoding.
35907            fidl::encoding::Encode::<VectorWithLimitInTable, D>::encode(
35908                (<TableWithVectorWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
35909                encoder,
35910                offset,
35911                _depth,
35912            )
35913        }
35914    }
35915    unsafe impl<
35916        D: fidl::encoding::ResourceDialect,
35917        T0: fidl::encoding::Encode<TableWithVectorWithLimit, D>,
35918    > fidl::encoding::Encode<VectorWithLimitInTable, D> for (T0,)
35919    {
35920        #[inline]
35921        unsafe fn encode(
35922            self,
35923            encoder: &mut fidl::encoding::Encoder<'_, D>,
35924            offset: usize,
35925            depth: fidl::encoding::Depth,
35926        ) -> fidl::Result<()> {
35927            encoder.debug_check_bounds::<VectorWithLimitInTable>(offset);
35928            // Zero out padding regions. There's no need to apply masks
35929            // because the unmasked parts will be overwritten by fields.
35930            // Write the fields.
35931            self.0.encode(encoder, offset + 0, depth)?;
35932            Ok(())
35933        }
35934    }
35935
35936    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35937        for VectorWithLimitInTable
35938    {
35939        #[inline(always)]
35940        fn new_empty() -> Self {
35941            Self { t: fidl::new_empty!(TableWithVectorWithLimit, D) }
35942        }
35943
35944        #[inline]
35945        unsafe fn decode(
35946            &mut self,
35947            decoder: &mut fidl::encoding::Decoder<'_, D>,
35948            offset: usize,
35949            _depth: fidl::encoding::Depth,
35950        ) -> fidl::Result<()> {
35951            decoder.debug_check_bounds::<Self>(offset);
35952            // Verify that padding bytes are zero.
35953            fidl::decode!(TableWithVectorWithLimit, D, &mut self.t, decoder, offset + 0, _depth)?;
35954            Ok(())
35955        }
35956    }
35957
35958    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInUnion {
35959        type Borrowed<'a> = &'a Self;
35960        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35961            value
35962        }
35963    }
35964
35965    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInUnion {
35966        type Owned = Self;
35967
35968        #[inline(always)]
35969        fn inline_align(_context: fidl::encoding::Context) -> usize {
35970            8
35971        }
35972
35973        #[inline(always)]
35974        fn inline_size(_context: fidl::encoding::Context) -> usize {
35975            16
35976        }
35977    }
35978
35979    unsafe impl<D: fidl::encoding::ResourceDialect>
35980        fidl::encoding::Encode<VectorWithLimitInUnion, D> for &VectorWithLimitInUnion
35981    {
35982        #[inline]
35983        unsafe fn encode(
35984            self,
35985            encoder: &mut fidl::encoding::Encoder<'_, D>,
35986            offset: usize,
35987            _depth: fidl::encoding::Depth,
35988        ) -> fidl::Result<()> {
35989            encoder.debug_check_bounds::<VectorWithLimitInUnion>(offset);
35990            // Delegate to tuple encoding.
35991            fidl::encoding::Encode::<VectorWithLimitInUnion, D>::encode(
35992                (<UnionWithVectorWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
35993                encoder,
35994                offset,
35995                _depth,
35996            )
35997        }
35998    }
35999    unsafe impl<
36000        D: fidl::encoding::ResourceDialect,
36001        T0: fidl::encoding::Encode<UnionWithVectorWithLimit, D>,
36002    > fidl::encoding::Encode<VectorWithLimitInUnion, D> for (T0,)
36003    {
36004        #[inline]
36005        unsafe fn encode(
36006            self,
36007            encoder: &mut fidl::encoding::Encoder<'_, D>,
36008            offset: usize,
36009            depth: fidl::encoding::Depth,
36010        ) -> fidl::Result<()> {
36011            encoder.debug_check_bounds::<VectorWithLimitInUnion>(offset);
36012            // Zero out padding regions. There's no need to apply masks
36013            // because the unmasked parts will be overwritten by fields.
36014            // Write the fields.
36015            self.0.encode(encoder, offset + 0, depth)?;
36016            Ok(())
36017        }
36018    }
36019
36020    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36021        for VectorWithLimitInUnion
36022    {
36023        #[inline(always)]
36024        fn new_empty() -> Self {
36025            Self { u: fidl::new_empty!(UnionWithVectorWithLimit, D) }
36026        }
36027
36028        #[inline]
36029        unsafe fn decode(
36030            &mut self,
36031            decoder: &mut fidl::encoding::Decoder<'_, D>,
36032            offset: usize,
36033            _depth: fidl::encoding::Depth,
36034        ) -> fidl::Result<()> {
36035            decoder.debug_check_bounds::<Self>(offset);
36036            // Verify that padding bytes are zero.
36037            fidl::decode!(UnionWithVectorWithLimit, D, &mut self.u, decoder, offset + 0, _depth)?;
36038            Ok(())
36039        }
36040    }
36041
36042    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInVector {
36043        type Borrowed<'a> = &'a Self;
36044        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36045            value
36046        }
36047    }
36048
36049    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInVector {
36050        type Owned = Self;
36051
36052        #[inline(always)]
36053        fn inline_align(_context: fidl::encoding::Context) -> usize {
36054            8
36055        }
36056
36057        #[inline(always)]
36058        fn inline_size(_context: fidl::encoding::Context) -> usize {
36059            16
36060        }
36061    }
36062
36063    unsafe impl<D: fidl::encoding::ResourceDialect>
36064        fidl::encoding::Encode<VectorWithLimitInVector, D> for &VectorWithLimitInVector
36065    {
36066        #[inline]
36067        unsafe fn encode(
36068            self,
36069            encoder: &mut fidl::encoding::Encoder<'_, D>,
36070            offset: usize,
36071            _depth: fidl::encoding::Depth,
36072        ) -> fidl::Result<()> {
36073            encoder.debug_check_bounds::<VectorWithLimitInVector>(offset);
36074            // Delegate to tuple encoding.
36075            fidl::encoding::Encode::<VectorWithLimitInVector, D>::encode(
36076                (
36077                    <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
36078                ),
36079                encoder, offset, _depth
36080            )
36081        }
36082    }
36083    unsafe impl<
36084        D: fidl::encoding::ResourceDialect,
36085        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>, D>,
36086    > fidl::encoding::Encode<VectorWithLimitInVector, D> for (T0,)
36087    {
36088        #[inline]
36089        unsafe fn encode(
36090            self,
36091            encoder: &mut fidl::encoding::Encoder<'_, D>,
36092            offset: usize,
36093            depth: fidl::encoding::Depth,
36094        ) -> fidl::Result<()> {
36095            encoder.debug_check_bounds::<VectorWithLimitInVector>(offset);
36096            // Zero out padding regions. There's no need to apply masks
36097            // because the unmasked parts will be overwritten by fields.
36098            // Write the fields.
36099            self.0.encode(encoder, offset + 0, depth)?;
36100            Ok(())
36101        }
36102    }
36103
36104    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36105        for VectorWithLimitInVector
36106    {
36107        #[inline(always)]
36108        fn new_empty() -> Self {
36109            Self {
36110                v: fidl::new_empty!(
36111                    fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
36112                    D
36113                ),
36114            }
36115        }
36116
36117        #[inline]
36118        unsafe fn decode(
36119            &mut self,
36120            decoder: &mut fidl::encoding::Decoder<'_, D>,
36121            offset: usize,
36122            _depth: fidl::encoding::Depth,
36123        ) -> fidl::Result<()> {
36124            decoder.debug_check_bounds::<Self>(offset);
36125            // Verify that padding bytes are zero.
36126            fidl::decode!(
36127                fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
36128                D,
36129                &mut self.v,
36130                decoder,
36131                offset + 0,
36132                _depth
36133            )?;
36134            Ok(())
36135        }
36136    }
36137
36138    impl fidl::encoding::ValueTypeMarker for VectorWrapper {
36139        type Borrowed<'a> = &'a Self;
36140        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36141            value
36142        }
36143    }
36144
36145    unsafe impl fidl::encoding::TypeMarker for VectorWrapper {
36146        type Owned = Self;
36147
36148        #[inline(always)]
36149        fn inline_align(_context: fidl::encoding::Context) -> usize {
36150            8
36151        }
36152
36153        #[inline(always)]
36154        fn inline_size(_context: fidl::encoding::Context) -> usize {
36155            16
36156        }
36157    }
36158
36159    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWrapper, D>
36160        for &VectorWrapper
36161    {
36162        #[inline]
36163        unsafe fn encode(
36164            self,
36165            encoder: &mut fidl::encoding::Encoder<'_, D>,
36166            offset: usize,
36167            _depth: fidl::encoding::Depth,
36168        ) -> fidl::Result<()> {
36169            encoder.debug_check_bounds::<VectorWrapper>(offset);
36170            // Delegate to tuple encoding.
36171            fidl::encoding::Encode::<VectorWrapper, D>::encode(
36172                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
36173                    &self.v,
36174                ),),
36175                encoder,
36176                offset,
36177                _depth,
36178            )
36179        }
36180    }
36181    unsafe impl<
36182        D: fidl::encoding::ResourceDialect,
36183        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
36184    > fidl::encoding::Encode<VectorWrapper, D> for (T0,)
36185    {
36186        #[inline]
36187        unsafe fn encode(
36188            self,
36189            encoder: &mut fidl::encoding::Encoder<'_, D>,
36190            offset: usize,
36191            depth: fidl::encoding::Depth,
36192        ) -> fidl::Result<()> {
36193            encoder.debug_check_bounds::<VectorWrapper>(offset);
36194            // Zero out padding regions. There's no need to apply masks
36195            // because the unmasked parts will be overwritten by fields.
36196            // Write the fields.
36197            self.0.encode(encoder, offset + 0, depth)?;
36198            Ok(())
36199        }
36200    }
36201
36202    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWrapper {
36203        #[inline(always)]
36204        fn new_empty() -> Self {
36205            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
36206        }
36207
36208        #[inline]
36209        unsafe fn decode(
36210            &mut self,
36211            decoder: &mut fidl::encoding::Decoder<'_, D>,
36212            offset: usize,
36213            _depth: fidl::encoding::Depth,
36214        ) -> fidl::Result<()> {
36215            decoder.debug_check_bounds::<Self>(offset);
36216            // Verify that padding bytes are zero.
36217            fidl::decode!(
36218                fidl::encoding::UnboundedVector<u8>,
36219                D,
36220                &mut self.v,
36221                decoder,
36222                offset + 0,
36223                _depth
36224            )?;
36225            Ok(())
36226        }
36227    }
36228
36229    impl fidl::encoding::ValueTypeMarker for XUnionWithStructStruct {
36230        type Borrowed<'a> = &'a Self;
36231        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36232            value
36233        }
36234    }
36235
36236    unsafe impl fidl::encoding::TypeMarker for XUnionWithStructStruct {
36237        type Owned = Self;
36238
36239        #[inline(always)]
36240        fn inline_align(_context: fidl::encoding::Context) -> usize {
36241            8
36242        }
36243
36244        #[inline(always)]
36245        fn inline_size(_context: fidl::encoding::Context) -> usize {
36246            16
36247        }
36248    }
36249
36250    unsafe impl<D: fidl::encoding::ResourceDialect>
36251        fidl::encoding::Encode<XUnionWithStructStruct, D> for &XUnionWithStructStruct
36252    {
36253        #[inline]
36254        unsafe fn encode(
36255            self,
36256            encoder: &mut fidl::encoding::Encoder<'_, D>,
36257            offset: usize,
36258            _depth: fidl::encoding::Depth,
36259        ) -> fidl::Result<()> {
36260            encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
36261            // Delegate to tuple encoding.
36262            fidl::encoding::Encode::<XUnionWithStructStruct, D>::encode(
36263                (<XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
36264                encoder,
36265                offset,
36266                _depth,
36267            )
36268        }
36269    }
36270    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithStruct, D>>
36271        fidl::encoding::Encode<XUnionWithStructStruct, D> for (T0,)
36272    {
36273        #[inline]
36274        unsafe fn encode(
36275            self,
36276            encoder: &mut fidl::encoding::Encoder<'_, D>,
36277            offset: usize,
36278            depth: fidl::encoding::Depth,
36279        ) -> fidl::Result<()> {
36280            encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
36281            // Zero out padding regions. There's no need to apply masks
36282            // because the unmasked parts will be overwritten by fields.
36283            // Write the fields.
36284            self.0.encode(encoder, offset + 0, depth)?;
36285            Ok(())
36286        }
36287    }
36288
36289    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36290        for XUnionWithStructStruct
36291    {
36292        #[inline(always)]
36293        fn new_empty() -> Self {
36294            Self { xu: fidl::new_empty!(XUnionWithStruct, D) }
36295        }
36296
36297        #[inline]
36298        unsafe fn decode(
36299            &mut self,
36300            decoder: &mut fidl::encoding::Decoder<'_, D>,
36301            offset: usize,
36302            _depth: fidl::encoding::Depth,
36303        ) -> fidl::Result<()> {
36304            decoder.debug_check_bounds::<Self>(offset);
36305            // Verify that padding bytes are zero.
36306            fidl::decode!(XUnionWithStruct, D, &mut self.xu, decoder, offset + 0, _depth)?;
36307            Ok(())
36308        }
36309    }
36310
36311    impl fidl::encoding::ValueTypeMarker for XUnionWithXUnionStruct {
36312        type Borrowed<'a> = &'a Self;
36313        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36314            value
36315        }
36316    }
36317
36318    unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnionStruct {
36319        type Owned = Self;
36320
36321        #[inline(always)]
36322        fn inline_align(_context: fidl::encoding::Context) -> usize {
36323            8
36324        }
36325
36326        #[inline(always)]
36327        fn inline_size(_context: fidl::encoding::Context) -> usize {
36328            16
36329        }
36330    }
36331
36332    unsafe impl<D: fidl::encoding::ResourceDialect>
36333        fidl::encoding::Encode<XUnionWithXUnionStruct, D> for &XUnionWithXUnionStruct
36334    {
36335        #[inline]
36336        unsafe fn encode(
36337            self,
36338            encoder: &mut fidl::encoding::Encoder<'_, D>,
36339            offset: usize,
36340            _depth: fidl::encoding::Depth,
36341        ) -> fidl::Result<()> {
36342            encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
36343            // Delegate to tuple encoding.
36344            fidl::encoding::Encode::<XUnionWithXUnionStruct, D>::encode(
36345                (<XUnionWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
36346                encoder,
36347                offset,
36348                _depth,
36349            )
36350        }
36351    }
36352    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithXUnion, D>>
36353        fidl::encoding::Encode<XUnionWithXUnionStruct, D> for (T0,)
36354    {
36355        #[inline]
36356        unsafe fn encode(
36357            self,
36358            encoder: &mut fidl::encoding::Encoder<'_, D>,
36359            offset: usize,
36360            depth: fidl::encoding::Depth,
36361        ) -> fidl::Result<()> {
36362            encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
36363            // Zero out padding regions. There's no need to apply masks
36364            // because the unmasked parts will be overwritten by fields.
36365            // Write the fields.
36366            self.0.encode(encoder, offset + 0, depth)?;
36367            Ok(())
36368        }
36369    }
36370
36371    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36372        for XUnionWithXUnionStruct
36373    {
36374        #[inline(always)]
36375        fn new_empty() -> Self {
36376            Self { xu: fidl::new_empty!(XUnionWithXUnion, D) }
36377        }
36378
36379        #[inline]
36380        unsafe fn decode(
36381            &mut self,
36382            decoder: &mut fidl::encoding::Decoder<'_, D>,
36383            offset: usize,
36384            _depth: fidl::encoding::Depth,
36385        ) -> fidl::Result<()> {
36386            decoder.debug_check_bounds::<Self>(offset);
36387            // Verify that padding bytes are zero.
36388            fidl::decode!(XUnionWithXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
36389            Ok(())
36390        }
36391    }
36392
36393    impl CompatTableString {
36394        #[inline(always)]
36395        fn max_ordinal_present(&self) -> u64 {
36396            if let Some(_) = self.s {
36397                return 1;
36398            }
36399            0
36400        }
36401    }
36402
36403    impl fidl::encoding::ValueTypeMarker for CompatTableString {
36404        type Borrowed<'a> = &'a Self;
36405        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36406            value
36407        }
36408    }
36409
36410    unsafe impl fidl::encoding::TypeMarker for CompatTableString {
36411        type Owned = Self;
36412
36413        #[inline(always)]
36414        fn inline_align(_context: fidl::encoding::Context) -> usize {
36415            8
36416        }
36417
36418        #[inline(always)]
36419        fn inline_size(_context: fidl::encoding::Context) -> usize {
36420            16
36421        }
36422    }
36423
36424    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableString, D>
36425        for &CompatTableString
36426    {
36427        unsafe fn encode(
36428            self,
36429            encoder: &mut fidl::encoding::Encoder<'_, D>,
36430            offset: usize,
36431            mut depth: fidl::encoding::Depth,
36432        ) -> fidl::Result<()> {
36433            encoder.debug_check_bounds::<CompatTableString>(offset);
36434            // Vector header
36435            let max_ordinal: u64 = self.max_ordinal_present();
36436            encoder.write_num(max_ordinal, offset);
36437            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36438            // Calling encoder.out_of_line_offset(0) is not allowed.
36439            if max_ordinal == 0 {
36440                return Ok(());
36441            }
36442            depth.increment()?;
36443            let envelope_size = 8;
36444            let bytes_len = max_ordinal as usize * envelope_size;
36445            #[allow(unused_variables)]
36446            let offset = encoder.out_of_line_offset(bytes_len);
36447            let mut _prev_end_offset: usize = 0;
36448            if 1 > max_ordinal {
36449                return Ok(());
36450            }
36451
36452            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36453            // are envelope_size bytes.
36454            let cur_offset: usize = (1 - 1) * envelope_size;
36455
36456            // Zero reserved fields.
36457            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36458
36459            // Safety:
36460            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36461            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36462            //   envelope_size bytes, there is always sufficient room.
36463            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
36464                self.s.as_ref().map(
36465                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
36466                ),
36467                encoder,
36468                offset + cur_offset,
36469                depth,
36470            )?;
36471
36472            _prev_end_offset = cur_offset + envelope_size;
36473
36474            Ok(())
36475        }
36476    }
36477
36478    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableString {
36479        #[inline(always)]
36480        fn new_empty() -> Self {
36481            Self::default()
36482        }
36483
36484        unsafe fn decode(
36485            &mut self,
36486            decoder: &mut fidl::encoding::Decoder<'_, D>,
36487            offset: usize,
36488            mut depth: fidl::encoding::Depth,
36489        ) -> fidl::Result<()> {
36490            decoder.debug_check_bounds::<Self>(offset);
36491            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36492                None => return Err(fidl::Error::NotNullable),
36493                Some(len) => len,
36494            };
36495            // Calling decoder.out_of_line_offset(0) is not allowed.
36496            if len == 0 {
36497                return Ok(());
36498            };
36499            depth.increment()?;
36500            let envelope_size = 8;
36501            let bytes_len = len * envelope_size;
36502            let offset = decoder.out_of_line_offset(bytes_len)?;
36503            // Decode the envelope for each type.
36504            let mut _next_ordinal_to_read = 0;
36505            let mut next_offset = offset;
36506            let end_offset = offset + bytes_len;
36507            _next_ordinal_to_read += 1;
36508            if next_offset >= end_offset {
36509                return Ok(());
36510            }
36511
36512            // Decode unknown envelopes for gaps in ordinals.
36513            while _next_ordinal_to_read < 1 {
36514                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36515                _next_ordinal_to_read += 1;
36516                next_offset += envelope_size;
36517            }
36518
36519            let next_out_of_line = decoder.next_out_of_line();
36520            let handles_before = decoder.remaining_handles();
36521            if let Some((inlined, num_bytes, num_handles)) =
36522                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36523            {
36524                let member_inline_size =
36525                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
36526                        decoder.context,
36527                    );
36528                if inlined != (member_inline_size <= 4) {
36529                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36530                }
36531                let inner_offset;
36532                let mut inner_depth = depth.clone();
36533                if inlined {
36534                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36535                    inner_offset = next_offset;
36536                } else {
36537                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36538                    inner_depth.increment()?;
36539                }
36540                let val_ref = self
36541                    .s
36542                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
36543                fidl::decode!(
36544                    fidl::encoding::UnboundedString,
36545                    D,
36546                    val_ref,
36547                    decoder,
36548                    inner_offset,
36549                    inner_depth
36550                )?;
36551                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36552                {
36553                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36554                }
36555                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36556                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36557                }
36558            }
36559
36560            next_offset += envelope_size;
36561
36562            // Decode the remaining unknown envelopes.
36563            while next_offset < end_offset {
36564                _next_ordinal_to_read += 1;
36565                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36566                next_offset += envelope_size;
36567            }
36568
36569            Ok(())
36570        }
36571    }
36572
36573    impl CompatTableValue {
36574        #[inline(always)]
36575        fn max_ordinal_present(&self) -> u64 {
36576            if let Some(_) = self.xunion_member {
36577                return 4;
36578            }
36579            if let Some(_) = self.table_member {
36580                return 3;
36581            }
36582            if let Some(_) = self.array_member {
36583                return 2;
36584            }
36585            if let Some(_) = self.union_member {
36586                return 1;
36587            }
36588            0
36589        }
36590    }
36591
36592    impl fidl::encoding::ValueTypeMarker for CompatTableValue {
36593        type Borrowed<'a> = &'a Self;
36594        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36595            value
36596        }
36597    }
36598
36599    unsafe impl fidl::encoding::TypeMarker for CompatTableValue {
36600        type Owned = Self;
36601
36602        #[inline(always)]
36603        fn inline_align(_context: fidl::encoding::Context) -> usize {
36604            8
36605        }
36606
36607        #[inline(always)]
36608        fn inline_size(_context: fidl::encoding::Context) -> usize {
36609            16
36610        }
36611    }
36612
36613    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableValue, D>
36614        for &CompatTableValue
36615    {
36616        unsafe fn encode(
36617            self,
36618            encoder: &mut fidl::encoding::Encoder<'_, D>,
36619            offset: usize,
36620            mut depth: fidl::encoding::Depth,
36621        ) -> fidl::Result<()> {
36622            encoder.debug_check_bounds::<CompatTableValue>(offset);
36623            // Vector header
36624            let max_ordinal: u64 = self.max_ordinal_present();
36625            encoder.write_num(max_ordinal, offset);
36626            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36627            // Calling encoder.out_of_line_offset(0) is not allowed.
36628            if max_ordinal == 0 {
36629                return Ok(());
36630            }
36631            depth.increment()?;
36632            let envelope_size = 8;
36633            let bytes_len = max_ordinal as usize * envelope_size;
36634            #[allow(unused_variables)]
36635            let offset = encoder.out_of_line_offset(bytes_len);
36636            let mut _prev_end_offset: usize = 0;
36637            if 1 > max_ordinal {
36638                return Ok(());
36639            }
36640
36641            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36642            // are envelope_size bytes.
36643            let cur_offset: usize = (1 - 1) * envelope_size;
36644
36645            // Zero reserved fields.
36646            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36647
36648            // Safety:
36649            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36650            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36651            //   envelope_size bytes, there is always sufficient room.
36652            fidl::encoding::encode_in_envelope_optional::<CompatUnion, D>(
36653                self.union_member
36654                    .as_ref()
36655                    .map(<CompatUnion as fidl::encoding::ValueTypeMarker>::borrow),
36656                encoder,
36657                offset + cur_offset,
36658                depth,
36659            )?;
36660
36661            _prev_end_offset = cur_offset + envelope_size;
36662            if 2 > max_ordinal {
36663                return Ok(());
36664            }
36665
36666            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36667            // are envelope_size bytes.
36668            let cur_offset: usize = (2 - 1) * envelope_size;
36669
36670            // Zero reserved fields.
36671            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36672
36673            // Safety:
36674            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36675            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36676            //   envelope_size bytes, there is always sufficient room.
36677            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u32, 3>, D>(
36678                self.array_member.as_ref().map(
36679                    <fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow,
36680                ),
36681                encoder,
36682                offset + cur_offset,
36683                depth,
36684            )?;
36685
36686            _prev_end_offset = cur_offset + envelope_size;
36687            if 3 > max_ordinal {
36688                return Ok(());
36689            }
36690
36691            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36692            // are envelope_size bytes.
36693            let cur_offset: usize = (3 - 1) * envelope_size;
36694
36695            // Zero reserved fields.
36696            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36697
36698            // Safety:
36699            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36700            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36701            //   envelope_size bytes, there is always sufficient room.
36702            fidl::encoding::encode_in_envelope_optional::<CompatTableString, D>(
36703                self.table_member
36704                    .as_ref()
36705                    .map(<CompatTableString as fidl::encoding::ValueTypeMarker>::borrow),
36706                encoder,
36707                offset + cur_offset,
36708                depth,
36709            )?;
36710
36711            _prev_end_offset = cur_offset + envelope_size;
36712            if 4 > max_ordinal {
36713                return Ok(());
36714            }
36715
36716            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36717            // are envelope_size bytes.
36718            let cur_offset: usize = (4 - 1) * envelope_size;
36719
36720            // Zero reserved fields.
36721            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36722
36723            // Safety:
36724            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36725            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36726            //   envelope_size bytes, there is always sufficient room.
36727            fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
36728                self.xunion_member
36729                    .as_ref()
36730                    .map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
36731                encoder,
36732                offset + cur_offset,
36733                depth,
36734            )?;
36735
36736            _prev_end_offset = cur_offset + envelope_size;
36737
36738            Ok(())
36739        }
36740    }
36741
36742    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableValue {
36743        #[inline(always)]
36744        fn new_empty() -> Self {
36745            Self::default()
36746        }
36747
36748        unsafe fn decode(
36749            &mut self,
36750            decoder: &mut fidl::encoding::Decoder<'_, D>,
36751            offset: usize,
36752            mut depth: fidl::encoding::Depth,
36753        ) -> fidl::Result<()> {
36754            decoder.debug_check_bounds::<Self>(offset);
36755            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36756                None => return Err(fidl::Error::NotNullable),
36757                Some(len) => len,
36758            };
36759            // Calling decoder.out_of_line_offset(0) is not allowed.
36760            if len == 0 {
36761                return Ok(());
36762            };
36763            depth.increment()?;
36764            let envelope_size = 8;
36765            let bytes_len = len * envelope_size;
36766            let offset = decoder.out_of_line_offset(bytes_len)?;
36767            // Decode the envelope for each type.
36768            let mut _next_ordinal_to_read = 0;
36769            let mut next_offset = offset;
36770            let end_offset = offset + bytes_len;
36771            _next_ordinal_to_read += 1;
36772            if next_offset >= end_offset {
36773                return Ok(());
36774            }
36775
36776            // Decode unknown envelopes for gaps in ordinals.
36777            while _next_ordinal_to_read < 1 {
36778                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36779                _next_ordinal_to_read += 1;
36780                next_offset += envelope_size;
36781            }
36782
36783            let next_out_of_line = decoder.next_out_of_line();
36784            let handles_before = decoder.remaining_handles();
36785            if let Some((inlined, num_bytes, num_handles)) =
36786                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36787            {
36788                let member_inline_size =
36789                    <CompatUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36790                if inlined != (member_inline_size <= 4) {
36791                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36792                }
36793                let inner_offset;
36794                let mut inner_depth = depth.clone();
36795                if inlined {
36796                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36797                    inner_offset = next_offset;
36798                } else {
36799                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36800                    inner_depth.increment()?;
36801                }
36802                let val_ref =
36803                    self.union_member.get_or_insert_with(|| fidl::new_empty!(CompatUnion, D));
36804                fidl::decode!(CompatUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
36805                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36806                {
36807                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36808                }
36809                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36810                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36811                }
36812            }
36813
36814            next_offset += envelope_size;
36815            _next_ordinal_to_read += 1;
36816            if next_offset >= end_offset {
36817                return Ok(());
36818            }
36819
36820            // Decode unknown envelopes for gaps in ordinals.
36821            while _next_ordinal_to_read < 2 {
36822                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36823                _next_ordinal_to_read += 1;
36824                next_offset += envelope_size;
36825            }
36826
36827            let next_out_of_line = decoder.next_out_of_line();
36828            let handles_before = decoder.remaining_handles();
36829            if let Some((inlined, num_bytes, num_handles)) =
36830                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36831            {
36832                let member_inline_size =
36833                    <fidl::encoding::Array<u32, 3> as fidl::encoding::TypeMarker>::inline_size(
36834                        decoder.context,
36835                    );
36836                if inlined != (member_inline_size <= 4) {
36837                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36838                }
36839                let inner_offset;
36840                let mut inner_depth = depth.clone();
36841                if inlined {
36842                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36843                    inner_offset = next_offset;
36844                } else {
36845                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36846                    inner_depth.increment()?;
36847                }
36848                let val_ref = self
36849                    .array_member
36850                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u32, 3>, D));
36851                fidl::decode!(fidl::encoding::Array<u32, 3>, D, val_ref, decoder, inner_offset, inner_depth)?;
36852                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36853                {
36854                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36855                }
36856                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36857                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36858                }
36859            }
36860
36861            next_offset += envelope_size;
36862            _next_ordinal_to_read += 1;
36863            if next_offset >= end_offset {
36864                return Ok(());
36865            }
36866
36867            // Decode unknown envelopes for gaps in ordinals.
36868            while _next_ordinal_to_read < 3 {
36869                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36870                _next_ordinal_to_read += 1;
36871                next_offset += envelope_size;
36872            }
36873
36874            let next_out_of_line = decoder.next_out_of_line();
36875            let handles_before = decoder.remaining_handles();
36876            if let Some((inlined, num_bytes, num_handles)) =
36877                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36878            {
36879                let member_inline_size =
36880                    <CompatTableString as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36881                if inlined != (member_inline_size <= 4) {
36882                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36883                }
36884                let inner_offset;
36885                let mut inner_depth = depth.clone();
36886                if inlined {
36887                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36888                    inner_offset = next_offset;
36889                } else {
36890                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36891                    inner_depth.increment()?;
36892                }
36893                let val_ref =
36894                    self.table_member.get_or_insert_with(|| fidl::new_empty!(CompatTableString, D));
36895                fidl::decode!(CompatTableString, D, val_ref, decoder, inner_offset, inner_depth)?;
36896                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36897                {
36898                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36899                }
36900                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36901                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36902                }
36903            }
36904
36905            next_offset += envelope_size;
36906            _next_ordinal_to_read += 1;
36907            if next_offset >= end_offset {
36908                return Ok(());
36909            }
36910
36911            // Decode unknown envelopes for gaps in ordinals.
36912            while _next_ordinal_to_read < 4 {
36913                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36914                _next_ordinal_to_read += 1;
36915                next_offset += envelope_size;
36916            }
36917
36918            let next_out_of_line = decoder.next_out_of_line();
36919            let handles_before = decoder.remaining_handles();
36920            if let Some((inlined, num_bytes, num_handles)) =
36921                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36922            {
36923                let member_inline_size =
36924                    <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36925                if inlined != (member_inline_size <= 4) {
36926                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36927                }
36928                let inner_offset;
36929                let mut inner_depth = depth.clone();
36930                if inlined {
36931                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36932                    inner_offset = next_offset;
36933                } else {
36934                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36935                    inner_depth.increment()?;
36936                }
36937                let val_ref =
36938                    self.xunion_member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
36939                fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
36940                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36941                {
36942                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36943                }
36944                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36945                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36946                }
36947            }
36948
36949            next_offset += envelope_size;
36950
36951            // Decode the remaining unknown envelopes.
36952            while next_offset < end_offset {
36953                _next_ordinal_to_read += 1;
36954                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36955                next_offset += envelope_size;
36956            }
36957
36958            Ok(())
36959        }
36960    }
36961
36962    impl EmptyTable {
36963        #[inline(always)]
36964        fn max_ordinal_present(&self) -> u64 {
36965            0
36966        }
36967    }
36968
36969    impl fidl::encoding::ValueTypeMarker for EmptyTable {
36970        type Borrowed<'a> = &'a Self;
36971        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36972            value
36973        }
36974    }
36975
36976    unsafe impl fidl::encoding::TypeMarker for EmptyTable {
36977        type Owned = Self;
36978
36979        #[inline(always)]
36980        fn inline_align(_context: fidl::encoding::Context) -> usize {
36981            8
36982        }
36983
36984        #[inline(always)]
36985        fn inline_size(_context: fidl::encoding::Context) -> usize {
36986            16
36987        }
36988    }
36989
36990    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyTable, D>
36991        for &EmptyTable
36992    {
36993        unsafe fn encode(
36994            self,
36995            encoder: &mut fidl::encoding::Encoder<'_, D>,
36996            offset: usize,
36997            mut depth: fidl::encoding::Depth,
36998        ) -> fidl::Result<()> {
36999            encoder.debug_check_bounds::<EmptyTable>(offset);
37000            // Vector header
37001            let max_ordinal: u64 = self.max_ordinal_present();
37002            encoder.write_num(max_ordinal, offset);
37003            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37004            // Calling encoder.out_of_line_offset(0) is not allowed.
37005            if max_ordinal == 0 {
37006                return Ok(());
37007            }
37008            depth.increment()?;
37009            let envelope_size = 8;
37010            let bytes_len = max_ordinal as usize * envelope_size;
37011            #[allow(unused_variables)]
37012            let offset = encoder.out_of_line_offset(bytes_len);
37013            let mut _prev_end_offset: usize = 0;
37014
37015            Ok(())
37016        }
37017    }
37018
37019    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyTable {
37020        #[inline(always)]
37021        fn new_empty() -> Self {
37022            Self::default()
37023        }
37024
37025        unsafe fn decode(
37026            &mut self,
37027            decoder: &mut fidl::encoding::Decoder<'_, D>,
37028            offset: usize,
37029            mut depth: fidl::encoding::Depth,
37030        ) -> fidl::Result<()> {
37031            decoder.debug_check_bounds::<Self>(offset);
37032            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37033                None => return Err(fidl::Error::NotNullable),
37034                Some(len) => len,
37035            };
37036            // Calling decoder.out_of_line_offset(0) is not allowed.
37037            if len == 0 {
37038                return Ok(());
37039            };
37040            depth.increment()?;
37041            let envelope_size = 8;
37042            let bytes_len = len * envelope_size;
37043            let offset = decoder.out_of_line_offset(bytes_len)?;
37044            // Decode the envelope for each type.
37045            let mut _next_ordinal_to_read = 0;
37046            let mut next_offset = offset;
37047            let end_offset = offset + bytes_len;
37048
37049            // Decode the remaining unknown envelopes.
37050            while next_offset < end_offset {
37051                _next_ordinal_to_read += 1;
37052                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37053                next_offset += envelope_size;
37054            }
37055
37056            Ok(())
37057        }
37058    }
37059
37060    impl FidlvizTable {
37061        #[inline(always)]
37062        fn max_ordinal_present(&self) -> u64 {
37063            if let Some(_) = self.f3 {
37064                return 3;
37065            }
37066            if let Some(_) = self.f1 {
37067                return 1;
37068            }
37069            0
37070        }
37071    }
37072
37073    impl fidl::encoding::ValueTypeMarker for FidlvizTable {
37074        type Borrowed<'a> = &'a Self;
37075        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37076            value
37077        }
37078    }
37079
37080    unsafe impl fidl::encoding::TypeMarker for FidlvizTable {
37081        type Owned = Self;
37082
37083        #[inline(always)]
37084        fn inline_align(_context: fidl::encoding::Context) -> usize {
37085            8
37086        }
37087
37088        #[inline(always)]
37089        fn inline_size(_context: fidl::encoding::Context) -> usize {
37090            16
37091        }
37092    }
37093
37094    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizTable, D>
37095        for &FidlvizTable
37096    {
37097        unsafe fn encode(
37098            self,
37099            encoder: &mut fidl::encoding::Encoder<'_, D>,
37100            offset: usize,
37101            mut depth: fidl::encoding::Depth,
37102        ) -> fidl::Result<()> {
37103            encoder.debug_check_bounds::<FidlvizTable>(offset);
37104            // Vector header
37105            let max_ordinal: u64 = self.max_ordinal_present();
37106            encoder.write_num(max_ordinal, offset);
37107            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37108            // Calling encoder.out_of_line_offset(0) is not allowed.
37109            if max_ordinal == 0 {
37110                return Ok(());
37111            }
37112            depth.increment()?;
37113            let envelope_size = 8;
37114            let bytes_len = max_ordinal as usize * envelope_size;
37115            #[allow(unused_variables)]
37116            let offset = encoder.out_of_line_offset(bytes_len);
37117            let mut _prev_end_offset: usize = 0;
37118            if 1 > max_ordinal {
37119                return Ok(());
37120            }
37121
37122            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37123            // are envelope_size bytes.
37124            let cur_offset: usize = (1 - 1) * envelope_size;
37125
37126            // Zero reserved fields.
37127            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37128
37129            // Safety:
37130            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37131            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37132            //   envelope_size bytes, there is always sufficient room.
37133            fidl::encoding::encode_in_envelope_optional::<bool, D>(
37134                self.f1.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
37135                encoder,
37136                offset + cur_offset,
37137                depth,
37138            )?;
37139
37140            _prev_end_offset = cur_offset + envelope_size;
37141            if 3 > max_ordinal {
37142                return Ok(());
37143            }
37144
37145            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37146            // are envelope_size bytes.
37147            let cur_offset: usize = (3 - 1) * envelope_size;
37148
37149            // Zero reserved fields.
37150            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37151
37152            // Safety:
37153            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37154            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37155            //   envelope_size bytes, there is always sufficient room.
37156            fidl::encoding::encode_in_envelope_optional::<bool, D>(
37157                self.f3.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
37158                encoder,
37159                offset + cur_offset,
37160                depth,
37161            )?;
37162
37163            _prev_end_offset = cur_offset + envelope_size;
37164
37165            Ok(())
37166        }
37167    }
37168
37169    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizTable {
37170        #[inline(always)]
37171        fn new_empty() -> Self {
37172            Self::default()
37173        }
37174
37175        unsafe fn decode(
37176            &mut self,
37177            decoder: &mut fidl::encoding::Decoder<'_, D>,
37178            offset: usize,
37179            mut depth: fidl::encoding::Depth,
37180        ) -> fidl::Result<()> {
37181            decoder.debug_check_bounds::<Self>(offset);
37182            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37183                None => return Err(fidl::Error::NotNullable),
37184                Some(len) => len,
37185            };
37186            // Calling decoder.out_of_line_offset(0) is not allowed.
37187            if len == 0 {
37188                return Ok(());
37189            };
37190            depth.increment()?;
37191            let envelope_size = 8;
37192            let bytes_len = len * envelope_size;
37193            let offset = decoder.out_of_line_offset(bytes_len)?;
37194            // Decode the envelope for each type.
37195            let mut _next_ordinal_to_read = 0;
37196            let mut next_offset = offset;
37197            let end_offset = offset + bytes_len;
37198            _next_ordinal_to_read += 1;
37199            if next_offset >= end_offset {
37200                return Ok(());
37201            }
37202
37203            // Decode unknown envelopes for gaps in ordinals.
37204            while _next_ordinal_to_read < 1 {
37205                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37206                _next_ordinal_to_read += 1;
37207                next_offset += envelope_size;
37208            }
37209
37210            let next_out_of_line = decoder.next_out_of_line();
37211            let handles_before = decoder.remaining_handles();
37212            if let Some((inlined, num_bytes, num_handles)) =
37213                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37214            {
37215                let member_inline_size =
37216                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37217                if inlined != (member_inline_size <= 4) {
37218                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37219                }
37220                let inner_offset;
37221                let mut inner_depth = depth.clone();
37222                if inlined {
37223                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37224                    inner_offset = next_offset;
37225                } else {
37226                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37227                    inner_depth.increment()?;
37228                }
37229                let val_ref = self.f1.get_or_insert_with(|| fidl::new_empty!(bool, D));
37230                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
37231                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37232                {
37233                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37234                }
37235                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37236                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37237                }
37238            }
37239
37240            next_offset += envelope_size;
37241            _next_ordinal_to_read += 1;
37242            if next_offset >= end_offset {
37243                return Ok(());
37244            }
37245
37246            // Decode unknown envelopes for gaps in ordinals.
37247            while _next_ordinal_to_read < 3 {
37248                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37249                _next_ordinal_to_read += 1;
37250                next_offset += envelope_size;
37251            }
37252
37253            let next_out_of_line = decoder.next_out_of_line();
37254            let handles_before = decoder.remaining_handles();
37255            if let Some((inlined, num_bytes, num_handles)) =
37256                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37257            {
37258                let member_inline_size =
37259                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37260                if inlined != (member_inline_size <= 4) {
37261                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37262                }
37263                let inner_offset;
37264                let mut inner_depth = depth.clone();
37265                if inlined {
37266                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37267                    inner_offset = next_offset;
37268                } else {
37269                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37270                    inner_depth.increment()?;
37271                }
37272                let val_ref = self.f3.get_or_insert_with(|| fidl::new_empty!(bool, D));
37273                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
37274                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37275                {
37276                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37277                }
37278                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37279                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37280                }
37281            }
37282
37283            next_offset += envelope_size;
37284
37285            // Decode the remaining unknown envelopes.
37286            while next_offset < end_offset {
37287                _next_ordinal_to_read += 1;
37288                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37289                next_offset += envelope_size;
37290            }
37291
37292            Ok(())
37293        }
37294    }
37295
37296    impl GoldenTable {
37297        #[inline(always)]
37298        fn max_ordinal_present(&self) -> u64 {
37299            if let Some(_) = self.v {
37300                return 1;
37301            }
37302            0
37303        }
37304    }
37305
37306    impl fidl::encoding::ValueTypeMarker for GoldenTable {
37307        type Borrowed<'a> = &'a Self;
37308        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37309            value
37310        }
37311    }
37312
37313    unsafe impl fidl::encoding::TypeMarker for GoldenTable {
37314        type Owned = Self;
37315
37316        #[inline(always)]
37317        fn inline_align(_context: fidl::encoding::Context) -> usize {
37318            8
37319        }
37320
37321        #[inline(always)]
37322        fn inline_size(_context: fidl::encoding::Context) -> usize {
37323            16
37324        }
37325    }
37326
37327    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTable, D>
37328        for &GoldenTable
37329    {
37330        unsafe fn encode(
37331            self,
37332            encoder: &mut fidl::encoding::Encoder<'_, D>,
37333            offset: usize,
37334            mut depth: fidl::encoding::Depth,
37335        ) -> fidl::Result<()> {
37336            encoder.debug_check_bounds::<GoldenTable>(offset);
37337            // Vector header
37338            let max_ordinal: u64 = self.max_ordinal_present();
37339            encoder.write_num(max_ordinal, offset);
37340            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37341            // Calling encoder.out_of_line_offset(0) is not allowed.
37342            if max_ordinal == 0 {
37343                return Ok(());
37344            }
37345            depth.increment()?;
37346            let envelope_size = 8;
37347            let bytes_len = max_ordinal as usize * envelope_size;
37348            #[allow(unused_variables)]
37349            let offset = encoder.out_of_line_offset(bytes_len);
37350            let mut _prev_end_offset: usize = 0;
37351            if 1 > max_ordinal {
37352                return Ok(());
37353            }
37354
37355            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37356            // are envelope_size bytes.
37357            let cur_offset: usize = (1 - 1) * envelope_size;
37358
37359            // Zero reserved fields.
37360            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37361
37362            // Safety:
37363            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37364            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37365            //   envelope_size bytes, there is always sufficient room.
37366            fidl::encoding::encode_in_envelope_optional::<i16, D>(
37367                self.v.as_ref().map(<i16 as fidl::encoding::ValueTypeMarker>::borrow),
37368                encoder,
37369                offset + cur_offset,
37370                depth,
37371            )?;
37372
37373            _prev_end_offset = cur_offset + envelope_size;
37374
37375            Ok(())
37376        }
37377    }
37378
37379    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTable {
37380        #[inline(always)]
37381        fn new_empty() -> Self {
37382            Self::default()
37383        }
37384
37385        unsafe fn decode(
37386            &mut self,
37387            decoder: &mut fidl::encoding::Decoder<'_, D>,
37388            offset: usize,
37389            mut depth: fidl::encoding::Depth,
37390        ) -> fidl::Result<()> {
37391            decoder.debug_check_bounds::<Self>(offset);
37392            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37393                None => return Err(fidl::Error::NotNullable),
37394                Some(len) => len,
37395            };
37396            // Calling decoder.out_of_line_offset(0) is not allowed.
37397            if len == 0 {
37398                return Ok(());
37399            };
37400            depth.increment()?;
37401            let envelope_size = 8;
37402            let bytes_len = len * envelope_size;
37403            let offset = decoder.out_of_line_offset(bytes_len)?;
37404            // Decode the envelope for each type.
37405            let mut _next_ordinal_to_read = 0;
37406            let mut next_offset = offset;
37407            let end_offset = offset + bytes_len;
37408            _next_ordinal_to_read += 1;
37409            if next_offset >= end_offset {
37410                return Ok(());
37411            }
37412
37413            // Decode unknown envelopes for gaps in ordinals.
37414            while _next_ordinal_to_read < 1 {
37415                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37416                _next_ordinal_to_read += 1;
37417                next_offset += envelope_size;
37418            }
37419
37420            let next_out_of_line = decoder.next_out_of_line();
37421            let handles_before = decoder.remaining_handles();
37422            if let Some((inlined, num_bytes, num_handles)) =
37423                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37424            {
37425                let member_inline_size =
37426                    <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37427                if inlined != (member_inline_size <= 4) {
37428                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37429                }
37430                let inner_offset;
37431                let mut inner_depth = depth.clone();
37432                if inlined {
37433                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37434                    inner_offset = next_offset;
37435                } else {
37436                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37437                    inner_depth.increment()?;
37438                }
37439                let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i16, D));
37440                fidl::decode!(i16, D, val_ref, decoder, inner_offset, inner_depth)?;
37441                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37442                {
37443                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37444                }
37445                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37446                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37447                }
37448            }
37449
37450            next_offset += envelope_size;
37451
37452            // Decode the remaining unknown envelopes.
37453            while next_offset < end_offset {
37454                _next_ordinal_to_read += 1;
37455                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37456                next_offset += envelope_size;
37457            }
37458
37459            Ok(())
37460        }
37461    }
37462
37463    impl PaddedTable {
37464        #[inline(always)]
37465        fn max_ordinal_present(&self) -> u64 {
37466            if let Some(_) = self.field {
37467                return 1;
37468            }
37469            0
37470        }
37471    }
37472
37473    impl fidl::encoding::ValueTypeMarker for PaddedTable {
37474        type Borrowed<'a> = &'a Self;
37475        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37476            value
37477        }
37478    }
37479
37480    unsafe impl fidl::encoding::TypeMarker for PaddedTable {
37481        type Owned = Self;
37482
37483        #[inline(always)]
37484        fn inline_align(_context: fidl::encoding::Context) -> usize {
37485            8
37486        }
37487
37488        #[inline(always)]
37489        fn inline_size(_context: fidl::encoding::Context) -> usize {
37490            16
37491        }
37492    }
37493
37494    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTable, D>
37495        for &PaddedTable
37496    {
37497        unsafe fn encode(
37498            self,
37499            encoder: &mut fidl::encoding::Encoder<'_, D>,
37500            offset: usize,
37501            mut depth: fidl::encoding::Depth,
37502        ) -> fidl::Result<()> {
37503            encoder.debug_check_bounds::<PaddedTable>(offset);
37504            // Vector header
37505            let max_ordinal: u64 = self.max_ordinal_present();
37506            encoder.write_num(max_ordinal, offset);
37507            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37508            // Calling encoder.out_of_line_offset(0) is not allowed.
37509            if max_ordinal == 0 {
37510                return Ok(());
37511            }
37512            depth.increment()?;
37513            let envelope_size = 8;
37514            let bytes_len = max_ordinal as usize * envelope_size;
37515            #[allow(unused_variables)]
37516            let offset = encoder.out_of_line_offset(bytes_len);
37517            let mut _prev_end_offset: usize = 0;
37518            if 1 > max_ordinal {
37519                return Ok(());
37520            }
37521
37522            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37523            // are envelope_size bytes.
37524            let cur_offset: usize = (1 - 1) * envelope_size;
37525
37526            // Zero reserved fields.
37527            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37528
37529            // Safety:
37530            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37531            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37532            //   envelope_size bytes, there is always sufficient room.
37533            fidl::encoding::encode_in_envelope_optional::<i8, D>(
37534                self.field.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
37535                encoder,
37536                offset + cur_offset,
37537                depth,
37538            )?;
37539
37540            _prev_end_offset = cur_offset + envelope_size;
37541
37542            Ok(())
37543        }
37544    }
37545
37546    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTable {
37547        #[inline(always)]
37548        fn new_empty() -> Self {
37549            Self::default()
37550        }
37551
37552        unsafe fn decode(
37553            &mut self,
37554            decoder: &mut fidl::encoding::Decoder<'_, D>,
37555            offset: usize,
37556            mut depth: fidl::encoding::Depth,
37557        ) -> fidl::Result<()> {
37558            decoder.debug_check_bounds::<Self>(offset);
37559            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37560                None => return Err(fidl::Error::NotNullable),
37561                Some(len) => len,
37562            };
37563            // Calling decoder.out_of_line_offset(0) is not allowed.
37564            if len == 0 {
37565                return Ok(());
37566            };
37567            depth.increment()?;
37568            let envelope_size = 8;
37569            let bytes_len = len * envelope_size;
37570            let offset = decoder.out_of_line_offset(bytes_len)?;
37571            // Decode the envelope for each type.
37572            let mut _next_ordinal_to_read = 0;
37573            let mut next_offset = offset;
37574            let end_offset = offset + bytes_len;
37575            _next_ordinal_to_read += 1;
37576            if next_offset >= end_offset {
37577                return Ok(());
37578            }
37579
37580            // Decode unknown envelopes for gaps in ordinals.
37581            while _next_ordinal_to_read < 1 {
37582                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37583                _next_ordinal_to_read += 1;
37584                next_offset += envelope_size;
37585            }
37586
37587            let next_out_of_line = decoder.next_out_of_line();
37588            let handles_before = decoder.remaining_handles();
37589            if let Some((inlined, num_bytes, num_handles)) =
37590                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37591            {
37592                let member_inline_size =
37593                    <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37594                if inlined != (member_inline_size <= 4) {
37595                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37596                }
37597                let inner_offset;
37598                let mut inner_depth = depth.clone();
37599                if inlined {
37600                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37601                    inner_offset = next_offset;
37602                } else {
37603                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37604                    inner_depth.increment()?;
37605                }
37606                let val_ref = self.field.get_or_insert_with(|| fidl::new_empty!(i8, D));
37607                fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
37608                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37609                {
37610                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37611                }
37612                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37613                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37614                }
37615            }
37616
37617            next_offset += envelope_size;
37618
37619            // Decode the remaining unknown envelopes.
37620            while next_offset < end_offset {
37621                _next_ordinal_to_read += 1;
37622                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37623                next_offset += envelope_size;
37624            }
37625
37626            Ok(())
37627        }
37628    }
37629
37630    impl RecursiveOptionalAndTable {
37631        #[inline(always)]
37632        fn max_ordinal_present(&self) -> u64 {
37633            if let Some(_) = self.recursive_optional {
37634                return 1;
37635            }
37636            0
37637        }
37638    }
37639
37640    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTable {
37641        type Borrowed<'a> = &'a Self;
37642        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37643            value
37644        }
37645    }
37646
37647    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTable {
37648        type Owned = Self;
37649
37650        #[inline(always)]
37651        fn inline_align(_context: fidl::encoding::Context) -> usize {
37652            8
37653        }
37654
37655        #[inline(always)]
37656        fn inline_size(_context: fidl::encoding::Context) -> usize {
37657            16
37658        }
37659    }
37660
37661    unsafe impl<D: fidl::encoding::ResourceDialect>
37662        fidl::encoding::Encode<RecursiveOptionalAndTable, D> for &RecursiveOptionalAndTable
37663    {
37664        unsafe fn encode(
37665            self,
37666            encoder: &mut fidl::encoding::Encoder<'_, D>,
37667            offset: usize,
37668            mut depth: fidl::encoding::Depth,
37669        ) -> fidl::Result<()> {
37670            encoder.debug_check_bounds::<RecursiveOptionalAndTable>(offset);
37671            // Vector header
37672            let max_ordinal: u64 = self.max_ordinal_present();
37673            encoder.write_num(max_ordinal, offset);
37674            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37675            // Calling encoder.out_of_line_offset(0) is not allowed.
37676            if max_ordinal == 0 {
37677                return Ok(());
37678            }
37679            depth.increment()?;
37680            let envelope_size = 8;
37681            let bytes_len = max_ordinal as usize * envelope_size;
37682            #[allow(unused_variables)]
37683            let offset = encoder.out_of_line_offset(bytes_len);
37684            let mut _prev_end_offset: usize = 0;
37685            if 1 > max_ordinal {
37686                return Ok(());
37687            }
37688
37689            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37690            // are envelope_size bytes.
37691            let cur_offset: usize = (1 - 1) * envelope_size;
37692
37693            // Zero reserved fields.
37694            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37695
37696            // Safety:
37697            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37698            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37699            //   envelope_size bytes, there is always sufficient room.
37700            fidl::encoding::encode_in_envelope_optional::<RecursiveOptionalStruct, D>(
37701                self.recursive_optional
37702                    .as_ref()
37703                    .map(<RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow),
37704                encoder,
37705                offset + cur_offset,
37706                depth,
37707            )?;
37708
37709            _prev_end_offset = cur_offset + envelope_size;
37710
37711            Ok(())
37712        }
37713    }
37714
37715    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
37716        for RecursiveOptionalAndTable
37717    {
37718        #[inline(always)]
37719        fn new_empty() -> Self {
37720            Self::default()
37721        }
37722
37723        unsafe fn decode(
37724            &mut self,
37725            decoder: &mut fidl::encoding::Decoder<'_, D>,
37726            offset: usize,
37727            mut depth: fidl::encoding::Depth,
37728        ) -> fidl::Result<()> {
37729            decoder.debug_check_bounds::<Self>(offset);
37730            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37731                None => return Err(fidl::Error::NotNullable),
37732                Some(len) => len,
37733            };
37734            // Calling decoder.out_of_line_offset(0) is not allowed.
37735            if len == 0 {
37736                return Ok(());
37737            };
37738            depth.increment()?;
37739            let envelope_size = 8;
37740            let bytes_len = len * envelope_size;
37741            let offset = decoder.out_of_line_offset(bytes_len)?;
37742            // Decode the envelope for each type.
37743            let mut _next_ordinal_to_read = 0;
37744            let mut next_offset = offset;
37745            let end_offset = offset + bytes_len;
37746            _next_ordinal_to_read += 1;
37747            if next_offset >= end_offset {
37748                return Ok(());
37749            }
37750
37751            // Decode unknown envelopes for gaps in ordinals.
37752            while _next_ordinal_to_read < 1 {
37753                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37754                _next_ordinal_to_read += 1;
37755                next_offset += envelope_size;
37756            }
37757
37758            let next_out_of_line = decoder.next_out_of_line();
37759            let handles_before = decoder.remaining_handles();
37760            if let Some((inlined, num_bytes, num_handles)) =
37761                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37762            {
37763                let member_inline_size =
37764                    <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
37765                        decoder.context,
37766                    );
37767                if inlined != (member_inline_size <= 4) {
37768                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37769                }
37770                let inner_offset;
37771                let mut inner_depth = depth.clone();
37772                if inlined {
37773                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37774                    inner_offset = next_offset;
37775                } else {
37776                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37777                    inner_depth.increment()?;
37778                }
37779                let val_ref = self
37780                    .recursive_optional
37781                    .get_or_insert_with(|| fidl::new_empty!(RecursiveOptionalStruct, D));
37782                fidl::decode!(
37783                    RecursiveOptionalStruct,
37784                    D,
37785                    val_ref,
37786                    decoder,
37787                    inner_offset,
37788                    inner_depth
37789                )?;
37790                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37791                {
37792                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37793                }
37794                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37795                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37796                }
37797            }
37798
37799            next_offset += envelope_size;
37800
37801            // Decode the remaining unknown envelopes.
37802            while next_offset < end_offset {
37803                _next_ordinal_to_read += 1;
37804                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37805                next_offset += envelope_size;
37806            }
37807
37808            Ok(())
37809        }
37810    }
37811
37812    impl RecursiveTable {
37813        #[inline(always)]
37814        fn max_ordinal_present(&self) -> u64 {
37815            if let Some(_) = self.s {
37816                return 1;
37817            }
37818            0
37819        }
37820    }
37821
37822    impl fidl::encoding::ValueTypeMarker for RecursiveTable {
37823        type Borrowed<'a> = &'a Self;
37824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37825            value
37826        }
37827    }
37828
37829    unsafe impl fidl::encoding::TypeMarker for RecursiveTable {
37830        type Owned = Self;
37831
37832        #[inline(always)]
37833        fn inline_align(_context: fidl::encoding::Context) -> usize {
37834            8
37835        }
37836
37837        #[inline(always)]
37838        fn inline_size(_context: fidl::encoding::Context) -> usize {
37839            16
37840        }
37841    }
37842
37843    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTable, D>
37844        for &RecursiveTable
37845    {
37846        unsafe fn encode(
37847            self,
37848            encoder: &mut fidl::encoding::Encoder<'_, D>,
37849            offset: usize,
37850            mut depth: fidl::encoding::Depth,
37851        ) -> fidl::Result<()> {
37852            encoder.debug_check_bounds::<RecursiveTable>(offset);
37853            // Vector header
37854            let max_ordinal: u64 = self.max_ordinal_present();
37855            encoder.write_num(max_ordinal, offset);
37856            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37857            // Calling encoder.out_of_line_offset(0) is not allowed.
37858            if max_ordinal == 0 {
37859                return Ok(());
37860            }
37861            depth.increment()?;
37862            let envelope_size = 8;
37863            let bytes_len = max_ordinal as usize * envelope_size;
37864            #[allow(unused_variables)]
37865            let offset = encoder.out_of_line_offset(bytes_len);
37866            let mut _prev_end_offset: usize = 0;
37867            if 1 > max_ordinal {
37868                return Ok(());
37869            }
37870
37871            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37872            // are envelope_size bytes.
37873            let cur_offset: usize = (1 - 1) * envelope_size;
37874
37875            // Zero reserved fields.
37876            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37877
37878            // Safety:
37879            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37880            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37881            //   envelope_size bytes, there is always sufficient room.
37882            fidl::encoding::encode_in_envelope_optional::<RecursiveTableOptionalHolder, D>(
37883                self.s
37884                    .as_ref()
37885                    .map(<RecursiveTableOptionalHolder as fidl::encoding::ValueTypeMarker>::borrow),
37886                encoder,
37887                offset + cur_offset,
37888                depth,
37889            )?;
37890
37891            _prev_end_offset = cur_offset + envelope_size;
37892
37893            Ok(())
37894        }
37895    }
37896
37897    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTable {
37898        #[inline(always)]
37899        fn new_empty() -> Self {
37900            Self::default()
37901        }
37902
37903        unsafe fn decode(
37904            &mut self,
37905            decoder: &mut fidl::encoding::Decoder<'_, D>,
37906            offset: usize,
37907            mut depth: fidl::encoding::Depth,
37908        ) -> fidl::Result<()> {
37909            decoder.debug_check_bounds::<Self>(offset);
37910            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37911                None => return Err(fidl::Error::NotNullable),
37912                Some(len) => len,
37913            };
37914            // Calling decoder.out_of_line_offset(0) is not allowed.
37915            if len == 0 {
37916                return Ok(());
37917            };
37918            depth.increment()?;
37919            let envelope_size = 8;
37920            let bytes_len = len * envelope_size;
37921            let offset = decoder.out_of_line_offset(bytes_len)?;
37922            // Decode the envelope for each type.
37923            let mut _next_ordinal_to_read = 0;
37924            let mut next_offset = offset;
37925            let end_offset = offset + bytes_len;
37926            _next_ordinal_to_read += 1;
37927            if next_offset >= end_offset {
37928                return Ok(());
37929            }
37930
37931            // Decode unknown envelopes for gaps in ordinals.
37932            while _next_ordinal_to_read < 1 {
37933                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37934                _next_ordinal_to_read += 1;
37935                next_offset += envelope_size;
37936            }
37937
37938            let next_out_of_line = decoder.next_out_of_line();
37939            let handles_before = decoder.remaining_handles();
37940            if let Some((inlined, num_bytes, num_handles)) =
37941                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37942            {
37943                let member_inline_size =
37944                    <RecursiveTableOptionalHolder as fidl::encoding::TypeMarker>::inline_size(
37945                        decoder.context,
37946                    );
37947                if inlined != (member_inline_size <= 4) {
37948                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37949                }
37950                let inner_offset;
37951                let mut inner_depth = depth.clone();
37952                if inlined {
37953                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37954                    inner_offset = next_offset;
37955                } else {
37956                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37957                    inner_depth.increment()?;
37958                }
37959                let val_ref =
37960                    self.s.get_or_insert_with(|| fidl::new_empty!(RecursiveTableOptionalHolder, D));
37961                fidl::decode!(
37962                    RecursiveTableOptionalHolder,
37963                    D,
37964                    val_ref,
37965                    decoder,
37966                    inner_offset,
37967                    inner_depth
37968                )?;
37969                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37970                {
37971                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37972                }
37973                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37974                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37975                }
37976            }
37977
37978            next_offset += envelope_size;
37979
37980            // Decode the remaining unknown envelopes.
37981            while next_offset < end_offset {
37982                _next_ordinal_to_read += 1;
37983                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37984                next_offset += envelope_size;
37985            }
37986
37987            Ok(())
37988        }
37989    }
37990
37991    impl Regression10TableV1 {
37992        #[inline(always)]
37993        fn max_ordinal_present(&self) -> u64 {
37994            if let Some(_) = self.member1 {
37995                return 1;
37996            }
37997            0
37998        }
37999    }
38000
38001    impl fidl::encoding::ValueTypeMarker for Regression10TableV1 {
38002        type Borrowed<'a> = &'a Self;
38003        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38004            value
38005        }
38006    }
38007
38008    unsafe impl fidl::encoding::TypeMarker for Regression10TableV1 {
38009        type Owned = Self;
38010
38011        #[inline(always)]
38012        fn inline_align(_context: fidl::encoding::Context) -> usize {
38013            8
38014        }
38015
38016        #[inline(always)]
38017        fn inline_size(_context: fidl::encoding::Context) -> usize {
38018            16
38019        }
38020    }
38021
38022    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV1, D>
38023        for &Regression10TableV1
38024    {
38025        unsafe fn encode(
38026            self,
38027            encoder: &mut fidl::encoding::Encoder<'_, D>,
38028            offset: usize,
38029            mut depth: fidl::encoding::Depth,
38030        ) -> fidl::Result<()> {
38031            encoder.debug_check_bounds::<Regression10TableV1>(offset);
38032            // Vector header
38033            let max_ordinal: u64 = self.max_ordinal_present();
38034            encoder.write_num(max_ordinal, offset);
38035            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38036            // Calling encoder.out_of_line_offset(0) is not allowed.
38037            if max_ordinal == 0 {
38038                return Ok(());
38039            }
38040            depth.increment()?;
38041            let envelope_size = 8;
38042            let bytes_len = max_ordinal as usize * envelope_size;
38043            #[allow(unused_variables)]
38044            let offset = encoder.out_of_line_offset(bytes_len);
38045            let mut _prev_end_offset: usize = 0;
38046            if 1 > max_ordinal {
38047                return Ok(());
38048            }
38049
38050            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38051            // are envelope_size bytes.
38052            let cur_offset: usize = (1 - 1) * envelope_size;
38053
38054            // Zero reserved fields.
38055            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38056
38057            // Safety:
38058            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38059            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38060            //   envelope_size bytes, there is always sufficient room.
38061            fidl::encoding::encode_in_envelope_optional::<u64, D>(
38062                self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
38063                encoder,
38064                offset + cur_offset,
38065                depth,
38066            )?;
38067
38068            _prev_end_offset = cur_offset + envelope_size;
38069
38070            Ok(())
38071        }
38072    }
38073
38074    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV1 {
38075        #[inline(always)]
38076        fn new_empty() -> Self {
38077            Self::default()
38078        }
38079
38080        unsafe fn decode(
38081            &mut self,
38082            decoder: &mut fidl::encoding::Decoder<'_, D>,
38083            offset: usize,
38084            mut depth: fidl::encoding::Depth,
38085        ) -> fidl::Result<()> {
38086            decoder.debug_check_bounds::<Self>(offset);
38087            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38088                None => return Err(fidl::Error::NotNullable),
38089                Some(len) => len,
38090            };
38091            // Calling decoder.out_of_line_offset(0) is not allowed.
38092            if len == 0 {
38093                return Ok(());
38094            };
38095            depth.increment()?;
38096            let envelope_size = 8;
38097            let bytes_len = len * envelope_size;
38098            let offset = decoder.out_of_line_offset(bytes_len)?;
38099            // Decode the envelope for each type.
38100            let mut _next_ordinal_to_read = 0;
38101            let mut next_offset = offset;
38102            let end_offset = offset + bytes_len;
38103            _next_ordinal_to_read += 1;
38104            if next_offset >= end_offset {
38105                return Ok(());
38106            }
38107
38108            // Decode unknown envelopes for gaps in ordinals.
38109            while _next_ordinal_to_read < 1 {
38110                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38111                _next_ordinal_to_read += 1;
38112                next_offset += envelope_size;
38113            }
38114
38115            let next_out_of_line = decoder.next_out_of_line();
38116            let handles_before = decoder.remaining_handles();
38117            if let Some((inlined, num_bytes, num_handles)) =
38118                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38119            {
38120                let member_inline_size =
38121                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38122                if inlined != (member_inline_size <= 4) {
38123                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38124                }
38125                let inner_offset;
38126                let mut inner_depth = depth.clone();
38127                if inlined {
38128                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38129                    inner_offset = next_offset;
38130                } else {
38131                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38132                    inner_depth.increment()?;
38133                }
38134                let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
38135                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
38136                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38137                {
38138                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38139                }
38140                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38141                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38142                }
38143            }
38144
38145            next_offset += envelope_size;
38146
38147            // Decode the remaining unknown envelopes.
38148            while next_offset < end_offset {
38149                _next_ordinal_to_read += 1;
38150                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38151                next_offset += envelope_size;
38152            }
38153
38154            Ok(())
38155        }
38156    }
38157
38158    impl Regression10TableV2 {
38159        #[inline(always)]
38160        fn max_ordinal_present(&self) -> u64 {
38161            if let Some(_) = self.member2 {
38162                return 5;
38163            }
38164            if let Some(_) = self.member1 {
38165                return 1;
38166            }
38167            0
38168        }
38169    }
38170
38171    impl fidl::encoding::ValueTypeMarker for Regression10TableV2 {
38172        type Borrowed<'a> = &'a Self;
38173        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38174            value
38175        }
38176    }
38177
38178    unsafe impl fidl::encoding::TypeMarker for Regression10TableV2 {
38179        type Owned = Self;
38180
38181        #[inline(always)]
38182        fn inline_align(_context: fidl::encoding::Context) -> usize {
38183            8
38184        }
38185
38186        #[inline(always)]
38187        fn inline_size(_context: fidl::encoding::Context) -> usize {
38188            16
38189        }
38190    }
38191
38192    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV2, D>
38193        for &Regression10TableV2
38194    {
38195        unsafe fn encode(
38196            self,
38197            encoder: &mut fidl::encoding::Encoder<'_, D>,
38198            offset: usize,
38199            mut depth: fidl::encoding::Depth,
38200        ) -> fidl::Result<()> {
38201            encoder.debug_check_bounds::<Regression10TableV2>(offset);
38202            // Vector header
38203            let max_ordinal: u64 = self.max_ordinal_present();
38204            encoder.write_num(max_ordinal, offset);
38205            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38206            // Calling encoder.out_of_line_offset(0) is not allowed.
38207            if max_ordinal == 0 {
38208                return Ok(());
38209            }
38210            depth.increment()?;
38211            let envelope_size = 8;
38212            let bytes_len = max_ordinal as usize * envelope_size;
38213            #[allow(unused_variables)]
38214            let offset = encoder.out_of_line_offset(bytes_len);
38215            let mut _prev_end_offset: usize = 0;
38216            if 1 > max_ordinal {
38217                return Ok(());
38218            }
38219
38220            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38221            // are envelope_size bytes.
38222            let cur_offset: usize = (1 - 1) * envelope_size;
38223
38224            // Zero reserved fields.
38225            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38226
38227            // Safety:
38228            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38229            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38230            //   envelope_size bytes, there is always sufficient room.
38231            fidl::encoding::encode_in_envelope_optional::<u64, D>(
38232                self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
38233                encoder,
38234                offset + cur_offset,
38235                depth,
38236            )?;
38237
38238            _prev_end_offset = cur_offset + envelope_size;
38239            if 5 > max_ordinal {
38240                return Ok(());
38241            }
38242
38243            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38244            // are envelope_size bytes.
38245            let cur_offset: usize = (5 - 1) * envelope_size;
38246
38247            // Zero reserved fields.
38248            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38249
38250            // Safety:
38251            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38252            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38253            //   envelope_size bytes, there is always sufficient room.
38254            fidl::encoding::encode_in_envelope_optional::<u64, D>(
38255                self.member2.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
38256                encoder,
38257                offset + cur_offset,
38258                depth,
38259            )?;
38260
38261            _prev_end_offset = cur_offset + envelope_size;
38262
38263            Ok(())
38264        }
38265    }
38266
38267    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV2 {
38268        #[inline(always)]
38269        fn new_empty() -> Self {
38270            Self::default()
38271        }
38272
38273        unsafe fn decode(
38274            &mut self,
38275            decoder: &mut fidl::encoding::Decoder<'_, D>,
38276            offset: usize,
38277            mut depth: fidl::encoding::Depth,
38278        ) -> fidl::Result<()> {
38279            decoder.debug_check_bounds::<Self>(offset);
38280            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38281                None => return Err(fidl::Error::NotNullable),
38282                Some(len) => len,
38283            };
38284            // Calling decoder.out_of_line_offset(0) is not allowed.
38285            if len == 0 {
38286                return Ok(());
38287            };
38288            depth.increment()?;
38289            let envelope_size = 8;
38290            let bytes_len = len * envelope_size;
38291            let offset = decoder.out_of_line_offset(bytes_len)?;
38292            // Decode the envelope for each type.
38293            let mut _next_ordinal_to_read = 0;
38294            let mut next_offset = offset;
38295            let end_offset = offset + bytes_len;
38296            _next_ordinal_to_read += 1;
38297            if next_offset >= end_offset {
38298                return Ok(());
38299            }
38300
38301            // Decode unknown envelopes for gaps in ordinals.
38302            while _next_ordinal_to_read < 1 {
38303                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38304                _next_ordinal_to_read += 1;
38305                next_offset += envelope_size;
38306            }
38307
38308            let next_out_of_line = decoder.next_out_of_line();
38309            let handles_before = decoder.remaining_handles();
38310            if let Some((inlined, num_bytes, num_handles)) =
38311                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38312            {
38313                let member_inline_size =
38314                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38315                if inlined != (member_inline_size <= 4) {
38316                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38317                }
38318                let inner_offset;
38319                let mut inner_depth = depth.clone();
38320                if inlined {
38321                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38322                    inner_offset = next_offset;
38323                } else {
38324                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38325                    inner_depth.increment()?;
38326                }
38327                let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
38328                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
38329                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38330                {
38331                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38332                }
38333                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38334                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38335                }
38336            }
38337
38338            next_offset += envelope_size;
38339            _next_ordinal_to_read += 1;
38340            if next_offset >= end_offset {
38341                return Ok(());
38342            }
38343
38344            // Decode unknown envelopes for gaps in ordinals.
38345            while _next_ordinal_to_read < 5 {
38346                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38347                _next_ordinal_to_read += 1;
38348                next_offset += envelope_size;
38349            }
38350
38351            let next_out_of_line = decoder.next_out_of_line();
38352            let handles_before = decoder.remaining_handles();
38353            if let Some((inlined, num_bytes, num_handles)) =
38354                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38355            {
38356                let member_inline_size =
38357                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38358                if inlined != (member_inline_size <= 4) {
38359                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38360                }
38361                let inner_offset;
38362                let mut inner_depth = depth.clone();
38363                if inlined {
38364                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38365                    inner_offset = next_offset;
38366                } else {
38367                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38368                    inner_depth.increment()?;
38369                }
38370                let val_ref = self.member2.get_or_insert_with(|| fidl::new_empty!(u64, D));
38371                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
38372                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38373                {
38374                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38375                }
38376                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38377                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38378                }
38379            }
38380
38381            next_offset += envelope_size;
38382
38383            // Decode the remaining unknown envelopes.
38384            while next_offset < end_offset {
38385                _next_ordinal_to_read += 1;
38386                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38387                next_offset += envelope_size;
38388            }
38389
38390            Ok(())
38391        }
38392    }
38393
38394    impl Regression10TableV3 {
38395        #[inline(always)]
38396        fn max_ordinal_present(&self) -> u64 {
38397            if let Some(_) = self.z {
38398                return 6;
38399            }
38400            if let Some(_) = self.y {
38401                return 5;
38402            }
38403            if let Some(_) = self.x {
38404                return 1;
38405            }
38406            0
38407        }
38408    }
38409
38410    impl fidl::encoding::ValueTypeMarker for Regression10TableV3 {
38411        type Borrowed<'a> = &'a Self;
38412        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38413            value
38414        }
38415    }
38416
38417    unsafe impl fidl::encoding::TypeMarker for Regression10TableV3 {
38418        type Owned = Self;
38419
38420        #[inline(always)]
38421        fn inline_align(_context: fidl::encoding::Context) -> usize {
38422            8
38423        }
38424
38425        #[inline(always)]
38426        fn inline_size(_context: fidl::encoding::Context) -> usize {
38427            16
38428        }
38429    }
38430
38431    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV3, D>
38432        for &Regression10TableV3
38433    {
38434        unsafe fn encode(
38435            self,
38436            encoder: &mut fidl::encoding::Encoder<'_, D>,
38437            offset: usize,
38438            mut depth: fidl::encoding::Depth,
38439        ) -> fidl::Result<()> {
38440            encoder.debug_check_bounds::<Regression10TableV3>(offset);
38441            // Vector header
38442            let max_ordinal: u64 = self.max_ordinal_present();
38443            encoder.write_num(max_ordinal, offset);
38444            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38445            // Calling encoder.out_of_line_offset(0) is not allowed.
38446            if max_ordinal == 0 {
38447                return Ok(());
38448            }
38449            depth.increment()?;
38450            let envelope_size = 8;
38451            let bytes_len = max_ordinal as usize * envelope_size;
38452            #[allow(unused_variables)]
38453            let offset = encoder.out_of_line_offset(bytes_len);
38454            let mut _prev_end_offset: usize = 0;
38455            if 1 > max_ordinal {
38456                return Ok(());
38457            }
38458
38459            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38460            // are envelope_size bytes.
38461            let cur_offset: usize = (1 - 1) * envelope_size;
38462
38463            // Zero reserved fields.
38464            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38465
38466            // Safety:
38467            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38468            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38469            //   envelope_size bytes, there is always sufficient room.
38470            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38471                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38472                encoder,
38473                offset + cur_offset,
38474                depth,
38475            )?;
38476
38477            _prev_end_offset = cur_offset + envelope_size;
38478            if 5 > max_ordinal {
38479                return Ok(());
38480            }
38481
38482            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38483            // are envelope_size bytes.
38484            let cur_offset: usize = (5 - 1) * envelope_size;
38485
38486            // Zero reserved fields.
38487            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38488
38489            // Safety:
38490            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38491            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38492            //   envelope_size bytes, there is always sufficient room.
38493            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38494                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38495                encoder,
38496                offset + cur_offset,
38497                depth,
38498            )?;
38499
38500            _prev_end_offset = cur_offset + envelope_size;
38501            if 6 > max_ordinal {
38502                return Ok(());
38503            }
38504
38505            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38506            // are envelope_size bytes.
38507            let cur_offset: usize = (6 - 1) * envelope_size;
38508
38509            // Zero reserved fields.
38510            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38511
38512            // Safety:
38513            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38514            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38515            //   envelope_size bytes, there is always sufficient room.
38516            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38517                self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38518                encoder,
38519                offset + cur_offset,
38520                depth,
38521            )?;
38522
38523            _prev_end_offset = cur_offset + envelope_size;
38524
38525            Ok(())
38526        }
38527    }
38528
38529    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV3 {
38530        #[inline(always)]
38531        fn new_empty() -> Self {
38532            Self::default()
38533        }
38534
38535        unsafe fn decode(
38536            &mut self,
38537            decoder: &mut fidl::encoding::Decoder<'_, D>,
38538            offset: usize,
38539            mut depth: fidl::encoding::Depth,
38540        ) -> fidl::Result<()> {
38541            decoder.debug_check_bounds::<Self>(offset);
38542            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38543                None => return Err(fidl::Error::NotNullable),
38544                Some(len) => len,
38545            };
38546            // Calling decoder.out_of_line_offset(0) is not allowed.
38547            if len == 0 {
38548                return Ok(());
38549            };
38550            depth.increment()?;
38551            let envelope_size = 8;
38552            let bytes_len = len * envelope_size;
38553            let offset = decoder.out_of_line_offset(bytes_len)?;
38554            // Decode the envelope for each type.
38555            let mut _next_ordinal_to_read = 0;
38556            let mut next_offset = offset;
38557            let end_offset = offset + bytes_len;
38558            _next_ordinal_to_read += 1;
38559            if next_offset >= end_offset {
38560                return Ok(());
38561            }
38562
38563            // Decode unknown envelopes for gaps in ordinals.
38564            while _next_ordinal_to_read < 1 {
38565                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38566                _next_ordinal_to_read += 1;
38567                next_offset += envelope_size;
38568            }
38569
38570            let next_out_of_line = decoder.next_out_of_line();
38571            let handles_before = decoder.remaining_handles();
38572            if let Some((inlined, num_bytes, num_handles)) =
38573                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38574            {
38575                let member_inline_size =
38576                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38577                if inlined != (member_inline_size <= 4) {
38578                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38579                }
38580                let inner_offset;
38581                let mut inner_depth = depth.clone();
38582                if inlined {
38583                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38584                    inner_offset = next_offset;
38585                } else {
38586                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38587                    inner_depth.increment()?;
38588                }
38589                let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38590                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38591                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38592                {
38593                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38594                }
38595                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38596                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38597                }
38598            }
38599
38600            next_offset += envelope_size;
38601            _next_ordinal_to_read += 1;
38602            if next_offset >= end_offset {
38603                return Ok(());
38604            }
38605
38606            // Decode unknown envelopes for gaps in ordinals.
38607            while _next_ordinal_to_read < 5 {
38608                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38609                _next_ordinal_to_read += 1;
38610                next_offset += envelope_size;
38611            }
38612
38613            let next_out_of_line = decoder.next_out_of_line();
38614            let handles_before = decoder.remaining_handles();
38615            if let Some((inlined, num_bytes, num_handles)) =
38616                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38617            {
38618                let member_inline_size =
38619                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38620                if inlined != (member_inline_size <= 4) {
38621                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38622                }
38623                let inner_offset;
38624                let mut inner_depth = depth.clone();
38625                if inlined {
38626                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38627                    inner_offset = next_offset;
38628                } else {
38629                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38630                    inner_depth.increment()?;
38631                }
38632                let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38633                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38634                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38635                {
38636                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38637                }
38638                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38639                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38640                }
38641            }
38642
38643            next_offset += envelope_size;
38644            _next_ordinal_to_read += 1;
38645            if next_offset >= end_offset {
38646                return Ok(());
38647            }
38648
38649            // Decode unknown envelopes for gaps in ordinals.
38650            while _next_ordinal_to_read < 6 {
38651                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38652                _next_ordinal_to_read += 1;
38653                next_offset += envelope_size;
38654            }
38655
38656            let next_out_of_line = decoder.next_out_of_line();
38657            let handles_before = decoder.remaining_handles();
38658            if let Some((inlined, num_bytes, num_handles)) =
38659                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38660            {
38661                let member_inline_size =
38662                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38663                if inlined != (member_inline_size <= 4) {
38664                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38665                }
38666                let inner_offset;
38667                let mut inner_depth = depth.clone();
38668                if inlined {
38669                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38670                    inner_offset = next_offset;
38671                } else {
38672                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38673                    inner_depth.increment()?;
38674                }
38675                let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
38676                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38677                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38678                {
38679                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38680                }
38681                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38682                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38683                }
38684            }
38685
38686            next_offset += envelope_size;
38687
38688            // Decode the remaining unknown envelopes.
38689            while next_offset < end_offset {
38690                _next_ordinal_to_read += 1;
38691                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38692                next_offset += envelope_size;
38693            }
38694
38695            Ok(())
38696        }
38697    }
38698
38699    impl ReverseOrdinalTable {
38700        #[inline(always)]
38701        fn max_ordinal_present(&self) -> u64 {
38702            if let Some(_) = self.x {
38703                return 4;
38704            }
38705            if let Some(_) = self.y {
38706                return 2;
38707            }
38708            if let Some(_) = self.z {
38709                return 1;
38710            }
38711            0
38712        }
38713    }
38714
38715    impl fidl::encoding::ValueTypeMarker for ReverseOrdinalTable {
38716        type Borrowed<'a> = &'a Self;
38717        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38718            value
38719        }
38720    }
38721
38722    unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalTable {
38723        type Owned = Self;
38724
38725        #[inline(always)]
38726        fn inline_align(_context: fidl::encoding::Context) -> usize {
38727            8
38728        }
38729
38730        #[inline(always)]
38731        fn inline_size(_context: fidl::encoding::Context) -> usize {
38732            16
38733        }
38734    }
38735
38736    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalTable, D>
38737        for &ReverseOrdinalTable
38738    {
38739        unsafe fn encode(
38740            self,
38741            encoder: &mut fidl::encoding::Encoder<'_, D>,
38742            offset: usize,
38743            mut depth: fidl::encoding::Depth,
38744        ) -> fidl::Result<()> {
38745            encoder.debug_check_bounds::<ReverseOrdinalTable>(offset);
38746            // Vector header
38747            let max_ordinal: u64 = self.max_ordinal_present();
38748            encoder.write_num(max_ordinal, offset);
38749            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38750            // Calling encoder.out_of_line_offset(0) is not allowed.
38751            if max_ordinal == 0 {
38752                return Ok(());
38753            }
38754            depth.increment()?;
38755            let envelope_size = 8;
38756            let bytes_len = max_ordinal as usize * envelope_size;
38757            #[allow(unused_variables)]
38758            let offset = encoder.out_of_line_offset(bytes_len);
38759            let mut _prev_end_offset: usize = 0;
38760            if 1 > max_ordinal {
38761                return Ok(());
38762            }
38763
38764            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38765            // are envelope_size bytes.
38766            let cur_offset: usize = (1 - 1) * envelope_size;
38767
38768            // Zero reserved fields.
38769            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38770
38771            // Safety:
38772            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38773            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38774            //   envelope_size bytes, there is always sufficient room.
38775            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38776                self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38777                encoder,
38778                offset + cur_offset,
38779                depth,
38780            )?;
38781
38782            _prev_end_offset = cur_offset + envelope_size;
38783            if 2 > max_ordinal {
38784                return Ok(());
38785            }
38786
38787            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38788            // are envelope_size bytes.
38789            let cur_offset: usize = (2 - 1) * envelope_size;
38790
38791            // Zero reserved fields.
38792            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38793
38794            // Safety:
38795            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38796            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38797            //   envelope_size bytes, there is always sufficient room.
38798            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38799                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38800                encoder,
38801                offset + cur_offset,
38802                depth,
38803            )?;
38804
38805            _prev_end_offset = cur_offset + envelope_size;
38806            if 4 > max_ordinal {
38807                return Ok(());
38808            }
38809
38810            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38811            // are envelope_size bytes.
38812            let cur_offset: usize = (4 - 1) * envelope_size;
38813
38814            // Zero reserved fields.
38815            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38816
38817            // Safety:
38818            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38819            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38820            //   envelope_size bytes, there is always sufficient room.
38821            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38822                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38823                encoder,
38824                offset + cur_offset,
38825                depth,
38826            )?;
38827
38828            _prev_end_offset = cur_offset + envelope_size;
38829
38830            Ok(())
38831        }
38832    }
38833
38834    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalTable {
38835        #[inline(always)]
38836        fn new_empty() -> Self {
38837            Self::default()
38838        }
38839
38840        unsafe fn decode(
38841            &mut self,
38842            decoder: &mut fidl::encoding::Decoder<'_, D>,
38843            offset: usize,
38844            mut depth: fidl::encoding::Depth,
38845        ) -> fidl::Result<()> {
38846            decoder.debug_check_bounds::<Self>(offset);
38847            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38848                None => return Err(fidl::Error::NotNullable),
38849                Some(len) => len,
38850            };
38851            // Calling decoder.out_of_line_offset(0) is not allowed.
38852            if len == 0 {
38853                return Ok(());
38854            };
38855            depth.increment()?;
38856            let envelope_size = 8;
38857            let bytes_len = len * envelope_size;
38858            let offset = decoder.out_of_line_offset(bytes_len)?;
38859            // Decode the envelope for each type.
38860            let mut _next_ordinal_to_read = 0;
38861            let mut next_offset = offset;
38862            let end_offset = offset + bytes_len;
38863            _next_ordinal_to_read += 1;
38864            if next_offset >= end_offset {
38865                return Ok(());
38866            }
38867
38868            // Decode unknown envelopes for gaps in ordinals.
38869            while _next_ordinal_to_read < 1 {
38870                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38871                _next_ordinal_to_read += 1;
38872                next_offset += envelope_size;
38873            }
38874
38875            let next_out_of_line = decoder.next_out_of_line();
38876            let handles_before = decoder.remaining_handles();
38877            if let Some((inlined, num_bytes, num_handles)) =
38878                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38879            {
38880                let member_inline_size =
38881                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38882                if inlined != (member_inline_size <= 4) {
38883                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38884                }
38885                let inner_offset;
38886                let mut inner_depth = depth.clone();
38887                if inlined {
38888                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38889                    inner_offset = next_offset;
38890                } else {
38891                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38892                    inner_depth.increment()?;
38893                }
38894                let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
38895                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38896                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38897                {
38898                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38899                }
38900                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38901                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38902                }
38903            }
38904
38905            next_offset += envelope_size;
38906            _next_ordinal_to_read += 1;
38907            if next_offset >= end_offset {
38908                return Ok(());
38909            }
38910
38911            // Decode unknown envelopes for gaps in ordinals.
38912            while _next_ordinal_to_read < 2 {
38913                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38914                _next_ordinal_to_read += 1;
38915                next_offset += envelope_size;
38916            }
38917
38918            let next_out_of_line = decoder.next_out_of_line();
38919            let handles_before = decoder.remaining_handles();
38920            if let Some((inlined, num_bytes, num_handles)) =
38921                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38922            {
38923                let member_inline_size =
38924                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38925                if inlined != (member_inline_size <= 4) {
38926                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38927                }
38928                let inner_offset;
38929                let mut inner_depth = depth.clone();
38930                if inlined {
38931                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38932                    inner_offset = next_offset;
38933                } else {
38934                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38935                    inner_depth.increment()?;
38936                }
38937                let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38938                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38939                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38940                {
38941                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38942                }
38943                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38944                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38945                }
38946            }
38947
38948            next_offset += envelope_size;
38949            _next_ordinal_to_read += 1;
38950            if next_offset >= end_offset {
38951                return Ok(());
38952            }
38953
38954            // Decode unknown envelopes for gaps in ordinals.
38955            while _next_ordinal_to_read < 4 {
38956                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38957                _next_ordinal_to_read += 1;
38958                next_offset += envelope_size;
38959            }
38960
38961            let next_out_of_line = decoder.next_out_of_line();
38962            let handles_before = decoder.remaining_handles();
38963            if let Some((inlined, num_bytes, num_handles)) =
38964                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38965            {
38966                let member_inline_size =
38967                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38968                if inlined != (member_inline_size <= 4) {
38969                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38970                }
38971                let inner_offset;
38972                let mut inner_depth = depth.clone();
38973                if inlined {
38974                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38975                    inner_offset = next_offset;
38976                } else {
38977                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38978                    inner_depth.increment()?;
38979                }
38980                let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38981                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38982                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38983                {
38984                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38985                }
38986                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38987                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38988                }
38989            }
38990
38991            next_offset += envelope_size;
38992
38993            // Decode the remaining unknown envelopes.
38994            while next_offset < end_offset {
38995                _next_ordinal_to_read += 1;
38996                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38997                next_offset += envelope_size;
38998            }
38999
39000            Ok(())
39001        }
39002    }
39003
39004    impl SimpleTable {
39005        #[inline(always)]
39006        fn max_ordinal_present(&self) -> u64 {
39007            if let Some(_) = self.y {
39008                return 5;
39009            }
39010            if let Some(_) = self.x {
39011                return 1;
39012            }
39013            0
39014        }
39015    }
39016
39017    impl fidl::encoding::ValueTypeMarker for SimpleTable {
39018        type Borrowed<'a> = &'a Self;
39019        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39020            value
39021        }
39022    }
39023
39024    unsafe impl fidl::encoding::TypeMarker for SimpleTable {
39025        type Owned = Self;
39026
39027        #[inline(always)]
39028        fn inline_align(_context: fidl::encoding::Context) -> usize {
39029            8
39030        }
39031
39032        #[inline(always)]
39033        fn inline_size(_context: fidl::encoding::Context) -> usize {
39034            16
39035        }
39036    }
39037
39038    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTable, D>
39039        for &SimpleTable
39040    {
39041        unsafe fn encode(
39042            self,
39043            encoder: &mut fidl::encoding::Encoder<'_, D>,
39044            offset: usize,
39045            mut depth: fidl::encoding::Depth,
39046        ) -> fidl::Result<()> {
39047            encoder.debug_check_bounds::<SimpleTable>(offset);
39048            // Vector header
39049            let max_ordinal: u64 = self.max_ordinal_present();
39050            encoder.write_num(max_ordinal, offset);
39051            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39052            // Calling encoder.out_of_line_offset(0) is not allowed.
39053            if max_ordinal == 0 {
39054                return Ok(());
39055            }
39056            depth.increment()?;
39057            let envelope_size = 8;
39058            let bytes_len = max_ordinal as usize * envelope_size;
39059            #[allow(unused_variables)]
39060            let offset = encoder.out_of_line_offset(bytes_len);
39061            let mut _prev_end_offset: usize = 0;
39062            if 1 > max_ordinal {
39063                return Ok(());
39064            }
39065
39066            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39067            // are envelope_size bytes.
39068            let cur_offset: usize = (1 - 1) * envelope_size;
39069
39070            // Zero reserved fields.
39071            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39072
39073            // Safety:
39074            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39075            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39076            //   envelope_size bytes, there is always sufficient room.
39077            fidl::encoding::encode_in_envelope_optional::<i64, D>(
39078                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
39079                encoder,
39080                offset + cur_offset,
39081                depth,
39082            )?;
39083
39084            _prev_end_offset = cur_offset + envelope_size;
39085            if 5 > max_ordinal {
39086                return Ok(());
39087            }
39088
39089            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39090            // are envelope_size bytes.
39091            let cur_offset: usize = (5 - 1) * envelope_size;
39092
39093            // Zero reserved fields.
39094            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39095
39096            // Safety:
39097            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39098            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39099            //   envelope_size bytes, there is always sufficient room.
39100            fidl::encoding::encode_in_envelope_optional::<i64, D>(
39101                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
39102                encoder,
39103                offset + cur_offset,
39104                depth,
39105            )?;
39106
39107            _prev_end_offset = cur_offset + envelope_size;
39108
39109            Ok(())
39110        }
39111    }
39112
39113    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTable {
39114        #[inline(always)]
39115        fn new_empty() -> Self {
39116            Self::default()
39117        }
39118
39119        unsafe fn decode(
39120            &mut self,
39121            decoder: &mut fidl::encoding::Decoder<'_, D>,
39122            offset: usize,
39123            mut depth: fidl::encoding::Depth,
39124        ) -> fidl::Result<()> {
39125            decoder.debug_check_bounds::<Self>(offset);
39126            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39127                None => return Err(fidl::Error::NotNullable),
39128                Some(len) => len,
39129            };
39130            // Calling decoder.out_of_line_offset(0) is not allowed.
39131            if len == 0 {
39132                return Ok(());
39133            };
39134            depth.increment()?;
39135            let envelope_size = 8;
39136            let bytes_len = len * envelope_size;
39137            let offset = decoder.out_of_line_offset(bytes_len)?;
39138            // Decode the envelope for each type.
39139            let mut _next_ordinal_to_read = 0;
39140            let mut next_offset = offset;
39141            let end_offset = offset + bytes_len;
39142            _next_ordinal_to_read += 1;
39143            if next_offset >= end_offset {
39144                return Ok(());
39145            }
39146
39147            // Decode unknown envelopes for gaps in ordinals.
39148            while _next_ordinal_to_read < 1 {
39149                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39150                _next_ordinal_to_read += 1;
39151                next_offset += envelope_size;
39152            }
39153
39154            let next_out_of_line = decoder.next_out_of_line();
39155            let handles_before = decoder.remaining_handles();
39156            if let Some((inlined, num_bytes, num_handles)) =
39157                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39158            {
39159                let member_inline_size =
39160                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39161                if inlined != (member_inline_size <= 4) {
39162                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39163                }
39164                let inner_offset;
39165                let mut inner_depth = depth.clone();
39166                if inlined {
39167                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39168                    inner_offset = next_offset;
39169                } else {
39170                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39171                    inner_depth.increment()?;
39172                }
39173                let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
39174                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39175                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39176                {
39177                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39178                }
39179                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39180                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39181                }
39182            }
39183
39184            next_offset += envelope_size;
39185            _next_ordinal_to_read += 1;
39186            if next_offset >= end_offset {
39187                return Ok(());
39188            }
39189
39190            // Decode unknown envelopes for gaps in ordinals.
39191            while _next_ordinal_to_read < 5 {
39192                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39193                _next_ordinal_to_read += 1;
39194                next_offset += envelope_size;
39195            }
39196
39197            let next_out_of_line = decoder.next_out_of_line();
39198            let handles_before = decoder.remaining_handles();
39199            if let Some((inlined, num_bytes, num_handles)) =
39200                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39201            {
39202                let member_inline_size =
39203                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39204                if inlined != (member_inline_size <= 4) {
39205                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39206                }
39207                let inner_offset;
39208                let mut inner_depth = depth.clone();
39209                if inlined {
39210                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39211                    inner_offset = next_offset;
39212                } else {
39213                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39214                    inner_depth.increment()?;
39215                }
39216                let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
39217                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39218                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39219                {
39220                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39221                }
39222                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39223                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39224                }
39225            }
39226
39227            next_offset += envelope_size;
39228
39229            // Decode the remaining unknown envelopes.
39230            while next_offset < end_offset {
39231                _next_ordinal_to_read += 1;
39232                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39233                next_offset += envelope_size;
39234            }
39235
39236            Ok(())
39237        }
39238    }
39239
39240    impl TableFieldInlined {
39241        #[inline(always)]
39242        fn max_ordinal_present(&self) -> u64 {
39243            if let Some(_) = self.f {
39244                return 1;
39245            }
39246            0
39247        }
39248    }
39249
39250    impl fidl::encoding::ValueTypeMarker for TableFieldInlined {
39251        type Borrowed<'a> = &'a Self;
39252        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39253            value
39254        }
39255    }
39256
39257    unsafe impl fidl::encoding::TypeMarker for TableFieldInlined {
39258        type Owned = Self;
39259
39260        #[inline(always)]
39261        fn inline_align(_context: fidl::encoding::Context) -> usize {
39262            8
39263        }
39264
39265        #[inline(always)]
39266        fn inline_size(_context: fidl::encoding::Context) -> usize {
39267            16
39268        }
39269    }
39270
39271    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldInlined, D>
39272        for &TableFieldInlined
39273    {
39274        unsafe fn encode(
39275            self,
39276            encoder: &mut fidl::encoding::Encoder<'_, D>,
39277            offset: usize,
39278            mut depth: fidl::encoding::Depth,
39279        ) -> fidl::Result<()> {
39280            encoder.debug_check_bounds::<TableFieldInlined>(offset);
39281            // Vector header
39282            let max_ordinal: u64 = self.max_ordinal_present();
39283            encoder.write_num(max_ordinal, offset);
39284            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39285            // Calling encoder.out_of_line_offset(0) is not allowed.
39286            if max_ordinal == 0 {
39287                return Ok(());
39288            }
39289            depth.increment()?;
39290            let envelope_size = 8;
39291            let bytes_len = max_ordinal as usize * envelope_size;
39292            #[allow(unused_variables)]
39293            let offset = encoder.out_of_line_offset(bytes_len);
39294            let mut _prev_end_offset: usize = 0;
39295            if 1 > max_ordinal {
39296                return Ok(());
39297            }
39298
39299            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39300            // are envelope_size bytes.
39301            let cur_offset: usize = (1 - 1) * envelope_size;
39302
39303            // Zero reserved fields.
39304            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39305
39306            // Safety:
39307            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39308            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39309            //   envelope_size bytes, there is always sufficient room.
39310            fidl::encoding::encode_in_envelope_optional::<i32, D>(
39311                self.f.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
39312                encoder,
39313                offset + cur_offset,
39314                depth,
39315            )?;
39316
39317            _prev_end_offset = cur_offset + envelope_size;
39318
39319            Ok(())
39320        }
39321    }
39322
39323    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldInlined {
39324        #[inline(always)]
39325        fn new_empty() -> Self {
39326            Self::default()
39327        }
39328
39329        unsafe fn decode(
39330            &mut self,
39331            decoder: &mut fidl::encoding::Decoder<'_, D>,
39332            offset: usize,
39333            mut depth: fidl::encoding::Depth,
39334        ) -> fidl::Result<()> {
39335            decoder.debug_check_bounds::<Self>(offset);
39336            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39337                None => return Err(fidl::Error::NotNullable),
39338                Some(len) => len,
39339            };
39340            // Calling decoder.out_of_line_offset(0) is not allowed.
39341            if len == 0 {
39342                return Ok(());
39343            };
39344            depth.increment()?;
39345            let envelope_size = 8;
39346            let bytes_len = len * envelope_size;
39347            let offset = decoder.out_of_line_offset(bytes_len)?;
39348            // Decode the envelope for each type.
39349            let mut _next_ordinal_to_read = 0;
39350            let mut next_offset = offset;
39351            let end_offset = offset + bytes_len;
39352            _next_ordinal_to_read += 1;
39353            if next_offset >= end_offset {
39354                return Ok(());
39355            }
39356
39357            // Decode unknown envelopes for gaps in ordinals.
39358            while _next_ordinal_to_read < 1 {
39359                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39360                _next_ordinal_to_read += 1;
39361                next_offset += envelope_size;
39362            }
39363
39364            let next_out_of_line = decoder.next_out_of_line();
39365            let handles_before = decoder.remaining_handles();
39366            if let Some((inlined, num_bytes, num_handles)) =
39367                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39368            {
39369                let member_inline_size =
39370                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39371                if inlined != (member_inline_size <= 4) {
39372                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39373                }
39374                let inner_offset;
39375                let mut inner_depth = depth.clone();
39376                if inlined {
39377                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39378                    inner_offset = next_offset;
39379                } else {
39380                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39381                    inner_depth.increment()?;
39382                }
39383                let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i32, D));
39384                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
39385                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39386                {
39387                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39388                }
39389                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39390                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39391                }
39392            }
39393
39394            next_offset += envelope_size;
39395
39396            // Decode the remaining unknown envelopes.
39397            while next_offset < end_offset {
39398                _next_ordinal_to_read += 1;
39399                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39400                next_offset += envelope_size;
39401            }
39402
39403            Ok(())
39404        }
39405    }
39406
39407    impl TableFieldOutOfLine {
39408        #[inline(always)]
39409        fn max_ordinal_present(&self) -> u64 {
39410            if let Some(_) = self.f {
39411                return 1;
39412            }
39413            0
39414        }
39415    }
39416
39417    impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLine {
39418        type Borrowed<'a> = &'a Self;
39419        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39420            value
39421        }
39422    }
39423
39424    unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLine {
39425        type Owned = Self;
39426
39427        #[inline(always)]
39428        fn inline_align(_context: fidl::encoding::Context) -> usize {
39429            8
39430        }
39431
39432        #[inline(always)]
39433        fn inline_size(_context: fidl::encoding::Context) -> usize {
39434            16
39435        }
39436    }
39437
39438    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldOutOfLine, D>
39439        for &TableFieldOutOfLine
39440    {
39441        unsafe fn encode(
39442            self,
39443            encoder: &mut fidl::encoding::Encoder<'_, D>,
39444            offset: usize,
39445            mut depth: fidl::encoding::Depth,
39446        ) -> fidl::Result<()> {
39447            encoder.debug_check_bounds::<TableFieldOutOfLine>(offset);
39448            // Vector header
39449            let max_ordinal: u64 = self.max_ordinal_present();
39450            encoder.write_num(max_ordinal, offset);
39451            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39452            // Calling encoder.out_of_line_offset(0) is not allowed.
39453            if max_ordinal == 0 {
39454                return Ok(());
39455            }
39456            depth.increment()?;
39457            let envelope_size = 8;
39458            let bytes_len = max_ordinal as usize * envelope_size;
39459            #[allow(unused_variables)]
39460            let offset = encoder.out_of_line_offset(bytes_len);
39461            let mut _prev_end_offset: usize = 0;
39462            if 1 > max_ordinal {
39463                return Ok(());
39464            }
39465
39466            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39467            // are envelope_size bytes.
39468            let cur_offset: usize = (1 - 1) * envelope_size;
39469
39470            // Zero reserved fields.
39471            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39472
39473            // Safety:
39474            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39475            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39476            //   envelope_size bytes, there is always sufficient room.
39477            fidl::encoding::encode_in_envelope_optional::<i64, D>(
39478                self.f.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
39479                encoder,
39480                offset + cur_offset,
39481                depth,
39482            )?;
39483
39484            _prev_end_offset = cur_offset + envelope_size;
39485
39486            Ok(())
39487        }
39488    }
39489
39490    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldOutOfLine {
39491        #[inline(always)]
39492        fn new_empty() -> Self {
39493            Self::default()
39494        }
39495
39496        unsafe fn decode(
39497            &mut self,
39498            decoder: &mut fidl::encoding::Decoder<'_, D>,
39499            offset: usize,
39500            mut depth: fidl::encoding::Depth,
39501        ) -> fidl::Result<()> {
39502            decoder.debug_check_bounds::<Self>(offset);
39503            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39504                None => return Err(fidl::Error::NotNullable),
39505                Some(len) => len,
39506            };
39507            // Calling decoder.out_of_line_offset(0) is not allowed.
39508            if len == 0 {
39509                return Ok(());
39510            };
39511            depth.increment()?;
39512            let envelope_size = 8;
39513            let bytes_len = len * envelope_size;
39514            let offset = decoder.out_of_line_offset(bytes_len)?;
39515            // Decode the envelope for each type.
39516            let mut _next_ordinal_to_read = 0;
39517            let mut next_offset = offset;
39518            let end_offset = offset + bytes_len;
39519            _next_ordinal_to_read += 1;
39520            if next_offset >= end_offset {
39521                return Ok(());
39522            }
39523
39524            // Decode unknown envelopes for gaps in ordinals.
39525            while _next_ordinal_to_read < 1 {
39526                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39527                _next_ordinal_to_read += 1;
39528                next_offset += envelope_size;
39529            }
39530
39531            let next_out_of_line = decoder.next_out_of_line();
39532            let handles_before = decoder.remaining_handles();
39533            if let Some((inlined, num_bytes, num_handles)) =
39534                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39535            {
39536                let member_inline_size =
39537                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39538                if inlined != (member_inline_size <= 4) {
39539                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39540                }
39541                let inner_offset;
39542                let mut inner_depth = depth.clone();
39543                if inlined {
39544                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39545                    inner_offset = next_offset;
39546                } else {
39547                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39548                    inner_depth.increment()?;
39549                }
39550                let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i64, D));
39551                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39552                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39553                {
39554                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39555                }
39556                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39557                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39558                }
39559            }
39560
39561            next_offset += envelope_size;
39562
39563            // Decode the remaining unknown envelopes.
39564            while next_offset < end_offset {
39565                _next_ordinal_to_read += 1;
39566                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39567                next_offset += envelope_size;
39568            }
39569
39570            Ok(())
39571        }
39572    }
39573
39574    impl TableFieldUnknown {
39575        #[inline(always)]
39576        fn max_ordinal_present(&self) -> u64 {
39577            0
39578        }
39579    }
39580
39581    impl fidl::encoding::ValueTypeMarker for TableFieldUnknown {
39582        type Borrowed<'a> = &'a Self;
39583        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39584            value
39585        }
39586    }
39587
39588    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknown {
39589        type Owned = Self;
39590
39591        #[inline(always)]
39592        fn inline_align(_context: fidl::encoding::Context) -> usize {
39593            8
39594        }
39595
39596        #[inline(always)]
39597        fn inline_size(_context: fidl::encoding::Context) -> usize {
39598            16
39599        }
39600    }
39601
39602    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldUnknown, D>
39603        for &TableFieldUnknown
39604    {
39605        unsafe fn encode(
39606            self,
39607            encoder: &mut fidl::encoding::Encoder<'_, D>,
39608            offset: usize,
39609            mut depth: fidl::encoding::Depth,
39610        ) -> fidl::Result<()> {
39611            encoder.debug_check_bounds::<TableFieldUnknown>(offset);
39612            // Vector header
39613            let max_ordinal: u64 = self.max_ordinal_present();
39614            encoder.write_num(max_ordinal, offset);
39615            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39616            // Calling encoder.out_of_line_offset(0) is not allowed.
39617            if max_ordinal == 0 {
39618                return Ok(());
39619            }
39620            depth.increment()?;
39621            let envelope_size = 8;
39622            let bytes_len = max_ordinal as usize * envelope_size;
39623            #[allow(unused_variables)]
39624            let offset = encoder.out_of_line_offset(bytes_len);
39625            let mut _prev_end_offset: usize = 0;
39626
39627            Ok(())
39628        }
39629    }
39630
39631    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldUnknown {
39632        #[inline(always)]
39633        fn new_empty() -> Self {
39634            Self::default()
39635        }
39636
39637        unsafe fn decode(
39638            &mut self,
39639            decoder: &mut fidl::encoding::Decoder<'_, D>,
39640            offset: usize,
39641            mut depth: fidl::encoding::Depth,
39642        ) -> fidl::Result<()> {
39643            decoder.debug_check_bounds::<Self>(offset);
39644            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39645                None => return Err(fidl::Error::NotNullable),
39646                Some(len) => len,
39647            };
39648            // Calling decoder.out_of_line_offset(0) is not allowed.
39649            if len == 0 {
39650                return Ok(());
39651            };
39652            depth.increment()?;
39653            let envelope_size = 8;
39654            let bytes_len = len * envelope_size;
39655            let offset = decoder.out_of_line_offset(bytes_len)?;
39656            // Decode the envelope for each type.
39657            let mut _next_ordinal_to_read = 0;
39658            let mut next_offset = offset;
39659            let end_offset = offset + bytes_len;
39660
39661            // Decode the remaining unknown envelopes.
39662            while next_offset < end_offset {
39663                _next_ordinal_to_read += 1;
39664                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39665                next_offset += envelope_size;
39666            }
39667
39668            Ok(())
39669        }
39670    }
39671
39672    impl TableFieldUnsetFlexibleEnumInlined {
39673        #[inline(always)]
39674        fn max_ordinal_present(&self) -> u64 {
39675            if let Some(_) = self.always_set {
39676                return 3;
39677            }
39678            if let Some(_) = self.unsigned_enum {
39679                return 2;
39680            }
39681            if let Some(_) = self.signed_enum {
39682                return 1;
39683            }
39684            0
39685        }
39686    }
39687
39688    impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlined {
39689        type Borrowed<'a> = &'a Self;
39690        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39691            value
39692        }
39693    }
39694
39695    unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlined {
39696        type Owned = Self;
39697
39698        #[inline(always)]
39699        fn inline_align(_context: fidl::encoding::Context) -> usize {
39700            8
39701        }
39702
39703        #[inline(always)]
39704        fn inline_size(_context: fidl::encoding::Context) -> usize {
39705            16
39706        }
39707    }
39708
39709    unsafe impl<D: fidl::encoding::ResourceDialect>
39710        fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>
39711        for &TableFieldUnsetFlexibleEnumInlined
39712    {
39713        unsafe fn encode(
39714            self,
39715            encoder: &mut fidl::encoding::Encoder<'_, D>,
39716            offset: usize,
39717            mut depth: fidl::encoding::Depth,
39718        ) -> fidl::Result<()> {
39719            encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlined>(offset);
39720            // Vector header
39721            let max_ordinal: u64 = self.max_ordinal_present();
39722            encoder.write_num(max_ordinal, offset);
39723            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39724            // Calling encoder.out_of_line_offset(0) is not allowed.
39725            if max_ordinal == 0 {
39726                return Ok(());
39727            }
39728            depth.increment()?;
39729            let envelope_size = 8;
39730            let bytes_len = max_ordinal as usize * envelope_size;
39731            #[allow(unused_variables)]
39732            let offset = encoder.out_of_line_offset(bytes_len);
39733            let mut _prev_end_offset: usize = 0;
39734            if 1 > max_ordinal {
39735                return Ok(());
39736            }
39737
39738            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39739            // are envelope_size bytes.
39740            let cur_offset: usize = (1 - 1) * envelope_size;
39741
39742            // Zero reserved fields.
39743            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39744
39745            // Safety:
39746            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39747            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39748            //   envelope_size bytes, there is always sufficient room.
39749            fidl::encoding::encode_in_envelope_optional::<SignedEnum, D>(
39750                self.signed_enum
39751                    .as_ref()
39752                    .map(<SignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
39753                encoder,
39754                offset + cur_offset,
39755                depth,
39756            )?;
39757
39758            _prev_end_offset = cur_offset + envelope_size;
39759            if 2 > max_ordinal {
39760                return Ok(());
39761            }
39762
39763            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39764            // are envelope_size bytes.
39765            let cur_offset: usize = (2 - 1) * envelope_size;
39766
39767            // Zero reserved fields.
39768            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39769
39770            // Safety:
39771            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39772            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39773            //   envelope_size bytes, there is always sufficient room.
39774            fidl::encoding::encode_in_envelope_optional::<UnsignedEnum, D>(
39775                self.unsigned_enum
39776                    .as_ref()
39777                    .map(<UnsignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
39778                encoder,
39779                offset + cur_offset,
39780                depth,
39781            )?;
39782
39783            _prev_end_offset = cur_offset + envelope_size;
39784            if 3 > max_ordinal {
39785                return Ok(());
39786            }
39787
39788            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39789            // are envelope_size bytes.
39790            let cur_offset: usize = (3 - 1) * envelope_size;
39791
39792            // Zero reserved fields.
39793            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39794
39795            // Safety:
39796            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39797            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39798            //   envelope_size bytes, there is always sufficient room.
39799            fidl::encoding::encode_in_envelope_optional::<bool, D>(
39800                self.always_set.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
39801                encoder,
39802                offset + cur_offset,
39803                depth,
39804            )?;
39805
39806            _prev_end_offset = cur_offset + envelope_size;
39807
39808            Ok(())
39809        }
39810    }
39811
39812    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39813        for TableFieldUnsetFlexibleEnumInlined
39814    {
39815        #[inline(always)]
39816        fn new_empty() -> Self {
39817            Self::default()
39818        }
39819
39820        unsafe fn decode(
39821            &mut self,
39822            decoder: &mut fidl::encoding::Decoder<'_, D>,
39823            offset: usize,
39824            mut depth: fidl::encoding::Depth,
39825        ) -> fidl::Result<()> {
39826            decoder.debug_check_bounds::<Self>(offset);
39827            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39828                None => return Err(fidl::Error::NotNullable),
39829                Some(len) => len,
39830            };
39831            // Calling decoder.out_of_line_offset(0) is not allowed.
39832            if len == 0 {
39833                return Ok(());
39834            };
39835            depth.increment()?;
39836            let envelope_size = 8;
39837            let bytes_len = len * envelope_size;
39838            let offset = decoder.out_of_line_offset(bytes_len)?;
39839            // Decode the envelope for each type.
39840            let mut _next_ordinal_to_read = 0;
39841            let mut next_offset = offset;
39842            let end_offset = offset + bytes_len;
39843            _next_ordinal_to_read += 1;
39844            if next_offset >= end_offset {
39845                return Ok(());
39846            }
39847
39848            // Decode unknown envelopes for gaps in ordinals.
39849            while _next_ordinal_to_read < 1 {
39850                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39851                _next_ordinal_to_read += 1;
39852                next_offset += envelope_size;
39853            }
39854
39855            let next_out_of_line = decoder.next_out_of_line();
39856            let handles_before = decoder.remaining_handles();
39857            if let Some((inlined, num_bytes, num_handles)) =
39858                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39859            {
39860                let member_inline_size =
39861                    <SignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39862                if inlined != (member_inline_size <= 4) {
39863                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39864                }
39865                let inner_offset;
39866                let mut inner_depth = depth.clone();
39867                if inlined {
39868                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39869                    inner_offset = next_offset;
39870                } else {
39871                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39872                    inner_depth.increment()?;
39873                }
39874                let val_ref =
39875                    self.signed_enum.get_or_insert_with(|| fidl::new_empty!(SignedEnum, D));
39876                fidl::decode!(SignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
39877                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39878                {
39879                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39880                }
39881                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39882                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39883                }
39884            }
39885
39886            next_offset += envelope_size;
39887            _next_ordinal_to_read += 1;
39888            if next_offset >= end_offset {
39889                return Ok(());
39890            }
39891
39892            // Decode unknown envelopes for gaps in ordinals.
39893            while _next_ordinal_to_read < 2 {
39894                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39895                _next_ordinal_to_read += 1;
39896                next_offset += envelope_size;
39897            }
39898
39899            let next_out_of_line = decoder.next_out_of_line();
39900            let handles_before = decoder.remaining_handles();
39901            if let Some((inlined, num_bytes, num_handles)) =
39902                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39903            {
39904                let member_inline_size =
39905                    <UnsignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39906                if inlined != (member_inline_size <= 4) {
39907                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39908                }
39909                let inner_offset;
39910                let mut inner_depth = depth.clone();
39911                if inlined {
39912                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39913                    inner_offset = next_offset;
39914                } else {
39915                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39916                    inner_depth.increment()?;
39917                }
39918                let val_ref =
39919                    self.unsigned_enum.get_or_insert_with(|| fidl::new_empty!(UnsignedEnum, D));
39920                fidl::decode!(UnsignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
39921                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39922                {
39923                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39924                }
39925                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39926                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39927                }
39928            }
39929
39930            next_offset += envelope_size;
39931            _next_ordinal_to_read += 1;
39932            if next_offset >= end_offset {
39933                return Ok(());
39934            }
39935
39936            // Decode unknown envelopes for gaps in ordinals.
39937            while _next_ordinal_to_read < 3 {
39938                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39939                _next_ordinal_to_read += 1;
39940                next_offset += envelope_size;
39941            }
39942
39943            let next_out_of_line = decoder.next_out_of_line();
39944            let handles_before = decoder.remaining_handles();
39945            if let Some((inlined, num_bytes, num_handles)) =
39946                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39947            {
39948                let member_inline_size =
39949                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39950                if inlined != (member_inline_size <= 4) {
39951                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39952                }
39953                let inner_offset;
39954                let mut inner_depth = depth.clone();
39955                if inlined {
39956                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39957                    inner_offset = next_offset;
39958                } else {
39959                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39960                    inner_depth.increment()?;
39961                }
39962                let val_ref = self.always_set.get_or_insert_with(|| fidl::new_empty!(bool, D));
39963                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
39964                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39965                {
39966                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39967                }
39968                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39969                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39970                }
39971            }
39972
39973            next_offset += envelope_size;
39974
39975            // Decode the remaining unknown envelopes.
39976            while next_offset < end_offset {
39977                _next_ordinal_to_read += 1;
39978                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39979                next_offset += envelope_size;
39980            }
39981
39982            Ok(())
39983        }
39984    }
39985
39986    impl TableNoFields {
39987        #[inline(always)]
39988        fn max_ordinal_present(&self) -> u64 {
39989            0
39990        }
39991    }
39992
39993    impl fidl::encoding::ValueTypeMarker for TableNoFields {
39994        type Borrowed<'a> = &'a Self;
39995        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39996            value
39997        }
39998    }
39999
40000    unsafe impl fidl::encoding::TypeMarker for TableNoFields {
40001        type Owned = Self;
40002
40003        #[inline(always)]
40004        fn inline_align(_context: fidl::encoding::Context) -> usize {
40005            8
40006        }
40007
40008        #[inline(always)]
40009        fn inline_size(_context: fidl::encoding::Context) -> usize {
40010            16
40011        }
40012    }
40013
40014    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableNoFields, D>
40015        for &TableNoFields
40016    {
40017        unsafe fn encode(
40018            self,
40019            encoder: &mut fidl::encoding::Encoder<'_, D>,
40020            offset: usize,
40021            mut depth: fidl::encoding::Depth,
40022        ) -> fidl::Result<()> {
40023            encoder.debug_check_bounds::<TableNoFields>(offset);
40024            // Vector header
40025            let max_ordinal: u64 = self.max_ordinal_present();
40026            encoder.write_num(max_ordinal, offset);
40027            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40028            // Calling encoder.out_of_line_offset(0) is not allowed.
40029            if max_ordinal == 0 {
40030                return Ok(());
40031            }
40032            depth.increment()?;
40033            let envelope_size = 8;
40034            let bytes_len = max_ordinal as usize * envelope_size;
40035            #[allow(unused_variables)]
40036            let offset = encoder.out_of_line_offset(bytes_len);
40037            let mut _prev_end_offset: usize = 0;
40038
40039            Ok(())
40040        }
40041    }
40042
40043    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableNoFields {
40044        #[inline(always)]
40045        fn new_empty() -> Self {
40046            Self::default()
40047        }
40048
40049        unsafe fn decode(
40050            &mut self,
40051            decoder: &mut fidl::encoding::Decoder<'_, D>,
40052            offset: usize,
40053            mut depth: fidl::encoding::Depth,
40054        ) -> fidl::Result<()> {
40055            decoder.debug_check_bounds::<Self>(offset);
40056            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40057                None => return Err(fidl::Error::NotNullable),
40058                Some(len) => len,
40059            };
40060            // Calling decoder.out_of_line_offset(0) is not allowed.
40061            if len == 0 {
40062                return Ok(());
40063            };
40064            depth.increment()?;
40065            let envelope_size = 8;
40066            let bytes_len = len * envelope_size;
40067            let offset = decoder.out_of_line_offset(bytes_len)?;
40068            // Decode the envelope for each type.
40069            let mut _next_ordinal_to_read = 0;
40070            let mut next_offset = offset;
40071            let end_offset = offset + bytes_len;
40072
40073            // Decode the remaining unknown envelopes.
40074            while next_offset < end_offset {
40075                _next_ordinal_to_read += 1;
40076                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40077                next_offset += envelope_size;
40078            }
40079
40080            Ok(())
40081        }
40082    }
40083
40084    impl TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
40085        #[inline(always)]
40086        fn max_ordinal_present(&self) -> u64 {
40087            if let Some(_) = self.member {
40088                return 3;
40089            }
40090            0
40091        }
40092    }
40093
40094    impl fidl::encoding::ValueTypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
40095        type Borrowed<'a> = &'a Self;
40096        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40097            value
40098        }
40099    }
40100
40101    unsafe impl fidl::encoding::TypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
40102        type Owned = Self;
40103
40104        #[inline(always)]
40105        fn inline_align(_context: fidl::encoding::Context) -> usize {
40106            8
40107        }
40108
40109        #[inline(always)]
40110        fn inline_size(_context: fidl::encoding::Context) -> usize {
40111            16
40112        }
40113    }
40114
40115    unsafe impl<D: fidl::encoding::ResourceDialect>
40116        fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>
40117        for &TableOfUnionThenXUnionThenTableThenXUnionThenUnion
40118    {
40119        unsafe fn encode(
40120            self,
40121            encoder: &mut fidl::encoding::Encoder<'_, D>,
40122            offset: usize,
40123            mut depth: fidl::encoding::Depth,
40124        ) -> fidl::Result<()> {
40125            encoder
40126                .debug_check_bounds::<TableOfUnionThenXUnionThenTableThenXUnionThenUnion>(offset);
40127            // Vector header
40128            let max_ordinal: u64 = self.max_ordinal_present();
40129            encoder.write_num(max_ordinal, offset);
40130            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40131            // Calling encoder.out_of_line_offset(0) is not allowed.
40132            if max_ordinal == 0 {
40133                return Ok(());
40134            }
40135            depth.increment()?;
40136            let envelope_size = 8;
40137            let bytes_len = max_ordinal as usize * envelope_size;
40138            #[allow(unused_variables)]
40139            let offset = encoder.out_of_line_offset(bytes_len);
40140            let mut _prev_end_offset: usize = 0;
40141            if 3 > max_ordinal {
40142                return Ok(());
40143            }
40144
40145            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40146            // are envelope_size bytes.
40147            let cur_offset: usize = (3 - 1) * envelope_size;
40148
40149            // Zero reserved fields.
40150            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40151
40152            // Safety:
40153            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40154            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40155            //   envelope_size bytes, there is always sufficient room.
40156            fidl::encoding::encode_in_envelope_optional::<UnionOfXUnionThenTableThenXUnionThenUnion, D>(
40157            self.member.as_ref().map(<UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow),
40158            encoder, offset + cur_offset, depth
40159        )?;
40160
40161            _prev_end_offset = cur_offset + envelope_size;
40162
40163            Ok(())
40164        }
40165    }
40166
40167    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40168        for TableOfUnionThenXUnionThenTableThenXUnionThenUnion
40169    {
40170        #[inline(always)]
40171        fn new_empty() -> Self {
40172            Self::default()
40173        }
40174
40175        unsafe fn decode(
40176            &mut self,
40177            decoder: &mut fidl::encoding::Decoder<'_, D>,
40178            offset: usize,
40179            mut depth: fidl::encoding::Depth,
40180        ) -> fidl::Result<()> {
40181            decoder.debug_check_bounds::<Self>(offset);
40182            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40183                None => return Err(fidl::Error::NotNullable),
40184                Some(len) => len,
40185            };
40186            // Calling decoder.out_of_line_offset(0) is not allowed.
40187            if len == 0 {
40188                return Ok(());
40189            };
40190            depth.increment()?;
40191            let envelope_size = 8;
40192            let bytes_len = len * envelope_size;
40193            let offset = decoder.out_of_line_offset(bytes_len)?;
40194            // Decode the envelope for each type.
40195            let mut _next_ordinal_to_read = 0;
40196            let mut next_offset = offset;
40197            let end_offset = offset + bytes_len;
40198            _next_ordinal_to_read += 1;
40199            if next_offset >= end_offset {
40200                return Ok(());
40201            }
40202
40203            // Decode unknown envelopes for gaps in ordinals.
40204            while _next_ordinal_to_read < 3 {
40205                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40206                _next_ordinal_to_read += 1;
40207                next_offset += envelope_size;
40208            }
40209
40210            let next_out_of_line = decoder.next_out_of_line();
40211            let handles_before = decoder.remaining_handles();
40212            if let Some((inlined, num_bytes, num_handles)) =
40213                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40214            {
40215                let member_inline_size = <UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40216                if inlined != (member_inline_size <= 4) {
40217                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40218                }
40219                let inner_offset;
40220                let mut inner_depth = depth.clone();
40221                if inlined {
40222                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40223                    inner_offset = next_offset;
40224                } else {
40225                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40226                    inner_depth.increment()?;
40227                }
40228                let val_ref = self.member.get_or_insert_with(|| {
40229                    fidl::new_empty!(UnionOfXUnionThenTableThenXUnionThenUnion, D)
40230                });
40231                fidl::decode!(
40232                    UnionOfXUnionThenTableThenXUnionThenUnion,
40233                    D,
40234                    val_ref,
40235                    decoder,
40236                    inner_offset,
40237                    inner_depth
40238                )?;
40239                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40240                {
40241                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40242                }
40243                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40244                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40245                }
40246            }
40247
40248            next_offset += envelope_size;
40249
40250            // Decode the remaining unknown envelopes.
40251            while next_offset < end_offset {
40252                _next_ordinal_to_read += 1;
40253                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40254                next_offset += envelope_size;
40255            }
40256
40257            Ok(())
40258        }
40259    }
40260
40261    impl TableOfXUnionThenUnion {
40262        #[inline(always)]
40263        fn max_ordinal_present(&self) -> u64 {
40264            if let Some(_) = self.member {
40265                return 2;
40266            }
40267            0
40268        }
40269    }
40270
40271    impl fidl::encoding::ValueTypeMarker for TableOfXUnionThenUnion {
40272        type Borrowed<'a> = &'a Self;
40273        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40274            value
40275        }
40276    }
40277
40278    unsafe impl fidl::encoding::TypeMarker for TableOfXUnionThenUnion {
40279        type Owned = Self;
40280
40281        #[inline(always)]
40282        fn inline_align(_context: fidl::encoding::Context) -> usize {
40283            8
40284        }
40285
40286        #[inline(always)]
40287        fn inline_size(_context: fidl::encoding::Context) -> usize {
40288            16
40289        }
40290    }
40291
40292    unsafe impl<D: fidl::encoding::ResourceDialect>
40293        fidl::encoding::Encode<TableOfXUnionThenUnion, D> for &TableOfXUnionThenUnion
40294    {
40295        unsafe fn encode(
40296            self,
40297            encoder: &mut fidl::encoding::Encoder<'_, D>,
40298            offset: usize,
40299            mut depth: fidl::encoding::Depth,
40300        ) -> fidl::Result<()> {
40301            encoder.debug_check_bounds::<TableOfXUnionThenUnion>(offset);
40302            // Vector header
40303            let max_ordinal: u64 = self.max_ordinal_present();
40304            encoder.write_num(max_ordinal, offset);
40305            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40306            // Calling encoder.out_of_line_offset(0) is not allowed.
40307            if max_ordinal == 0 {
40308                return Ok(());
40309            }
40310            depth.increment()?;
40311            let envelope_size = 8;
40312            let bytes_len = max_ordinal as usize * envelope_size;
40313            #[allow(unused_variables)]
40314            let offset = encoder.out_of_line_offset(bytes_len);
40315            let mut _prev_end_offset: usize = 0;
40316            if 2 > max_ordinal {
40317                return Ok(());
40318            }
40319
40320            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40321            // are envelope_size bytes.
40322            let cur_offset: usize = (2 - 1) * envelope_size;
40323
40324            // Zero reserved fields.
40325            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40326
40327            // Safety:
40328            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40329            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40330            //   envelope_size bytes, there is always sufficient room.
40331            fidl::encoding::encode_in_envelope_optional::<XUnionOfUnion, D>(
40332                self.member
40333                    .as_ref()
40334                    .map(<XUnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow),
40335                encoder,
40336                offset + cur_offset,
40337                depth,
40338            )?;
40339
40340            _prev_end_offset = cur_offset + envelope_size;
40341
40342            Ok(())
40343        }
40344    }
40345
40346    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40347        for TableOfXUnionThenUnion
40348    {
40349        #[inline(always)]
40350        fn new_empty() -> Self {
40351            Self::default()
40352        }
40353
40354        unsafe fn decode(
40355            &mut self,
40356            decoder: &mut fidl::encoding::Decoder<'_, D>,
40357            offset: usize,
40358            mut depth: fidl::encoding::Depth,
40359        ) -> fidl::Result<()> {
40360            decoder.debug_check_bounds::<Self>(offset);
40361            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40362                None => return Err(fidl::Error::NotNullable),
40363                Some(len) => len,
40364            };
40365            // Calling decoder.out_of_line_offset(0) is not allowed.
40366            if len == 0 {
40367                return Ok(());
40368            };
40369            depth.increment()?;
40370            let envelope_size = 8;
40371            let bytes_len = len * envelope_size;
40372            let offset = decoder.out_of_line_offset(bytes_len)?;
40373            // Decode the envelope for each type.
40374            let mut _next_ordinal_to_read = 0;
40375            let mut next_offset = offset;
40376            let end_offset = offset + bytes_len;
40377            _next_ordinal_to_read += 1;
40378            if next_offset >= end_offset {
40379                return Ok(());
40380            }
40381
40382            // Decode unknown envelopes for gaps in ordinals.
40383            while _next_ordinal_to_read < 2 {
40384                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40385                _next_ordinal_to_read += 1;
40386                next_offset += envelope_size;
40387            }
40388
40389            let next_out_of_line = decoder.next_out_of_line();
40390            let handles_before = decoder.remaining_handles();
40391            if let Some((inlined, num_bytes, num_handles)) =
40392                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40393            {
40394                let member_inline_size =
40395                    <XUnionOfUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40396                if inlined != (member_inline_size <= 4) {
40397                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40398                }
40399                let inner_offset;
40400                let mut inner_depth = depth.clone();
40401                if inlined {
40402                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40403                    inner_offset = next_offset;
40404                } else {
40405                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40406                    inner_depth.increment()?;
40407                }
40408                let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(XUnionOfUnion, D));
40409                fidl::decode!(XUnionOfUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
40410                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40411                {
40412                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40413                }
40414                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40415                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40416                }
40417            }
40418
40419            next_offset += envelope_size;
40420
40421            // Decode the remaining unknown envelopes.
40422            while next_offset < end_offset {
40423                _next_ordinal_to_read += 1;
40424                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40425                next_offset += envelope_size;
40426            }
40427
40428            Ok(())
40429        }
40430    }
40431
40432    impl TableStructWithReservedSandwich {
40433        #[inline(always)]
40434        fn max_ordinal_present(&self) -> u64 {
40435            if let Some(_) = self.s2 {
40436                return 3;
40437            }
40438            if let Some(_) = self.s1 {
40439                return 2;
40440            }
40441            0
40442        }
40443    }
40444
40445    impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwich {
40446        type Borrowed<'a> = &'a Self;
40447        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40448            value
40449        }
40450    }
40451
40452    unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwich {
40453        type Owned = Self;
40454
40455        #[inline(always)]
40456        fn inline_align(_context: fidl::encoding::Context) -> usize {
40457            8
40458        }
40459
40460        #[inline(always)]
40461        fn inline_size(_context: fidl::encoding::Context) -> usize {
40462            16
40463        }
40464    }
40465
40466    unsafe impl<D: fidl::encoding::ResourceDialect>
40467        fidl::encoding::Encode<TableStructWithReservedSandwich, D>
40468        for &TableStructWithReservedSandwich
40469    {
40470        unsafe fn encode(
40471            self,
40472            encoder: &mut fidl::encoding::Encoder<'_, D>,
40473            offset: usize,
40474            mut depth: fidl::encoding::Depth,
40475        ) -> fidl::Result<()> {
40476            encoder.debug_check_bounds::<TableStructWithReservedSandwich>(offset);
40477            // Vector header
40478            let max_ordinal: u64 = self.max_ordinal_present();
40479            encoder.write_num(max_ordinal, offset);
40480            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40481            // Calling encoder.out_of_line_offset(0) is not allowed.
40482            if max_ordinal == 0 {
40483                return Ok(());
40484            }
40485            depth.increment()?;
40486            let envelope_size = 8;
40487            let bytes_len = max_ordinal as usize * envelope_size;
40488            #[allow(unused_variables)]
40489            let offset = encoder.out_of_line_offset(bytes_len);
40490            let mut _prev_end_offset: usize = 0;
40491            if 2 > max_ordinal {
40492                return Ok(());
40493            }
40494
40495            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40496            // are envelope_size bytes.
40497            let cur_offset: usize = (2 - 1) * envelope_size;
40498
40499            // Zero reserved fields.
40500            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40501
40502            // Safety:
40503            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40504            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40505            //   envelope_size bytes, there is always sufficient room.
40506            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40507                self.s1
40508                    .as_ref()
40509                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40510                encoder,
40511                offset + cur_offset,
40512                depth,
40513            )?;
40514
40515            _prev_end_offset = cur_offset + envelope_size;
40516            if 3 > max_ordinal {
40517                return Ok(());
40518            }
40519
40520            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40521            // are envelope_size bytes.
40522            let cur_offset: usize = (3 - 1) * envelope_size;
40523
40524            // Zero reserved fields.
40525            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40526
40527            // Safety:
40528            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40529            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40530            //   envelope_size bytes, there is always sufficient room.
40531            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40532                self.s2
40533                    .as_ref()
40534                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40535                encoder,
40536                offset + cur_offset,
40537                depth,
40538            )?;
40539
40540            _prev_end_offset = cur_offset + envelope_size;
40541
40542            Ok(())
40543        }
40544    }
40545
40546    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40547        for TableStructWithReservedSandwich
40548    {
40549        #[inline(always)]
40550        fn new_empty() -> Self {
40551            Self::default()
40552        }
40553
40554        unsafe fn decode(
40555            &mut self,
40556            decoder: &mut fidl::encoding::Decoder<'_, D>,
40557            offset: usize,
40558            mut depth: fidl::encoding::Depth,
40559        ) -> fidl::Result<()> {
40560            decoder.debug_check_bounds::<Self>(offset);
40561            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40562                None => return Err(fidl::Error::NotNullable),
40563                Some(len) => len,
40564            };
40565            // Calling decoder.out_of_line_offset(0) is not allowed.
40566            if len == 0 {
40567                return Ok(());
40568            };
40569            depth.increment()?;
40570            let envelope_size = 8;
40571            let bytes_len = len * envelope_size;
40572            let offset = decoder.out_of_line_offset(bytes_len)?;
40573            // Decode the envelope for each type.
40574            let mut _next_ordinal_to_read = 0;
40575            let mut next_offset = offset;
40576            let end_offset = offset + bytes_len;
40577            _next_ordinal_to_read += 1;
40578            if next_offset >= end_offset {
40579                return Ok(());
40580            }
40581
40582            // Decode unknown envelopes for gaps in ordinals.
40583            while _next_ordinal_to_read < 2 {
40584                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40585                _next_ordinal_to_read += 1;
40586                next_offset += envelope_size;
40587            }
40588
40589            let next_out_of_line = decoder.next_out_of_line();
40590            let handles_before = decoder.remaining_handles();
40591            if let Some((inlined, num_bytes, num_handles)) =
40592                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40593            {
40594                let member_inline_size =
40595                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40596                if inlined != (member_inline_size <= 4) {
40597                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40598                }
40599                let inner_offset;
40600                let mut inner_depth = depth.clone();
40601                if inlined {
40602                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40603                    inner_offset = next_offset;
40604                } else {
40605                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40606                    inner_depth.increment()?;
40607                }
40608                let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40609                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40610                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40611                {
40612                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40613                }
40614                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40615                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40616                }
40617            }
40618
40619            next_offset += envelope_size;
40620            _next_ordinal_to_read += 1;
40621            if next_offset >= end_offset {
40622                return Ok(());
40623            }
40624
40625            // Decode unknown envelopes for gaps in ordinals.
40626            while _next_ordinal_to_read < 3 {
40627                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40628                _next_ordinal_to_read += 1;
40629                next_offset += envelope_size;
40630            }
40631
40632            let next_out_of_line = decoder.next_out_of_line();
40633            let handles_before = decoder.remaining_handles();
40634            if let Some((inlined, num_bytes, num_handles)) =
40635                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40636            {
40637                let member_inline_size =
40638                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40639                if inlined != (member_inline_size <= 4) {
40640                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40641                }
40642                let inner_offset;
40643                let mut inner_depth = depth.clone();
40644                if inlined {
40645                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40646                    inner_offset = next_offset;
40647                } else {
40648                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40649                    inner_depth.increment()?;
40650                }
40651                let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40652                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40653                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40654                {
40655                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40656                }
40657                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40658                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40659                }
40660            }
40661
40662            next_offset += envelope_size;
40663
40664            // Decode the remaining unknown envelopes.
40665            while next_offset < end_offset {
40666                _next_ordinal_to_read += 1;
40667                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40668                next_offset += envelope_size;
40669            }
40670
40671            Ok(())
40672        }
40673    }
40674
40675    impl TableStructWithUint32Sandwich {
40676        #[inline(always)]
40677        fn max_ordinal_present(&self) -> u64 {
40678            if let Some(_) = self.i2 {
40679                return 4;
40680            }
40681            if let Some(_) = self.s2 {
40682                return 3;
40683            }
40684            if let Some(_) = self.s1 {
40685                return 2;
40686            }
40687            if let Some(_) = self.i {
40688                return 1;
40689            }
40690            0
40691        }
40692    }
40693
40694    impl fidl::encoding::ValueTypeMarker for TableStructWithUint32Sandwich {
40695        type Borrowed<'a> = &'a Self;
40696        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40697            value
40698        }
40699    }
40700
40701    unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32Sandwich {
40702        type Owned = Self;
40703
40704        #[inline(always)]
40705        fn inline_align(_context: fidl::encoding::Context) -> usize {
40706            8
40707        }
40708
40709        #[inline(always)]
40710        fn inline_size(_context: fidl::encoding::Context) -> usize {
40711            16
40712        }
40713    }
40714
40715    unsafe impl<D: fidl::encoding::ResourceDialect>
40716        fidl::encoding::Encode<TableStructWithUint32Sandwich, D>
40717        for &TableStructWithUint32Sandwich
40718    {
40719        unsafe fn encode(
40720            self,
40721            encoder: &mut fidl::encoding::Encoder<'_, D>,
40722            offset: usize,
40723            mut depth: fidl::encoding::Depth,
40724        ) -> fidl::Result<()> {
40725            encoder.debug_check_bounds::<TableStructWithUint32Sandwich>(offset);
40726            // Vector header
40727            let max_ordinal: u64 = self.max_ordinal_present();
40728            encoder.write_num(max_ordinal, offset);
40729            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40730            // Calling encoder.out_of_line_offset(0) is not allowed.
40731            if max_ordinal == 0 {
40732                return Ok(());
40733            }
40734            depth.increment()?;
40735            let envelope_size = 8;
40736            let bytes_len = max_ordinal as usize * envelope_size;
40737            #[allow(unused_variables)]
40738            let offset = encoder.out_of_line_offset(bytes_len);
40739            let mut _prev_end_offset: usize = 0;
40740            if 1 > max_ordinal {
40741                return Ok(());
40742            }
40743
40744            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40745            // are envelope_size bytes.
40746            let cur_offset: usize = (1 - 1) * envelope_size;
40747
40748            // Zero reserved fields.
40749            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40750
40751            // Safety:
40752            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40753            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40754            //   envelope_size bytes, there is always sufficient room.
40755            fidl::encoding::encode_in_envelope_optional::<u32, D>(
40756                self.i.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
40757                encoder,
40758                offset + cur_offset,
40759                depth,
40760            )?;
40761
40762            _prev_end_offset = cur_offset + envelope_size;
40763            if 2 > max_ordinal {
40764                return Ok(());
40765            }
40766
40767            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40768            // are envelope_size bytes.
40769            let cur_offset: usize = (2 - 1) * envelope_size;
40770
40771            // Zero reserved fields.
40772            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40773
40774            // Safety:
40775            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40776            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40777            //   envelope_size bytes, there is always sufficient room.
40778            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40779                self.s1
40780                    .as_ref()
40781                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40782                encoder,
40783                offset + cur_offset,
40784                depth,
40785            )?;
40786
40787            _prev_end_offset = cur_offset + envelope_size;
40788            if 3 > max_ordinal {
40789                return Ok(());
40790            }
40791
40792            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40793            // are envelope_size bytes.
40794            let cur_offset: usize = (3 - 1) * envelope_size;
40795
40796            // Zero reserved fields.
40797            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40798
40799            // Safety:
40800            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40801            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40802            //   envelope_size bytes, there is always sufficient room.
40803            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40804                self.s2
40805                    .as_ref()
40806                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40807                encoder,
40808                offset + cur_offset,
40809                depth,
40810            )?;
40811
40812            _prev_end_offset = cur_offset + envelope_size;
40813            if 4 > max_ordinal {
40814                return Ok(());
40815            }
40816
40817            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40818            // are envelope_size bytes.
40819            let cur_offset: usize = (4 - 1) * envelope_size;
40820
40821            // Zero reserved fields.
40822            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40823
40824            // Safety:
40825            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40826            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40827            //   envelope_size bytes, there is always sufficient room.
40828            fidl::encoding::encode_in_envelope_optional::<u32, D>(
40829                self.i2.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
40830                encoder,
40831                offset + cur_offset,
40832                depth,
40833            )?;
40834
40835            _prev_end_offset = cur_offset + envelope_size;
40836
40837            Ok(())
40838        }
40839    }
40840
40841    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40842        for TableStructWithUint32Sandwich
40843    {
40844        #[inline(always)]
40845        fn new_empty() -> Self {
40846            Self::default()
40847        }
40848
40849        unsafe fn decode(
40850            &mut self,
40851            decoder: &mut fidl::encoding::Decoder<'_, D>,
40852            offset: usize,
40853            mut depth: fidl::encoding::Depth,
40854        ) -> fidl::Result<()> {
40855            decoder.debug_check_bounds::<Self>(offset);
40856            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40857                None => return Err(fidl::Error::NotNullable),
40858                Some(len) => len,
40859            };
40860            // Calling decoder.out_of_line_offset(0) is not allowed.
40861            if len == 0 {
40862                return Ok(());
40863            };
40864            depth.increment()?;
40865            let envelope_size = 8;
40866            let bytes_len = len * envelope_size;
40867            let offset = decoder.out_of_line_offset(bytes_len)?;
40868            // Decode the envelope for each type.
40869            let mut _next_ordinal_to_read = 0;
40870            let mut next_offset = offset;
40871            let end_offset = offset + bytes_len;
40872            _next_ordinal_to_read += 1;
40873            if next_offset >= end_offset {
40874                return Ok(());
40875            }
40876
40877            // Decode unknown envelopes for gaps in ordinals.
40878            while _next_ordinal_to_read < 1 {
40879                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40880                _next_ordinal_to_read += 1;
40881                next_offset += envelope_size;
40882            }
40883
40884            let next_out_of_line = decoder.next_out_of_line();
40885            let handles_before = decoder.remaining_handles();
40886            if let Some((inlined, num_bytes, num_handles)) =
40887                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40888            {
40889                let member_inline_size =
40890                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40891                if inlined != (member_inline_size <= 4) {
40892                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40893                }
40894                let inner_offset;
40895                let mut inner_depth = depth.clone();
40896                if inlined {
40897                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40898                    inner_offset = next_offset;
40899                } else {
40900                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40901                    inner_depth.increment()?;
40902                }
40903                let val_ref = self.i.get_or_insert_with(|| fidl::new_empty!(u32, D));
40904                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
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            // Decode unknown envelopes for gaps in ordinals.
40921            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                    <StructSize3Align1 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.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40947                fidl::decode!(StructSize3Align1, 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            // Decode unknown envelopes for gaps in ordinals.
40964            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 =
40976                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40977                if inlined != (member_inline_size <= 4) {
40978                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40979                }
40980                let inner_offset;
40981                let mut inner_depth = depth.clone();
40982                if inlined {
40983                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40984                    inner_offset = next_offset;
40985                } else {
40986                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40987                    inner_depth.increment()?;
40988                }
40989                let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40990                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40991                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40992                {
40993                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40994                }
40995                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40996                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40997                }
40998            }
40999
41000            next_offset += envelope_size;
41001            _next_ordinal_to_read += 1;
41002            if next_offset >= end_offset {
41003                return Ok(());
41004            }
41005
41006            // Decode unknown envelopes for gaps in ordinals.
41007            while _next_ordinal_to_read < 4 {
41008                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41009                _next_ordinal_to_read += 1;
41010                next_offset += envelope_size;
41011            }
41012
41013            let next_out_of_line = decoder.next_out_of_line();
41014            let handles_before = decoder.remaining_handles();
41015            if let Some((inlined, num_bytes, num_handles)) =
41016                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41017            {
41018                let member_inline_size =
41019                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41020                if inlined != (member_inline_size <= 4) {
41021                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41022                }
41023                let inner_offset;
41024                let mut inner_depth = depth.clone();
41025                if inlined {
41026                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41027                    inner_offset = next_offset;
41028                } else {
41029                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41030                    inner_depth.increment()?;
41031                }
41032                let val_ref = self.i2.get_or_insert_with(|| fidl::new_empty!(u32, D));
41033                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
41034                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41035                {
41036                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41037                }
41038                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41039                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41040                }
41041            }
41042
41043            next_offset += envelope_size;
41044
41045            // Decode the remaining unknown envelopes.
41046            while next_offset < end_offset {
41047                _next_ordinal_to_read += 1;
41048                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41049                next_offset += envelope_size;
41050            }
41051
41052            Ok(())
41053        }
41054    }
41055
41056    impl TableWithEmptyStruct {
41057        #[inline(always)]
41058        fn max_ordinal_present(&self) -> u64 {
41059            if let Some(_) = self.s {
41060                return 1;
41061            }
41062            0
41063        }
41064    }
41065
41066    impl fidl::encoding::ValueTypeMarker for TableWithEmptyStruct {
41067        type Borrowed<'a> = &'a Self;
41068        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41069            value
41070        }
41071    }
41072
41073    unsafe impl fidl::encoding::TypeMarker for TableWithEmptyStruct {
41074        type Owned = Self;
41075
41076        #[inline(always)]
41077        fn inline_align(_context: fidl::encoding::Context) -> usize {
41078            8
41079        }
41080
41081        #[inline(always)]
41082        fn inline_size(_context: fidl::encoding::Context) -> usize {
41083            16
41084        }
41085    }
41086
41087    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithEmptyStruct, D>
41088        for &TableWithEmptyStruct
41089    {
41090        unsafe fn encode(
41091            self,
41092            encoder: &mut fidl::encoding::Encoder<'_, D>,
41093            offset: usize,
41094            mut depth: fidl::encoding::Depth,
41095        ) -> fidl::Result<()> {
41096            encoder.debug_check_bounds::<TableWithEmptyStruct>(offset);
41097            // Vector header
41098            let max_ordinal: u64 = self.max_ordinal_present();
41099            encoder.write_num(max_ordinal, offset);
41100            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41101            // Calling encoder.out_of_line_offset(0) is not allowed.
41102            if max_ordinal == 0 {
41103                return Ok(());
41104            }
41105            depth.increment()?;
41106            let envelope_size = 8;
41107            let bytes_len = max_ordinal as usize * envelope_size;
41108            #[allow(unused_variables)]
41109            let offset = encoder.out_of_line_offset(bytes_len);
41110            let mut _prev_end_offset: usize = 0;
41111            if 1 > max_ordinal {
41112                return Ok(());
41113            }
41114
41115            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41116            // are envelope_size bytes.
41117            let cur_offset: usize = (1 - 1) * envelope_size;
41118
41119            // Zero reserved fields.
41120            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41121
41122            // Safety:
41123            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41124            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41125            //   envelope_size bytes, there is always sufficient room.
41126            fidl::encoding::encode_in_envelope_optional::<EmptyStruct, D>(
41127                self.s.as_ref().map(<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow),
41128                encoder,
41129                offset + cur_offset,
41130                depth,
41131            )?;
41132
41133            _prev_end_offset = cur_offset + envelope_size;
41134
41135            Ok(())
41136        }
41137    }
41138
41139    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithEmptyStruct {
41140        #[inline(always)]
41141        fn new_empty() -> Self {
41142            Self::default()
41143        }
41144
41145        unsafe fn decode(
41146            &mut self,
41147            decoder: &mut fidl::encoding::Decoder<'_, D>,
41148            offset: usize,
41149            mut depth: fidl::encoding::Depth,
41150        ) -> fidl::Result<()> {
41151            decoder.debug_check_bounds::<Self>(offset);
41152            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41153                None => return Err(fidl::Error::NotNullable),
41154                Some(len) => len,
41155            };
41156            // Calling decoder.out_of_line_offset(0) is not allowed.
41157            if len == 0 {
41158                return Ok(());
41159            };
41160            depth.increment()?;
41161            let envelope_size = 8;
41162            let bytes_len = len * envelope_size;
41163            let offset = decoder.out_of_line_offset(bytes_len)?;
41164            // Decode the envelope for each type.
41165            let mut _next_ordinal_to_read = 0;
41166            let mut next_offset = offset;
41167            let end_offset = offset + bytes_len;
41168            _next_ordinal_to_read += 1;
41169            if next_offset >= end_offset {
41170                return Ok(());
41171            }
41172
41173            // Decode unknown envelopes for gaps in ordinals.
41174            while _next_ordinal_to_read < 1 {
41175                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41176                _next_ordinal_to_read += 1;
41177                next_offset += envelope_size;
41178            }
41179
41180            let next_out_of_line = decoder.next_out_of_line();
41181            let handles_before = decoder.remaining_handles();
41182            if let Some((inlined, num_bytes, num_handles)) =
41183                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41184            {
41185                let member_inline_size =
41186                    <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41187                if inlined != (member_inline_size <= 4) {
41188                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41189                }
41190                let inner_offset;
41191                let mut inner_depth = depth.clone();
41192                if inlined {
41193                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41194                    inner_offset = next_offset;
41195                } else {
41196                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41197                    inner_depth.increment()?;
41198                }
41199                let val_ref = self.s.get_or_insert_with(|| fidl::new_empty!(EmptyStruct, D));
41200                fidl::decode!(EmptyStruct, D, val_ref, decoder, inner_offset, inner_depth)?;
41201                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41202                {
41203                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41204                }
41205                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41206                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41207                }
41208            }
41209
41210            next_offset += envelope_size;
41211
41212            // Decode the remaining unknown envelopes.
41213            while next_offset < end_offset {
41214                _next_ordinal_to_read += 1;
41215                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41216                next_offset += envelope_size;
41217            }
41218
41219            Ok(())
41220        }
41221    }
41222
41223    impl TableWithGaps {
41224        #[inline(always)]
41225        fn max_ordinal_present(&self) -> u64 {
41226            if let Some(_) = self.fourth {
41227                return 4;
41228            }
41229            if let Some(_) = self.second {
41230                return 2;
41231            }
41232            0
41233        }
41234    }
41235
41236    impl fidl::encoding::ValueTypeMarker for TableWithGaps {
41237        type Borrowed<'a> = &'a Self;
41238        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41239            value
41240        }
41241    }
41242
41243    unsafe impl fidl::encoding::TypeMarker for TableWithGaps {
41244        type Owned = Self;
41245
41246        #[inline(always)]
41247        fn inline_align(_context: fidl::encoding::Context) -> usize {
41248            8
41249        }
41250
41251        #[inline(always)]
41252        fn inline_size(_context: fidl::encoding::Context) -> usize {
41253            16
41254        }
41255    }
41256
41257    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithGaps, D>
41258        for &TableWithGaps
41259    {
41260        unsafe fn encode(
41261            self,
41262            encoder: &mut fidl::encoding::Encoder<'_, D>,
41263            offset: usize,
41264            mut depth: fidl::encoding::Depth,
41265        ) -> fidl::Result<()> {
41266            encoder.debug_check_bounds::<TableWithGaps>(offset);
41267            // Vector header
41268            let max_ordinal: u64 = self.max_ordinal_present();
41269            encoder.write_num(max_ordinal, offset);
41270            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41271            // Calling encoder.out_of_line_offset(0) is not allowed.
41272            if max_ordinal == 0 {
41273                return Ok(());
41274            }
41275            depth.increment()?;
41276            let envelope_size = 8;
41277            let bytes_len = max_ordinal as usize * envelope_size;
41278            #[allow(unused_variables)]
41279            let offset = encoder.out_of_line_offset(bytes_len);
41280            let mut _prev_end_offset: usize = 0;
41281            if 2 > max_ordinal {
41282                return Ok(());
41283            }
41284
41285            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41286            // are envelope_size bytes.
41287            let cur_offset: usize = (2 - 1) * envelope_size;
41288
41289            // Zero reserved fields.
41290            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41291
41292            // Safety:
41293            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41294            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41295            //   envelope_size bytes, there is always sufficient room.
41296            fidl::encoding::encode_in_envelope_optional::<i32, D>(
41297                self.second.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
41298                encoder,
41299                offset + cur_offset,
41300                depth,
41301            )?;
41302
41303            _prev_end_offset = cur_offset + envelope_size;
41304            if 4 > max_ordinal {
41305                return Ok(());
41306            }
41307
41308            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41309            // are envelope_size bytes.
41310            let cur_offset: usize = (4 - 1) * envelope_size;
41311
41312            // Zero reserved fields.
41313            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41314
41315            // Safety:
41316            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41317            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41318            //   envelope_size bytes, there is always sufficient room.
41319            fidl::encoding::encode_in_envelope_optional::<i32, D>(
41320                self.fourth.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
41321                encoder,
41322                offset + cur_offset,
41323                depth,
41324            )?;
41325
41326            _prev_end_offset = cur_offset + envelope_size;
41327
41328            Ok(())
41329        }
41330    }
41331
41332    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithGaps {
41333        #[inline(always)]
41334        fn new_empty() -> Self {
41335            Self::default()
41336        }
41337
41338        unsafe fn decode(
41339            &mut self,
41340            decoder: &mut fidl::encoding::Decoder<'_, D>,
41341            offset: usize,
41342            mut depth: fidl::encoding::Depth,
41343        ) -> fidl::Result<()> {
41344            decoder.debug_check_bounds::<Self>(offset);
41345            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41346                None => return Err(fidl::Error::NotNullable),
41347                Some(len) => len,
41348            };
41349            // Calling decoder.out_of_line_offset(0) is not allowed.
41350            if len == 0 {
41351                return Ok(());
41352            };
41353            depth.increment()?;
41354            let envelope_size = 8;
41355            let bytes_len = len * envelope_size;
41356            let offset = decoder.out_of_line_offset(bytes_len)?;
41357            // Decode the envelope for each type.
41358            let mut _next_ordinal_to_read = 0;
41359            let mut next_offset = offset;
41360            let end_offset = offset + bytes_len;
41361            _next_ordinal_to_read += 1;
41362            if next_offset >= end_offset {
41363                return Ok(());
41364            }
41365
41366            // Decode unknown envelopes for gaps in ordinals.
41367            while _next_ordinal_to_read < 2 {
41368                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41369                _next_ordinal_to_read += 1;
41370                next_offset += envelope_size;
41371            }
41372
41373            let next_out_of_line = decoder.next_out_of_line();
41374            let handles_before = decoder.remaining_handles();
41375            if let Some((inlined, num_bytes, num_handles)) =
41376                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41377            {
41378                let member_inline_size =
41379                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41380                if inlined != (member_inline_size <= 4) {
41381                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41382                }
41383                let inner_offset;
41384                let mut inner_depth = depth.clone();
41385                if inlined {
41386                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41387                    inner_offset = next_offset;
41388                } else {
41389                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41390                    inner_depth.increment()?;
41391                }
41392                let val_ref = self.second.get_or_insert_with(|| fidl::new_empty!(i32, D));
41393                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
41394                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41395                {
41396                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41397                }
41398                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41399                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41400                }
41401            }
41402
41403            next_offset += envelope_size;
41404            _next_ordinal_to_read += 1;
41405            if next_offset >= end_offset {
41406                return Ok(());
41407            }
41408
41409            // Decode unknown envelopes for gaps in ordinals.
41410            while _next_ordinal_to_read < 4 {
41411                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41412                _next_ordinal_to_read += 1;
41413                next_offset += envelope_size;
41414            }
41415
41416            let next_out_of_line = decoder.next_out_of_line();
41417            let handles_before = decoder.remaining_handles();
41418            if let Some((inlined, num_bytes, num_handles)) =
41419                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41420            {
41421                let member_inline_size =
41422                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41423                if inlined != (member_inline_size <= 4) {
41424                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41425                }
41426                let inner_offset;
41427                let mut inner_depth = depth.clone();
41428                if inlined {
41429                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41430                    inner_offset = next_offset;
41431                } else {
41432                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41433                    inner_depth.increment()?;
41434                }
41435                let val_ref = self.fourth.get_or_insert_with(|| fidl::new_empty!(i32, D));
41436                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
41437                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41438                {
41439                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41440                }
41441                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41442                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41443                }
41444            }
41445
41446            next_offset += envelope_size;
41447
41448            // Decode the remaining unknown envelopes.
41449            while next_offset < end_offset {
41450                _next_ordinal_to_read += 1;
41451                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41452                next_offset += envelope_size;
41453            }
41454
41455            Ok(())
41456        }
41457    }
41458
41459    impl TableWithReservedFieldThenUnion {
41460        #[inline(always)]
41461        fn max_ordinal_present(&self) -> u64 {
41462            if let Some(_) = self.uv {
41463                return 2;
41464            }
41465            0
41466        }
41467    }
41468
41469    impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnion {
41470        type Borrowed<'a> = &'a Self;
41471        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41472            value
41473        }
41474    }
41475
41476    unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnion {
41477        type Owned = Self;
41478
41479        #[inline(always)]
41480        fn inline_align(_context: fidl::encoding::Context) -> usize {
41481            8
41482        }
41483
41484        #[inline(always)]
41485        fn inline_size(_context: fidl::encoding::Context) -> usize {
41486            16
41487        }
41488    }
41489
41490    unsafe impl<D: fidl::encoding::ResourceDialect>
41491        fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>
41492        for &TableWithReservedFieldThenUnion
41493    {
41494        unsafe fn encode(
41495            self,
41496            encoder: &mut fidl::encoding::Encoder<'_, D>,
41497            offset: usize,
41498            mut depth: fidl::encoding::Depth,
41499        ) -> fidl::Result<()> {
41500            encoder.debug_check_bounds::<TableWithReservedFieldThenUnion>(offset);
41501            // Vector header
41502            let max_ordinal: u64 = self.max_ordinal_present();
41503            encoder.write_num(max_ordinal, offset);
41504            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41505            // Calling encoder.out_of_line_offset(0) is not allowed.
41506            if max_ordinal == 0 {
41507                return Ok(());
41508            }
41509            depth.increment()?;
41510            let envelope_size = 8;
41511            let bytes_len = max_ordinal as usize * envelope_size;
41512            #[allow(unused_variables)]
41513            let offset = encoder.out_of_line_offset(bytes_len);
41514            let mut _prev_end_offset: usize = 0;
41515            if 2 > max_ordinal {
41516                return Ok(());
41517            }
41518
41519            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41520            // are envelope_size bytes.
41521            let cur_offset: usize = (2 - 1) * envelope_size;
41522
41523            // Zero reserved fields.
41524            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41525
41526            // Safety:
41527            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41528            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41529            //   envelope_size bytes, there is always sufficient room.
41530            fidl::encoding::encode_in_envelope_optional::<UnionSize8Align4, D>(
41531                self.uv.as_ref().map(<UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow),
41532                encoder,
41533                offset + cur_offset,
41534                depth,
41535            )?;
41536
41537            _prev_end_offset = cur_offset + envelope_size;
41538
41539            Ok(())
41540        }
41541    }
41542
41543    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41544        for TableWithReservedFieldThenUnion
41545    {
41546        #[inline(always)]
41547        fn new_empty() -> Self {
41548            Self::default()
41549        }
41550
41551        unsafe fn decode(
41552            &mut self,
41553            decoder: &mut fidl::encoding::Decoder<'_, D>,
41554            offset: usize,
41555            mut depth: fidl::encoding::Depth,
41556        ) -> fidl::Result<()> {
41557            decoder.debug_check_bounds::<Self>(offset);
41558            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41559                None => return Err(fidl::Error::NotNullable),
41560                Some(len) => len,
41561            };
41562            // Calling decoder.out_of_line_offset(0) is not allowed.
41563            if len == 0 {
41564                return Ok(());
41565            };
41566            depth.increment()?;
41567            let envelope_size = 8;
41568            let bytes_len = len * envelope_size;
41569            let offset = decoder.out_of_line_offset(bytes_len)?;
41570            // Decode the envelope for each type.
41571            let mut _next_ordinal_to_read = 0;
41572            let mut next_offset = offset;
41573            let end_offset = offset + bytes_len;
41574            _next_ordinal_to_read += 1;
41575            if next_offset >= end_offset {
41576                return Ok(());
41577            }
41578
41579            // Decode unknown envelopes for gaps in ordinals.
41580            while _next_ordinal_to_read < 2 {
41581                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41582                _next_ordinal_to_read += 1;
41583                next_offset += envelope_size;
41584            }
41585
41586            let next_out_of_line = decoder.next_out_of_line();
41587            let handles_before = decoder.remaining_handles();
41588            if let Some((inlined, num_bytes, num_handles)) =
41589                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41590            {
41591                let member_inline_size =
41592                    <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41593                if inlined != (member_inline_size <= 4) {
41594                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41595                }
41596                let inner_offset;
41597                let mut inner_depth = depth.clone();
41598                if inlined {
41599                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41600                    inner_offset = next_offset;
41601                } else {
41602                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41603                    inner_depth.increment()?;
41604                }
41605                let val_ref = self.uv.get_or_insert_with(|| fidl::new_empty!(UnionSize8Align4, D));
41606                fidl::decode!(UnionSize8Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
41607                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41608                {
41609                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41610                }
41611                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41612                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41613                }
41614            }
41615
41616            next_offset += envelope_size;
41617
41618            // Decode the remaining unknown envelopes.
41619            while next_offset < end_offset {
41620                _next_ordinal_to_read += 1;
41621                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41622                next_offset += envelope_size;
41623            }
41624
41625            Ok(())
41626        }
41627    }
41628
41629    impl TableWithStringAndVector {
41630        #[inline(always)]
41631        fn max_ordinal_present(&self) -> u64 {
41632            if let Some(_) = self.baz {
41633                return 3;
41634            }
41635            if let Some(_) = self.bar {
41636                return 2;
41637            }
41638            if let Some(_) = self.foo {
41639                return 1;
41640            }
41641            0
41642        }
41643    }
41644
41645    impl fidl::encoding::ValueTypeMarker for TableWithStringAndVector {
41646        type Borrowed<'a> = &'a Self;
41647        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41648            value
41649        }
41650    }
41651
41652    unsafe impl fidl::encoding::TypeMarker for TableWithStringAndVector {
41653        type Owned = Self;
41654
41655        #[inline(always)]
41656        fn inline_align(_context: fidl::encoding::Context) -> usize {
41657            8
41658        }
41659
41660        #[inline(always)]
41661        fn inline_size(_context: fidl::encoding::Context) -> usize {
41662            16
41663        }
41664    }
41665
41666    unsafe impl<D: fidl::encoding::ResourceDialect>
41667        fidl::encoding::Encode<TableWithStringAndVector, D> for &TableWithStringAndVector
41668    {
41669        unsafe fn encode(
41670            self,
41671            encoder: &mut fidl::encoding::Encoder<'_, D>,
41672            offset: usize,
41673            mut depth: fidl::encoding::Depth,
41674        ) -> fidl::Result<()> {
41675            encoder.debug_check_bounds::<TableWithStringAndVector>(offset);
41676            // Vector header
41677            let max_ordinal: u64 = self.max_ordinal_present();
41678            encoder.write_num(max_ordinal, offset);
41679            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41680            // Calling encoder.out_of_line_offset(0) is not allowed.
41681            if max_ordinal == 0 {
41682                return Ok(());
41683            }
41684            depth.increment()?;
41685            let envelope_size = 8;
41686            let bytes_len = max_ordinal as usize * envelope_size;
41687            #[allow(unused_variables)]
41688            let offset = encoder.out_of_line_offset(bytes_len);
41689            let mut _prev_end_offset: usize = 0;
41690            if 1 > max_ordinal {
41691                return Ok(());
41692            }
41693
41694            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41695            // are envelope_size bytes.
41696            let cur_offset: usize = (1 - 1) * envelope_size;
41697
41698            // Zero reserved fields.
41699            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41700
41701            // Safety:
41702            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41703            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41704            //   envelope_size bytes, there is always sufficient room.
41705            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
41706                self.foo.as_ref().map(
41707                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
41708                ),
41709                encoder,
41710                offset + cur_offset,
41711                depth,
41712            )?;
41713
41714            _prev_end_offset = cur_offset + envelope_size;
41715            if 2 > max_ordinal {
41716                return Ok(());
41717            }
41718
41719            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41720            // are envelope_size bytes.
41721            let cur_offset: usize = (2 - 1) * envelope_size;
41722
41723            // Zero reserved fields.
41724            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41725
41726            // Safety:
41727            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41728            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41729            //   envelope_size bytes, there is always sufficient room.
41730            fidl::encoding::encode_in_envelope_optional::<i32, D>(
41731                self.bar.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
41732                encoder,
41733                offset + cur_offset,
41734                depth,
41735            )?;
41736
41737            _prev_end_offset = cur_offset + envelope_size;
41738            if 3 > max_ordinal {
41739                return Ok(());
41740            }
41741
41742            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41743            // are envelope_size bytes.
41744            let cur_offset: usize = (3 - 1) * envelope_size;
41745
41746            // Zero reserved fields.
41747            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41748
41749            // Safety:
41750            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41751            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41752            //   envelope_size bytes, there is always sufficient room.
41753            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
41754            self.baz.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
41755            encoder, offset + cur_offset, depth
41756        )?;
41757
41758            _prev_end_offset = cur_offset + envelope_size;
41759
41760            Ok(())
41761        }
41762    }
41763
41764    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41765        for TableWithStringAndVector
41766    {
41767        #[inline(always)]
41768        fn new_empty() -> Self {
41769            Self::default()
41770        }
41771
41772        unsafe fn decode(
41773            &mut self,
41774            decoder: &mut fidl::encoding::Decoder<'_, D>,
41775            offset: usize,
41776            mut depth: fidl::encoding::Depth,
41777        ) -> fidl::Result<()> {
41778            decoder.debug_check_bounds::<Self>(offset);
41779            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41780                None => return Err(fidl::Error::NotNullable),
41781                Some(len) => len,
41782            };
41783            // Calling decoder.out_of_line_offset(0) is not allowed.
41784            if len == 0 {
41785                return Ok(());
41786            };
41787            depth.increment()?;
41788            let envelope_size = 8;
41789            let bytes_len = len * envelope_size;
41790            let offset = decoder.out_of_line_offset(bytes_len)?;
41791            // Decode the envelope for each type.
41792            let mut _next_ordinal_to_read = 0;
41793            let mut next_offset = offset;
41794            let end_offset = offset + bytes_len;
41795            _next_ordinal_to_read += 1;
41796            if next_offset >= end_offset {
41797                return Ok(());
41798            }
41799
41800            // Decode unknown envelopes for gaps in ordinals.
41801            while _next_ordinal_to_read < 1 {
41802                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41803                _next_ordinal_to_read += 1;
41804                next_offset += envelope_size;
41805            }
41806
41807            let next_out_of_line = decoder.next_out_of_line();
41808            let handles_before = decoder.remaining_handles();
41809            if let Some((inlined, num_bytes, num_handles)) =
41810                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41811            {
41812                let member_inline_size =
41813                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
41814                        decoder.context,
41815                    );
41816                if inlined != (member_inline_size <= 4) {
41817                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41818                }
41819                let inner_offset;
41820                let mut inner_depth = depth.clone();
41821                if inlined {
41822                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41823                    inner_offset = next_offset;
41824                } else {
41825                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41826                    inner_depth.increment()?;
41827                }
41828                let val_ref = self
41829                    .foo
41830                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
41831                fidl::decode!(
41832                    fidl::encoding::UnboundedString,
41833                    D,
41834                    val_ref,
41835                    decoder,
41836                    inner_offset,
41837                    inner_depth
41838                )?;
41839                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41840                {
41841                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41842                }
41843                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41844                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41845                }
41846            }
41847
41848            next_offset += envelope_size;
41849            _next_ordinal_to_read += 1;
41850            if next_offset >= end_offset {
41851                return Ok(());
41852            }
41853
41854            // Decode unknown envelopes for gaps in ordinals.
41855            while _next_ordinal_to_read < 2 {
41856                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41857                _next_ordinal_to_read += 1;
41858                next_offset += envelope_size;
41859            }
41860
41861            let next_out_of_line = decoder.next_out_of_line();
41862            let handles_before = decoder.remaining_handles();
41863            if let Some((inlined, num_bytes, num_handles)) =
41864                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41865            {
41866                let member_inline_size =
41867                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41868                if inlined != (member_inline_size <= 4) {
41869                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41870                }
41871                let inner_offset;
41872                let mut inner_depth = depth.clone();
41873                if inlined {
41874                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41875                    inner_offset = next_offset;
41876                } else {
41877                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41878                    inner_depth.increment()?;
41879                }
41880                let val_ref = self.bar.get_or_insert_with(|| fidl::new_empty!(i32, D));
41881                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
41882                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41883                {
41884                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41885                }
41886                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41887                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41888                }
41889            }
41890
41891            next_offset += envelope_size;
41892            _next_ordinal_to_read += 1;
41893            if next_offset >= end_offset {
41894                return Ok(());
41895            }
41896
41897            // Decode unknown envelopes for gaps in ordinals.
41898            while _next_ordinal_to_read < 3 {
41899                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41900                _next_ordinal_to_read += 1;
41901                next_offset += envelope_size;
41902            }
41903
41904            let next_out_of_line = decoder.next_out_of_line();
41905            let handles_before = decoder.remaining_handles();
41906            if let Some((inlined, num_bytes, num_handles)) =
41907                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41908            {
41909                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41910                if inlined != (member_inline_size <= 4) {
41911                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41912                }
41913                let inner_offset;
41914                let mut inner_depth = depth.clone();
41915                if inlined {
41916                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41917                    inner_offset = next_offset;
41918                } else {
41919                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41920                    inner_depth.increment()?;
41921                }
41922                let val_ref = self.baz.get_or_insert_with(|| {
41923                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
41924                });
41925                fidl::decode!(
41926                    fidl::encoding::UnboundedVector<u8>,
41927                    D,
41928                    val_ref,
41929                    decoder,
41930                    inner_offset,
41931                    inner_depth
41932                )?;
41933                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41934                {
41935                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41936                }
41937                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41938                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41939                }
41940            }
41941
41942            next_offset += envelope_size;
41943
41944            // Decode the remaining unknown envelopes.
41945            while next_offset < end_offset {
41946                _next_ordinal_to_read += 1;
41947                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41948                next_offset += envelope_size;
41949            }
41950
41951            Ok(())
41952        }
41953    }
41954
41955    impl TableWithStringWithLimit {
41956        #[inline(always)]
41957        fn max_ordinal_present(&self) -> u64 {
41958            if let Some(_) = self.s {
41959                return 1;
41960            }
41961            0
41962        }
41963    }
41964
41965    impl fidl::encoding::ValueTypeMarker for TableWithStringWithLimit {
41966        type Borrowed<'a> = &'a Self;
41967        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41968            value
41969        }
41970    }
41971
41972    unsafe impl fidl::encoding::TypeMarker for TableWithStringWithLimit {
41973        type Owned = Self;
41974
41975        #[inline(always)]
41976        fn inline_align(_context: fidl::encoding::Context) -> usize {
41977            8
41978        }
41979
41980        #[inline(always)]
41981        fn inline_size(_context: fidl::encoding::Context) -> usize {
41982            16
41983        }
41984    }
41985
41986    unsafe impl<D: fidl::encoding::ResourceDialect>
41987        fidl::encoding::Encode<TableWithStringWithLimit, D> for &TableWithStringWithLimit
41988    {
41989        unsafe fn encode(
41990            self,
41991            encoder: &mut fidl::encoding::Encoder<'_, D>,
41992            offset: usize,
41993            mut depth: fidl::encoding::Depth,
41994        ) -> fidl::Result<()> {
41995            encoder.debug_check_bounds::<TableWithStringWithLimit>(offset);
41996            // Vector header
41997            let max_ordinal: u64 = self.max_ordinal_present();
41998            encoder.write_num(max_ordinal, offset);
41999            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42000            // Calling encoder.out_of_line_offset(0) is not allowed.
42001            if max_ordinal == 0 {
42002                return Ok(());
42003            }
42004            depth.increment()?;
42005            let envelope_size = 8;
42006            let bytes_len = max_ordinal as usize * envelope_size;
42007            #[allow(unused_variables)]
42008            let offset = encoder.out_of_line_offset(bytes_len);
42009            let mut _prev_end_offset: usize = 0;
42010            if 1 > max_ordinal {
42011                return Ok(());
42012            }
42013
42014            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42015            // are envelope_size bytes.
42016            let cur_offset: usize = (1 - 1) * envelope_size;
42017
42018            // Zero reserved fields.
42019            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42020
42021            // Safety:
42022            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42023            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42024            //   envelope_size bytes, there is always sufficient room.
42025            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2>, D>(
42026                self.s.as_ref().map(
42027                    <fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow,
42028                ),
42029                encoder,
42030                offset + cur_offset,
42031                depth,
42032            )?;
42033
42034            _prev_end_offset = cur_offset + envelope_size;
42035
42036            Ok(())
42037        }
42038    }
42039
42040    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42041        for TableWithStringWithLimit
42042    {
42043        #[inline(always)]
42044        fn new_empty() -> Self {
42045            Self::default()
42046        }
42047
42048        unsafe fn decode(
42049            &mut self,
42050            decoder: &mut fidl::encoding::Decoder<'_, D>,
42051            offset: usize,
42052            mut depth: fidl::encoding::Depth,
42053        ) -> fidl::Result<()> {
42054            decoder.debug_check_bounds::<Self>(offset);
42055            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42056                None => return Err(fidl::Error::NotNullable),
42057                Some(len) => len,
42058            };
42059            // Calling decoder.out_of_line_offset(0) is not allowed.
42060            if len == 0 {
42061                return Ok(());
42062            };
42063            depth.increment()?;
42064            let envelope_size = 8;
42065            let bytes_len = len * envelope_size;
42066            let offset = decoder.out_of_line_offset(bytes_len)?;
42067            // Decode the envelope for each type.
42068            let mut _next_ordinal_to_read = 0;
42069            let mut next_offset = offset;
42070            let end_offset = offset + bytes_len;
42071            _next_ordinal_to_read += 1;
42072            if next_offset >= end_offset {
42073                return Ok(());
42074            }
42075
42076            // Decode unknown envelopes for gaps in ordinals.
42077            while _next_ordinal_to_read < 1 {
42078                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42079                _next_ordinal_to_read += 1;
42080                next_offset += envelope_size;
42081            }
42082
42083            let next_out_of_line = decoder.next_out_of_line();
42084            let handles_before = decoder.remaining_handles();
42085            if let Some((inlined, num_bytes, num_handles)) =
42086                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42087            {
42088                let member_inline_size =
42089                    <fidl::encoding::BoundedString<2> as fidl::encoding::TypeMarker>::inline_size(
42090                        decoder.context,
42091                    );
42092                if inlined != (member_inline_size <= 4) {
42093                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42094                }
42095                let inner_offset;
42096                let mut inner_depth = depth.clone();
42097                if inlined {
42098                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42099                    inner_offset = next_offset;
42100                } else {
42101                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42102                    inner_depth.increment()?;
42103                }
42104                let val_ref = self
42105                    .s
42106                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<2>, D));
42107                fidl::decode!(
42108                    fidl::encoding::BoundedString<2>,
42109                    D,
42110                    val_ref,
42111                    decoder,
42112                    inner_offset,
42113                    inner_depth
42114                )?;
42115                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42116                {
42117                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42118                }
42119                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42120                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42121                }
42122            }
42123
42124            next_offset += envelope_size;
42125
42126            // Decode the remaining unknown envelopes.
42127            while next_offset < end_offset {
42128                _next_ordinal_to_read += 1;
42129                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42130                next_offset += envelope_size;
42131            }
42132
42133            Ok(())
42134        }
42135    }
42136
42137    impl TableWithUnionSize12Align4 {
42138        #[inline(always)]
42139        fn max_ordinal_present(&self) -> u64 {
42140            if let Some(_) = self.after {
42141                return 5;
42142            }
42143            if let Some(_) = self.member {
42144                return 3;
42145            }
42146            if let Some(_) = self.before {
42147                return 1;
42148            }
42149            0
42150        }
42151    }
42152
42153    impl fidl::encoding::ValueTypeMarker for TableWithUnionSize12Align4 {
42154        type Borrowed<'a> = &'a Self;
42155        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42156            value
42157        }
42158    }
42159
42160    unsafe impl fidl::encoding::TypeMarker for TableWithUnionSize12Align4 {
42161        type Owned = Self;
42162
42163        #[inline(always)]
42164        fn inline_align(_context: fidl::encoding::Context) -> usize {
42165            8
42166        }
42167
42168        #[inline(always)]
42169        fn inline_size(_context: fidl::encoding::Context) -> usize {
42170            16
42171        }
42172    }
42173
42174    unsafe impl<D: fidl::encoding::ResourceDialect>
42175        fidl::encoding::Encode<TableWithUnionSize12Align4, D> for &TableWithUnionSize12Align4
42176    {
42177        unsafe fn encode(
42178            self,
42179            encoder: &mut fidl::encoding::Encoder<'_, D>,
42180            offset: usize,
42181            mut depth: fidl::encoding::Depth,
42182        ) -> fidl::Result<()> {
42183            encoder.debug_check_bounds::<TableWithUnionSize12Align4>(offset);
42184            // Vector header
42185            let max_ordinal: u64 = self.max_ordinal_present();
42186            encoder.write_num(max_ordinal, offset);
42187            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42188            // Calling encoder.out_of_line_offset(0) is not allowed.
42189            if max_ordinal == 0 {
42190                return Ok(());
42191            }
42192            depth.increment()?;
42193            let envelope_size = 8;
42194            let bytes_len = max_ordinal as usize * envelope_size;
42195            #[allow(unused_variables)]
42196            let offset = encoder.out_of_line_offset(bytes_len);
42197            let mut _prev_end_offset: usize = 0;
42198            if 1 > max_ordinal {
42199                return Ok(());
42200            }
42201
42202            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42203            // are envelope_size bytes.
42204            let cur_offset: usize = (1 - 1) * envelope_size;
42205
42206            // Zero reserved fields.
42207            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42208
42209            // Safety:
42210            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42211            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42212            //   envelope_size bytes, there is always sufficient room.
42213            fidl::encoding::encode_in_envelope_optional::<u8, D>(
42214                self.before.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
42215                encoder,
42216                offset + cur_offset,
42217                depth,
42218            )?;
42219
42220            _prev_end_offset = cur_offset + envelope_size;
42221            if 3 > max_ordinal {
42222                return Ok(());
42223            }
42224
42225            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42226            // are envelope_size bytes.
42227            let cur_offset: usize = (3 - 1) * envelope_size;
42228
42229            // Zero reserved fields.
42230            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42231
42232            // Safety:
42233            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42234            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42235            //   envelope_size bytes, there is always sufficient room.
42236            fidl::encoding::encode_in_envelope_optional::<UnionSize12Align4, D>(
42237                self.member
42238                    .as_ref()
42239                    .map(<UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow),
42240                encoder,
42241                offset + cur_offset,
42242                depth,
42243            )?;
42244
42245            _prev_end_offset = cur_offset + envelope_size;
42246            if 5 > max_ordinal {
42247                return Ok(());
42248            }
42249
42250            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42251            // are envelope_size bytes.
42252            let cur_offset: usize = (5 - 1) * envelope_size;
42253
42254            // Zero reserved fields.
42255            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42256
42257            // Safety:
42258            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42259            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42260            //   envelope_size bytes, there is always sufficient room.
42261            fidl::encoding::encode_in_envelope_optional::<u8, D>(
42262                self.after.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
42263                encoder,
42264                offset + cur_offset,
42265                depth,
42266            )?;
42267
42268            _prev_end_offset = cur_offset + envelope_size;
42269
42270            Ok(())
42271        }
42272    }
42273
42274    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42275        for TableWithUnionSize12Align4
42276    {
42277        #[inline(always)]
42278        fn new_empty() -> Self {
42279            Self::default()
42280        }
42281
42282        unsafe fn decode(
42283            &mut self,
42284            decoder: &mut fidl::encoding::Decoder<'_, D>,
42285            offset: usize,
42286            mut depth: fidl::encoding::Depth,
42287        ) -> fidl::Result<()> {
42288            decoder.debug_check_bounds::<Self>(offset);
42289            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42290                None => return Err(fidl::Error::NotNullable),
42291                Some(len) => len,
42292            };
42293            // Calling decoder.out_of_line_offset(0) is not allowed.
42294            if len == 0 {
42295                return Ok(());
42296            };
42297            depth.increment()?;
42298            let envelope_size = 8;
42299            let bytes_len = len * envelope_size;
42300            let offset = decoder.out_of_line_offset(bytes_len)?;
42301            // Decode the envelope for each type.
42302            let mut _next_ordinal_to_read = 0;
42303            let mut next_offset = offset;
42304            let end_offset = offset + bytes_len;
42305            _next_ordinal_to_read += 1;
42306            if next_offset >= end_offset {
42307                return Ok(());
42308            }
42309
42310            // Decode unknown envelopes for gaps in ordinals.
42311            while _next_ordinal_to_read < 1 {
42312                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42313                _next_ordinal_to_read += 1;
42314                next_offset += envelope_size;
42315            }
42316
42317            let next_out_of_line = decoder.next_out_of_line();
42318            let handles_before = decoder.remaining_handles();
42319            if let Some((inlined, num_bytes, num_handles)) =
42320                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42321            {
42322                let member_inline_size =
42323                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42324                if inlined != (member_inline_size <= 4) {
42325                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42326                }
42327                let inner_offset;
42328                let mut inner_depth = depth.clone();
42329                if inlined {
42330                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42331                    inner_offset = next_offset;
42332                } else {
42333                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42334                    inner_depth.increment()?;
42335                }
42336                let val_ref = self.before.get_or_insert_with(|| fidl::new_empty!(u8, D));
42337                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
42338                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42339                {
42340                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42341                }
42342                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42343                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42344                }
42345            }
42346
42347            next_offset += envelope_size;
42348            _next_ordinal_to_read += 1;
42349            if next_offset >= end_offset {
42350                return Ok(());
42351            }
42352
42353            // Decode unknown envelopes for gaps in ordinals.
42354            while _next_ordinal_to_read < 3 {
42355                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42356                _next_ordinal_to_read += 1;
42357                next_offset += envelope_size;
42358            }
42359
42360            let next_out_of_line = decoder.next_out_of_line();
42361            let handles_before = decoder.remaining_handles();
42362            if let Some((inlined, num_bytes, num_handles)) =
42363                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42364            {
42365                let member_inline_size =
42366                    <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42367                if inlined != (member_inline_size <= 4) {
42368                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42369                }
42370                let inner_offset;
42371                let mut inner_depth = depth.clone();
42372                if inlined {
42373                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42374                    inner_offset = next_offset;
42375                } else {
42376                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42377                    inner_depth.increment()?;
42378                }
42379                let val_ref =
42380                    self.member.get_or_insert_with(|| fidl::new_empty!(UnionSize12Align4, D));
42381                fidl::decode!(UnionSize12Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
42382                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42383                {
42384                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42385                }
42386                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42387                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42388                }
42389            }
42390
42391            next_offset += envelope_size;
42392            _next_ordinal_to_read += 1;
42393            if next_offset >= end_offset {
42394                return Ok(());
42395            }
42396
42397            // Decode unknown envelopes for gaps in ordinals.
42398            while _next_ordinal_to_read < 5 {
42399                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42400                _next_ordinal_to_read += 1;
42401                next_offset += envelope_size;
42402            }
42403
42404            let next_out_of_line = decoder.next_out_of_line();
42405            let handles_before = decoder.remaining_handles();
42406            if let Some((inlined, num_bytes, num_handles)) =
42407                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42408            {
42409                let member_inline_size =
42410                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42411                if inlined != (member_inline_size <= 4) {
42412                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42413                }
42414                let inner_offset;
42415                let mut inner_depth = depth.clone();
42416                if inlined {
42417                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42418                    inner_offset = next_offset;
42419                } else {
42420                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42421                    inner_depth.increment()?;
42422                }
42423                let val_ref = self.after.get_or_insert_with(|| fidl::new_empty!(u8, D));
42424                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
42425                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42426                {
42427                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42428                }
42429                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42430                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42431                }
42432            }
42433
42434            next_offset += envelope_size;
42435
42436            // Decode the remaining unknown envelopes.
42437            while next_offset < end_offset {
42438                _next_ordinal_to_read += 1;
42439                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42440                next_offset += envelope_size;
42441            }
42442
42443            Ok(())
42444        }
42445    }
42446
42447    impl TableWithVectorWithLimit {
42448        #[inline(always)]
42449        fn max_ordinal_present(&self) -> u64 {
42450            if let Some(_) = self.v {
42451                return 1;
42452            }
42453            0
42454        }
42455    }
42456
42457    impl fidl::encoding::ValueTypeMarker for TableWithVectorWithLimit {
42458        type Borrowed<'a> = &'a Self;
42459        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42460            value
42461        }
42462    }
42463
42464    unsafe impl fidl::encoding::TypeMarker for TableWithVectorWithLimit {
42465        type Owned = Self;
42466
42467        #[inline(always)]
42468        fn inline_align(_context: fidl::encoding::Context) -> usize {
42469            8
42470        }
42471
42472        #[inline(always)]
42473        fn inline_size(_context: fidl::encoding::Context) -> usize {
42474            16
42475        }
42476    }
42477
42478    unsafe impl<D: fidl::encoding::ResourceDialect>
42479        fidl::encoding::Encode<TableWithVectorWithLimit, D> for &TableWithVectorWithLimit
42480    {
42481        unsafe fn encode(
42482            self,
42483            encoder: &mut fidl::encoding::Encoder<'_, D>,
42484            offset: usize,
42485            mut depth: fidl::encoding::Depth,
42486        ) -> fidl::Result<()> {
42487            encoder.debug_check_bounds::<TableWithVectorWithLimit>(offset);
42488            // Vector header
42489            let max_ordinal: u64 = self.max_ordinal_present();
42490            encoder.write_num(max_ordinal, offset);
42491            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42492            // Calling encoder.out_of_line_offset(0) is not allowed.
42493            if max_ordinal == 0 {
42494                return Ok(());
42495            }
42496            depth.increment()?;
42497            let envelope_size = 8;
42498            let bytes_len = max_ordinal as usize * envelope_size;
42499            #[allow(unused_variables)]
42500            let offset = encoder.out_of_line_offset(bytes_len);
42501            let mut _prev_end_offset: usize = 0;
42502            if 1 > max_ordinal {
42503                return Ok(());
42504            }
42505
42506            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42507            // are envelope_size bytes.
42508            let cur_offset: usize = (1 - 1) * envelope_size;
42509
42510            // Zero reserved fields.
42511            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42512
42513            // Safety:
42514            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42515            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42516            //   envelope_size bytes, there is always sufficient room.
42517            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 2>, D>(
42518                self.v.as_ref().map(
42519                    <fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow,
42520                ),
42521                encoder,
42522                offset + cur_offset,
42523                depth,
42524            )?;
42525
42526            _prev_end_offset = cur_offset + envelope_size;
42527
42528            Ok(())
42529        }
42530    }
42531
42532    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42533        for TableWithVectorWithLimit
42534    {
42535        #[inline(always)]
42536        fn new_empty() -> Self {
42537            Self::default()
42538        }
42539
42540        unsafe fn decode(
42541            &mut self,
42542            decoder: &mut fidl::encoding::Decoder<'_, D>,
42543            offset: usize,
42544            mut depth: fidl::encoding::Depth,
42545        ) -> fidl::Result<()> {
42546            decoder.debug_check_bounds::<Self>(offset);
42547            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42548                None => return Err(fidl::Error::NotNullable),
42549                Some(len) => len,
42550            };
42551            // Calling decoder.out_of_line_offset(0) is not allowed.
42552            if len == 0 {
42553                return Ok(());
42554            };
42555            depth.increment()?;
42556            let envelope_size = 8;
42557            let bytes_len = len * envelope_size;
42558            let offset = decoder.out_of_line_offset(bytes_len)?;
42559            // Decode the envelope for each type.
42560            let mut _next_ordinal_to_read = 0;
42561            let mut next_offset = offset;
42562            let end_offset = offset + bytes_len;
42563            _next_ordinal_to_read += 1;
42564            if next_offset >= end_offset {
42565                return Ok(());
42566            }
42567
42568            // Decode unknown envelopes for gaps in ordinals.
42569            while _next_ordinal_to_read < 1 {
42570                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42571                _next_ordinal_to_read += 1;
42572                next_offset += envelope_size;
42573            }
42574
42575            let next_out_of_line = decoder.next_out_of_line();
42576            let handles_before = decoder.remaining_handles();
42577            if let Some((inlined, num_bytes, num_handles)) =
42578                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42579            {
42580                let member_inline_size =
42581                    <fidl::encoding::Vector<u8, 2> as fidl::encoding::TypeMarker>::inline_size(
42582                        decoder.context,
42583                    );
42584                if inlined != (member_inline_size <= 4) {
42585                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42586                }
42587                let inner_offset;
42588                let mut inner_depth = depth.clone();
42589                if inlined {
42590                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42591                    inner_offset = next_offset;
42592                } else {
42593                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42594                    inner_depth.increment()?;
42595                }
42596                let val_ref = self
42597                    .v
42598                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D));
42599                fidl::decode!(fidl::encoding::Vector<u8, 2>, D, val_ref, decoder, inner_offset, inner_depth)?;
42600                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42601                {
42602                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42603                }
42604                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42605                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42606                }
42607            }
42608
42609            next_offset += envelope_size;
42610
42611            // Decode the remaining unknown envelopes.
42612            while next_offset < end_offset {
42613                _next_ordinal_to_read += 1;
42614                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42615                next_offset += envelope_size;
42616            }
42617
42618            Ok(())
42619        }
42620    }
42621
42622    impl TableWithXUnion {
42623        #[inline(always)]
42624        fn max_ordinal_present(&self) -> u64 {
42625            if let Some(_) = self.member {
42626                return 1;
42627            }
42628            0
42629        }
42630    }
42631
42632    impl fidl::encoding::ValueTypeMarker for TableWithXUnion {
42633        type Borrowed<'a> = &'a Self;
42634        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42635            value
42636        }
42637    }
42638
42639    unsafe impl fidl::encoding::TypeMarker for TableWithXUnion {
42640        type Owned = Self;
42641
42642        #[inline(always)]
42643        fn inline_align(_context: fidl::encoding::Context) -> usize {
42644            8
42645        }
42646
42647        #[inline(always)]
42648        fn inline_size(_context: fidl::encoding::Context) -> usize {
42649            16
42650        }
42651    }
42652
42653    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithXUnion, D>
42654        for &TableWithXUnion
42655    {
42656        unsafe fn encode(
42657            self,
42658            encoder: &mut fidl::encoding::Encoder<'_, D>,
42659            offset: usize,
42660            mut depth: fidl::encoding::Depth,
42661        ) -> fidl::Result<()> {
42662            encoder.debug_check_bounds::<TableWithXUnion>(offset);
42663            // Vector header
42664            let max_ordinal: u64 = self.max_ordinal_present();
42665            encoder.write_num(max_ordinal, offset);
42666            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42667            // Calling encoder.out_of_line_offset(0) is not allowed.
42668            if max_ordinal == 0 {
42669                return Ok(());
42670            }
42671            depth.increment()?;
42672            let envelope_size = 8;
42673            let bytes_len = max_ordinal as usize * envelope_size;
42674            #[allow(unused_variables)]
42675            let offset = encoder.out_of_line_offset(bytes_len);
42676            let mut _prev_end_offset: usize = 0;
42677            if 1 > max_ordinal {
42678                return Ok(());
42679            }
42680
42681            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42682            // are envelope_size bytes.
42683            let cur_offset: usize = (1 - 1) * envelope_size;
42684
42685            // Zero reserved fields.
42686            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42687
42688            // Safety:
42689            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42690            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42691            //   envelope_size bytes, there is always sufficient room.
42692            fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
42693                self.member.as_ref().map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
42694                encoder,
42695                offset + cur_offset,
42696                depth,
42697            )?;
42698
42699            _prev_end_offset = cur_offset + envelope_size;
42700
42701            Ok(())
42702        }
42703    }
42704
42705    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithXUnion {
42706        #[inline(always)]
42707        fn new_empty() -> Self {
42708            Self::default()
42709        }
42710
42711        unsafe fn decode(
42712            &mut self,
42713            decoder: &mut fidl::encoding::Decoder<'_, D>,
42714            offset: usize,
42715            mut depth: fidl::encoding::Depth,
42716        ) -> fidl::Result<()> {
42717            decoder.debug_check_bounds::<Self>(offset);
42718            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42719                None => return Err(fidl::Error::NotNullable),
42720                Some(len) => len,
42721            };
42722            // Calling decoder.out_of_line_offset(0) is not allowed.
42723            if len == 0 {
42724                return Ok(());
42725            };
42726            depth.increment()?;
42727            let envelope_size = 8;
42728            let bytes_len = len * envelope_size;
42729            let offset = decoder.out_of_line_offset(bytes_len)?;
42730            // Decode the envelope for each type.
42731            let mut _next_ordinal_to_read = 0;
42732            let mut next_offset = offset;
42733            let end_offset = offset + bytes_len;
42734            _next_ordinal_to_read += 1;
42735            if next_offset >= end_offset {
42736                return Ok(());
42737            }
42738
42739            // Decode unknown envelopes for gaps in ordinals.
42740            while _next_ordinal_to_read < 1 {
42741                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42742                _next_ordinal_to_read += 1;
42743                next_offset += envelope_size;
42744            }
42745
42746            let next_out_of_line = decoder.next_out_of_line();
42747            let handles_before = decoder.remaining_handles();
42748            if let Some((inlined, num_bytes, num_handles)) =
42749                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42750            {
42751                let member_inline_size =
42752                    <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42753                if inlined != (member_inline_size <= 4) {
42754                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42755                }
42756                let inner_offset;
42757                let mut inner_depth = depth.clone();
42758                if inlined {
42759                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42760                    inner_offset = next_offset;
42761                } else {
42762                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42763                    inner_depth.increment()?;
42764                }
42765                let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
42766                fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
42767                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42768                {
42769                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42770                }
42771                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42772                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42773                }
42774            }
42775
42776            next_offset += envelope_size;
42777
42778            // Decode the remaining unknown envelopes.
42779            while next_offset < end_offset {
42780                _next_ordinal_to_read += 1;
42781                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42782                next_offset += envelope_size;
42783            }
42784
42785            Ok(())
42786        }
42787    }
42788
42789    impl TransformerSimpleTable {
42790        #[inline(always)]
42791        fn max_ordinal_present(&self) -> u64 {
42792            if let Some(_) = self.value {
42793                return 1;
42794            }
42795            0
42796        }
42797    }
42798
42799    impl fidl::encoding::ValueTypeMarker for TransformerSimpleTable {
42800        type Borrowed<'a> = &'a Self;
42801        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42802            value
42803        }
42804    }
42805
42806    unsafe impl fidl::encoding::TypeMarker for TransformerSimpleTable {
42807        type Owned = Self;
42808
42809        #[inline(always)]
42810        fn inline_align(_context: fidl::encoding::Context) -> usize {
42811            8
42812        }
42813
42814        #[inline(always)]
42815        fn inline_size(_context: fidl::encoding::Context) -> usize {
42816            16
42817        }
42818    }
42819
42820    unsafe impl<D: fidl::encoding::ResourceDialect>
42821        fidl::encoding::Encode<TransformerSimpleTable, D> for &TransformerSimpleTable
42822    {
42823        unsafe fn encode(
42824            self,
42825            encoder: &mut fidl::encoding::Encoder<'_, D>,
42826            offset: usize,
42827            mut depth: fidl::encoding::Depth,
42828        ) -> fidl::Result<()> {
42829            encoder.debug_check_bounds::<TransformerSimpleTable>(offset);
42830            // Vector header
42831            let max_ordinal: u64 = self.max_ordinal_present();
42832            encoder.write_num(max_ordinal, offset);
42833            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42834            // Calling encoder.out_of_line_offset(0) is not allowed.
42835            if max_ordinal == 0 {
42836                return Ok(());
42837            }
42838            depth.increment()?;
42839            let envelope_size = 8;
42840            let bytes_len = max_ordinal as usize * envelope_size;
42841            #[allow(unused_variables)]
42842            let offset = encoder.out_of_line_offset(bytes_len);
42843            let mut _prev_end_offset: usize = 0;
42844            if 1 > max_ordinal {
42845                return Ok(());
42846            }
42847
42848            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42849            // are envelope_size bytes.
42850            let cur_offset: usize = (1 - 1) * envelope_size;
42851
42852            // Zero reserved fields.
42853            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42854
42855            // Safety:
42856            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42857            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42858            //   envelope_size bytes, there is always sufficient room.
42859            fidl::encoding::encode_in_envelope_optional::<u32, D>(
42860                self.value.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
42861                encoder,
42862                offset + cur_offset,
42863                depth,
42864            )?;
42865
42866            _prev_end_offset = cur_offset + envelope_size;
42867
42868            Ok(())
42869        }
42870    }
42871
42872    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42873        for TransformerSimpleTable
42874    {
42875        #[inline(always)]
42876        fn new_empty() -> Self {
42877            Self::default()
42878        }
42879
42880        unsafe fn decode(
42881            &mut self,
42882            decoder: &mut fidl::encoding::Decoder<'_, D>,
42883            offset: usize,
42884            mut depth: fidl::encoding::Depth,
42885        ) -> fidl::Result<()> {
42886            decoder.debug_check_bounds::<Self>(offset);
42887            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42888                None => return Err(fidl::Error::NotNullable),
42889                Some(len) => len,
42890            };
42891            // Calling decoder.out_of_line_offset(0) is not allowed.
42892            if len == 0 {
42893                return Ok(());
42894            };
42895            depth.increment()?;
42896            let envelope_size = 8;
42897            let bytes_len = len * envelope_size;
42898            let offset = decoder.out_of_line_offset(bytes_len)?;
42899            // Decode the envelope for each type.
42900            let mut _next_ordinal_to_read = 0;
42901            let mut next_offset = offset;
42902            let end_offset = offset + bytes_len;
42903            _next_ordinal_to_read += 1;
42904            if next_offset >= end_offset {
42905                return Ok(());
42906            }
42907
42908            // Decode unknown envelopes for gaps in ordinals.
42909            while _next_ordinal_to_read < 1 {
42910                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42911                _next_ordinal_to_read += 1;
42912                next_offset += envelope_size;
42913            }
42914
42915            let next_out_of_line = decoder.next_out_of_line();
42916            let handles_before = decoder.remaining_handles();
42917            if let Some((inlined, num_bytes, num_handles)) =
42918                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42919            {
42920                let member_inline_size =
42921                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42922                if inlined != (member_inline_size <= 4) {
42923                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42924                }
42925                let inner_offset;
42926                let mut inner_depth = depth.clone();
42927                if inlined {
42928                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42929                    inner_offset = next_offset;
42930                } else {
42931                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42932                    inner_depth.increment()?;
42933                }
42934                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u32, D));
42935                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
42936                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42937                {
42938                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42939                }
42940                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42941                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42942                }
42943            }
42944
42945            next_offset += envelope_size;
42946
42947            // Decode the remaining unknown envelopes.
42948            while next_offset < end_offset {
42949                _next_ordinal_to_read += 1;
42950                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42951                next_offset += envelope_size;
42952            }
42953
42954            Ok(())
42955        }
42956    }
42957
42958    impl XUnionInTable {
42959        #[inline(always)]
42960        fn max_ordinal_present(&self) -> u64 {
42961            if let Some(_) = self.after {
42962                return 3;
42963            }
42964            if let Some(_) = self.xu {
42965                return 2;
42966            }
42967            if let Some(_) = self.before {
42968                return 1;
42969            }
42970            0
42971        }
42972    }
42973
42974    impl fidl::encoding::ValueTypeMarker for XUnionInTable {
42975        type Borrowed<'a> = &'a Self;
42976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42977            value
42978        }
42979    }
42980
42981    unsafe impl fidl::encoding::TypeMarker for XUnionInTable {
42982        type Owned = Self;
42983
42984        #[inline(always)]
42985        fn inline_align(_context: fidl::encoding::Context) -> usize {
42986            8
42987        }
42988
42989        #[inline(always)]
42990        fn inline_size(_context: fidl::encoding::Context) -> usize {
42991            16
42992        }
42993    }
42994
42995    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionInTable, D>
42996        for &XUnionInTable
42997    {
42998        unsafe fn encode(
42999            self,
43000            encoder: &mut fidl::encoding::Encoder<'_, D>,
43001            offset: usize,
43002            mut depth: fidl::encoding::Depth,
43003        ) -> fidl::Result<()> {
43004            encoder.debug_check_bounds::<XUnionInTable>(offset);
43005            // Vector header
43006            let max_ordinal: u64 = self.max_ordinal_present();
43007            encoder.write_num(max_ordinal, offset);
43008            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
43009            // Calling encoder.out_of_line_offset(0) is not allowed.
43010            if max_ordinal == 0 {
43011                return Ok(());
43012            }
43013            depth.increment()?;
43014            let envelope_size = 8;
43015            let bytes_len = max_ordinal as usize * envelope_size;
43016            #[allow(unused_variables)]
43017            let offset = encoder.out_of_line_offset(bytes_len);
43018            let mut _prev_end_offset: usize = 0;
43019            if 1 > max_ordinal {
43020                return Ok(());
43021            }
43022
43023            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
43024            // are envelope_size bytes.
43025            let cur_offset: usize = (1 - 1) * envelope_size;
43026
43027            // Zero reserved fields.
43028            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
43029
43030            // Safety:
43031            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
43032            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
43033            //   envelope_size bytes, there is always sufficient room.
43034            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
43035                self.before.as_ref().map(
43036                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
43037                ),
43038                encoder,
43039                offset + cur_offset,
43040                depth,
43041            )?;
43042
43043            _prev_end_offset = cur_offset + envelope_size;
43044            if 2 > max_ordinal {
43045                return Ok(());
43046            }
43047
43048            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
43049            // are envelope_size bytes.
43050            let cur_offset: usize = (2 - 1) * envelope_size;
43051
43052            // Zero reserved fields.
43053            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
43054
43055            // Safety:
43056            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
43057            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
43058            //   envelope_size bytes, there is always sufficient room.
43059            fidl::encoding::encode_in_envelope_optional::<SampleXUnion, D>(
43060                self.xu.as_ref().map(<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow),
43061                encoder,
43062                offset + cur_offset,
43063                depth,
43064            )?;
43065
43066            _prev_end_offset = cur_offset + envelope_size;
43067            if 3 > max_ordinal {
43068                return Ok(());
43069            }
43070
43071            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
43072            // are envelope_size bytes.
43073            let cur_offset: usize = (3 - 1) * envelope_size;
43074
43075            // Zero reserved fields.
43076            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
43077
43078            // Safety:
43079            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
43080            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
43081            //   envelope_size bytes, there is always sufficient room.
43082            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
43083                self.after.as_ref().map(
43084                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
43085                ),
43086                encoder,
43087                offset + cur_offset,
43088                depth,
43089            )?;
43090
43091            _prev_end_offset = cur_offset + envelope_size;
43092
43093            Ok(())
43094        }
43095    }
43096
43097    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionInTable {
43098        #[inline(always)]
43099        fn new_empty() -> Self {
43100            Self::default()
43101        }
43102
43103        unsafe fn decode(
43104            &mut self,
43105            decoder: &mut fidl::encoding::Decoder<'_, D>,
43106            offset: usize,
43107            mut depth: fidl::encoding::Depth,
43108        ) -> fidl::Result<()> {
43109            decoder.debug_check_bounds::<Self>(offset);
43110            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
43111                None => return Err(fidl::Error::NotNullable),
43112                Some(len) => len,
43113            };
43114            // Calling decoder.out_of_line_offset(0) is not allowed.
43115            if len == 0 {
43116                return Ok(());
43117            };
43118            depth.increment()?;
43119            let envelope_size = 8;
43120            let bytes_len = len * envelope_size;
43121            let offset = decoder.out_of_line_offset(bytes_len)?;
43122            // Decode the envelope for each type.
43123            let mut _next_ordinal_to_read = 0;
43124            let mut next_offset = offset;
43125            let end_offset = offset + bytes_len;
43126            _next_ordinal_to_read += 1;
43127            if next_offset >= end_offset {
43128                return Ok(());
43129            }
43130
43131            // Decode unknown envelopes for gaps in ordinals.
43132            while _next_ordinal_to_read < 1 {
43133                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43134                _next_ordinal_to_read += 1;
43135                next_offset += envelope_size;
43136            }
43137
43138            let next_out_of_line = decoder.next_out_of_line();
43139            let handles_before = decoder.remaining_handles();
43140            if let Some((inlined, num_bytes, num_handles)) =
43141                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43142            {
43143                let member_inline_size =
43144                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43145                        decoder.context,
43146                    );
43147                if inlined != (member_inline_size <= 4) {
43148                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43149                }
43150                let inner_offset;
43151                let mut inner_depth = depth.clone();
43152                if inlined {
43153                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43154                    inner_offset = next_offset;
43155                } else {
43156                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43157                    inner_depth.increment()?;
43158                }
43159                let val_ref = self
43160                    .before
43161                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
43162                fidl::decode!(
43163                    fidl::encoding::UnboundedString,
43164                    D,
43165                    val_ref,
43166                    decoder,
43167                    inner_offset,
43168                    inner_depth
43169                )?;
43170                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43171                {
43172                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43173                }
43174                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43175                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43176                }
43177            }
43178
43179            next_offset += envelope_size;
43180            _next_ordinal_to_read += 1;
43181            if next_offset >= end_offset {
43182                return Ok(());
43183            }
43184
43185            // Decode unknown envelopes for gaps in ordinals.
43186            while _next_ordinal_to_read < 2 {
43187                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43188                _next_ordinal_to_read += 1;
43189                next_offset += envelope_size;
43190            }
43191
43192            let next_out_of_line = decoder.next_out_of_line();
43193            let handles_before = decoder.remaining_handles();
43194            if let Some((inlined, num_bytes, num_handles)) =
43195                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43196            {
43197                let member_inline_size =
43198                    <SampleXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
43199                if inlined != (member_inline_size <= 4) {
43200                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43201                }
43202                let inner_offset;
43203                let mut inner_depth = depth.clone();
43204                if inlined {
43205                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43206                    inner_offset = next_offset;
43207                } else {
43208                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43209                    inner_depth.increment()?;
43210                }
43211                let val_ref = self.xu.get_or_insert_with(|| fidl::new_empty!(SampleXUnion, D));
43212                fidl::decode!(SampleXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
43213                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43214                {
43215                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43216                }
43217                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43218                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43219                }
43220            }
43221
43222            next_offset += envelope_size;
43223            _next_ordinal_to_read += 1;
43224            if next_offset >= end_offset {
43225                return Ok(());
43226            }
43227
43228            // Decode unknown envelopes for gaps in ordinals.
43229            while _next_ordinal_to_read < 3 {
43230                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43231                _next_ordinal_to_read += 1;
43232                next_offset += envelope_size;
43233            }
43234
43235            let next_out_of_line = decoder.next_out_of_line();
43236            let handles_before = decoder.remaining_handles();
43237            if let Some((inlined, num_bytes, num_handles)) =
43238                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43239            {
43240                let member_inline_size =
43241                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43242                        decoder.context,
43243                    );
43244                if inlined != (member_inline_size <= 4) {
43245                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43246                }
43247                let inner_offset;
43248                let mut inner_depth = depth.clone();
43249                if inlined {
43250                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43251                    inner_offset = next_offset;
43252                } else {
43253                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43254                    inner_depth.increment()?;
43255                }
43256                let val_ref = self
43257                    .after
43258                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
43259                fidl::decode!(
43260                    fidl::encoding::UnboundedString,
43261                    D,
43262                    val_ref,
43263                    decoder,
43264                    inner_offset,
43265                    inner_depth
43266                )?;
43267                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43268                {
43269                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43270                }
43271                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43272                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43273                }
43274            }
43275
43276            next_offset += envelope_size;
43277
43278            // Decode the remaining unknown envelopes.
43279            while next_offset < end_offset {
43280                _next_ordinal_to_read += 1;
43281                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43282                next_offset += envelope_size;
43283            }
43284
43285            Ok(())
43286        }
43287    }
43288
43289    impl fidl::encoding::ValueTypeMarker for CompatUnion {
43290        type Borrowed<'a> = &'a Self;
43291        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43292            value
43293        }
43294    }
43295
43296    unsafe impl fidl::encoding::TypeMarker for CompatUnion {
43297        type Owned = Self;
43298
43299        #[inline(always)]
43300        fn inline_align(_context: fidl::encoding::Context) -> usize {
43301            8
43302        }
43303
43304        #[inline(always)]
43305        fn inline_size(_context: fidl::encoding::Context) -> usize {
43306            16
43307        }
43308    }
43309
43310    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatUnion, D>
43311        for &CompatUnion
43312    {
43313        #[inline]
43314        unsafe fn encode(
43315            self,
43316            encoder: &mut fidl::encoding::Encoder<'_, D>,
43317            offset: usize,
43318            _depth: fidl::encoding::Depth,
43319        ) -> fidl::Result<()> {
43320            encoder.debug_check_bounds::<CompatUnion>(offset);
43321            encoder.write_num::<u64>(self.ordinal(), offset);
43322            match self {
43323                CompatUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
43324                    fidl::encoding::UnboundedString,
43325                    D,
43326                >(
43327                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
43328                        val,
43329                    ),
43330                    encoder,
43331                    offset + 8,
43332                    _depth,
43333                ),
43334                CompatUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
43335                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
43336                    encoder,
43337                    offset + 8,
43338                    _depth,
43339                ),
43340            }
43341        }
43342    }
43343
43344    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatUnion {
43345        #[inline(always)]
43346        fn new_empty() -> Self {
43347            Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
43348        }
43349
43350        #[inline]
43351        unsafe fn decode(
43352            &mut self,
43353            decoder: &mut fidl::encoding::Decoder<'_, D>,
43354            offset: usize,
43355            mut depth: fidl::encoding::Depth,
43356        ) -> fidl::Result<()> {
43357            decoder.debug_check_bounds::<Self>(offset);
43358            #[allow(unused_variables)]
43359            let next_out_of_line = decoder.next_out_of_line();
43360            let handles_before = decoder.remaining_handles();
43361            let (ordinal, inlined, num_bytes, num_handles) =
43362                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43363
43364            let member_inline_size = match ordinal {
43365                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43366                    decoder.context,
43367                ),
43368                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43369                _ => return Err(fidl::Error::UnknownUnionTag),
43370            };
43371
43372            if inlined != (member_inline_size <= 4) {
43373                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43374            }
43375            let _inner_offset;
43376            if inlined {
43377                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43378                _inner_offset = offset + 8;
43379            } else {
43380                depth.increment()?;
43381                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43382            }
43383            match ordinal {
43384                1 => {
43385                    #[allow(irrefutable_let_patterns)]
43386                    if let CompatUnion::S(_) = self {
43387                        // Do nothing, read the value into the object
43388                    } else {
43389                        // Initialize `self` to the right variant
43390                        *self =
43391                            CompatUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
43392                    }
43393                    #[allow(irrefutable_let_patterns)]
43394                    if let CompatUnion::S(ref mut val) = self {
43395                        fidl::decode!(
43396                            fidl::encoding::UnboundedString,
43397                            D,
43398                            val,
43399                            decoder,
43400                            _inner_offset,
43401                            depth
43402                        )?;
43403                    } else {
43404                        unreachable!()
43405                    }
43406                }
43407                2 => {
43408                    #[allow(irrefutable_let_patterns)]
43409                    if let CompatUnion::B(_) = self {
43410                        // Do nothing, read the value into the object
43411                    } else {
43412                        // Initialize `self` to the right variant
43413                        *self = CompatUnion::B(fidl::new_empty!(bool, D));
43414                    }
43415                    #[allow(irrefutable_let_patterns)]
43416                    if let CompatUnion::B(ref mut val) = self {
43417                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
43418                    } else {
43419                        unreachable!()
43420                    }
43421                }
43422                ordinal => panic!("unexpected ordinal {:?}", ordinal),
43423            }
43424            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43425                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43426            }
43427            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43428                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43429            }
43430            Ok(())
43431        }
43432    }
43433
43434    impl fidl::encoding::ValueTypeMarker for CompatXUnion {
43435        type Borrowed<'a> = &'a Self;
43436        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43437            value
43438        }
43439    }
43440
43441    unsafe impl fidl::encoding::TypeMarker for CompatXUnion {
43442        type Owned = Self;
43443
43444        #[inline(always)]
43445        fn inline_align(_context: fidl::encoding::Context) -> usize {
43446            8
43447        }
43448
43449        #[inline(always)]
43450        fn inline_size(_context: fidl::encoding::Context) -> usize {
43451            16
43452        }
43453    }
43454
43455    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatXUnion, D>
43456        for &CompatXUnion
43457    {
43458        #[inline]
43459        unsafe fn encode(
43460            self,
43461            encoder: &mut fidl::encoding::Encoder<'_, D>,
43462            offset: usize,
43463            _depth: fidl::encoding::Depth,
43464        ) -> fidl::Result<()> {
43465            encoder.debug_check_bounds::<CompatXUnion>(offset);
43466            encoder.write_num::<u64>(self.ordinal(), offset);
43467            match self {
43468                CompatXUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
43469                    fidl::encoding::UnboundedString,
43470                    D,
43471                >(
43472                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
43473                        val,
43474                    ),
43475                    encoder,
43476                    offset + 8,
43477                    _depth,
43478                ),
43479                CompatXUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
43480                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
43481                    encoder,
43482                    offset + 8,
43483                    _depth,
43484                ),
43485                CompatXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
43486            }
43487        }
43488    }
43489
43490    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatXUnion {
43491        #[inline(always)]
43492        fn new_empty() -> Self {
43493            Self::__SourceBreaking { unknown_ordinal: 0 }
43494        }
43495
43496        #[inline]
43497        unsafe fn decode(
43498            &mut self,
43499            decoder: &mut fidl::encoding::Decoder<'_, D>,
43500            offset: usize,
43501            mut depth: fidl::encoding::Depth,
43502        ) -> fidl::Result<()> {
43503            decoder.debug_check_bounds::<Self>(offset);
43504            #[allow(unused_variables)]
43505            let next_out_of_line = decoder.next_out_of_line();
43506            let handles_before = decoder.remaining_handles();
43507            let (ordinal, inlined, num_bytes, num_handles) =
43508                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43509
43510            let member_inline_size = match ordinal {
43511                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43512                    decoder.context,
43513                ),
43514                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43515                0 => return Err(fidl::Error::UnknownUnionTag),
43516                _ => num_bytes as usize,
43517            };
43518
43519            if inlined != (member_inline_size <= 4) {
43520                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43521            }
43522            let _inner_offset;
43523            if inlined {
43524                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43525                _inner_offset = offset + 8;
43526            } else {
43527                depth.increment()?;
43528                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43529            }
43530            match ordinal {
43531                1 => {
43532                    #[allow(irrefutable_let_patterns)]
43533                    if let CompatXUnion::S(_) = self {
43534                        // Do nothing, read the value into the object
43535                    } else {
43536                        // Initialize `self` to the right variant
43537                        *self =
43538                            CompatXUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
43539                    }
43540                    #[allow(irrefutable_let_patterns)]
43541                    if let CompatXUnion::S(ref mut val) = self {
43542                        fidl::decode!(
43543                            fidl::encoding::UnboundedString,
43544                            D,
43545                            val,
43546                            decoder,
43547                            _inner_offset,
43548                            depth
43549                        )?;
43550                    } else {
43551                        unreachable!()
43552                    }
43553                }
43554                2 => {
43555                    #[allow(irrefutable_let_patterns)]
43556                    if let CompatXUnion::B(_) = self {
43557                        // Do nothing, read the value into the object
43558                    } else {
43559                        // Initialize `self` to the right variant
43560                        *self = CompatXUnion::B(fidl::new_empty!(bool, D));
43561                    }
43562                    #[allow(irrefutable_let_patterns)]
43563                    if let CompatXUnion::B(ref mut val) = self {
43564                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
43565                    } else {
43566                        unreachable!()
43567                    }
43568                }
43569                #[allow(deprecated)]
43570                ordinal => {
43571                    for _ in 0..num_handles {
43572                        decoder.drop_next_handle()?;
43573                    }
43574                    *self = CompatXUnion::__SourceBreaking { unknown_ordinal: ordinal };
43575                }
43576            }
43577            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43578                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43579            }
43580            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43581                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43582            }
43583            Ok(())
43584        }
43585    }
43586
43587    impl fidl::encoding::ValueTypeMarker for EmptyFlexibleUnion {
43588        type Borrowed<'a> = &'a Self;
43589        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43590            value
43591        }
43592    }
43593
43594    unsafe impl fidl::encoding::TypeMarker for EmptyFlexibleUnion {
43595        type Owned = Self;
43596
43597        #[inline(always)]
43598        fn inline_align(_context: fidl::encoding::Context) -> usize {
43599            8
43600        }
43601
43602        #[inline(always)]
43603        fn inline_size(_context: fidl::encoding::Context) -> usize {
43604            16
43605        }
43606    }
43607
43608    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyFlexibleUnion, D>
43609        for &EmptyFlexibleUnion
43610    {
43611        #[inline]
43612        unsafe fn encode(
43613            self,
43614            encoder: &mut fidl::encoding::Encoder<'_, D>,
43615            offset: usize,
43616            _depth: fidl::encoding::Depth,
43617        ) -> fidl::Result<()> {
43618            encoder.debug_check_bounds::<EmptyFlexibleUnion>(offset);
43619            encoder.write_num::<u64>(self.ordinal(), offset);
43620            match self {
43621                EmptyFlexibleUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
43622            }
43623        }
43624    }
43625
43626    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyFlexibleUnion {
43627        #[inline(always)]
43628        fn new_empty() -> Self {
43629            Self::__SourceBreaking { unknown_ordinal: 0 }
43630        }
43631
43632        #[inline]
43633        unsafe fn decode(
43634            &mut self,
43635            decoder: &mut fidl::encoding::Decoder<'_, D>,
43636            offset: usize,
43637            mut depth: fidl::encoding::Depth,
43638        ) -> fidl::Result<()> {
43639            decoder.debug_check_bounds::<Self>(offset);
43640            #[allow(unused_variables)]
43641            let next_out_of_line = decoder.next_out_of_line();
43642            let handles_before = decoder.remaining_handles();
43643            let (ordinal, inlined, num_bytes, num_handles) =
43644                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43645
43646            let member_inline_size = match ordinal {
43647                0 => return Err(fidl::Error::UnknownUnionTag),
43648                _ => num_bytes as usize,
43649            };
43650
43651            if inlined != (member_inline_size <= 4) {
43652                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43653            }
43654            let _inner_offset;
43655            if inlined {
43656                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43657                _inner_offset = offset + 8;
43658            } else {
43659                depth.increment()?;
43660                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43661            }
43662            match ordinal {
43663                #[allow(deprecated)]
43664                ordinal => {
43665                    for _ in 0..num_handles {
43666                        decoder.drop_next_handle()?;
43667                    }
43668                    *self = EmptyFlexibleUnion::__SourceBreaking { unknown_ordinal: ordinal };
43669                }
43670            }
43671            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43672                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43673            }
43674            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43675                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43676            }
43677            Ok(())
43678        }
43679    }
43680
43681    impl fidl::encoding::ValueTypeMarker for EmptyStructUnion {
43682        type Borrowed<'a> = &'a Self;
43683        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43684            value
43685        }
43686    }
43687
43688    unsafe impl fidl::encoding::TypeMarker for EmptyStructUnion {
43689        type Owned = Self;
43690
43691        #[inline(always)]
43692        fn inline_align(_context: fidl::encoding::Context) -> usize {
43693            8
43694        }
43695
43696        #[inline(always)]
43697        fn inline_size(_context: fidl::encoding::Context) -> usize {
43698            16
43699        }
43700    }
43701
43702    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructUnion, D>
43703        for &EmptyStructUnion
43704    {
43705        #[inline]
43706        unsafe fn encode(
43707            self,
43708            encoder: &mut fidl::encoding::Encoder<'_, D>,
43709            offset: usize,
43710            _depth: fidl::encoding::Depth,
43711        ) -> fidl::Result<()> {
43712            encoder.debug_check_bounds::<EmptyStructUnion>(offset);
43713            encoder.write_num::<u64>(self.ordinal(), offset);
43714            match self {
43715                EmptyStructUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
43716                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
43717                    encoder,
43718                    offset + 8,
43719                    _depth,
43720                ),
43721                EmptyStructUnion::Es(ref val) => {
43722                    fidl::encoding::encode_in_envelope::<TransformerEmptyStruct, D>(
43723                        <TransformerEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
43724                        encoder,
43725                        offset + 8,
43726                        _depth,
43727                    )
43728                }
43729            }
43730        }
43731    }
43732
43733    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructUnion {
43734        #[inline(always)]
43735        fn new_empty() -> Self {
43736            Self::Unused(fidl::new_empty!(u8, D))
43737        }
43738
43739        #[inline]
43740        unsafe fn decode(
43741            &mut self,
43742            decoder: &mut fidl::encoding::Decoder<'_, D>,
43743            offset: usize,
43744            mut depth: fidl::encoding::Depth,
43745        ) -> fidl::Result<()> {
43746            decoder.debug_check_bounds::<Self>(offset);
43747            #[allow(unused_variables)]
43748            let next_out_of_line = decoder.next_out_of_line();
43749            let handles_before = decoder.remaining_handles();
43750            let (ordinal, inlined, num_bytes, num_handles) =
43751                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43752
43753            let member_inline_size = match ordinal {
43754                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43755                2 => <TransformerEmptyStruct as fidl::encoding::TypeMarker>::inline_size(
43756                    decoder.context,
43757                ),
43758                _ => return Err(fidl::Error::UnknownUnionTag),
43759            };
43760
43761            if inlined != (member_inline_size <= 4) {
43762                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43763            }
43764            let _inner_offset;
43765            if inlined {
43766                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43767                _inner_offset = offset + 8;
43768            } else {
43769                depth.increment()?;
43770                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43771            }
43772            match ordinal {
43773                1 => {
43774                    #[allow(irrefutable_let_patterns)]
43775                    if let EmptyStructUnion::Unused(_) = self {
43776                        // Do nothing, read the value into the object
43777                    } else {
43778                        // Initialize `self` to the right variant
43779                        *self = EmptyStructUnion::Unused(fidl::new_empty!(u8, D));
43780                    }
43781                    #[allow(irrefutable_let_patterns)]
43782                    if let EmptyStructUnion::Unused(ref mut val) = self {
43783                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
43784                    } else {
43785                        unreachable!()
43786                    }
43787                }
43788                2 => {
43789                    #[allow(irrefutable_let_patterns)]
43790                    if let EmptyStructUnion::Es(_) = self {
43791                        // Do nothing, read the value into the object
43792                    } else {
43793                        // Initialize `self` to the right variant
43794                        *self = EmptyStructUnion::Es(fidl::new_empty!(TransformerEmptyStruct, D));
43795                    }
43796                    #[allow(irrefutable_let_patterns)]
43797                    if let EmptyStructUnion::Es(ref mut val) = self {
43798                        fidl::decode!(
43799                            TransformerEmptyStruct,
43800                            D,
43801                            val,
43802                            decoder,
43803                            _inner_offset,
43804                            depth
43805                        )?;
43806                    } else {
43807                        unreachable!()
43808                    }
43809                }
43810                ordinal => panic!("unexpected ordinal {:?}", ordinal),
43811            }
43812            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43813                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43814            }
43815            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43816                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43817            }
43818            Ok(())
43819        }
43820    }
43821
43822    impl fidl::encoding::ValueTypeMarker for FidlvizUnion {
43823        type Borrowed<'a> = &'a Self;
43824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43825            value
43826        }
43827    }
43828
43829    unsafe impl fidl::encoding::TypeMarker for FidlvizUnion {
43830        type Owned = Self;
43831
43832        #[inline(always)]
43833        fn inline_align(_context: fidl::encoding::Context) -> usize {
43834            8
43835        }
43836
43837        #[inline(always)]
43838        fn inline_size(_context: fidl::encoding::Context) -> usize {
43839            16
43840        }
43841    }
43842
43843    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizUnion, D>
43844        for &FidlvizUnion
43845    {
43846        #[inline]
43847        unsafe fn encode(
43848            self,
43849            encoder: &mut fidl::encoding::Encoder<'_, D>,
43850            offset: usize,
43851            _depth: fidl::encoding::Depth,
43852        ) -> fidl::Result<()> {
43853            encoder.debug_check_bounds::<FidlvizUnion>(offset);
43854            encoder.write_num::<u64>(self.ordinal(), offset);
43855            match self {
43856                FidlvizUnion::F7(ref val) => fidl::encoding::encode_in_envelope::<
43857                    fidl::encoding::UnboundedString,
43858                    D,
43859                >(
43860                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
43861                        val,
43862                    ),
43863                    encoder,
43864                    offset + 8,
43865                    _depth,
43866                ),
43867            }
43868        }
43869    }
43870
43871    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizUnion {
43872        #[inline(always)]
43873        fn new_empty() -> Self {
43874            Self::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D))
43875        }
43876
43877        #[inline]
43878        unsafe fn decode(
43879            &mut self,
43880            decoder: &mut fidl::encoding::Decoder<'_, D>,
43881            offset: usize,
43882            mut depth: fidl::encoding::Depth,
43883        ) -> fidl::Result<()> {
43884            decoder.debug_check_bounds::<Self>(offset);
43885            #[allow(unused_variables)]
43886            let next_out_of_line = decoder.next_out_of_line();
43887            let handles_before = decoder.remaining_handles();
43888            let (ordinal, inlined, num_bytes, num_handles) =
43889                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43890
43891            let member_inline_size = match ordinal {
43892                7 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43893                    decoder.context,
43894                ),
43895                _ => return Err(fidl::Error::UnknownUnionTag),
43896            };
43897
43898            if inlined != (member_inline_size <= 4) {
43899                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43900            }
43901            let _inner_offset;
43902            if inlined {
43903                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43904                _inner_offset = offset + 8;
43905            } else {
43906                depth.increment()?;
43907                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43908            }
43909            match ordinal {
43910                7 => {
43911                    #[allow(irrefutable_let_patterns)]
43912                    if let FidlvizUnion::F7(_) = self {
43913                        // Do nothing, read the value into the object
43914                    } else {
43915                        // Initialize `self` to the right variant
43916                        *self =
43917                            FidlvizUnion::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D));
43918                    }
43919                    #[allow(irrefutable_let_patterns)]
43920                    if let FidlvizUnion::F7(ref mut val) = self {
43921                        fidl::decode!(
43922                            fidl::encoding::UnboundedString,
43923                            D,
43924                            val,
43925                            decoder,
43926                            _inner_offset,
43927                            depth
43928                        )?;
43929                    } else {
43930                        unreachable!()
43931                    }
43932                }
43933                ordinal => panic!("unexpected ordinal {:?}", ordinal),
43934            }
43935            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43936                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43937            }
43938            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43939                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43940            }
43941            Ok(())
43942        }
43943    }
43944
43945    impl fidl::encoding::ValueTypeMarker for GoldenUnion {
43946        type Borrowed<'a> = &'a Self;
43947        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43948            value
43949        }
43950    }
43951
43952    unsafe impl fidl::encoding::TypeMarker for GoldenUnion {
43953        type Owned = Self;
43954
43955        #[inline(always)]
43956        fn inline_align(_context: fidl::encoding::Context) -> usize {
43957            8
43958        }
43959
43960        #[inline(always)]
43961        fn inline_size(_context: fidl::encoding::Context) -> usize {
43962            16
43963        }
43964    }
43965
43966    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnion, D>
43967        for &GoldenUnion
43968    {
43969        #[inline]
43970        unsafe fn encode(
43971            self,
43972            encoder: &mut fidl::encoding::Encoder<'_, D>,
43973            offset: usize,
43974            _depth: fidl::encoding::Depth,
43975        ) -> fidl::Result<()> {
43976            encoder.debug_check_bounds::<GoldenUnion>(offset);
43977            encoder.write_num::<u64>(self.ordinal(), offset);
43978            match self {
43979                GoldenUnion::V(ref val) => fidl::encoding::encode_in_envelope::<i16, D>(
43980                    <i16 as fidl::encoding::ValueTypeMarker>::borrow(val),
43981                    encoder,
43982                    offset + 8,
43983                    _depth,
43984                ),
43985            }
43986        }
43987    }
43988
43989    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnion {
43990        #[inline(always)]
43991        fn new_empty() -> Self {
43992            Self::V(fidl::new_empty!(i16, D))
43993        }
43994
43995        #[inline]
43996        unsafe fn decode(
43997            &mut self,
43998            decoder: &mut fidl::encoding::Decoder<'_, D>,
43999            offset: usize,
44000            mut depth: fidl::encoding::Depth,
44001        ) -> fidl::Result<()> {
44002            decoder.debug_check_bounds::<Self>(offset);
44003            #[allow(unused_variables)]
44004            let next_out_of_line = decoder.next_out_of_line();
44005            let handles_before = decoder.remaining_handles();
44006            let (ordinal, inlined, num_bytes, num_handles) =
44007                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44008
44009            let member_inline_size = match ordinal {
44010                1 => <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44011                _ => return Err(fidl::Error::UnknownUnionTag),
44012            };
44013
44014            if inlined != (member_inline_size <= 4) {
44015                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44016            }
44017            let _inner_offset;
44018            if inlined {
44019                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44020                _inner_offset = offset + 8;
44021            } else {
44022                depth.increment()?;
44023                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44024            }
44025            match ordinal {
44026                1 => {
44027                    #[allow(irrefutable_let_patterns)]
44028                    if let GoldenUnion::V(_) = self {
44029                        // Do nothing, read the value into the object
44030                    } else {
44031                        // Initialize `self` to the right variant
44032                        *self = GoldenUnion::V(fidl::new_empty!(i16, D));
44033                    }
44034                    #[allow(irrefutable_let_patterns)]
44035                    if let GoldenUnion::V(ref mut val) = self {
44036                        fidl::decode!(i16, D, val, decoder, _inner_offset, depth)?;
44037                    } else {
44038                        unreachable!()
44039                    }
44040                }
44041                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44042            }
44043            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44044                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44045            }
44046            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44047                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44048            }
44049            Ok(())
44050        }
44051    }
44052
44053    impl fidl::encoding::ValueTypeMarker for IpAddressConfig {
44054        type Borrowed<'a> = &'a Self;
44055        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44056            value
44057        }
44058    }
44059
44060    unsafe impl fidl::encoding::TypeMarker for IpAddressConfig {
44061        type Owned = Self;
44062
44063        #[inline(always)]
44064        fn inline_align(_context: fidl::encoding::Context) -> usize {
44065            8
44066        }
44067
44068        #[inline(always)]
44069        fn inline_size(_context: fidl::encoding::Context) -> usize {
44070            16
44071        }
44072    }
44073
44074    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpAddressConfig, D>
44075        for &IpAddressConfig
44076    {
44077        #[inline]
44078        unsafe fn encode(
44079            self,
44080            encoder: &mut fidl::encoding::Encoder<'_, D>,
44081            offset: usize,
44082            _depth: fidl::encoding::Depth,
44083        ) -> fidl::Result<()> {
44084            encoder.debug_check_bounds::<IpAddressConfig>(offset);
44085            encoder.write_num::<u64>(self.ordinal(), offset);
44086            match self {
44087                IpAddressConfig::PaddingSize24Align4(ref val) => {
44088                    fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u32, 6>, D>(
44089                        <fidl::encoding::Array<u32, 6> as fidl::encoding::ValueTypeMarker>::borrow(
44090                            val,
44091                        ),
44092                        encoder,
44093                        offset + 8,
44094                        _depth,
44095                    )
44096                }
44097                IpAddressConfig::Dhcp(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
44098                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
44099                    encoder,
44100                    offset + 8,
44101                    _depth,
44102                ),
44103            }
44104        }
44105    }
44106
44107    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpAddressConfig {
44108        #[inline(always)]
44109        fn new_empty() -> Self {
44110            Self::PaddingSize24Align4(fidl::new_empty!(fidl::encoding::Array<u32, 6>, D))
44111        }
44112
44113        #[inline]
44114        unsafe fn decode(
44115            &mut self,
44116            decoder: &mut fidl::encoding::Decoder<'_, D>,
44117            offset: usize,
44118            mut depth: fidl::encoding::Depth,
44119        ) -> fidl::Result<()> {
44120            decoder.debug_check_bounds::<Self>(offset);
44121            #[allow(unused_variables)]
44122            let next_out_of_line = decoder.next_out_of_line();
44123            let handles_before = decoder.remaining_handles();
44124            let (ordinal, inlined, num_bytes, num_handles) =
44125                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44126
44127            let member_inline_size = match ordinal {
44128                1 => <fidl::encoding::Array<u32, 6> as fidl::encoding::TypeMarker>::inline_size(
44129                    decoder.context,
44130                ),
44131                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44132                _ => return Err(fidl::Error::UnknownUnionTag),
44133            };
44134
44135            if inlined != (member_inline_size <= 4) {
44136                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44137            }
44138            let _inner_offset;
44139            if inlined {
44140                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44141                _inner_offset = offset + 8;
44142            } else {
44143                depth.increment()?;
44144                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44145            }
44146            match ordinal {
44147                1 => {
44148                    #[allow(irrefutable_let_patterns)]
44149                    if let IpAddressConfig::PaddingSize24Align4(_) = self {
44150                        // Do nothing, read the value into the object
44151                    } else {
44152                        // Initialize `self` to the right variant
44153                        *self = IpAddressConfig::PaddingSize24Align4(
44154                            fidl::new_empty!(fidl::encoding::Array<u32, 6>, D),
44155                        );
44156                    }
44157                    #[allow(irrefutable_let_patterns)]
44158                    if let IpAddressConfig::PaddingSize24Align4(ref mut val) = self {
44159                        fidl::decode!(fidl::encoding::Array<u32, 6>, D, val, decoder, _inner_offset, depth)?;
44160                    } else {
44161                        unreachable!()
44162                    }
44163                }
44164                2 => {
44165                    #[allow(irrefutable_let_patterns)]
44166                    if let IpAddressConfig::Dhcp(_) = self {
44167                        // Do nothing, read the value into the object
44168                    } else {
44169                        // Initialize `self` to the right variant
44170                        *self = IpAddressConfig::Dhcp(fidl::new_empty!(bool, D));
44171                    }
44172                    #[allow(irrefutable_let_patterns)]
44173                    if let IpAddressConfig::Dhcp(ref mut val) = self {
44174                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
44175                    } else {
44176                        unreachable!()
44177                    }
44178                }
44179                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44180            }
44181            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44182                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44183            }
44184            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44185                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44186            }
44187            Ok(())
44188        }
44189    }
44190
44191    impl fidl::encoding::ValueTypeMarker for MutualRecursionUnion {
44192        type Borrowed<'a> = &'a Self;
44193        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44194            value
44195        }
44196    }
44197
44198    unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnion {
44199        type Owned = Self;
44200
44201        #[inline(always)]
44202        fn inline_align(_context: fidl::encoding::Context) -> usize {
44203            8
44204        }
44205
44206        #[inline(always)]
44207        fn inline_size(_context: fidl::encoding::Context) -> usize {
44208            16
44209        }
44210    }
44211
44212    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MutualRecursionUnion, D>
44213        for &MutualRecursionUnion
44214    {
44215        #[inline]
44216        unsafe fn encode(
44217            self,
44218            encoder: &mut fidl::encoding::Encoder<'_, D>,
44219            offset: usize,
44220            _depth: fidl::encoding::Depth,
44221        ) -> fidl::Result<()> {
44222            encoder.debug_check_bounds::<MutualRecursionUnion>(offset);
44223            encoder.write_num::<u64>(self.ordinal(), offset);
44224            match self {
44225                MutualRecursionUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
44226                    MutualRecursionUnionStruct,
44227                    D,
44228                >(
44229                    <MutualRecursionUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44230                    encoder,
44231                    offset + 8,
44232                    _depth,
44233                ),
44234            }
44235        }
44236    }
44237
44238    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MutualRecursionUnion {
44239        #[inline(always)]
44240        fn new_empty() -> Self {
44241            Self::S(fidl::new_empty!(MutualRecursionUnionStruct, D))
44242        }
44243
44244        #[inline]
44245        unsafe fn decode(
44246            &mut self,
44247            decoder: &mut fidl::encoding::Decoder<'_, D>,
44248            offset: usize,
44249            mut depth: fidl::encoding::Depth,
44250        ) -> fidl::Result<()> {
44251            decoder.debug_check_bounds::<Self>(offset);
44252            #[allow(unused_variables)]
44253            let next_out_of_line = decoder.next_out_of_line();
44254            let handles_before = decoder.remaining_handles();
44255            let (ordinal, inlined, num_bytes, num_handles) =
44256                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44257
44258            let member_inline_size = match ordinal {
44259                1 => <MutualRecursionUnionStruct as fidl::encoding::TypeMarker>::inline_size(
44260                    decoder.context,
44261                ),
44262                _ => return Err(fidl::Error::UnknownUnionTag),
44263            };
44264
44265            if inlined != (member_inline_size <= 4) {
44266                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44267            }
44268            let _inner_offset;
44269            if inlined {
44270                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44271                _inner_offset = offset + 8;
44272            } else {
44273                depth.increment()?;
44274                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44275            }
44276            match ordinal {
44277                1 => {
44278                    #[allow(irrefutable_let_patterns)]
44279                    if let MutualRecursionUnion::S(_) = self {
44280                        // Do nothing, read the value into the object
44281                    } else {
44282                        // Initialize `self` to the right variant
44283                        *self = MutualRecursionUnion::S(fidl::new_empty!(
44284                            MutualRecursionUnionStruct,
44285                            D
44286                        ));
44287                    }
44288                    #[allow(irrefutable_let_patterns)]
44289                    if let MutualRecursionUnion::S(ref mut val) = self {
44290                        fidl::decode!(
44291                            MutualRecursionUnionStruct,
44292                            D,
44293                            val,
44294                            decoder,
44295                            _inner_offset,
44296                            depth
44297                        )?;
44298                    } else {
44299                        unreachable!()
44300                    }
44301                }
44302                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44303            }
44304            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44305                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44306            }
44307            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44308                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44309            }
44310            Ok(())
44311        }
44312    }
44313
44314    impl fidl::encoding::ValueTypeMarker for PaddedUnion {
44315        type Borrowed<'a> = &'a Self;
44316        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44317            value
44318        }
44319    }
44320
44321    unsafe impl fidl::encoding::TypeMarker for PaddedUnion {
44322        type Owned = Self;
44323
44324        #[inline(always)]
44325        fn inline_align(_context: fidl::encoding::Context) -> usize {
44326            8
44327        }
44328
44329        #[inline(always)]
44330        fn inline_size(_context: fidl::encoding::Context) -> usize {
44331            16
44332        }
44333    }
44334
44335    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnion, D>
44336        for &PaddedUnion
44337    {
44338        #[inline]
44339        unsafe fn encode(
44340            self,
44341            encoder: &mut fidl::encoding::Encoder<'_, D>,
44342            offset: usize,
44343            _depth: fidl::encoding::Depth,
44344        ) -> fidl::Result<()> {
44345            encoder.debug_check_bounds::<PaddedUnion>(offset);
44346            encoder.write_num::<u64>(self.ordinal(), offset);
44347            match self {
44348                PaddedUnion::Field(ref val) => fidl::encoding::encode_in_envelope::<i8, D>(
44349                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44350                    encoder,
44351                    offset + 8,
44352                    _depth,
44353                ),
44354            }
44355        }
44356    }
44357
44358    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnion {
44359        #[inline(always)]
44360        fn new_empty() -> Self {
44361            Self::Field(fidl::new_empty!(i8, D))
44362        }
44363
44364        #[inline]
44365        unsafe fn decode(
44366            &mut self,
44367            decoder: &mut fidl::encoding::Decoder<'_, D>,
44368            offset: usize,
44369            mut depth: fidl::encoding::Depth,
44370        ) -> fidl::Result<()> {
44371            decoder.debug_check_bounds::<Self>(offset);
44372            #[allow(unused_variables)]
44373            let next_out_of_line = decoder.next_out_of_line();
44374            let handles_before = decoder.remaining_handles();
44375            let (ordinal, inlined, num_bytes, num_handles) =
44376                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44377
44378            let member_inline_size = match ordinal {
44379                1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44380                _ => return Err(fidl::Error::UnknownUnionTag),
44381            };
44382
44383            if inlined != (member_inline_size <= 4) {
44384                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44385            }
44386            let _inner_offset;
44387            if inlined {
44388                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44389                _inner_offset = offset + 8;
44390            } else {
44391                depth.increment()?;
44392                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44393            }
44394            match ordinal {
44395                1 => {
44396                    #[allow(irrefutable_let_patterns)]
44397                    if let PaddedUnion::Field(_) = self {
44398                        // Do nothing, read the value into the object
44399                    } else {
44400                        // Initialize `self` to the right variant
44401                        *self = PaddedUnion::Field(fidl::new_empty!(i8, D));
44402                    }
44403                    #[allow(irrefutable_let_patterns)]
44404                    if let PaddedUnion::Field(ref mut val) = self {
44405                        fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
44406                    } else {
44407                        unreachable!()
44408                    }
44409                }
44410                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44411            }
44412            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44413                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44414            }
44415            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44416                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44417            }
44418            Ok(())
44419        }
44420    }
44421
44422    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnion {
44423        type Borrowed<'a> = &'a Self;
44424        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44425            value
44426        }
44427    }
44428
44429    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnion {
44430        type Owned = Self;
44431
44432        #[inline(always)]
44433        fn inline_align(_context: fidl::encoding::Context) -> usize {
44434            8
44435        }
44436
44437        #[inline(always)]
44438        fn inline_size(_context: fidl::encoding::Context) -> usize {
44439            16
44440        }
44441    }
44442
44443    unsafe impl<D: fidl::encoding::ResourceDialect>
44444        fidl::encoding::Encode<RecursiveOptionalAndUnion, D> for &RecursiveOptionalAndUnion
44445    {
44446        #[inline]
44447        unsafe fn encode(
44448            self,
44449            encoder: &mut fidl::encoding::Encoder<'_, D>,
44450            offset: usize,
44451            _depth: fidl::encoding::Depth,
44452        ) -> fidl::Result<()> {
44453            encoder.debug_check_bounds::<RecursiveOptionalAndUnion>(offset);
44454            encoder.write_num::<u64>(self.ordinal(), offset);
44455            match self {
44456                RecursiveOptionalAndUnion::RecursiveOptional(ref val) => {
44457                    fidl::encoding::encode_in_envelope::<RecursiveOptionalStruct, D>(
44458                        <RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44459                        encoder,
44460                        offset + 8,
44461                        _depth,
44462                    )
44463                }
44464            }
44465        }
44466    }
44467
44468    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
44469        for RecursiveOptionalAndUnion
44470    {
44471        #[inline(always)]
44472        fn new_empty() -> Self {
44473            Self::RecursiveOptional(fidl::new_empty!(RecursiveOptionalStruct, D))
44474        }
44475
44476        #[inline]
44477        unsafe fn decode(
44478            &mut self,
44479            decoder: &mut fidl::encoding::Decoder<'_, D>,
44480            offset: usize,
44481            mut depth: fidl::encoding::Depth,
44482        ) -> fidl::Result<()> {
44483            decoder.debug_check_bounds::<Self>(offset);
44484            #[allow(unused_variables)]
44485            let next_out_of_line = decoder.next_out_of_line();
44486            let handles_before = decoder.remaining_handles();
44487            let (ordinal, inlined, num_bytes, num_handles) =
44488                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44489
44490            let member_inline_size = match ordinal {
44491                1 => <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
44492                    decoder.context,
44493                ),
44494                _ => return Err(fidl::Error::UnknownUnionTag),
44495            };
44496
44497            if inlined != (member_inline_size <= 4) {
44498                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44499            }
44500            let _inner_offset;
44501            if inlined {
44502                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44503                _inner_offset = offset + 8;
44504            } else {
44505                depth.increment()?;
44506                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44507            }
44508            match ordinal {
44509                1 => {
44510                    #[allow(irrefutable_let_patterns)]
44511                    if let RecursiveOptionalAndUnion::RecursiveOptional(_) = self {
44512                        // Do nothing, read the value into the object
44513                    } else {
44514                        // Initialize `self` to the right variant
44515                        *self = RecursiveOptionalAndUnion::RecursiveOptional(fidl::new_empty!(
44516                            RecursiveOptionalStruct,
44517                            D
44518                        ));
44519                    }
44520                    #[allow(irrefutable_let_patterns)]
44521                    if let RecursiveOptionalAndUnion::RecursiveOptional(ref mut val) = self {
44522                        fidl::decode!(
44523                            RecursiveOptionalStruct,
44524                            D,
44525                            val,
44526                            decoder,
44527                            _inner_offset,
44528                            depth
44529                        )?;
44530                    } else {
44531                        unreachable!()
44532                    }
44533                }
44534                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44535            }
44536            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44537                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44538            }
44539            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44540                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44541            }
44542            Ok(())
44543        }
44544    }
44545
44546    impl fidl::encoding::ValueTypeMarker for RecursiveUnion {
44547        type Borrowed<'a> = &'a Self;
44548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44549            value
44550        }
44551    }
44552
44553    unsafe impl fidl::encoding::TypeMarker for RecursiveUnion {
44554        type Owned = Self;
44555
44556        #[inline(always)]
44557        fn inline_align(_context: fidl::encoding::Context) -> usize {
44558            8
44559        }
44560
44561        #[inline(always)]
44562        fn inline_size(_context: fidl::encoding::Context) -> usize {
44563            16
44564        }
44565    }
44566
44567    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnion, D>
44568        for &RecursiveUnion
44569    {
44570        #[inline]
44571        unsafe fn encode(
44572            self,
44573            encoder: &mut fidl::encoding::Encoder<'_, D>,
44574            offset: usize,
44575            _depth: fidl::encoding::Depth,
44576        ) -> fidl::Result<()> {
44577            encoder.debug_check_bounds::<RecursiveUnion>(offset);
44578            encoder.write_num::<u64>(self.ordinal(), offset);
44579            match self {
44580                RecursiveUnion::S(ref val) => {
44581                    fidl::encoding::encode_in_envelope::<RecursiveUnionStruct, D>(
44582                        <RecursiveUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44583                        encoder,
44584                        offset + 8,
44585                        _depth,
44586                    )
44587                }
44588                RecursiveUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
44589            }
44590        }
44591    }
44592
44593    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnion {
44594        #[inline(always)]
44595        fn new_empty() -> Self {
44596            Self::__SourceBreaking { unknown_ordinal: 0 }
44597        }
44598
44599        #[inline]
44600        unsafe fn decode(
44601            &mut self,
44602            decoder: &mut fidl::encoding::Decoder<'_, D>,
44603            offset: usize,
44604            mut depth: fidl::encoding::Depth,
44605        ) -> fidl::Result<()> {
44606            decoder.debug_check_bounds::<Self>(offset);
44607            #[allow(unused_variables)]
44608            let next_out_of_line = decoder.next_out_of_line();
44609            let handles_before = decoder.remaining_handles();
44610            let (ordinal, inlined, num_bytes, num_handles) =
44611                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44612
44613            let member_inline_size = match ordinal {
44614                1 => <RecursiveUnionStruct as fidl::encoding::TypeMarker>::inline_size(
44615                    decoder.context,
44616                ),
44617                0 => return Err(fidl::Error::UnknownUnionTag),
44618                _ => num_bytes as usize,
44619            };
44620
44621            if inlined != (member_inline_size <= 4) {
44622                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44623            }
44624            let _inner_offset;
44625            if inlined {
44626                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44627                _inner_offset = offset + 8;
44628            } else {
44629                depth.increment()?;
44630                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44631            }
44632            match ordinal {
44633                1 => {
44634                    #[allow(irrefutable_let_patterns)]
44635                    if let RecursiveUnion::S(_) = self {
44636                        // Do nothing, read the value into the object
44637                    } else {
44638                        // Initialize `self` to the right variant
44639                        *self = RecursiveUnion::S(fidl::new_empty!(RecursiveUnionStruct, D));
44640                    }
44641                    #[allow(irrefutable_let_patterns)]
44642                    if let RecursiveUnion::S(ref mut val) = self {
44643                        fidl::decode!(RecursiveUnionStruct, D, val, decoder, _inner_offset, depth)?;
44644                    } else {
44645                        unreachable!()
44646                    }
44647                }
44648                #[allow(deprecated)]
44649                ordinal => {
44650                    for _ in 0..num_handles {
44651                        decoder.drop_next_handle()?;
44652                    }
44653                    *self = RecursiveUnion::__SourceBreaking { unknown_ordinal: ordinal };
44654                }
44655            }
44656            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44657                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44658            }
44659            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44660                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44661            }
44662            Ok(())
44663        }
44664    }
44665
44666    impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnion {
44667        type Borrowed<'a> = &'a Self;
44668        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44669            value
44670        }
44671    }
44672
44673    unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnion {
44674        type Owned = Self;
44675
44676        #[inline(always)]
44677        fn inline_align(_context: fidl::encoding::Context) -> usize {
44678            8
44679        }
44680
44681        #[inline(always)]
44682        fn inline_size(_context: fidl::encoding::Context) -> usize {
44683            16
44684        }
44685    }
44686
44687    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorUnion, D>
44688        for &RecursiveVectorUnion
44689    {
44690        #[inline]
44691        unsafe fn encode(
44692            self,
44693            encoder: &mut fidl::encoding::Encoder<'_, D>,
44694            offset: usize,
44695            _depth: fidl::encoding::Depth,
44696        ) -> fidl::Result<()> {
44697            encoder.debug_check_bounds::<RecursiveVectorUnion>(offset);
44698            encoder.write_num::<u64>(self.ordinal(), offset);
44699            match self {
44700                RecursiveVectorUnion::Vec(ref val) => fidl::encoding::encode_in_envelope::<
44701                    fidl::encoding::UnboundedVector<
44702                        fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44703                    >,
44704                    D,
44705                >(
44706                    <fidl::encoding::UnboundedVector<
44707                        fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44708                    > as fidl::encoding::ValueTypeMarker>::borrow(val),
44709                    encoder,
44710                    offset + 8,
44711                    _depth,
44712                ),
44713            }
44714        }
44715    }
44716
44717    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorUnion {
44718        #[inline(always)]
44719        fn new_empty() -> Self {
44720            Self::Vec(fidl::new_empty!(
44721                fidl::encoding::UnboundedVector<
44722                    fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44723                >,
44724                D
44725            ))
44726        }
44727
44728        #[inline]
44729        unsafe fn decode(
44730            &mut self,
44731            decoder: &mut fidl::encoding::Decoder<'_, D>,
44732            offset: usize,
44733            mut depth: fidl::encoding::Depth,
44734        ) -> fidl::Result<()> {
44735            decoder.debug_check_bounds::<Self>(offset);
44736            #[allow(unused_variables)]
44737            let next_out_of_line = decoder.next_out_of_line();
44738            let handles_before = decoder.remaining_handles();
44739            let (ordinal, inlined, num_bytes, num_handles) =
44740                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44741
44742            let member_inline_size = match ordinal {
44743                1 => <fidl::encoding::UnboundedVector<
44744                    fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44745                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44746                _ => return Err(fidl::Error::UnknownUnionTag),
44747            };
44748
44749            if inlined != (member_inline_size <= 4) {
44750                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44751            }
44752            let _inner_offset;
44753            if inlined {
44754                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44755                _inner_offset = offset + 8;
44756            } else {
44757                depth.increment()?;
44758                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44759            }
44760            match ordinal {
44761                1 => {
44762                    #[allow(irrefutable_let_patterns)]
44763                    if let RecursiveVectorUnion::Vec(_) = self {
44764                        // Do nothing, read the value into the object
44765                    } else {
44766                        // Initialize `self` to the right variant
44767                        *self = RecursiveVectorUnion::Vec(fidl::new_empty!(
44768                            fidl::encoding::UnboundedVector<
44769                                fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44770                            >,
44771                            D
44772                        ));
44773                    }
44774                    #[allow(irrefutable_let_patterns)]
44775                    if let RecursiveVectorUnion::Vec(ref mut val) = self {
44776                        fidl::decode!(
44777                            fidl::encoding::UnboundedVector<
44778                                fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44779                            >,
44780                            D,
44781                            val,
44782                            decoder,
44783                            _inner_offset,
44784                            depth
44785                        )?;
44786                    } else {
44787                        unreachable!()
44788                    }
44789                }
44790                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44791            }
44792            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44793                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44794            }
44795            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44796                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44797            }
44798            Ok(())
44799        }
44800    }
44801
44802    impl fidl::encoding::ValueTypeMarker for Regression9Result {
44803        type Borrowed<'a> = &'a Self;
44804        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44805            value
44806        }
44807    }
44808
44809    unsafe impl fidl::encoding::TypeMarker for Regression9Result {
44810        type Owned = Self;
44811
44812        #[inline(always)]
44813        fn inline_align(_context: fidl::encoding::Context) -> usize {
44814            8
44815        }
44816
44817        #[inline(always)]
44818        fn inline_size(_context: fidl::encoding::Context) -> usize {
44819            16
44820        }
44821    }
44822
44823    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Result, D>
44824        for &Regression9Result
44825    {
44826        #[inline]
44827        unsafe fn encode(
44828            self,
44829            encoder: &mut fidl::encoding::Encoder<'_, D>,
44830            offset: usize,
44831            _depth: fidl::encoding::Depth,
44832        ) -> fidl::Result<()> {
44833            encoder.debug_check_bounds::<Regression9Result>(offset);
44834            encoder.write_num::<u64>(self.ordinal(), offset);
44835            match self {
44836                Regression9Result::Ok(ref val) => {
44837                    fidl::encoding::encode_in_envelope::<Regression9Value, D>(
44838                        <Regression9Value as fidl::encoding::ValueTypeMarker>::borrow(val),
44839                        encoder,
44840                        offset + 8,
44841                        _depth,
44842                    )
44843                }
44844                Regression9Result::Error(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
44845                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44846                    encoder,
44847                    offset + 8,
44848                    _depth,
44849                ),
44850            }
44851        }
44852    }
44853
44854    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Result {
44855        #[inline(always)]
44856        fn new_empty() -> Self {
44857            Self::Ok(fidl::new_empty!(Regression9Value, D))
44858        }
44859
44860        #[inline]
44861        unsafe fn decode(
44862            &mut self,
44863            decoder: &mut fidl::encoding::Decoder<'_, D>,
44864            offset: usize,
44865            mut depth: fidl::encoding::Depth,
44866        ) -> fidl::Result<()> {
44867            decoder.debug_check_bounds::<Self>(offset);
44868            #[allow(unused_variables)]
44869            let next_out_of_line = decoder.next_out_of_line();
44870            let handles_before = decoder.remaining_handles();
44871            let (ordinal, inlined, num_bytes, num_handles) =
44872                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44873
44874            let member_inline_size = match ordinal {
44875                1 => <Regression9Value as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44876                2 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44877                _ => return Err(fidl::Error::UnknownUnionTag),
44878            };
44879
44880            if inlined != (member_inline_size <= 4) {
44881                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44882            }
44883            let _inner_offset;
44884            if inlined {
44885                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44886                _inner_offset = offset + 8;
44887            } else {
44888                depth.increment()?;
44889                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44890            }
44891            match ordinal {
44892                1 => {
44893                    #[allow(irrefutable_let_patterns)]
44894                    if let Regression9Result::Ok(_) = self {
44895                        // Do nothing, read the value into the object
44896                    } else {
44897                        // Initialize `self` to the right variant
44898                        *self = Regression9Result::Ok(fidl::new_empty!(Regression9Value, D));
44899                    }
44900                    #[allow(irrefutable_let_patterns)]
44901                    if let Regression9Result::Ok(ref mut val) = self {
44902                        fidl::decode!(Regression9Value, D, val, decoder, _inner_offset, depth)?;
44903                    } else {
44904                        unreachable!()
44905                    }
44906                }
44907                2 => {
44908                    #[allow(irrefutable_let_patterns)]
44909                    if let Regression9Result::Error(_) = self {
44910                        // Do nothing, read the value into the object
44911                    } else {
44912                        // Initialize `self` to the right variant
44913                        *self = Regression9Result::Error(fidl::new_empty!(u32, D));
44914                    }
44915                    #[allow(irrefutable_let_patterns)]
44916                    if let Regression9Result::Error(ref mut val) = self {
44917                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
44918                    } else {
44919                        unreachable!()
44920                    }
44921                }
44922                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44923            }
44924            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44925                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44926            }
44927            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44928                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44929            }
44930            Ok(())
44931        }
44932    }
44933
44934    impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnion {
44935        type Borrowed<'a> = &'a Self;
44936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44937            value
44938        }
44939    }
44940
44941    unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnion {
44942        type Owned = Self;
44943
44944        #[inline(always)]
44945        fn inline_align(_context: fidl::encoding::Context) -> usize {
44946            8
44947        }
44948
44949        #[inline(always)]
44950        fn inline_size(_context: fidl::encoding::Context) -> usize {
44951            16
44952        }
44953    }
44954
44955    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalUnion, D>
44956        for &ReverseOrdinalUnion
44957    {
44958        #[inline]
44959        unsafe fn encode(
44960            self,
44961            encoder: &mut fidl::encoding::Encoder<'_, D>,
44962            offset: usize,
44963            _depth: fidl::encoding::Depth,
44964        ) -> fidl::Result<()> {
44965            encoder.debug_check_bounds::<ReverseOrdinalUnion>(offset);
44966            encoder.write_num::<u64>(self.ordinal(), offset);
44967            match self {
44968                ReverseOrdinalUnion::Z(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
44969                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44970                    encoder,
44971                    offset + 8,
44972                    _depth,
44973                ),
44974                ReverseOrdinalUnion::Y(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
44975                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
44976                    encoder,
44977                    offset + 8,
44978                    _depth,
44979                ),
44980                ReverseOrdinalUnion::X(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
44981                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
44982                    encoder,
44983                    offset + 8,
44984                    _depth,
44985                ),
44986            }
44987        }
44988    }
44989
44990    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalUnion {
44991        #[inline(always)]
44992        fn new_empty() -> Self {
44993            Self::Z(fidl::new_empty!(u32, D))
44994        }
44995
44996        #[inline]
44997        unsafe fn decode(
44998            &mut self,
44999            decoder: &mut fidl::encoding::Decoder<'_, D>,
45000            offset: usize,
45001            mut depth: fidl::encoding::Depth,
45002        ) -> fidl::Result<()> {
45003            decoder.debug_check_bounds::<Self>(offset);
45004            #[allow(unused_variables)]
45005            let next_out_of_line = decoder.next_out_of_line();
45006            let handles_before = decoder.remaining_handles();
45007            let (ordinal, inlined, num_bytes, num_handles) =
45008                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45009
45010            let member_inline_size = match ordinal {
45011                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45012                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45013                4 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45014                _ => return Err(fidl::Error::UnknownUnionTag),
45015            };
45016
45017            if inlined != (member_inline_size <= 4) {
45018                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45019            }
45020            let _inner_offset;
45021            if inlined {
45022                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45023                _inner_offset = offset + 8;
45024            } else {
45025                depth.increment()?;
45026                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45027            }
45028            match ordinal {
45029                1 => {
45030                    #[allow(irrefutable_let_patterns)]
45031                    if let ReverseOrdinalUnion::Z(_) = self {
45032                        // Do nothing, read the value into the object
45033                    } else {
45034                        // Initialize `self` to the right variant
45035                        *self = ReverseOrdinalUnion::Z(fidl::new_empty!(u32, D));
45036                    }
45037                    #[allow(irrefutable_let_patterns)]
45038                    if let ReverseOrdinalUnion::Z(ref mut val) = self {
45039                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45040                    } else {
45041                        unreachable!()
45042                    }
45043                }
45044                2 => {
45045                    #[allow(irrefutable_let_patterns)]
45046                    if let ReverseOrdinalUnion::Y(_) = self {
45047                        // Do nothing, read the value into the object
45048                    } else {
45049                        // Initialize `self` to the right variant
45050                        *self = ReverseOrdinalUnion::Y(fidl::new_empty!(bool, D));
45051                    }
45052                    #[allow(irrefutable_let_patterns)]
45053                    if let ReverseOrdinalUnion::Y(ref mut val) = self {
45054                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
45055                    } else {
45056                        unreachable!()
45057                    }
45058                }
45059                4 => {
45060                    #[allow(irrefutable_let_patterns)]
45061                    if let ReverseOrdinalUnion::X(_) = self {
45062                        // Do nothing, read the value into the object
45063                    } else {
45064                        // Initialize `self` to the right variant
45065                        *self = ReverseOrdinalUnion::X(fidl::new_empty!(i64, D));
45066                    }
45067                    #[allow(irrefutable_let_patterns)]
45068                    if let ReverseOrdinalUnion::X(ref mut val) = self {
45069                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
45070                    } else {
45071                        unreachable!()
45072                    }
45073                }
45074                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45075            }
45076            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45077                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45078            }
45079            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45080                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45081            }
45082            Ok(())
45083        }
45084    }
45085
45086    impl fidl::encoding::ValueTypeMarker for SampleStrictXUnion {
45087        type Borrowed<'a> = &'a Self;
45088        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45089            value
45090        }
45091    }
45092
45093    unsafe impl fidl::encoding::TypeMarker for SampleStrictXUnion {
45094        type Owned = Self;
45095
45096        #[inline(always)]
45097        fn inline_align(_context: fidl::encoding::Context) -> usize {
45098            8
45099        }
45100
45101        #[inline(always)]
45102        fn inline_size(_context: fidl::encoding::Context) -> usize {
45103            16
45104        }
45105    }
45106
45107    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleStrictXUnion, D>
45108        for &SampleStrictXUnion
45109    {
45110        #[inline]
45111        unsafe fn encode(
45112            self,
45113            encoder: &mut fidl::encoding::Encoder<'_, D>,
45114            offset: usize,
45115            _depth: fidl::encoding::Depth,
45116        ) -> fidl::Result<()> {
45117            encoder.debug_check_bounds::<SampleStrictXUnion>(offset);
45118            encoder.write_num::<u64>(self.ordinal(), offset);
45119            match self {
45120                SampleStrictXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45121                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45122                    encoder,
45123                    offset + 8,
45124                    _depth,
45125                ),
45126                SampleStrictXUnion::Su(ref val) => {
45127                    fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
45128                        <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
45129                        encoder,
45130                        offset + 8,
45131                        _depth,
45132                    )
45133                }
45134                SampleStrictXUnion::St(ref val) => {
45135                    fidl::encoding::encode_in_envelope::<SimpleTable, D>(
45136                        <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
45137                        encoder,
45138                        offset + 8,
45139                        _depth,
45140                    )
45141                }
45142            }
45143        }
45144    }
45145
45146    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleStrictXUnion {
45147        #[inline(always)]
45148        fn new_empty() -> Self {
45149            Self::U(fidl::new_empty!(u32, D))
45150        }
45151
45152        #[inline]
45153        unsafe fn decode(
45154            &mut self,
45155            decoder: &mut fidl::encoding::Decoder<'_, D>,
45156            offset: usize,
45157            mut depth: fidl::encoding::Depth,
45158        ) -> fidl::Result<()> {
45159            decoder.debug_check_bounds::<Self>(offset);
45160            #[allow(unused_variables)]
45161            let next_out_of_line = decoder.next_out_of_line();
45162            let handles_before = decoder.remaining_handles();
45163            let (ordinal, inlined, num_bytes, num_handles) =
45164                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45165
45166            let member_inline_size = match ordinal {
45167                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45168                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45169                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45170                _ => return Err(fidl::Error::UnknownUnionTag),
45171            };
45172
45173            if inlined != (member_inline_size <= 4) {
45174                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45175            }
45176            let _inner_offset;
45177            if inlined {
45178                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45179                _inner_offset = offset + 8;
45180            } else {
45181                depth.increment()?;
45182                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45183            }
45184            match ordinal {
45185                1 => {
45186                    #[allow(irrefutable_let_patterns)]
45187                    if let SampleStrictXUnion::U(_) = self {
45188                        // Do nothing, read the value into the object
45189                    } else {
45190                        // Initialize `self` to the right variant
45191                        *self = SampleStrictXUnion::U(fidl::new_empty!(u32, D));
45192                    }
45193                    #[allow(irrefutable_let_patterns)]
45194                    if let SampleStrictXUnion::U(ref mut val) = self {
45195                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45196                    } else {
45197                        unreachable!()
45198                    }
45199                }
45200                2 => {
45201                    #[allow(irrefutable_let_patterns)]
45202                    if let SampleStrictXUnion::Su(_) = self {
45203                        // Do nothing, read the value into the object
45204                    } else {
45205                        // Initialize `self` to the right variant
45206                        *self = SampleStrictXUnion::Su(fidl::new_empty!(SimpleUnion, D));
45207                    }
45208                    #[allow(irrefutable_let_patterns)]
45209                    if let SampleStrictXUnion::Su(ref mut val) = self {
45210                        fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
45211                    } else {
45212                        unreachable!()
45213                    }
45214                }
45215                3 => {
45216                    #[allow(irrefutable_let_patterns)]
45217                    if let SampleStrictXUnion::St(_) = self {
45218                        // Do nothing, read the value into the object
45219                    } else {
45220                        // Initialize `self` to the right variant
45221                        *self = SampleStrictXUnion::St(fidl::new_empty!(SimpleTable, D));
45222                    }
45223                    #[allow(irrefutable_let_patterns)]
45224                    if let SampleStrictXUnion::St(ref mut val) = self {
45225                        fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
45226                    } else {
45227                        unreachable!()
45228                    }
45229                }
45230                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45231            }
45232            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45233                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45234            }
45235            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45236                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45237            }
45238            Ok(())
45239        }
45240    }
45241
45242    impl fidl::encoding::ValueTypeMarker for SampleXUnion {
45243        type Borrowed<'a> = &'a Self;
45244        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45245            value
45246        }
45247    }
45248
45249    unsafe impl fidl::encoding::TypeMarker for SampleXUnion {
45250        type Owned = Self;
45251
45252        #[inline(always)]
45253        fn inline_align(_context: fidl::encoding::Context) -> usize {
45254            8
45255        }
45256
45257        #[inline(always)]
45258        fn inline_size(_context: fidl::encoding::Context) -> usize {
45259            16
45260        }
45261    }
45262
45263    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleXUnion, D>
45264        for &SampleXUnion
45265    {
45266        #[inline]
45267        unsafe fn encode(
45268            self,
45269            encoder: &mut fidl::encoding::Encoder<'_, D>,
45270            offset: usize,
45271            _depth: fidl::encoding::Depth,
45272        ) -> fidl::Result<()> {
45273            encoder.debug_check_bounds::<SampleXUnion>(offset);
45274            encoder.write_num::<u64>(self.ordinal(), offset);
45275            match self {
45276                SampleXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45277                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45278                    encoder,
45279                    offset + 8,
45280                    _depth,
45281                ),
45282                SampleXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
45283                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
45284                    encoder,
45285                    offset + 8,
45286                    _depth,
45287                ),
45288                SampleXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
45289                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
45290                    encoder,
45291                    offset + 8,
45292                    _depth,
45293                ),
45294                SampleXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
45295            }
45296        }
45297    }
45298
45299    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleXUnion {
45300        #[inline(always)]
45301        fn new_empty() -> Self {
45302            Self::__SourceBreaking { unknown_ordinal: 0 }
45303        }
45304
45305        #[inline]
45306        unsafe fn decode(
45307            &mut self,
45308            decoder: &mut fidl::encoding::Decoder<'_, D>,
45309            offset: usize,
45310            mut depth: fidl::encoding::Depth,
45311        ) -> fidl::Result<()> {
45312            decoder.debug_check_bounds::<Self>(offset);
45313            #[allow(unused_variables)]
45314            let next_out_of_line = decoder.next_out_of_line();
45315            let handles_before = decoder.remaining_handles();
45316            let (ordinal, inlined, num_bytes, num_handles) =
45317                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45318
45319            let member_inline_size = match ordinal {
45320                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45321                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45322                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45323                0 => return Err(fidl::Error::UnknownUnionTag),
45324                _ => num_bytes as usize,
45325            };
45326
45327            if inlined != (member_inline_size <= 4) {
45328                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45329            }
45330            let _inner_offset;
45331            if inlined {
45332                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45333                _inner_offset = offset + 8;
45334            } else {
45335                depth.increment()?;
45336                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45337            }
45338            match ordinal {
45339                1 => {
45340                    #[allow(irrefutable_let_patterns)]
45341                    if let SampleXUnion::U(_) = self {
45342                        // Do nothing, read the value into the object
45343                    } else {
45344                        // Initialize `self` to the right variant
45345                        *self = SampleXUnion::U(fidl::new_empty!(u32, D));
45346                    }
45347                    #[allow(irrefutable_let_patterns)]
45348                    if let SampleXUnion::U(ref mut val) = self {
45349                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45350                    } else {
45351                        unreachable!()
45352                    }
45353                }
45354                2 => {
45355                    #[allow(irrefutable_let_patterns)]
45356                    if let SampleXUnion::Su(_) = self {
45357                        // Do nothing, read the value into the object
45358                    } else {
45359                        // Initialize `self` to the right variant
45360                        *self = SampleXUnion::Su(fidl::new_empty!(SimpleUnion, D));
45361                    }
45362                    #[allow(irrefutable_let_patterns)]
45363                    if let SampleXUnion::Su(ref mut val) = self {
45364                        fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
45365                    } else {
45366                        unreachable!()
45367                    }
45368                }
45369                3 => {
45370                    #[allow(irrefutable_let_patterns)]
45371                    if let SampleXUnion::St(_) = self {
45372                        // Do nothing, read the value into the object
45373                    } else {
45374                        // Initialize `self` to the right variant
45375                        *self = SampleXUnion::St(fidl::new_empty!(SimpleTable, D));
45376                    }
45377                    #[allow(irrefutable_let_patterns)]
45378                    if let SampleXUnion::St(ref mut val) = self {
45379                        fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
45380                    } else {
45381                        unreachable!()
45382                    }
45383                }
45384                #[allow(deprecated)]
45385                ordinal => {
45386                    for _ in 0..num_handles {
45387                        decoder.drop_next_handle()?;
45388                    }
45389                    *self = SampleXUnion::__SourceBreaking { unknown_ordinal: ordinal };
45390                }
45391            }
45392            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45393                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45394            }
45395            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45396                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45397            }
45398            Ok(())
45399        }
45400    }
45401
45402    impl fidl::encoding::ValueTypeMarker for SimpleUnion {
45403        type Borrowed<'a> = &'a Self;
45404        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45405            value
45406        }
45407    }
45408
45409    unsafe impl fidl::encoding::TypeMarker for SimpleUnion {
45410        type Owned = Self;
45411
45412        #[inline(always)]
45413        fn inline_align(_context: fidl::encoding::Context) -> usize {
45414            8
45415        }
45416
45417        #[inline(always)]
45418        fn inline_size(_context: fidl::encoding::Context) -> usize {
45419            16
45420        }
45421    }
45422
45423    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleUnion, D>
45424        for &SimpleUnion
45425    {
45426        #[inline]
45427        unsafe fn encode(
45428            self,
45429            encoder: &mut fidl::encoding::Encoder<'_, D>,
45430            offset: usize,
45431            _depth: fidl::encoding::Depth,
45432        ) -> fidl::Result<()> {
45433            encoder.debug_check_bounds::<SimpleUnion>(offset);
45434            encoder.write_num::<u64>(self.ordinal(), offset);
45435            match self {
45436                SimpleUnion::I32(ref val) => fidl::encoding::encode_in_envelope::<i32, D>(
45437                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45438                    encoder,
45439                    offset + 8,
45440                    _depth,
45441                ),
45442                SimpleUnion::I64(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
45443                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
45444                    encoder,
45445                    offset + 8,
45446                    _depth,
45447                ),
45448                SimpleUnion::S(ref val) => fidl::encoding::encode_in_envelope::<Int64Struct, D>(
45449                    <Int64Struct as fidl::encoding::ValueTypeMarker>::borrow(val),
45450                    encoder,
45451                    offset + 8,
45452                    _depth,
45453                ),
45454                SimpleUnion::Str(ref val) => fidl::encoding::encode_in_envelope::<
45455                    fidl::encoding::UnboundedString,
45456                    D,
45457                >(
45458                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
45459                        val,
45460                    ),
45461                    encoder,
45462                    offset + 8,
45463                    _depth,
45464                ),
45465            }
45466        }
45467    }
45468
45469    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleUnion {
45470        #[inline(always)]
45471        fn new_empty() -> Self {
45472            Self::I32(fidl::new_empty!(i32, D))
45473        }
45474
45475        #[inline]
45476        unsafe fn decode(
45477            &mut self,
45478            decoder: &mut fidl::encoding::Decoder<'_, D>,
45479            offset: usize,
45480            mut depth: fidl::encoding::Depth,
45481        ) -> fidl::Result<()> {
45482            decoder.debug_check_bounds::<Self>(offset);
45483            #[allow(unused_variables)]
45484            let next_out_of_line = decoder.next_out_of_line();
45485            let handles_before = decoder.remaining_handles();
45486            let (ordinal, inlined, num_bytes, num_handles) =
45487                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45488
45489            let member_inline_size = match ordinal {
45490                1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45491                2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45492                3 => <Int64Struct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45493                4 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
45494                    decoder.context,
45495                ),
45496                _ => return Err(fidl::Error::UnknownUnionTag),
45497            };
45498
45499            if inlined != (member_inline_size <= 4) {
45500                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45501            }
45502            let _inner_offset;
45503            if inlined {
45504                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45505                _inner_offset = offset + 8;
45506            } else {
45507                depth.increment()?;
45508                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45509            }
45510            match ordinal {
45511                1 => {
45512                    #[allow(irrefutable_let_patterns)]
45513                    if let SimpleUnion::I32(_) = self {
45514                        // Do nothing, read the value into the object
45515                    } else {
45516                        // Initialize `self` to the right variant
45517                        *self = SimpleUnion::I32(fidl::new_empty!(i32, D));
45518                    }
45519                    #[allow(irrefutable_let_patterns)]
45520                    if let SimpleUnion::I32(ref mut val) = self {
45521                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
45522                    } else {
45523                        unreachable!()
45524                    }
45525                }
45526                2 => {
45527                    #[allow(irrefutable_let_patterns)]
45528                    if let SimpleUnion::I64(_) = self {
45529                        // Do nothing, read the value into the object
45530                    } else {
45531                        // Initialize `self` to the right variant
45532                        *self = SimpleUnion::I64(fidl::new_empty!(i64, D));
45533                    }
45534                    #[allow(irrefutable_let_patterns)]
45535                    if let SimpleUnion::I64(ref mut val) = self {
45536                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
45537                    } else {
45538                        unreachable!()
45539                    }
45540                }
45541                3 => {
45542                    #[allow(irrefutable_let_patterns)]
45543                    if let SimpleUnion::S(_) = self {
45544                        // Do nothing, read the value into the object
45545                    } else {
45546                        // Initialize `self` to the right variant
45547                        *self = SimpleUnion::S(fidl::new_empty!(Int64Struct, D));
45548                    }
45549                    #[allow(irrefutable_let_patterns)]
45550                    if let SimpleUnion::S(ref mut val) = self {
45551                        fidl::decode!(Int64Struct, D, val, decoder, _inner_offset, depth)?;
45552                    } else {
45553                        unreachable!()
45554                    }
45555                }
45556                4 => {
45557                    #[allow(irrefutable_let_patterns)]
45558                    if let SimpleUnion::Str(_) = self {
45559                        // Do nothing, read the value into the object
45560                    } else {
45561                        // Initialize `self` to the right variant
45562                        *self =
45563                            SimpleUnion::Str(fidl::new_empty!(fidl::encoding::UnboundedString, D));
45564                    }
45565                    #[allow(irrefutable_let_patterns)]
45566                    if let SimpleUnion::Str(ref mut val) = self {
45567                        fidl::decode!(
45568                            fidl::encoding::UnboundedString,
45569                            D,
45570                            val,
45571                            decoder,
45572                            _inner_offset,
45573                            depth
45574                        )?;
45575                    } else {
45576                        unreachable!()
45577                    }
45578                }
45579                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45580            }
45581            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45582                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45583            }
45584            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45585                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45586            }
45587            Ok(())
45588        }
45589    }
45590
45591    impl fidl::encoding::ValueTypeMarker for SingleVariantUnion {
45592        type Borrowed<'a> = &'a Self;
45593        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45594            value
45595        }
45596    }
45597
45598    unsafe impl fidl::encoding::TypeMarker for SingleVariantUnion {
45599        type Owned = Self;
45600
45601        #[inline(always)]
45602        fn inline_align(_context: fidl::encoding::Context) -> usize {
45603            8
45604        }
45605
45606        #[inline(always)]
45607        fn inline_size(_context: fidl::encoding::Context) -> usize {
45608            16
45609        }
45610    }
45611
45612    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SingleVariantUnion, D>
45613        for &SingleVariantUnion
45614    {
45615        #[inline]
45616        unsafe fn encode(
45617            self,
45618            encoder: &mut fidl::encoding::Encoder<'_, D>,
45619            offset: usize,
45620            _depth: fidl::encoding::Depth,
45621        ) -> fidl::Result<()> {
45622            encoder.debug_check_bounds::<SingleVariantUnion>(offset);
45623            encoder.write_num::<u64>(self.ordinal(), offset);
45624            match self {
45625                SingleVariantUnion::X(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45626                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45627                    encoder,
45628                    offset + 8,
45629                    _depth,
45630                ),
45631            }
45632        }
45633    }
45634
45635    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SingleVariantUnion {
45636        #[inline(always)]
45637        fn new_empty() -> Self {
45638            Self::X(fidl::new_empty!(u32, D))
45639        }
45640
45641        #[inline]
45642        unsafe fn decode(
45643            &mut self,
45644            decoder: &mut fidl::encoding::Decoder<'_, D>,
45645            offset: usize,
45646            mut depth: fidl::encoding::Depth,
45647        ) -> fidl::Result<()> {
45648            decoder.debug_check_bounds::<Self>(offset);
45649            #[allow(unused_variables)]
45650            let next_out_of_line = decoder.next_out_of_line();
45651            let handles_before = decoder.remaining_handles();
45652            let (ordinal, inlined, num_bytes, num_handles) =
45653                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45654
45655            let member_inline_size = match ordinal {
45656                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45657                _ => return Err(fidl::Error::UnknownUnionTag),
45658            };
45659
45660            if inlined != (member_inline_size <= 4) {
45661                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45662            }
45663            let _inner_offset;
45664            if inlined {
45665                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45666                _inner_offset = offset + 8;
45667            } else {
45668                depth.increment()?;
45669                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45670            }
45671            match ordinal {
45672                1 => {
45673                    #[allow(irrefutable_let_patterns)]
45674                    if let SingleVariantUnion::X(_) = self {
45675                        // Do nothing, read the value into the object
45676                    } else {
45677                        // Initialize `self` to the right variant
45678                        *self = SingleVariantUnion::X(fidl::new_empty!(u32, D));
45679                    }
45680                    #[allow(irrefutable_let_patterns)]
45681                    if let SingleVariantUnion::X(ref mut val) = self {
45682                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45683                    } else {
45684                        unreachable!()
45685                    }
45686                }
45687                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45688            }
45689            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45690                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45691            }
45692            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45693                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45694            }
45695            Ok(())
45696        }
45697    }
45698
45699    impl fidl::encoding::ValueTypeMarker for StringBoolUnion {
45700        type Borrowed<'a> = &'a Self;
45701        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45702            value
45703        }
45704    }
45705
45706    unsafe impl fidl::encoding::TypeMarker for StringBoolUnion {
45707        type Owned = Self;
45708
45709        #[inline(always)]
45710        fn inline_align(_context: fidl::encoding::Context) -> usize {
45711            8
45712        }
45713
45714        #[inline(always)]
45715        fn inline_size(_context: fidl::encoding::Context) -> usize {
45716            16
45717        }
45718    }
45719
45720    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringBoolUnion, D>
45721        for &StringBoolUnion
45722    {
45723        #[inline]
45724        unsafe fn encode(
45725            self,
45726            encoder: &mut fidl::encoding::Encoder<'_, D>,
45727            offset: usize,
45728            _depth: fidl::encoding::Depth,
45729        ) -> fidl::Result<()> {
45730            encoder.debug_check_bounds::<StringBoolUnion>(offset);
45731            encoder.write_num::<u64>(self.ordinal(), offset);
45732            match self {
45733                StringBoolUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
45734                    fidl::encoding::UnboundedString,
45735                    D,
45736                >(
45737                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
45738                        val,
45739                    ),
45740                    encoder,
45741                    offset + 8,
45742                    _depth,
45743                ),
45744                StringBoolUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
45745                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
45746                    encoder,
45747                    offset + 8,
45748                    _depth,
45749                ),
45750            }
45751        }
45752    }
45753
45754    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringBoolUnion {
45755        #[inline(always)]
45756        fn new_empty() -> Self {
45757            Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
45758        }
45759
45760        #[inline]
45761        unsafe fn decode(
45762            &mut self,
45763            decoder: &mut fidl::encoding::Decoder<'_, D>,
45764            offset: usize,
45765            mut depth: fidl::encoding::Depth,
45766        ) -> fidl::Result<()> {
45767            decoder.debug_check_bounds::<Self>(offset);
45768            #[allow(unused_variables)]
45769            let next_out_of_line = decoder.next_out_of_line();
45770            let handles_before = decoder.remaining_handles();
45771            let (ordinal, inlined, num_bytes, num_handles) =
45772                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45773
45774            let member_inline_size = match ordinal {
45775                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
45776                    decoder.context,
45777                ),
45778                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45779                _ => return Err(fidl::Error::UnknownUnionTag),
45780            };
45781
45782            if inlined != (member_inline_size <= 4) {
45783                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45784            }
45785            let _inner_offset;
45786            if inlined {
45787                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45788                _inner_offset = offset + 8;
45789            } else {
45790                depth.increment()?;
45791                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45792            }
45793            match ordinal {
45794                1 => {
45795                    #[allow(irrefutable_let_patterns)]
45796                    if let StringBoolUnion::S(_) = self {
45797                        // Do nothing, read the value into the object
45798                    } else {
45799                        // Initialize `self` to the right variant
45800                        *self = StringBoolUnion::S(fidl::new_empty!(
45801                            fidl::encoding::UnboundedString,
45802                            D
45803                        ));
45804                    }
45805                    #[allow(irrefutable_let_patterns)]
45806                    if let StringBoolUnion::S(ref mut val) = self {
45807                        fidl::decode!(
45808                            fidl::encoding::UnboundedString,
45809                            D,
45810                            val,
45811                            decoder,
45812                            _inner_offset,
45813                            depth
45814                        )?;
45815                    } else {
45816                        unreachable!()
45817                    }
45818                }
45819                2 => {
45820                    #[allow(irrefutable_let_patterns)]
45821                    if let StringBoolUnion::B(_) = self {
45822                        // Do nothing, read the value into the object
45823                    } else {
45824                        // Initialize `self` to the right variant
45825                        *self = StringBoolUnion::B(fidl::new_empty!(bool, D));
45826                    }
45827                    #[allow(irrefutable_let_patterns)]
45828                    if let StringBoolUnion::B(ref mut val) = self {
45829                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
45830                    } else {
45831                        unreachable!()
45832                    }
45833                }
45834                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45835            }
45836            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45837                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45838            }
45839            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45840                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45841            }
45842            Ok(())
45843        }
45844    }
45845
45846    impl fidl::encoding::ValueTypeMarker for StringUnion {
45847        type Borrowed<'a> = &'a Self;
45848        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45849            value
45850        }
45851    }
45852
45853    unsafe impl fidl::encoding::TypeMarker for StringUnion {
45854        type Owned = Self;
45855
45856        #[inline(always)]
45857        fn inline_align(_context: fidl::encoding::Context) -> usize {
45858            8
45859        }
45860
45861        #[inline(always)]
45862        fn inline_size(_context: fidl::encoding::Context) -> usize {
45863            16
45864        }
45865    }
45866
45867    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnion, D>
45868        for &StringUnion
45869    {
45870        #[inline]
45871        unsafe fn encode(
45872            self,
45873            encoder: &mut fidl::encoding::Encoder<'_, D>,
45874            offset: usize,
45875            _depth: fidl::encoding::Depth,
45876        ) -> fidl::Result<()> {
45877            encoder.debug_check_bounds::<StringUnion>(offset);
45878            encoder.write_num::<u64>(self.ordinal(), offset);
45879            match self {
45880                StringUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45881                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45882                    encoder,
45883                    offset + 8,
45884                    _depth,
45885                ),
45886                StringUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
45887                    fidl::encoding::UnboundedString,
45888                    D,
45889                >(
45890                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
45891                        val,
45892                    ),
45893                    encoder,
45894                    offset + 8,
45895                    _depth,
45896                ),
45897                StringUnion::U8(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45898                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45899                    encoder,
45900                    offset + 8,
45901                    _depth,
45902                ),
45903            }
45904        }
45905    }
45906
45907    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnion {
45908        #[inline(always)]
45909        fn new_empty() -> Self {
45910            Self::Unused(fidl::new_empty!(u8, D))
45911        }
45912
45913        #[inline]
45914        unsafe fn decode(
45915            &mut self,
45916            decoder: &mut fidl::encoding::Decoder<'_, D>,
45917            offset: usize,
45918            mut depth: fidl::encoding::Depth,
45919        ) -> fidl::Result<()> {
45920            decoder.debug_check_bounds::<Self>(offset);
45921            #[allow(unused_variables)]
45922            let next_out_of_line = decoder.next_out_of_line();
45923            let handles_before = decoder.remaining_handles();
45924            let (ordinal, inlined, num_bytes, num_handles) =
45925                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45926
45927            let member_inline_size = match ordinal {
45928                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45929                2 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
45930                    decoder.context,
45931                ),
45932                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45933                _ => return Err(fidl::Error::UnknownUnionTag),
45934            };
45935
45936            if inlined != (member_inline_size <= 4) {
45937                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45938            }
45939            let _inner_offset;
45940            if inlined {
45941                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45942                _inner_offset = offset + 8;
45943            } else {
45944                depth.increment()?;
45945                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45946            }
45947            match ordinal {
45948                1 => {
45949                    #[allow(irrefutable_let_patterns)]
45950                    if let StringUnion::Unused(_) = self {
45951                        // Do nothing, read the value into the object
45952                    } else {
45953                        // Initialize `self` to the right variant
45954                        *self = StringUnion::Unused(fidl::new_empty!(u8, D));
45955                    }
45956                    #[allow(irrefutable_let_patterns)]
45957                    if let StringUnion::Unused(ref mut val) = self {
45958                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45959                    } else {
45960                        unreachable!()
45961                    }
45962                }
45963                2 => {
45964                    #[allow(irrefutable_let_patterns)]
45965                    if let StringUnion::S(_) = self {
45966                        // Do nothing, read the value into the object
45967                    } else {
45968                        // Initialize `self` to the right variant
45969                        *self =
45970                            StringUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
45971                    }
45972                    #[allow(irrefutable_let_patterns)]
45973                    if let StringUnion::S(ref mut val) = self {
45974                        fidl::decode!(
45975                            fidl::encoding::UnboundedString,
45976                            D,
45977                            val,
45978                            decoder,
45979                            _inner_offset,
45980                            depth
45981                        )?;
45982                    } else {
45983                        unreachable!()
45984                    }
45985                }
45986                3 => {
45987                    #[allow(irrefutable_let_patterns)]
45988                    if let StringUnion::U8(_) = self {
45989                        // Do nothing, read the value into the object
45990                    } else {
45991                        // Initialize `self` to the right variant
45992                        *self = StringUnion::U8(fidl::new_empty!(u8, D));
45993                    }
45994                    #[allow(irrefutable_let_patterns)]
45995                    if let StringUnion::U8(ref mut val) = self {
45996                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45997                    } else {
45998                        unreachable!()
45999                    }
46000                }
46001                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46002            }
46003            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46004                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46005            }
46006            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46007                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46008            }
46009            Ok(())
46010        }
46011    }
46012
46013    impl fidl::encoding::ValueTypeMarker for Uint8Union {
46014        type Borrowed<'a> = &'a Self;
46015        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46016            value
46017        }
46018    }
46019
46020    unsafe impl fidl::encoding::TypeMarker for Uint8Union {
46021        type Owned = Self;
46022
46023        #[inline(always)]
46024        fn inline_align(_context: fidl::encoding::Context) -> usize {
46025            8
46026        }
46027
46028        #[inline(always)]
46029        fn inline_size(_context: fidl::encoding::Context) -> usize {
46030            16
46031        }
46032    }
46033
46034    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Union, D>
46035        for &Uint8Union
46036    {
46037        #[inline]
46038        unsafe fn encode(
46039            self,
46040            encoder: &mut fidl::encoding::Encoder<'_, D>,
46041            offset: usize,
46042            _depth: fidl::encoding::Depth,
46043        ) -> fidl::Result<()> {
46044            encoder.debug_check_bounds::<Uint8Union>(offset);
46045            encoder.write_num::<u64>(self.ordinal(), offset);
46046            match self {
46047                Uint8Union::Uint8Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46048                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46049                    encoder,
46050                    offset + 8,
46051                    _depth,
46052                ),
46053                Uint8Union::EmptyStruct(ref val) => {
46054                    fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
46055                        <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
46056                        encoder,
46057                        offset + 8,
46058                        _depth,
46059                    )
46060                }
46061            }
46062        }
46063    }
46064
46065    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Union {
46066        #[inline(always)]
46067        fn new_empty() -> Self {
46068            Self::Uint8Value(fidl::new_empty!(u8, D))
46069        }
46070
46071        #[inline]
46072        unsafe fn decode(
46073            &mut self,
46074            decoder: &mut fidl::encoding::Decoder<'_, D>,
46075            offset: usize,
46076            mut depth: fidl::encoding::Depth,
46077        ) -> fidl::Result<()> {
46078            decoder.debug_check_bounds::<Self>(offset);
46079            #[allow(unused_variables)]
46080            let next_out_of_line = decoder.next_out_of_line();
46081            let handles_before = decoder.remaining_handles();
46082            let (ordinal, inlined, num_bytes, num_handles) =
46083                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46084
46085            let member_inline_size = match ordinal {
46086                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46087                2 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46088                _ => return Err(fidl::Error::UnknownUnionTag),
46089            };
46090
46091            if inlined != (member_inline_size <= 4) {
46092                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46093            }
46094            let _inner_offset;
46095            if inlined {
46096                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46097                _inner_offset = offset + 8;
46098            } else {
46099                depth.increment()?;
46100                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46101            }
46102            match ordinal {
46103                1 => {
46104                    #[allow(irrefutable_let_patterns)]
46105                    if let Uint8Union::Uint8Value(_) = self {
46106                        // Do nothing, read the value into the object
46107                    } else {
46108                        // Initialize `self` to the right variant
46109                        *self = Uint8Union::Uint8Value(fidl::new_empty!(u8, D));
46110                    }
46111                    #[allow(irrefutable_let_patterns)]
46112                    if let Uint8Union::Uint8Value(ref mut val) = self {
46113                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46114                    } else {
46115                        unreachable!()
46116                    }
46117                }
46118                2 => {
46119                    #[allow(irrefutable_let_patterns)]
46120                    if let Uint8Union::EmptyStruct(_) = self {
46121                        // Do nothing, read the value into the object
46122                    } else {
46123                        // Initialize `self` to the right variant
46124                        *self = Uint8Union::EmptyStruct(fidl::new_empty!(EmptyStruct, D));
46125                    }
46126                    #[allow(irrefutable_let_patterns)]
46127                    if let Uint8Union::EmptyStruct(ref mut val) = self {
46128                        fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
46129                    } else {
46130                        unreachable!()
46131                    }
46132                }
46133                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46134            }
46135            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46136                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46137            }
46138            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46139                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46140            }
46141            Ok(())
46142        }
46143    }
46144
46145    impl fidl::encoding::ValueTypeMarker for UnionAtTheBottom {
46146        type Borrowed<'a> = &'a Self;
46147        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46148            value
46149        }
46150    }
46151
46152    unsafe impl fidl::encoding::TypeMarker for UnionAtTheBottom {
46153        type Owned = Self;
46154
46155        #[inline(always)]
46156        fn inline_align(_context: fidl::encoding::Context) -> usize {
46157            8
46158        }
46159
46160        #[inline(always)]
46161        fn inline_size(_context: fidl::encoding::Context) -> usize {
46162            16
46163        }
46164    }
46165
46166    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionAtTheBottom, D>
46167        for &UnionAtTheBottom
46168    {
46169        #[inline]
46170        unsafe fn encode(
46171            self,
46172            encoder: &mut fidl::encoding::Encoder<'_, D>,
46173            offset: usize,
46174            _depth: fidl::encoding::Depth,
46175        ) -> fidl::Result<()> {
46176            encoder.debug_check_bounds::<UnionAtTheBottom>(offset);
46177            encoder.write_num::<u64>(self.ordinal(), offset);
46178            match self {
46179                UnionAtTheBottom::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46180                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46181                    encoder,
46182                    offset + 8,
46183                    _depth,
46184                ),
46185                UnionAtTheBottom::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46186                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46187                    encoder,
46188                    offset + 8,
46189                    _depth,
46190                ),
46191                UnionAtTheBottom::Tiny(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46192                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46193                    encoder,
46194                    offset + 8,
46195                    _depth,
46196                ),
46197            }
46198        }
46199    }
46200
46201    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionAtTheBottom {
46202        #[inline(always)]
46203        fn new_empty() -> Self {
46204            Self::Unused1(fidl::new_empty!(u8, D))
46205        }
46206
46207        #[inline]
46208        unsafe fn decode(
46209            &mut self,
46210            decoder: &mut fidl::encoding::Decoder<'_, D>,
46211            offset: usize,
46212            mut depth: fidl::encoding::Depth,
46213        ) -> fidl::Result<()> {
46214            decoder.debug_check_bounds::<Self>(offset);
46215            #[allow(unused_variables)]
46216            let next_out_of_line = decoder.next_out_of_line();
46217            let handles_before = decoder.remaining_handles();
46218            let (ordinal, inlined, num_bytes, num_handles) =
46219                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46220
46221            let member_inline_size = match ordinal {
46222                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46223                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46224                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46225                _ => return Err(fidl::Error::UnknownUnionTag),
46226            };
46227
46228            if inlined != (member_inline_size <= 4) {
46229                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46230            }
46231            let _inner_offset;
46232            if inlined {
46233                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46234                _inner_offset = offset + 8;
46235            } else {
46236                depth.increment()?;
46237                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46238            }
46239            match ordinal {
46240                1 => {
46241                    #[allow(irrefutable_let_patterns)]
46242                    if let UnionAtTheBottom::Unused1(_) = self {
46243                        // Do nothing, read the value into the object
46244                    } else {
46245                        // Initialize `self` to the right variant
46246                        *self = UnionAtTheBottom::Unused1(fidl::new_empty!(u8, D));
46247                    }
46248                    #[allow(irrefutable_let_patterns)]
46249                    if let UnionAtTheBottom::Unused1(ref mut val) = self {
46250                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46251                    } else {
46252                        unreachable!()
46253                    }
46254                }
46255                2 => {
46256                    #[allow(irrefutable_let_patterns)]
46257                    if let UnionAtTheBottom::Unused2(_) = self {
46258                        // Do nothing, read the value into the object
46259                    } else {
46260                        // Initialize `self` to the right variant
46261                        *self = UnionAtTheBottom::Unused2(fidl::new_empty!(u8, D));
46262                    }
46263                    #[allow(irrefutable_let_patterns)]
46264                    if let UnionAtTheBottom::Unused2(ref mut val) = self {
46265                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46266                    } else {
46267                        unreachable!()
46268                    }
46269                }
46270                3 => {
46271                    #[allow(irrefutable_let_patterns)]
46272                    if let UnionAtTheBottom::Tiny(_) = self {
46273                        // Do nothing, read the value into the object
46274                    } else {
46275                        // Initialize `self` to the right variant
46276                        *self = UnionAtTheBottom::Tiny(fidl::new_empty!(u8, D));
46277                    }
46278                    #[allow(irrefutable_let_patterns)]
46279                    if let UnionAtTheBottom::Tiny(ref mut val) = self {
46280                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46281                    } else {
46282                        unreachable!()
46283                    }
46284                }
46285                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46286            }
46287            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46288                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46289            }
46290            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46291                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46292            }
46293            Ok(())
46294        }
46295    }
46296
46297    impl fidl::encoding::ValueTypeMarker for UnionInlinePadding {
46298        type Borrowed<'a> = &'a Self;
46299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46300            value
46301        }
46302    }
46303
46304    unsafe impl fidl::encoding::TypeMarker for UnionInlinePadding {
46305        type Owned = Self;
46306
46307        #[inline(always)]
46308        fn inline_align(_context: fidl::encoding::Context) -> usize {
46309            8
46310        }
46311
46312        #[inline(always)]
46313        fn inline_size(_context: fidl::encoding::Context) -> usize {
46314            16
46315        }
46316    }
46317
46318    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionInlinePadding, D>
46319        for &UnionInlinePadding
46320    {
46321        #[inline]
46322        unsafe fn encode(
46323            self,
46324            encoder: &mut fidl::encoding::Encoder<'_, D>,
46325            offset: usize,
46326            _depth: fidl::encoding::Depth,
46327        ) -> fidl::Result<()> {
46328            encoder.debug_check_bounds::<UnionInlinePadding>(offset);
46329            encoder.write_num::<u64>(self.ordinal(), offset);
46330            match self {
46331                UnionInlinePadding::ThreePaddingBytes(ref val) => {
46332                    fidl::encoding::encode_in_envelope::<u8, D>(
46333                        <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46334                        encoder,
46335                        offset + 8,
46336                        _depth,
46337                    )
46338                }
46339                UnionInlinePadding::TwoPaddingBytes(ref val) => {
46340                    fidl::encoding::encode_in_envelope::<u16, D>(
46341                        <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
46342                        encoder,
46343                        offset + 8,
46344                        _depth,
46345                    )
46346                }
46347                UnionInlinePadding::OnePaddingByte(ref val) => {
46348                    fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u8, 3>, D>(
46349                        <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(
46350                            val,
46351                        ),
46352                        encoder,
46353                        offset + 8,
46354                        _depth,
46355                    )
46356                }
46357            }
46358        }
46359    }
46360
46361    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionInlinePadding {
46362        #[inline(always)]
46363        fn new_empty() -> Self {
46364            Self::ThreePaddingBytes(fidl::new_empty!(u8, D))
46365        }
46366
46367        #[inline]
46368        unsafe fn decode(
46369            &mut self,
46370            decoder: &mut fidl::encoding::Decoder<'_, D>,
46371            offset: usize,
46372            mut depth: fidl::encoding::Depth,
46373        ) -> fidl::Result<()> {
46374            decoder.debug_check_bounds::<Self>(offset);
46375            #[allow(unused_variables)]
46376            let next_out_of_line = decoder.next_out_of_line();
46377            let handles_before = decoder.remaining_handles();
46378            let (ordinal, inlined, num_bytes, num_handles) =
46379                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46380
46381            let member_inline_size = match ordinal {
46382                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46383                2 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46384                3 => <fidl::encoding::Array<u8, 3> as fidl::encoding::TypeMarker>::inline_size(
46385                    decoder.context,
46386                ),
46387                _ => return Err(fidl::Error::UnknownUnionTag),
46388            };
46389
46390            if inlined != (member_inline_size <= 4) {
46391                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46392            }
46393            let _inner_offset;
46394            if inlined {
46395                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46396                _inner_offset = offset + 8;
46397            } else {
46398                depth.increment()?;
46399                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46400            }
46401            match ordinal {
46402                1 => {
46403                    #[allow(irrefutable_let_patterns)]
46404                    if let UnionInlinePadding::ThreePaddingBytes(_) = self {
46405                        // Do nothing, read the value into the object
46406                    } else {
46407                        // Initialize `self` to the right variant
46408                        *self = UnionInlinePadding::ThreePaddingBytes(fidl::new_empty!(u8, D));
46409                    }
46410                    #[allow(irrefutable_let_patterns)]
46411                    if let UnionInlinePadding::ThreePaddingBytes(ref mut val) = self {
46412                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46413                    } else {
46414                        unreachable!()
46415                    }
46416                }
46417                2 => {
46418                    #[allow(irrefutable_let_patterns)]
46419                    if let UnionInlinePadding::TwoPaddingBytes(_) = self {
46420                        // Do nothing, read the value into the object
46421                    } else {
46422                        // Initialize `self` to the right variant
46423                        *self = UnionInlinePadding::TwoPaddingBytes(fidl::new_empty!(u16, D));
46424                    }
46425                    #[allow(irrefutable_let_patterns)]
46426                    if let UnionInlinePadding::TwoPaddingBytes(ref mut val) = self {
46427                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
46428                    } else {
46429                        unreachable!()
46430                    }
46431                }
46432                3 => {
46433                    #[allow(irrefutable_let_patterns)]
46434                    if let UnionInlinePadding::OnePaddingByte(_) = self {
46435                        // Do nothing, read the value into the object
46436                    } else {
46437                        // Initialize `self` to the right variant
46438                        *self = UnionInlinePadding::OnePaddingByte(
46439                            fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
46440                        );
46441                    }
46442                    #[allow(irrefutable_let_patterns)]
46443                    if let UnionInlinePadding::OnePaddingByte(ref mut val) = self {
46444                        fidl::decode!(fidl::encoding::Array<u8, 3>, D, val, decoder, _inner_offset, depth)?;
46445                    } else {
46446                        unreachable!()
46447                    }
46448                }
46449                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46450            }
46451            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46452                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46453            }
46454            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46455                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46456            }
46457            Ok(())
46458        }
46459    }
46460
46461    impl fidl::encoding::ValueTypeMarker for UnionOfTable {
46462        type Borrowed<'a> = &'a Self;
46463        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46464            value
46465        }
46466    }
46467
46468    unsafe impl fidl::encoding::TypeMarker for UnionOfTable {
46469        type Owned = Self;
46470
46471        #[inline(always)]
46472        fn inline_align(_context: fidl::encoding::Context) -> usize {
46473            8
46474        }
46475
46476        #[inline(always)]
46477        fn inline_size(_context: fidl::encoding::Context) -> usize {
46478            16
46479        }
46480    }
46481
46482    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfTable, D>
46483        for &UnionOfTable
46484    {
46485        #[inline]
46486        unsafe fn encode(
46487            self,
46488            encoder: &mut fidl::encoding::Encoder<'_, D>,
46489            offset: usize,
46490            _depth: fidl::encoding::Depth,
46491        ) -> fidl::Result<()> {
46492            encoder.debug_check_bounds::<UnionOfTable>(offset);
46493            encoder.write_num::<u64>(self.ordinal(), offset);
46494            match self {
46495                UnionOfTable::T(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
46496                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
46497                    encoder,
46498                    offset + 8,
46499                    _depth,
46500                ),
46501            }
46502        }
46503    }
46504
46505    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfTable {
46506        #[inline(always)]
46507        fn new_empty() -> Self {
46508            Self::T(fidl::new_empty!(SimpleTable, D))
46509        }
46510
46511        #[inline]
46512        unsafe fn decode(
46513            &mut self,
46514            decoder: &mut fidl::encoding::Decoder<'_, D>,
46515            offset: usize,
46516            mut depth: fidl::encoding::Depth,
46517        ) -> fidl::Result<()> {
46518            decoder.debug_check_bounds::<Self>(offset);
46519            #[allow(unused_variables)]
46520            let next_out_of_line = decoder.next_out_of_line();
46521            let handles_before = decoder.remaining_handles();
46522            let (ordinal, inlined, num_bytes, num_handles) =
46523                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46524
46525            let member_inline_size = match ordinal {
46526                1 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46527                _ => return Err(fidl::Error::UnknownUnionTag),
46528            };
46529
46530            if inlined != (member_inline_size <= 4) {
46531                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46532            }
46533            let _inner_offset;
46534            if inlined {
46535                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46536                _inner_offset = offset + 8;
46537            } else {
46538                depth.increment()?;
46539                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46540            }
46541            match ordinal {
46542                1 => {
46543                    #[allow(irrefutable_let_patterns)]
46544                    if let UnionOfTable::T(_) = self {
46545                        // Do nothing, read the value into the object
46546                    } else {
46547                        // Initialize `self` to the right variant
46548                        *self = UnionOfTable::T(fidl::new_empty!(SimpleTable, D));
46549                    }
46550                    #[allow(irrefutable_let_patterns)]
46551                    if let UnionOfTable::T(ref mut val) = self {
46552                        fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
46553                    } else {
46554                        unreachable!()
46555                    }
46556                }
46557                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46558            }
46559            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46560                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46561            }
46562            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46563                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46564            }
46565            Ok(())
46566        }
46567    }
46568
46569    impl fidl::encoding::ValueTypeMarker for UnionOfUnion {
46570        type Borrowed<'a> = &'a Self;
46571        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46572            value
46573        }
46574    }
46575
46576    unsafe impl fidl::encoding::TypeMarker for UnionOfUnion {
46577        type Owned = Self;
46578
46579        #[inline(always)]
46580        fn inline_align(_context: fidl::encoding::Context) -> usize {
46581            8
46582        }
46583
46584        #[inline(always)]
46585        fn inline_size(_context: fidl::encoding::Context) -> usize {
46586            16
46587        }
46588    }
46589
46590    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfUnion, D>
46591        for &UnionOfUnion
46592    {
46593        #[inline]
46594        unsafe fn encode(
46595            self,
46596            encoder: &mut fidl::encoding::Encoder<'_, D>,
46597            offset: usize,
46598            _depth: fidl::encoding::Depth,
46599        ) -> fidl::Result<()> {
46600            encoder.debug_check_bounds::<UnionOfUnion>(offset);
46601            encoder.write_num::<u64>(self.ordinal(), offset);
46602            match self {
46603                UnionOfUnion::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46604                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46605                    encoder,
46606                    offset + 8,
46607                    _depth,
46608                ),
46609                UnionOfUnion::Size8align4(ref val) => {
46610                    fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
46611                        <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
46612                        encoder,
46613                        offset + 8,
46614                        _depth,
46615                    )
46616                }
46617                UnionOfUnion::Size12align4(ref val) => {
46618                    fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
46619                        <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
46620                        encoder,
46621                        offset + 8,
46622                        _depth,
46623                    )
46624                }
46625                UnionOfUnion::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46626                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46627                    encoder,
46628                    offset + 8,
46629                    _depth,
46630                ),
46631                UnionOfUnion::Size24align8(ref val) => {
46632                    fidl::encoding::encode_in_envelope::<UnionSize24Align8, D>(
46633                        <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46634                        encoder,
46635                        offset + 8,
46636                        _depth,
46637                    )
46638                }
46639            }
46640        }
46641    }
46642
46643    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfUnion {
46644        #[inline(always)]
46645        fn new_empty() -> Self {
46646            Self::Unused1(fidl::new_empty!(u8, D))
46647        }
46648
46649        #[inline]
46650        unsafe fn decode(
46651            &mut self,
46652            decoder: &mut fidl::encoding::Decoder<'_, D>,
46653            offset: usize,
46654            mut depth: fidl::encoding::Depth,
46655        ) -> fidl::Result<()> {
46656            decoder.debug_check_bounds::<Self>(offset);
46657            #[allow(unused_variables)]
46658            let next_out_of_line = decoder.next_out_of_line();
46659            let handles_before = decoder.remaining_handles();
46660            let (ordinal, inlined, num_bytes, num_handles) =
46661                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46662
46663            let member_inline_size = match ordinal {
46664                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46665                2 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46666                3 => {
46667                    <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
46668                }
46669                4 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46670                5 => {
46671                    <UnionSize24Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
46672                }
46673                _ => return Err(fidl::Error::UnknownUnionTag),
46674            };
46675
46676            if inlined != (member_inline_size <= 4) {
46677                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46678            }
46679            let _inner_offset;
46680            if inlined {
46681                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46682                _inner_offset = offset + 8;
46683            } else {
46684                depth.increment()?;
46685                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46686            }
46687            match ordinal {
46688                1 => {
46689                    #[allow(irrefutable_let_patterns)]
46690                    if let UnionOfUnion::Unused1(_) = self {
46691                        // Do nothing, read the value into the object
46692                    } else {
46693                        // Initialize `self` to the right variant
46694                        *self = UnionOfUnion::Unused1(fidl::new_empty!(u8, D));
46695                    }
46696                    #[allow(irrefutable_let_patterns)]
46697                    if let UnionOfUnion::Unused1(ref mut val) = self {
46698                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46699                    } else {
46700                        unreachable!()
46701                    }
46702                }
46703                2 => {
46704                    #[allow(irrefutable_let_patterns)]
46705                    if let UnionOfUnion::Size8align4(_) = self {
46706                        // Do nothing, read the value into the object
46707                    } else {
46708                        // Initialize `self` to the right variant
46709                        *self = UnionOfUnion::Size8align4(fidl::new_empty!(UnionSize8Align4, D));
46710                    }
46711                    #[allow(irrefutable_let_patterns)]
46712                    if let UnionOfUnion::Size8align4(ref mut val) = self {
46713                        fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
46714                    } else {
46715                        unreachable!()
46716                    }
46717                }
46718                3 => {
46719                    #[allow(irrefutable_let_patterns)]
46720                    if let UnionOfUnion::Size12align4(_) = self {
46721                        // Do nothing, read the value into the object
46722                    } else {
46723                        // Initialize `self` to the right variant
46724                        *self = UnionOfUnion::Size12align4(fidl::new_empty!(UnionSize12Align4, D));
46725                    }
46726                    #[allow(irrefutable_let_patterns)]
46727                    if let UnionOfUnion::Size12align4(ref mut val) = self {
46728                        fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
46729                    } else {
46730                        unreachable!()
46731                    }
46732                }
46733                4 => {
46734                    #[allow(irrefutable_let_patterns)]
46735                    if let UnionOfUnion::Unused2(_) = self {
46736                        // Do nothing, read the value into the object
46737                    } else {
46738                        // Initialize `self` to the right variant
46739                        *self = UnionOfUnion::Unused2(fidl::new_empty!(u8, D));
46740                    }
46741                    #[allow(irrefutable_let_patterns)]
46742                    if let UnionOfUnion::Unused2(ref mut val) = self {
46743                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46744                    } else {
46745                        unreachable!()
46746                    }
46747                }
46748                5 => {
46749                    #[allow(irrefutable_let_patterns)]
46750                    if let UnionOfUnion::Size24align8(_) = self {
46751                        // Do nothing, read the value into the object
46752                    } else {
46753                        // Initialize `self` to the right variant
46754                        *self = UnionOfUnion::Size24align8(fidl::new_empty!(UnionSize24Align8, D));
46755                    }
46756                    #[allow(irrefutable_let_patterns)]
46757                    if let UnionOfUnion::Size24align8(ref mut val) = self {
46758                        fidl::decode!(UnionSize24Align8, D, val, decoder, _inner_offset, depth)?;
46759                    } else {
46760                        unreachable!()
46761                    }
46762                }
46763                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46764            }
46765            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46766                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46767            }
46768            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46769                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46770            }
46771            Ok(())
46772        }
46773    }
46774
46775    impl fidl::encoding::ValueTypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
46776        type Borrowed<'a> = &'a Self;
46777        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46778            value
46779        }
46780    }
46781
46782    unsafe impl fidl::encoding::TypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
46783        type Owned = Self;
46784
46785        #[inline(always)]
46786        fn inline_align(_context: fidl::encoding::Context) -> usize {
46787            8
46788        }
46789
46790        #[inline(always)]
46791        fn inline_size(_context: fidl::encoding::Context) -> usize {
46792            16
46793        }
46794    }
46795
46796    unsafe impl<D: fidl::encoding::ResourceDialect>
46797        fidl::encoding::Encode<UnionOfXUnionThenTableThenXUnionThenUnion, D>
46798        for &UnionOfXUnionThenTableThenXUnionThenUnion
46799    {
46800        #[inline]
46801        unsafe fn encode(
46802            self,
46803            encoder: &mut fidl::encoding::Encoder<'_, D>,
46804            offset: usize,
46805            _depth: fidl::encoding::Depth,
46806        ) -> fidl::Result<()> {
46807            encoder.debug_check_bounds::<UnionOfXUnionThenTableThenXUnionThenUnion>(offset);
46808            encoder.write_num::<u64>(self.ordinal(), offset);
46809            match self {
46810            UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref val) => {
46811                fidl::encoding::encode_in_envelope::<u8, D>(
46812                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46813                    encoder, offset + 8, _depth
46814                )
46815            }
46816            UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref val) => {
46817                fidl::encoding::encode_in_envelope::<XUnionOfTableThenXUnionThenUnion, D>(
46818                    <XUnionOfTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
46819                    encoder, offset + 8, _depth
46820                )
46821            }
46822        }
46823        }
46824    }
46825
46826    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46827        for UnionOfXUnionThenTableThenXUnionThenUnion
46828    {
46829        #[inline(always)]
46830        fn new_empty() -> Self {
46831            Self::Unused1(fidl::new_empty!(u8, D))
46832        }
46833
46834        #[inline]
46835        unsafe fn decode(
46836            &mut self,
46837            decoder: &mut fidl::encoding::Decoder<'_, D>,
46838            offset: usize,
46839            mut depth: fidl::encoding::Depth,
46840        ) -> fidl::Result<()> {
46841            decoder.debug_check_bounds::<Self>(offset);
46842            #[allow(unused_variables)]
46843            let next_out_of_line = decoder.next_out_of_line();
46844            let handles_before = decoder.remaining_handles();
46845            let (ordinal, inlined, num_bytes, num_handles) =
46846                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46847
46848            let member_inline_size = match ordinal {
46849                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46850                3 => <XUnionOfTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
46851                    decoder.context,
46852                ),
46853                _ => return Err(fidl::Error::UnknownUnionTag),
46854            };
46855
46856            if inlined != (member_inline_size <= 4) {
46857                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46858            }
46859            let _inner_offset;
46860            if inlined {
46861                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46862                _inner_offset = offset + 8;
46863            } else {
46864                depth.increment()?;
46865                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46866            }
46867            match ordinal {
46868                1 => {
46869                    #[allow(irrefutable_let_patterns)]
46870                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(_) = self {
46871                        // Do nothing, read the value into the object
46872                    } else {
46873                        // Initialize `self` to the right variant
46874                        *self = UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(
46875                            fidl::new_empty!(u8, D),
46876                        );
46877                    }
46878                    #[allow(irrefutable_let_patterns)]
46879                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref mut val) = self {
46880                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46881                    } else {
46882                        unreachable!()
46883                    }
46884                }
46885                3 => {
46886                    #[allow(irrefutable_let_patterns)]
46887                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(_) = self {
46888                        // Do nothing, read the value into the object
46889                    } else {
46890                        // Initialize `self` to the right variant
46891                        *self = UnionOfXUnionThenTableThenXUnionThenUnion::Variant(
46892                            fidl::new_empty!(XUnionOfTableThenXUnionThenUnion, D),
46893                        );
46894                    }
46895                    #[allow(irrefutable_let_patterns)]
46896                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref mut val) = self {
46897                        fidl::decode!(
46898                            XUnionOfTableThenXUnionThenUnion,
46899                            D,
46900                            val,
46901                            decoder,
46902                            _inner_offset,
46903                            depth
46904                        )?;
46905                    } else {
46906                        unreachable!()
46907                    }
46908                }
46909                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46910            }
46911            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46912                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46913            }
46914            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46915                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46916            }
46917            Ok(())
46918        }
46919    }
46920
46921    impl fidl::encoding::ValueTypeMarker for UnionSize12Align4 {
46922        type Borrowed<'a> = &'a Self;
46923        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46924            value
46925        }
46926    }
46927
46928    unsafe impl fidl::encoding::TypeMarker for UnionSize12Align4 {
46929        type Owned = Self;
46930
46931        #[inline(always)]
46932        fn inline_align(_context: fidl::encoding::Context) -> usize {
46933            8
46934        }
46935
46936        #[inline(always)]
46937        fn inline_size(_context: fidl::encoding::Context) -> usize {
46938            16
46939        }
46940    }
46941
46942    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize12Align4, D>
46943        for &UnionSize12Align4
46944    {
46945        #[inline]
46946        unsafe fn encode(
46947            self,
46948            encoder: &mut fidl::encoding::Encoder<'_, D>,
46949            offset: usize,
46950            _depth: fidl::encoding::Depth,
46951        ) -> fidl::Result<()> {
46952            encoder.debug_check_bounds::<UnionSize12Align4>(offset);
46953            encoder.write_num::<u64>(self.ordinal(), offset);
46954            match self {
46955                UnionSize12Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46956                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46957                    encoder,
46958                    offset + 8,
46959                    _depth,
46960                ),
46961                UnionSize12Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46962                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46963                    encoder,
46964                    offset + 8,
46965                    _depth,
46966                ),
46967                UnionSize12Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46968                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46969                    encoder,
46970                    offset + 8,
46971                    _depth,
46972                ),
46973                UnionSize12Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
46974                    fidl::encoding::Array<u8, 6>,
46975                    D,
46976                >(
46977                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
46978                    encoder,
46979                    offset + 8,
46980                    _depth,
46981                ),
46982            }
46983        }
46984    }
46985
46986    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize12Align4 {
46987        #[inline(always)]
46988        fn new_empty() -> Self {
46989            Self::Unused1(fidl::new_empty!(u8, D))
46990        }
46991
46992        #[inline]
46993        unsafe fn decode(
46994            &mut self,
46995            decoder: &mut fidl::encoding::Decoder<'_, D>,
46996            offset: usize,
46997            mut depth: fidl::encoding::Depth,
46998        ) -> fidl::Result<()> {
46999            decoder.debug_check_bounds::<Self>(offset);
47000            #[allow(unused_variables)]
47001            let next_out_of_line = decoder.next_out_of_line();
47002            let handles_before = decoder.remaining_handles();
47003            let (ordinal, inlined, num_bytes, num_handles) =
47004                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47005
47006            let member_inline_size = match ordinal {
47007                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47008                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47009                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47010                4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
47011                    decoder.context,
47012                ),
47013                _ => return Err(fidl::Error::UnknownUnionTag),
47014            };
47015
47016            if inlined != (member_inline_size <= 4) {
47017                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47018            }
47019            let _inner_offset;
47020            if inlined {
47021                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47022                _inner_offset = offset + 8;
47023            } else {
47024                depth.increment()?;
47025                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47026            }
47027            match ordinal {
47028                1 => {
47029                    #[allow(irrefutable_let_patterns)]
47030                    if let UnionSize12Align4::Unused1(_) = self {
47031                        // Do nothing, read the value into the object
47032                    } else {
47033                        // Initialize `self` to the right variant
47034                        *self = UnionSize12Align4::Unused1(fidl::new_empty!(u8, D));
47035                    }
47036                    #[allow(irrefutable_let_patterns)]
47037                    if let UnionSize12Align4::Unused1(ref mut val) = self {
47038                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47039                    } else {
47040                        unreachable!()
47041                    }
47042                }
47043                2 => {
47044                    #[allow(irrefutable_let_patterns)]
47045                    if let UnionSize12Align4::Unused2(_) = self {
47046                        // Do nothing, read the value into the object
47047                    } else {
47048                        // Initialize `self` to the right variant
47049                        *self = UnionSize12Align4::Unused2(fidl::new_empty!(u8, D));
47050                    }
47051                    #[allow(irrefutable_let_patterns)]
47052                    if let UnionSize12Align4::Unused2(ref mut val) = self {
47053                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47054                    } else {
47055                        unreachable!()
47056                    }
47057                }
47058                3 => {
47059                    #[allow(irrefutable_let_patterns)]
47060                    if let UnionSize12Align4::Unused3(_) = self {
47061                        // Do nothing, read the value into the object
47062                    } else {
47063                        // Initialize `self` to the right variant
47064                        *self = UnionSize12Align4::Unused3(fidl::new_empty!(u8, D));
47065                    }
47066                    #[allow(irrefutable_let_patterns)]
47067                    if let UnionSize12Align4::Unused3(ref mut val) = self {
47068                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47069                    } else {
47070                        unreachable!()
47071                    }
47072                }
47073                4 => {
47074                    #[allow(irrefutable_let_patterns)]
47075                    if let UnionSize12Align4::Variant(_) = self {
47076                        // Do nothing, read the value into the object
47077                    } else {
47078                        // Initialize `self` to the right variant
47079                        *self = UnionSize12Align4::Variant(
47080                            fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
47081                        );
47082                    }
47083                    #[allow(irrefutable_let_patterns)]
47084                    if let UnionSize12Align4::Variant(ref mut val) = self {
47085                        fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
47086                    } else {
47087                        unreachable!()
47088                    }
47089                }
47090                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47091            }
47092            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47093                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47094            }
47095            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47096                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47097            }
47098            Ok(())
47099        }
47100    }
47101
47102    impl fidl::encoding::ValueTypeMarker for UnionSize24Align8 {
47103        type Borrowed<'a> = &'a Self;
47104        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47105            value
47106        }
47107    }
47108
47109    unsafe impl fidl::encoding::TypeMarker for UnionSize24Align8 {
47110        type Owned = Self;
47111
47112        #[inline(always)]
47113        fn inline_align(_context: fidl::encoding::Context) -> usize {
47114            8
47115        }
47116
47117        #[inline(always)]
47118        fn inline_size(_context: fidl::encoding::Context) -> usize {
47119            16
47120        }
47121    }
47122
47123    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize24Align8, D>
47124        for &UnionSize24Align8
47125    {
47126        #[inline]
47127        unsafe fn encode(
47128            self,
47129            encoder: &mut fidl::encoding::Encoder<'_, D>,
47130            offset: usize,
47131            _depth: fidl::encoding::Depth,
47132        ) -> fidl::Result<()> {
47133            encoder.debug_check_bounds::<UnionSize24Align8>(offset);
47134            encoder.write_num::<u64>(self.ordinal(), offset);
47135            match self {
47136                UnionSize24Align8::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47137                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47138                    encoder,
47139                    offset + 8,
47140                    _depth,
47141                ),
47142                UnionSize24Align8::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47143                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47144                    encoder,
47145                    offset + 8,
47146                    _depth,
47147                ),
47148                UnionSize24Align8::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47149                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47150                    encoder,
47151                    offset + 8,
47152                    _depth,
47153                ),
47154                UnionSize24Align8::Variant(ref val) => {
47155                    fidl::encoding::encode_in_envelope::<StructSize16Align8, D>(
47156                        <StructSize16Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47157                        encoder,
47158                        offset + 8,
47159                        _depth,
47160                    )
47161                }
47162            }
47163        }
47164    }
47165
47166    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize24Align8 {
47167        #[inline(always)]
47168        fn new_empty() -> Self {
47169            Self::Unused1(fidl::new_empty!(u8, D))
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 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47188                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47189                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47190                4 => {
47191                    <StructSize16Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
47192                }
47193                _ => return Err(fidl::Error::UnknownUnionTag),
47194            };
47195
47196            if inlined != (member_inline_size <= 4) {
47197                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47198            }
47199            let _inner_offset;
47200            if inlined {
47201                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47202                _inner_offset = offset + 8;
47203            } else {
47204                depth.increment()?;
47205                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47206            }
47207            match ordinal {
47208                1 => {
47209                    #[allow(irrefutable_let_patterns)]
47210                    if let UnionSize24Align8::Unused1(_) = self {
47211                        // Do nothing, read the value into the object
47212                    } else {
47213                        // Initialize `self` to the right variant
47214                        *self = UnionSize24Align8::Unused1(fidl::new_empty!(u8, D));
47215                    }
47216                    #[allow(irrefutable_let_patterns)]
47217                    if let UnionSize24Align8::Unused1(ref mut val) = self {
47218                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47219                    } else {
47220                        unreachable!()
47221                    }
47222                }
47223                2 => {
47224                    #[allow(irrefutable_let_patterns)]
47225                    if let UnionSize24Align8::Unused2(_) = self {
47226                        // Do nothing, read the value into the object
47227                    } else {
47228                        // Initialize `self` to the right variant
47229                        *self = UnionSize24Align8::Unused2(fidl::new_empty!(u8, D));
47230                    }
47231                    #[allow(irrefutable_let_patterns)]
47232                    if let UnionSize24Align8::Unused2(ref mut val) = self {
47233                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47234                    } else {
47235                        unreachable!()
47236                    }
47237                }
47238                3 => {
47239                    #[allow(irrefutable_let_patterns)]
47240                    if let UnionSize24Align8::Unused3(_) = self {
47241                        // Do nothing, read the value into the object
47242                    } else {
47243                        // Initialize `self` to the right variant
47244                        *self = UnionSize24Align8::Unused3(fidl::new_empty!(u8, D));
47245                    }
47246                    #[allow(irrefutable_let_patterns)]
47247                    if let UnionSize24Align8::Unused3(ref mut val) = self {
47248                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47249                    } else {
47250                        unreachable!()
47251                    }
47252                }
47253                4 => {
47254                    #[allow(irrefutable_let_patterns)]
47255                    if let UnionSize24Align8::Variant(_) = self {
47256                        // Do nothing, read the value into the object
47257                    } else {
47258                        // Initialize `self` to the right variant
47259                        *self = UnionSize24Align8::Variant(fidl::new_empty!(StructSize16Align8, D));
47260                    }
47261                    #[allow(irrefutable_let_patterns)]
47262                    if let UnionSize24Align8::Variant(ref mut val) = self {
47263                        fidl::decode!(StructSize16Align8, D, val, decoder, _inner_offset, depth)?;
47264                    } else {
47265                        unreachable!()
47266                    }
47267                }
47268                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47269            }
47270            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47271                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47272            }
47273            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47274                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47275            }
47276            Ok(())
47277        }
47278    }
47279
47280    impl fidl::encoding::ValueTypeMarker for UnionSize36Align4 {
47281        type Borrowed<'a> = &'a Self;
47282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47283            value
47284        }
47285    }
47286
47287    unsafe impl fidl::encoding::TypeMarker for UnionSize36Align4 {
47288        type Owned = Self;
47289
47290        #[inline(always)]
47291        fn inline_align(_context: fidl::encoding::Context) -> usize {
47292            8
47293        }
47294
47295        #[inline(always)]
47296        fn inline_size(_context: fidl::encoding::Context) -> usize {
47297            16
47298        }
47299    }
47300
47301    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize36Align4, D>
47302        for &UnionSize36Align4
47303    {
47304        #[inline]
47305        unsafe fn encode(
47306            self,
47307            encoder: &mut fidl::encoding::Encoder<'_, D>,
47308            offset: usize,
47309            _depth: fidl::encoding::Depth,
47310        ) -> fidl::Result<()> {
47311            encoder.debug_check_bounds::<UnionSize36Align4>(offset);
47312            encoder.write_num::<u64>(self.ordinal(), offset);
47313            match self {
47314                UnionSize36Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47315                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47316                    encoder,
47317                    offset + 8,
47318                    _depth,
47319                ),
47320                UnionSize36Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47321                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47322                    encoder,
47323                    offset + 8,
47324                    _depth,
47325                ),
47326                UnionSize36Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47327                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47328                    encoder,
47329                    offset + 8,
47330                    _depth,
47331                ),
47332                UnionSize36Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
47333                    fidl::encoding::Array<u8, 32>,
47334                    D,
47335                >(
47336                    <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(val),
47337                    encoder,
47338                    offset + 8,
47339                    _depth,
47340                ),
47341            }
47342        }
47343    }
47344
47345    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize36Align4 {
47346        #[inline(always)]
47347        fn new_empty() -> Self {
47348            Self::Unused1(fidl::new_empty!(u8, D))
47349        }
47350
47351        #[inline]
47352        unsafe fn decode(
47353            &mut self,
47354            decoder: &mut fidl::encoding::Decoder<'_, D>,
47355            offset: usize,
47356            mut depth: fidl::encoding::Depth,
47357        ) -> fidl::Result<()> {
47358            decoder.debug_check_bounds::<Self>(offset);
47359            #[allow(unused_variables)]
47360            let next_out_of_line = decoder.next_out_of_line();
47361            let handles_before = decoder.remaining_handles();
47362            let (ordinal, inlined, num_bytes, num_handles) =
47363                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47364
47365            let member_inline_size = match ordinal {
47366                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47367                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47368                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47369                4 => <fidl::encoding::Array<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
47370                    decoder.context,
47371                ),
47372                _ => return Err(fidl::Error::UnknownUnionTag),
47373            };
47374
47375            if inlined != (member_inline_size <= 4) {
47376                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47377            }
47378            let _inner_offset;
47379            if inlined {
47380                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47381                _inner_offset = offset + 8;
47382            } else {
47383                depth.increment()?;
47384                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47385            }
47386            match ordinal {
47387                1 => {
47388                    #[allow(irrefutable_let_patterns)]
47389                    if let UnionSize36Align4::Unused1(_) = self {
47390                        // Do nothing, read the value into the object
47391                    } else {
47392                        // Initialize `self` to the right variant
47393                        *self = UnionSize36Align4::Unused1(fidl::new_empty!(u8, D));
47394                    }
47395                    #[allow(irrefutable_let_patterns)]
47396                    if let UnionSize36Align4::Unused1(ref mut val) = self {
47397                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47398                    } else {
47399                        unreachable!()
47400                    }
47401                }
47402                2 => {
47403                    #[allow(irrefutable_let_patterns)]
47404                    if let UnionSize36Align4::Unused2(_) = self {
47405                        // Do nothing, read the value into the object
47406                    } else {
47407                        // Initialize `self` to the right variant
47408                        *self = UnionSize36Align4::Unused2(fidl::new_empty!(u8, D));
47409                    }
47410                    #[allow(irrefutable_let_patterns)]
47411                    if let UnionSize36Align4::Unused2(ref mut val) = self {
47412                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47413                    } else {
47414                        unreachable!()
47415                    }
47416                }
47417                3 => {
47418                    #[allow(irrefutable_let_patterns)]
47419                    if let UnionSize36Align4::Unused3(_) = self {
47420                        // Do nothing, read the value into the object
47421                    } else {
47422                        // Initialize `self` to the right variant
47423                        *self = UnionSize36Align4::Unused3(fidl::new_empty!(u8, D));
47424                    }
47425                    #[allow(irrefutable_let_patterns)]
47426                    if let UnionSize36Align4::Unused3(ref mut val) = self {
47427                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47428                    } else {
47429                        unreachable!()
47430                    }
47431                }
47432                4 => {
47433                    #[allow(irrefutable_let_patterns)]
47434                    if let UnionSize36Align4::Variant(_) = self {
47435                        // Do nothing, read the value into the object
47436                    } else {
47437                        // Initialize `self` to the right variant
47438                        *self = UnionSize36Align4::Variant(
47439                            fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
47440                        );
47441                    }
47442                    #[allow(irrefutable_let_patterns)]
47443                    if let UnionSize36Align4::Variant(ref mut val) = self {
47444                        fidl::decode!(fidl::encoding::Array<u8, 32>, D, val, decoder, _inner_offset, depth)?;
47445                    } else {
47446                        unreachable!()
47447                    }
47448                }
47449                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47450            }
47451            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47452                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47453            }
47454            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47455                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47456            }
47457            Ok(())
47458        }
47459    }
47460
47461    impl fidl::encoding::ValueTypeMarker for UnionSize8Align4 {
47462        type Borrowed<'a> = &'a Self;
47463        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47464            value
47465        }
47466    }
47467
47468    unsafe impl fidl::encoding::TypeMarker for UnionSize8Align4 {
47469        type Owned = Self;
47470
47471        #[inline(always)]
47472        fn inline_align(_context: fidl::encoding::Context) -> usize {
47473            8
47474        }
47475
47476        #[inline(always)]
47477        fn inline_size(_context: fidl::encoding::Context) -> usize {
47478            16
47479        }
47480    }
47481
47482    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize8Align4, D>
47483        for &UnionSize8Align4
47484    {
47485        #[inline]
47486        unsafe fn encode(
47487            self,
47488            encoder: &mut fidl::encoding::Encoder<'_, D>,
47489            offset: usize,
47490            _depth: fidl::encoding::Depth,
47491        ) -> fidl::Result<()> {
47492            encoder.debug_check_bounds::<UnionSize8Align4>(offset);
47493            encoder.write_num::<u64>(self.ordinal(), offset);
47494            match self {
47495                UnionSize8Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47496                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47497                    encoder,
47498                    offset + 8,
47499                    _depth,
47500                ),
47501                UnionSize8Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47502                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47503                    encoder,
47504                    offset + 8,
47505                    _depth,
47506                ),
47507                UnionSize8Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
47508                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
47509                    encoder,
47510                    offset + 8,
47511                    _depth,
47512                ),
47513            }
47514        }
47515    }
47516
47517    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize8Align4 {
47518        #[inline(always)]
47519        fn new_empty() -> Self {
47520            Self::Unused1(fidl::new_empty!(u8, D))
47521        }
47522
47523        #[inline]
47524        unsafe fn decode(
47525            &mut self,
47526            decoder: &mut fidl::encoding::Decoder<'_, D>,
47527            offset: usize,
47528            mut depth: fidl::encoding::Depth,
47529        ) -> fidl::Result<()> {
47530            decoder.debug_check_bounds::<Self>(offset);
47531            #[allow(unused_variables)]
47532            let next_out_of_line = decoder.next_out_of_line();
47533            let handles_before = decoder.remaining_handles();
47534            let (ordinal, inlined, num_bytes, num_handles) =
47535                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47536
47537            let member_inline_size = match ordinal {
47538                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47539                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47540                3 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47541                _ => return Err(fidl::Error::UnknownUnionTag),
47542            };
47543
47544            if inlined != (member_inline_size <= 4) {
47545                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47546            }
47547            let _inner_offset;
47548            if inlined {
47549                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47550                _inner_offset = offset + 8;
47551            } else {
47552                depth.increment()?;
47553                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47554            }
47555            match ordinal {
47556                1 => {
47557                    #[allow(irrefutable_let_patterns)]
47558                    if let UnionSize8Align4::Unused1(_) = self {
47559                        // Do nothing, read the value into the object
47560                    } else {
47561                        // Initialize `self` to the right variant
47562                        *self = UnionSize8Align4::Unused1(fidl::new_empty!(u8, D));
47563                    }
47564                    #[allow(irrefutable_let_patterns)]
47565                    if let UnionSize8Align4::Unused1(ref mut val) = self {
47566                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47567                    } else {
47568                        unreachable!()
47569                    }
47570                }
47571                2 => {
47572                    #[allow(irrefutable_let_patterns)]
47573                    if let UnionSize8Align4::Unused2(_) = self {
47574                        // Do nothing, read the value into the object
47575                    } else {
47576                        // Initialize `self` to the right variant
47577                        *self = UnionSize8Align4::Unused2(fidl::new_empty!(u8, D));
47578                    }
47579                    #[allow(irrefutable_let_patterns)]
47580                    if let UnionSize8Align4::Unused2(ref mut val) = self {
47581                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47582                    } else {
47583                        unreachable!()
47584                    }
47585                }
47586                3 => {
47587                    #[allow(irrefutable_let_patterns)]
47588                    if let UnionSize8Align4::Variant(_) = self {
47589                        // Do nothing, read the value into the object
47590                    } else {
47591                        // Initialize `self` to the right variant
47592                        *self = UnionSize8Align4::Variant(fidl::new_empty!(u32, D));
47593                    }
47594                    #[allow(irrefutable_let_patterns)]
47595                    if let UnionSize8Align4::Variant(ref mut val) = self {
47596                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
47597                    } else {
47598                        unreachable!()
47599                    }
47600                }
47601                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47602            }
47603            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47604                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47605            }
47606            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47607                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47608            }
47609            Ok(())
47610        }
47611    }
47612
47613    impl fidl::encoding::ValueTypeMarker for UnionWithBoundString {
47614        type Borrowed<'a> = &'a Self;
47615        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47616            value
47617        }
47618    }
47619
47620    unsafe impl fidl::encoding::TypeMarker for UnionWithBoundString {
47621        type Owned = Self;
47622
47623        #[inline(always)]
47624        fn inline_align(_context: fidl::encoding::Context) -> usize {
47625            8
47626        }
47627
47628        #[inline(always)]
47629        fn inline_size(_context: fidl::encoding::Context) -> usize {
47630            16
47631        }
47632    }
47633
47634    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithBoundString, D>
47635        for &UnionWithBoundString
47636    {
47637        #[inline]
47638        unsafe fn encode(
47639            self,
47640            encoder: &mut fidl::encoding::Encoder<'_, D>,
47641            offset: usize,
47642            _depth: fidl::encoding::Depth,
47643        ) -> fidl::Result<()> {
47644            encoder.debug_check_bounds::<UnionWithBoundString>(offset);
47645            encoder.write_num::<u64>(self.ordinal(), offset);
47646            match self {
47647                UnionWithBoundString::BoundFiveStr(ref val) => fidl::encoding::encode_in_envelope::<
47648                    fidl::encoding::BoundedString<5>,
47649                    D,
47650                >(
47651                    <fidl::encoding::BoundedString<5> as fidl::encoding::ValueTypeMarker>::borrow(
47652                        val,
47653                    ),
47654                    encoder,
47655                    offset + 8,
47656                    _depth,
47657                ),
47658            }
47659        }
47660    }
47661
47662    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithBoundString {
47663        #[inline(always)]
47664        fn new_empty() -> Self {
47665            Self::BoundFiveStr(fidl::new_empty!(fidl::encoding::BoundedString<5>, D))
47666        }
47667
47668        #[inline]
47669        unsafe fn decode(
47670            &mut self,
47671            decoder: &mut fidl::encoding::Decoder<'_, D>,
47672            offset: usize,
47673            mut depth: fidl::encoding::Depth,
47674        ) -> fidl::Result<()> {
47675            decoder.debug_check_bounds::<Self>(offset);
47676            #[allow(unused_variables)]
47677            let next_out_of_line = decoder.next_out_of_line();
47678            let handles_before = decoder.remaining_handles();
47679            let (ordinal, inlined, num_bytes, num_handles) =
47680                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47681
47682            let member_inline_size = match ordinal {
47683                1 => <fidl::encoding::BoundedString<5> as fidl::encoding::TypeMarker>::inline_size(
47684                    decoder.context,
47685                ),
47686                _ => return Err(fidl::Error::UnknownUnionTag),
47687            };
47688
47689            if inlined != (member_inline_size <= 4) {
47690                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47691            }
47692            let _inner_offset;
47693            if inlined {
47694                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47695                _inner_offset = offset + 8;
47696            } else {
47697                depth.increment()?;
47698                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47699            }
47700            match ordinal {
47701                1 => {
47702                    #[allow(irrefutable_let_patterns)]
47703                    if let UnionWithBoundString::BoundFiveStr(_) = self {
47704                        // Do nothing, read the value into the object
47705                    } else {
47706                        // Initialize `self` to the right variant
47707                        *self = UnionWithBoundString::BoundFiveStr(fidl::new_empty!(
47708                            fidl::encoding::BoundedString<5>,
47709                            D
47710                        ));
47711                    }
47712                    #[allow(irrefutable_let_patterns)]
47713                    if let UnionWithBoundString::BoundFiveStr(ref mut val) = self {
47714                        fidl::decode!(
47715                            fidl::encoding::BoundedString<5>,
47716                            D,
47717                            val,
47718                            decoder,
47719                            _inner_offset,
47720                            depth
47721                        )?;
47722                    } else {
47723                        unreachable!()
47724                    }
47725                }
47726                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47727            }
47728            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47729                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47730            }
47731            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47732                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47733            }
47734            Ok(())
47735        }
47736    }
47737
47738    impl fidl::encoding::ValueTypeMarker for UnionWithEmptyStruct {
47739        type Borrowed<'a> = &'a Self;
47740        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47741            value
47742        }
47743    }
47744
47745    unsafe impl fidl::encoding::TypeMarker for UnionWithEmptyStruct {
47746        type Owned = Self;
47747
47748        #[inline(always)]
47749        fn inline_align(_context: fidl::encoding::Context) -> usize {
47750            8
47751        }
47752
47753        #[inline(always)]
47754        fn inline_size(_context: fidl::encoding::Context) -> usize {
47755            16
47756        }
47757    }
47758
47759    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithEmptyStruct, D>
47760        for &UnionWithEmptyStruct
47761    {
47762        #[inline]
47763        unsafe fn encode(
47764            self,
47765            encoder: &mut fidl::encoding::Encoder<'_, D>,
47766            offset: usize,
47767            _depth: fidl::encoding::Depth,
47768        ) -> fidl::Result<()> {
47769            encoder.debug_check_bounds::<UnionWithEmptyStruct>(offset);
47770            encoder.write_num::<u64>(self.ordinal(), offset);
47771            match self {
47772                UnionWithEmptyStruct::S(ref val) => {
47773                    fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
47774                        <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
47775                        encoder,
47776                        offset + 8,
47777                        _depth,
47778                    )
47779                }
47780                UnionWithEmptyStruct::ForceAlignmentOf8(ref val) => {
47781                    fidl::encoding::encode_in_envelope::<u64, D>(
47782                        <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
47783                        encoder,
47784                        offset + 8,
47785                        _depth,
47786                    )
47787                }
47788            }
47789        }
47790    }
47791
47792    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithEmptyStruct {
47793        #[inline(always)]
47794        fn new_empty() -> Self {
47795            Self::S(fidl::new_empty!(EmptyStruct, D))
47796        }
47797
47798        #[inline]
47799        unsafe fn decode(
47800            &mut self,
47801            decoder: &mut fidl::encoding::Decoder<'_, D>,
47802            offset: usize,
47803            mut depth: fidl::encoding::Depth,
47804        ) -> fidl::Result<()> {
47805            decoder.debug_check_bounds::<Self>(offset);
47806            #[allow(unused_variables)]
47807            let next_out_of_line = decoder.next_out_of_line();
47808            let handles_before = decoder.remaining_handles();
47809            let (ordinal, inlined, num_bytes, num_handles) =
47810                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47811
47812            let member_inline_size = match ordinal {
47813                1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47814                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47815                _ => return Err(fidl::Error::UnknownUnionTag),
47816            };
47817
47818            if inlined != (member_inline_size <= 4) {
47819                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47820            }
47821            let _inner_offset;
47822            if inlined {
47823                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47824                _inner_offset = offset + 8;
47825            } else {
47826                depth.increment()?;
47827                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47828            }
47829            match ordinal {
47830                1 => {
47831                    #[allow(irrefutable_let_patterns)]
47832                    if let UnionWithEmptyStruct::S(_) = self {
47833                        // Do nothing, read the value into the object
47834                    } else {
47835                        // Initialize `self` to the right variant
47836                        *self = UnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
47837                    }
47838                    #[allow(irrefutable_let_patterns)]
47839                    if let UnionWithEmptyStruct::S(ref mut val) = self {
47840                        fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
47841                    } else {
47842                        unreachable!()
47843                    }
47844                }
47845                2 => {
47846                    #[allow(irrefutable_let_patterns)]
47847                    if let UnionWithEmptyStruct::ForceAlignmentOf8(_) = self {
47848                        // Do nothing, read the value into the object
47849                    } else {
47850                        // Initialize `self` to the right variant
47851                        *self = UnionWithEmptyStruct::ForceAlignmentOf8(fidl::new_empty!(u64, D));
47852                    }
47853                    #[allow(irrefutable_let_patterns)]
47854                    if let UnionWithEmptyStruct::ForceAlignmentOf8(ref mut val) = self {
47855                        fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
47856                    } else {
47857                        unreachable!()
47858                    }
47859                }
47860                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47861            }
47862            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47863                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47864            }
47865            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47866                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47867            }
47868            Ok(())
47869        }
47870    }
47871
47872    impl fidl::encoding::ValueTypeMarker for UnionWithRegression10Table {
47873        type Borrowed<'a> = &'a Self;
47874        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47875            value
47876        }
47877    }
47878
47879    unsafe impl fidl::encoding::TypeMarker for UnionWithRegression10Table {
47880        type Owned = Self;
47881
47882        #[inline(always)]
47883        fn inline_align(_context: fidl::encoding::Context) -> usize {
47884            8
47885        }
47886
47887        #[inline(always)]
47888        fn inline_size(_context: fidl::encoding::Context) -> usize {
47889            16
47890        }
47891    }
47892
47893    unsafe impl<D: fidl::encoding::ResourceDialect>
47894        fidl::encoding::Encode<UnionWithRegression10Table, D> for &UnionWithRegression10Table
47895    {
47896        #[inline]
47897        unsafe fn encode(
47898            self,
47899            encoder: &mut fidl::encoding::Encoder<'_, D>,
47900            offset: usize,
47901            _depth: fidl::encoding::Depth,
47902        ) -> fidl::Result<()> {
47903            encoder.debug_check_bounds::<UnionWithRegression10Table>(offset);
47904            encoder.write_num::<u64>(self.ordinal(), offset);
47905            match self {
47906                UnionWithRegression10Table::Unused(ref val) => {
47907                    fidl::encoding::encode_in_envelope::<u8, D>(
47908                        <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47909                        encoder,
47910                        offset + 8,
47911                        _depth,
47912                    )
47913                }
47914                UnionWithRegression10Table::AtV2(ref val) => {
47915                    fidl::encoding::encode_in_envelope::<Regression10TableV2, D>(
47916                        <Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(val),
47917                        encoder,
47918                        offset + 8,
47919                        _depth,
47920                    )
47921                }
47922            }
47923        }
47924    }
47925
47926    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
47927        for UnionWithRegression10Table
47928    {
47929        #[inline(always)]
47930        fn new_empty() -> Self {
47931            Self::Unused(fidl::new_empty!(u8, D))
47932        }
47933
47934        #[inline]
47935        unsafe fn decode(
47936            &mut self,
47937            decoder: &mut fidl::encoding::Decoder<'_, D>,
47938            offset: usize,
47939            mut depth: fidl::encoding::Depth,
47940        ) -> fidl::Result<()> {
47941            decoder.debug_check_bounds::<Self>(offset);
47942            #[allow(unused_variables)]
47943            let next_out_of_line = decoder.next_out_of_line();
47944            let handles_before = decoder.remaining_handles();
47945            let (ordinal, inlined, num_bytes, num_handles) =
47946                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47947
47948            let member_inline_size = match ordinal {
47949                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47950                3 => <Regression10TableV2 as fidl::encoding::TypeMarker>::inline_size(
47951                    decoder.context,
47952                ),
47953                _ => return Err(fidl::Error::UnknownUnionTag),
47954            };
47955
47956            if inlined != (member_inline_size <= 4) {
47957                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47958            }
47959            let _inner_offset;
47960            if inlined {
47961                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47962                _inner_offset = offset + 8;
47963            } else {
47964                depth.increment()?;
47965                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47966            }
47967            match ordinal {
47968                1 => {
47969                    #[allow(irrefutable_let_patterns)]
47970                    if let UnionWithRegression10Table::Unused(_) = self {
47971                        // Do nothing, read the value into the object
47972                    } else {
47973                        // Initialize `self` to the right variant
47974                        *self = UnionWithRegression10Table::Unused(fidl::new_empty!(u8, D));
47975                    }
47976                    #[allow(irrefutable_let_patterns)]
47977                    if let UnionWithRegression10Table::Unused(ref mut val) = self {
47978                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47979                    } else {
47980                        unreachable!()
47981                    }
47982                }
47983                3 => {
47984                    #[allow(irrefutable_let_patterns)]
47985                    if let UnionWithRegression10Table::AtV2(_) = self {
47986                        // Do nothing, read the value into the object
47987                    } else {
47988                        // Initialize `self` to the right variant
47989                        *self = UnionWithRegression10Table::AtV2(fidl::new_empty!(
47990                            Regression10TableV2,
47991                            D
47992                        ));
47993                    }
47994                    #[allow(irrefutable_let_patterns)]
47995                    if let UnionWithRegression10Table::AtV2(ref mut val) = self {
47996                        fidl::decode!(Regression10TableV2, D, val, decoder, _inner_offset, depth)?;
47997                    } else {
47998                        unreachable!()
47999                    }
48000                }
48001                ordinal => panic!("unexpected ordinal {:?}", ordinal),
48002            }
48003            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48004                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48005            }
48006            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48007                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48008            }
48009            Ok(())
48010        }
48011    }
48012
48013    impl fidl::encoding::ValueTypeMarker for UnionWithStringWithLimit {
48014        type Borrowed<'a> = &'a Self;
48015        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48016            value
48017        }
48018    }
48019
48020    unsafe impl fidl::encoding::TypeMarker for UnionWithStringWithLimit {
48021        type Owned = Self;
48022
48023        #[inline(always)]
48024        fn inline_align(_context: fidl::encoding::Context) -> usize {
48025            8
48026        }
48027
48028        #[inline(always)]
48029        fn inline_size(_context: fidl::encoding::Context) -> usize {
48030            16
48031        }
48032    }
48033
48034    unsafe impl<D: fidl::encoding::ResourceDialect>
48035        fidl::encoding::Encode<UnionWithStringWithLimit, D> for &UnionWithStringWithLimit
48036    {
48037        #[inline]
48038        unsafe fn encode(
48039            self,
48040            encoder: &mut fidl::encoding::Encoder<'_, D>,
48041            offset: usize,
48042            _depth: fidl::encoding::Depth,
48043        ) -> fidl::Result<()> {
48044            encoder.debug_check_bounds::<UnionWithStringWithLimit>(offset);
48045            encoder.write_num::<u64>(self.ordinal(), offset);
48046            match self {
48047                UnionWithStringWithLimit::S(ref val) => fidl::encoding::encode_in_envelope::<
48048                    fidl::encoding::BoundedString<2>,
48049                    D,
48050                >(
48051                    <fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
48052                        val,
48053                    ),
48054                    encoder,
48055                    offset + 8,
48056                    _depth,
48057                ),
48058                UnionWithStringWithLimit::__SourceBreaking { .. } => {
48059                    Err(fidl::Error::UnknownUnionTag)
48060                }
48061            }
48062        }
48063    }
48064
48065    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48066        for UnionWithStringWithLimit
48067    {
48068        #[inline(always)]
48069        fn new_empty() -> Self {
48070            Self::__SourceBreaking { unknown_ordinal: 0 }
48071        }
48072
48073        #[inline]
48074        unsafe fn decode(
48075            &mut self,
48076            decoder: &mut fidl::encoding::Decoder<'_, D>,
48077            offset: usize,
48078            mut depth: fidl::encoding::Depth,
48079        ) -> fidl::Result<()> {
48080            decoder.debug_check_bounds::<Self>(offset);
48081            #[allow(unused_variables)]
48082            let next_out_of_line = decoder.next_out_of_line();
48083            let handles_before = decoder.remaining_handles();
48084            let (ordinal, inlined, num_bytes, num_handles) =
48085                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48086
48087            let member_inline_size = match ordinal {
48088                1 => <fidl::encoding::BoundedString<2> as fidl::encoding::TypeMarker>::inline_size(
48089                    decoder.context,
48090                ),
48091                0 => return Err(fidl::Error::UnknownUnionTag),
48092                _ => num_bytes as usize,
48093            };
48094
48095            if inlined != (member_inline_size <= 4) {
48096                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48097            }
48098            let _inner_offset;
48099            if inlined {
48100                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48101                _inner_offset = offset + 8;
48102            } else {
48103                depth.increment()?;
48104                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48105            }
48106            match ordinal {
48107                1 => {
48108                    #[allow(irrefutable_let_patterns)]
48109                    if let UnionWithStringWithLimit::S(_) = self {
48110                        // Do nothing, read the value into the object
48111                    } else {
48112                        // Initialize `self` to the right variant
48113                        *self = UnionWithStringWithLimit::S(fidl::new_empty!(
48114                            fidl::encoding::BoundedString<2>,
48115                            D
48116                        ));
48117                    }
48118                    #[allow(irrefutable_let_patterns)]
48119                    if let UnionWithStringWithLimit::S(ref mut val) = self {
48120                        fidl::decode!(
48121                            fidl::encoding::BoundedString<2>,
48122                            D,
48123                            val,
48124                            decoder,
48125                            _inner_offset,
48126                            depth
48127                        )?;
48128                    } else {
48129                        unreachable!()
48130                    }
48131                }
48132                #[allow(deprecated)]
48133                ordinal => {
48134                    for _ in 0..num_handles {
48135                        decoder.drop_next_handle()?;
48136                    }
48137                    *self = UnionWithStringWithLimit::__SourceBreaking { unknown_ordinal: ordinal };
48138                }
48139            }
48140            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48141                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48142            }
48143            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48144                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48145            }
48146            Ok(())
48147        }
48148    }
48149
48150    impl fidl::encoding::ValueTypeMarker for UnionWithVectorOfVectors {
48151        type Borrowed<'a> = &'a Self;
48152        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48153            value
48154        }
48155    }
48156
48157    unsafe impl fidl::encoding::TypeMarker for UnionWithVectorOfVectors {
48158        type Owned = Self;
48159
48160        #[inline(always)]
48161        fn inline_align(_context: fidl::encoding::Context) -> usize {
48162            8
48163        }
48164
48165        #[inline(always)]
48166        fn inline_size(_context: fidl::encoding::Context) -> usize {
48167            16
48168        }
48169    }
48170
48171    unsafe impl<D: fidl::encoding::ResourceDialect>
48172        fidl::encoding::Encode<UnionWithVectorOfVectors, D> for &UnionWithVectorOfVectors
48173    {
48174        #[inline]
48175        unsafe fn encode(
48176            self,
48177            encoder: &mut fidl::encoding::Encoder<'_, D>,
48178            offset: usize,
48179            _depth: fidl::encoding::Depth,
48180        ) -> fidl::Result<()> {
48181            encoder.debug_check_bounds::<UnionWithVectorOfVectors>(offset);
48182            encoder.write_num::<u64>(self.ordinal(), offset);
48183            match self {
48184                UnionWithVectorOfVectors::V(ref val) => fidl::encoding::encode_in_envelope::<
48185                    fidl::encoding::UnboundedVector<
48186                        fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48187                    >,
48188                    D,
48189                >(
48190                    <fidl::encoding::UnboundedVector<
48191                        fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48192                    > as fidl::encoding::ValueTypeMarker>::borrow(val),
48193                    encoder,
48194                    offset + 8,
48195                    _depth,
48196                ),
48197            }
48198        }
48199    }
48200
48201    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48202        for UnionWithVectorOfVectors
48203    {
48204        #[inline(always)]
48205        fn new_empty() -> Self {
48206            Self::V(fidl::new_empty!(
48207                fidl::encoding::UnboundedVector<
48208                    fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48209                >,
48210                D
48211            ))
48212        }
48213
48214        #[inline]
48215        unsafe fn decode(
48216            &mut self,
48217            decoder: &mut fidl::encoding::Decoder<'_, D>,
48218            offset: usize,
48219            mut depth: fidl::encoding::Depth,
48220        ) -> fidl::Result<()> {
48221            decoder.debug_check_bounds::<Self>(offset);
48222            #[allow(unused_variables)]
48223            let next_out_of_line = decoder.next_out_of_line();
48224            let handles_before = decoder.remaining_handles();
48225            let (ordinal, inlined, num_bytes, num_handles) =
48226                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48227
48228            let member_inline_size = match ordinal {
48229                1 => <fidl::encoding::UnboundedVector<
48230                    fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48231                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48232                _ => return Err(fidl::Error::UnknownUnionTag),
48233            };
48234
48235            if inlined != (member_inline_size <= 4) {
48236                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48237            }
48238            let _inner_offset;
48239            if inlined {
48240                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48241                _inner_offset = offset + 8;
48242            } else {
48243                depth.increment()?;
48244                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48245            }
48246            match ordinal {
48247                1 => {
48248                    #[allow(irrefutable_let_patterns)]
48249                    if let UnionWithVectorOfVectors::V(_) = self {
48250                        // Do nothing, read the value into the object
48251                    } else {
48252                        // Initialize `self` to the right variant
48253                        *self = UnionWithVectorOfVectors::V(fidl::new_empty!(
48254                            fidl::encoding::UnboundedVector<
48255                                fidl::encoding::UnboundedVector<
48256                                    fidl::encoding::Boxed<StructSize3Align1>,
48257                                >,
48258                            >,
48259                            D
48260                        ));
48261                    }
48262                    #[allow(irrefutable_let_patterns)]
48263                    if let UnionWithVectorOfVectors::V(ref mut val) = self {
48264                        fidl::decode!(
48265                            fidl::encoding::UnboundedVector<
48266                                fidl::encoding::UnboundedVector<
48267                                    fidl::encoding::Boxed<StructSize3Align1>,
48268                                >,
48269                            >,
48270                            D,
48271                            val,
48272                            decoder,
48273                            _inner_offset,
48274                            depth
48275                        )?;
48276                    } else {
48277                        unreachable!()
48278                    }
48279                }
48280                ordinal => panic!("unexpected ordinal {:?}", ordinal),
48281            }
48282            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48283                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48284            }
48285            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48286                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48287            }
48288            Ok(())
48289        }
48290    }
48291
48292    impl fidl::encoding::ValueTypeMarker for UnionWithVectorWithLimit {
48293        type Borrowed<'a> = &'a Self;
48294        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48295            value
48296        }
48297    }
48298
48299    unsafe impl fidl::encoding::TypeMarker for UnionWithVectorWithLimit {
48300        type Owned = Self;
48301
48302        #[inline(always)]
48303        fn inline_align(_context: fidl::encoding::Context) -> usize {
48304            8
48305        }
48306
48307        #[inline(always)]
48308        fn inline_size(_context: fidl::encoding::Context) -> usize {
48309            16
48310        }
48311    }
48312
48313    unsafe impl<D: fidl::encoding::ResourceDialect>
48314        fidl::encoding::Encode<UnionWithVectorWithLimit, D> for &UnionWithVectorWithLimit
48315    {
48316        #[inline]
48317        unsafe fn encode(
48318            self,
48319            encoder: &mut fidl::encoding::Encoder<'_, D>,
48320            offset: usize,
48321            _depth: fidl::encoding::Depth,
48322        ) -> fidl::Result<()> {
48323            encoder.debug_check_bounds::<UnionWithVectorWithLimit>(offset);
48324            encoder.write_num::<u64>(self.ordinal(), offset);
48325            match self {
48326                UnionWithVectorWithLimit::V(ref val) => fidl::encoding::encode_in_envelope::<
48327                    fidl::encoding::Vector<u8, 2>,
48328                    D,
48329                >(
48330                    <fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
48331                    encoder,
48332                    offset + 8,
48333                    _depth,
48334                ),
48335                UnionWithVectorWithLimit::__SourceBreaking { .. } => {
48336                    Err(fidl::Error::UnknownUnionTag)
48337                }
48338            }
48339        }
48340    }
48341
48342    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48343        for UnionWithVectorWithLimit
48344    {
48345        #[inline(always)]
48346        fn new_empty() -> Self {
48347            Self::__SourceBreaking { unknown_ordinal: 0 }
48348        }
48349
48350        #[inline]
48351        unsafe fn decode(
48352            &mut self,
48353            decoder: &mut fidl::encoding::Decoder<'_, D>,
48354            offset: usize,
48355            mut depth: fidl::encoding::Depth,
48356        ) -> fidl::Result<()> {
48357            decoder.debug_check_bounds::<Self>(offset);
48358            #[allow(unused_variables)]
48359            let next_out_of_line = decoder.next_out_of_line();
48360            let handles_before = decoder.remaining_handles();
48361            let (ordinal, inlined, num_bytes, num_handles) =
48362                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48363
48364            let member_inline_size = match ordinal {
48365                1 => <fidl::encoding::Vector<u8, 2> as fidl::encoding::TypeMarker>::inline_size(
48366                    decoder.context,
48367                ),
48368                0 => return Err(fidl::Error::UnknownUnionTag),
48369                _ => num_bytes as usize,
48370            };
48371
48372            if inlined != (member_inline_size <= 4) {
48373                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48374            }
48375            let _inner_offset;
48376            if inlined {
48377                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48378                _inner_offset = offset + 8;
48379            } else {
48380                depth.increment()?;
48381                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48382            }
48383            match ordinal {
48384                1 => {
48385                    #[allow(irrefutable_let_patterns)]
48386                    if let UnionWithVectorWithLimit::V(_) = self {
48387                        // Do nothing, read the value into the object
48388                    } else {
48389                        // Initialize `self` to the right variant
48390                        *self = UnionWithVectorWithLimit::V(
48391                            fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D),
48392                        );
48393                    }
48394                    #[allow(irrefutable_let_patterns)]
48395                    if let UnionWithVectorWithLimit::V(ref mut val) = self {
48396                        fidl::decode!(fidl::encoding::Vector<u8, 2>, D, val, decoder, _inner_offset, depth)?;
48397                    } else {
48398                        unreachable!()
48399                    }
48400                }
48401                #[allow(deprecated)]
48402                ordinal => {
48403                    for _ in 0..num_handles {
48404                        decoder.drop_next_handle()?;
48405                    }
48406                    *self = UnionWithVectorWithLimit::__SourceBreaking { unknown_ordinal: ordinal };
48407                }
48408            }
48409            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48410                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48411            }
48412            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48413                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48414            }
48415            Ok(())
48416        }
48417    }
48418
48419    impl fidl::encoding::ValueTypeMarker for XUnionOfTableThenXUnionThenUnion {
48420        type Borrowed<'a> = &'a Self;
48421        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48422            value
48423        }
48424    }
48425
48426    unsafe impl fidl::encoding::TypeMarker for XUnionOfTableThenXUnionThenUnion {
48427        type Owned = Self;
48428
48429        #[inline(always)]
48430        fn inline_align(_context: fidl::encoding::Context) -> usize {
48431            8
48432        }
48433
48434        #[inline(always)]
48435        fn inline_size(_context: fidl::encoding::Context) -> usize {
48436            16
48437        }
48438    }
48439
48440    unsafe impl<D: fidl::encoding::ResourceDialect>
48441        fidl::encoding::Encode<XUnionOfTableThenXUnionThenUnion, D>
48442        for &XUnionOfTableThenXUnionThenUnion
48443    {
48444        #[inline]
48445        unsafe fn encode(
48446            self,
48447            encoder: &mut fidl::encoding::Encoder<'_, D>,
48448            offset: usize,
48449            _depth: fidl::encoding::Depth,
48450        ) -> fidl::Result<()> {
48451            encoder.debug_check_bounds::<XUnionOfTableThenXUnionThenUnion>(offset);
48452            encoder.write_num::<u64>(self.ordinal(), offset);
48453            match self {
48454                XUnionOfTableThenXUnionThenUnion::Variant(ref val) => {
48455                    fidl::encoding::encode_in_envelope::<TableOfXUnionThenUnion, D>(
48456                        <TableOfXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
48457                        encoder,
48458                        offset + 8,
48459                        _depth,
48460                    )
48461                }
48462                XUnionOfTableThenXUnionThenUnion::__SourceBreaking { .. } => {
48463                    Err(fidl::Error::UnknownUnionTag)
48464                }
48465            }
48466        }
48467    }
48468
48469    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48470        for XUnionOfTableThenXUnionThenUnion
48471    {
48472        #[inline(always)]
48473        fn new_empty() -> Self {
48474            Self::__SourceBreaking { unknown_ordinal: 0 }
48475        }
48476
48477        #[inline]
48478        unsafe fn decode(
48479            &mut self,
48480            decoder: &mut fidl::encoding::Decoder<'_, D>,
48481            offset: usize,
48482            mut depth: fidl::encoding::Depth,
48483        ) -> fidl::Result<()> {
48484            decoder.debug_check_bounds::<Self>(offset);
48485            #[allow(unused_variables)]
48486            let next_out_of_line = decoder.next_out_of_line();
48487            let handles_before = decoder.remaining_handles();
48488            let (ordinal, inlined, num_bytes, num_handles) =
48489                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48490
48491            let member_inline_size = match ordinal {
48492                1 => <TableOfXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
48493                    decoder.context,
48494                ),
48495                0 => return Err(fidl::Error::UnknownUnionTag),
48496                _ => num_bytes as usize,
48497            };
48498
48499            if inlined != (member_inline_size <= 4) {
48500                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48501            }
48502            let _inner_offset;
48503            if inlined {
48504                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48505                _inner_offset = offset + 8;
48506            } else {
48507                depth.increment()?;
48508                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48509            }
48510            match ordinal {
48511                1 => {
48512                    #[allow(irrefutable_let_patterns)]
48513                    if let XUnionOfTableThenXUnionThenUnion::Variant(_) = self {
48514                        // Do nothing, read the value into the object
48515                    } else {
48516                        // Initialize `self` to the right variant
48517                        *self = XUnionOfTableThenXUnionThenUnion::Variant(fidl::new_empty!(
48518                            TableOfXUnionThenUnion,
48519                            D
48520                        ));
48521                    }
48522                    #[allow(irrefutable_let_patterns)]
48523                    if let XUnionOfTableThenXUnionThenUnion::Variant(ref mut val) = self {
48524                        fidl::decode!(
48525                            TableOfXUnionThenUnion,
48526                            D,
48527                            val,
48528                            decoder,
48529                            _inner_offset,
48530                            depth
48531                        )?;
48532                    } else {
48533                        unreachable!()
48534                    }
48535                }
48536                #[allow(deprecated)]
48537                ordinal => {
48538                    for _ in 0..num_handles {
48539                        decoder.drop_next_handle()?;
48540                    }
48541                    *self = XUnionOfTableThenXUnionThenUnion::__SourceBreaking {
48542                        unknown_ordinal: ordinal,
48543                    };
48544                }
48545            }
48546            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48547                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48548            }
48549            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48550                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48551            }
48552            Ok(())
48553        }
48554    }
48555
48556    impl fidl::encoding::ValueTypeMarker for XUnionOfUnion {
48557        type Borrowed<'a> = &'a Self;
48558        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48559            value
48560        }
48561    }
48562
48563    unsafe impl fidl::encoding::TypeMarker for XUnionOfUnion {
48564        type Owned = Self;
48565
48566        #[inline(always)]
48567        fn inline_align(_context: fidl::encoding::Context) -> usize {
48568            8
48569        }
48570
48571        #[inline(always)]
48572        fn inline_size(_context: fidl::encoding::Context) -> usize {
48573            16
48574        }
48575    }
48576
48577    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionOfUnion, D>
48578        for &XUnionOfUnion
48579    {
48580        #[inline]
48581        unsafe fn encode(
48582            self,
48583            encoder: &mut fidl::encoding::Encoder<'_, D>,
48584            offset: usize,
48585            _depth: fidl::encoding::Depth,
48586        ) -> fidl::Result<()> {
48587            encoder.debug_check_bounds::<XUnionOfUnion>(offset);
48588            encoder.write_num::<u64>(self.ordinal(), offset);
48589            match self {
48590                XUnionOfUnion::Variant(ref val) => {
48591                    fidl::encoding::encode_in_envelope::<UnionAtTheBottom, D>(
48592                        <UnionAtTheBottom as fidl::encoding::ValueTypeMarker>::borrow(val),
48593                        encoder,
48594                        offset + 8,
48595                        _depth,
48596                    )
48597                }
48598                XUnionOfUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48599            }
48600        }
48601    }
48602
48603    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionOfUnion {
48604        #[inline(always)]
48605        fn new_empty() -> Self {
48606            Self::__SourceBreaking { unknown_ordinal: 0 }
48607        }
48608
48609        #[inline]
48610        unsafe fn decode(
48611            &mut self,
48612            decoder: &mut fidl::encoding::Decoder<'_, D>,
48613            offset: usize,
48614            mut depth: fidl::encoding::Depth,
48615        ) -> fidl::Result<()> {
48616            decoder.debug_check_bounds::<Self>(offset);
48617            #[allow(unused_variables)]
48618            let next_out_of_line = decoder.next_out_of_line();
48619            let handles_before = decoder.remaining_handles();
48620            let (ordinal, inlined, num_bytes, num_handles) =
48621                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48622
48623            let member_inline_size = match ordinal {
48624                1 => <UnionAtTheBottom as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48625                0 => return Err(fidl::Error::UnknownUnionTag),
48626                _ => num_bytes as usize,
48627            };
48628
48629            if inlined != (member_inline_size <= 4) {
48630                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48631            }
48632            let _inner_offset;
48633            if inlined {
48634                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48635                _inner_offset = offset + 8;
48636            } else {
48637                depth.increment()?;
48638                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48639            }
48640            match ordinal {
48641                1 => {
48642                    #[allow(irrefutable_let_patterns)]
48643                    if let XUnionOfUnion::Variant(_) = self {
48644                        // Do nothing, read the value into the object
48645                    } else {
48646                        // Initialize `self` to the right variant
48647                        *self = XUnionOfUnion::Variant(fidl::new_empty!(UnionAtTheBottom, D));
48648                    }
48649                    #[allow(irrefutable_let_patterns)]
48650                    if let XUnionOfUnion::Variant(ref mut val) = self {
48651                        fidl::decode!(UnionAtTheBottom, D, val, decoder, _inner_offset, depth)?;
48652                    } else {
48653                        unreachable!()
48654                    }
48655                }
48656                #[allow(deprecated)]
48657                ordinal => {
48658                    for _ in 0..num_handles {
48659                        decoder.drop_next_handle()?;
48660                    }
48661                    *self = XUnionOfUnion::__SourceBreaking { unknown_ordinal: ordinal };
48662                }
48663            }
48664            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48665                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48666            }
48667            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48668                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48669            }
48670            Ok(())
48671        }
48672    }
48673
48674    impl fidl::encoding::ValueTypeMarker for XUnionWithEmptyStruct {
48675        type Borrowed<'a> = &'a Self;
48676        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48677            value
48678        }
48679    }
48680
48681    unsafe impl fidl::encoding::TypeMarker for XUnionWithEmptyStruct {
48682        type Owned = Self;
48683
48684        #[inline(always)]
48685        fn inline_align(_context: fidl::encoding::Context) -> usize {
48686            8
48687        }
48688
48689        #[inline(always)]
48690        fn inline_size(_context: fidl::encoding::Context) -> usize {
48691            16
48692        }
48693    }
48694
48695    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithEmptyStruct, D>
48696        for &XUnionWithEmptyStruct
48697    {
48698        #[inline]
48699        unsafe fn encode(
48700            self,
48701            encoder: &mut fidl::encoding::Encoder<'_, D>,
48702            offset: usize,
48703            _depth: fidl::encoding::Depth,
48704        ) -> fidl::Result<()> {
48705            encoder.debug_check_bounds::<XUnionWithEmptyStruct>(offset);
48706            encoder.write_num::<u64>(self.ordinal(), offset);
48707            match self {
48708                XUnionWithEmptyStruct::S(ref val) => {
48709                    fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
48710                        <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
48711                        encoder,
48712                        offset + 8,
48713                        _depth,
48714                    )
48715                }
48716                XUnionWithEmptyStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48717            }
48718        }
48719    }
48720
48721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithEmptyStruct {
48722        #[inline(always)]
48723        fn new_empty() -> Self {
48724            Self::__SourceBreaking { unknown_ordinal: 0 }
48725        }
48726
48727        #[inline]
48728        unsafe fn decode(
48729            &mut self,
48730            decoder: &mut fidl::encoding::Decoder<'_, D>,
48731            offset: usize,
48732            mut depth: fidl::encoding::Depth,
48733        ) -> fidl::Result<()> {
48734            decoder.debug_check_bounds::<Self>(offset);
48735            #[allow(unused_variables)]
48736            let next_out_of_line = decoder.next_out_of_line();
48737            let handles_before = decoder.remaining_handles();
48738            let (ordinal, inlined, num_bytes, num_handles) =
48739                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48740
48741            let member_inline_size = match ordinal {
48742                1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48743                0 => return Err(fidl::Error::UnknownUnionTag),
48744                _ => num_bytes as usize,
48745            };
48746
48747            if inlined != (member_inline_size <= 4) {
48748                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48749            }
48750            let _inner_offset;
48751            if inlined {
48752                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48753                _inner_offset = offset + 8;
48754            } else {
48755                depth.increment()?;
48756                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48757            }
48758            match ordinal {
48759                1 => {
48760                    #[allow(irrefutable_let_patterns)]
48761                    if let XUnionWithEmptyStruct::S(_) = self {
48762                        // Do nothing, read the value into the object
48763                    } else {
48764                        // Initialize `self` to the right variant
48765                        *self = XUnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
48766                    }
48767                    #[allow(irrefutable_let_patterns)]
48768                    if let XUnionWithEmptyStruct::S(ref mut val) = self {
48769                        fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
48770                    } else {
48771                        unreachable!()
48772                    }
48773                }
48774                #[allow(deprecated)]
48775                ordinal => {
48776                    for _ in 0..num_handles {
48777                        decoder.drop_next_handle()?;
48778                    }
48779                    *self = XUnionWithEmptyStruct::__SourceBreaking { unknown_ordinal: ordinal };
48780                }
48781            }
48782            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48783                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48784            }
48785            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48786                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48787            }
48788            Ok(())
48789        }
48790    }
48791
48792    impl fidl::encoding::ValueTypeMarker for XUnionWithStruct {
48793        type Borrowed<'a> = &'a Self;
48794        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48795            value
48796        }
48797    }
48798
48799    unsafe impl fidl::encoding::TypeMarker for XUnionWithStruct {
48800        type Owned = Self;
48801
48802        #[inline(always)]
48803        fn inline_align(_context: fidl::encoding::Context) -> usize {
48804            8
48805        }
48806
48807        #[inline(always)]
48808        fn inline_size(_context: fidl::encoding::Context) -> usize {
48809            16
48810        }
48811    }
48812
48813    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithStruct, D>
48814        for &XUnionWithStruct
48815    {
48816        #[inline]
48817        unsafe fn encode(
48818            self,
48819            encoder: &mut fidl::encoding::Encoder<'_, D>,
48820            offset: usize,
48821            _depth: fidl::encoding::Depth,
48822        ) -> fidl::Result<()> {
48823            encoder.debug_check_bounds::<XUnionWithStruct>(offset);
48824            encoder.write_num::<u64>(self.ordinal(), offset);
48825            match self {
48826                XUnionWithStruct::S(ref val) => {
48827                    fidl::encoding::encode_in_envelope::<StructSize3Align1, D>(
48828                        <StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow(val),
48829                        encoder,
48830                        offset + 8,
48831                        _depth,
48832                    )
48833                }
48834                XUnionWithStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48835            }
48836        }
48837    }
48838
48839    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithStruct {
48840        #[inline(always)]
48841        fn new_empty() -> Self {
48842            Self::__SourceBreaking { unknown_ordinal: 0 }
48843        }
48844
48845        #[inline]
48846        unsafe fn decode(
48847            &mut self,
48848            decoder: &mut fidl::encoding::Decoder<'_, D>,
48849            offset: usize,
48850            mut depth: fidl::encoding::Depth,
48851        ) -> fidl::Result<()> {
48852            decoder.debug_check_bounds::<Self>(offset);
48853            #[allow(unused_variables)]
48854            let next_out_of_line = decoder.next_out_of_line();
48855            let handles_before = decoder.remaining_handles();
48856            let (ordinal, inlined, num_bytes, num_handles) =
48857                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48858
48859            let member_inline_size = match ordinal {
48860                1 => {
48861                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
48862                }
48863                0 => return Err(fidl::Error::UnknownUnionTag),
48864                _ => num_bytes as usize,
48865            };
48866
48867            if inlined != (member_inline_size <= 4) {
48868                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48869            }
48870            let _inner_offset;
48871            if inlined {
48872                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48873                _inner_offset = offset + 8;
48874            } else {
48875                depth.increment()?;
48876                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48877            }
48878            match ordinal {
48879                1 => {
48880                    #[allow(irrefutable_let_patterns)]
48881                    if let XUnionWithStruct::S(_) = self {
48882                        // Do nothing, read the value into the object
48883                    } else {
48884                        // Initialize `self` to the right variant
48885                        *self = XUnionWithStruct::S(fidl::new_empty!(StructSize3Align1, D));
48886                    }
48887                    #[allow(irrefutable_let_patterns)]
48888                    if let XUnionWithStruct::S(ref mut val) = self {
48889                        fidl::decode!(StructSize3Align1, D, val, decoder, _inner_offset, depth)?;
48890                    } else {
48891                        unreachable!()
48892                    }
48893                }
48894                #[allow(deprecated)]
48895                ordinal => {
48896                    for _ in 0..num_handles {
48897                        decoder.drop_next_handle()?;
48898                    }
48899                    *self = XUnionWithStruct::__SourceBreaking { unknown_ordinal: ordinal };
48900                }
48901            }
48902            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48903                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48904            }
48905            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48906                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48907            }
48908            Ok(())
48909        }
48910    }
48911
48912    impl fidl::encoding::ValueTypeMarker for XUnionWithUnions {
48913        type Borrowed<'a> = &'a Self;
48914        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48915            value
48916        }
48917    }
48918
48919    unsafe impl fidl::encoding::TypeMarker for XUnionWithUnions {
48920        type Owned = Self;
48921
48922        #[inline(always)]
48923        fn inline_align(_context: fidl::encoding::Context) -> usize {
48924            8
48925        }
48926
48927        #[inline(always)]
48928        fn inline_size(_context: fidl::encoding::Context) -> usize {
48929            16
48930        }
48931    }
48932
48933    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithUnions, D>
48934        for &XUnionWithUnions
48935    {
48936        #[inline]
48937        unsafe fn encode(
48938            self,
48939            encoder: &mut fidl::encoding::Encoder<'_, D>,
48940            offset: usize,
48941            _depth: fidl::encoding::Depth,
48942        ) -> fidl::Result<()> {
48943            encoder.debug_check_bounds::<XUnionWithUnions>(offset);
48944            encoder.write_num::<u64>(self.ordinal(), offset);
48945            match self {
48946                XUnionWithUnions::U1(ref val) => {
48947                    fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
48948                        <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
48949                        encoder,
48950                        offset + 8,
48951                        _depth,
48952                    )
48953                }
48954                XUnionWithUnions::U2(ref val) => {
48955                    fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
48956                        <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
48957                        encoder,
48958                        offset + 8,
48959                        _depth,
48960                    )
48961                }
48962                XUnionWithUnions::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48963            }
48964        }
48965    }
48966
48967    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithUnions {
48968        #[inline(always)]
48969        fn new_empty() -> Self {
48970            Self::__SourceBreaking { unknown_ordinal: 0 }
48971        }
48972
48973        #[inline]
48974        unsafe fn decode(
48975            &mut self,
48976            decoder: &mut fidl::encoding::Decoder<'_, D>,
48977            offset: usize,
48978            mut depth: fidl::encoding::Depth,
48979        ) -> fidl::Result<()> {
48980            decoder.debug_check_bounds::<Self>(offset);
48981            #[allow(unused_variables)]
48982            let next_out_of_line = decoder.next_out_of_line();
48983            let handles_before = decoder.remaining_handles();
48984            let (ordinal, inlined, num_bytes, num_handles) =
48985                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48986
48987            let member_inline_size = match ordinal {
48988                1 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48989                2 => {
48990                    <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
48991                }
48992                0 => return Err(fidl::Error::UnknownUnionTag),
48993                _ => num_bytes as usize,
48994            };
48995
48996            if inlined != (member_inline_size <= 4) {
48997                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48998            }
48999            let _inner_offset;
49000            if inlined {
49001                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
49002                _inner_offset = offset + 8;
49003            } else {
49004                depth.increment()?;
49005                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
49006            }
49007            match ordinal {
49008                1 => {
49009                    #[allow(irrefutable_let_patterns)]
49010                    if let XUnionWithUnions::U1(_) = self {
49011                        // Do nothing, read the value into the object
49012                    } else {
49013                        // Initialize `self` to the right variant
49014                        *self = XUnionWithUnions::U1(fidl::new_empty!(UnionSize8Align4, D));
49015                    }
49016                    #[allow(irrefutable_let_patterns)]
49017                    if let XUnionWithUnions::U1(ref mut val) = self {
49018                        fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
49019                    } else {
49020                        unreachable!()
49021                    }
49022                }
49023                2 => {
49024                    #[allow(irrefutable_let_patterns)]
49025                    if let XUnionWithUnions::U2(_) = self {
49026                        // Do nothing, read the value into the object
49027                    } else {
49028                        // Initialize `self` to the right variant
49029                        *self = XUnionWithUnions::U2(fidl::new_empty!(UnionSize12Align4, D));
49030                    }
49031                    #[allow(irrefutable_let_patterns)]
49032                    if let XUnionWithUnions::U2(ref mut val) = self {
49033                        fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
49034                    } else {
49035                        unreachable!()
49036                    }
49037                }
49038                #[allow(deprecated)]
49039                ordinal => {
49040                    for _ in 0..num_handles {
49041                        decoder.drop_next_handle()?;
49042                    }
49043                    *self = XUnionWithUnions::__SourceBreaking { unknown_ordinal: ordinal };
49044                }
49045            }
49046            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
49047                return Err(fidl::Error::InvalidNumBytesInEnvelope);
49048            }
49049            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
49050                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
49051            }
49052            Ok(())
49053        }
49054    }
49055
49056    impl fidl::encoding::ValueTypeMarker for XUnionWithXUnion {
49057        type Borrowed<'a> = &'a Self;
49058        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
49059            value
49060        }
49061    }
49062
49063    unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnion {
49064        type Owned = Self;
49065
49066        #[inline(always)]
49067        fn inline_align(_context: fidl::encoding::Context) -> usize {
49068            8
49069        }
49070
49071        #[inline(always)]
49072        fn inline_size(_context: fidl::encoding::Context) -> usize {
49073            16
49074        }
49075    }
49076
49077    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithXUnion, D>
49078        for &XUnionWithXUnion
49079    {
49080        #[inline]
49081        unsafe fn encode(
49082            self,
49083            encoder: &mut fidl::encoding::Encoder<'_, D>,
49084            offset: usize,
49085            _depth: fidl::encoding::Depth,
49086        ) -> fidl::Result<()> {
49087            encoder.debug_check_bounds::<XUnionWithXUnion>(offset);
49088            encoder.write_num::<u64>(self.ordinal(), offset);
49089            match self {
49090                XUnionWithXUnion::Xu(ref val) => {
49091                    fidl::encoding::encode_in_envelope::<XUnionWithStruct, D>(
49092                        <XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
49093                        encoder,
49094                        offset + 8,
49095                        _depth,
49096                    )
49097                }
49098                XUnionWithXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
49099            }
49100        }
49101    }
49102
49103    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithXUnion {
49104        #[inline(always)]
49105        fn new_empty() -> Self {
49106            Self::__SourceBreaking { unknown_ordinal: 0 }
49107        }
49108
49109        #[inline]
49110        unsafe fn decode(
49111            &mut self,
49112            decoder: &mut fidl::encoding::Decoder<'_, D>,
49113            offset: usize,
49114            mut depth: fidl::encoding::Depth,
49115        ) -> fidl::Result<()> {
49116            decoder.debug_check_bounds::<Self>(offset);
49117            #[allow(unused_variables)]
49118            let next_out_of_line = decoder.next_out_of_line();
49119            let handles_before = decoder.remaining_handles();
49120            let (ordinal, inlined, num_bytes, num_handles) =
49121                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
49122
49123            let member_inline_size = match ordinal {
49124                1 => <XUnionWithStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
49125                0 => return Err(fidl::Error::UnknownUnionTag),
49126                _ => num_bytes as usize,
49127            };
49128
49129            if inlined != (member_inline_size <= 4) {
49130                return Err(fidl::Error::InvalidInlineBitInEnvelope);
49131            }
49132            let _inner_offset;
49133            if inlined {
49134                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
49135                _inner_offset = offset + 8;
49136            } else {
49137                depth.increment()?;
49138                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
49139            }
49140            match ordinal {
49141                1 => {
49142                    #[allow(irrefutable_let_patterns)]
49143                    if let XUnionWithXUnion::Xu(_) = self {
49144                        // Do nothing, read the value into the object
49145                    } else {
49146                        // Initialize `self` to the right variant
49147                        *self = XUnionWithXUnion::Xu(fidl::new_empty!(XUnionWithStruct, D));
49148                    }
49149                    #[allow(irrefutable_let_patterns)]
49150                    if let XUnionWithXUnion::Xu(ref mut val) = self {
49151                        fidl::decode!(XUnionWithStruct, D, val, decoder, _inner_offset, depth)?;
49152                    } else {
49153                        unreachable!()
49154                    }
49155                }
49156                #[allow(deprecated)]
49157                ordinal => {
49158                    for _ in 0..num_handles {
49159                        decoder.drop_next_handle()?;
49160                    }
49161                    *self = XUnionWithXUnion::__SourceBreaking { unknown_ordinal: ordinal };
49162                }
49163            }
49164            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
49165                return Err(fidl::Error::InvalidNumBytesInEnvelope);
49166            }
49167            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
49168                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
49169            }
49170            Ok(())
49171        }
49172    }
49173}