Skip to main content

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 VectorOfUint64 {
3461    pub v: Vec<u64>,
3462}
3463
3464impl fidl::Persistable for VectorOfUint64 {}
3465
3466#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3467pub struct VectorWithLimit {
3468    pub v: Vec<u8>,
3469}
3470
3471impl fidl::Persistable for VectorWithLimit {}
3472
3473#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3474pub struct VectorWithLimitInArray {
3475    pub a: [Option<Vec<u8>>; 2],
3476}
3477
3478impl fidl::Persistable for VectorWithLimitInArray {}
3479
3480#[derive(Clone, Debug, PartialEq)]
3481pub struct VectorWithLimitInTable {
3482    pub t: TableWithVectorWithLimit,
3483}
3484
3485impl fidl::Persistable for VectorWithLimitInTable {}
3486
3487#[derive(Clone, Debug, PartialEq)]
3488pub struct VectorWithLimitInUnion {
3489    pub u: UnionWithVectorWithLimit,
3490}
3491
3492impl fidl::Persistable for VectorWithLimitInUnion {}
3493
3494#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3495pub struct VectorWithLimitInVector {
3496    pub v: Vec<Vec<u8>>,
3497}
3498
3499impl fidl::Persistable for VectorWithLimitInVector {}
3500
3501#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3502pub struct VectorWrapper {
3503    pub v: Vec<u8>,
3504}
3505
3506impl fidl::Persistable for VectorWrapper {}
3507
3508#[derive(Clone, Debug, PartialEq)]
3509pub struct XUnionWithStructStruct {
3510    pub xu: XUnionWithStruct,
3511}
3512
3513impl fidl::Persistable for XUnionWithStructStruct {}
3514
3515#[derive(Clone, Debug, PartialEq)]
3516pub struct XUnionWithXUnionStruct {
3517    pub xu: XUnionWithXUnion,
3518}
3519
3520impl fidl::Persistable for XUnionWithXUnionStruct {}
3521
3522#[derive(Clone, Debug, Default, PartialEq)]
3523pub struct CompatTableString {
3524    pub s: Option<String>,
3525    #[doc(hidden)]
3526    pub __source_breaking: fidl::marker::SourceBreaking,
3527}
3528
3529impl fidl::Persistable for CompatTableString {}
3530
3531#[derive(Clone, Debug, Default, PartialEq)]
3532pub struct CompatTableValue {
3533    pub union_member: Option<CompatUnion>,
3534    pub array_member: Option<[u32; 3]>,
3535    pub table_member: Option<CompatTableString>,
3536    pub xunion_member: Option<CompatXUnion>,
3537    #[doc(hidden)]
3538    pub __source_breaking: fidl::marker::SourceBreaking,
3539}
3540
3541impl fidl::Persistable for CompatTableValue {}
3542
3543#[derive(Clone, Debug, Default, PartialEq)]
3544pub struct EmptyTable {
3545    #[doc(hidden)]
3546    pub __source_breaking: fidl::marker::SourceBreaking,
3547}
3548
3549impl fidl::Persistable for EmptyTable {}
3550
3551#[derive(Clone, Debug, Default, PartialEq)]
3552pub struct FidlvizTable {
3553    pub f1: Option<bool>,
3554    pub f3: Option<bool>,
3555    #[doc(hidden)]
3556    pub __source_breaking: fidl::marker::SourceBreaking,
3557}
3558
3559impl fidl::Persistable for FidlvizTable {}
3560
3561#[derive(Clone, Debug, Default, PartialEq)]
3562pub struct GoldenTable {
3563    pub v: Option<i16>,
3564    #[doc(hidden)]
3565    pub __source_breaking: fidl::marker::SourceBreaking,
3566}
3567
3568impl fidl::Persistable for GoldenTable {}
3569
3570#[derive(Clone, Debug, Default, PartialEq)]
3571pub struct PaddedTable {
3572    pub field: Option<i8>,
3573    #[doc(hidden)]
3574    pub __source_breaking: fidl::marker::SourceBreaking,
3575}
3576
3577impl fidl::Persistable for PaddedTable {}
3578
3579#[derive(Clone, Debug, Default, PartialEq)]
3580pub struct RecursiveOptionalAndTable {
3581    pub recursive_optional: Option<RecursiveOptionalStruct>,
3582    #[doc(hidden)]
3583    pub __source_breaking: fidl::marker::SourceBreaking,
3584}
3585
3586impl fidl::Persistable for RecursiveOptionalAndTable {}
3587
3588#[derive(Clone, Debug, Default, PartialEq)]
3589pub struct RecursiveTable {
3590    pub s: Option<RecursiveTableOptionalHolder>,
3591    #[doc(hidden)]
3592    pub __source_breaking: fidl::marker::SourceBreaking,
3593}
3594
3595impl fidl::Persistable for RecursiveTable {}
3596
3597#[derive(Clone, Debug, Default, PartialEq)]
3598pub struct Regression10TableV1 {
3599    pub member1: Option<u64>,
3600    #[doc(hidden)]
3601    pub __source_breaking: fidl::marker::SourceBreaking,
3602}
3603
3604impl fidl::Persistable for Regression10TableV1 {}
3605
3606#[derive(Clone, Debug, Default, PartialEq)]
3607pub struct Regression10TableV2 {
3608    pub member1: Option<u64>,
3609    pub member2: Option<u64>,
3610    #[doc(hidden)]
3611    pub __source_breaking: fidl::marker::SourceBreaking,
3612}
3613
3614impl fidl::Persistable for Regression10TableV2 {}
3615
3616#[derive(Clone, Debug, Default, PartialEq)]
3617pub struct Regression10TableV3 {
3618    pub x: Option<i64>,
3619    pub y: Option<i64>,
3620    pub z: Option<i64>,
3621    #[doc(hidden)]
3622    pub __source_breaking: fidl::marker::SourceBreaking,
3623}
3624
3625impl fidl::Persistable for Regression10TableV3 {}
3626
3627#[derive(Clone, Debug, Default, PartialEq)]
3628pub struct ReverseOrdinalTable {
3629    pub z: Option<i64>,
3630    pub y: Option<i64>,
3631    pub x: Option<i64>,
3632    #[doc(hidden)]
3633    pub __source_breaking: fidl::marker::SourceBreaking,
3634}
3635
3636impl fidl::Persistable for ReverseOrdinalTable {}
3637
3638#[derive(Clone, Debug, Default, PartialEq)]
3639pub struct SimpleTable {
3640    pub x: Option<i64>,
3641    pub y: Option<i64>,
3642    #[doc(hidden)]
3643    pub __source_breaking: fidl::marker::SourceBreaking,
3644}
3645
3646impl fidl::Persistable for SimpleTable {}
3647
3648#[derive(Clone, Debug, Default, PartialEq)]
3649pub struct TableFieldInlined {
3650    pub f: Option<i32>,
3651    #[doc(hidden)]
3652    pub __source_breaking: fidl::marker::SourceBreaking,
3653}
3654
3655impl fidl::Persistable for TableFieldInlined {}
3656
3657#[derive(Clone, Debug, Default, PartialEq)]
3658pub struct TableFieldOutOfLine {
3659    pub f: Option<i64>,
3660    #[doc(hidden)]
3661    pub __source_breaking: fidl::marker::SourceBreaking,
3662}
3663
3664impl fidl::Persistable for TableFieldOutOfLine {}
3665
3666#[derive(Clone, Debug, Default, PartialEq)]
3667pub struct TableFieldUnknown {
3668    #[doc(hidden)]
3669    pub __source_breaking: fidl::marker::SourceBreaking,
3670}
3671
3672impl fidl::Persistable for TableFieldUnknown {}
3673
3674#[derive(Clone, Debug, Default, PartialEq)]
3675pub struct TableFieldUnsetFlexibleEnumInlined {
3676    pub signed_enum: Option<SignedEnum>,
3677    pub unsigned_enum: Option<UnsignedEnum>,
3678    pub always_set: Option<bool>,
3679    #[doc(hidden)]
3680    pub __source_breaking: fidl::marker::SourceBreaking,
3681}
3682
3683impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlined {}
3684
3685#[derive(Clone, Debug, Default, PartialEq)]
3686pub struct TableNoFields {
3687    #[doc(hidden)]
3688    pub __source_breaking: fidl::marker::SourceBreaking,
3689}
3690
3691impl fidl::Persistable for TableNoFields {}
3692
3693#[derive(Clone, Debug, Default, PartialEq)]
3694pub struct TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
3695    pub member: Option<UnionOfXUnionThenTableThenXUnionThenUnion>,
3696    #[doc(hidden)]
3697    pub __source_breaking: fidl::marker::SourceBreaking,
3698}
3699
3700impl fidl::Persistable for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {}
3701
3702#[derive(Clone, Debug, Default, PartialEq)]
3703pub struct TableOfXUnionThenUnion {
3704    pub member: Option<XUnionOfUnion>,
3705    #[doc(hidden)]
3706    pub __source_breaking: fidl::marker::SourceBreaking,
3707}
3708
3709impl fidl::Persistable for TableOfXUnionThenUnion {}
3710
3711#[derive(Clone, Debug, Default, PartialEq)]
3712pub struct TableStructWithReservedSandwich {
3713    pub s1: Option<StructSize3Align1>,
3714    pub s2: Option<StructSize3Align1>,
3715    #[doc(hidden)]
3716    pub __source_breaking: fidl::marker::SourceBreaking,
3717}
3718
3719impl fidl::Persistable for TableStructWithReservedSandwich {}
3720
3721#[derive(Clone, Debug, Default, PartialEq)]
3722pub struct TableStructWithUint32Sandwich {
3723    pub i: Option<u32>,
3724    pub s1: Option<StructSize3Align1>,
3725    pub s2: Option<StructSize3Align1>,
3726    pub i2: Option<u32>,
3727    #[doc(hidden)]
3728    pub __source_breaking: fidl::marker::SourceBreaking,
3729}
3730
3731impl fidl::Persistable for TableStructWithUint32Sandwich {}
3732
3733#[derive(Clone, Debug, Default, PartialEq)]
3734pub struct TableWithEmptyStruct {
3735    pub s: Option<EmptyStruct>,
3736    #[doc(hidden)]
3737    pub __source_breaking: fidl::marker::SourceBreaking,
3738}
3739
3740impl fidl::Persistable for TableWithEmptyStruct {}
3741
3742#[derive(Clone, Debug, Default, PartialEq)]
3743pub struct TableWithGaps {
3744    pub second: Option<i32>,
3745    pub fourth: Option<i32>,
3746    #[doc(hidden)]
3747    pub __source_breaking: fidl::marker::SourceBreaking,
3748}
3749
3750impl fidl::Persistable for TableWithGaps {}
3751
3752#[derive(Clone, Debug, Default, PartialEq)]
3753pub struct TableWithReservedFieldThenUnion {
3754    pub uv: Option<UnionSize8Align4>,
3755    #[doc(hidden)]
3756    pub __source_breaking: fidl::marker::SourceBreaking,
3757}
3758
3759impl fidl::Persistable for TableWithReservedFieldThenUnion {}
3760
3761#[derive(Clone, Debug, Default, PartialEq)]
3762pub struct TableWithStringAndVector {
3763    pub foo: Option<String>,
3764    pub bar: Option<i32>,
3765    pub baz: Option<Vec<u8>>,
3766    #[doc(hidden)]
3767    pub __source_breaking: fidl::marker::SourceBreaking,
3768}
3769
3770impl fidl::Persistable for TableWithStringAndVector {}
3771
3772#[derive(Clone, Debug, Default, PartialEq)]
3773pub struct TableWithStringWithLimit {
3774    pub s: Option<String>,
3775    #[doc(hidden)]
3776    pub __source_breaking: fidl::marker::SourceBreaking,
3777}
3778
3779impl fidl::Persistable for TableWithStringWithLimit {}
3780
3781#[derive(Clone, Debug, Default, PartialEq)]
3782pub struct TableWithUnionSize12Align4 {
3783    pub before: Option<u8>,
3784    pub member: Option<UnionSize12Align4>,
3785    pub after: Option<u8>,
3786    #[doc(hidden)]
3787    pub __source_breaking: fidl::marker::SourceBreaking,
3788}
3789
3790impl fidl::Persistable for TableWithUnionSize12Align4 {}
3791
3792#[derive(Clone, Debug, Default, PartialEq)]
3793pub struct TableWithVectorWithLimit {
3794    pub v: Option<Vec<u8>>,
3795    #[doc(hidden)]
3796    pub __source_breaking: fidl::marker::SourceBreaking,
3797}
3798
3799impl fidl::Persistable for TableWithVectorWithLimit {}
3800
3801#[derive(Clone, Debug, Default, PartialEq)]
3802pub struct TableWithXUnion {
3803    pub member: Option<CompatXUnion>,
3804    #[doc(hidden)]
3805    pub __source_breaking: fidl::marker::SourceBreaking,
3806}
3807
3808impl fidl::Persistable for TableWithXUnion {}
3809
3810#[derive(Clone, Debug, Default, PartialEq)]
3811pub struct TransformerSimpleTable {
3812    pub value: Option<u32>,
3813    #[doc(hidden)]
3814    pub __source_breaking: fidl::marker::SourceBreaking,
3815}
3816
3817impl fidl::Persistable for TransformerSimpleTable {}
3818
3819#[derive(Clone, Debug, Default, PartialEq)]
3820pub struct XUnionInTable {
3821    pub before: Option<String>,
3822    pub xu: Option<SampleXUnion>,
3823    pub after: Option<String>,
3824    #[doc(hidden)]
3825    pub __source_breaking: fidl::marker::SourceBreaking,
3826}
3827
3828impl fidl::Persistable for XUnionInTable {}
3829
3830#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3831pub enum CompatUnion {
3832    S(String),
3833    B(bool),
3834}
3835
3836impl CompatUnion {
3837    #[inline]
3838    pub fn ordinal(&self) -> u64 {
3839        match *self {
3840            Self::S(_) => 1,
3841            Self::B(_) => 2,
3842        }
3843    }
3844}
3845
3846impl fidl::Persistable for CompatUnion {}
3847
3848#[derive(Clone, Debug)]
3849pub enum CompatXUnion {
3850    S(String),
3851    B(bool),
3852    #[doc(hidden)]
3853    __SourceBreaking {
3854        unknown_ordinal: u64,
3855    },
3856}
3857
3858/// Pattern that matches an unknown `CompatXUnion` member.
3859#[macro_export]
3860macro_rules! CompatXUnionUnknown {
3861    () => {
3862        _
3863    };
3864}
3865
3866// Custom PartialEq so that unknown variants are not equal to themselves.
3867impl PartialEq for CompatXUnion {
3868    fn eq(&self, other: &Self) -> bool {
3869        match (self, other) {
3870            (Self::S(x), Self::S(y)) => *x == *y,
3871            (Self::B(x), Self::B(y)) => *x == *y,
3872            _ => false,
3873        }
3874    }
3875}
3876
3877impl CompatXUnion {
3878    #[inline]
3879    pub fn ordinal(&self) -> u64 {
3880        match *self {
3881            Self::S(_) => 1,
3882            Self::B(_) => 2,
3883            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3884        }
3885    }
3886
3887    #[inline]
3888    pub fn unknown_variant_for_testing() -> Self {
3889        Self::__SourceBreaking { unknown_ordinal: 0 }
3890    }
3891
3892    #[inline]
3893    pub fn is_unknown(&self) -> bool {
3894        match self {
3895            Self::__SourceBreaking { .. } => true,
3896            _ => false,
3897        }
3898    }
3899}
3900
3901impl fidl::Persistable for CompatXUnion {}
3902
3903#[derive(Clone, Debug)]
3904pub enum EmptyFlexibleUnion {
3905    #[doc(hidden)]
3906    __SourceBreaking { unknown_ordinal: u64 },
3907}
3908
3909/// Pattern that matches an unknown `EmptyFlexibleUnion` member.
3910#[macro_export]
3911macro_rules! EmptyFlexibleUnionUnknown {
3912    () => {
3913        _
3914    };
3915}
3916
3917// Custom PartialEq so that unknown variants are not equal to themselves.
3918impl PartialEq for EmptyFlexibleUnion {
3919    fn eq(&self, other: &Self) -> bool {
3920        match (self, other) {
3921            _ => false,
3922        }
3923    }
3924}
3925
3926impl EmptyFlexibleUnion {
3927    #[inline]
3928    pub fn ordinal(&self) -> u64 {
3929        match *self {
3930            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3931        }
3932    }
3933
3934    #[inline]
3935    pub fn unknown_variant_for_testing() -> Self {
3936        Self::__SourceBreaking { unknown_ordinal: 0 }
3937    }
3938
3939    #[inline]
3940    pub fn is_unknown(&self) -> bool {
3941        match self {
3942            Self::__SourceBreaking { .. } => true,
3943        }
3944    }
3945}
3946
3947impl fidl::Persistable for EmptyFlexibleUnion {}
3948
3949#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3950pub enum EmptyStructUnion {
3951    Unused(u8),
3952    Es(TransformerEmptyStruct),
3953}
3954
3955impl EmptyStructUnion {
3956    #[inline]
3957    pub fn ordinal(&self) -> u64 {
3958        match *self {
3959            Self::Unused(_) => 1,
3960            Self::Es(_) => 2,
3961        }
3962    }
3963}
3964
3965impl fidl::Persistable for EmptyStructUnion {}
3966
3967#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3968pub enum FidlvizUnion {
3969    F7(String),
3970}
3971
3972impl FidlvizUnion {
3973    #[inline]
3974    pub fn ordinal(&self) -> u64 {
3975        match *self {
3976            Self::F7(_) => 7,
3977        }
3978    }
3979}
3980
3981impl fidl::Persistable for FidlvizUnion {}
3982
3983#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3984pub enum GoldenUnion {
3985    V(i16),
3986}
3987
3988impl GoldenUnion {
3989    #[inline]
3990    pub fn ordinal(&self) -> u64 {
3991        match *self {
3992            Self::V(_) => 1,
3993        }
3994    }
3995}
3996
3997impl fidl::Persistable for GoldenUnion {}
3998
3999#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4000pub enum IpAddressConfig {
4001    PaddingSize24Align4([u32; 6]),
4002    Dhcp(bool),
4003}
4004
4005impl IpAddressConfig {
4006    #[inline]
4007    pub fn ordinal(&self) -> u64 {
4008        match *self {
4009            Self::PaddingSize24Align4(_) => 1,
4010            Self::Dhcp(_) => 2,
4011        }
4012    }
4013}
4014
4015impl fidl::Persistable for IpAddressConfig {}
4016
4017#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4018pub enum MutualRecursionUnion {
4019    S(MutualRecursionUnionStruct),
4020}
4021
4022impl MutualRecursionUnion {
4023    #[inline]
4024    pub fn ordinal(&self) -> u64 {
4025        match *self {
4026            Self::S(_) => 1,
4027        }
4028    }
4029}
4030
4031impl fidl::Persistable for MutualRecursionUnion {}
4032
4033#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4034pub enum PaddedUnion {
4035    Field(i8),
4036}
4037
4038impl PaddedUnion {
4039    #[inline]
4040    pub fn ordinal(&self) -> u64 {
4041        match *self {
4042            Self::Field(_) => 1,
4043        }
4044    }
4045}
4046
4047impl fidl::Persistable for PaddedUnion {}
4048
4049#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4050pub enum RecursiveOptionalAndUnion {
4051    RecursiveOptional(RecursiveOptionalStruct),
4052}
4053
4054impl RecursiveOptionalAndUnion {
4055    #[inline]
4056    pub fn ordinal(&self) -> u64 {
4057        match *self {
4058            Self::RecursiveOptional(_) => 1,
4059        }
4060    }
4061}
4062
4063impl fidl::Persistable for RecursiveOptionalAndUnion {}
4064
4065#[derive(Clone, Debug)]
4066pub enum RecursiveUnion {
4067    S(RecursiveUnionStruct),
4068    #[doc(hidden)]
4069    __SourceBreaking {
4070        unknown_ordinal: u64,
4071    },
4072}
4073
4074/// Pattern that matches an unknown `RecursiveUnion` member.
4075#[macro_export]
4076macro_rules! RecursiveUnionUnknown {
4077    () => {
4078        _
4079    };
4080}
4081
4082// Custom PartialEq so that unknown variants are not equal to themselves.
4083impl PartialEq for RecursiveUnion {
4084    fn eq(&self, other: &Self) -> bool {
4085        match (self, other) {
4086            (Self::S(x), Self::S(y)) => *x == *y,
4087            _ => false,
4088        }
4089    }
4090}
4091
4092impl RecursiveUnion {
4093    #[inline]
4094    pub fn ordinal(&self) -> u64 {
4095        match *self {
4096            Self::S(_) => 1,
4097            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4098        }
4099    }
4100
4101    #[inline]
4102    pub fn unknown_variant_for_testing() -> Self {
4103        Self::__SourceBreaking { unknown_ordinal: 0 }
4104    }
4105
4106    #[inline]
4107    pub fn is_unknown(&self) -> bool {
4108        match self {
4109            Self::__SourceBreaking { .. } => true,
4110            _ => false,
4111        }
4112    }
4113}
4114
4115impl fidl::Persistable for RecursiveUnion {}
4116
4117#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4118pub enum RecursiveVectorUnion {
4119    Vec(Vec<Option<Box<RecursiveVectorUnion>>>),
4120}
4121
4122impl RecursiveVectorUnion {
4123    #[inline]
4124    pub fn ordinal(&self) -> u64 {
4125        match *self {
4126            Self::Vec(_) => 1,
4127        }
4128    }
4129}
4130
4131impl fidl::Persistable for RecursiveVectorUnion {}
4132
4133#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4134pub enum Regression9Result {
4135    Ok(Regression9Value),
4136    Error(u32),
4137}
4138
4139impl Regression9Result {
4140    #[inline]
4141    pub fn ordinal(&self) -> u64 {
4142        match *self {
4143            Self::Ok(_) => 1,
4144            Self::Error(_) => 2,
4145        }
4146    }
4147}
4148
4149impl fidl::Persistable for Regression9Result {}
4150
4151#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4152pub enum ReverseOrdinalUnion {
4153    Z(u32),
4154    Y(bool),
4155    X(i64),
4156}
4157
4158impl ReverseOrdinalUnion {
4159    #[inline]
4160    pub fn ordinal(&self) -> u64 {
4161        match *self {
4162            Self::Z(_) => 1,
4163            Self::Y(_) => 2,
4164            Self::X(_) => 4,
4165        }
4166    }
4167}
4168
4169impl fidl::Persistable for ReverseOrdinalUnion {}
4170
4171#[derive(Clone, Debug, PartialEq)]
4172pub enum SampleStrictXUnion {
4173    U(u32),
4174    Su(SimpleUnion),
4175    St(SimpleTable),
4176}
4177
4178impl SampleStrictXUnion {
4179    #[inline]
4180    pub fn ordinal(&self) -> u64 {
4181        match *self {
4182            Self::U(_) => 1,
4183            Self::Su(_) => 2,
4184            Self::St(_) => 3,
4185        }
4186    }
4187}
4188
4189impl fidl::Persistable for SampleStrictXUnion {}
4190
4191#[derive(Clone, Debug)]
4192pub enum SampleXUnion {
4193    U(u32),
4194    Su(SimpleUnion),
4195    St(SimpleTable),
4196    #[doc(hidden)]
4197    __SourceBreaking {
4198        unknown_ordinal: u64,
4199    },
4200}
4201
4202/// Pattern that matches an unknown `SampleXUnion` member.
4203#[macro_export]
4204macro_rules! SampleXUnionUnknown {
4205    () => {
4206        _
4207    };
4208}
4209
4210// Custom PartialEq so that unknown variants are not equal to themselves.
4211impl PartialEq for SampleXUnion {
4212    fn eq(&self, other: &Self) -> bool {
4213        match (self, other) {
4214            (Self::U(x), Self::U(y)) => *x == *y,
4215            (Self::Su(x), Self::Su(y)) => *x == *y,
4216            (Self::St(x), Self::St(y)) => *x == *y,
4217            _ => false,
4218        }
4219    }
4220}
4221
4222impl SampleXUnion {
4223    #[inline]
4224    pub fn ordinal(&self) -> u64 {
4225        match *self {
4226            Self::U(_) => 1,
4227            Self::Su(_) => 2,
4228            Self::St(_) => 3,
4229            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4230        }
4231    }
4232
4233    #[inline]
4234    pub fn unknown_variant_for_testing() -> Self {
4235        Self::__SourceBreaking { unknown_ordinal: 0 }
4236    }
4237
4238    #[inline]
4239    pub fn is_unknown(&self) -> bool {
4240        match self {
4241            Self::__SourceBreaking { .. } => true,
4242            _ => false,
4243        }
4244    }
4245}
4246
4247impl fidl::Persistable for SampleXUnion {}
4248
4249#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4250pub enum SimpleUnion {
4251    I32(i32),
4252    I64(i64),
4253    S(Int64Struct),
4254    Str(String),
4255}
4256
4257impl SimpleUnion {
4258    #[inline]
4259    pub fn ordinal(&self) -> u64 {
4260        match *self {
4261            Self::I32(_) => 1,
4262            Self::I64(_) => 2,
4263            Self::S(_) => 3,
4264            Self::Str(_) => 4,
4265        }
4266    }
4267}
4268
4269impl fidl::Persistable for SimpleUnion {}
4270
4271#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4272pub enum SingleVariantUnion {
4273    X(u32),
4274}
4275
4276impl SingleVariantUnion {
4277    #[inline]
4278    pub fn ordinal(&self) -> u64 {
4279        match *self {
4280            Self::X(_) => 1,
4281        }
4282    }
4283}
4284
4285impl fidl::Persistable for SingleVariantUnion {}
4286
4287#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4288pub enum StringBoolUnion {
4289    S(String),
4290    B(bool),
4291}
4292
4293impl StringBoolUnion {
4294    #[inline]
4295    pub fn ordinal(&self) -> u64 {
4296        match *self {
4297            Self::S(_) => 1,
4298            Self::B(_) => 2,
4299        }
4300    }
4301}
4302
4303impl fidl::Persistable for StringBoolUnion {}
4304
4305#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4306pub enum StringUnion {
4307    Unused(u8),
4308    S(String),
4309    U8(u8),
4310}
4311
4312impl StringUnion {
4313    #[inline]
4314    pub fn ordinal(&self) -> u64 {
4315        match *self {
4316            Self::Unused(_) => 1,
4317            Self::S(_) => 2,
4318            Self::U8(_) => 3,
4319        }
4320    }
4321}
4322
4323impl fidl::Persistable for StringUnion {}
4324
4325#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4326pub enum Uint8Union {
4327    Uint8Value(u8),
4328    EmptyStruct(EmptyStruct),
4329}
4330
4331impl Uint8Union {
4332    #[inline]
4333    pub fn ordinal(&self) -> u64 {
4334        match *self {
4335            Self::Uint8Value(_) => 1,
4336            Self::EmptyStruct(_) => 2,
4337        }
4338    }
4339}
4340
4341impl fidl::Persistable for Uint8Union {}
4342
4343#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4344pub enum UnionAtTheBottom {
4345    Unused1(u8),
4346    Unused2(u8),
4347    Tiny(u8),
4348}
4349
4350impl UnionAtTheBottom {
4351    #[inline]
4352    pub fn ordinal(&self) -> u64 {
4353        match *self {
4354            Self::Unused1(_) => 1,
4355            Self::Unused2(_) => 2,
4356            Self::Tiny(_) => 3,
4357        }
4358    }
4359}
4360
4361impl fidl::Persistable for UnionAtTheBottom {}
4362
4363#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4364pub enum UnionInlinePadding {
4365    ThreePaddingBytes(u8),
4366    TwoPaddingBytes(u16),
4367    OnePaddingByte([u8; 3]),
4368}
4369
4370impl UnionInlinePadding {
4371    #[inline]
4372    pub fn ordinal(&self) -> u64 {
4373        match *self {
4374            Self::ThreePaddingBytes(_) => 1,
4375            Self::TwoPaddingBytes(_) => 2,
4376            Self::OnePaddingByte(_) => 3,
4377        }
4378    }
4379}
4380
4381impl fidl::Persistable for UnionInlinePadding {}
4382
4383#[derive(Clone, Debug, PartialEq)]
4384pub enum UnionOfTable {
4385    T(SimpleTable),
4386}
4387
4388impl UnionOfTable {
4389    #[inline]
4390    pub fn ordinal(&self) -> u64 {
4391        match *self {
4392            Self::T(_) => 1,
4393        }
4394    }
4395}
4396
4397impl fidl::Persistable for UnionOfTable {}
4398
4399#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4400pub enum UnionOfUnion {
4401    Unused1(u8),
4402    Size8align4(UnionSize8Align4),
4403    Size12align4(UnionSize12Align4),
4404    Unused2(u8),
4405    Size24align8(UnionSize24Align8),
4406}
4407
4408impl UnionOfUnion {
4409    #[inline]
4410    pub fn ordinal(&self) -> u64 {
4411        match *self {
4412            Self::Unused1(_) => 1,
4413            Self::Size8align4(_) => 2,
4414            Self::Size12align4(_) => 3,
4415            Self::Unused2(_) => 4,
4416            Self::Size24align8(_) => 5,
4417        }
4418    }
4419}
4420
4421impl fidl::Persistable for UnionOfUnion {}
4422
4423#[derive(Clone, Debug, PartialEq)]
4424pub enum UnionOfXUnionThenTableThenXUnionThenUnion {
4425    Unused1(u8),
4426    Variant(XUnionOfTableThenXUnionThenUnion),
4427}
4428
4429impl UnionOfXUnionThenTableThenXUnionThenUnion {
4430    #[inline]
4431    pub fn ordinal(&self) -> u64 {
4432        match *self {
4433            Self::Unused1(_) => 1,
4434            Self::Variant(_) => 3,
4435        }
4436    }
4437}
4438
4439impl fidl::Persistable for UnionOfXUnionThenTableThenXUnionThenUnion {}
4440
4441#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4442pub enum UnionSize12Align4 {
4443    Unused1(u8),
4444    Unused2(u8),
4445    Unused3(u8),
4446    Variant([u8; 6]),
4447}
4448
4449impl UnionSize12Align4 {
4450    #[inline]
4451    pub fn ordinal(&self) -> u64 {
4452        match *self {
4453            Self::Unused1(_) => 1,
4454            Self::Unused2(_) => 2,
4455            Self::Unused3(_) => 3,
4456            Self::Variant(_) => 4,
4457        }
4458    }
4459}
4460
4461impl fidl::Persistable for UnionSize12Align4 {}
4462
4463#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4464pub enum UnionSize24Align8 {
4465    Unused1(u8),
4466    Unused2(u8),
4467    Unused3(u8),
4468    Variant(StructSize16Align8),
4469}
4470
4471impl UnionSize24Align8 {
4472    #[inline]
4473    pub fn ordinal(&self) -> u64 {
4474        match *self {
4475            Self::Unused1(_) => 1,
4476            Self::Unused2(_) => 2,
4477            Self::Unused3(_) => 3,
4478            Self::Variant(_) => 4,
4479        }
4480    }
4481}
4482
4483impl fidl::Persistable for UnionSize24Align8 {}
4484
4485#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4486pub enum UnionSize36Align4 {
4487    Unused1(u8),
4488    Unused2(u8),
4489    Unused3(u8),
4490    Variant([u8; 32]),
4491}
4492
4493impl UnionSize36Align4 {
4494    #[inline]
4495    pub fn ordinal(&self) -> u64 {
4496        match *self {
4497            Self::Unused1(_) => 1,
4498            Self::Unused2(_) => 2,
4499            Self::Unused3(_) => 3,
4500            Self::Variant(_) => 4,
4501        }
4502    }
4503}
4504
4505impl fidl::Persistable for UnionSize36Align4 {}
4506
4507#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4508pub enum UnionSize8Align4 {
4509    Unused1(u8),
4510    Unused2(u8),
4511    Variant(u32),
4512}
4513
4514impl UnionSize8Align4 {
4515    #[inline]
4516    pub fn ordinal(&self) -> u64 {
4517        match *self {
4518            Self::Unused1(_) => 1,
4519            Self::Unused2(_) => 2,
4520            Self::Variant(_) => 3,
4521        }
4522    }
4523}
4524
4525impl fidl::Persistable for UnionSize8Align4 {}
4526
4527#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4528pub enum UnionWithBoundString {
4529    BoundFiveStr(String),
4530}
4531
4532impl UnionWithBoundString {
4533    #[inline]
4534    pub fn ordinal(&self) -> u64 {
4535        match *self {
4536            Self::BoundFiveStr(_) => 1,
4537        }
4538    }
4539}
4540
4541impl fidl::Persistable for UnionWithBoundString {}
4542
4543#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4544pub enum UnionWithEmptyStruct {
4545    S(EmptyStruct),
4546    ForceAlignmentOf8(u64),
4547}
4548
4549impl UnionWithEmptyStruct {
4550    #[inline]
4551    pub fn ordinal(&self) -> u64 {
4552        match *self {
4553            Self::S(_) => 1,
4554            Self::ForceAlignmentOf8(_) => 2,
4555        }
4556    }
4557}
4558
4559impl fidl::Persistable for UnionWithEmptyStruct {}
4560
4561#[derive(Clone, Debug, PartialEq)]
4562pub enum UnionWithRegression10Table {
4563    Unused(u8),
4564    AtV2(Regression10TableV2),
4565}
4566
4567impl UnionWithRegression10Table {
4568    #[inline]
4569    pub fn ordinal(&self) -> u64 {
4570        match *self {
4571            Self::Unused(_) => 1,
4572            Self::AtV2(_) => 3,
4573        }
4574    }
4575}
4576
4577impl fidl::Persistable for UnionWithRegression10Table {}
4578
4579#[derive(Clone, Debug)]
4580pub enum UnionWithStringWithLimit {
4581    S(String),
4582    #[doc(hidden)]
4583    __SourceBreaking {
4584        unknown_ordinal: u64,
4585    },
4586}
4587
4588/// Pattern that matches an unknown `UnionWithStringWithLimit` member.
4589#[macro_export]
4590macro_rules! UnionWithStringWithLimitUnknown {
4591    () => {
4592        _
4593    };
4594}
4595
4596// Custom PartialEq so that unknown variants are not equal to themselves.
4597impl PartialEq for UnionWithStringWithLimit {
4598    fn eq(&self, other: &Self) -> bool {
4599        match (self, other) {
4600            (Self::S(x), Self::S(y)) => *x == *y,
4601            _ => false,
4602        }
4603    }
4604}
4605
4606impl UnionWithStringWithLimit {
4607    #[inline]
4608    pub fn ordinal(&self) -> u64 {
4609        match *self {
4610            Self::S(_) => 1,
4611            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4612        }
4613    }
4614
4615    #[inline]
4616    pub fn unknown_variant_for_testing() -> Self {
4617        Self::__SourceBreaking { unknown_ordinal: 0 }
4618    }
4619
4620    #[inline]
4621    pub fn is_unknown(&self) -> bool {
4622        match self {
4623            Self::__SourceBreaking { .. } => true,
4624            _ => false,
4625        }
4626    }
4627}
4628
4629impl fidl::Persistable for UnionWithStringWithLimit {}
4630
4631#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4632pub enum UnionWithVectorOfVectors {
4633    V(Vec<Vec<Option<Box<StructSize3Align1>>>>),
4634}
4635
4636impl UnionWithVectorOfVectors {
4637    #[inline]
4638    pub fn ordinal(&self) -> u64 {
4639        match *self {
4640            Self::V(_) => 1,
4641        }
4642    }
4643}
4644
4645impl fidl::Persistable for UnionWithVectorOfVectors {}
4646
4647#[derive(Clone, Debug)]
4648pub enum UnionWithVectorWithLimit {
4649    V(Vec<u8>),
4650    #[doc(hidden)]
4651    __SourceBreaking {
4652        unknown_ordinal: u64,
4653    },
4654}
4655
4656/// Pattern that matches an unknown `UnionWithVectorWithLimit` member.
4657#[macro_export]
4658macro_rules! UnionWithVectorWithLimitUnknown {
4659    () => {
4660        _
4661    };
4662}
4663
4664// Custom PartialEq so that unknown variants are not equal to themselves.
4665impl PartialEq for UnionWithVectorWithLimit {
4666    fn eq(&self, other: &Self) -> bool {
4667        match (self, other) {
4668            (Self::V(x), Self::V(y)) => *x == *y,
4669            _ => false,
4670        }
4671    }
4672}
4673
4674impl UnionWithVectorWithLimit {
4675    #[inline]
4676    pub fn ordinal(&self) -> u64 {
4677        match *self {
4678            Self::V(_) => 1,
4679            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4680        }
4681    }
4682
4683    #[inline]
4684    pub fn unknown_variant_for_testing() -> Self {
4685        Self::__SourceBreaking { unknown_ordinal: 0 }
4686    }
4687
4688    #[inline]
4689    pub fn is_unknown(&self) -> bool {
4690        match self {
4691            Self::__SourceBreaking { .. } => true,
4692            _ => false,
4693        }
4694    }
4695}
4696
4697impl fidl::Persistable for UnionWithVectorWithLimit {}
4698
4699#[derive(Clone, Debug)]
4700pub enum XUnionOfTableThenXUnionThenUnion {
4701    Variant(TableOfXUnionThenUnion),
4702    #[doc(hidden)]
4703    __SourceBreaking {
4704        unknown_ordinal: u64,
4705    },
4706}
4707
4708/// Pattern that matches an unknown `XUnionOfTableThenXUnionThenUnion` member.
4709#[macro_export]
4710macro_rules! XUnionOfTableThenXUnionThenUnionUnknown {
4711    () => {
4712        _
4713    };
4714}
4715
4716// Custom PartialEq so that unknown variants are not equal to themselves.
4717impl PartialEq for XUnionOfTableThenXUnionThenUnion {
4718    fn eq(&self, other: &Self) -> bool {
4719        match (self, other) {
4720            (Self::Variant(x), Self::Variant(y)) => *x == *y,
4721            _ => false,
4722        }
4723    }
4724}
4725
4726impl XUnionOfTableThenXUnionThenUnion {
4727    #[inline]
4728    pub fn ordinal(&self) -> u64 {
4729        match *self {
4730            Self::Variant(_) => 1,
4731            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4732        }
4733    }
4734
4735    #[inline]
4736    pub fn unknown_variant_for_testing() -> Self {
4737        Self::__SourceBreaking { unknown_ordinal: 0 }
4738    }
4739
4740    #[inline]
4741    pub fn is_unknown(&self) -> bool {
4742        match self {
4743            Self::__SourceBreaking { .. } => true,
4744            _ => false,
4745        }
4746    }
4747}
4748
4749impl fidl::Persistable for XUnionOfTableThenXUnionThenUnion {}
4750
4751#[derive(Clone, Debug)]
4752pub enum XUnionOfUnion {
4753    Variant(UnionAtTheBottom),
4754    #[doc(hidden)]
4755    __SourceBreaking {
4756        unknown_ordinal: u64,
4757    },
4758}
4759
4760/// Pattern that matches an unknown `XUnionOfUnion` member.
4761#[macro_export]
4762macro_rules! XUnionOfUnionUnknown {
4763    () => {
4764        _
4765    };
4766}
4767
4768// Custom PartialEq so that unknown variants are not equal to themselves.
4769impl PartialEq for XUnionOfUnion {
4770    fn eq(&self, other: &Self) -> bool {
4771        match (self, other) {
4772            (Self::Variant(x), Self::Variant(y)) => *x == *y,
4773            _ => false,
4774        }
4775    }
4776}
4777
4778impl XUnionOfUnion {
4779    #[inline]
4780    pub fn ordinal(&self) -> u64 {
4781        match *self {
4782            Self::Variant(_) => 1,
4783            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4784        }
4785    }
4786
4787    #[inline]
4788    pub fn unknown_variant_for_testing() -> Self {
4789        Self::__SourceBreaking { unknown_ordinal: 0 }
4790    }
4791
4792    #[inline]
4793    pub fn is_unknown(&self) -> bool {
4794        match self {
4795            Self::__SourceBreaking { .. } => true,
4796            _ => false,
4797        }
4798    }
4799}
4800
4801impl fidl::Persistable for XUnionOfUnion {}
4802
4803#[derive(Clone, Debug)]
4804pub enum XUnionWithEmptyStruct {
4805    S(EmptyStruct),
4806    #[doc(hidden)]
4807    __SourceBreaking {
4808        unknown_ordinal: u64,
4809    },
4810}
4811
4812/// Pattern that matches an unknown `XUnionWithEmptyStruct` member.
4813#[macro_export]
4814macro_rules! XUnionWithEmptyStructUnknown {
4815    () => {
4816        _
4817    };
4818}
4819
4820// Custom PartialEq so that unknown variants are not equal to themselves.
4821impl PartialEq for XUnionWithEmptyStruct {
4822    fn eq(&self, other: &Self) -> bool {
4823        match (self, other) {
4824            (Self::S(x), Self::S(y)) => *x == *y,
4825            _ => false,
4826        }
4827    }
4828}
4829
4830impl XUnionWithEmptyStruct {
4831    #[inline]
4832    pub fn ordinal(&self) -> u64 {
4833        match *self {
4834            Self::S(_) => 1,
4835            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4836        }
4837    }
4838
4839    #[inline]
4840    pub fn unknown_variant_for_testing() -> Self {
4841        Self::__SourceBreaking { unknown_ordinal: 0 }
4842    }
4843
4844    #[inline]
4845    pub fn is_unknown(&self) -> bool {
4846        match self {
4847            Self::__SourceBreaking { .. } => true,
4848            _ => false,
4849        }
4850    }
4851}
4852
4853impl fidl::Persistable for XUnionWithEmptyStruct {}
4854
4855#[derive(Clone, Debug)]
4856pub enum XUnionWithStruct {
4857    S(StructSize3Align1),
4858    #[doc(hidden)]
4859    __SourceBreaking {
4860        unknown_ordinal: u64,
4861    },
4862}
4863
4864/// Pattern that matches an unknown `XUnionWithStruct` member.
4865#[macro_export]
4866macro_rules! XUnionWithStructUnknown {
4867    () => {
4868        _
4869    };
4870}
4871
4872// Custom PartialEq so that unknown variants are not equal to themselves.
4873impl PartialEq for XUnionWithStruct {
4874    fn eq(&self, other: &Self) -> bool {
4875        match (self, other) {
4876            (Self::S(x), Self::S(y)) => *x == *y,
4877            _ => false,
4878        }
4879    }
4880}
4881
4882impl XUnionWithStruct {
4883    #[inline]
4884    pub fn ordinal(&self) -> u64 {
4885        match *self {
4886            Self::S(_) => 1,
4887            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4888        }
4889    }
4890
4891    #[inline]
4892    pub fn unknown_variant_for_testing() -> Self {
4893        Self::__SourceBreaking { unknown_ordinal: 0 }
4894    }
4895
4896    #[inline]
4897    pub fn is_unknown(&self) -> bool {
4898        match self {
4899            Self::__SourceBreaking { .. } => true,
4900            _ => false,
4901        }
4902    }
4903}
4904
4905impl fidl::Persistable for XUnionWithStruct {}
4906
4907#[derive(Clone, Debug)]
4908pub enum XUnionWithUnions {
4909    U1(UnionSize8Align4),
4910    U2(UnionSize12Align4),
4911    #[doc(hidden)]
4912    __SourceBreaking {
4913        unknown_ordinal: u64,
4914    },
4915}
4916
4917/// Pattern that matches an unknown `XUnionWithUnions` member.
4918#[macro_export]
4919macro_rules! XUnionWithUnionsUnknown {
4920    () => {
4921        _
4922    };
4923}
4924
4925// Custom PartialEq so that unknown variants are not equal to themselves.
4926impl PartialEq for XUnionWithUnions {
4927    fn eq(&self, other: &Self) -> bool {
4928        match (self, other) {
4929            (Self::U1(x), Self::U1(y)) => *x == *y,
4930            (Self::U2(x), Self::U2(y)) => *x == *y,
4931            _ => false,
4932        }
4933    }
4934}
4935
4936impl XUnionWithUnions {
4937    #[inline]
4938    pub fn ordinal(&self) -> u64 {
4939        match *self {
4940            Self::U1(_) => 1,
4941            Self::U2(_) => 2,
4942            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4943        }
4944    }
4945
4946    #[inline]
4947    pub fn unknown_variant_for_testing() -> Self {
4948        Self::__SourceBreaking { unknown_ordinal: 0 }
4949    }
4950
4951    #[inline]
4952    pub fn is_unknown(&self) -> bool {
4953        match self {
4954            Self::__SourceBreaking { .. } => true,
4955            _ => false,
4956        }
4957    }
4958}
4959
4960impl fidl::Persistable for XUnionWithUnions {}
4961
4962#[derive(Clone, Debug)]
4963pub enum XUnionWithXUnion {
4964    Xu(XUnionWithStruct),
4965    #[doc(hidden)]
4966    __SourceBreaking {
4967        unknown_ordinal: u64,
4968    },
4969}
4970
4971/// Pattern that matches an unknown `XUnionWithXUnion` member.
4972#[macro_export]
4973macro_rules! XUnionWithXUnionUnknown {
4974    () => {
4975        _
4976    };
4977}
4978
4979// Custom PartialEq so that unknown variants are not equal to themselves.
4980impl PartialEq for XUnionWithXUnion {
4981    fn eq(&self, other: &Self) -> bool {
4982        match (self, other) {
4983            (Self::Xu(x), Self::Xu(y)) => *x == *y,
4984            _ => false,
4985        }
4986    }
4987}
4988
4989impl XUnionWithXUnion {
4990    #[inline]
4991    pub fn ordinal(&self) -> u64 {
4992        match *self {
4993            Self::Xu(_) => 1,
4994            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4995        }
4996    }
4997
4998    #[inline]
4999    pub fn unknown_variant_for_testing() -> Self {
5000        Self::__SourceBreaking { unknown_ordinal: 0 }
5001    }
5002
5003    #[inline]
5004    pub fn is_unknown(&self) -> bool {
5005        match self {
5006            Self::__SourceBreaking { .. } => true,
5007            _ => false,
5008        }
5009    }
5010}
5011
5012impl fidl::Persistable for XUnionWithXUnion {}
5013
5014pub mod component_controller_ordinals {}
5015
5016pub mod protocol_ordinals {}
5017
5018mod internal {
5019    use super::*;
5020    unsafe impl fidl::encoding::TypeMarker for BitsUint32 {
5021        type Owned = Self;
5022
5023        #[inline(always)]
5024        fn inline_align(_context: fidl::encoding::Context) -> usize {
5025            4
5026        }
5027
5028        #[inline(always)]
5029        fn inline_size(_context: fidl::encoding::Context) -> usize {
5030            4
5031        }
5032    }
5033
5034    impl fidl::encoding::ValueTypeMarker for BitsUint32 {
5035        type Borrowed<'a> = Self;
5036        #[inline(always)]
5037        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5038            *value
5039        }
5040    }
5041
5042    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint32 {
5043        #[inline]
5044        unsafe fn encode(
5045            self,
5046            encoder: &mut fidl::encoding::Encoder<'_, D>,
5047            offset: usize,
5048            _depth: fidl::encoding::Depth,
5049        ) -> fidl::Result<()> {
5050            encoder.debug_check_bounds::<Self>(offset);
5051            if self.bits() & Self::all().bits() != self.bits() {
5052                return Err(fidl::Error::InvalidBitsValue);
5053            }
5054            encoder.write_num(self.bits(), offset);
5055            Ok(())
5056        }
5057    }
5058
5059    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint32 {
5060        #[inline(always)]
5061        fn new_empty() -> Self {
5062            Self::empty()
5063        }
5064
5065        #[inline]
5066        unsafe fn decode(
5067            &mut self,
5068            decoder: &mut fidl::encoding::Decoder<'_, D>,
5069            offset: usize,
5070            _depth: fidl::encoding::Depth,
5071        ) -> fidl::Result<()> {
5072            decoder.debug_check_bounds::<Self>(offset);
5073            let prim = decoder.read_num::<u32>(offset);
5074            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5075            Ok(())
5076        }
5077    }
5078    unsafe impl fidl::encoding::TypeMarker for BitsUint8 {
5079        type Owned = Self;
5080
5081        #[inline(always)]
5082        fn inline_align(_context: fidl::encoding::Context) -> usize {
5083            1
5084        }
5085
5086        #[inline(always)]
5087        fn inline_size(_context: fidl::encoding::Context) -> usize {
5088            1
5089        }
5090    }
5091
5092    impl fidl::encoding::ValueTypeMarker for BitsUint8 {
5093        type Borrowed<'a> = Self;
5094        #[inline(always)]
5095        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5096            *value
5097        }
5098    }
5099
5100    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint8 {
5101        #[inline]
5102        unsafe fn encode(
5103            self,
5104            encoder: &mut fidl::encoding::Encoder<'_, D>,
5105            offset: usize,
5106            _depth: fidl::encoding::Depth,
5107        ) -> fidl::Result<()> {
5108            encoder.debug_check_bounds::<Self>(offset);
5109            if self.bits() & Self::all().bits() != self.bits() {
5110                return Err(fidl::Error::InvalidBitsValue);
5111            }
5112            encoder.write_num(self.bits(), offset);
5113            Ok(())
5114        }
5115    }
5116
5117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint8 {
5118        #[inline(always)]
5119        fn new_empty() -> Self {
5120            Self::empty()
5121        }
5122
5123        #[inline]
5124        unsafe fn decode(
5125            &mut self,
5126            decoder: &mut fidl::encoding::Decoder<'_, D>,
5127            offset: usize,
5128            _depth: fidl::encoding::Depth,
5129        ) -> fidl::Result<()> {
5130            decoder.debug_check_bounds::<Self>(offset);
5131            let prim = decoder.read_num::<u8>(offset);
5132            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5133            Ok(())
5134        }
5135    }
5136    unsafe impl fidl::encoding::TypeMarker for EmptyBits {
5137        type Owned = Self;
5138
5139        #[inline(always)]
5140        fn inline_align(_context: fidl::encoding::Context) -> usize {
5141            4
5142        }
5143
5144        #[inline(always)]
5145        fn inline_size(_context: fidl::encoding::Context) -> usize {
5146            4
5147        }
5148    }
5149
5150    impl fidl::encoding::ValueTypeMarker for EmptyBits {
5151        type Borrowed<'a> = Self;
5152        #[inline(always)]
5153        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5154            *value
5155        }
5156    }
5157
5158    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyBits {
5159        #[inline]
5160        unsafe fn encode(
5161            self,
5162            encoder: &mut fidl::encoding::Encoder<'_, D>,
5163            offset: usize,
5164            _depth: fidl::encoding::Depth,
5165        ) -> fidl::Result<()> {
5166            encoder.debug_check_bounds::<Self>(offset);
5167            encoder.write_num(self.bits(), offset);
5168            Ok(())
5169        }
5170    }
5171
5172    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBits {
5173        #[inline(always)]
5174        fn new_empty() -> Self {
5175            Self::empty()
5176        }
5177
5178        #[inline]
5179        unsafe fn decode(
5180            &mut self,
5181            decoder: &mut fidl::encoding::Decoder<'_, D>,
5182            offset: usize,
5183            _depth: fidl::encoding::Depth,
5184        ) -> fidl::Result<()> {
5185            decoder.debug_check_bounds::<Self>(offset);
5186            let prim = decoder.read_num::<u32>(offset);
5187            *self = Self::from_bits_allow_unknown(prim);
5188            Ok(())
5189        }
5190    }
5191    unsafe impl fidl::encoding::TypeMarker for FidlvizBits {
5192        type Owned = Self;
5193
5194        #[inline(always)]
5195        fn inline_align(_context: fidl::encoding::Context) -> usize {
5196            1
5197        }
5198
5199        #[inline(always)]
5200        fn inline_size(_context: fidl::encoding::Context) -> usize {
5201            1
5202        }
5203    }
5204
5205    impl fidl::encoding::ValueTypeMarker for FidlvizBits {
5206        type Borrowed<'a> = Self;
5207        #[inline(always)]
5208        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5209            *value
5210        }
5211    }
5212
5213    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizBits {
5214        #[inline]
5215        unsafe fn encode(
5216            self,
5217            encoder: &mut fidl::encoding::Encoder<'_, D>,
5218            offset: usize,
5219            _depth: fidl::encoding::Depth,
5220        ) -> fidl::Result<()> {
5221            encoder.debug_check_bounds::<Self>(offset);
5222            if self.bits() & Self::all().bits() != self.bits() {
5223                return Err(fidl::Error::InvalidBitsValue);
5224            }
5225            encoder.write_num(self.bits(), offset);
5226            Ok(())
5227        }
5228    }
5229
5230    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizBits {
5231        #[inline(always)]
5232        fn new_empty() -> Self {
5233            Self::empty()
5234        }
5235
5236        #[inline]
5237        unsafe fn decode(
5238            &mut self,
5239            decoder: &mut fidl::encoding::Decoder<'_, D>,
5240            offset: usize,
5241            _depth: fidl::encoding::Depth,
5242        ) -> fidl::Result<()> {
5243            decoder.debug_check_bounds::<Self>(offset);
5244            let prim = decoder.read_num::<u8>(offset);
5245            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5246            Ok(())
5247        }
5248    }
5249    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16 {
5250        type Owned = Self;
5251
5252        #[inline(always)]
5253        fn inline_align(_context: fidl::encoding::Context) -> usize {
5254            2
5255        }
5256
5257        #[inline(always)]
5258        fn inline_size(_context: fidl::encoding::Context) -> usize {
5259            2
5260        }
5261    }
5262
5263    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16 {
5264        type Borrowed<'a> = Self;
5265        #[inline(always)]
5266        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5267            *value
5268        }
5269    }
5270
5271    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5272        for FlexibleBitsUint16
5273    {
5274        #[inline]
5275        unsafe fn encode(
5276            self,
5277            encoder: &mut fidl::encoding::Encoder<'_, D>,
5278            offset: usize,
5279            _depth: fidl::encoding::Depth,
5280        ) -> fidl::Result<()> {
5281            encoder.debug_check_bounds::<Self>(offset);
5282            encoder.write_num(self.bits(), offset);
5283            Ok(())
5284        }
5285    }
5286
5287    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint16 {
5288        #[inline(always)]
5289        fn new_empty() -> Self {
5290            Self::empty()
5291        }
5292
5293        #[inline]
5294        unsafe fn decode(
5295            &mut self,
5296            decoder: &mut fidl::encoding::Decoder<'_, D>,
5297            offset: usize,
5298            _depth: fidl::encoding::Depth,
5299        ) -> fidl::Result<()> {
5300            decoder.debug_check_bounds::<Self>(offset);
5301            let prim = decoder.read_num::<u16>(offset);
5302            *self = Self::from_bits_allow_unknown(prim);
5303            Ok(())
5304        }
5305    }
5306    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32 {
5307        type Owned = Self;
5308
5309        #[inline(always)]
5310        fn inline_align(_context: fidl::encoding::Context) -> usize {
5311            4
5312        }
5313
5314        #[inline(always)]
5315        fn inline_size(_context: fidl::encoding::Context) -> usize {
5316            4
5317        }
5318    }
5319
5320    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32 {
5321        type Borrowed<'a> = Self;
5322        #[inline(always)]
5323        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5324            *value
5325        }
5326    }
5327
5328    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5329        for FlexibleBitsUint32
5330    {
5331        #[inline]
5332        unsafe fn encode(
5333            self,
5334            encoder: &mut fidl::encoding::Encoder<'_, D>,
5335            offset: usize,
5336            _depth: fidl::encoding::Depth,
5337        ) -> fidl::Result<()> {
5338            encoder.debug_check_bounds::<Self>(offset);
5339            encoder.write_num(self.bits(), offset);
5340            Ok(())
5341        }
5342    }
5343
5344    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint32 {
5345        #[inline(always)]
5346        fn new_empty() -> Self {
5347            Self::empty()
5348        }
5349
5350        #[inline]
5351        unsafe fn decode(
5352            &mut self,
5353            decoder: &mut fidl::encoding::Decoder<'_, D>,
5354            offset: usize,
5355            _depth: fidl::encoding::Depth,
5356        ) -> fidl::Result<()> {
5357            decoder.debug_check_bounds::<Self>(offset);
5358            let prim = decoder.read_num::<u32>(offset);
5359            *self = Self::from_bits_allow_unknown(prim);
5360            Ok(())
5361        }
5362    }
5363    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64 {
5364        type Owned = Self;
5365
5366        #[inline(always)]
5367        fn inline_align(_context: fidl::encoding::Context) -> usize {
5368            8
5369        }
5370
5371        #[inline(always)]
5372        fn inline_size(_context: fidl::encoding::Context) -> usize {
5373            8
5374        }
5375    }
5376
5377    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64 {
5378        type Borrowed<'a> = Self;
5379        #[inline(always)]
5380        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5381            *value
5382        }
5383    }
5384
5385    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5386        for FlexibleBitsUint64
5387    {
5388        #[inline]
5389        unsafe fn encode(
5390            self,
5391            encoder: &mut fidl::encoding::Encoder<'_, D>,
5392            offset: usize,
5393            _depth: fidl::encoding::Depth,
5394        ) -> fidl::Result<()> {
5395            encoder.debug_check_bounds::<Self>(offset);
5396            encoder.write_num(self.bits(), offset);
5397            Ok(())
5398        }
5399    }
5400
5401    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint64 {
5402        #[inline(always)]
5403        fn new_empty() -> Self {
5404            Self::empty()
5405        }
5406
5407        #[inline]
5408        unsafe fn decode(
5409            &mut self,
5410            decoder: &mut fidl::encoding::Decoder<'_, D>,
5411            offset: usize,
5412            _depth: fidl::encoding::Depth,
5413        ) -> fidl::Result<()> {
5414            decoder.debug_check_bounds::<Self>(offset);
5415            let prim = decoder.read_num::<u64>(offset);
5416            *self = Self::from_bits_allow_unknown(prim);
5417            Ok(())
5418        }
5419    }
5420    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8 {
5421        type Owned = Self;
5422
5423        #[inline(always)]
5424        fn inline_align(_context: fidl::encoding::Context) -> usize {
5425            1
5426        }
5427
5428        #[inline(always)]
5429        fn inline_size(_context: fidl::encoding::Context) -> usize {
5430            1
5431        }
5432    }
5433
5434    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8 {
5435        type Borrowed<'a> = Self;
5436        #[inline(always)]
5437        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5438            *value
5439        }
5440    }
5441
5442    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5443        for FlexibleBitsUint8
5444    {
5445        #[inline]
5446        unsafe fn encode(
5447            self,
5448            encoder: &mut fidl::encoding::Encoder<'_, D>,
5449            offset: usize,
5450            _depth: fidl::encoding::Depth,
5451        ) -> fidl::Result<()> {
5452            encoder.debug_check_bounds::<Self>(offset);
5453            encoder.write_num(self.bits(), offset);
5454            Ok(())
5455        }
5456    }
5457
5458    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint8 {
5459        #[inline(always)]
5460        fn new_empty() -> Self {
5461            Self::empty()
5462        }
5463
5464        #[inline]
5465        unsafe fn decode(
5466            &mut self,
5467            decoder: &mut fidl::encoding::Decoder<'_, D>,
5468            offset: usize,
5469            _depth: fidl::encoding::Depth,
5470        ) -> fidl::Result<()> {
5471            decoder.debug_check_bounds::<Self>(offset);
5472            let prim = decoder.read_num::<u8>(offset);
5473            *self = Self::from_bits_allow_unknown(prim);
5474            Ok(())
5475        }
5476    }
5477    unsafe impl fidl::encoding::TypeMarker for GoldenBits {
5478        type Owned = Self;
5479
5480        #[inline(always)]
5481        fn inline_align(_context: fidl::encoding::Context) -> usize {
5482            2
5483        }
5484
5485        #[inline(always)]
5486        fn inline_size(_context: fidl::encoding::Context) -> usize {
5487            2
5488        }
5489    }
5490
5491    impl fidl::encoding::ValueTypeMarker for GoldenBits {
5492        type Borrowed<'a> = Self;
5493        #[inline(always)]
5494        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5495            *value
5496        }
5497    }
5498
5499    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenBits {
5500        #[inline]
5501        unsafe fn encode(
5502            self,
5503            encoder: &mut fidl::encoding::Encoder<'_, D>,
5504            offset: usize,
5505            _depth: fidl::encoding::Depth,
5506        ) -> fidl::Result<()> {
5507            encoder.debug_check_bounds::<Self>(offset);
5508            if self.bits() & Self::all().bits() != self.bits() {
5509                return Err(fidl::Error::InvalidBitsValue);
5510            }
5511            encoder.write_num(self.bits(), offset);
5512            Ok(())
5513        }
5514    }
5515
5516    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBits {
5517        #[inline(always)]
5518        fn new_empty() -> Self {
5519            Self::empty()
5520        }
5521
5522        #[inline]
5523        unsafe fn decode(
5524            &mut self,
5525            decoder: &mut fidl::encoding::Decoder<'_, D>,
5526            offset: usize,
5527            _depth: fidl::encoding::Depth,
5528        ) -> fidl::Result<()> {
5529            decoder.debug_check_bounds::<Self>(offset);
5530            let prim = decoder.read_num::<u16>(offset);
5531            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5532            Ok(())
5533        }
5534    }
5535    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16 {
5536        type Owned = Self;
5537
5538        #[inline(always)]
5539        fn inline_align(_context: fidl::encoding::Context) -> usize {
5540            2
5541        }
5542
5543        #[inline(always)]
5544        fn inline_size(_context: fidl::encoding::Context) -> usize {
5545            2
5546        }
5547    }
5548
5549    impl fidl::encoding::ValueTypeMarker for StrictBitsUint16 {
5550        type Borrowed<'a> = Self;
5551        #[inline(always)]
5552        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5553            *value
5554        }
5555    }
5556
5557    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5558        for StrictBitsUint16
5559    {
5560        #[inline]
5561        unsafe fn encode(
5562            self,
5563            encoder: &mut fidl::encoding::Encoder<'_, D>,
5564            offset: usize,
5565            _depth: fidl::encoding::Depth,
5566        ) -> fidl::Result<()> {
5567            encoder.debug_check_bounds::<Self>(offset);
5568            if self.bits() & Self::all().bits() != self.bits() {
5569                return Err(fidl::Error::InvalidBitsValue);
5570            }
5571            encoder.write_num(self.bits(), offset);
5572            Ok(())
5573        }
5574    }
5575
5576    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint16 {
5577        #[inline(always)]
5578        fn new_empty() -> Self {
5579            Self::empty()
5580        }
5581
5582        #[inline]
5583        unsafe fn decode(
5584            &mut self,
5585            decoder: &mut fidl::encoding::Decoder<'_, D>,
5586            offset: usize,
5587            _depth: fidl::encoding::Depth,
5588        ) -> fidl::Result<()> {
5589            decoder.debug_check_bounds::<Self>(offset);
5590            let prim = decoder.read_num::<u16>(offset);
5591            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5592            Ok(())
5593        }
5594    }
5595    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32 {
5596        type Owned = Self;
5597
5598        #[inline(always)]
5599        fn inline_align(_context: fidl::encoding::Context) -> usize {
5600            4
5601        }
5602
5603        #[inline(always)]
5604        fn inline_size(_context: fidl::encoding::Context) -> usize {
5605            4
5606        }
5607    }
5608
5609    impl fidl::encoding::ValueTypeMarker for StrictBitsUint32 {
5610        type Borrowed<'a> = Self;
5611        #[inline(always)]
5612        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5613            *value
5614        }
5615    }
5616
5617    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5618        for StrictBitsUint32
5619    {
5620        #[inline]
5621        unsafe fn encode(
5622            self,
5623            encoder: &mut fidl::encoding::Encoder<'_, D>,
5624            offset: usize,
5625            _depth: fidl::encoding::Depth,
5626        ) -> fidl::Result<()> {
5627            encoder.debug_check_bounds::<Self>(offset);
5628            if self.bits() & Self::all().bits() != self.bits() {
5629                return Err(fidl::Error::InvalidBitsValue);
5630            }
5631            encoder.write_num(self.bits(), offset);
5632            Ok(())
5633        }
5634    }
5635
5636    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint32 {
5637        #[inline(always)]
5638        fn new_empty() -> Self {
5639            Self::empty()
5640        }
5641
5642        #[inline]
5643        unsafe fn decode(
5644            &mut self,
5645            decoder: &mut fidl::encoding::Decoder<'_, D>,
5646            offset: usize,
5647            _depth: fidl::encoding::Depth,
5648        ) -> fidl::Result<()> {
5649            decoder.debug_check_bounds::<Self>(offset);
5650            let prim = decoder.read_num::<u32>(offset);
5651            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5652            Ok(())
5653        }
5654    }
5655    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64 {
5656        type Owned = Self;
5657
5658        #[inline(always)]
5659        fn inline_align(_context: fidl::encoding::Context) -> usize {
5660            8
5661        }
5662
5663        #[inline(always)]
5664        fn inline_size(_context: fidl::encoding::Context) -> usize {
5665            8
5666        }
5667    }
5668
5669    impl fidl::encoding::ValueTypeMarker for StrictBitsUint64 {
5670        type Borrowed<'a> = Self;
5671        #[inline(always)]
5672        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5673            *value
5674        }
5675    }
5676
5677    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5678        for StrictBitsUint64
5679    {
5680        #[inline]
5681        unsafe fn encode(
5682            self,
5683            encoder: &mut fidl::encoding::Encoder<'_, D>,
5684            offset: usize,
5685            _depth: fidl::encoding::Depth,
5686        ) -> fidl::Result<()> {
5687            encoder.debug_check_bounds::<Self>(offset);
5688            if self.bits() & Self::all().bits() != self.bits() {
5689                return Err(fidl::Error::InvalidBitsValue);
5690            }
5691            encoder.write_num(self.bits(), offset);
5692            Ok(())
5693        }
5694    }
5695
5696    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint64 {
5697        #[inline(always)]
5698        fn new_empty() -> Self {
5699            Self::empty()
5700        }
5701
5702        #[inline]
5703        unsafe fn decode(
5704            &mut self,
5705            decoder: &mut fidl::encoding::Decoder<'_, D>,
5706            offset: usize,
5707            _depth: fidl::encoding::Depth,
5708        ) -> fidl::Result<()> {
5709            decoder.debug_check_bounds::<Self>(offset);
5710            let prim = decoder.read_num::<u64>(offset);
5711            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5712            Ok(())
5713        }
5714    }
5715    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8 {
5716        type Owned = Self;
5717
5718        #[inline(always)]
5719        fn inline_align(_context: fidl::encoding::Context) -> usize {
5720            1
5721        }
5722
5723        #[inline(always)]
5724        fn inline_size(_context: fidl::encoding::Context) -> usize {
5725            1
5726        }
5727    }
5728
5729    impl fidl::encoding::ValueTypeMarker for StrictBitsUint8 {
5730        type Borrowed<'a> = Self;
5731        #[inline(always)]
5732        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5733            *value
5734        }
5735    }
5736
5737    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5738        for StrictBitsUint8
5739    {
5740        #[inline]
5741        unsafe fn encode(
5742            self,
5743            encoder: &mut fidl::encoding::Encoder<'_, D>,
5744            offset: usize,
5745            _depth: fidl::encoding::Depth,
5746        ) -> fidl::Result<()> {
5747            encoder.debug_check_bounds::<Self>(offset);
5748            if self.bits() & Self::all().bits() != self.bits() {
5749                return Err(fidl::Error::InvalidBitsValue);
5750            }
5751            encoder.write_num(self.bits(), offset);
5752            Ok(())
5753        }
5754    }
5755
5756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8 {
5757        #[inline(always)]
5758        fn new_empty() -> Self {
5759            Self::empty()
5760        }
5761
5762        #[inline]
5763        unsafe fn decode(
5764            &mut self,
5765            decoder: &mut fidl::encoding::Decoder<'_, D>,
5766            offset: usize,
5767            _depth: fidl::encoding::Depth,
5768        ) -> fidl::Result<()> {
5769            decoder.debug_check_bounds::<Self>(offset);
5770            let prim = decoder.read_num::<u8>(offset);
5771            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5772            Ok(())
5773        }
5774    }
5775    unsafe impl fidl::encoding::TypeMarker for Rights {
5776        type Owned = Self;
5777
5778        #[inline(always)]
5779        fn inline_align(_context: fidl::encoding::Context) -> usize {
5780            4
5781        }
5782
5783        #[inline(always)]
5784        fn inline_size(_context: fidl::encoding::Context) -> usize {
5785            4
5786        }
5787    }
5788
5789    impl fidl::encoding::ValueTypeMarker for Rights {
5790        type Borrowed<'a> = Self;
5791        #[inline(always)]
5792        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5793            *value
5794        }
5795    }
5796
5797    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Rights {
5798        #[inline]
5799        unsafe fn encode(
5800            self,
5801            encoder: &mut fidl::encoding::Encoder<'_, D>,
5802            offset: usize,
5803            _depth: fidl::encoding::Depth,
5804        ) -> fidl::Result<()> {
5805            encoder.debug_check_bounds::<Self>(offset);
5806            if self.bits() & Self::all().bits() != self.bits() {
5807                return Err(fidl::Error::InvalidBitsValue);
5808            }
5809            encoder.write_num(self.bits(), offset);
5810            Ok(())
5811        }
5812    }
5813
5814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Rights {
5815        #[inline(always)]
5816        fn new_empty() -> Self {
5817            Self::empty()
5818        }
5819
5820        #[inline]
5821        unsafe fn decode(
5822            &mut self,
5823            decoder: &mut fidl::encoding::Decoder<'_, D>,
5824            offset: usize,
5825            _depth: fidl::encoding::Depth,
5826        ) -> fidl::Result<()> {
5827            decoder.debug_check_bounds::<Self>(offset);
5828            let prim = decoder.read_num::<u32>(offset);
5829            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5830            Ok(())
5831        }
5832    }
5833    unsafe impl fidl::encoding::TypeMarker for EmptyEnum {
5834        type Owned = Self;
5835
5836        #[inline(always)]
5837        fn inline_align(_context: fidl::encoding::Context) -> usize {
5838            std::mem::align_of::<u32>()
5839        }
5840
5841        #[inline(always)]
5842        fn inline_size(_context: fidl::encoding::Context) -> usize {
5843            std::mem::size_of::<u32>()
5844        }
5845
5846        #[inline(always)]
5847        fn encode_is_copy() -> bool {
5848            false
5849        }
5850
5851        #[inline(always)]
5852        fn decode_is_copy() -> bool {
5853            false
5854        }
5855    }
5856
5857    impl fidl::encoding::ValueTypeMarker for EmptyEnum {
5858        type Borrowed<'a> = Self;
5859        #[inline(always)]
5860        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5861            *value
5862        }
5863    }
5864
5865    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyEnum {
5866        #[inline]
5867        unsafe fn encode(
5868            self,
5869            encoder: &mut fidl::encoding::Encoder<'_, D>,
5870            offset: usize,
5871            _depth: fidl::encoding::Depth,
5872        ) -> fidl::Result<()> {
5873            encoder.debug_check_bounds::<Self>(offset);
5874            encoder.write_num(self.into_primitive(), offset);
5875            Ok(())
5876        }
5877    }
5878
5879    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnum {
5880        #[inline(always)]
5881        fn new_empty() -> Self {
5882            Self::unknown()
5883        }
5884
5885        #[inline]
5886        unsafe fn decode(
5887            &mut self,
5888            decoder: &mut fidl::encoding::Decoder<'_, D>,
5889            offset: usize,
5890            _depth: fidl::encoding::Depth,
5891        ) -> fidl::Result<()> {
5892            decoder.debug_check_bounds::<Self>(offset);
5893            let prim = decoder.read_num::<u32>(offset);
5894
5895            *self = Self::from_primitive_allow_unknown(prim);
5896            Ok(())
5897        }
5898    }
5899    unsafe impl fidl::encoding::TypeMarker for EnumUint32 {
5900        type Owned = Self;
5901
5902        #[inline(always)]
5903        fn inline_align(_context: fidl::encoding::Context) -> usize {
5904            std::mem::align_of::<u32>()
5905        }
5906
5907        #[inline(always)]
5908        fn inline_size(_context: fidl::encoding::Context) -> usize {
5909            std::mem::size_of::<u32>()
5910        }
5911
5912        #[inline(always)]
5913        fn encode_is_copy() -> bool {
5914            true
5915        }
5916
5917        #[inline(always)]
5918        fn decode_is_copy() -> bool {
5919            false
5920        }
5921    }
5922
5923    impl fidl::encoding::ValueTypeMarker for EnumUint32 {
5924        type Borrowed<'a> = Self;
5925        #[inline(always)]
5926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5927            *value
5928        }
5929    }
5930
5931    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint32 {
5932        #[inline]
5933        unsafe fn encode(
5934            self,
5935            encoder: &mut fidl::encoding::Encoder<'_, D>,
5936            offset: usize,
5937            _depth: fidl::encoding::Depth,
5938        ) -> fidl::Result<()> {
5939            encoder.debug_check_bounds::<Self>(offset);
5940            encoder.write_num(self.into_primitive(), offset);
5941            Ok(())
5942        }
5943    }
5944
5945    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint32 {
5946        #[inline(always)]
5947        fn new_empty() -> Self {
5948            Self::Member
5949        }
5950
5951        #[inline]
5952        unsafe fn decode(
5953            &mut self,
5954            decoder: &mut fidl::encoding::Decoder<'_, D>,
5955            offset: usize,
5956            _depth: fidl::encoding::Depth,
5957        ) -> fidl::Result<()> {
5958            decoder.debug_check_bounds::<Self>(offset);
5959            let prim = decoder.read_num::<u32>(offset);
5960
5961            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5962            Ok(())
5963        }
5964    }
5965    unsafe impl fidl::encoding::TypeMarker for EnumUint8 {
5966        type Owned = Self;
5967
5968        #[inline(always)]
5969        fn inline_align(_context: fidl::encoding::Context) -> usize {
5970            std::mem::align_of::<u8>()
5971        }
5972
5973        #[inline(always)]
5974        fn inline_size(_context: fidl::encoding::Context) -> usize {
5975            std::mem::size_of::<u8>()
5976        }
5977
5978        #[inline(always)]
5979        fn encode_is_copy() -> bool {
5980            true
5981        }
5982
5983        #[inline(always)]
5984        fn decode_is_copy() -> bool {
5985            false
5986        }
5987    }
5988
5989    impl fidl::encoding::ValueTypeMarker for EnumUint8 {
5990        type Borrowed<'a> = Self;
5991        #[inline(always)]
5992        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5993            *value
5994        }
5995    }
5996
5997    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint8 {
5998        #[inline]
5999        unsafe fn encode(
6000            self,
6001            encoder: &mut fidl::encoding::Encoder<'_, D>,
6002            offset: usize,
6003            _depth: fidl::encoding::Depth,
6004        ) -> fidl::Result<()> {
6005            encoder.debug_check_bounds::<Self>(offset);
6006            encoder.write_num(self.into_primitive(), offset);
6007            Ok(())
6008        }
6009    }
6010
6011    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint8 {
6012        #[inline(always)]
6013        fn new_empty() -> Self {
6014            Self::Member
6015        }
6016
6017        #[inline]
6018        unsafe fn decode(
6019            &mut self,
6020            decoder: &mut fidl::encoding::Decoder<'_, D>,
6021            offset: usize,
6022            _depth: fidl::encoding::Depth,
6023        ) -> fidl::Result<()> {
6024            decoder.debug_check_bounds::<Self>(offset);
6025            let prim = decoder.read_num::<u8>(offset);
6026
6027            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6028            Ok(())
6029        }
6030    }
6031    unsafe impl fidl::encoding::TypeMarker for FidlvizEnum {
6032        type Owned = Self;
6033
6034        #[inline(always)]
6035        fn inline_align(_context: fidl::encoding::Context) -> usize {
6036            std::mem::align_of::<u8>()
6037        }
6038
6039        #[inline(always)]
6040        fn inline_size(_context: fidl::encoding::Context) -> usize {
6041            std::mem::size_of::<u8>()
6042        }
6043
6044        #[inline(always)]
6045        fn encode_is_copy() -> bool {
6046            true
6047        }
6048
6049        #[inline(always)]
6050        fn decode_is_copy() -> bool {
6051            false
6052        }
6053    }
6054
6055    impl fidl::encoding::ValueTypeMarker for FidlvizEnum {
6056        type Borrowed<'a> = Self;
6057        #[inline(always)]
6058        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6059            *value
6060        }
6061    }
6062
6063    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizEnum {
6064        #[inline]
6065        unsafe fn encode(
6066            self,
6067            encoder: &mut fidl::encoding::Encoder<'_, D>,
6068            offset: usize,
6069            _depth: fidl::encoding::Depth,
6070        ) -> fidl::Result<()> {
6071            encoder.debug_check_bounds::<Self>(offset);
6072            encoder.write_num(self.into_primitive(), offset);
6073            Ok(())
6074        }
6075    }
6076
6077    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizEnum {
6078        #[inline(always)]
6079        fn new_empty() -> Self {
6080            Self::A
6081        }
6082
6083        #[inline]
6084        unsafe fn decode(
6085            &mut self,
6086            decoder: &mut fidl::encoding::Decoder<'_, D>,
6087            offset: usize,
6088            _depth: fidl::encoding::Depth,
6089        ) -> fidl::Result<()> {
6090            decoder.debug_check_bounds::<Self>(offset);
6091            let prim = decoder.read_num::<u8>(offset);
6092
6093            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6094            Ok(())
6095        }
6096    }
6097    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16 {
6098        type Owned = Self;
6099
6100        #[inline(always)]
6101        fn inline_align(_context: fidl::encoding::Context) -> usize {
6102            std::mem::align_of::<i16>()
6103        }
6104
6105        #[inline(always)]
6106        fn inline_size(_context: fidl::encoding::Context) -> usize {
6107            std::mem::size_of::<i16>()
6108        }
6109
6110        #[inline(always)]
6111        fn encode_is_copy() -> bool {
6112            false
6113        }
6114
6115        #[inline(always)]
6116        fn decode_is_copy() -> bool {
6117            false
6118        }
6119    }
6120
6121    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16 {
6122        type Borrowed<'a> = Self;
6123        #[inline(always)]
6124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6125            *value
6126        }
6127    }
6128
6129    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6130        for FlexibleEnumInt16
6131    {
6132        #[inline]
6133        unsafe fn encode(
6134            self,
6135            encoder: &mut fidl::encoding::Encoder<'_, D>,
6136            offset: usize,
6137            _depth: fidl::encoding::Depth,
6138        ) -> fidl::Result<()> {
6139            encoder.debug_check_bounds::<Self>(offset);
6140            encoder.write_num(self.into_primitive(), offset);
6141            Ok(())
6142        }
6143    }
6144
6145    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt16 {
6146        #[inline(always)]
6147        fn new_empty() -> Self {
6148            Self::unknown()
6149        }
6150
6151        #[inline]
6152        unsafe fn decode(
6153            &mut self,
6154            decoder: &mut fidl::encoding::Decoder<'_, D>,
6155            offset: usize,
6156            _depth: fidl::encoding::Depth,
6157        ) -> fidl::Result<()> {
6158            decoder.debug_check_bounds::<Self>(offset);
6159            let prim = decoder.read_num::<i16>(offset);
6160
6161            *self = Self::from_primitive_allow_unknown(prim);
6162            Ok(())
6163        }
6164    }
6165    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32 {
6166        type Owned = Self;
6167
6168        #[inline(always)]
6169        fn inline_align(_context: fidl::encoding::Context) -> usize {
6170            std::mem::align_of::<i32>()
6171        }
6172
6173        #[inline(always)]
6174        fn inline_size(_context: fidl::encoding::Context) -> usize {
6175            std::mem::size_of::<i32>()
6176        }
6177
6178        #[inline(always)]
6179        fn encode_is_copy() -> bool {
6180            false
6181        }
6182
6183        #[inline(always)]
6184        fn decode_is_copy() -> bool {
6185            false
6186        }
6187    }
6188
6189    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32 {
6190        type Borrowed<'a> = Self;
6191        #[inline(always)]
6192        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6193            *value
6194        }
6195    }
6196
6197    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6198        for FlexibleEnumInt32
6199    {
6200        #[inline]
6201        unsafe fn encode(
6202            self,
6203            encoder: &mut fidl::encoding::Encoder<'_, D>,
6204            offset: usize,
6205            _depth: fidl::encoding::Depth,
6206        ) -> fidl::Result<()> {
6207            encoder.debug_check_bounds::<Self>(offset);
6208            encoder.write_num(self.into_primitive(), offset);
6209            Ok(())
6210        }
6211    }
6212
6213    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt32 {
6214        #[inline(always)]
6215        fn new_empty() -> Self {
6216            Self::unknown()
6217        }
6218
6219        #[inline]
6220        unsafe fn decode(
6221            &mut self,
6222            decoder: &mut fidl::encoding::Decoder<'_, D>,
6223            offset: usize,
6224            _depth: fidl::encoding::Depth,
6225        ) -> fidl::Result<()> {
6226            decoder.debug_check_bounds::<Self>(offset);
6227            let prim = decoder.read_num::<i32>(offset);
6228
6229            *self = Self::from_primitive_allow_unknown(prim);
6230            Ok(())
6231        }
6232    }
6233    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64 {
6234        type Owned = Self;
6235
6236        #[inline(always)]
6237        fn inline_align(_context: fidl::encoding::Context) -> usize {
6238            std::mem::align_of::<i64>()
6239        }
6240
6241        #[inline(always)]
6242        fn inline_size(_context: fidl::encoding::Context) -> usize {
6243            std::mem::size_of::<i64>()
6244        }
6245
6246        #[inline(always)]
6247        fn encode_is_copy() -> bool {
6248            false
6249        }
6250
6251        #[inline(always)]
6252        fn decode_is_copy() -> bool {
6253            false
6254        }
6255    }
6256
6257    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64 {
6258        type Borrowed<'a> = Self;
6259        #[inline(always)]
6260        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6261            *value
6262        }
6263    }
6264
6265    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6266        for FlexibleEnumInt64
6267    {
6268        #[inline]
6269        unsafe fn encode(
6270            self,
6271            encoder: &mut fidl::encoding::Encoder<'_, D>,
6272            offset: usize,
6273            _depth: fidl::encoding::Depth,
6274        ) -> fidl::Result<()> {
6275            encoder.debug_check_bounds::<Self>(offset);
6276            encoder.write_num(self.into_primitive(), offset);
6277            Ok(())
6278        }
6279    }
6280
6281    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt64 {
6282        #[inline(always)]
6283        fn new_empty() -> Self {
6284            Self::unknown()
6285        }
6286
6287        #[inline]
6288        unsafe fn decode(
6289            &mut self,
6290            decoder: &mut fidl::encoding::Decoder<'_, D>,
6291            offset: usize,
6292            _depth: fidl::encoding::Depth,
6293        ) -> fidl::Result<()> {
6294            decoder.debug_check_bounds::<Self>(offset);
6295            let prim = decoder.read_num::<i64>(offset);
6296
6297            *self = Self::from_primitive_allow_unknown(prim);
6298            Ok(())
6299        }
6300    }
6301    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8 {
6302        type Owned = Self;
6303
6304        #[inline(always)]
6305        fn inline_align(_context: fidl::encoding::Context) -> usize {
6306            std::mem::align_of::<i8>()
6307        }
6308
6309        #[inline(always)]
6310        fn inline_size(_context: fidl::encoding::Context) -> usize {
6311            std::mem::size_of::<i8>()
6312        }
6313
6314        #[inline(always)]
6315        fn encode_is_copy() -> bool {
6316            false
6317        }
6318
6319        #[inline(always)]
6320        fn decode_is_copy() -> bool {
6321            false
6322        }
6323    }
6324
6325    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8 {
6326        type Borrowed<'a> = Self;
6327        #[inline(always)]
6328        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6329            *value
6330        }
6331    }
6332
6333    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6334        for FlexibleEnumInt8
6335    {
6336        #[inline]
6337        unsafe fn encode(
6338            self,
6339            encoder: &mut fidl::encoding::Encoder<'_, D>,
6340            offset: usize,
6341            _depth: fidl::encoding::Depth,
6342        ) -> fidl::Result<()> {
6343            encoder.debug_check_bounds::<Self>(offset);
6344            encoder.write_num(self.into_primitive(), offset);
6345            Ok(())
6346        }
6347    }
6348
6349    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt8 {
6350        #[inline(always)]
6351        fn new_empty() -> Self {
6352            Self::unknown()
6353        }
6354
6355        #[inline]
6356        unsafe fn decode(
6357            &mut self,
6358            decoder: &mut fidl::encoding::Decoder<'_, D>,
6359            offset: usize,
6360            _depth: fidl::encoding::Depth,
6361        ) -> fidl::Result<()> {
6362            decoder.debug_check_bounds::<Self>(offset);
6363            let prim = decoder.read_num::<i8>(offset);
6364
6365            *self = Self::from_primitive_allow_unknown(prim);
6366            Ok(())
6367        }
6368    }
6369    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16 {
6370        type Owned = Self;
6371
6372        #[inline(always)]
6373        fn inline_align(_context: fidl::encoding::Context) -> usize {
6374            std::mem::align_of::<u16>()
6375        }
6376
6377        #[inline(always)]
6378        fn inline_size(_context: fidl::encoding::Context) -> usize {
6379            std::mem::size_of::<u16>()
6380        }
6381
6382        #[inline(always)]
6383        fn encode_is_copy() -> bool {
6384            false
6385        }
6386
6387        #[inline(always)]
6388        fn decode_is_copy() -> bool {
6389            false
6390        }
6391    }
6392
6393    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16 {
6394        type Borrowed<'a> = Self;
6395        #[inline(always)]
6396        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6397            *value
6398        }
6399    }
6400
6401    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6402        for FlexibleEnumUint16
6403    {
6404        #[inline]
6405        unsafe fn encode(
6406            self,
6407            encoder: &mut fidl::encoding::Encoder<'_, D>,
6408            offset: usize,
6409            _depth: fidl::encoding::Depth,
6410        ) -> fidl::Result<()> {
6411            encoder.debug_check_bounds::<Self>(offset);
6412            encoder.write_num(self.into_primitive(), offset);
6413            Ok(())
6414        }
6415    }
6416
6417    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint16 {
6418        #[inline(always)]
6419        fn new_empty() -> Self {
6420            Self::unknown()
6421        }
6422
6423        #[inline]
6424        unsafe fn decode(
6425            &mut self,
6426            decoder: &mut fidl::encoding::Decoder<'_, D>,
6427            offset: usize,
6428            _depth: fidl::encoding::Depth,
6429        ) -> fidl::Result<()> {
6430            decoder.debug_check_bounds::<Self>(offset);
6431            let prim = decoder.read_num::<u16>(offset);
6432
6433            *self = Self::from_primitive_allow_unknown(prim);
6434            Ok(())
6435        }
6436    }
6437    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32 {
6438        type Owned = Self;
6439
6440        #[inline(always)]
6441        fn inline_align(_context: fidl::encoding::Context) -> usize {
6442            std::mem::align_of::<u32>()
6443        }
6444
6445        #[inline(always)]
6446        fn inline_size(_context: fidl::encoding::Context) -> usize {
6447            std::mem::size_of::<u32>()
6448        }
6449
6450        #[inline(always)]
6451        fn encode_is_copy() -> bool {
6452            false
6453        }
6454
6455        #[inline(always)]
6456        fn decode_is_copy() -> bool {
6457            false
6458        }
6459    }
6460
6461    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32 {
6462        type Borrowed<'a> = Self;
6463        #[inline(always)]
6464        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6465            *value
6466        }
6467    }
6468
6469    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6470        for FlexibleEnumUint32
6471    {
6472        #[inline]
6473        unsafe fn encode(
6474            self,
6475            encoder: &mut fidl::encoding::Encoder<'_, D>,
6476            offset: usize,
6477            _depth: fidl::encoding::Depth,
6478        ) -> fidl::Result<()> {
6479            encoder.debug_check_bounds::<Self>(offset);
6480            encoder.write_num(self.into_primitive(), offset);
6481            Ok(())
6482        }
6483    }
6484
6485    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint32 {
6486        #[inline(always)]
6487        fn new_empty() -> Self {
6488            Self::unknown()
6489        }
6490
6491        #[inline]
6492        unsafe fn decode(
6493            &mut self,
6494            decoder: &mut fidl::encoding::Decoder<'_, D>,
6495            offset: usize,
6496            _depth: fidl::encoding::Depth,
6497        ) -> fidl::Result<()> {
6498            decoder.debug_check_bounds::<Self>(offset);
6499            let prim = decoder.read_num::<u32>(offset);
6500
6501            *self = Self::from_primitive_allow_unknown(prim);
6502            Ok(())
6503        }
6504    }
6505    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64 {
6506        type Owned = Self;
6507
6508        #[inline(always)]
6509        fn inline_align(_context: fidl::encoding::Context) -> usize {
6510            std::mem::align_of::<u64>()
6511        }
6512
6513        #[inline(always)]
6514        fn inline_size(_context: fidl::encoding::Context) -> usize {
6515            std::mem::size_of::<u64>()
6516        }
6517
6518        #[inline(always)]
6519        fn encode_is_copy() -> bool {
6520            false
6521        }
6522
6523        #[inline(always)]
6524        fn decode_is_copy() -> bool {
6525            false
6526        }
6527    }
6528
6529    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64 {
6530        type Borrowed<'a> = Self;
6531        #[inline(always)]
6532        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6533            *value
6534        }
6535    }
6536
6537    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6538        for FlexibleEnumUint64
6539    {
6540        #[inline]
6541        unsafe fn encode(
6542            self,
6543            encoder: &mut fidl::encoding::Encoder<'_, D>,
6544            offset: usize,
6545            _depth: fidl::encoding::Depth,
6546        ) -> fidl::Result<()> {
6547            encoder.debug_check_bounds::<Self>(offset);
6548            encoder.write_num(self.into_primitive(), offset);
6549            Ok(())
6550        }
6551    }
6552
6553    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint64 {
6554        #[inline(always)]
6555        fn new_empty() -> Self {
6556            Self::unknown()
6557        }
6558
6559        #[inline]
6560        unsafe fn decode(
6561            &mut self,
6562            decoder: &mut fidl::encoding::Decoder<'_, D>,
6563            offset: usize,
6564            _depth: fidl::encoding::Depth,
6565        ) -> fidl::Result<()> {
6566            decoder.debug_check_bounds::<Self>(offset);
6567            let prim = decoder.read_num::<u64>(offset);
6568
6569            *self = Self::from_primitive_allow_unknown(prim);
6570            Ok(())
6571        }
6572    }
6573    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8 {
6574        type Owned = Self;
6575
6576        #[inline(always)]
6577        fn inline_align(_context: fidl::encoding::Context) -> usize {
6578            std::mem::align_of::<u8>()
6579        }
6580
6581        #[inline(always)]
6582        fn inline_size(_context: fidl::encoding::Context) -> usize {
6583            std::mem::size_of::<u8>()
6584        }
6585
6586        #[inline(always)]
6587        fn encode_is_copy() -> bool {
6588            false
6589        }
6590
6591        #[inline(always)]
6592        fn decode_is_copy() -> bool {
6593            false
6594        }
6595    }
6596
6597    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8 {
6598        type Borrowed<'a> = Self;
6599        #[inline(always)]
6600        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6601            *value
6602        }
6603    }
6604
6605    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6606        for FlexibleEnumUint8
6607    {
6608        #[inline]
6609        unsafe fn encode(
6610            self,
6611            encoder: &mut fidl::encoding::Encoder<'_, D>,
6612            offset: usize,
6613            _depth: fidl::encoding::Depth,
6614        ) -> fidl::Result<()> {
6615            encoder.debug_check_bounds::<Self>(offset);
6616            encoder.write_num(self.into_primitive(), offset);
6617            Ok(())
6618        }
6619    }
6620
6621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint8 {
6622        #[inline(always)]
6623        fn new_empty() -> Self {
6624            Self::unknown()
6625        }
6626
6627        #[inline]
6628        unsafe fn decode(
6629            &mut self,
6630            decoder: &mut fidl::encoding::Decoder<'_, D>,
6631            offset: usize,
6632            _depth: fidl::encoding::Depth,
6633        ) -> fidl::Result<()> {
6634            decoder.debug_check_bounds::<Self>(offset);
6635            let prim = decoder.read_num::<u8>(offset);
6636
6637            *self = Self::from_primitive_allow_unknown(prim);
6638            Ok(())
6639        }
6640    }
6641    unsafe impl fidl::encoding::TypeMarker for GoldenEnum {
6642        type Owned = Self;
6643
6644        #[inline(always)]
6645        fn inline_align(_context: fidl::encoding::Context) -> usize {
6646            std::mem::align_of::<u16>()
6647        }
6648
6649        #[inline(always)]
6650        fn inline_size(_context: fidl::encoding::Context) -> usize {
6651            std::mem::size_of::<u16>()
6652        }
6653
6654        #[inline(always)]
6655        fn encode_is_copy() -> bool {
6656            true
6657        }
6658
6659        #[inline(always)]
6660        fn decode_is_copy() -> bool {
6661            false
6662        }
6663    }
6664
6665    impl fidl::encoding::ValueTypeMarker for GoldenEnum {
6666        type Borrowed<'a> = Self;
6667        #[inline(always)]
6668        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6669            *value
6670        }
6671    }
6672
6673    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenEnum {
6674        #[inline]
6675        unsafe fn encode(
6676            self,
6677            encoder: &mut fidl::encoding::Encoder<'_, D>,
6678            offset: usize,
6679            _depth: fidl::encoding::Depth,
6680        ) -> fidl::Result<()> {
6681            encoder.debug_check_bounds::<Self>(offset);
6682            encoder.write_num(self.into_primitive(), offset);
6683            Ok(())
6684        }
6685    }
6686
6687    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnum {
6688        #[inline(always)]
6689        fn new_empty() -> Self {
6690            Self::A
6691        }
6692
6693        #[inline]
6694        unsafe fn decode(
6695            &mut self,
6696            decoder: &mut fidl::encoding::Decoder<'_, D>,
6697            offset: usize,
6698            _depth: fidl::encoding::Depth,
6699        ) -> fidl::Result<()> {
6700            decoder.debug_check_bounds::<Self>(offset);
6701            let prim = decoder.read_num::<u16>(offset);
6702
6703            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6704            Ok(())
6705        }
6706    }
6707    unsafe impl fidl::encoding::TypeMarker for SignedEnum {
6708        type Owned = Self;
6709
6710        #[inline(always)]
6711        fn inline_align(_context: fidl::encoding::Context) -> usize {
6712            std::mem::align_of::<i32>()
6713        }
6714
6715        #[inline(always)]
6716        fn inline_size(_context: fidl::encoding::Context) -> usize {
6717            std::mem::size_of::<i32>()
6718        }
6719
6720        #[inline(always)]
6721        fn encode_is_copy() -> bool {
6722            false
6723        }
6724
6725        #[inline(always)]
6726        fn decode_is_copy() -> bool {
6727            false
6728        }
6729    }
6730
6731    impl fidl::encoding::ValueTypeMarker for SignedEnum {
6732        type Borrowed<'a> = Self;
6733        #[inline(always)]
6734        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6735            *value
6736        }
6737    }
6738
6739    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SignedEnum {
6740        #[inline]
6741        unsafe fn encode(
6742            self,
6743            encoder: &mut fidl::encoding::Encoder<'_, D>,
6744            offset: usize,
6745            _depth: fidl::encoding::Depth,
6746        ) -> fidl::Result<()> {
6747            encoder.debug_check_bounds::<Self>(offset);
6748            encoder.write_num(self.into_primitive(), offset);
6749            Ok(())
6750        }
6751    }
6752
6753    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SignedEnum {
6754        #[inline(always)]
6755        fn new_empty() -> Self {
6756            Self::unknown()
6757        }
6758
6759        #[inline]
6760        unsafe fn decode(
6761            &mut self,
6762            decoder: &mut fidl::encoding::Decoder<'_, D>,
6763            offset: usize,
6764            _depth: fidl::encoding::Depth,
6765        ) -> fidl::Result<()> {
6766            decoder.debug_check_bounds::<Self>(offset);
6767            let prim = decoder.read_num::<i32>(offset);
6768
6769            *self = Self::from_primitive_allow_unknown(prim);
6770            Ok(())
6771        }
6772    }
6773    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16 {
6774        type Owned = Self;
6775
6776        #[inline(always)]
6777        fn inline_align(_context: fidl::encoding::Context) -> usize {
6778            std::mem::align_of::<i16>()
6779        }
6780
6781        #[inline(always)]
6782        fn inline_size(_context: fidl::encoding::Context) -> usize {
6783            std::mem::size_of::<i16>()
6784        }
6785
6786        #[inline(always)]
6787        fn encode_is_copy() -> bool {
6788            true
6789        }
6790
6791        #[inline(always)]
6792        fn decode_is_copy() -> bool {
6793            false
6794        }
6795    }
6796
6797    impl fidl::encoding::ValueTypeMarker for StrictEnumInt16 {
6798        type Borrowed<'a> = Self;
6799        #[inline(always)]
6800        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6801            *value
6802        }
6803    }
6804
6805    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6806        for StrictEnumInt16
6807    {
6808        #[inline]
6809        unsafe fn encode(
6810            self,
6811            encoder: &mut fidl::encoding::Encoder<'_, D>,
6812            offset: usize,
6813            _depth: fidl::encoding::Depth,
6814        ) -> fidl::Result<()> {
6815            encoder.debug_check_bounds::<Self>(offset);
6816            encoder.write_num(self.into_primitive(), offset);
6817            Ok(())
6818        }
6819    }
6820
6821    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16 {
6822        #[inline(always)]
6823        fn new_empty() -> Self {
6824            Self::First
6825        }
6826
6827        #[inline]
6828        unsafe fn decode(
6829            &mut self,
6830            decoder: &mut fidl::encoding::Decoder<'_, D>,
6831            offset: usize,
6832            _depth: fidl::encoding::Depth,
6833        ) -> fidl::Result<()> {
6834            decoder.debug_check_bounds::<Self>(offset);
6835            let prim = decoder.read_num::<i16>(offset);
6836
6837            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6838            Ok(())
6839        }
6840    }
6841    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32 {
6842        type Owned = Self;
6843
6844        #[inline(always)]
6845        fn inline_align(_context: fidl::encoding::Context) -> usize {
6846            std::mem::align_of::<i32>()
6847        }
6848
6849        #[inline(always)]
6850        fn inline_size(_context: fidl::encoding::Context) -> usize {
6851            std::mem::size_of::<i32>()
6852        }
6853
6854        #[inline(always)]
6855        fn encode_is_copy() -> bool {
6856            true
6857        }
6858
6859        #[inline(always)]
6860        fn decode_is_copy() -> bool {
6861            false
6862        }
6863    }
6864
6865    impl fidl::encoding::ValueTypeMarker for StrictEnumInt32 {
6866        type Borrowed<'a> = Self;
6867        #[inline(always)]
6868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6869            *value
6870        }
6871    }
6872
6873    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6874        for StrictEnumInt32
6875    {
6876        #[inline]
6877        unsafe fn encode(
6878            self,
6879            encoder: &mut fidl::encoding::Encoder<'_, D>,
6880            offset: usize,
6881            _depth: fidl::encoding::Depth,
6882        ) -> fidl::Result<()> {
6883            encoder.debug_check_bounds::<Self>(offset);
6884            encoder.write_num(self.into_primitive(), offset);
6885            Ok(())
6886        }
6887    }
6888
6889    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32 {
6890        #[inline(always)]
6891        fn new_empty() -> Self {
6892            Self::First
6893        }
6894
6895        #[inline]
6896        unsafe fn decode(
6897            &mut self,
6898            decoder: &mut fidl::encoding::Decoder<'_, D>,
6899            offset: usize,
6900            _depth: fidl::encoding::Depth,
6901        ) -> fidl::Result<()> {
6902            decoder.debug_check_bounds::<Self>(offset);
6903            let prim = decoder.read_num::<i32>(offset);
6904
6905            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6906            Ok(())
6907        }
6908    }
6909    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64 {
6910        type Owned = Self;
6911
6912        #[inline(always)]
6913        fn inline_align(_context: fidl::encoding::Context) -> usize {
6914            std::mem::align_of::<i64>()
6915        }
6916
6917        #[inline(always)]
6918        fn inline_size(_context: fidl::encoding::Context) -> usize {
6919            std::mem::size_of::<i64>()
6920        }
6921
6922        #[inline(always)]
6923        fn encode_is_copy() -> bool {
6924            true
6925        }
6926
6927        #[inline(always)]
6928        fn decode_is_copy() -> bool {
6929            false
6930        }
6931    }
6932
6933    impl fidl::encoding::ValueTypeMarker for StrictEnumInt64 {
6934        type Borrowed<'a> = Self;
6935        #[inline(always)]
6936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6937            *value
6938        }
6939    }
6940
6941    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6942        for StrictEnumInt64
6943    {
6944        #[inline]
6945        unsafe fn encode(
6946            self,
6947            encoder: &mut fidl::encoding::Encoder<'_, D>,
6948            offset: usize,
6949            _depth: fidl::encoding::Depth,
6950        ) -> fidl::Result<()> {
6951            encoder.debug_check_bounds::<Self>(offset);
6952            encoder.write_num(self.into_primitive(), offset);
6953            Ok(())
6954        }
6955    }
6956
6957    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64 {
6958        #[inline(always)]
6959        fn new_empty() -> Self {
6960            Self::First
6961        }
6962
6963        #[inline]
6964        unsafe fn decode(
6965            &mut self,
6966            decoder: &mut fidl::encoding::Decoder<'_, D>,
6967            offset: usize,
6968            _depth: fidl::encoding::Depth,
6969        ) -> fidl::Result<()> {
6970            decoder.debug_check_bounds::<Self>(offset);
6971            let prim = decoder.read_num::<i64>(offset);
6972
6973            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6974            Ok(())
6975        }
6976    }
6977    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8 {
6978        type Owned = Self;
6979
6980        #[inline(always)]
6981        fn inline_align(_context: fidl::encoding::Context) -> usize {
6982            std::mem::align_of::<i8>()
6983        }
6984
6985        #[inline(always)]
6986        fn inline_size(_context: fidl::encoding::Context) -> usize {
6987            std::mem::size_of::<i8>()
6988        }
6989
6990        #[inline(always)]
6991        fn encode_is_copy() -> bool {
6992            true
6993        }
6994
6995        #[inline(always)]
6996        fn decode_is_copy() -> bool {
6997            false
6998        }
6999    }
7000
7001    impl fidl::encoding::ValueTypeMarker for StrictEnumInt8 {
7002        type Borrowed<'a> = Self;
7003        #[inline(always)]
7004        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7005            *value
7006        }
7007    }
7008
7009    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StrictEnumInt8 {
7010        #[inline]
7011        unsafe fn encode(
7012            self,
7013            encoder: &mut fidl::encoding::Encoder<'_, D>,
7014            offset: usize,
7015            _depth: fidl::encoding::Depth,
7016        ) -> fidl::Result<()> {
7017            encoder.debug_check_bounds::<Self>(offset);
7018            encoder.write_num(self.into_primitive(), offset);
7019            Ok(())
7020        }
7021    }
7022
7023    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8 {
7024        #[inline(always)]
7025        fn new_empty() -> Self {
7026            Self::First
7027        }
7028
7029        #[inline]
7030        unsafe fn decode(
7031            &mut self,
7032            decoder: &mut fidl::encoding::Decoder<'_, D>,
7033            offset: usize,
7034            _depth: fidl::encoding::Depth,
7035        ) -> fidl::Result<()> {
7036            decoder.debug_check_bounds::<Self>(offset);
7037            let prim = decoder.read_num::<i8>(offset);
7038
7039            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7040            Ok(())
7041        }
7042    }
7043    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16 {
7044        type Owned = Self;
7045
7046        #[inline(always)]
7047        fn inline_align(_context: fidl::encoding::Context) -> usize {
7048            std::mem::align_of::<u16>()
7049        }
7050
7051        #[inline(always)]
7052        fn inline_size(_context: fidl::encoding::Context) -> usize {
7053            std::mem::size_of::<u16>()
7054        }
7055
7056        #[inline(always)]
7057        fn encode_is_copy() -> bool {
7058            true
7059        }
7060
7061        #[inline(always)]
7062        fn decode_is_copy() -> bool {
7063            false
7064        }
7065    }
7066
7067    impl fidl::encoding::ValueTypeMarker for StrictEnumUint16 {
7068        type Borrowed<'a> = Self;
7069        #[inline(always)]
7070        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7071            *value
7072        }
7073    }
7074
7075    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7076        for StrictEnumUint16
7077    {
7078        #[inline]
7079        unsafe fn encode(
7080            self,
7081            encoder: &mut fidl::encoding::Encoder<'_, D>,
7082            offset: usize,
7083            _depth: fidl::encoding::Depth,
7084        ) -> fidl::Result<()> {
7085            encoder.debug_check_bounds::<Self>(offset);
7086            encoder.write_num(self.into_primitive(), offset);
7087            Ok(())
7088        }
7089    }
7090
7091    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint16 {
7092        #[inline(always)]
7093        fn new_empty() -> Self {
7094            Self::First
7095        }
7096
7097        #[inline]
7098        unsafe fn decode(
7099            &mut self,
7100            decoder: &mut fidl::encoding::Decoder<'_, D>,
7101            offset: usize,
7102            _depth: fidl::encoding::Depth,
7103        ) -> fidl::Result<()> {
7104            decoder.debug_check_bounds::<Self>(offset);
7105            let prim = decoder.read_num::<u16>(offset);
7106
7107            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7108            Ok(())
7109        }
7110    }
7111    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32 {
7112        type Owned = Self;
7113
7114        #[inline(always)]
7115        fn inline_align(_context: fidl::encoding::Context) -> usize {
7116            std::mem::align_of::<u32>()
7117        }
7118
7119        #[inline(always)]
7120        fn inline_size(_context: fidl::encoding::Context) -> usize {
7121            std::mem::size_of::<u32>()
7122        }
7123
7124        #[inline(always)]
7125        fn encode_is_copy() -> bool {
7126            true
7127        }
7128
7129        #[inline(always)]
7130        fn decode_is_copy() -> bool {
7131            false
7132        }
7133    }
7134
7135    impl fidl::encoding::ValueTypeMarker for StrictEnumUint32 {
7136        type Borrowed<'a> = Self;
7137        #[inline(always)]
7138        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7139            *value
7140        }
7141    }
7142
7143    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7144        for StrictEnumUint32
7145    {
7146        #[inline]
7147        unsafe fn encode(
7148            self,
7149            encoder: &mut fidl::encoding::Encoder<'_, D>,
7150            offset: usize,
7151            _depth: fidl::encoding::Depth,
7152        ) -> fidl::Result<()> {
7153            encoder.debug_check_bounds::<Self>(offset);
7154            encoder.write_num(self.into_primitive(), offset);
7155            Ok(())
7156        }
7157    }
7158
7159    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint32 {
7160        #[inline(always)]
7161        fn new_empty() -> Self {
7162            Self::First
7163        }
7164
7165        #[inline]
7166        unsafe fn decode(
7167            &mut self,
7168            decoder: &mut fidl::encoding::Decoder<'_, D>,
7169            offset: usize,
7170            _depth: fidl::encoding::Depth,
7171        ) -> fidl::Result<()> {
7172            decoder.debug_check_bounds::<Self>(offset);
7173            let prim = decoder.read_num::<u32>(offset);
7174
7175            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7176            Ok(())
7177        }
7178    }
7179    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64 {
7180        type Owned = Self;
7181
7182        #[inline(always)]
7183        fn inline_align(_context: fidl::encoding::Context) -> usize {
7184            std::mem::align_of::<u64>()
7185        }
7186
7187        #[inline(always)]
7188        fn inline_size(_context: fidl::encoding::Context) -> usize {
7189            std::mem::size_of::<u64>()
7190        }
7191
7192        #[inline(always)]
7193        fn encode_is_copy() -> bool {
7194            true
7195        }
7196
7197        #[inline(always)]
7198        fn decode_is_copy() -> bool {
7199            false
7200        }
7201    }
7202
7203    impl fidl::encoding::ValueTypeMarker for StrictEnumUint64 {
7204        type Borrowed<'a> = Self;
7205        #[inline(always)]
7206        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7207            *value
7208        }
7209    }
7210
7211    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7212        for StrictEnumUint64
7213    {
7214        #[inline]
7215        unsafe fn encode(
7216            self,
7217            encoder: &mut fidl::encoding::Encoder<'_, D>,
7218            offset: usize,
7219            _depth: fidl::encoding::Depth,
7220        ) -> fidl::Result<()> {
7221            encoder.debug_check_bounds::<Self>(offset);
7222            encoder.write_num(self.into_primitive(), offset);
7223            Ok(())
7224        }
7225    }
7226
7227    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint64 {
7228        #[inline(always)]
7229        fn new_empty() -> Self {
7230            Self::First
7231        }
7232
7233        #[inline]
7234        unsafe fn decode(
7235            &mut self,
7236            decoder: &mut fidl::encoding::Decoder<'_, D>,
7237            offset: usize,
7238            _depth: fidl::encoding::Depth,
7239        ) -> fidl::Result<()> {
7240            decoder.debug_check_bounds::<Self>(offset);
7241            let prim = decoder.read_num::<u64>(offset);
7242
7243            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7244            Ok(())
7245        }
7246    }
7247    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8 {
7248        type Owned = Self;
7249
7250        #[inline(always)]
7251        fn inline_align(_context: fidl::encoding::Context) -> usize {
7252            std::mem::align_of::<u8>()
7253        }
7254
7255        #[inline(always)]
7256        fn inline_size(_context: fidl::encoding::Context) -> usize {
7257            std::mem::size_of::<u8>()
7258        }
7259
7260        #[inline(always)]
7261        fn encode_is_copy() -> bool {
7262            true
7263        }
7264
7265        #[inline(always)]
7266        fn decode_is_copy() -> bool {
7267            false
7268        }
7269    }
7270
7271    impl fidl::encoding::ValueTypeMarker for StrictEnumUint8 {
7272        type Borrowed<'a> = Self;
7273        #[inline(always)]
7274        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7275            *value
7276        }
7277    }
7278
7279    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7280        for StrictEnumUint8
7281    {
7282        #[inline]
7283        unsafe fn encode(
7284            self,
7285            encoder: &mut fidl::encoding::Encoder<'_, D>,
7286            offset: usize,
7287            _depth: fidl::encoding::Depth,
7288        ) -> fidl::Result<()> {
7289            encoder.debug_check_bounds::<Self>(offset);
7290            encoder.write_num(self.into_primitive(), offset);
7291            Ok(())
7292        }
7293    }
7294
7295    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8 {
7296        #[inline(always)]
7297        fn new_empty() -> Self {
7298            Self::First
7299        }
7300
7301        #[inline]
7302        unsafe fn decode(
7303            &mut self,
7304            decoder: &mut fidl::encoding::Decoder<'_, D>,
7305            offset: usize,
7306            _depth: fidl::encoding::Depth,
7307        ) -> fidl::Result<()> {
7308            decoder.debug_check_bounds::<Self>(offset);
7309            let prim = decoder.read_num::<u8>(offset);
7310
7311            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7312            Ok(())
7313        }
7314    }
7315    unsafe impl fidl::encoding::TypeMarker for UnsignedEnum {
7316        type Owned = Self;
7317
7318        #[inline(always)]
7319        fn inline_align(_context: fidl::encoding::Context) -> usize {
7320            std::mem::align_of::<u16>()
7321        }
7322
7323        #[inline(always)]
7324        fn inline_size(_context: fidl::encoding::Context) -> usize {
7325            std::mem::size_of::<u16>()
7326        }
7327
7328        #[inline(always)]
7329        fn encode_is_copy() -> bool {
7330            false
7331        }
7332
7333        #[inline(always)]
7334        fn decode_is_copy() -> bool {
7335            false
7336        }
7337    }
7338
7339    impl fidl::encoding::ValueTypeMarker for UnsignedEnum {
7340        type Borrowed<'a> = Self;
7341        #[inline(always)]
7342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7343            *value
7344        }
7345    }
7346
7347    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsignedEnum {
7348        #[inline]
7349        unsafe fn encode(
7350            self,
7351            encoder: &mut fidl::encoding::Encoder<'_, D>,
7352            offset: usize,
7353            _depth: fidl::encoding::Depth,
7354        ) -> fidl::Result<()> {
7355            encoder.debug_check_bounds::<Self>(offset);
7356            encoder.write_num(self.into_primitive(), offset);
7357            Ok(())
7358        }
7359    }
7360
7361    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsignedEnum {
7362        #[inline(always)]
7363        fn new_empty() -> Self {
7364            Self::unknown()
7365        }
7366
7367        #[inline]
7368        unsafe fn decode(
7369            &mut self,
7370            decoder: &mut fidl::encoding::Decoder<'_, D>,
7371            offset: usize,
7372            _depth: fidl::encoding::Depth,
7373        ) -> fidl::Result<()> {
7374            decoder.debug_check_bounds::<Self>(offset);
7375            let prim = decoder.read_num::<u16>(offset);
7376
7377            *self = Self::from_primitive_allow_unknown(prim);
7378            Ok(())
7379        }
7380    }
7381    unsafe impl fidl::encoding::TypeMarker for ObjType {
7382        type Owned = Self;
7383
7384        #[inline(always)]
7385        fn inline_align(_context: fidl::encoding::Context) -> usize {
7386            std::mem::align_of::<u32>()
7387        }
7388
7389        #[inline(always)]
7390        fn inline_size(_context: fidl::encoding::Context) -> usize {
7391            std::mem::size_of::<u32>()
7392        }
7393
7394        #[inline(always)]
7395        fn encode_is_copy() -> bool {
7396            true
7397        }
7398
7399        #[inline(always)]
7400        fn decode_is_copy() -> bool {
7401            false
7402        }
7403    }
7404
7405    impl fidl::encoding::ValueTypeMarker for ObjType {
7406        type Borrowed<'a> = Self;
7407        #[inline(always)]
7408        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7409            *value
7410        }
7411    }
7412
7413    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ObjType {
7414        #[inline]
7415        unsafe fn encode(
7416            self,
7417            encoder: &mut fidl::encoding::Encoder<'_, D>,
7418            offset: usize,
7419            _depth: fidl::encoding::Depth,
7420        ) -> fidl::Result<()> {
7421            encoder.debug_check_bounds::<Self>(offset);
7422            encoder.write_num(self.into_primitive(), offset);
7423            Ok(())
7424        }
7425    }
7426
7427    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ObjType {
7428        #[inline(always)]
7429        fn new_empty() -> Self {
7430            Self::None
7431        }
7432
7433        #[inline]
7434        unsafe fn decode(
7435            &mut self,
7436            decoder: &mut fidl::encoding::Decoder<'_, D>,
7437            offset: usize,
7438            _depth: fidl::encoding::Depth,
7439        ) -> fidl::Result<()> {
7440            decoder.debug_check_bounds::<Self>(offset);
7441            let prim = decoder.read_num::<u32>(offset);
7442
7443            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7444            Ok(())
7445        }
7446    }
7447
7448    impl fidl::encoding::ValueTypeMarker for AliasedBool {
7449        type Borrowed<'a> = &'a Self;
7450        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7451            value
7452        }
7453    }
7454
7455    unsafe impl fidl::encoding::TypeMarker for AliasedBool {
7456        type Owned = Self;
7457
7458        #[inline(always)]
7459        fn inline_align(_context: fidl::encoding::Context) -> usize {
7460            1
7461        }
7462
7463        #[inline(always)]
7464        fn inline_size(_context: fidl::encoding::Context) -> usize {
7465            1
7466        }
7467    }
7468
7469    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedBool, D>
7470        for &AliasedBool
7471    {
7472        #[inline]
7473        unsafe fn encode(
7474            self,
7475            encoder: &mut fidl::encoding::Encoder<'_, D>,
7476            offset: usize,
7477            _depth: fidl::encoding::Depth,
7478        ) -> fidl::Result<()> {
7479            encoder.debug_check_bounds::<AliasedBool>(offset);
7480            // Delegate to tuple encoding.
7481            fidl::encoding::Encode::<AliasedBool, D>::encode(
7482                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7483                encoder,
7484                offset,
7485                _depth,
7486            )
7487        }
7488    }
7489    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7490        fidl::encoding::Encode<AliasedBool, D> for (T0,)
7491    {
7492        #[inline]
7493        unsafe fn encode(
7494            self,
7495            encoder: &mut fidl::encoding::Encoder<'_, D>,
7496            offset: usize,
7497            depth: fidl::encoding::Depth,
7498        ) -> fidl::Result<()> {
7499            encoder.debug_check_bounds::<AliasedBool>(offset);
7500            // Zero out padding regions. There's no need to apply masks
7501            // because the unmasked parts will be overwritten by fields.
7502            // Write the fields.
7503            self.0.encode(encoder, offset + 0, depth)?;
7504            Ok(())
7505        }
7506    }
7507
7508    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedBool {
7509        #[inline(always)]
7510        fn new_empty() -> Self {
7511            Self { value: fidl::new_empty!(bool, D) }
7512        }
7513
7514        #[inline]
7515        unsafe fn decode(
7516            &mut self,
7517            decoder: &mut fidl::encoding::Decoder<'_, D>,
7518            offset: usize,
7519            _depth: fidl::encoding::Depth,
7520        ) -> fidl::Result<()> {
7521            decoder.debug_check_bounds::<Self>(offset);
7522            // Verify that padding bytes are zero.
7523            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7524            Ok(())
7525        }
7526    }
7527
7528    impl fidl::encoding::ValueTypeMarker for AliasedFloat64 {
7529        type Borrowed<'a> = &'a Self;
7530        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7531            value
7532        }
7533    }
7534
7535    unsafe impl fidl::encoding::TypeMarker for AliasedFloat64 {
7536        type Owned = Self;
7537
7538        #[inline(always)]
7539        fn inline_align(_context: fidl::encoding::Context) -> usize {
7540            8
7541        }
7542
7543        #[inline(always)]
7544        fn inline_size(_context: fidl::encoding::Context) -> usize {
7545            8
7546        }
7547    }
7548
7549    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedFloat64, D>
7550        for &AliasedFloat64
7551    {
7552        #[inline]
7553        unsafe fn encode(
7554            self,
7555            encoder: &mut fidl::encoding::Encoder<'_, D>,
7556            offset: usize,
7557            _depth: fidl::encoding::Depth,
7558        ) -> fidl::Result<()> {
7559            encoder.debug_check_bounds::<AliasedFloat64>(offset);
7560            // Delegate to tuple encoding.
7561            fidl::encoding::Encode::<AliasedFloat64, D>::encode(
7562                (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7563                encoder,
7564                offset,
7565                _depth,
7566            )
7567        }
7568    }
7569    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
7570        fidl::encoding::Encode<AliasedFloat64, D> for (T0,)
7571    {
7572        #[inline]
7573        unsafe fn encode(
7574            self,
7575            encoder: &mut fidl::encoding::Encoder<'_, D>,
7576            offset: usize,
7577            depth: fidl::encoding::Depth,
7578        ) -> fidl::Result<()> {
7579            encoder.debug_check_bounds::<AliasedFloat64>(offset);
7580            // Zero out padding regions. There's no need to apply masks
7581            // because the unmasked parts will be overwritten by fields.
7582            // Write the fields.
7583            self.0.encode(encoder, offset + 0, depth)?;
7584            Ok(())
7585        }
7586    }
7587
7588    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedFloat64 {
7589        #[inline(always)]
7590        fn new_empty() -> Self {
7591            Self { value: fidl::new_empty!(f64, D) }
7592        }
7593
7594        #[inline]
7595        unsafe fn decode(
7596            &mut self,
7597            decoder: &mut fidl::encoding::Decoder<'_, D>,
7598            offset: usize,
7599            _depth: fidl::encoding::Depth,
7600        ) -> fidl::Result<()> {
7601            decoder.debug_check_bounds::<Self>(offset);
7602            // Verify that padding bytes are zero.
7603            fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
7604            Ok(())
7605        }
7606    }
7607
7608    impl fidl::encoding::ValueTypeMarker for AliasedString {
7609        type Borrowed<'a> = &'a Self;
7610        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7611            value
7612        }
7613    }
7614
7615    unsafe impl fidl::encoding::TypeMarker for AliasedString {
7616        type Owned = Self;
7617
7618        #[inline(always)]
7619        fn inline_align(_context: fidl::encoding::Context) -> usize {
7620            8
7621        }
7622
7623        #[inline(always)]
7624        fn inline_size(_context: fidl::encoding::Context) -> usize {
7625            16
7626        }
7627    }
7628
7629    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedString, D>
7630        for &AliasedString
7631    {
7632        #[inline]
7633        unsafe fn encode(
7634            self,
7635            encoder: &mut fidl::encoding::Encoder<'_, D>,
7636            offset: usize,
7637            _depth: fidl::encoding::Depth,
7638        ) -> fidl::Result<()> {
7639            encoder.debug_check_bounds::<AliasedString>(offset);
7640            // Delegate to tuple encoding.
7641            fidl::encoding::Encode::<AliasedString, D>::encode(
7642                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
7643                    &self.value,
7644                ),),
7645                encoder,
7646                offset,
7647                _depth,
7648            )
7649        }
7650    }
7651    unsafe impl<
7652        D: fidl::encoding::ResourceDialect,
7653        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
7654    > fidl::encoding::Encode<AliasedString, D> for (T0,)
7655    {
7656        #[inline]
7657        unsafe fn encode(
7658            self,
7659            encoder: &mut fidl::encoding::Encoder<'_, D>,
7660            offset: usize,
7661            depth: fidl::encoding::Depth,
7662        ) -> fidl::Result<()> {
7663            encoder.debug_check_bounds::<AliasedString>(offset);
7664            // Zero out padding regions. There's no need to apply masks
7665            // because the unmasked parts will be overwritten by fields.
7666            // Write the fields.
7667            self.0.encode(encoder, offset + 0, depth)?;
7668            Ok(())
7669        }
7670    }
7671
7672    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedString {
7673        #[inline(always)]
7674        fn new_empty() -> Self {
7675            Self { value: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
7676        }
7677
7678        #[inline]
7679        unsafe fn decode(
7680            &mut self,
7681            decoder: &mut fidl::encoding::Decoder<'_, D>,
7682            offset: usize,
7683            _depth: fidl::encoding::Depth,
7684        ) -> fidl::Result<()> {
7685            decoder.debug_check_bounds::<Self>(offset);
7686            // Verify that padding bytes are zero.
7687            fidl::decode!(
7688                fidl::encoding::UnboundedString,
7689                D,
7690                &mut self.value,
7691                decoder,
7692                offset + 0,
7693                _depth
7694            )?;
7695            Ok(())
7696        }
7697    }
7698
7699    impl fidl::encoding::ValueTypeMarker for AliasedStruct {
7700        type Borrowed<'a> = &'a Self;
7701        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7702            value
7703        }
7704    }
7705
7706    unsafe impl fidl::encoding::TypeMarker for AliasedStruct {
7707        type Owned = Self;
7708
7709        #[inline(always)]
7710        fn inline_align(_context: fidl::encoding::Context) -> usize {
7711            1
7712        }
7713
7714        #[inline(always)]
7715        fn inline_size(_context: fidl::encoding::Context) -> usize {
7716            1
7717        }
7718    }
7719
7720    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedStruct, D>
7721        for &AliasedStruct
7722    {
7723        #[inline]
7724        unsafe fn encode(
7725            self,
7726            encoder: &mut fidl::encoding::Encoder<'_, D>,
7727            offset: usize,
7728            _depth: fidl::encoding::Depth,
7729        ) -> fidl::Result<()> {
7730            encoder.debug_check_bounds::<AliasedStruct>(offset);
7731            // Delegate to tuple encoding.
7732            fidl::encoding::Encode::<AliasedStruct, D>::encode(
7733                (<AnotherEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7734                encoder,
7735                offset,
7736                _depth,
7737            )
7738        }
7739    }
7740    unsafe impl<
7741        D: fidl::encoding::ResourceDialect,
7742        T0: fidl::encoding::Encode<AnotherEmptyStruct, D>,
7743    > fidl::encoding::Encode<AliasedStruct, D> for (T0,)
7744    {
7745        #[inline]
7746        unsafe fn encode(
7747            self,
7748            encoder: &mut fidl::encoding::Encoder<'_, D>,
7749            offset: usize,
7750            depth: fidl::encoding::Depth,
7751        ) -> fidl::Result<()> {
7752            encoder.debug_check_bounds::<AliasedStruct>(offset);
7753            // Zero out padding regions. There's no need to apply masks
7754            // because the unmasked parts will be overwritten by fields.
7755            // Write the fields.
7756            self.0.encode(encoder, offset + 0, depth)?;
7757            Ok(())
7758        }
7759    }
7760
7761    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedStruct {
7762        #[inline(always)]
7763        fn new_empty() -> Self {
7764            Self { value: fidl::new_empty!(AnotherEmptyStruct, D) }
7765        }
7766
7767        #[inline]
7768        unsafe fn decode(
7769            &mut self,
7770            decoder: &mut fidl::encoding::Decoder<'_, D>,
7771            offset: usize,
7772            _depth: fidl::encoding::Depth,
7773        ) -> fidl::Result<()> {
7774            decoder.debug_check_bounds::<Self>(offset);
7775            // Verify that padding bytes are zero.
7776            fidl::decode!(AnotherEmptyStruct, D, &mut self.value, decoder, offset + 0, _depth)?;
7777            Ok(())
7778        }
7779    }
7780
7781    impl fidl::encoding::ValueTypeMarker for AliasedUint64 {
7782        type Borrowed<'a> = &'a Self;
7783        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7784            value
7785        }
7786    }
7787
7788    unsafe impl fidl::encoding::TypeMarker for AliasedUint64 {
7789        type Owned = Self;
7790
7791        #[inline(always)]
7792        fn inline_align(_context: fidl::encoding::Context) -> usize {
7793            8
7794        }
7795
7796        #[inline(always)]
7797        fn inline_size(_context: fidl::encoding::Context) -> usize {
7798            8
7799        }
7800        #[inline(always)]
7801        fn encode_is_copy() -> bool {
7802            true
7803        }
7804
7805        #[inline(always)]
7806        fn decode_is_copy() -> bool {
7807            true
7808        }
7809    }
7810
7811    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedUint64, D>
7812        for &AliasedUint64
7813    {
7814        #[inline]
7815        unsafe fn encode(
7816            self,
7817            encoder: &mut fidl::encoding::Encoder<'_, D>,
7818            offset: usize,
7819            _depth: fidl::encoding::Depth,
7820        ) -> fidl::Result<()> {
7821            encoder.debug_check_bounds::<AliasedUint64>(offset);
7822            unsafe {
7823                // Copy the object into the buffer.
7824                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7825                (buf_ptr as *mut AliasedUint64)
7826                    .write_unaligned((self as *const AliasedUint64).read());
7827                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7828                // done second because the memcpy will write garbage to these bytes.
7829            }
7830            Ok(())
7831        }
7832    }
7833    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7834        fidl::encoding::Encode<AliasedUint64, D> for (T0,)
7835    {
7836        #[inline]
7837        unsafe fn encode(
7838            self,
7839            encoder: &mut fidl::encoding::Encoder<'_, D>,
7840            offset: usize,
7841            depth: fidl::encoding::Depth,
7842        ) -> fidl::Result<()> {
7843            encoder.debug_check_bounds::<AliasedUint64>(offset);
7844            // Zero out padding regions. There's no need to apply masks
7845            // because the unmasked parts will be overwritten by fields.
7846            // Write the fields.
7847            self.0.encode(encoder, offset + 0, depth)?;
7848            Ok(())
7849        }
7850    }
7851
7852    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedUint64 {
7853        #[inline(always)]
7854        fn new_empty() -> Self {
7855            Self { value: fidl::new_empty!(u64, D) }
7856        }
7857
7858        #[inline]
7859        unsafe fn decode(
7860            &mut self,
7861            decoder: &mut fidl::encoding::Decoder<'_, D>,
7862            offset: usize,
7863            _depth: fidl::encoding::Depth,
7864        ) -> fidl::Result<()> {
7865            decoder.debug_check_bounds::<Self>(offset);
7866            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7867            // Verify that padding bytes are zero.
7868            // Copy from the buffer into the object.
7869            unsafe {
7870                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7871            }
7872            Ok(())
7873        }
7874    }
7875
7876    impl fidl::encoding::ValueTypeMarker for AnEmptyStructInStruct {
7877        type Borrowed<'a> = &'a Self;
7878        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7879            value
7880        }
7881    }
7882
7883    unsafe impl fidl::encoding::TypeMarker for AnEmptyStructInStruct {
7884        type Owned = Self;
7885
7886        #[inline(always)]
7887        fn inline_align(_context: fidl::encoding::Context) -> usize {
7888            1
7889        }
7890
7891        #[inline(always)]
7892        fn inline_size(_context: fidl::encoding::Context) -> usize {
7893            1
7894        }
7895    }
7896
7897    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnEmptyStructInStruct, D>
7898        for &AnEmptyStructInStruct
7899    {
7900        #[inline]
7901        unsafe fn encode(
7902            self,
7903            encoder: &mut fidl::encoding::Encoder<'_, D>,
7904            offset: usize,
7905            _depth: fidl::encoding::Depth,
7906        ) -> fidl::Result<()> {
7907            encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7908            // Delegate to tuple encoding.
7909            fidl::encoding::Encode::<AnEmptyStructInStruct, D>::encode(
7910                (<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
7911                encoder,
7912                offset,
7913                _depth,
7914            )
7915        }
7916    }
7917    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStruct, D>>
7918        fidl::encoding::Encode<AnEmptyStructInStruct, D> for (T0,)
7919    {
7920        #[inline]
7921        unsafe fn encode(
7922            self,
7923            encoder: &mut fidl::encoding::Encoder<'_, D>,
7924            offset: usize,
7925            depth: fidl::encoding::Depth,
7926        ) -> fidl::Result<()> {
7927            encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7928            // Zero out padding regions. There's no need to apply masks
7929            // because the unmasked parts will be overwritten by fields.
7930            // Write the fields.
7931            self.0.encode(encoder, offset + 0, depth)?;
7932            Ok(())
7933        }
7934    }
7935
7936    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnEmptyStructInStruct {
7937        #[inline(always)]
7938        fn new_empty() -> Self {
7939            Self { v: fidl::new_empty!(EmptyStruct, D) }
7940        }
7941
7942        #[inline]
7943        unsafe fn decode(
7944            &mut self,
7945            decoder: &mut fidl::encoding::Decoder<'_, D>,
7946            offset: usize,
7947            _depth: fidl::encoding::Depth,
7948        ) -> fidl::Result<()> {
7949            decoder.debug_check_bounds::<Self>(offset);
7950            // Verify that padding bytes are zero.
7951            fidl::decode!(EmptyStruct, D, &mut self.v, decoder, offset + 0, _depth)?;
7952            Ok(())
7953        }
7954    }
7955
7956    impl fidl::encoding::ValueTypeMarker for AnotherEmptyStruct {
7957        type Borrowed<'a> = &'a Self;
7958        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7959            value
7960        }
7961    }
7962
7963    unsafe impl fidl::encoding::TypeMarker for AnotherEmptyStruct {
7964        type Owned = Self;
7965
7966        #[inline(always)]
7967        fn inline_align(_context: fidl::encoding::Context) -> usize {
7968            1
7969        }
7970
7971        #[inline(always)]
7972        fn inline_size(_context: fidl::encoding::Context) -> usize {
7973            1
7974        }
7975    }
7976
7977    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnotherEmptyStruct, D>
7978        for &AnotherEmptyStruct
7979    {
7980        #[inline]
7981        unsafe fn encode(
7982            self,
7983            encoder: &mut fidl::encoding::Encoder<'_, D>,
7984            offset: usize,
7985            _depth: fidl::encoding::Depth,
7986        ) -> fidl::Result<()> {
7987            encoder.debug_check_bounds::<AnotherEmptyStruct>(offset);
7988            encoder.write_num(0u8, offset);
7989            Ok(())
7990        }
7991    }
7992
7993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnotherEmptyStruct {
7994        #[inline(always)]
7995        fn new_empty() -> Self {
7996            Self
7997        }
7998
7999        #[inline]
8000        unsafe fn decode(
8001            &mut self,
8002            decoder: &mut fidl::encoding::Decoder<'_, D>,
8003            offset: usize,
8004            _depth: fidl::encoding::Depth,
8005        ) -> fidl::Result<()> {
8006            decoder.debug_check_bounds::<Self>(offset);
8007            match decoder.read_num::<u8>(offset) {
8008                0 => Ok(()),
8009                _ => Err(fidl::Error::Invalid),
8010            }
8011        }
8012    }
8013
8014    impl fidl::encoding::ValueTypeMarker for ArrayStruct {
8015        type Borrowed<'a> = &'a Self;
8016        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8017            value
8018        }
8019    }
8020
8021    unsafe impl fidl::encoding::TypeMarker for ArrayStruct {
8022        type Owned = Self;
8023
8024        #[inline(always)]
8025        fn inline_align(_context: fidl::encoding::Context) -> usize {
8026            8
8027        }
8028
8029        #[inline(always)]
8030        fn inline_size(_context: fidl::encoding::Context) -> usize {
8031            96
8032        }
8033    }
8034
8035    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArrayStruct, D>
8036        for &ArrayStruct
8037    {
8038        #[inline]
8039        unsafe fn encode(
8040            self,
8041            encoder: &mut fidl::encoding::Encoder<'_, D>,
8042            offset: usize,
8043            _depth: fidl::encoding::Depth,
8044        ) -> fidl::Result<()> {
8045            encoder.debug_check_bounds::<ArrayStruct>(offset);
8046            // Delegate to tuple encoding.
8047            fidl::encoding::Encode::<ArrayStruct, D>::encode(
8048                (
8049                    <fidl::encoding::Array<StringUnion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
8050                    <fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.optional_unions),
8051                ),
8052                encoder, offset, _depth
8053            )
8054        }
8055    }
8056    unsafe impl<
8057        D: fidl::encoding::ResourceDialect,
8058        T0: fidl::encoding::Encode<fidl::encoding::Array<StringUnion, 3>, D>,
8059        T1: fidl::encoding::Encode<
8060                fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
8061                D,
8062            >,
8063    > fidl::encoding::Encode<ArrayStruct, D> for (T0, T1)
8064    {
8065        #[inline]
8066        unsafe fn encode(
8067            self,
8068            encoder: &mut fidl::encoding::Encoder<'_, D>,
8069            offset: usize,
8070            depth: fidl::encoding::Depth,
8071        ) -> fidl::Result<()> {
8072            encoder.debug_check_bounds::<ArrayStruct>(offset);
8073            // Zero out padding regions. There's no need to apply masks
8074            // because the unmasked parts will be overwritten by fields.
8075            // Write the fields.
8076            self.0.encode(encoder, offset + 0, depth)?;
8077            self.1.encode(encoder, offset + 48, depth)?;
8078            Ok(())
8079        }
8080    }
8081
8082    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArrayStruct {
8083        #[inline(always)]
8084        fn new_empty() -> Self {
8085            Self {
8086                unions: fidl::new_empty!(fidl::encoding::Array<StringUnion, 3>, D),
8087                optional_unions: fidl::new_empty!(
8088                    fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
8089                    D
8090                ),
8091            }
8092        }
8093
8094        #[inline]
8095        unsafe fn decode(
8096            &mut self,
8097            decoder: &mut fidl::encoding::Decoder<'_, D>,
8098            offset: usize,
8099            _depth: fidl::encoding::Depth,
8100        ) -> fidl::Result<()> {
8101            decoder.debug_check_bounds::<Self>(offset);
8102            // Verify that padding bytes are zero.
8103            fidl::decode!(fidl::encoding::Array<StringUnion, 3>, D, &mut self.unions, decoder, offset + 0, _depth)?;
8104            fidl::decode!(
8105                fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
8106                D,
8107                &mut self.optional_unions,
8108                decoder,
8109                offset + 48,
8110                _depth
8111            )?;
8112            Ok(())
8113        }
8114    }
8115
8116    impl fidl::encoding::ValueTypeMarker for ArrayWithInternalPadding {
8117        type Borrowed<'a> = &'a Self;
8118        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8119            value
8120        }
8121    }
8122
8123    unsafe impl fidl::encoding::TypeMarker for ArrayWithInternalPadding {
8124        type Owned = Self;
8125
8126        #[inline(always)]
8127        fn inline_align(_context: fidl::encoding::Context) -> usize {
8128            4
8129        }
8130
8131        #[inline(always)]
8132        fn inline_size(_context: fidl::encoding::Context) -> usize {
8133            16
8134        }
8135    }
8136
8137    unsafe impl<D: fidl::encoding::ResourceDialect>
8138        fidl::encoding::Encode<ArrayWithInternalPadding, D> for &ArrayWithInternalPadding
8139    {
8140        #[inline]
8141        unsafe fn encode(
8142            self,
8143            encoder: &mut fidl::encoding::Encoder<'_, D>,
8144            offset: usize,
8145            _depth: fidl::encoding::Depth,
8146        ) -> fidl::Result<()> {
8147            encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
8148            unsafe {
8149                // Copy the object into the buffer.
8150                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8151                (buf_ptr as *mut ArrayWithInternalPadding)
8152                    .write_unaligned((self as *const ArrayWithInternalPadding).read());
8153                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8154                // done second because the memcpy will write garbage to these bytes.
8155                let padding_ptr = buf_ptr.offset(0) as *mut u32;
8156                let padding_mask = 0xff000000u32;
8157                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
8158                let padding_ptr = buf_ptr.offset(8) as *mut u32;
8159                let padding_mask = 0xff000000u32;
8160                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
8161            }
8162            Ok(())
8163        }
8164    }
8165    unsafe impl<
8166        D: fidl::encoding::ResourceDialect,
8167        T0: fidl::encoding::Encode<fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D>,
8168    > fidl::encoding::Encode<ArrayWithInternalPadding, D> for (T0,)
8169    {
8170        #[inline]
8171        unsafe fn encode(
8172            self,
8173            encoder: &mut fidl::encoding::Encoder<'_, D>,
8174            offset: usize,
8175            depth: fidl::encoding::Depth,
8176        ) -> fidl::Result<()> {
8177            encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
8178            // Zero out padding regions. There's no need to apply masks
8179            // because the unmasked parts will be overwritten by fields.
8180            // Write the fields.
8181            self.0.encode(encoder, offset + 0, depth)?;
8182            Ok(())
8183        }
8184    }
8185
8186    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8187        for ArrayWithInternalPadding
8188    {
8189        #[inline(always)]
8190        fn new_empty() -> Self {
8191            Self {
8192                v: fidl::new_empty!(fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D),
8193            }
8194        }
8195
8196        #[inline]
8197        unsafe fn decode(
8198            &mut self,
8199            decoder: &mut fidl::encoding::Decoder<'_, D>,
8200            offset: usize,
8201            _depth: fidl::encoding::Depth,
8202        ) -> fidl::Result<()> {
8203            decoder.debug_check_bounds::<Self>(offset);
8204            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8205            // Verify that padding bytes are zero.
8206            let ptr = unsafe { buf_ptr.offset(0) };
8207            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8208            let mask = 0xff000000u32;
8209            let maskedval = padval & mask;
8210            if maskedval != 0 {
8211                return Err(fidl::Error::NonZeroPadding {
8212                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8213                });
8214            }
8215            let ptr = unsafe { buf_ptr.offset(8) };
8216            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8217            let mask = 0xff000000u32;
8218            let maskedval = padval & mask;
8219            if maskedval != 0 {
8220                return Err(fidl::Error::NonZeroPadding {
8221                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8222                });
8223            }
8224            // Copy from the buffer into the object.
8225            unsafe {
8226                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
8227            }
8228            Ok(())
8229        }
8230    }
8231
8232    impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableString {
8233        type Borrowed<'a> = &'a Self;
8234        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8235            value
8236        }
8237    }
8238
8239    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableString {
8240        type Owned = Self;
8241
8242        #[inline(always)]
8243        fn inline_align(_context: fidl::encoding::Context) -> usize {
8244            8
8245        }
8246
8247        #[inline(always)]
8248        fn inline_size(_context: fidl::encoding::Context) -> usize {
8249            16
8250        }
8251    }
8252
8253    unsafe impl<D: fidl::encoding::ResourceDialect>
8254        fidl::encoding::Encode<Bounded32NonnullableString, D> for &Bounded32NonnullableString
8255    {
8256        #[inline]
8257        unsafe fn encode(
8258            self,
8259            encoder: &mut fidl::encoding::Encoder<'_, D>,
8260            offset: usize,
8261            _depth: fidl::encoding::Depth,
8262        ) -> fidl::Result<()> {
8263            encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8264            // Delegate to tuple encoding.
8265            fidl::encoding::Encode::<Bounded32NonnullableString, D>::encode(
8266                (<fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
8267                    &self.s0,
8268                ),),
8269                encoder,
8270                offset,
8271                _depth,
8272            )
8273        }
8274    }
8275    unsafe impl<
8276        D: fidl::encoding::ResourceDialect,
8277        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
8278    > fidl::encoding::Encode<Bounded32NonnullableString, D> for (T0,)
8279    {
8280        #[inline]
8281        unsafe fn encode(
8282            self,
8283            encoder: &mut fidl::encoding::Encoder<'_, D>,
8284            offset: usize,
8285            depth: fidl::encoding::Depth,
8286        ) -> fidl::Result<()> {
8287            encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8288            // Zero out padding regions. There's no need to apply masks
8289            // because the unmasked parts will be overwritten by fields.
8290            // Write the fields.
8291            self.0.encode(encoder, offset + 0, depth)?;
8292            Ok(())
8293        }
8294    }
8295
8296    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8297        for Bounded32NonnullableString
8298    {
8299        #[inline(always)]
8300        fn new_empty() -> Self {
8301            Self { s0: fidl::new_empty!(fidl::encoding::BoundedString<32>, D) }
8302        }
8303
8304        #[inline]
8305        unsafe fn decode(
8306            &mut self,
8307            decoder: &mut fidl::encoding::Decoder<'_, D>,
8308            offset: usize,
8309            _depth: fidl::encoding::Depth,
8310        ) -> fidl::Result<()> {
8311            decoder.debug_check_bounds::<Self>(offset);
8312            // Verify that padding bytes are zero.
8313            fidl::decode!(
8314                fidl::encoding::BoundedString<32>,
8315                D,
8316                &mut self.s0,
8317                decoder,
8318                offset + 0,
8319                _depth
8320            )?;
8321            Ok(())
8322        }
8323    }
8324
8325    impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableVectorOfUint32s {
8326        type Borrowed<'a> = &'a Self;
8327        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8328            value
8329        }
8330    }
8331
8332    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfUint32s {
8333        type Owned = Self;
8334
8335        #[inline(always)]
8336        fn inline_align(_context: fidl::encoding::Context) -> usize {
8337            8
8338        }
8339
8340        #[inline(always)]
8341        fn inline_size(_context: fidl::encoding::Context) -> usize {
8342            16
8343        }
8344    }
8345
8346    unsafe impl<D: fidl::encoding::ResourceDialect>
8347        fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D>
8348        for &Bounded32NonnullableVectorOfUint32s
8349    {
8350        #[inline]
8351        unsafe fn encode(
8352            self,
8353            encoder: &mut fidl::encoding::Encoder<'_, D>,
8354            offset: usize,
8355            _depth: fidl::encoding::Depth,
8356        ) -> fidl::Result<()> {
8357            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8358            // Delegate to tuple encoding.
8359            fidl::encoding::Encode::<Bounded32NonnullableVectorOfUint32s, D>::encode(
8360                (<fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
8361                    &self.vu0,
8362                ),),
8363                encoder,
8364                offset,
8365                _depth,
8366            )
8367        }
8368    }
8369    unsafe impl<
8370        D: fidl::encoding::ResourceDialect,
8371        T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
8372    > fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D> for (T0,)
8373    {
8374        #[inline]
8375        unsafe fn encode(
8376            self,
8377            encoder: &mut fidl::encoding::Encoder<'_, D>,
8378            offset: usize,
8379            depth: fidl::encoding::Depth,
8380        ) -> fidl::Result<()> {
8381            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8382            // Zero out padding regions. There's no need to apply masks
8383            // because the unmasked parts will be overwritten by fields.
8384            // Write the fields.
8385            self.0.encode(encoder, offset + 0, depth)?;
8386            Ok(())
8387        }
8388    }
8389
8390    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8391        for Bounded32NonnullableVectorOfUint32s
8392    {
8393        #[inline(always)]
8394        fn new_empty() -> Self {
8395            Self { vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D) }
8396        }
8397
8398        #[inline]
8399        unsafe fn decode(
8400            &mut self,
8401            decoder: &mut fidl::encoding::Decoder<'_, D>,
8402            offset: usize,
8403            _depth: fidl::encoding::Depth,
8404        ) -> fidl::Result<()> {
8405            decoder.debug_check_bounds::<Self>(offset);
8406            // Verify that padding bytes are zero.
8407            fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
8408            Ok(())
8409        }
8410    }
8411
8412    impl fidl::encoding::ValueTypeMarker for Bounded32NullableString {
8413        type Borrowed<'a> = &'a Self;
8414        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8415            value
8416        }
8417    }
8418
8419    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableString {
8420        type Owned = Self;
8421
8422        #[inline(always)]
8423        fn inline_align(_context: fidl::encoding::Context) -> usize {
8424            8
8425        }
8426
8427        #[inline(always)]
8428        fn inline_size(_context: fidl::encoding::Context) -> usize {
8429            16
8430        }
8431    }
8432
8433    unsafe impl<D: fidl::encoding::ResourceDialect>
8434        fidl::encoding::Encode<Bounded32NullableString, D> for &Bounded32NullableString
8435    {
8436        #[inline]
8437        unsafe fn encode(
8438            self,
8439            encoder: &mut fidl::encoding::Encoder<'_, D>,
8440            offset: usize,
8441            _depth: fidl::encoding::Depth,
8442        ) -> fidl::Result<()> {
8443            encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8444            // Delegate to tuple encoding.
8445            fidl::encoding::Encode::<Bounded32NullableString, D>::encode(
8446                (
8447                    <fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
8448                ),
8449                encoder, offset, _depth
8450            )
8451        }
8452    }
8453    unsafe impl<
8454        D: fidl::encoding::ResourceDialect,
8455        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
8456    > fidl::encoding::Encode<Bounded32NullableString, D> for (T0,)
8457    {
8458        #[inline]
8459        unsafe fn encode(
8460            self,
8461            encoder: &mut fidl::encoding::Encoder<'_, D>,
8462            offset: usize,
8463            depth: fidl::encoding::Depth,
8464        ) -> fidl::Result<()> {
8465            encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8466            // Zero out padding regions. There's no need to apply masks
8467            // because the unmasked parts will be overwritten by fields.
8468            // Write the fields.
8469            self.0.encode(encoder, offset + 0, depth)?;
8470            Ok(())
8471        }
8472    }
8473
8474    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8475        for Bounded32NullableString
8476    {
8477        #[inline(always)]
8478        fn new_empty() -> Self {
8479            Self {
8480                s0: fidl::new_empty!(
8481                    fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8482                    D
8483                ),
8484            }
8485        }
8486
8487        #[inline]
8488        unsafe fn decode(
8489            &mut self,
8490            decoder: &mut fidl::encoding::Decoder<'_, D>,
8491            offset: usize,
8492            _depth: fidl::encoding::Depth,
8493        ) -> fidl::Result<()> {
8494            decoder.debug_check_bounds::<Self>(offset);
8495            // Verify that padding bytes are zero.
8496            fidl::decode!(
8497                fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8498                D,
8499                &mut self.s0,
8500                decoder,
8501                offset + 0,
8502                _depth
8503            )?;
8504            Ok(())
8505        }
8506    }
8507
8508    impl fidl::encoding::ValueTypeMarker for Bounded32NullableVectorOfUint32s {
8509        type Borrowed<'a> = &'a Self;
8510        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8511            value
8512        }
8513    }
8514
8515    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfUint32s {
8516        type Owned = Self;
8517
8518        #[inline(always)]
8519        fn inline_align(_context: fidl::encoding::Context) -> usize {
8520            8
8521        }
8522
8523        #[inline(always)]
8524        fn inline_size(_context: fidl::encoding::Context) -> usize {
8525            16
8526        }
8527    }
8528
8529    unsafe impl<D: fidl::encoding::ResourceDialect>
8530        fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D>
8531        for &Bounded32NullableVectorOfUint32s
8532    {
8533        #[inline]
8534        unsafe fn encode(
8535            self,
8536            encoder: &mut fidl::encoding::Encoder<'_, D>,
8537            offset: usize,
8538            _depth: fidl::encoding::Depth,
8539        ) -> fidl::Result<()> {
8540            encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8541            // Delegate to tuple encoding.
8542            fidl::encoding::Encode::<Bounded32NullableVectorOfUint32s, D>::encode(
8543                (
8544                    <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
8545                ),
8546                encoder, offset, _depth
8547            )
8548        }
8549    }
8550    unsafe impl<
8551        D: fidl::encoding::ResourceDialect,
8552        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
8553    > fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D> for (T0,)
8554    {
8555        #[inline]
8556        unsafe fn encode(
8557            self,
8558            encoder: &mut fidl::encoding::Encoder<'_, D>,
8559            offset: usize,
8560            depth: fidl::encoding::Depth,
8561        ) -> fidl::Result<()> {
8562            encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8563            // Zero out padding regions. There's no need to apply masks
8564            // because the unmasked parts will be overwritten by fields.
8565            // Write the fields.
8566            self.0.encode(encoder, offset + 0, depth)?;
8567            Ok(())
8568        }
8569    }
8570
8571    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8572        for Bounded32NullableVectorOfUint32s
8573    {
8574        #[inline(always)]
8575        fn new_empty() -> Self {
8576            Self {
8577                vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
8578            }
8579        }
8580
8581        #[inline]
8582        unsafe fn decode(
8583            &mut self,
8584            decoder: &mut fidl::encoding::Decoder<'_, D>,
8585            offset: usize,
8586            _depth: fidl::encoding::Depth,
8587        ) -> fidl::Result<()> {
8588            decoder.debug_check_bounds::<Self>(offset);
8589            // Verify that padding bytes are zero.
8590            fidl::decode!(
8591                fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
8592                D,
8593                &mut self.vu0,
8594                decoder,
8595                offset + 0,
8596                _depth
8597            )?;
8598            Ok(())
8599        }
8600    }
8601
8602    impl fidl::encoding::ValueTypeMarker for CompatTable {
8603        type Borrowed<'a> = &'a Self;
8604        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8605            value
8606        }
8607    }
8608
8609    unsafe impl fidl::encoding::TypeMarker for CompatTable {
8610        type Owned = Self;
8611
8612        #[inline(always)]
8613        fn inline_align(_context: fidl::encoding::Context) -> usize {
8614            8
8615        }
8616
8617        #[inline(always)]
8618        fn inline_size(_context: fidl::encoding::Context) -> usize {
8619            32
8620        }
8621    }
8622
8623    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTable, D>
8624        for &CompatTable
8625    {
8626        #[inline]
8627        unsafe fn encode(
8628            self,
8629            encoder: &mut fidl::encoding::Encoder<'_, D>,
8630            offset: usize,
8631            _depth: fidl::encoding::Depth,
8632        ) -> fidl::Result<()> {
8633            encoder.debug_check_bounds::<CompatTable>(offset);
8634            // Delegate to tuple encoding.
8635            fidl::encoding::Encode::<CompatTable, D>::encode(
8636                (
8637                    <CompatTableValue as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
8638                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8639                        &self.empty,
8640                    ),
8641                ),
8642                encoder,
8643                offset,
8644                _depth,
8645            )
8646        }
8647    }
8648    unsafe impl<
8649        D: fidl::encoding::ResourceDialect,
8650        T0: fidl::encoding::Encode<CompatTableValue, D>,
8651        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8652    > fidl::encoding::Encode<CompatTable, D> for (T0, T1)
8653    {
8654        #[inline]
8655        unsafe fn encode(
8656            self,
8657            encoder: &mut fidl::encoding::Encoder<'_, D>,
8658            offset: usize,
8659            depth: fidl::encoding::Depth,
8660        ) -> fidl::Result<()> {
8661            encoder.debug_check_bounds::<CompatTable>(offset);
8662            // Zero out padding regions. There's no need to apply masks
8663            // because the unmasked parts will be overwritten by fields.
8664            // Write the fields.
8665            self.0.encode(encoder, offset + 0, depth)?;
8666            self.1.encode(encoder, offset + 16, depth)?;
8667            Ok(())
8668        }
8669    }
8670
8671    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTable {
8672        #[inline(always)]
8673        fn new_empty() -> Self {
8674            Self {
8675                value: fidl::new_empty!(CompatTableValue, D),
8676                empty: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8677            }
8678        }
8679
8680        #[inline]
8681        unsafe fn decode(
8682            &mut self,
8683            decoder: &mut fidl::encoding::Decoder<'_, D>,
8684            offset: usize,
8685            _depth: fidl::encoding::Depth,
8686        ) -> fidl::Result<()> {
8687            decoder.debug_check_bounds::<Self>(offset);
8688            // Verify that padding bytes are zero.
8689            fidl::decode!(CompatTableValue, D, &mut self.value, decoder, offset + 0, _depth)?;
8690            fidl::decode!(
8691                fidl::encoding::UnboundedString,
8692                D,
8693                &mut self.empty,
8694                decoder,
8695                offset + 16,
8696                _depth
8697            )?;
8698            Ok(())
8699        }
8700    }
8701
8702    impl fidl::encoding::ValueTypeMarker for EmptyBitsStruct {
8703        type Borrowed<'a> = &'a Self;
8704        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8705            value
8706        }
8707    }
8708
8709    unsafe impl fidl::encoding::TypeMarker for EmptyBitsStruct {
8710        type Owned = Self;
8711
8712        #[inline(always)]
8713        fn inline_align(_context: fidl::encoding::Context) -> usize {
8714            4
8715        }
8716
8717        #[inline(always)]
8718        fn inline_size(_context: fidl::encoding::Context) -> usize {
8719            4
8720        }
8721    }
8722
8723    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyBitsStruct, D>
8724        for &EmptyBitsStruct
8725    {
8726        #[inline]
8727        unsafe fn encode(
8728            self,
8729            encoder: &mut fidl::encoding::Encoder<'_, D>,
8730            offset: usize,
8731            _depth: fidl::encoding::Depth,
8732        ) -> fidl::Result<()> {
8733            encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8734            // Delegate to tuple encoding.
8735            fidl::encoding::Encode::<EmptyBitsStruct, D>::encode(
8736                (<EmptyBits as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
8737                encoder,
8738                offset,
8739                _depth,
8740            )
8741        }
8742    }
8743    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyBits, D>>
8744        fidl::encoding::Encode<EmptyBitsStruct, D> for (T0,)
8745    {
8746        #[inline]
8747        unsafe fn encode(
8748            self,
8749            encoder: &mut fidl::encoding::Encoder<'_, D>,
8750            offset: usize,
8751            depth: fidl::encoding::Depth,
8752        ) -> fidl::Result<()> {
8753            encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8754            // Zero out padding regions. There's no need to apply masks
8755            // because the unmasked parts will be overwritten by fields.
8756            // Write the fields.
8757            self.0.encode(encoder, offset + 0, depth)?;
8758            Ok(())
8759        }
8760    }
8761
8762    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBitsStruct {
8763        #[inline(always)]
8764        fn new_empty() -> Self {
8765            Self { b: fidl::new_empty!(EmptyBits, D) }
8766        }
8767
8768        #[inline]
8769        unsafe fn decode(
8770            &mut self,
8771            decoder: &mut fidl::encoding::Decoder<'_, D>,
8772            offset: usize,
8773            _depth: fidl::encoding::Depth,
8774        ) -> fidl::Result<()> {
8775            decoder.debug_check_bounds::<Self>(offset);
8776            // Verify that padding bytes are zero.
8777            fidl::decode!(EmptyBits, D, &mut self.b, decoder, offset + 0, _depth)?;
8778            Ok(())
8779        }
8780    }
8781
8782    impl fidl::encoding::ValueTypeMarker for EmptyEnumStruct {
8783        type Borrowed<'a> = &'a Self;
8784        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8785            value
8786        }
8787    }
8788
8789    unsafe impl fidl::encoding::TypeMarker for EmptyEnumStruct {
8790        type Owned = Self;
8791
8792        #[inline(always)]
8793        fn inline_align(_context: fidl::encoding::Context) -> usize {
8794            4
8795        }
8796
8797        #[inline(always)]
8798        fn inline_size(_context: fidl::encoding::Context) -> usize {
8799            4
8800        }
8801    }
8802
8803    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyEnumStruct, D>
8804        for &EmptyEnumStruct
8805    {
8806        #[inline]
8807        unsafe fn encode(
8808            self,
8809            encoder: &mut fidl::encoding::Encoder<'_, D>,
8810            offset: usize,
8811            _depth: fidl::encoding::Depth,
8812        ) -> fidl::Result<()> {
8813            encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8814            // Delegate to tuple encoding.
8815            fidl::encoding::Encode::<EmptyEnumStruct, D>::encode(
8816                (<EmptyEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
8817                encoder,
8818                offset,
8819                _depth,
8820            )
8821        }
8822    }
8823    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyEnum, D>>
8824        fidl::encoding::Encode<EmptyEnumStruct, D> for (T0,)
8825    {
8826        #[inline]
8827        unsafe fn encode(
8828            self,
8829            encoder: &mut fidl::encoding::Encoder<'_, D>,
8830            offset: usize,
8831            depth: fidl::encoding::Depth,
8832        ) -> fidl::Result<()> {
8833            encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8834            // Zero out padding regions. There's no need to apply masks
8835            // because the unmasked parts will be overwritten by fields.
8836            // Write the fields.
8837            self.0.encode(encoder, offset + 0, depth)?;
8838            Ok(())
8839        }
8840    }
8841
8842    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnumStruct {
8843        #[inline(always)]
8844        fn new_empty() -> Self {
8845            Self { e: fidl::new_empty!(EmptyEnum, D) }
8846        }
8847
8848        #[inline]
8849        unsafe fn decode(
8850            &mut self,
8851            decoder: &mut fidl::encoding::Decoder<'_, D>,
8852            offset: usize,
8853            _depth: fidl::encoding::Depth,
8854        ) -> fidl::Result<()> {
8855            decoder.debug_check_bounds::<Self>(offset);
8856            // Verify that padding bytes are zero.
8857            fidl::decode!(EmptyEnum, D, &mut self.e, decoder, offset + 0, _depth)?;
8858            Ok(())
8859        }
8860    }
8861
8862    impl fidl::encoding::ValueTypeMarker for EmptyStruct {
8863        type Borrowed<'a> = &'a Self;
8864        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8865            value
8866        }
8867    }
8868
8869    unsafe impl fidl::encoding::TypeMarker for EmptyStruct {
8870        type Owned = Self;
8871
8872        #[inline(always)]
8873        fn inline_align(_context: fidl::encoding::Context) -> usize {
8874            1
8875        }
8876
8877        #[inline(always)]
8878        fn inline_size(_context: fidl::encoding::Context) -> usize {
8879            1
8880        }
8881    }
8882
8883    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStruct, D>
8884        for &EmptyStruct
8885    {
8886        #[inline]
8887        unsafe fn encode(
8888            self,
8889            encoder: &mut fidl::encoding::Encoder<'_, D>,
8890            offset: usize,
8891            _depth: fidl::encoding::Depth,
8892        ) -> fidl::Result<()> {
8893            encoder.debug_check_bounds::<EmptyStruct>(offset);
8894            encoder.write_num(0u8, offset);
8895            Ok(())
8896        }
8897    }
8898
8899    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStruct {
8900        #[inline(always)]
8901        fn new_empty() -> Self {
8902            Self
8903        }
8904
8905        #[inline]
8906        unsafe fn decode(
8907            &mut self,
8908            decoder: &mut fidl::encoding::Decoder<'_, D>,
8909            offset: usize,
8910            _depth: fidl::encoding::Depth,
8911        ) -> fidl::Result<()> {
8912            decoder.debug_check_bounds::<Self>(offset);
8913            match decoder.read_num::<u8>(offset) {
8914                0 => Ok(()),
8915                _ => Err(fidl::Error::Invalid),
8916            }
8917        }
8918    }
8919
8920    impl fidl::encoding::ValueTypeMarker for EmptyStructSandwich {
8921        type Borrowed<'a> = &'a Self;
8922        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8923            value
8924        }
8925    }
8926
8927    unsafe impl fidl::encoding::TypeMarker for EmptyStructSandwich {
8928        type Owned = Self;
8929
8930        #[inline(always)]
8931        fn inline_align(_context: fidl::encoding::Context) -> usize {
8932            8
8933        }
8934
8935        #[inline(always)]
8936        fn inline_size(_context: fidl::encoding::Context) -> usize {
8937            40
8938        }
8939    }
8940
8941    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructSandwich, D>
8942        for &EmptyStructSandwich
8943    {
8944        #[inline]
8945        unsafe fn encode(
8946            self,
8947            encoder: &mut fidl::encoding::Encoder<'_, D>,
8948            offset: usize,
8949            _depth: fidl::encoding::Depth,
8950        ) -> fidl::Result<()> {
8951            encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8952            // Delegate to tuple encoding.
8953            fidl::encoding::Encode::<EmptyStructSandwich, D>::encode(
8954                (
8955                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8956                        &self.before,
8957                    ),
8958                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
8959                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8960                        &self.after,
8961                    ),
8962                ),
8963                encoder,
8964                offset,
8965                _depth,
8966            )
8967        }
8968    }
8969    unsafe impl<
8970        D: fidl::encoding::ResourceDialect,
8971        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8972        T1: fidl::encoding::Encode<EmptyStruct, D>,
8973        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8974    > fidl::encoding::Encode<EmptyStructSandwich, D> for (T0, T1, T2)
8975    {
8976        #[inline]
8977        unsafe fn encode(
8978            self,
8979            encoder: &mut fidl::encoding::Encoder<'_, D>,
8980            offset: usize,
8981            depth: fidl::encoding::Depth,
8982        ) -> fidl::Result<()> {
8983            encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8984            // Zero out padding regions. There's no need to apply masks
8985            // because the unmasked parts will be overwritten by fields.
8986            unsafe {
8987                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8988                (ptr as *mut u64).write_unaligned(0);
8989            }
8990            // Write the fields.
8991            self.0.encode(encoder, offset + 0, depth)?;
8992            self.1.encode(encoder, offset + 16, depth)?;
8993            self.2.encode(encoder, offset + 24, depth)?;
8994            Ok(())
8995        }
8996    }
8997
8998    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructSandwich {
8999        #[inline(always)]
9000        fn new_empty() -> Self {
9001            Self {
9002                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
9003                es: fidl::new_empty!(EmptyStruct, D),
9004                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
9005            }
9006        }
9007
9008        #[inline]
9009        unsafe fn decode(
9010            &mut self,
9011            decoder: &mut fidl::encoding::Decoder<'_, D>,
9012            offset: usize,
9013            _depth: fidl::encoding::Depth,
9014        ) -> fidl::Result<()> {
9015            decoder.debug_check_bounds::<Self>(offset);
9016            // Verify that padding bytes are zero.
9017            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9018            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9019            let mask = 0xffffffffffffff00u64;
9020            let maskedval = padval & mask;
9021            if maskedval != 0 {
9022                return Err(fidl::Error::NonZeroPadding {
9023                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9024                });
9025            }
9026            fidl::decode!(
9027                fidl::encoding::UnboundedString,
9028                D,
9029                &mut self.before,
9030                decoder,
9031                offset + 0,
9032                _depth
9033            )?;
9034            fidl::decode!(EmptyStruct, D, &mut self.es, decoder, offset + 16, _depth)?;
9035            fidl::decode!(
9036                fidl::encoding::UnboundedString,
9037                D,
9038                &mut self.after,
9039                decoder,
9040                offset + 24,
9041                _depth
9042            )?;
9043            Ok(())
9044        }
9045    }
9046
9047    impl fidl::encoding::ValueTypeMarker for EmptyStructUnionStruct {
9048        type Borrowed<'a> = &'a Self;
9049        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9050            value
9051        }
9052    }
9053
9054    unsafe impl fidl::encoding::TypeMarker for EmptyStructUnionStruct {
9055        type Owned = Self;
9056
9057        #[inline(always)]
9058        fn inline_align(_context: fidl::encoding::Context) -> usize {
9059            8
9060        }
9061
9062        #[inline(always)]
9063        fn inline_size(_context: fidl::encoding::Context) -> usize {
9064            16
9065        }
9066    }
9067
9068    unsafe impl<D: fidl::encoding::ResourceDialect>
9069        fidl::encoding::Encode<EmptyStructUnionStruct, D> for &EmptyStructUnionStruct
9070    {
9071        #[inline]
9072        unsafe fn encode(
9073            self,
9074            encoder: &mut fidl::encoding::Encoder<'_, D>,
9075            offset: usize,
9076            _depth: fidl::encoding::Depth,
9077        ) -> fidl::Result<()> {
9078            encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
9079            // Delegate to tuple encoding.
9080            fidl::encoding::Encode::<EmptyStructUnionStruct, D>::encode(
9081                (<EmptyStructUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
9082                encoder,
9083                offset,
9084                _depth,
9085            )
9086        }
9087    }
9088    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStructUnion, D>>
9089        fidl::encoding::Encode<EmptyStructUnionStruct, D> for (T0,)
9090    {
9091        #[inline]
9092        unsafe fn encode(
9093            self,
9094            encoder: &mut fidl::encoding::Encoder<'_, D>,
9095            offset: usize,
9096            depth: fidl::encoding::Depth,
9097        ) -> fidl::Result<()> {
9098            encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
9099            // Zero out padding regions. There's no need to apply masks
9100            // because the unmasked parts will be overwritten by fields.
9101            // Write the fields.
9102            self.0.encode(encoder, offset + 0, depth)?;
9103            Ok(())
9104        }
9105    }
9106
9107    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9108        for EmptyStructUnionStruct
9109    {
9110        #[inline(always)]
9111        fn new_empty() -> Self {
9112            Self { u: fidl::new_empty!(EmptyStructUnion, D) }
9113        }
9114
9115        #[inline]
9116        unsafe fn decode(
9117            &mut self,
9118            decoder: &mut fidl::encoding::Decoder<'_, D>,
9119            offset: usize,
9120            _depth: fidl::encoding::Depth,
9121        ) -> fidl::Result<()> {
9122            decoder.debug_check_bounds::<Self>(offset);
9123            // Verify that padding bytes are zero.
9124            fidl::decode!(EmptyStructUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
9125            Ok(())
9126        }
9127    }
9128
9129    impl fidl::encoding::ValueTypeMarker for EmptyStructsInArrayInStruct {
9130        type Borrowed<'a> = &'a Self;
9131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9132            value
9133        }
9134    }
9135
9136    unsafe impl fidl::encoding::TypeMarker for EmptyStructsInArrayInStruct {
9137        type Owned = Self;
9138
9139        #[inline(always)]
9140        fn inline_align(_context: fidl::encoding::Context) -> usize {
9141            1
9142        }
9143
9144        #[inline(always)]
9145        fn inline_size(_context: fidl::encoding::Context) -> usize {
9146            4
9147        }
9148    }
9149
9150    unsafe impl<D: fidl::encoding::ResourceDialect>
9151        fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for &EmptyStructsInArrayInStruct
9152    {
9153        #[inline]
9154        unsafe fn encode(
9155            self,
9156            encoder: &mut fidl::encoding::Encoder<'_, D>,
9157            offset: usize,
9158            _depth: fidl::encoding::Depth,
9159        ) -> fidl::Result<()> {
9160            encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
9161            // Delegate to tuple encoding.
9162            fidl::encoding::Encode::<EmptyStructsInArrayInStruct, D>::encode(
9163                (
9164                    <fidl::encoding::Array<EmptyStruct, 4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
9165                ),
9166                encoder, offset, _depth
9167            )
9168        }
9169    }
9170    unsafe impl<
9171        D: fidl::encoding::ResourceDialect,
9172        T0: fidl::encoding::Encode<fidl::encoding::Array<EmptyStruct, 4>, D>,
9173    > fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for (T0,)
9174    {
9175        #[inline]
9176        unsafe fn encode(
9177            self,
9178            encoder: &mut fidl::encoding::Encoder<'_, D>,
9179            offset: usize,
9180            depth: fidl::encoding::Depth,
9181        ) -> fidl::Result<()> {
9182            encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
9183            // Zero out padding regions. There's no need to apply masks
9184            // because the unmasked parts will be overwritten by fields.
9185            // Write the fields.
9186            self.0.encode(encoder, offset + 0, depth)?;
9187            Ok(())
9188        }
9189    }
9190
9191    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9192        for EmptyStructsInArrayInStruct
9193    {
9194        #[inline(always)]
9195        fn new_empty() -> Self {
9196            Self { v: fidl::new_empty!(fidl::encoding::Array<EmptyStruct, 4>, D) }
9197        }
9198
9199        #[inline]
9200        unsafe fn decode(
9201            &mut self,
9202            decoder: &mut fidl::encoding::Decoder<'_, D>,
9203            offset: usize,
9204            _depth: fidl::encoding::Depth,
9205        ) -> fidl::Result<()> {
9206            decoder.debug_check_bounds::<Self>(offset);
9207            // Verify that padding bytes are zero.
9208            fidl::decode!(fidl::encoding::Array<EmptyStruct, 4>, D, &mut self.v, decoder, offset + 0, _depth)?;
9209            Ok(())
9210        }
9211    }
9212
9213    impl fidl::encoding::ValueTypeMarker for EmptyStructsInVectorInStruct {
9214        type Borrowed<'a> = &'a Self;
9215        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9216            value
9217        }
9218    }
9219
9220    unsafe impl fidl::encoding::TypeMarker for EmptyStructsInVectorInStruct {
9221        type Owned = Self;
9222
9223        #[inline(always)]
9224        fn inline_align(_context: fidl::encoding::Context) -> usize {
9225            8
9226        }
9227
9228        #[inline(always)]
9229        fn inline_size(_context: fidl::encoding::Context) -> usize {
9230            16
9231        }
9232    }
9233
9234    unsafe impl<D: fidl::encoding::ResourceDialect>
9235        fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for &EmptyStructsInVectorInStruct
9236    {
9237        #[inline]
9238        unsafe fn encode(
9239            self,
9240            encoder: &mut fidl::encoding::Encoder<'_, D>,
9241            offset: usize,
9242            _depth: fidl::encoding::Depth,
9243        ) -> fidl::Result<()> {
9244            encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9245            // Delegate to tuple encoding.
9246            fidl::encoding::Encode::<EmptyStructsInVectorInStruct, D>::encode(
9247                (
9248                    <fidl::encoding::UnboundedVector<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
9249                ),
9250                encoder, offset, _depth
9251            )
9252        }
9253    }
9254    unsafe impl<
9255        D: fidl::encoding::ResourceDialect,
9256        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<EmptyStruct>, D>,
9257    > fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for (T0,)
9258    {
9259        #[inline]
9260        unsafe fn encode(
9261            self,
9262            encoder: &mut fidl::encoding::Encoder<'_, D>,
9263            offset: usize,
9264            depth: fidl::encoding::Depth,
9265        ) -> fidl::Result<()> {
9266            encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9267            // Zero out padding regions. There's no need to apply masks
9268            // because the unmasked parts will be overwritten by fields.
9269            // Write the fields.
9270            self.0.encode(encoder, offset + 0, depth)?;
9271            Ok(())
9272        }
9273    }
9274
9275    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9276        for EmptyStructsInVectorInStruct
9277    {
9278        #[inline(always)]
9279        fn new_empty() -> Self {
9280            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<EmptyStruct>, D) }
9281        }
9282
9283        #[inline]
9284        unsafe fn decode(
9285            &mut self,
9286            decoder: &mut fidl::encoding::Decoder<'_, D>,
9287            offset: usize,
9288            _depth: fidl::encoding::Depth,
9289        ) -> fidl::Result<()> {
9290            decoder.debug_check_bounds::<Self>(offset);
9291            // Verify that padding bytes are zero.
9292            fidl::decode!(
9293                fidl::encoding::UnboundedVector<EmptyStruct>,
9294                D,
9295                &mut self.v,
9296                decoder,
9297                offset + 0,
9298                _depth
9299            )?;
9300            Ok(())
9301        }
9302    }
9303
9304    impl fidl::encoding::ValueTypeMarker for FidlvizStruct1 {
9305        type Borrowed<'a> = &'a Self;
9306        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9307            value
9308        }
9309    }
9310
9311    unsafe impl fidl::encoding::TypeMarker for FidlvizStruct1 {
9312        type Owned = Self;
9313
9314        #[inline(always)]
9315        fn inline_align(_context: fidl::encoding::Context) -> usize {
9316            1
9317        }
9318
9319        #[inline(always)]
9320        fn inline_size(_context: fidl::encoding::Context) -> usize {
9321            1
9322        }
9323    }
9324
9325    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct1, D>
9326        for &FidlvizStruct1
9327    {
9328        #[inline]
9329        unsafe fn encode(
9330            self,
9331            encoder: &mut fidl::encoding::Encoder<'_, D>,
9332            offset: usize,
9333            _depth: fidl::encoding::Depth,
9334        ) -> fidl::Result<()> {
9335            encoder.debug_check_bounds::<FidlvizStruct1>(offset);
9336            encoder.write_num(0u8, offset);
9337            Ok(())
9338        }
9339    }
9340
9341    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct1 {
9342        #[inline(always)]
9343        fn new_empty() -> Self {
9344            Self
9345        }
9346
9347        #[inline]
9348        unsafe fn decode(
9349            &mut self,
9350            decoder: &mut fidl::encoding::Decoder<'_, D>,
9351            offset: usize,
9352            _depth: fidl::encoding::Depth,
9353        ) -> fidl::Result<()> {
9354            decoder.debug_check_bounds::<Self>(offset);
9355            match decoder.read_num::<u8>(offset) {
9356                0 => Ok(()),
9357                _ => Err(fidl::Error::Invalid),
9358            }
9359        }
9360    }
9361
9362    impl fidl::encoding::ValueTypeMarker for FidlvizStruct2 {
9363        type Borrowed<'a> = &'a Self;
9364        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9365            value
9366        }
9367    }
9368
9369    unsafe impl fidl::encoding::TypeMarker for FidlvizStruct2 {
9370        type Owned = Self;
9371
9372        #[inline(always)]
9373        fn inline_align(_context: fidl::encoding::Context) -> usize {
9374            8
9375        }
9376
9377        #[inline(always)]
9378        fn inline_size(_context: fidl::encoding::Context) -> usize {
9379            8
9380        }
9381        #[inline(always)]
9382        fn encode_is_copy() -> bool {
9383            true
9384        }
9385
9386        #[inline(always)]
9387        fn decode_is_copy() -> bool {
9388            true
9389        }
9390    }
9391
9392    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct2, D>
9393        for &FidlvizStruct2
9394    {
9395        #[inline]
9396        unsafe fn encode(
9397            self,
9398            encoder: &mut fidl::encoding::Encoder<'_, D>,
9399            offset: usize,
9400            _depth: fidl::encoding::Depth,
9401        ) -> fidl::Result<()> {
9402            encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9403            unsafe {
9404                // Copy the object into the buffer.
9405                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9406                (buf_ptr as *mut FidlvizStruct2)
9407                    .write_unaligned((self as *const FidlvizStruct2).read());
9408                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9409                // done second because the memcpy will write garbage to these bytes.
9410            }
9411            Ok(())
9412        }
9413    }
9414    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9415        fidl::encoding::Encode<FidlvizStruct2, D> for (T0,)
9416    {
9417        #[inline]
9418        unsafe fn encode(
9419            self,
9420            encoder: &mut fidl::encoding::Encoder<'_, D>,
9421            offset: usize,
9422            depth: fidl::encoding::Depth,
9423        ) -> fidl::Result<()> {
9424            encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9425            // Zero out padding regions. There's no need to apply masks
9426            // because the unmasked parts will be overwritten by fields.
9427            // Write the fields.
9428            self.0.encode(encoder, offset + 0, depth)?;
9429            Ok(())
9430        }
9431    }
9432
9433    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct2 {
9434        #[inline(always)]
9435        fn new_empty() -> Self {
9436            Self { x: fidl::new_empty!(u64, D) }
9437        }
9438
9439        #[inline]
9440        unsafe fn decode(
9441            &mut self,
9442            decoder: &mut fidl::encoding::Decoder<'_, D>,
9443            offset: usize,
9444            _depth: fidl::encoding::Depth,
9445        ) -> fidl::Result<()> {
9446            decoder.debug_check_bounds::<Self>(offset);
9447            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9448            // Verify that padding bytes are zero.
9449            // Copy from the buffer into the object.
9450            unsafe {
9451                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9452            }
9453            Ok(())
9454        }
9455    }
9456
9457    impl fidl::encoding::ValueTypeMarker for FileGetAttrResponse {
9458        type Borrowed<'a> = &'a Self;
9459        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9460            value
9461        }
9462    }
9463
9464    unsafe impl fidl::encoding::TypeMarker for FileGetAttrResponse {
9465        type Owned = Self;
9466
9467        #[inline(always)]
9468        fn inline_align(_context: fidl::encoding::Context) -> usize {
9469            8
9470        }
9471
9472        #[inline(always)]
9473        fn inline_size(_context: fidl::encoding::Context) -> usize {
9474            64
9475        }
9476    }
9477
9478    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FileGetAttrResponse, D>
9479        for &FileGetAttrResponse
9480    {
9481        #[inline]
9482        unsafe fn encode(
9483            self,
9484            encoder: &mut fidl::encoding::Encoder<'_, D>,
9485            offset: usize,
9486            _depth: fidl::encoding::Depth,
9487        ) -> fidl::Result<()> {
9488            encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9489            unsafe {
9490                // Copy the object into the buffer.
9491                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9492                (buf_ptr as *mut FileGetAttrResponse)
9493                    .write_unaligned((self as *const FileGetAttrResponse).read());
9494                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9495                // done second because the memcpy will write garbage to these bytes.
9496                let padding_ptr = buf_ptr.offset(0) as *mut u64;
9497                let padding_mask = 0xffffffff00000000u64;
9498                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9499                let padding_ptr = buf_ptr.offset(8) as *mut u64;
9500                let padding_mask = 0xffffffff00000000u64;
9501                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9502            }
9503            Ok(())
9504        }
9505    }
9506    unsafe impl<
9507        D: fidl::encoding::ResourceDialect,
9508        T0: fidl::encoding::Encode<i32, D>,
9509        T1: fidl::encoding::Encode<NodeAttributes, D>,
9510    > fidl::encoding::Encode<FileGetAttrResponse, D> for (T0, T1)
9511    {
9512        #[inline]
9513        unsafe fn encode(
9514            self,
9515            encoder: &mut fidl::encoding::Encoder<'_, D>,
9516            offset: usize,
9517            depth: fidl::encoding::Depth,
9518        ) -> fidl::Result<()> {
9519            encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9520            // Zero out padding regions. There's no need to apply masks
9521            // because the unmasked parts will be overwritten by fields.
9522            unsafe {
9523                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9524                (ptr as *mut u64).write_unaligned(0);
9525            }
9526            // Write the fields.
9527            self.0.encode(encoder, offset + 0, depth)?;
9528            self.1.encode(encoder, offset + 8, depth)?;
9529            Ok(())
9530        }
9531    }
9532
9533    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FileGetAttrResponse {
9534        #[inline(always)]
9535        fn new_empty() -> Self {
9536            Self { s: fidl::new_empty!(i32, D), attributes: fidl::new_empty!(NodeAttributes, D) }
9537        }
9538
9539        #[inline]
9540        unsafe fn decode(
9541            &mut self,
9542            decoder: &mut fidl::encoding::Decoder<'_, D>,
9543            offset: usize,
9544            _depth: fidl::encoding::Depth,
9545        ) -> fidl::Result<()> {
9546            decoder.debug_check_bounds::<Self>(offset);
9547            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9548            // Verify that padding bytes are zero.
9549            let ptr = unsafe { buf_ptr.offset(0) };
9550            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9551            let mask = 0xffffffff00000000u64;
9552            let maskedval = padval & mask;
9553            if maskedval != 0 {
9554                return Err(fidl::Error::NonZeroPadding {
9555                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9556                });
9557            }
9558            let ptr = unsafe { buf_ptr.offset(8) };
9559            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9560            let mask = 0xffffffff00000000u64;
9561            let maskedval = padval & mask;
9562            if maskedval != 0 {
9563                return Err(fidl::Error::NonZeroPadding {
9564                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9565                });
9566            }
9567            // Copy from the buffer into the object.
9568            unsafe {
9569                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 64);
9570            }
9571            Ok(())
9572        }
9573    }
9574
9575    impl fidl::encoding::ValueTypeMarker for FiveByte {
9576        type Borrowed<'a> = &'a Self;
9577        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9578            value
9579        }
9580    }
9581
9582    unsafe impl fidl::encoding::TypeMarker for FiveByte {
9583        type Owned = Self;
9584
9585        #[inline(always)]
9586        fn inline_align(_context: fidl::encoding::Context) -> usize {
9587            4
9588        }
9589
9590        #[inline(always)]
9591        fn inline_size(_context: fidl::encoding::Context) -> usize {
9592            8
9593        }
9594    }
9595
9596    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByte, D> for &FiveByte {
9597        #[inline]
9598        unsafe fn encode(
9599            self,
9600            encoder: &mut fidl::encoding::Encoder<'_, D>,
9601            offset: usize,
9602            _depth: fidl::encoding::Depth,
9603        ) -> fidl::Result<()> {
9604            encoder.debug_check_bounds::<FiveByte>(offset);
9605            unsafe {
9606                // Copy the object into the buffer.
9607                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9608                (buf_ptr as *mut FiveByte).write_unaligned((self as *const FiveByte).read());
9609                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9610                // done second because the memcpy will write garbage to these bytes.
9611                let padding_ptr = buf_ptr.offset(4) as *mut u32;
9612                let padding_mask = 0xffffff00u32;
9613                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9614            }
9615            Ok(())
9616        }
9617    }
9618    unsafe impl<
9619        D: fidl::encoding::ResourceDialect,
9620        T0: fidl::encoding::Encode<u32, D>,
9621        T1: fidl::encoding::Encode<u8, D>,
9622    > fidl::encoding::Encode<FiveByte, D> for (T0, T1)
9623    {
9624        #[inline]
9625        unsafe fn encode(
9626            self,
9627            encoder: &mut fidl::encoding::Encoder<'_, D>,
9628            offset: usize,
9629            depth: fidl::encoding::Depth,
9630        ) -> fidl::Result<()> {
9631            encoder.debug_check_bounds::<FiveByte>(offset);
9632            // Zero out padding regions. There's no need to apply masks
9633            // because the unmasked parts will be overwritten by fields.
9634            unsafe {
9635                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
9636                (ptr as *mut u32).write_unaligned(0);
9637            }
9638            // Write the fields.
9639            self.0.encode(encoder, offset + 0, depth)?;
9640            self.1.encode(encoder, offset + 4, depth)?;
9641            Ok(())
9642        }
9643    }
9644
9645    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByte {
9646        #[inline(always)]
9647        fn new_empty() -> Self {
9648            Self { elem1: fidl::new_empty!(u32, D), elem2: fidl::new_empty!(u8, D) }
9649        }
9650
9651        #[inline]
9652        unsafe fn decode(
9653            &mut self,
9654            decoder: &mut fidl::encoding::Decoder<'_, D>,
9655            offset: usize,
9656            _depth: fidl::encoding::Depth,
9657        ) -> fidl::Result<()> {
9658            decoder.debug_check_bounds::<Self>(offset);
9659            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9660            // Verify that padding bytes are zero.
9661            let ptr = unsafe { buf_ptr.offset(4) };
9662            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9663            let mask = 0xffffff00u32;
9664            let maskedval = padval & mask;
9665            if maskedval != 0 {
9666                return Err(fidl::Error::NonZeroPadding {
9667                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9668                });
9669            }
9670            // Copy from the buffer into the object.
9671            unsafe {
9672                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9673            }
9674            Ok(())
9675        }
9676    }
9677
9678    impl fidl::encoding::ValueTypeMarker for FiveByteInArray {
9679        type Borrowed<'a> = &'a Self;
9680        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9681            value
9682        }
9683    }
9684
9685    unsafe impl fidl::encoding::TypeMarker for FiveByteInArray {
9686        type Owned = Self;
9687
9688        #[inline(always)]
9689        fn inline_align(_context: fidl::encoding::Context) -> usize {
9690            4
9691        }
9692
9693        #[inline(always)]
9694        fn inline_size(_context: fidl::encoding::Context) -> usize {
9695            24
9696        }
9697    }
9698
9699    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInArray, D>
9700        for &FiveByteInArray
9701    {
9702        #[inline]
9703        unsafe fn encode(
9704            self,
9705            encoder: &mut fidl::encoding::Encoder<'_, D>,
9706            offset: usize,
9707            _depth: fidl::encoding::Depth,
9708        ) -> fidl::Result<()> {
9709            encoder.debug_check_bounds::<FiveByteInArray>(offset);
9710            unsafe {
9711                // Copy the object into the buffer.
9712                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9713                (buf_ptr as *mut FiveByteInArray)
9714                    .write_unaligned((self as *const FiveByteInArray).read());
9715                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9716                // done second because the memcpy will write garbage to these bytes.
9717                let padding_ptr = buf_ptr.offset(4) as *mut u32;
9718                let padding_mask = 0xffffff00u32;
9719                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9720                let padding_ptr = buf_ptr.offset(12) as *mut u32;
9721                let padding_mask = 0xffffff00u32;
9722                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9723                let padding_ptr = buf_ptr.offset(20) as *mut u32;
9724                let padding_mask = 0xffffff00u32;
9725                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9726            }
9727            Ok(())
9728        }
9729    }
9730    unsafe impl<
9731        D: fidl::encoding::ResourceDialect,
9732        T0: fidl::encoding::Encode<fidl::encoding::Array<FiveByte, 3>, D>,
9733    > fidl::encoding::Encode<FiveByteInArray, D> for (T0,)
9734    {
9735        #[inline]
9736        unsafe fn encode(
9737            self,
9738            encoder: &mut fidl::encoding::Encoder<'_, D>,
9739            offset: usize,
9740            depth: fidl::encoding::Depth,
9741        ) -> fidl::Result<()> {
9742            encoder.debug_check_bounds::<FiveByteInArray>(offset);
9743            // Zero out padding regions. There's no need to apply masks
9744            // because the unmasked parts will be overwritten by fields.
9745            // Write the fields.
9746            self.0.encode(encoder, offset + 0, depth)?;
9747            Ok(())
9748        }
9749    }
9750
9751    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInArray {
9752        #[inline(always)]
9753        fn new_empty() -> Self {
9754            Self { elems: fidl::new_empty!(fidl::encoding::Array<FiveByte, 3>, D) }
9755        }
9756
9757        #[inline]
9758        unsafe fn decode(
9759            &mut self,
9760            decoder: &mut fidl::encoding::Decoder<'_, D>,
9761            offset: usize,
9762            _depth: fidl::encoding::Depth,
9763        ) -> fidl::Result<()> {
9764            decoder.debug_check_bounds::<Self>(offset);
9765            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9766            // Verify that padding bytes are zero.
9767            let ptr = unsafe { buf_ptr.offset(4) };
9768            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9769            let mask = 0xffffff00u32;
9770            let maskedval = padval & mask;
9771            if maskedval != 0 {
9772                return Err(fidl::Error::NonZeroPadding {
9773                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9774                });
9775            }
9776            let ptr = unsafe { buf_ptr.offset(12) };
9777            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9778            let mask = 0xffffff00u32;
9779            let maskedval = padval & mask;
9780            if maskedval != 0 {
9781                return Err(fidl::Error::NonZeroPadding {
9782                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9783                });
9784            }
9785            let ptr = unsafe { buf_ptr.offset(20) };
9786            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9787            let mask = 0xffffff00u32;
9788            let maskedval = padval & mask;
9789            if maskedval != 0 {
9790                return Err(fidl::Error::NonZeroPadding {
9791                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9792                });
9793            }
9794            // Copy from the buffer into the object.
9795            unsafe {
9796                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9797            }
9798            Ok(())
9799        }
9800    }
9801
9802    impl fidl::encoding::ValueTypeMarker for FiveByteInStruct {
9803        type Borrowed<'a> = &'a Self;
9804        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9805            value
9806        }
9807    }
9808
9809    unsafe impl fidl::encoding::TypeMarker for FiveByteInStruct {
9810        type Owned = Self;
9811
9812        #[inline(always)]
9813        fn inline_align(_context: fidl::encoding::Context) -> usize {
9814            4
9815        }
9816
9817        #[inline(always)]
9818        fn inline_size(_context: fidl::encoding::Context) -> usize {
9819            24
9820        }
9821    }
9822
9823    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInStruct, D>
9824        for &FiveByteInStruct
9825    {
9826        #[inline]
9827        unsafe fn encode(
9828            self,
9829            encoder: &mut fidl::encoding::Encoder<'_, D>,
9830            offset: usize,
9831            _depth: fidl::encoding::Depth,
9832        ) -> fidl::Result<()> {
9833            encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9834            unsafe {
9835                // Copy the object into the buffer.
9836                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9837                (buf_ptr as *mut FiveByteInStruct)
9838                    .write_unaligned((self as *const FiveByteInStruct).read());
9839                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9840                // done second because the memcpy will write garbage to these bytes.
9841                let padding_ptr = buf_ptr.offset(4) as *mut u32;
9842                let padding_mask = 0xffffff00u32;
9843                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9844                let padding_ptr = buf_ptr.offset(12) as *mut u32;
9845                let padding_mask = 0xffffff00u32;
9846                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9847                let padding_ptr = buf_ptr.offset(20) as *mut u32;
9848                let padding_mask = 0xffffff00u32;
9849                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9850            }
9851            Ok(())
9852        }
9853    }
9854    unsafe impl<
9855        D: fidl::encoding::ResourceDialect,
9856        T0: fidl::encoding::Encode<FiveByte, D>,
9857        T1: fidl::encoding::Encode<FiveByte, D>,
9858        T2: fidl::encoding::Encode<FiveByte, D>,
9859    > fidl::encoding::Encode<FiveByteInStruct, D> for (T0, T1, T2)
9860    {
9861        #[inline]
9862        unsafe fn encode(
9863            self,
9864            encoder: &mut fidl::encoding::Encoder<'_, D>,
9865            offset: usize,
9866            depth: fidl::encoding::Depth,
9867        ) -> fidl::Result<()> {
9868            encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9869            // Zero out padding regions. There's no need to apply masks
9870            // because the unmasked parts will be overwritten by fields.
9871            // Write the fields.
9872            self.0.encode(encoder, offset + 0, depth)?;
9873            self.1.encode(encoder, offset + 8, depth)?;
9874            self.2.encode(encoder, offset + 16, depth)?;
9875            Ok(())
9876        }
9877    }
9878
9879    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInStruct {
9880        #[inline(always)]
9881        fn new_empty() -> Self {
9882            Self {
9883                elem1: fidl::new_empty!(FiveByte, D),
9884                elem2: fidl::new_empty!(FiveByte, D),
9885                elem3: fidl::new_empty!(FiveByte, D),
9886            }
9887        }
9888
9889        #[inline]
9890        unsafe fn decode(
9891            &mut self,
9892            decoder: &mut fidl::encoding::Decoder<'_, D>,
9893            offset: usize,
9894            _depth: fidl::encoding::Depth,
9895        ) -> fidl::Result<()> {
9896            decoder.debug_check_bounds::<Self>(offset);
9897            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9898            // Verify that padding bytes are zero.
9899            let ptr = unsafe { buf_ptr.offset(4) };
9900            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9901            let mask = 0xffffff00u32;
9902            let maskedval = padval & mask;
9903            if maskedval != 0 {
9904                return Err(fidl::Error::NonZeroPadding {
9905                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9906                });
9907            }
9908            let ptr = unsafe { buf_ptr.offset(12) };
9909            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9910            let mask = 0xffffff00u32;
9911            let maskedval = padval & mask;
9912            if maskedval != 0 {
9913                return Err(fidl::Error::NonZeroPadding {
9914                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9915                });
9916            }
9917            let ptr = unsafe { buf_ptr.offset(20) };
9918            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9919            let mask = 0xffffff00u32;
9920            let maskedval = padval & mask;
9921            if maskedval != 0 {
9922                return Err(fidl::Error::NonZeroPadding {
9923                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9924                });
9925            }
9926            // Copy from the buffer into the object.
9927            unsafe {
9928                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9929            }
9930            Ok(())
9931        }
9932    }
9933
9934    impl fidl::encoding::ValueTypeMarker for FiveByteInVector {
9935        type Borrowed<'a> = &'a Self;
9936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9937            value
9938        }
9939    }
9940
9941    unsafe impl fidl::encoding::TypeMarker for FiveByteInVector {
9942        type Owned = Self;
9943
9944        #[inline(always)]
9945        fn inline_align(_context: fidl::encoding::Context) -> usize {
9946            8
9947        }
9948
9949        #[inline(always)]
9950        fn inline_size(_context: fidl::encoding::Context) -> usize {
9951            16
9952        }
9953    }
9954
9955    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInVector, D>
9956        for &FiveByteInVector
9957    {
9958        #[inline]
9959        unsafe fn encode(
9960            self,
9961            encoder: &mut fidl::encoding::Encoder<'_, D>,
9962            offset: usize,
9963            _depth: fidl::encoding::Depth,
9964        ) -> fidl::Result<()> {
9965            encoder.debug_check_bounds::<FiveByteInVector>(offset);
9966            // Delegate to tuple encoding.
9967            fidl::encoding::Encode::<FiveByteInVector, D>::encode(
9968                (
9969                    <fidl::encoding::UnboundedVector<FiveByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
9970                ),
9971                encoder, offset, _depth
9972            )
9973        }
9974    }
9975    unsafe impl<
9976        D: fidl::encoding::ResourceDialect,
9977        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<FiveByte>, D>,
9978    > fidl::encoding::Encode<FiveByteInVector, D> for (T0,)
9979    {
9980        #[inline]
9981        unsafe fn encode(
9982            self,
9983            encoder: &mut fidl::encoding::Encoder<'_, D>,
9984            offset: usize,
9985            depth: fidl::encoding::Depth,
9986        ) -> fidl::Result<()> {
9987            encoder.debug_check_bounds::<FiveByteInVector>(offset);
9988            // Zero out padding regions. There's no need to apply masks
9989            // because the unmasked parts will be overwritten by fields.
9990            // Write the fields.
9991            self.0.encode(encoder, offset + 0, depth)?;
9992            Ok(())
9993        }
9994    }
9995
9996    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInVector {
9997        #[inline(always)]
9998        fn new_empty() -> Self {
9999            Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<FiveByte>, D) }
10000        }
10001
10002        #[inline]
10003        unsafe fn decode(
10004            &mut self,
10005            decoder: &mut fidl::encoding::Decoder<'_, D>,
10006            offset: usize,
10007            _depth: fidl::encoding::Depth,
10008        ) -> fidl::Result<()> {
10009            decoder.debug_check_bounds::<Self>(offset);
10010            // Verify that padding bytes are zero.
10011            fidl::decode!(
10012                fidl::encoding::UnboundedVector<FiveByte>,
10013                D,
10014                &mut self.elems,
10015                decoder,
10016                offset + 0,
10017                _depth
10018            )?;
10019            Ok(())
10020        }
10021    }
10022
10023    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16Struct {
10024        type Borrowed<'a> = &'a Self;
10025        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10026            value
10027        }
10028    }
10029
10030    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16Struct {
10031        type Owned = Self;
10032
10033        #[inline(always)]
10034        fn inline_align(_context: fidl::encoding::Context) -> usize {
10035            2
10036        }
10037
10038        #[inline(always)]
10039        fn inline_size(_context: fidl::encoding::Context) -> usize {
10040            2
10041        }
10042    }
10043
10044    unsafe impl<D: fidl::encoding::ResourceDialect>
10045        fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for &FlexibleBitsUint16Struct
10046    {
10047        #[inline]
10048        unsafe fn encode(
10049            self,
10050            encoder: &mut fidl::encoding::Encoder<'_, D>,
10051            offset: usize,
10052            _depth: fidl::encoding::Depth,
10053        ) -> fidl::Result<()> {
10054            encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
10055            // Delegate to tuple encoding.
10056            fidl::encoding::Encode::<FlexibleBitsUint16Struct, D>::encode(
10057                (<FlexibleBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10058                encoder,
10059                offset,
10060                _depth,
10061            )
10062        }
10063    }
10064    unsafe impl<
10065        D: fidl::encoding::ResourceDialect,
10066        T0: fidl::encoding::Encode<FlexibleBitsUint16, D>,
10067    > fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for (T0,)
10068    {
10069        #[inline]
10070        unsafe fn encode(
10071            self,
10072            encoder: &mut fidl::encoding::Encoder<'_, D>,
10073            offset: usize,
10074            depth: fidl::encoding::Depth,
10075        ) -> fidl::Result<()> {
10076            encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
10077            // Zero out padding regions. There's no need to apply masks
10078            // because the unmasked parts will be overwritten by fields.
10079            // Write the fields.
10080            self.0.encode(encoder, offset + 0, depth)?;
10081            Ok(())
10082        }
10083    }
10084
10085    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10086        for FlexibleBitsUint16Struct
10087    {
10088        #[inline(always)]
10089        fn new_empty() -> Self {
10090            Self { b: fidl::new_empty!(FlexibleBitsUint16, D) }
10091        }
10092
10093        #[inline]
10094        unsafe fn decode(
10095            &mut self,
10096            decoder: &mut fidl::encoding::Decoder<'_, D>,
10097            offset: usize,
10098            _depth: fidl::encoding::Depth,
10099        ) -> fidl::Result<()> {
10100            decoder.debug_check_bounds::<Self>(offset);
10101            // Verify that padding bytes are zero.
10102            fidl::decode!(FlexibleBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
10103            Ok(())
10104        }
10105    }
10106
10107    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32Struct {
10108        type Borrowed<'a> = &'a Self;
10109        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10110            value
10111        }
10112    }
10113
10114    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32Struct {
10115        type Owned = Self;
10116
10117        #[inline(always)]
10118        fn inline_align(_context: fidl::encoding::Context) -> usize {
10119            4
10120        }
10121
10122        #[inline(always)]
10123        fn inline_size(_context: fidl::encoding::Context) -> usize {
10124            4
10125        }
10126    }
10127
10128    unsafe impl<D: fidl::encoding::ResourceDialect>
10129        fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for &FlexibleBitsUint32Struct
10130    {
10131        #[inline]
10132        unsafe fn encode(
10133            self,
10134            encoder: &mut fidl::encoding::Encoder<'_, D>,
10135            offset: usize,
10136            _depth: fidl::encoding::Depth,
10137        ) -> fidl::Result<()> {
10138            encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
10139            // Delegate to tuple encoding.
10140            fidl::encoding::Encode::<FlexibleBitsUint32Struct, D>::encode(
10141                (<FlexibleBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10142                encoder,
10143                offset,
10144                _depth,
10145            )
10146        }
10147    }
10148    unsafe impl<
10149        D: fidl::encoding::ResourceDialect,
10150        T0: fidl::encoding::Encode<FlexibleBitsUint32, D>,
10151    > fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for (T0,)
10152    {
10153        #[inline]
10154        unsafe fn encode(
10155            self,
10156            encoder: &mut fidl::encoding::Encoder<'_, D>,
10157            offset: usize,
10158            depth: fidl::encoding::Depth,
10159        ) -> fidl::Result<()> {
10160            encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
10161            // Zero out padding regions. There's no need to apply masks
10162            // because the unmasked parts will be overwritten by fields.
10163            // Write the fields.
10164            self.0.encode(encoder, offset + 0, depth)?;
10165            Ok(())
10166        }
10167    }
10168
10169    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10170        for FlexibleBitsUint32Struct
10171    {
10172        #[inline(always)]
10173        fn new_empty() -> Self {
10174            Self { b: fidl::new_empty!(FlexibleBitsUint32, D) }
10175        }
10176
10177        #[inline]
10178        unsafe fn decode(
10179            &mut self,
10180            decoder: &mut fidl::encoding::Decoder<'_, D>,
10181            offset: usize,
10182            _depth: fidl::encoding::Depth,
10183        ) -> fidl::Result<()> {
10184            decoder.debug_check_bounds::<Self>(offset);
10185            // Verify that padding bytes are zero.
10186            fidl::decode!(FlexibleBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
10187            Ok(())
10188        }
10189    }
10190
10191    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64Struct {
10192        type Borrowed<'a> = &'a Self;
10193        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10194            value
10195        }
10196    }
10197
10198    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64Struct {
10199        type Owned = Self;
10200
10201        #[inline(always)]
10202        fn inline_align(_context: fidl::encoding::Context) -> usize {
10203            8
10204        }
10205
10206        #[inline(always)]
10207        fn inline_size(_context: fidl::encoding::Context) -> usize {
10208            8
10209        }
10210    }
10211
10212    unsafe impl<D: fidl::encoding::ResourceDialect>
10213        fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for &FlexibleBitsUint64Struct
10214    {
10215        #[inline]
10216        unsafe fn encode(
10217            self,
10218            encoder: &mut fidl::encoding::Encoder<'_, D>,
10219            offset: usize,
10220            _depth: fidl::encoding::Depth,
10221        ) -> fidl::Result<()> {
10222            encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10223            // Delegate to tuple encoding.
10224            fidl::encoding::Encode::<FlexibleBitsUint64Struct, D>::encode(
10225                (<FlexibleBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10226                encoder,
10227                offset,
10228                _depth,
10229            )
10230        }
10231    }
10232    unsafe impl<
10233        D: fidl::encoding::ResourceDialect,
10234        T0: fidl::encoding::Encode<FlexibleBitsUint64, D>,
10235    > fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for (T0,)
10236    {
10237        #[inline]
10238        unsafe fn encode(
10239            self,
10240            encoder: &mut fidl::encoding::Encoder<'_, D>,
10241            offset: usize,
10242            depth: fidl::encoding::Depth,
10243        ) -> fidl::Result<()> {
10244            encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10245            // Zero out padding regions. There's no need to apply masks
10246            // because the unmasked parts will be overwritten by fields.
10247            // Write the fields.
10248            self.0.encode(encoder, offset + 0, depth)?;
10249            Ok(())
10250        }
10251    }
10252
10253    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10254        for FlexibleBitsUint64Struct
10255    {
10256        #[inline(always)]
10257        fn new_empty() -> Self {
10258            Self { b: fidl::new_empty!(FlexibleBitsUint64, D) }
10259        }
10260
10261        #[inline]
10262        unsafe fn decode(
10263            &mut self,
10264            decoder: &mut fidl::encoding::Decoder<'_, D>,
10265            offset: usize,
10266            _depth: fidl::encoding::Depth,
10267        ) -> fidl::Result<()> {
10268            decoder.debug_check_bounds::<Self>(offset);
10269            // Verify that padding bytes are zero.
10270            fidl::decode!(FlexibleBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
10271            Ok(())
10272        }
10273    }
10274
10275    impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8Struct {
10276        type Borrowed<'a> = &'a Self;
10277        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10278            value
10279        }
10280    }
10281
10282    unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8Struct {
10283        type Owned = Self;
10284
10285        #[inline(always)]
10286        fn inline_align(_context: fidl::encoding::Context) -> usize {
10287            1
10288        }
10289
10290        #[inline(always)]
10291        fn inline_size(_context: fidl::encoding::Context) -> usize {
10292            1
10293        }
10294    }
10295
10296    unsafe impl<D: fidl::encoding::ResourceDialect>
10297        fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for &FlexibleBitsUint8Struct
10298    {
10299        #[inline]
10300        unsafe fn encode(
10301            self,
10302            encoder: &mut fidl::encoding::Encoder<'_, D>,
10303            offset: usize,
10304            _depth: fidl::encoding::Depth,
10305        ) -> fidl::Result<()> {
10306            encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10307            // Delegate to tuple encoding.
10308            fidl::encoding::Encode::<FlexibleBitsUint8Struct, D>::encode(
10309                (<FlexibleBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10310                encoder,
10311                offset,
10312                _depth,
10313            )
10314        }
10315    }
10316    unsafe impl<
10317        D: fidl::encoding::ResourceDialect,
10318        T0: fidl::encoding::Encode<FlexibleBitsUint8, D>,
10319    > fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for (T0,)
10320    {
10321        #[inline]
10322        unsafe fn encode(
10323            self,
10324            encoder: &mut fidl::encoding::Encoder<'_, D>,
10325            offset: usize,
10326            depth: fidl::encoding::Depth,
10327        ) -> fidl::Result<()> {
10328            encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10329            // Zero out padding regions. There's no need to apply masks
10330            // because the unmasked parts will be overwritten by fields.
10331            // Write the fields.
10332            self.0.encode(encoder, offset + 0, depth)?;
10333            Ok(())
10334        }
10335    }
10336
10337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10338        for FlexibleBitsUint8Struct
10339    {
10340        #[inline(always)]
10341        fn new_empty() -> Self {
10342            Self { b: fidl::new_empty!(FlexibleBitsUint8, D) }
10343        }
10344
10345        #[inline]
10346        unsafe fn decode(
10347            &mut self,
10348            decoder: &mut fidl::encoding::Decoder<'_, D>,
10349            offset: usize,
10350            _depth: fidl::encoding::Depth,
10351        ) -> fidl::Result<()> {
10352            decoder.debug_check_bounds::<Self>(offset);
10353            // Verify that padding bytes are zero.
10354            fidl::decode!(FlexibleBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
10355            Ok(())
10356        }
10357    }
10358
10359    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16Struct {
10360        type Borrowed<'a> = &'a Self;
10361        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10362            value
10363        }
10364    }
10365
10366    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16Struct {
10367        type Owned = Self;
10368
10369        #[inline(always)]
10370        fn inline_align(_context: fidl::encoding::Context) -> usize {
10371            2
10372        }
10373
10374        #[inline(always)]
10375        fn inline_size(_context: fidl::encoding::Context) -> usize {
10376            2
10377        }
10378    }
10379
10380    unsafe impl<D: fidl::encoding::ResourceDialect>
10381        fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for &FlexibleEnumInt16Struct
10382    {
10383        #[inline]
10384        unsafe fn encode(
10385            self,
10386            encoder: &mut fidl::encoding::Encoder<'_, D>,
10387            offset: usize,
10388            _depth: fidl::encoding::Depth,
10389        ) -> fidl::Result<()> {
10390            encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10391            // Delegate to tuple encoding.
10392            fidl::encoding::Encode::<FlexibleEnumInt16Struct, D>::encode(
10393                (<FlexibleEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10394                encoder,
10395                offset,
10396                _depth,
10397            )
10398        }
10399    }
10400    unsafe impl<
10401        D: fidl::encoding::ResourceDialect,
10402        T0: fidl::encoding::Encode<FlexibleEnumInt16, D>,
10403    > fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for (T0,)
10404    {
10405        #[inline]
10406        unsafe fn encode(
10407            self,
10408            encoder: &mut fidl::encoding::Encoder<'_, D>,
10409            offset: usize,
10410            depth: fidl::encoding::Depth,
10411        ) -> fidl::Result<()> {
10412            encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10413            // Zero out padding regions. There's no need to apply masks
10414            // because the unmasked parts will be overwritten by fields.
10415            // Write the fields.
10416            self.0.encode(encoder, offset + 0, depth)?;
10417            Ok(())
10418        }
10419    }
10420
10421    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10422        for FlexibleEnumInt16Struct
10423    {
10424        #[inline(always)]
10425        fn new_empty() -> Self {
10426            Self { e: fidl::new_empty!(FlexibleEnumInt16, D) }
10427        }
10428
10429        #[inline]
10430        unsafe fn decode(
10431            &mut self,
10432            decoder: &mut fidl::encoding::Decoder<'_, D>,
10433            offset: usize,
10434            _depth: fidl::encoding::Depth,
10435        ) -> fidl::Result<()> {
10436            decoder.debug_check_bounds::<Self>(offset);
10437            // Verify that padding bytes are zero.
10438            fidl::decode!(FlexibleEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
10439            Ok(())
10440        }
10441    }
10442
10443    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32Struct {
10444        type Borrowed<'a> = &'a Self;
10445        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10446            value
10447        }
10448    }
10449
10450    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32Struct {
10451        type Owned = Self;
10452
10453        #[inline(always)]
10454        fn inline_align(_context: fidl::encoding::Context) -> usize {
10455            4
10456        }
10457
10458        #[inline(always)]
10459        fn inline_size(_context: fidl::encoding::Context) -> usize {
10460            4
10461        }
10462    }
10463
10464    unsafe impl<D: fidl::encoding::ResourceDialect>
10465        fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for &FlexibleEnumInt32Struct
10466    {
10467        #[inline]
10468        unsafe fn encode(
10469            self,
10470            encoder: &mut fidl::encoding::Encoder<'_, D>,
10471            offset: usize,
10472            _depth: fidl::encoding::Depth,
10473        ) -> fidl::Result<()> {
10474            encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10475            // Delegate to tuple encoding.
10476            fidl::encoding::Encode::<FlexibleEnumInt32Struct, D>::encode(
10477                (<FlexibleEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10478                encoder,
10479                offset,
10480                _depth,
10481            )
10482        }
10483    }
10484    unsafe impl<
10485        D: fidl::encoding::ResourceDialect,
10486        T0: fidl::encoding::Encode<FlexibleEnumInt32, D>,
10487    > fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for (T0,)
10488    {
10489        #[inline]
10490        unsafe fn encode(
10491            self,
10492            encoder: &mut fidl::encoding::Encoder<'_, D>,
10493            offset: usize,
10494            depth: fidl::encoding::Depth,
10495        ) -> fidl::Result<()> {
10496            encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10497            // Zero out padding regions. There's no need to apply masks
10498            // because the unmasked parts will be overwritten by fields.
10499            // Write the fields.
10500            self.0.encode(encoder, offset + 0, depth)?;
10501            Ok(())
10502        }
10503    }
10504
10505    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10506        for FlexibleEnumInt32Struct
10507    {
10508        #[inline(always)]
10509        fn new_empty() -> Self {
10510            Self { e: fidl::new_empty!(FlexibleEnumInt32, D) }
10511        }
10512
10513        #[inline]
10514        unsafe fn decode(
10515            &mut self,
10516            decoder: &mut fidl::encoding::Decoder<'_, D>,
10517            offset: usize,
10518            _depth: fidl::encoding::Depth,
10519        ) -> fidl::Result<()> {
10520            decoder.debug_check_bounds::<Self>(offset);
10521            // Verify that padding bytes are zero.
10522            fidl::decode!(FlexibleEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
10523            Ok(())
10524        }
10525    }
10526
10527    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64Struct {
10528        type Borrowed<'a> = &'a Self;
10529        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10530            value
10531        }
10532    }
10533
10534    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64Struct {
10535        type Owned = Self;
10536
10537        #[inline(always)]
10538        fn inline_align(_context: fidl::encoding::Context) -> usize {
10539            8
10540        }
10541
10542        #[inline(always)]
10543        fn inline_size(_context: fidl::encoding::Context) -> usize {
10544            8
10545        }
10546    }
10547
10548    unsafe impl<D: fidl::encoding::ResourceDialect>
10549        fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for &FlexibleEnumInt64Struct
10550    {
10551        #[inline]
10552        unsafe fn encode(
10553            self,
10554            encoder: &mut fidl::encoding::Encoder<'_, D>,
10555            offset: usize,
10556            _depth: fidl::encoding::Depth,
10557        ) -> fidl::Result<()> {
10558            encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10559            // Delegate to tuple encoding.
10560            fidl::encoding::Encode::<FlexibleEnumInt64Struct, D>::encode(
10561                (<FlexibleEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10562                encoder,
10563                offset,
10564                _depth,
10565            )
10566        }
10567    }
10568    unsafe impl<
10569        D: fidl::encoding::ResourceDialect,
10570        T0: fidl::encoding::Encode<FlexibleEnumInt64, D>,
10571    > fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for (T0,)
10572    {
10573        #[inline]
10574        unsafe fn encode(
10575            self,
10576            encoder: &mut fidl::encoding::Encoder<'_, D>,
10577            offset: usize,
10578            depth: fidl::encoding::Depth,
10579        ) -> fidl::Result<()> {
10580            encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10581            // Zero out padding regions. There's no need to apply masks
10582            // because the unmasked parts will be overwritten by fields.
10583            // Write the fields.
10584            self.0.encode(encoder, offset + 0, depth)?;
10585            Ok(())
10586        }
10587    }
10588
10589    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10590        for FlexibleEnumInt64Struct
10591    {
10592        #[inline(always)]
10593        fn new_empty() -> Self {
10594            Self { e: fidl::new_empty!(FlexibleEnumInt64, D) }
10595        }
10596
10597        #[inline]
10598        unsafe fn decode(
10599            &mut self,
10600            decoder: &mut fidl::encoding::Decoder<'_, D>,
10601            offset: usize,
10602            _depth: fidl::encoding::Depth,
10603        ) -> fidl::Result<()> {
10604            decoder.debug_check_bounds::<Self>(offset);
10605            // Verify that padding bytes are zero.
10606            fidl::decode!(FlexibleEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
10607            Ok(())
10608        }
10609    }
10610
10611    impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8Struct {
10612        type Borrowed<'a> = &'a Self;
10613        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10614            value
10615        }
10616    }
10617
10618    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8Struct {
10619        type Owned = Self;
10620
10621        #[inline(always)]
10622        fn inline_align(_context: fidl::encoding::Context) -> usize {
10623            1
10624        }
10625
10626        #[inline(always)]
10627        fn inline_size(_context: fidl::encoding::Context) -> usize {
10628            1
10629        }
10630    }
10631
10632    unsafe impl<D: fidl::encoding::ResourceDialect>
10633        fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for &FlexibleEnumInt8Struct
10634    {
10635        #[inline]
10636        unsafe fn encode(
10637            self,
10638            encoder: &mut fidl::encoding::Encoder<'_, D>,
10639            offset: usize,
10640            _depth: fidl::encoding::Depth,
10641        ) -> fidl::Result<()> {
10642            encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10643            // Delegate to tuple encoding.
10644            fidl::encoding::Encode::<FlexibleEnumInt8Struct, D>::encode(
10645                (<FlexibleEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10646                encoder,
10647                offset,
10648                _depth,
10649            )
10650        }
10651    }
10652    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt8, D>>
10653        fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for (T0,)
10654    {
10655        #[inline]
10656        unsafe fn encode(
10657            self,
10658            encoder: &mut fidl::encoding::Encoder<'_, D>,
10659            offset: usize,
10660            depth: fidl::encoding::Depth,
10661        ) -> fidl::Result<()> {
10662            encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10663            // Zero out padding regions. There's no need to apply masks
10664            // because the unmasked parts will be overwritten by fields.
10665            // Write the fields.
10666            self.0.encode(encoder, offset + 0, depth)?;
10667            Ok(())
10668        }
10669    }
10670
10671    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10672        for FlexibleEnumInt8Struct
10673    {
10674        #[inline(always)]
10675        fn new_empty() -> Self {
10676            Self { e: fidl::new_empty!(FlexibleEnumInt8, D) }
10677        }
10678
10679        #[inline]
10680        unsafe fn decode(
10681            &mut self,
10682            decoder: &mut fidl::encoding::Decoder<'_, D>,
10683            offset: usize,
10684            _depth: fidl::encoding::Depth,
10685        ) -> fidl::Result<()> {
10686            decoder.debug_check_bounds::<Self>(offset);
10687            // Verify that padding bytes are zero.
10688            fidl::decode!(FlexibleEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
10689            Ok(())
10690        }
10691    }
10692
10693    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16Struct {
10694        type Borrowed<'a> = &'a Self;
10695        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10696            value
10697        }
10698    }
10699
10700    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16Struct {
10701        type Owned = Self;
10702
10703        #[inline(always)]
10704        fn inline_align(_context: fidl::encoding::Context) -> usize {
10705            2
10706        }
10707
10708        #[inline(always)]
10709        fn inline_size(_context: fidl::encoding::Context) -> usize {
10710            2
10711        }
10712    }
10713
10714    unsafe impl<D: fidl::encoding::ResourceDialect>
10715        fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for &FlexibleEnumUint16Struct
10716    {
10717        #[inline]
10718        unsafe fn encode(
10719            self,
10720            encoder: &mut fidl::encoding::Encoder<'_, D>,
10721            offset: usize,
10722            _depth: fidl::encoding::Depth,
10723        ) -> fidl::Result<()> {
10724            encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10725            // Delegate to tuple encoding.
10726            fidl::encoding::Encode::<FlexibleEnumUint16Struct, D>::encode(
10727                (<FlexibleEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10728                encoder,
10729                offset,
10730                _depth,
10731            )
10732        }
10733    }
10734    unsafe impl<
10735        D: fidl::encoding::ResourceDialect,
10736        T0: fidl::encoding::Encode<FlexibleEnumUint16, D>,
10737    > fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for (T0,)
10738    {
10739        #[inline]
10740        unsafe fn encode(
10741            self,
10742            encoder: &mut fidl::encoding::Encoder<'_, D>,
10743            offset: usize,
10744            depth: fidl::encoding::Depth,
10745        ) -> fidl::Result<()> {
10746            encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10747            // Zero out padding regions. There's no need to apply masks
10748            // because the unmasked parts will be overwritten by fields.
10749            // Write the fields.
10750            self.0.encode(encoder, offset + 0, depth)?;
10751            Ok(())
10752        }
10753    }
10754
10755    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10756        for FlexibleEnumUint16Struct
10757    {
10758        #[inline(always)]
10759        fn new_empty() -> Self {
10760            Self { e: fidl::new_empty!(FlexibleEnumUint16, D) }
10761        }
10762
10763        #[inline]
10764        unsafe fn decode(
10765            &mut self,
10766            decoder: &mut fidl::encoding::Decoder<'_, D>,
10767            offset: usize,
10768            _depth: fidl::encoding::Depth,
10769        ) -> fidl::Result<()> {
10770            decoder.debug_check_bounds::<Self>(offset);
10771            // Verify that padding bytes are zero.
10772            fidl::decode!(FlexibleEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
10773            Ok(())
10774        }
10775    }
10776
10777    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32Struct {
10778        type Borrowed<'a> = &'a Self;
10779        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10780            value
10781        }
10782    }
10783
10784    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32Struct {
10785        type Owned = Self;
10786
10787        #[inline(always)]
10788        fn inline_align(_context: fidl::encoding::Context) -> usize {
10789            4
10790        }
10791
10792        #[inline(always)]
10793        fn inline_size(_context: fidl::encoding::Context) -> usize {
10794            4
10795        }
10796    }
10797
10798    unsafe impl<D: fidl::encoding::ResourceDialect>
10799        fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for &FlexibleEnumUint32Struct
10800    {
10801        #[inline]
10802        unsafe fn encode(
10803            self,
10804            encoder: &mut fidl::encoding::Encoder<'_, D>,
10805            offset: usize,
10806            _depth: fidl::encoding::Depth,
10807        ) -> fidl::Result<()> {
10808            encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10809            // Delegate to tuple encoding.
10810            fidl::encoding::Encode::<FlexibleEnumUint32Struct, D>::encode(
10811                (<FlexibleEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10812                encoder,
10813                offset,
10814                _depth,
10815            )
10816        }
10817    }
10818    unsafe impl<
10819        D: fidl::encoding::ResourceDialect,
10820        T0: fidl::encoding::Encode<FlexibleEnumUint32, D>,
10821    > fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for (T0,)
10822    {
10823        #[inline]
10824        unsafe fn encode(
10825            self,
10826            encoder: &mut fidl::encoding::Encoder<'_, D>,
10827            offset: usize,
10828            depth: fidl::encoding::Depth,
10829        ) -> fidl::Result<()> {
10830            encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10831            // Zero out padding regions. There's no need to apply masks
10832            // because the unmasked parts will be overwritten by fields.
10833            // Write the fields.
10834            self.0.encode(encoder, offset + 0, depth)?;
10835            Ok(())
10836        }
10837    }
10838
10839    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10840        for FlexibleEnumUint32Struct
10841    {
10842        #[inline(always)]
10843        fn new_empty() -> Self {
10844            Self { e: fidl::new_empty!(FlexibleEnumUint32, D) }
10845        }
10846
10847        #[inline]
10848        unsafe fn decode(
10849            &mut self,
10850            decoder: &mut fidl::encoding::Decoder<'_, D>,
10851            offset: usize,
10852            _depth: fidl::encoding::Depth,
10853        ) -> fidl::Result<()> {
10854            decoder.debug_check_bounds::<Self>(offset);
10855            // Verify that padding bytes are zero.
10856            fidl::decode!(FlexibleEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
10857            Ok(())
10858        }
10859    }
10860
10861    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64Struct {
10862        type Borrowed<'a> = &'a Self;
10863        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10864            value
10865        }
10866    }
10867
10868    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64Struct {
10869        type Owned = Self;
10870
10871        #[inline(always)]
10872        fn inline_align(_context: fidl::encoding::Context) -> usize {
10873            8
10874        }
10875
10876        #[inline(always)]
10877        fn inline_size(_context: fidl::encoding::Context) -> usize {
10878            8
10879        }
10880    }
10881
10882    unsafe impl<D: fidl::encoding::ResourceDialect>
10883        fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for &FlexibleEnumUint64Struct
10884    {
10885        #[inline]
10886        unsafe fn encode(
10887            self,
10888            encoder: &mut fidl::encoding::Encoder<'_, D>,
10889            offset: usize,
10890            _depth: fidl::encoding::Depth,
10891        ) -> fidl::Result<()> {
10892            encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10893            // Delegate to tuple encoding.
10894            fidl::encoding::Encode::<FlexibleEnumUint64Struct, D>::encode(
10895                (<FlexibleEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10896                encoder,
10897                offset,
10898                _depth,
10899            )
10900        }
10901    }
10902    unsafe impl<
10903        D: fidl::encoding::ResourceDialect,
10904        T0: fidl::encoding::Encode<FlexibleEnumUint64, D>,
10905    > fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for (T0,)
10906    {
10907        #[inline]
10908        unsafe fn encode(
10909            self,
10910            encoder: &mut fidl::encoding::Encoder<'_, D>,
10911            offset: usize,
10912            depth: fidl::encoding::Depth,
10913        ) -> fidl::Result<()> {
10914            encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10915            // Zero out padding regions. There's no need to apply masks
10916            // because the unmasked parts will be overwritten by fields.
10917            // Write the fields.
10918            self.0.encode(encoder, offset + 0, depth)?;
10919            Ok(())
10920        }
10921    }
10922
10923    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10924        for FlexibleEnumUint64Struct
10925    {
10926        #[inline(always)]
10927        fn new_empty() -> Self {
10928            Self { e: fidl::new_empty!(FlexibleEnumUint64, D) }
10929        }
10930
10931        #[inline]
10932        unsafe fn decode(
10933            &mut self,
10934            decoder: &mut fidl::encoding::Decoder<'_, D>,
10935            offset: usize,
10936            _depth: fidl::encoding::Depth,
10937        ) -> fidl::Result<()> {
10938            decoder.debug_check_bounds::<Self>(offset);
10939            // Verify that padding bytes are zero.
10940            fidl::decode!(FlexibleEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
10941            Ok(())
10942        }
10943    }
10944
10945    impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8Struct {
10946        type Borrowed<'a> = &'a Self;
10947        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10948            value
10949        }
10950    }
10951
10952    unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8Struct {
10953        type Owned = Self;
10954
10955        #[inline(always)]
10956        fn inline_align(_context: fidl::encoding::Context) -> usize {
10957            1
10958        }
10959
10960        #[inline(always)]
10961        fn inline_size(_context: fidl::encoding::Context) -> usize {
10962            1
10963        }
10964    }
10965
10966    unsafe impl<D: fidl::encoding::ResourceDialect>
10967        fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for &FlexibleEnumUint8Struct
10968    {
10969        #[inline]
10970        unsafe fn encode(
10971            self,
10972            encoder: &mut fidl::encoding::Encoder<'_, D>,
10973            offset: usize,
10974            _depth: fidl::encoding::Depth,
10975        ) -> fidl::Result<()> {
10976            encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10977            // Delegate to tuple encoding.
10978            fidl::encoding::Encode::<FlexibleEnumUint8Struct, D>::encode(
10979                (<FlexibleEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10980                encoder,
10981                offset,
10982                _depth,
10983            )
10984        }
10985    }
10986    unsafe impl<
10987        D: fidl::encoding::ResourceDialect,
10988        T0: fidl::encoding::Encode<FlexibleEnumUint8, D>,
10989    > fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for (T0,)
10990    {
10991        #[inline]
10992        unsafe fn encode(
10993            self,
10994            encoder: &mut fidl::encoding::Encoder<'_, D>,
10995            offset: usize,
10996            depth: fidl::encoding::Depth,
10997        ) -> fidl::Result<()> {
10998            encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10999            // Zero out padding regions. There's no need to apply masks
11000            // because the unmasked parts will be overwritten by fields.
11001            // Write the fields.
11002            self.0.encode(encoder, offset + 0, depth)?;
11003            Ok(())
11004        }
11005    }
11006
11007    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11008        for FlexibleEnumUint8Struct
11009    {
11010        #[inline(always)]
11011        fn new_empty() -> Self {
11012            Self { e: fidl::new_empty!(FlexibleEnumUint8, D) }
11013        }
11014
11015        #[inline]
11016        unsafe fn decode(
11017            &mut self,
11018            decoder: &mut fidl::encoding::Decoder<'_, D>,
11019            offset: usize,
11020            _depth: fidl::encoding::Depth,
11021        ) -> fidl::Result<()> {
11022            decoder.debug_check_bounds::<Self>(offset);
11023            // Verify that padding bytes are zero.
11024            fidl::decode!(FlexibleEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
11025            Ok(())
11026        }
11027    }
11028
11029    impl fidl::encoding::ValueTypeMarker for GoldenBitsStruct {
11030        type Borrowed<'a> = &'a Self;
11031        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11032            value
11033        }
11034    }
11035
11036    unsafe impl fidl::encoding::TypeMarker for GoldenBitsStruct {
11037        type Owned = Self;
11038
11039        #[inline(always)]
11040        fn inline_align(_context: fidl::encoding::Context) -> usize {
11041            2
11042        }
11043
11044        #[inline(always)]
11045        fn inline_size(_context: fidl::encoding::Context) -> usize {
11046            2
11047        }
11048    }
11049
11050    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBitsStruct, D>
11051        for &GoldenBitsStruct
11052    {
11053        #[inline]
11054        unsafe fn encode(
11055            self,
11056            encoder: &mut fidl::encoding::Encoder<'_, D>,
11057            offset: usize,
11058            _depth: fidl::encoding::Depth,
11059        ) -> fidl::Result<()> {
11060            encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
11061            // Delegate to tuple encoding.
11062            fidl::encoding::Encode::<GoldenBitsStruct, D>::encode(
11063                (<GoldenBits as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11064                encoder,
11065                offset,
11066                _depth,
11067            )
11068        }
11069    }
11070    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenBits, D>>
11071        fidl::encoding::Encode<GoldenBitsStruct, D> for (T0,)
11072    {
11073        #[inline]
11074        unsafe fn encode(
11075            self,
11076            encoder: &mut fidl::encoding::Encoder<'_, D>,
11077            offset: usize,
11078            depth: fidl::encoding::Depth,
11079        ) -> fidl::Result<()> {
11080            encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
11081            // Zero out padding regions. There's no need to apply masks
11082            // because the unmasked parts will be overwritten by fields.
11083            // Write the fields.
11084            self.0.encode(encoder, offset + 0, depth)?;
11085            Ok(())
11086        }
11087    }
11088
11089    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBitsStruct {
11090        #[inline(always)]
11091        fn new_empty() -> Self {
11092            Self { v: fidl::new_empty!(GoldenBits, D) }
11093        }
11094
11095        #[inline]
11096        unsafe fn decode(
11097            &mut self,
11098            decoder: &mut fidl::encoding::Decoder<'_, D>,
11099            offset: usize,
11100            _depth: fidl::encoding::Depth,
11101        ) -> fidl::Result<()> {
11102            decoder.debug_check_bounds::<Self>(offset);
11103            // Verify that padding bytes are zero.
11104            fidl::decode!(GoldenBits, D, &mut self.v, decoder, offset + 0, _depth)?;
11105            Ok(())
11106        }
11107    }
11108
11109    impl fidl::encoding::ValueTypeMarker for GoldenBoolStruct {
11110        type Borrowed<'a> = &'a Self;
11111        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11112            value
11113        }
11114    }
11115
11116    unsafe impl fidl::encoding::TypeMarker for GoldenBoolStruct {
11117        type Owned = Self;
11118
11119        #[inline(always)]
11120        fn inline_align(_context: fidl::encoding::Context) -> usize {
11121            1
11122        }
11123
11124        #[inline(always)]
11125        fn inline_size(_context: fidl::encoding::Context) -> usize {
11126            1
11127        }
11128    }
11129
11130    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBoolStruct, D>
11131        for &GoldenBoolStruct
11132    {
11133        #[inline]
11134        unsafe fn encode(
11135            self,
11136            encoder: &mut fidl::encoding::Encoder<'_, D>,
11137            offset: usize,
11138            _depth: fidl::encoding::Depth,
11139        ) -> fidl::Result<()> {
11140            encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
11141            // Delegate to tuple encoding.
11142            fidl::encoding::Encode::<GoldenBoolStruct, D>::encode(
11143                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11144                encoder,
11145                offset,
11146                _depth,
11147            )
11148        }
11149    }
11150    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11151        fidl::encoding::Encode<GoldenBoolStruct, D> for (T0,)
11152    {
11153        #[inline]
11154        unsafe fn encode(
11155            self,
11156            encoder: &mut fidl::encoding::Encoder<'_, D>,
11157            offset: usize,
11158            depth: fidl::encoding::Depth,
11159        ) -> fidl::Result<()> {
11160            encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
11161            // Zero out padding regions. There's no need to apply masks
11162            // because the unmasked parts will be overwritten by fields.
11163            // Write the fields.
11164            self.0.encode(encoder, offset + 0, depth)?;
11165            Ok(())
11166        }
11167    }
11168
11169    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBoolStruct {
11170        #[inline(always)]
11171        fn new_empty() -> Self {
11172            Self { v: fidl::new_empty!(bool, D) }
11173        }
11174
11175        #[inline]
11176        unsafe fn decode(
11177            &mut self,
11178            decoder: &mut fidl::encoding::Decoder<'_, D>,
11179            offset: usize,
11180            _depth: fidl::encoding::Depth,
11181        ) -> fidl::Result<()> {
11182            decoder.debug_check_bounds::<Self>(offset);
11183            // Verify that padding bytes are zero.
11184            fidl::decode!(bool, D, &mut self.v, decoder, offset + 0, _depth)?;
11185            Ok(())
11186        }
11187    }
11188
11189    impl fidl::encoding::ValueTypeMarker for GoldenByteArrayStruct {
11190        type Borrowed<'a> = &'a Self;
11191        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11192            value
11193        }
11194    }
11195
11196    unsafe impl fidl::encoding::TypeMarker for GoldenByteArrayStruct {
11197        type Owned = Self;
11198
11199        #[inline(always)]
11200        fn inline_align(_context: fidl::encoding::Context) -> usize {
11201            1
11202        }
11203
11204        #[inline(always)]
11205        fn inline_size(_context: fidl::encoding::Context) -> usize {
11206            4
11207        }
11208        #[inline(always)]
11209        fn encode_is_copy() -> bool {
11210            true
11211        }
11212
11213        #[inline(always)]
11214        fn decode_is_copy() -> bool {
11215            true
11216        }
11217    }
11218
11219    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenByteArrayStruct, D>
11220        for &GoldenByteArrayStruct
11221    {
11222        #[inline]
11223        unsafe fn encode(
11224            self,
11225            encoder: &mut fidl::encoding::Encoder<'_, D>,
11226            offset: usize,
11227            _depth: fidl::encoding::Depth,
11228        ) -> fidl::Result<()> {
11229            encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11230            unsafe {
11231                // Copy the object into the buffer.
11232                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11233                (buf_ptr as *mut GoldenByteArrayStruct)
11234                    .write_unaligned((self as *const GoldenByteArrayStruct).read());
11235                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11236                // done second because the memcpy will write garbage to these bytes.
11237            }
11238            Ok(())
11239        }
11240    }
11241    unsafe impl<
11242        D: fidl::encoding::ResourceDialect,
11243        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 4>, D>,
11244    > fidl::encoding::Encode<GoldenByteArrayStruct, D> for (T0,)
11245    {
11246        #[inline]
11247        unsafe fn encode(
11248            self,
11249            encoder: &mut fidl::encoding::Encoder<'_, D>,
11250            offset: usize,
11251            depth: fidl::encoding::Depth,
11252        ) -> fidl::Result<()> {
11253            encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11254            // Zero out padding regions. There's no need to apply masks
11255            // because the unmasked parts will be overwritten by fields.
11256            // Write the fields.
11257            self.0.encode(encoder, offset + 0, depth)?;
11258            Ok(())
11259        }
11260    }
11261
11262    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenByteArrayStruct {
11263        #[inline(always)]
11264        fn new_empty() -> Self {
11265            Self { v: fidl::new_empty!(fidl::encoding::Array<u8, 4>, D) }
11266        }
11267
11268        #[inline]
11269        unsafe fn decode(
11270            &mut self,
11271            decoder: &mut fidl::encoding::Decoder<'_, D>,
11272            offset: usize,
11273            _depth: fidl::encoding::Depth,
11274        ) -> fidl::Result<()> {
11275            decoder.debug_check_bounds::<Self>(offset);
11276            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11277            // Verify that padding bytes are zero.
11278            // Copy from the buffer into the object.
11279            unsafe {
11280                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11281            }
11282            Ok(())
11283        }
11284    }
11285
11286    impl fidl::encoding::ValueTypeMarker for GoldenByteVectorStruct {
11287        type Borrowed<'a> = &'a Self;
11288        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11289            value
11290        }
11291    }
11292
11293    unsafe impl fidl::encoding::TypeMarker for GoldenByteVectorStruct {
11294        type Owned = Self;
11295
11296        #[inline(always)]
11297        fn inline_align(_context: fidl::encoding::Context) -> usize {
11298            8
11299        }
11300
11301        #[inline(always)]
11302        fn inline_size(_context: fidl::encoding::Context) -> usize {
11303            16
11304        }
11305    }
11306
11307    unsafe impl<D: fidl::encoding::ResourceDialect>
11308        fidl::encoding::Encode<GoldenByteVectorStruct, D> for &GoldenByteVectorStruct
11309    {
11310        #[inline]
11311        unsafe fn encode(
11312            self,
11313            encoder: &mut fidl::encoding::Encoder<'_, D>,
11314            offset: usize,
11315            _depth: fidl::encoding::Depth,
11316        ) -> fidl::Result<()> {
11317            encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11318            // Delegate to tuple encoding.
11319            fidl::encoding::Encode::<GoldenByteVectorStruct, D>::encode(
11320                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
11321                    &self.v,
11322                ),),
11323                encoder,
11324                offset,
11325                _depth,
11326            )
11327        }
11328    }
11329    unsafe impl<
11330        D: fidl::encoding::ResourceDialect,
11331        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
11332    > fidl::encoding::Encode<GoldenByteVectorStruct, D> for (T0,)
11333    {
11334        #[inline]
11335        unsafe fn encode(
11336            self,
11337            encoder: &mut fidl::encoding::Encoder<'_, D>,
11338            offset: usize,
11339            depth: fidl::encoding::Depth,
11340        ) -> fidl::Result<()> {
11341            encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11342            // Zero out padding regions. There's no need to apply masks
11343            // because the unmasked parts will be overwritten by fields.
11344            // Write the fields.
11345            self.0.encode(encoder, offset + 0, depth)?;
11346            Ok(())
11347        }
11348    }
11349
11350    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11351        for GoldenByteVectorStruct
11352    {
11353        #[inline(always)]
11354        fn new_empty() -> Self {
11355            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
11356        }
11357
11358        #[inline]
11359        unsafe fn decode(
11360            &mut self,
11361            decoder: &mut fidl::encoding::Decoder<'_, D>,
11362            offset: usize,
11363            _depth: fidl::encoding::Depth,
11364        ) -> fidl::Result<()> {
11365            decoder.debug_check_bounds::<Self>(offset);
11366            // Verify that padding bytes are zero.
11367            fidl::decode!(
11368                fidl::encoding::UnboundedVector<u8>,
11369                D,
11370                &mut self.v,
11371                decoder,
11372                offset + 0,
11373                _depth
11374            )?;
11375            Ok(())
11376        }
11377    }
11378
11379    impl fidl::encoding::ValueTypeMarker for GoldenDoubleStruct {
11380        type Borrowed<'a> = &'a Self;
11381        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11382            value
11383        }
11384    }
11385
11386    unsafe impl fidl::encoding::TypeMarker for GoldenDoubleStruct {
11387        type Owned = Self;
11388
11389        #[inline(always)]
11390        fn inline_align(_context: fidl::encoding::Context) -> usize {
11391            8
11392        }
11393
11394        #[inline(always)]
11395        fn inline_size(_context: fidl::encoding::Context) -> usize {
11396            8
11397        }
11398    }
11399
11400    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenDoubleStruct, D>
11401        for &GoldenDoubleStruct
11402    {
11403        #[inline]
11404        unsafe fn encode(
11405            self,
11406            encoder: &mut fidl::encoding::Encoder<'_, D>,
11407            offset: usize,
11408            _depth: fidl::encoding::Depth,
11409        ) -> fidl::Result<()> {
11410            encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11411            // Delegate to tuple encoding.
11412            fidl::encoding::Encode::<GoldenDoubleStruct, D>::encode(
11413                (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11414                encoder,
11415                offset,
11416                _depth,
11417            )
11418        }
11419    }
11420    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
11421        fidl::encoding::Encode<GoldenDoubleStruct, D> for (T0,)
11422    {
11423        #[inline]
11424        unsafe fn encode(
11425            self,
11426            encoder: &mut fidl::encoding::Encoder<'_, D>,
11427            offset: usize,
11428            depth: fidl::encoding::Depth,
11429        ) -> fidl::Result<()> {
11430            encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11431            // Zero out padding regions. There's no need to apply masks
11432            // because the unmasked parts will be overwritten by fields.
11433            // Write the fields.
11434            self.0.encode(encoder, offset + 0, depth)?;
11435            Ok(())
11436        }
11437    }
11438
11439    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenDoubleStruct {
11440        #[inline(always)]
11441        fn new_empty() -> Self {
11442            Self { v: fidl::new_empty!(f64, D) }
11443        }
11444
11445        #[inline]
11446        unsafe fn decode(
11447            &mut self,
11448            decoder: &mut fidl::encoding::Decoder<'_, D>,
11449            offset: usize,
11450            _depth: fidl::encoding::Depth,
11451        ) -> fidl::Result<()> {
11452            decoder.debug_check_bounds::<Self>(offset);
11453            // Verify that padding bytes are zero.
11454            fidl::decode!(f64, D, &mut self.v, decoder, offset + 0, _depth)?;
11455            Ok(())
11456        }
11457    }
11458
11459    impl fidl::encoding::ValueTypeMarker for GoldenEnumStruct {
11460        type Borrowed<'a> = &'a Self;
11461        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11462            value
11463        }
11464    }
11465
11466    unsafe impl fidl::encoding::TypeMarker for GoldenEnumStruct {
11467        type Owned = Self;
11468
11469        #[inline(always)]
11470        fn inline_align(_context: fidl::encoding::Context) -> usize {
11471            2
11472        }
11473
11474        #[inline(always)]
11475        fn inline_size(_context: fidl::encoding::Context) -> usize {
11476            2
11477        }
11478    }
11479
11480    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenEnumStruct, D>
11481        for &GoldenEnumStruct
11482    {
11483        #[inline]
11484        unsafe fn encode(
11485            self,
11486            encoder: &mut fidl::encoding::Encoder<'_, D>,
11487            offset: usize,
11488            _depth: fidl::encoding::Depth,
11489        ) -> fidl::Result<()> {
11490            encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11491            // Delegate to tuple encoding.
11492            fidl::encoding::Encode::<GoldenEnumStruct, D>::encode(
11493                (<GoldenEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11494                encoder,
11495                offset,
11496                _depth,
11497            )
11498        }
11499    }
11500    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenEnum, D>>
11501        fidl::encoding::Encode<GoldenEnumStruct, D> for (T0,)
11502    {
11503        #[inline]
11504        unsafe fn encode(
11505            self,
11506            encoder: &mut fidl::encoding::Encoder<'_, D>,
11507            offset: usize,
11508            depth: fidl::encoding::Depth,
11509        ) -> fidl::Result<()> {
11510            encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11511            // Zero out padding regions. There's no need to apply masks
11512            // because the unmasked parts will be overwritten by fields.
11513            // Write the fields.
11514            self.0.encode(encoder, offset + 0, depth)?;
11515            Ok(())
11516        }
11517    }
11518
11519    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnumStruct {
11520        #[inline(always)]
11521        fn new_empty() -> Self {
11522            Self { v: fidl::new_empty!(GoldenEnum, D) }
11523        }
11524
11525        #[inline]
11526        unsafe fn decode(
11527            &mut self,
11528            decoder: &mut fidl::encoding::Decoder<'_, D>,
11529            offset: usize,
11530            _depth: fidl::encoding::Depth,
11531        ) -> fidl::Result<()> {
11532            decoder.debug_check_bounds::<Self>(offset);
11533            // Verify that padding bytes are zero.
11534            fidl::decode!(GoldenEnum, D, &mut self.v, decoder, offset + 0, _depth)?;
11535            Ok(())
11536        }
11537    }
11538
11539    impl fidl::encoding::ValueTypeMarker for GoldenFloatStruct {
11540        type Borrowed<'a> = &'a Self;
11541        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11542            value
11543        }
11544    }
11545
11546    unsafe impl fidl::encoding::TypeMarker for GoldenFloatStruct {
11547        type Owned = Self;
11548
11549        #[inline(always)]
11550        fn inline_align(_context: fidl::encoding::Context) -> usize {
11551            4
11552        }
11553
11554        #[inline(always)]
11555        fn inline_size(_context: fidl::encoding::Context) -> usize {
11556            4
11557        }
11558    }
11559
11560    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenFloatStruct, D>
11561        for &GoldenFloatStruct
11562    {
11563        #[inline]
11564        unsafe fn encode(
11565            self,
11566            encoder: &mut fidl::encoding::Encoder<'_, D>,
11567            offset: usize,
11568            _depth: fidl::encoding::Depth,
11569        ) -> fidl::Result<()> {
11570            encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11571            // Delegate to tuple encoding.
11572            fidl::encoding::Encode::<GoldenFloatStruct, D>::encode(
11573                (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11574                encoder,
11575                offset,
11576                _depth,
11577            )
11578        }
11579    }
11580    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
11581        fidl::encoding::Encode<GoldenFloatStruct, D> for (T0,)
11582    {
11583        #[inline]
11584        unsafe fn encode(
11585            self,
11586            encoder: &mut fidl::encoding::Encoder<'_, D>,
11587            offset: usize,
11588            depth: fidl::encoding::Depth,
11589        ) -> fidl::Result<()> {
11590            encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11591            // Zero out padding regions. There's no need to apply masks
11592            // because the unmasked parts will be overwritten by fields.
11593            // Write the fields.
11594            self.0.encode(encoder, offset + 0, depth)?;
11595            Ok(())
11596        }
11597    }
11598
11599    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenFloatStruct {
11600        #[inline(always)]
11601        fn new_empty() -> Self {
11602            Self { v: fidl::new_empty!(f32, D) }
11603        }
11604
11605        #[inline]
11606        unsafe fn decode(
11607            &mut self,
11608            decoder: &mut fidl::encoding::Decoder<'_, D>,
11609            offset: usize,
11610            _depth: fidl::encoding::Depth,
11611        ) -> fidl::Result<()> {
11612            decoder.debug_check_bounds::<Self>(offset);
11613            // Verify that padding bytes are zero.
11614            fidl::decode!(f32, D, &mut self.v, decoder, offset + 0, _depth)?;
11615            Ok(())
11616        }
11617    }
11618
11619    impl fidl::encoding::ValueTypeMarker for GoldenIntStruct {
11620        type Borrowed<'a> = &'a Self;
11621        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11622            value
11623        }
11624    }
11625
11626    unsafe impl fidl::encoding::TypeMarker for GoldenIntStruct {
11627        type Owned = Self;
11628
11629        #[inline(always)]
11630        fn inline_align(_context: fidl::encoding::Context) -> usize {
11631            2
11632        }
11633
11634        #[inline(always)]
11635        fn inline_size(_context: fidl::encoding::Context) -> usize {
11636            2
11637        }
11638        #[inline(always)]
11639        fn encode_is_copy() -> bool {
11640            true
11641        }
11642
11643        #[inline(always)]
11644        fn decode_is_copy() -> bool {
11645            true
11646        }
11647    }
11648
11649    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenIntStruct, D>
11650        for &GoldenIntStruct
11651    {
11652        #[inline]
11653        unsafe fn encode(
11654            self,
11655            encoder: &mut fidl::encoding::Encoder<'_, D>,
11656            offset: usize,
11657            _depth: fidl::encoding::Depth,
11658        ) -> fidl::Result<()> {
11659            encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11660            unsafe {
11661                // Copy the object into the buffer.
11662                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11663                (buf_ptr as *mut GoldenIntStruct)
11664                    .write_unaligned((self as *const GoldenIntStruct).read());
11665                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11666                // done second because the memcpy will write garbage to these bytes.
11667            }
11668            Ok(())
11669        }
11670    }
11671    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11672        fidl::encoding::Encode<GoldenIntStruct, D> for (T0,)
11673    {
11674        #[inline]
11675        unsafe fn encode(
11676            self,
11677            encoder: &mut fidl::encoding::Encoder<'_, D>,
11678            offset: usize,
11679            depth: fidl::encoding::Depth,
11680        ) -> fidl::Result<()> {
11681            encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11682            // Zero out padding regions. There's no need to apply masks
11683            // because the unmasked parts will be overwritten by fields.
11684            // Write the fields.
11685            self.0.encode(encoder, offset + 0, depth)?;
11686            Ok(())
11687        }
11688    }
11689
11690    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenIntStruct {
11691        #[inline(always)]
11692        fn new_empty() -> Self {
11693            Self { v: fidl::new_empty!(i16, D) }
11694        }
11695
11696        #[inline]
11697        unsafe fn decode(
11698            &mut self,
11699            decoder: &mut fidl::encoding::Decoder<'_, D>,
11700            offset: usize,
11701            _depth: fidl::encoding::Depth,
11702        ) -> fidl::Result<()> {
11703            decoder.debug_check_bounds::<Self>(offset);
11704            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11705            // Verify that padding bytes are zero.
11706            // Copy from the buffer into the object.
11707            unsafe {
11708                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11709            }
11710            Ok(())
11711        }
11712    }
11713
11714    impl fidl::encoding::ValueTypeMarker for GoldenNullableByteVectorStruct {
11715        type Borrowed<'a> = &'a Self;
11716        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11717            value
11718        }
11719    }
11720
11721    unsafe impl fidl::encoding::TypeMarker for GoldenNullableByteVectorStruct {
11722        type Owned = Self;
11723
11724        #[inline(always)]
11725        fn inline_align(_context: fidl::encoding::Context) -> usize {
11726            8
11727        }
11728
11729        #[inline(always)]
11730        fn inline_size(_context: fidl::encoding::Context) -> usize {
11731            16
11732        }
11733    }
11734
11735    unsafe impl<D: fidl::encoding::ResourceDialect>
11736        fidl::encoding::Encode<GoldenNullableByteVectorStruct, D>
11737        for &GoldenNullableByteVectorStruct
11738    {
11739        #[inline]
11740        unsafe fn encode(
11741            self,
11742            encoder: &mut fidl::encoding::Encoder<'_, D>,
11743            offset: usize,
11744            _depth: fidl::encoding::Depth,
11745        ) -> fidl::Result<()> {
11746            encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11747            // Delegate to tuple encoding.
11748            fidl::encoding::Encode::<GoldenNullableByteVectorStruct, D>::encode(
11749                (
11750                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11751                ),
11752                encoder, offset, _depth
11753            )
11754        }
11755    }
11756    unsafe impl<
11757        D: fidl::encoding::ResourceDialect,
11758        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>, D>,
11759    > fidl::encoding::Encode<GoldenNullableByteVectorStruct, D> for (T0,)
11760    {
11761        #[inline]
11762        unsafe fn encode(
11763            self,
11764            encoder: &mut fidl::encoding::Encoder<'_, D>,
11765            offset: usize,
11766            depth: fidl::encoding::Depth,
11767        ) -> fidl::Result<()> {
11768            encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11769            // Zero out padding regions. There's no need to apply masks
11770            // because the unmasked parts will be overwritten by fields.
11771            // Write the fields.
11772            self.0.encode(encoder, offset + 0, depth)?;
11773            Ok(())
11774        }
11775    }
11776
11777    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11778        for GoldenNullableByteVectorStruct
11779    {
11780        #[inline(always)]
11781        fn new_empty() -> Self {
11782            Self {
11783                v: fidl::new_empty!(
11784                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11785                    D
11786                ),
11787            }
11788        }
11789
11790        #[inline]
11791        unsafe fn decode(
11792            &mut self,
11793            decoder: &mut fidl::encoding::Decoder<'_, D>,
11794            offset: usize,
11795            _depth: fidl::encoding::Depth,
11796        ) -> fidl::Result<()> {
11797            decoder.debug_check_bounds::<Self>(offset);
11798            // Verify that padding bytes are zero.
11799            fidl::decode!(
11800                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11801                D,
11802                &mut self.v,
11803                decoder,
11804                offset + 0,
11805                _depth
11806            )?;
11807            Ok(())
11808        }
11809    }
11810
11811    impl fidl::encoding::ValueTypeMarker for GoldenNullableStringStruct {
11812        type Borrowed<'a> = &'a Self;
11813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11814            value
11815        }
11816    }
11817
11818    unsafe impl fidl::encoding::TypeMarker for GoldenNullableStringStruct {
11819        type Owned = Self;
11820
11821        #[inline(always)]
11822        fn inline_align(_context: fidl::encoding::Context) -> usize {
11823            8
11824        }
11825
11826        #[inline(always)]
11827        fn inline_size(_context: fidl::encoding::Context) -> usize {
11828            16
11829        }
11830    }
11831
11832    unsafe impl<D: fidl::encoding::ResourceDialect>
11833        fidl::encoding::Encode<GoldenNullableStringStruct, D> for &GoldenNullableStringStruct
11834    {
11835        #[inline]
11836        unsafe fn encode(
11837            self,
11838            encoder: &mut fidl::encoding::Encoder<'_, D>,
11839            offset: usize,
11840            _depth: fidl::encoding::Depth,
11841        ) -> fidl::Result<()> {
11842            encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11843            // Delegate to tuple encoding.
11844            fidl::encoding::Encode::<GoldenNullableStringStruct, D>::encode(
11845                (
11846                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11847                ),
11848                encoder, offset, _depth
11849            )
11850        }
11851    }
11852    unsafe impl<
11853        D: fidl::encoding::ResourceDialect,
11854        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
11855    > fidl::encoding::Encode<GoldenNullableStringStruct, D> for (T0,)
11856    {
11857        #[inline]
11858        unsafe fn encode(
11859            self,
11860            encoder: &mut fidl::encoding::Encoder<'_, D>,
11861            offset: usize,
11862            depth: fidl::encoding::Depth,
11863        ) -> fidl::Result<()> {
11864            encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11865            // Zero out padding regions. There's no need to apply masks
11866            // because the unmasked parts will be overwritten by fields.
11867            // Write the fields.
11868            self.0.encode(encoder, offset + 0, depth)?;
11869            Ok(())
11870        }
11871    }
11872
11873    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11874        for GoldenNullableStringStruct
11875    {
11876        #[inline(always)]
11877        fn new_empty() -> Self {
11878            Self {
11879                v: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
11880            }
11881        }
11882
11883        #[inline]
11884        unsafe fn decode(
11885            &mut self,
11886            decoder: &mut fidl::encoding::Decoder<'_, D>,
11887            offset: usize,
11888            _depth: fidl::encoding::Depth,
11889        ) -> fidl::Result<()> {
11890            decoder.debug_check_bounds::<Self>(offset);
11891            // Verify that padding bytes are zero.
11892            fidl::decode!(
11893                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
11894                D,
11895                &mut self.v,
11896                decoder,
11897                offset + 0,
11898                _depth
11899            )?;
11900            Ok(())
11901        }
11902    }
11903
11904    impl fidl::encoding::ValueTypeMarker for GoldenNullableStruct {
11905        type Borrowed<'a> = &'a Self;
11906        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11907            value
11908        }
11909    }
11910
11911    unsafe impl fidl::encoding::TypeMarker for GoldenNullableStruct {
11912        type Owned = Self;
11913
11914        #[inline(always)]
11915        fn inline_align(_context: fidl::encoding::Context) -> usize {
11916            8
11917        }
11918
11919        #[inline(always)]
11920        fn inline_size(_context: fidl::encoding::Context) -> usize {
11921            8
11922        }
11923    }
11924
11925    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenNullableStruct, D>
11926        for &GoldenNullableStruct
11927    {
11928        #[inline]
11929        unsafe fn encode(
11930            self,
11931            encoder: &mut fidl::encoding::Encoder<'_, D>,
11932            offset: usize,
11933            _depth: fidl::encoding::Depth,
11934        ) -> fidl::Result<()> {
11935            encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11936            // Delegate to tuple encoding.
11937            fidl::encoding::Encode::<GoldenNullableStruct, D>::encode(
11938                (
11939                    <fidl::encoding::Boxed<GoldenBoolStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11940                ),
11941                encoder, offset, _depth
11942            )
11943        }
11944    }
11945    unsafe impl<
11946        D: fidl::encoding::ResourceDialect,
11947        T0: fidl::encoding::Encode<fidl::encoding::Boxed<GoldenBoolStruct>, D>,
11948    > fidl::encoding::Encode<GoldenNullableStruct, D> for (T0,)
11949    {
11950        #[inline]
11951        unsafe fn encode(
11952            self,
11953            encoder: &mut fidl::encoding::Encoder<'_, D>,
11954            offset: usize,
11955            depth: fidl::encoding::Depth,
11956        ) -> fidl::Result<()> {
11957            encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11958            // Zero out padding regions. There's no need to apply masks
11959            // because the unmasked parts will be overwritten by fields.
11960            // Write the fields.
11961            self.0.encode(encoder, offset + 0, depth)?;
11962            Ok(())
11963        }
11964    }
11965
11966    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenNullableStruct {
11967        #[inline(always)]
11968        fn new_empty() -> Self {
11969            Self { v: fidl::new_empty!(fidl::encoding::Boxed<GoldenBoolStruct>, D) }
11970        }
11971
11972        #[inline]
11973        unsafe fn decode(
11974            &mut self,
11975            decoder: &mut fidl::encoding::Decoder<'_, D>,
11976            offset: usize,
11977            _depth: fidl::encoding::Depth,
11978        ) -> fidl::Result<()> {
11979            decoder.debug_check_bounds::<Self>(offset);
11980            // Verify that padding bytes are zero.
11981            fidl::decode!(
11982                fidl::encoding::Boxed<GoldenBoolStruct>,
11983                D,
11984                &mut self.v,
11985                decoder,
11986                offset + 0,
11987                _depth
11988            )?;
11989            Ok(())
11990        }
11991    }
11992
11993    impl fidl::encoding::ValueTypeMarker for GoldenNullableUnionStruct {
11994        type Borrowed<'a> = &'a Self;
11995        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11996            value
11997        }
11998    }
11999
12000    unsafe impl fidl::encoding::TypeMarker for GoldenNullableUnionStruct {
12001        type Owned = Self;
12002
12003        #[inline(always)]
12004        fn inline_align(_context: fidl::encoding::Context) -> usize {
12005            8
12006        }
12007
12008        #[inline(always)]
12009        fn inline_size(_context: fidl::encoding::Context) -> usize {
12010            16
12011        }
12012    }
12013
12014    unsafe impl<D: fidl::encoding::ResourceDialect>
12015        fidl::encoding::Encode<GoldenNullableUnionStruct, D> for &GoldenNullableUnionStruct
12016    {
12017        #[inline]
12018        unsafe fn encode(
12019            self,
12020            encoder: &mut fidl::encoding::Encoder<'_, D>,
12021            offset: usize,
12022            _depth: fidl::encoding::Depth,
12023        ) -> fidl::Result<()> {
12024            encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
12025            // Delegate to tuple encoding.
12026            fidl::encoding::Encode::<GoldenNullableUnionStruct, D>::encode(
12027                (
12028                    <fidl::encoding::OptionalUnion<GoldenUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
12029                ),
12030                encoder, offset, _depth
12031            )
12032        }
12033    }
12034    unsafe impl<
12035        D: fidl::encoding::ResourceDialect,
12036        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<GoldenUnion>, D>,
12037    > fidl::encoding::Encode<GoldenNullableUnionStruct, D> for (T0,)
12038    {
12039        #[inline]
12040        unsafe fn encode(
12041            self,
12042            encoder: &mut fidl::encoding::Encoder<'_, D>,
12043            offset: usize,
12044            depth: fidl::encoding::Depth,
12045        ) -> fidl::Result<()> {
12046            encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
12047            // Zero out padding regions. There's no need to apply masks
12048            // because the unmasked parts will be overwritten by fields.
12049            // Write the fields.
12050            self.0.encode(encoder, offset + 0, depth)?;
12051            Ok(())
12052        }
12053    }
12054
12055    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12056        for GoldenNullableUnionStruct
12057    {
12058        #[inline(always)]
12059        fn new_empty() -> Self {
12060            Self { v: fidl::new_empty!(fidl::encoding::OptionalUnion<GoldenUnion>, D) }
12061        }
12062
12063        #[inline]
12064        unsafe fn decode(
12065            &mut self,
12066            decoder: &mut fidl::encoding::Decoder<'_, D>,
12067            offset: usize,
12068            _depth: fidl::encoding::Depth,
12069        ) -> fidl::Result<()> {
12070            decoder.debug_check_bounds::<Self>(offset);
12071            // Verify that padding bytes are zero.
12072            fidl::decode!(
12073                fidl::encoding::OptionalUnion<GoldenUnion>,
12074                D,
12075                &mut self.v,
12076                decoder,
12077                offset + 0,
12078                _depth
12079            )?;
12080            Ok(())
12081        }
12082    }
12083
12084    impl fidl::encoding::ValueTypeMarker for GoldenStringStruct {
12085        type Borrowed<'a> = &'a Self;
12086        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12087            value
12088        }
12089    }
12090
12091    unsafe impl fidl::encoding::TypeMarker for GoldenStringStruct {
12092        type Owned = Self;
12093
12094        #[inline(always)]
12095        fn inline_align(_context: fidl::encoding::Context) -> usize {
12096            8
12097        }
12098
12099        #[inline(always)]
12100        fn inline_size(_context: fidl::encoding::Context) -> usize {
12101            16
12102        }
12103    }
12104
12105    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenStringStruct, D>
12106        for &GoldenStringStruct
12107    {
12108        #[inline]
12109        unsafe fn encode(
12110            self,
12111            encoder: &mut fidl::encoding::Encoder<'_, D>,
12112            offset: usize,
12113            _depth: fidl::encoding::Depth,
12114        ) -> fidl::Result<()> {
12115            encoder.debug_check_bounds::<GoldenStringStruct>(offset);
12116            // Delegate to tuple encoding.
12117            fidl::encoding::Encode::<GoldenStringStruct, D>::encode(
12118                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
12119                    &self.v,
12120                ),),
12121                encoder,
12122                offset,
12123                _depth,
12124            )
12125        }
12126    }
12127    unsafe impl<
12128        D: fidl::encoding::ResourceDialect,
12129        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
12130    > fidl::encoding::Encode<GoldenStringStruct, D> for (T0,)
12131    {
12132        #[inline]
12133        unsafe fn encode(
12134            self,
12135            encoder: &mut fidl::encoding::Encoder<'_, D>,
12136            offset: usize,
12137            depth: fidl::encoding::Depth,
12138        ) -> fidl::Result<()> {
12139            encoder.debug_check_bounds::<GoldenStringStruct>(offset);
12140            // Zero out padding regions. There's no need to apply masks
12141            // because the unmasked parts will be overwritten by fields.
12142            // Write the fields.
12143            self.0.encode(encoder, offset + 0, depth)?;
12144            Ok(())
12145        }
12146    }
12147
12148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenStringStruct {
12149        #[inline(always)]
12150        fn new_empty() -> Self {
12151            Self { v: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
12152        }
12153
12154        #[inline]
12155        unsafe fn decode(
12156            &mut self,
12157            decoder: &mut fidl::encoding::Decoder<'_, D>,
12158            offset: usize,
12159            _depth: fidl::encoding::Depth,
12160        ) -> fidl::Result<()> {
12161            decoder.debug_check_bounds::<Self>(offset);
12162            // Verify that padding bytes are zero.
12163            fidl::decode!(
12164                fidl::encoding::UnboundedString,
12165                D,
12166                &mut self.v,
12167                decoder,
12168                offset + 0,
12169                _depth
12170            )?;
12171            Ok(())
12172        }
12173    }
12174
12175    impl fidl::encoding::ValueTypeMarker for GoldenStringWithMaxSize2 {
12176        type Borrowed<'a> = &'a Self;
12177        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12178            value
12179        }
12180    }
12181
12182    unsafe impl fidl::encoding::TypeMarker for GoldenStringWithMaxSize2 {
12183        type Owned = Self;
12184
12185        #[inline(always)]
12186        fn inline_align(_context: fidl::encoding::Context) -> usize {
12187            8
12188        }
12189
12190        #[inline(always)]
12191        fn inline_size(_context: fidl::encoding::Context) -> usize {
12192            16
12193        }
12194    }
12195
12196    unsafe impl<D: fidl::encoding::ResourceDialect>
12197        fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for &GoldenStringWithMaxSize2
12198    {
12199        #[inline]
12200        unsafe fn encode(
12201            self,
12202            encoder: &mut fidl::encoding::Encoder<'_, D>,
12203            offset: usize,
12204            _depth: fidl::encoding::Depth,
12205        ) -> fidl::Result<()> {
12206            encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12207            // Delegate to tuple encoding.
12208            fidl::encoding::Encode::<GoldenStringWithMaxSize2, D>::encode(
12209                (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
12210                    &self.s,
12211                ),),
12212                encoder,
12213                offset,
12214                _depth,
12215            )
12216        }
12217    }
12218    unsafe impl<
12219        D: fidl::encoding::ResourceDialect,
12220        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
12221    > fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for (T0,)
12222    {
12223        #[inline]
12224        unsafe fn encode(
12225            self,
12226            encoder: &mut fidl::encoding::Encoder<'_, D>,
12227            offset: usize,
12228            depth: fidl::encoding::Depth,
12229        ) -> fidl::Result<()> {
12230            encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12231            // Zero out padding regions. There's no need to apply masks
12232            // because the unmasked parts will be overwritten by fields.
12233            // Write the fields.
12234            self.0.encode(encoder, offset + 0, depth)?;
12235            Ok(())
12236        }
12237    }
12238
12239    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12240        for GoldenStringWithMaxSize2
12241    {
12242        #[inline(always)]
12243        fn new_empty() -> Self {
12244            Self { s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
12245        }
12246
12247        #[inline]
12248        unsafe fn decode(
12249            &mut self,
12250            decoder: &mut fidl::encoding::Decoder<'_, D>,
12251            offset: usize,
12252            _depth: fidl::encoding::Depth,
12253        ) -> fidl::Result<()> {
12254            decoder.debug_check_bounds::<Self>(offset);
12255            // Verify that padding bytes are zero.
12256            fidl::decode!(
12257                fidl::encoding::BoundedString<2>,
12258                D,
12259                &mut self.s,
12260                decoder,
12261                offset + 0,
12262                _depth
12263            )?;
12264            Ok(())
12265        }
12266    }
12267
12268    impl fidl::encoding::ValueTypeMarker for GoldenStructArrayStruct {
12269        type Borrowed<'a> = &'a Self;
12270        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12271            value
12272        }
12273    }
12274
12275    unsafe impl fidl::encoding::TypeMarker for GoldenStructArrayStruct {
12276        type Owned = Self;
12277
12278        #[inline(always)]
12279        fn inline_align(_context: fidl::encoding::Context) -> usize {
12280            2
12281        }
12282
12283        #[inline(always)]
12284        fn inline_size(_context: fidl::encoding::Context) -> usize {
12285            4
12286        }
12287        #[inline(always)]
12288        fn encode_is_copy() -> bool {
12289            true
12290        }
12291
12292        #[inline(always)]
12293        fn decode_is_copy() -> bool {
12294            true
12295        }
12296    }
12297
12298    unsafe impl<D: fidl::encoding::ResourceDialect>
12299        fidl::encoding::Encode<GoldenStructArrayStruct, D> for &GoldenStructArrayStruct
12300    {
12301        #[inline]
12302        unsafe fn encode(
12303            self,
12304            encoder: &mut fidl::encoding::Encoder<'_, D>,
12305            offset: usize,
12306            _depth: fidl::encoding::Depth,
12307        ) -> fidl::Result<()> {
12308            encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12309            unsafe {
12310                // Copy the object into the buffer.
12311                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12312                (buf_ptr as *mut GoldenStructArrayStruct)
12313                    .write_unaligned((self as *const GoldenStructArrayStruct).read());
12314                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12315                // done second because the memcpy will write garbage to these bytes.
12316            }
12317            Ok(())
12318        }
12319    }
12320    unsafe impl<
12321        D: fidl::encoding::ResourceDialect,
12322        T0: fidl::encoding::Encode<fidl::encoding::Array<GoldenIntStruct, 2>, D>,
12323    > fidl::encoding::Encode<GoldenStructArrayStruct, D> for (T0,)
12324    {
12325        #[inline]
12326        unsafe fn encode(
12327            self,
12328            encoder: &mut fidl::encoding::Encoder<'_, D>,
12329            offset: usize,
12330            depth: fidl::encoding::Depth,
12331        ) -> fidl::Result<()> {
12332            encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12333            // Zero out padding regions. There's no need to apply masks
12334            // because the unmasked parts will be overwritten by fields.
12335            // Write the fields.
12336            self.0.encode(encoder, offset + 0, depth)?;
12337            Ok(())
12338        }
12339    }
12340
12341    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12342        for GoldenStructArrayStruct
12343    {
12344        #[inline(always)]
12345        fn new_empty() -> Self {
12346            Self { v: fidl::new_empty!(fidl::encoding::Array<GoldenIntStruct, 2>, D) }
12347        }
12348
12349        #[inline]
12350        unsafe fn decode(
12351            &mut self,
12352            decoder: &mut fidl::encoding::Decoder<'_, D>,
12353            offset: usize,
12354            _depth: fidl::encoding::Depth,
12355        ) -> fidl::Result<()> {
12356            decoder.debug_check_bounds::<Self>(offset);
12357            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12358            // Verify that padding bytes are zero.
12359            // Copy from the buffer into the object.
12360            unsafe {
12361                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12362            }
12363            Ok(())
12364        }
12365    }
12366
12367    impl fidl::encoding::ValueTypeMarker for GoldenStructVectorStruct {
12368        type Borrowed<'a> = &'a Self;
12369        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12370            value
12371        }
12372    }
12373
12374    unsafe impl fidl::encoding::TypeMarker for GoldenStructVectorStruct {
12375        type Owned = Self;
12376
12377        #[inline(always)]
12378        fn inline_align(_context: fidl::encoding::Context) -> usize {
12379            8
12380        }
12381
12382        #[inline(always)]
12383        fn inline_size(_context: fidl::encoding::Context) -> usize {
12384            16
12385        }
12386    }
12387
12388    unsafe impl<D: fidl::encoding::ResourceDialect>
12389        fidl::encoding::Encode<GoldenStructVectorStruct, D> for &GoldenStructVectorStruct
12390    {
12391        #[inline]
12392        unsafe fn encode(
12393            self,
12394            encoder: &mut fidl::encoding::Encoder<'_, D>,
12395            offset: usize,
12396            _depth: fidl::encoding::Depth,
12397        ) -> fidl::Result<()> {
12398            encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12399            // Delegate to tuple encoding.
12400            fidl::encoding::Encode::<GoldenStructVectorStruct, D>::encode(
12401                (
12402                    <fidl::encoding::UnboundedVector<GoldenIntStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
12403                ),
12404                encoder, offset, _depth
12405            )
12406        }
12407    }
12408    unsafe impl<
12409        D: fidl::encoding::ResourceDialect,
12410        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<GoldenIntStruct>, D>,
12411    > fidl::encoding::Encode<GoldenStructVectorStruct, D> for (T0,)
12412    {
12413        #[inline]
12414        unsafe fn encode(
12415            self,
12416            encoder: &mut fidl::encoding::Encoder<'_, D>,
12417            offset: usize,
12418            depth: fidl::encoding::Depth,
12419        ) -> fidl::Result<()> {
12420            encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12421            // Zero out padding regions. There's no need to apply masks
12422            // because the unmasked parts will be overwritten by fields.
12423            // Write the fields.
12424            self.0.encode(encoder, offset + 0, depth)?;
12425            Ok(())
12426        }
12427    }
12428
12429    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12430        for GoldenStructVectorStruct
12431    {
12432        #[inline(always)]
12433        fn new_empty() -> Self {
12434            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<GoldenIntStruct>, D) }
12435        }
12436
12437        #[inline]
12438        unsafe fn decode(
12439            &mut self,
12440            decoder: &mut fidl::encoding::Decoder<'_, D>,
12441            offset: usize,
12442            _depth: fidl::encoding::Depth,
12443        ) -> fidl::Result<()> {
12444            decoder.debug_check_bounds::<Self>(offset);
12445            // Verify that padding bytes are zero.
12446            fidl::decode!(
12447                fidl::encoding::UnboundedVector<GoldenIntStruct>,
12448                D,
12449                &mut self.v,
12450                decoder,
12451                offset + 0,
12452                _depth
12453            )?;
12454            Ok(())
12455        }
12456    }
12457
12458    impl fidl::encoding::ValueTypeMarker for GoldenTableStruct {
12459        type Borrowed<'a> = &'a Self;
12460        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12461            value
12462        }
12463    }
12464
12465    unsafe impl fidl::encoding::TypeMarker for GoldenTableStruct {
12466        type Owned = Self;
12467
12468        #[inline(always)]
12469        fn inline_align(_context: fidl::encoding::Context) -> usize {
12470            8
12471        }
12472
12473        #[inline(always)]
12474        fn inline_size(_context: fidl::encoding::Context) -> usize {
12475            16
12476        }
12477    }
12478
12479    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTableStruct, D>
12480        for &GoldenTableStruct
12481    {
12482        #[inline]
12483        unsafe fn encode(
12484            self,
12485            encoder: &mut fidl::encoding::Encoder<'_, D>,
12486            offset: usize,
12487            _depth: fidl::encoding::Depth,
12488        ) -> fidl::Result<()> {
12489            encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12490            // Delegate to tuple encoding.
12491            fidl::encoding::Encode::<GoldenTableStruct, D>::encode(
12492                (<GoldenTable as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12493                encoder,
12494                offset,
12495                _depth,
12496            )
12497        }
12498    }
12499    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenTable, D>>
12500        fidl::encoding::Encode<GoldenTableStruct, D> for (T0,)
12501    {
12502        #[inline]
12503        unsafe fn encode(
12504            self,
12505            encoder: &mut fidl::encoding::Encoder<'_, D>,
12506            offset: usize,
12507            depth: fidl::encoding::Depth,
12508        ) -> fidl::Result<()> {
12509            encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12510            // Zero out padding regions. There's no need to apply masks
12511            // because the unmasked parts will be overwritten by fields.
12512            // Write the fields.
12513            self.0.encode(encoder, offset + 0, depth)?;
12514            Ok(())
12515        }
12516    }
12517
12518    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTableStruct {
12519        #[inline(always)]
12520        fn new_empty() -> Self {
12521            Self { v: fidl::new_empty!(GoldenTable, D) }
12522        }
12523
12524        #[inline]
12525        unsafe fn decode(
12526            &mut self,
12527            decoder: &mut fidl::encoding::Decoder<'_, D>,
12528            offset: usize,
12529            _depth: fidl::encoding::Depth,
12530        ) -> fidl::Result<()> {
12531            decoder.debug_check_bounds::<Self>(offset);
12532            // Verify that padding bytes are zero.
12533            fidl::decode!(GoldenTable, D, &mut self.v, decoder, offset + 0, _depth)?;
12534            Ok(())
12535        }
12536    }
12537
12538    impl fidl::encoding::ValueTypeMarker for GoldenUintStruct {
12539        type Borrowed<'a> = &'a Self;
12540        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12541            value
12542        }
12543    }
12544
12545    unsafe impl fidl::encoding::TypeMarker for GoldenUintStruct {
12546        type Owned = Self;
12547
12548        #[inline(always)]
12549        fn inline_align(_context: fidl::encoding::Context) -> usize {
12550            2
12551        }
12552
12553        #[inline(always)]
12554        fn inline_size(_context: fidl::encoding::Context) -> usize {
12555            2
12556        }
12557        #[inline(always)]
12558        fn encode_is_copy() -> bool {
12559            true
12560        }
12561
12562        #[inline(always)]
12563        fn decode_is_copy() -> bool {
12564            true
12565        }
12566    }
12567
12568    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUintStruct, D>
12569        for &GoldenUintStruct
12570    {
12571        #[inline]
12572        unsafe fn encode(
12573            self,
12574            encoder: &mut fidl::encoding::Encoder<'_, D>,
12575            offset: usize,
12576            _depth: fidl::encoding::Depth,
12577        ) -> fidl::Result<()> {
12578            encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12579            unsafe {
12580                // Copy the object into the buffer.
12581                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12582                (buf_ptr as *mut GoldenUintStruct)
12583                    .write_unaligned((self as *const GoldenUintStruct).read());
12584                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12585                // done second because the memcpy will write garbage to these bytes.
12586            }
12587            Ok(())
12588        }
12589    }
12590    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
12591        fidl::encoding::Encode<GoldenUintStruct, D> for (T0,)
12592    {
12593        #[inline]
12594        unsafe fn encode(
12595            self,
12596            encoder: &mut fidl::encoding::Encoder<'_, D>,
12597            offset: usize,
12598            depth: fidl::encoding::Depth,
12599        ) -> fidl::Result<()> {
12600            encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12601            // Zero out padding regions. There's no need to apply masks
12602            // because the unmasked parts will be overwritten by fields.
12603            // Write the fields.
12604            self.0.encode(encoder, offset + 0, depth)?;
12605            Ok(())
12606        }
12607    }
12608
12609    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUintStruct {
12610        #[inline(always)]
12611        fn new_empty() -> Self {
12612            Self { v: fidl::new_empty!(u16, D) }
12613        }
12614
12615        #[inline]
12616        unsafe fn decode(
12617            &mut self,
12618            decoder: &mut fidl::encoding::Decoder<'_, D>,
12619            offset: usize,
12620            _depth: fidl::encoding::Depth,
12621        ) -> fidl::Result<()> {
12622            decoder.debug_check_bounds::<Self>(offset);
12623            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12624            // Verify that padding bytes are zero.
12625            // Copy from the buffer into the object.
12626            unsafe {
12627                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
12628            }
12629            Ok(())
12630        }
12631    }
12632
12633    impl fidl::encoding::ValueTypeMarker for GoldenUnionStruct {
12634        type Borrowed<'a> = &'a Self;
12635        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12636            value
12637        }
12638    }
12639
12640    unsafe impl fidl::encoding::TypeMarker for GoldenUnionStruct {
12641        type Owned = Self;
12642
12643        #[inline(always)]
12644        fn inline_align(_context: fidl::encoding::Context) -> usize {
12645            8
12646        }
12647
12648        #[inline(always)]
12649        fn inline_size(_context: fidl::encoding::Context) -> usize {
12650            16
12651        }
12652    }
12653
12654    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnionStruct, D>
12655        for &GoldenUnionStruct
12656    {
12657        #[inline]
12658        unsafe fn encode(
12659            self,
12660            encoder: &mut fidl::encoding::Encoder<'_, D>,
12661            offset: usize,
12662            _depth: fidl::encoding::Depth,
12663        ) -> fidl::Result<()> {
12664            encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12665            // Delegate to tuple encoding.
12666            fidl::encoding::Encode::<GoldenUnionStruct, D>::encode(
12667                (<GoldenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12668                encoder,
12669                offset,
12670                _depth,
12671            )
12672        }
12673    }
12674    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenUnion, D>>
12675        fidl::encoding::Encode<GoldenUnionStruct, D> for (T0,)
12676    {
12677        #[inline]
12678        unsafe fn encode(
12679            self,
12680            encoder: &mut fidl::encoding::Encoder<'_, D>,
12681            offset: usize,
12682            depth: fidl::encoding::Depth,
12683        ) -> fidl::Result<()> {
12684            encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12685            // Zero out padding regions. There's no need to apply masks
12686            // because the unmasked parts will be overwritten by fields.
12687            // Write the fields.
12688            self.0.encode(encoder, offset + 0, depth)?;
12689            Ok(())
12690        }
12691    }
12692
12693    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnionStruct {
12694        #[inline(always)]
12695        fn new_empty() -> Self {
12696            Self { v: fidl::new_empty!(GoldenUnion, D) }
12697        }
12698
12699        #[inline]
12700        unsafe fn decode(
12701            &mut self,
12702            decoder: &mut fidl::encoding::Decoder<'_, D>,
12703            offset: usize,
12704            _depth: fidl::encoding::Depth,
12705        ) -> fidl::Result<()> {
12706            decoder.debug_check_bounds::<Self>(offset);
12707            // Verify that padding bytes are zero.
12708            fidl::decode!(GoldenUnion, D, &mut self.v, decoder, offset + 0, _depth)?;
12709            Ok(())
12710        }
12711    }
12712
12713    impl fidl::encoding::ValueTypeMarker for Int64Struct {
12714        type Borrowed<'a> = &'a Self;
12715        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12716            value
12717        }
12718    }
12719
12720    unsafe impl fidl::encoding::TypeMarker for Int64Struct {
12721        type Owned = Self;
12722
12723        #[inline(always)]
12724        fn inline_align(_context: fidl::encoding::Context) -> usize {
12725            8
12726        }
12727
12728        #[inline(always)]
12729        fn inline_size(_context: fidl::encoding::Context) -> usize {
12730            8
12731        }
12732        #[inline(always)]
12733        fn encode_is_copy() -> bool {
12734            true
12735        }
12736
12737        #[inline(always)]
12738        fn decode_is_copy() -> bool {
12739            true
12740        }
12741    }
12742
12743    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Int64Struct, D>
12744        for &Int64Struct
12745    {
12746        #[inline]
12747        unsafe fn encode(
12748            self,
12749            encoder: &mut fidl::encoding::Encoder<'_, D>,
12750            offset: usize,
12751            _depth: fidl::encoding::Depth,
12752        ) -> fidl::Result<()> {
12753            encoder.debug_check_bounds::<Int64Struct>(offset);
12754            unsafe {
12755                // Copy the object into the buffer.
12756                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12757                (buf_ptr as *mut Int64Struct).write_unaligned((self as *const Int64Struct).read());
12758                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12759                // done second because the memcpy will write garbage to these bytes.
12760            }
12761            Ok(())
12762        }
12763    }
12764    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
12765        fidl::encoding::Encode<Int64Struct, D> for (T0,)
12766    {
12767        #[inline]
12768        unsafe fn encode(
12769            self,
12770            encoder: &mut fidl::encoding::Encoder<'_, D>,
12771            offset: usize,
12772            depth: fidl::encoding::Depth,
12773        ) -> fidl::Result<()> {
12774            encoder.debug_check_bounds::<Int64Struct>(offset);
12775            // Zero out padding regions. There's no need to apply masks
12776            // because the unmasked parts will be overwritten by fields.
12777            // Write the fields.
12778            self.0.encode(encoder, offset + 0, depth)?;
12779            Ok(())
12780        }
12781    }
12782
12783    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Int64Struct {
12784        #[inline(always)]
12785        fn new_empty() -> Self {
12786            Self { x: fidl::new_empty!(i64, D) }
12787        }
12788
12789        #[inline]
12790        unsafe fn decode(
12791            &mut self,
12792            decoder: &mut fidl::encoding::Decoder<'_, D>,
12793            offset: usize,
12794            _depth: fidl::encoding::Depth,
12795        ) -> fidl::Result<()> {
12796            decoder.debug_check_bounds::<Self>(offset);
12797            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12798            // Verify that padding bytes are zero.
12799            // Copy from the buffer into the object.
12800            unsafe {
12801                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12802            }
12803            Ok(())
12804        }
12805    }
12806
12807    impl fidl::encoding::ValueTypeMarker for InterfaceConfig {
12808        type Borrowed<'a> = &'a Self;
12809        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12810            value
12811        }
12812    }
12813
12814    unsafe impl fidl::encoding::TypeMarker for InterfaceConfig {
12815        type Owned = Self;
12816
12817        #[inline(always)]
12818        fn inline_align(_context: fidl::encoding::Context) -> usize {
12819            8
12820        }
12821
12822        #[inline(always)]
12823        fn inline_size(_context: fidl::encoding::Context) -> usize {
12824            32
12825        }
12826    }
12827
12828    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceConfig, D>
12829        for &InterfaceConfig
12830    {
12831        #[inline]
12832        unsafe fn encode(
12833            self,
12834            encoder: &mut fidl::encoding::Encoder<'_, D>,
12835            offset: usize,
12836            _depth: fidl::encoding::Depth,
12837        ) -> fidl::Result<()> {
12838            encoder.debug_check_bounds::<InterfaceConfig>(offset);
12839            // Delegate to tuple encoding.
12840            fidl::encoding::Encode::<InterfaceConfig, D>::encode(
12841                (
12842                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
12843                        &self.name,
12844                    ),
12845                    <IpAddressConfig as fidl::encoding::ValueTypeMarker>::borrow(
12846                        &self.ip_address_config,
12847                    ),
12848                ),
12849                encoder,
12850                offset,
12851                _depth,
12852            )
12853        }
12854    }
12855    unsafe impl<
12856        D: fidl::encoding::ResourceDialect,
12857        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
12858        T1: fidl::encoding::Encode<IpAddressConfig, D>,
12859    > fidl::encoding::Encode<InterfaceConfig, D> for (T0, T1)
12860    {
12861        #[inline]
12862        unsafe fn encode(
12863            self,
12864            encoder: &mut fidl::encoding::Encoder<'_, D>,
12865            offset: usize,
12866            depth: fidl::encoding::Depth,
12867        ) -> fidl::Result<()> {
12868            encoder.debug_check_bounds::<InterfaceConfig>(offset);
12869            // Zero out padding regions. There's no need to apply masks
12870            // because the unmasked parts will be overwritten by fields.
12871            // Write the fields.
12872            self.0.encode(encoder, offset + 0, depth)?;
12873            self.1.encode(encoder, offset + 16, depth)?;
12874            Ok(())
12875        }
12876    }
12877
12878    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceConfig {
12879        #[inline(always)]
12880        fn new_empty() -> Self {
12881            Self {
12882                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
12883                ip_address_config: fidl::new_empty!(IpAddressConfig, D),
12884            }
12885        }
12886
12887        #[inline]
12888        unsafe fn decode(
12889            &mut self,
12890            decoder: &mut fidl::encoding::Decoder<'_, D>,
12891            offset: usize,
12892            _depth: fidl::encoding::Depth,
12893        ) -> fidl::Result<()> {
12894            decoder.debug_check_bounds::<Self>(offset);
12895            // Verify that padding bytes are zero.
12896            fidl::decode!(
12897                fidl::encoding::UnboundedString,
12898                D,
12899                &mut self.name,
12900                decoder,
12901                offset + 0,
12902                _depth
12903            )?;
12904            fidl::decode!(
12905                IpAddressConfig,
12906                D,
12907                &mut self.ip_address_config,
12908                decoder,
12909                offset + 16,
12910                _depth
12911            )?;
12912            Ok(())
12913        }
12914    }
12915
12916    impl fidl::encoding::ValueTypeMarker for LargeArrays {
12917        type Borrowed<'a> = &'a Self;
12918        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12919            value
12920        }
12921    }
12922
12923    unsafe impl fidl::encoding::TypeMarker for LargeArrays {
12924        type Owned = Self;
12925
12926        #[inline(always)]
12927        fn inline_align(_context: fidl::encoding::Context) -> usize {
12928            8
12929        }
12930
12931        #[inline(always)]
12932        fn inline_size(_context: fidl::encoding::Context) -> usize {
12933            648
12934        }
12935    }
12936
12937    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LargeArrays, D>
12938        for &LargeArrays
12939    {
12940        #[inline]
12941        unsafe fn encode(
12942            self,
12943            encoder: &mut fidl::encoding::Encoder<'_, D>,
12944            offset: usize,
12945            _depth: fidl::encoding::Depth,
12946        ) -> fidl::Result<()> {
12947            encoder.debug_check_bounds::<LargeArrays>(offset);
12948            // Delegate to tuple encoding.
12949            fidl::encoding::Encode::<LargeArrays, D>::encode(
12950                (
12951                    <fidl::encoding::Array<
12952                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12953                        33,
12954                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.a33),
12955                    <fidl::encoding::Array<u8, 100> as fidl::encoding::ValueTypeMarker>::borrow(
12956                        &self.a100,
12957                    ),
12958                    <fidl::encoding::UnboundedVector<
12959                        fidl::encoding::Array<
12960                            fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12961                            200,
12962                        >,
12963                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.nested),
12964                ),
12965                encoder,
12966                offset,
12967                _depth,
12968            )
12969        }
12970    }
12971    unsafe impl<
12972        D: fidl::encoding::ResourceDialect,
12973        T0: fidl::encoding::Encode<
12974                fidl::encoding::Array<
12975                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12976                    33,
12977                >,
12978                D,
12979            >,
12980        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 100>, D>,
12981        T2: fidl::encoding::Encode<
12982                fidl::encoding::UnboundedVector<
12983                    fidl::encoding::Array<
12984                        fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12985                        200,
12986                    >,
12987                >,
12988                D,
12989            >,
12990    > fidl::encoding::Encode<LargeArrays, D> for (T0, T1, T2)
12991    {
12992        #[inline]
12993        unsafe fn encode(
12994            self,
12995            encoder: &mut fidl::encoding::Encoder<'_, D>,
12996            offset: usize,
12997            depth: fidl::encoding::Depth,
12998        ) -> fidl::Result<()> {
12999            encoder.debug_check_bounds::<LargeArrays>(offset);
13000            // Zero out padding regions. There's no need to apply masks
13001            // because the unmasked parts will be overwritten by fields.
13002            unsafe {
13003                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(624);
13004                (ptr as *mut u64).write_unaligned(0);
13005            }
13006            // Write the fields.
13007            self.0.encode(encoder, offset + 0, depth)?;
13008            self.1.encode(encoder, offset + 528, depth)?;
13009            self.2.encode(encoder, offset + 632, depth)?;
13010            Ok(())
13011        }
13012    }
13013
13014    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LargeArrays {
13015        #[inline(always)]
13016        fn new_empty() -> Self {
13017            Self {
13018                a33: fidl::new_empty!(
13019                    fidl::encoding::Array<
13020                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13021                        33,
13022                    >,
13023                    D
13024                ),
13025                a100: fidl::new_empty!(fidl::encoding::Array<u8, 100>, D),
13026                nested: fidl::new_empty!(
13027                    fidl::encoding::UnboundedVector<
13028                        fidl::encoding::Array<
13029                            fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
13030                            200,
13031                        >,
13032                    >,
13033                    D
13034                ),
13035            }
13036        }
13037
13038        #[inline]
13039        unsafe fn decode(
13040            &mut self,
13041            decoder: &mut fidl::encoding::Decoder<'_, D>,
13042            offset: usize,
13043            _depth: fidl::encoding::Depth,
13044        ) -> fidl::Result<()> {
13045            decoder.debug_check_bounds::<Self>(offset);
13046            // Verify that padding bytes are zero.
13047            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(624) };
13048            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13049            let mask = 0xffffffff00000000u64;
13050            let maskedval = padval & mask;
13051            if maskedval != 0 {
13052                return Err(fidl::Error::NonZeroPadding {
13053                    padding_start: offset + 624 + ((mask as u64).trailing_zeros() / 8) as usize,
13054                });
13055            }
13056            fidl::decode!(
13057                fidl::encoding::Array<
13058                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13059                    33,
13060                >,
13061                D,
13062                &mut self.a33,
13063                decoder,
13064                offset + 0,
13065                _depth
13066            )?;
13067            fidl::decode!(fidl::encoding::Array<u8, 100>, D, &mut self.a100, decoder, offset + 528, _depth)?;
13068            fidl::decode!(
13069                fidl::encoding::UnboundedVector<
13070                    fidl::encoding::Array<
13071                        fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
13072                        200,
13073                    >,
13074                >,
13075                D,
13076                &mut self.nested,
13077                decoder,
13078                offset + 632,
13079                _depth
13080            )?;
13081            Ok(())
13082        }
13083    }
13084
13085    impl fidl::encoding::ValueTypeMarker for Length2StringWrapper {
13086        type Borrowed<'a> = &'a Self;
13087        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13088            value
13089        }
13090    }
13091
13092    unsafe impl fidl::encoding::TypeMarker for Length2StringWrapper {
13093        type Owned = Self;
13094
13095        #[inline(always)]
13096        fn inline_align(_context: fidl::encoding::Context) -> usize {
13097            8
13098        }
13099
13100        #[inline(always)]
13101        fn inline_size(_context: fidl::encoding::Context) -> usize {
13102            16
13103        }
13104    }
13105
13106    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Length2StringWrapper, D>
13107        for &Length2StringWrapper
13108    {
13109        #[inline]
13110        unsafe fn encode(
13111            self,
13112            encoder: &mut fidl::encoding::Encoder<'_, D>,
13113            offset: usize,
13114            _depth: fidl::encoding::Depth,
13115        ) -> fidl::Result<()> {
13116            encoder.debug_check_bounds::<Length2StringWrapper>(offset);
13117            // Delegate to tuple encoding.
13118            fidl::encoding::Encode::<Length2StringWrapper, D>::encode(
13119                (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
13120                    &self.length_2_string,
13121                ),),
13122                encoder,
13123                offset,
13124                _depth,
13125            )
13126        }
13127    }
13128    unsafe impl<
13129        D: fidl::encoding::ResourceDialect,
13130        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
13131    > fidl::encoding::Encode<Length2StringWrapper, D> for (T0,)
13132    {
13133        #[inline]
13134        unsafe fn encode(
13135            self,
13136            encoder: &mut fidl::encoding::Encoder<'_, D>,
13137            offset: usize,
13138            depth: fidl::encoding::Depth,
13139        ) -> fidl::Result<()> {
13140            encoder.debug_check_bounds::<Length2StringWrapper>(offset);
13141            // Zero out padding regions. There's no need to apply masks
13142            // because the unmasked parts will be overwritten by fields.
13143            // Write the fields.
13144            self.0.encode(encoder, offset + 0, depth)?;
13145            Ok(())
13146        }
13147    }
13148
13149    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Length2StringWrapper {
13150        #[inline(always)]
13151        fn new_empty() -> Self {
13152            Self { length_2_string: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
13153        }
13154
13155        #[inline]
13156        unsafe fn decode(
13157            &mut self,
13158            decoder: &mut fidl::encoding::Decoder<'_, D>,
13159            offset: usize,
13160            _depth: fidl::encoding::Depth,
13161        ) -> fidl::Result<()> {
13162            decoder.debug_check_bounds::<Self>(offset);
13163            // Verify that padding bytes are zero.
13164            fidl::decode!(
13165                fidl::encoding::BoundedString<2>,
13166                D,
13167                &mut self.length_2_string,
13168                decoder,
13169                offset + 0,
13170                _depth
13171            )?;
13172            Ok(())
13173        }
13174    }
13175
13176    impl fidl::encoding::ValueTypeMarker for LotsOfVectors {
13177        type Borrowed<'a> = &'a Self;
13178        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13179            value
13180        }
13181    }
13182
13183    unsafe impl fidl::encoding::TypeMarker for LotsOfVectors {
13184        type Owned = Self;
13185
13186        #[inline(always)]
13187        fn inline_align(_context: fidl::encoding::Context) -> usize {
13188            8
13189        }
13190
13191        #[inline(always)]
13192        fn inline_size(_context: fidl::encoding::Context) -> usize {
13193            144
13194        }
13195    }
13196
13197    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LotsOfVectors, D>
13198        for &LotsOfVectors
13199    {
13200        #[inline]
13201        unsafe fn encode(
13202            self,
13203            encoder: &mut fidl::encoding::Encoder<'_, D>,
13204            offset: usize,
13205            _depth: fidl::encoding::Depth,
13206        ) -> fidl::Result<()> {
13207            encoder.debug_check_bounds::<LotsOfVectors>(offset);
13208            // Delegate to tuple encoding.
13209            fidl::encoding::Encode::<LotsOfVectors, D>::encode(
13210                (
13211                    <fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v1),
13212                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v2),
13213                    <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v3),
13214                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v4),
13215                    <fidl::encoding::UnboundedVector<i8> as fidl::encoding::ValueTypeMarker>::borrow(&self.v5),
13216                    <fidl::encoding::UnboundedVector<i16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v6),
13217                    <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v7),
13218                    <fidl::encoding::UnboundedVector<i64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v8),
13219                    <fidl::encoding::UnboundedVector<bool> as fidl::encoding::ValueTypeMarker>::borrow(&self.v9),
13220                ),
13221                encoder, offset, _depth
13222            )
13223        }
13224    }
13225    unsafe impl<
13226        D: fidl::encoding::ResourceDialect,
13227        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>, D>,
13228        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13229        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
13230        T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
13231        T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i8>, D>,
13232        T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i16>, D>,
13233        T6: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
13234        T7: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i64>, D>,
13235        T8: fidl::encoding::Encode<fidl::encoding::UnboundedVector<bool>, D>,
13236    > fidl::encoding::Encode<LotsOfVectors, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
13237    {
13238        #[inline]
13239        unsafe fn encode(
13240            self,
13241            encoder: &mut fidl::encoding::Encoder<'_, D>,
13242            offset: usize,
13243            depth: fidl::encoding::Depth,
13244        ) -> fidl::Result<()> {
13245            encoder.debug_check_bounds::<LotsOfVectors>(offset);
13246            // Zero out padding regions. There's no need to apply masks
13247            // because the unmasked parts will be overwritten by fields.
13248            // Write the fields.
13249            self.0.encode(encoder, offset + 0, depth)?;
13250            self.1.encode(encoder, offset + 16, depth)?;
13251            self.2.encode(encoder, offset + 32, depth)?;
13252            self.3.encode(encoder, offset + 48, depth)?;
13253            self.4.encode(encoder, offset + 64, depth)?;
13254            self.5.encode(encoder, offset + 80, depth)?;
13255            self.6.encode(encoder, offset + 96, depth)?;
13256            self.7.encode(encoder, offset + 112, depth)?;
13257            self.8.encode(encoder, offset + 128, depth)?;
13258            Ok(())
13259        }
13260    }
13261
13262    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LotsOfVectors {
13263        #[inline(always)]
13264        fn new_empty() -> Self {
13265            Self {
13266                v1: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>, D),
13267                v2: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13268                v3: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
13269                v4: fidl::new_empty!(
13270                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13271                    D
13272                ),
13273                v5: fidl::new_empty!(fidl::encoding::UnboundedVector<i8>, D),
13274                v6: fidl::new_empty!(fidl::encoding::UnboundedVector<i16>, D),
13275                v7: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
13276                v8: fidl::new_empty!(fidl::encoding::UnboundedVector<i64>, D),
13277                v9: fidl::new_empty!(fidl::encoding::UnboundedVector<bool>, D),
13278            }
13279        }
13280
13281        #[inline]
13282        unsafe fn decode(
13283            &mut self,
13284            decoder: &mut fidl::encoding::Decoder<'_, D>,
13285            offset: usize,
13286            _depth: fidl::encoding::Depth,
13287        ) -> fidl::Result<()> {
13288            decoder.debug_check_bounds::<Self>(offset);
13289            // Verify that padding bytes are zero.
13290            fidl::decode!(
13291                fidl::encoding::UnboundedVector<u16>,
13292                D,
13293                &mut self.v1,
13294                decoder,
13295                offset + 0,
13296                _depth
13297            )?;
13298            fidl::decode!(
13299                fidl::encoding::UnboundedVector<u32>,
13300                D,
13301                &mut self.v2,
13302                decoder,
13303                offset + 16,
13304                _depth
13305            )?;
13306            fidl::decode!(
13307                fidl::encoding::UnboundedVector<u64>,
13308                D,
13309                &mut self.v3,
13310                decoder,
13311                offset + 32,
13312                _depth
13313            )?;
13314            fidl::decode!(
13315                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13316                D,
13317                &mut self.v4,
13318                decoder,
13319                offset + 48,
13320                _depth
13321            )?;
13322            fidl::decode!(
13323                fidl::encoding::UnboundedVector<i8>,
13324                D,
13325                &mut self.v5,
13326                decoder,
13327                offset + 64,
13328                _depth
13329            )?;
13330            fidl::decode!(
13331                fidl::encoding::UnboundedVector<i16>,
13332                D,
13333                &mut self.v6,
13334                decoder,
13335                offset + 80,
13336                _depth
13337            )?;
13338            fidl::decode!(
13339                fidl::encoding::UnboundedVector<i32>,
13340                D,
13341                &mut self.v7,
13342                decoder,
13343                offset + 96,
13344                _depth
13345            )?;
13346            fidl::decode!(
13347                fidl::encoding::UnboundedVector<i64>,
13348                D,
13349                &mut self.v8,
13350                decoder,
13351                offset + 112,
13352                _depth
13353            )?;
13354            fidl::decode!(
13355                fidl::encoding::UnboundedVector<bool>,
13356                D,
13357                &mut self.v9,
13358                decoder,
13359                offset + 128,
13360                _depth
13361            )?;
13362            Ok(())
13363        }
13364    }
13365
13366    impl fidl::encoding::ValueTypeMarker for MixedFieldsBody {
13367        type Borrowed<'a> = &'a Self;
13368        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13369            value
13370        }
13371    }
13372
13373    unsafe impl fidl::encoding::TypeMarker for MixedFieldsBody {
13374        type Owned = Self;
13375
13376        #[inline(always)]
13377        fn inline_align(_context: fidl::encoding::Context) -> usize {
13378            8
13379        }
13380
13381        #[inline(always)]
13382        fn inline_size(_context: fidl::encoding::Context) -> usize {
13383            64
13384        }
13385    }
13386
13387    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsBody, D>
13388        for &MixedFieldsBody
13389    {
13390        #[inline]
13391        unsafe fn encode(
13392            self,
13393            encoder: &mut fidl::encoding::Encoder<'_, D>,
13394            offset: usize,
13395            _depth: fidl::encoding::Depth,
13396        ) -> fidl::Result<()> {
13397            encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13398            // Delegate to tuple encoding.
13399            fidl::encoding::Encode::<MixedFieldsBody, D>::encode(
13400                (
13401                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
13402                    <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13403                        &self.first_union,
13404                    ),
13405                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_start),
13406                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_end),
13407                    <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13408                        &self.second_union,
13409                    ),
13410                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
13411                ),
13412                encoder,
13413                offset,
13414                _depth,
13415            )
13416        }
13417    }
13418    unsafe impl<
13419        D: fidl::encoding::ResourceDialect,
13420        T0: fidl::encoding::Encode<u32, D>,
13421        T1: fidl::encoding::Encode<UnionSize8Align4, D>,
13422        T2: fidl::encoding::Encode<u16, D>,
13423        T3: fidl::encoding::Encode<u64, D>,
13424        T4: fidl::encoding::Encode<UnionSize8Align4, D>,
13425        T5: fidl::encoding::Encode<u32, D>,
13426    > fidl::encoding::Encode<MixedFieldsBody, D> for (T0, T1, T2, T3, T4, T5)
13427    {
13428        #[inline]
13429        unsafe fn encode(
13430            self,
13431            encoder: &mut fidl::encoding::Encoder<'_, D>,
13432            offset: usize,
13433            depth: fidl::encoding::Depth,
13434        ) -> fidl::Result<()> {
13435            encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13436            // Zero out padding regions. There's no need to apply masks
13437            // because the unmasked parts will be overwritten by fields.
13438            unsafe {
13439                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
13440                (ptr as *mut u64).write_unaligned(0);
13441            }
13442            unsafe {
13443                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
13444                (ptr as *mut u64).write_unaligned(0);
13445            }
13446            unsafe {
13447                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
13448                (ptr as *mut u64).write_unaligned(0);
13449            }
13450            // Write the fields.
13451            self.0.encode(encoder, offset + 0, depth)?;
13452            self.1.encode(encoder, offset + 8, depth)?;
13453            self.2.encode(encoder, offset + 24, depth)?;
13454            self.3.encode(encoder, offset + 32, depth)?;
13455            self.4.encode(encoder, offset + 40, depth)?;
13456            self.5.encode(encoder, offset + 56, depth)?;
13457            Ok(())
13458        }
13459    }
13460
13461    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsBody {
13462        #[inline(always)]
13463        fn new_empty() -> Self {
13464            Self {
13465                before: fidl::new_empty!(u32, D),
13466                first_union: fidl::new_empty!(UnionSize8Align4, D),
13467                middle_start: fidl::new_empty!(u16, D),
13468                middle_end: fidl::new_empty!(u64, D),
13469                second_union: fidl::new_empty!(UnionSize8Align4, D),
13470                after: fidl::new_empty!(u32, D),
13471            }
13472        }
13473
13474        #[inline]
13475        unsafe fn decode(
13476            &mut self,
13477            decoder: &mut fidl::encoding::Decoder<'_, D>,
13478            offset: usize,
13479            _depth: fidl::encoding::Depth,
13480        ) -> fidl::Result<()> {
13481            decoder.debug_check_bounds::<Self>(offset);
13482            // Verify that padding bytes are zero.
13483            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
13484            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13485            let mask = 0xffffffff00000000u64;
13486            let maskedval = padval & mask;
13487            if maskedval != 0 {
13488                return Err(fidl::Error::NonZeroPadding {
13489                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
13490                });
13491            }
13492            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
13493            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13494            let mask = 0xffffffffffff0000u64;
13495            let maskedval = padval & mask;
13496            if maskedval != 0 {
13497                return Err(fidl::Error::NonZeroPadding {
13498                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
13499                });
13500            }
13501            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
13502            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13503            let mask = 0xffffffff00000000u64;
13504            let maskedval = padval & mask;
13505            if maskedval != 0 {
13506                return Err(fidl::Error::NonZeroPadding {
13507                    padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
13508                });
13509            }
13510            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
13511            fidl::decode!(UnionSize8Align4, D, &mut self.first_union, decoder, offset + 8, _depth)?;
13512            fidl::decode!(u16, D, &mut self.middle_start, decoder, offset + 24, _depth)?;
13513            fidl::decode!(u64, D, &mut self.middle_end, decoder, offset + 32, _depth)?;
13514            fidl::decode!(
13515                UnionSize8Align4,
13516                D,
13517                &mut self.second_union,
13518                decoder,
13519                offset + 40,
13520                _depth
13521            )?;
13522            fidl::decode!(u32, D, &mut self.after, decoder, offset + 56, _depth)?;
13523            Ok(())
13524        }
13525    }
13526
13527    impl fidl::encoding::ValueTypeMarker for MixedFieldsMessage {
13528        type Borrowed<'a> = &'a Self;
13529        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13530            value
13531        }
13532    }
13533
13534    unsafe impl fidl::encoding::TypeMarker for MixedFieldsMessage {
13535        type Owned = Self;
13536
13537        #[inline(always)]
13538        fn inline_align(_context: fidl::encoding::Context) -> usize {
13539            8
13540        }
13541
13542        #[inline(always)]
13543        fn inline_size(_context: fidl::encoding::Context) -> usize {
13544            80
13545        }
13546    }
13547
13548    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsMessage, D>
13549        for &MixedFieldsMessage
13550    {
13551        #[inline]
13552        unsafe fn encode(
13553            self,
13554            encoder: &mut fidl::encoding::Encoder<'_, D>,
13555            offset: usize,
13556            _depth: fidl::encoding::Depth,
13557        ) -> fidl::Result<()> {
13558            encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13559            // Delegate to tuple encoding.
13560            fidl::encoding::Encode::<MixedFieldsMessage, D>::encode(
13561                (
13562                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
13563                    <MixedFieldsBody as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
13564                ),
13565                encoder,
13566                offset,
13567                _depth,
13568            )
13569        }
13570    }
13571    unsafe impl<
13572        D: fidl::encoding::ResourceDialect,
13573        T0: fidl::encoding::Encode<TransactionHeader, D>,
13574        T1: fidl::encoding::Encode<MixedFieldsBody, D>,
13575    > fidl::encoding::Encode<MixedFieldsMessage, D> for (T0, T1)
13576    {
13577        #[inline]
13578        unsafe fn encode(
13579            self,
13580            encoder: &mut fidl::encoding::Encoder<'_, D>,
13581            offset: usize,
13582            depth: fidl::encoding::Depth,
13583        ) -> fidl::Result<()> {
13584            encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13585            // Zero out padding regions. There's no need to apply masks
13586            // because the unmasked parts will be overwritten by fields.
13587            // Write the fields.
13588            self.0.encode(encoder, offset + 0, depth)?;
13589            self.1.encode(encoder, offset + 16, depth)?;
13590            Ok(())
13591        }
13592    }
13593
13594    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsMessage {
13595        #[inline(always)]
13596        fn new_empty() -> Self {
13597            Self {
13598                header: fidl::new_empty!(TransactionHeader, D),
13599                body: fidl::new_empty!(MixedFieldsBody, D),
13600            }
13601        }
13602
13603        #[inline]
13604        unsafe fn decode(
13605            &mut self,
13606            decoder: &mut fidl::encoding::Decoder<'_, D>,
13607            offset: usize,
13608            _depth: fidl::encoding::Depth,
13609        ) -> fidl::Result<()> {
13610            decoder.debug_check_bounds::<Self>(offset);
13611            // Verify that padding bytes are zero.
13612            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
13613            fidl::decode!(MixedFieldsBody, D, &mut self.body, decoder, offset + 16, _depth)?;
13614            Ok(())
13615        }
13616    }
13617
13618    impl fidl::encoding::ValueTypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13619        type Borrowed<'a> = &'a Self;
13620        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13621            value
13622        }
13623    }
13624
13625    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13626        type Owned = Self;
13627
13628        #[inline(always)]
13629        fn inline_align(_context: fidl::encoding::Context) -> usize {
13630            8
13631        }
13632
13633        #[inline(always)]
13634        fn inline_size(_context: fidl::encoding::Context) -> usize {
13635            32
13636        }
13637    }
13638
13639    unsafe impl<D: fidl::encoding::ResourceDialect>
13640        fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D>
13641        for &MultipleBoundedNonnullableVectorsOfUint32s
13642    {
13643        #[inline]
13644        unsafe fn encode(
13645            self,
13646            encoder: &mut fidl::encoding::Encoder<'_, D>,
13647            offset: usize,
13648            _depth: fidl::encoding::Depth,
13649        ) -> fidl::Result<()> {
13650            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13651            // Delegate to tuple encoding.
13652            fidl::encoding::Encode::<MultipleBoundedNonnullableVectorsOfUint32s, D>::encode(
13653                (
13654                    <fidl::encoding::Vector<u32, 2> as fidl::encoding::ValueTypeMarker>::borrow(
13655                        &self.vu0,
13656                    ),
13657                    <fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
13658                        &self.vu1,
13659                    ),
13660                ),
13661                encoder,
13662                offset,
13663                _depth,
13664            )
13665        }
13666    }
13667    unsafe impl<
13668        D: fidl::encoding::ResourceDialect,
13669        T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 2>, D>,
13670        T1: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
13671    > fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D> for (T0, T1)
13672    {
13673        #[inline]
13674        unsafe fn encode(
13675            self,
13676            encoder: &mut fidl::encoding::Encoder<'_, D>,
13677            offset: usize,
13678            depth: fidl::encoding::Depth,
13679        ) -> fidl::Result<()> {
13680            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13681            // Zero out padding regions. There's no need to apply masks
13682            // because the unmasked parts will be overwritten by fields.
13683            // Write the fields.
13684            self.0.encode(encoder, offset + 0, depth)?;
13685            self.1.encode(encoder, offset + 16, depth)?;
13686            Ok(())
13687        }
13688    }
13689
13690    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13691        for MultipleBoundedNonnullableVectorsOfUint32s
13692    {
13693        #[inline(always)]
13694        fn new_empty() -> Self {
13695            Self {
13696                vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 2>, D),
13697                vu1: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D),
13698            }
13699        }
13700
13701        #[inline]
13702        unsafe fn decode(
13703            &mut self,
13704            decoder: &mut fidl::encoding::Decoder<'_, D>,
13705            offset: usize,
13706            _depth: fidl::encoding::Depth,
13707        ) -> fidl::Result<()> {
13708            decoder.debug_check_bounds::<Self>(offset);
13709            // Verify that padding bytes are zero.
13710            fidl::decode!(fidl::encoding::Vector<u32, 2>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
13711            fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu1, decoder, offset + 16, _depth)?;
13712            Ok(())
13713        }
13714    }
13715
13716    impl fidl::encoding::ValueTypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13717        type Borrowed<'a> = &'a Self;
13718        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13719            value
13720        }
13721    }
13722
13723    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13724        type Owned = Self;
13725
13726        #[inline(always)]
13727        fn inline_align(_context: fidl::encoding::Context) -> usize {
13728            8
13729        }
13730
13731        #[inline(always)]
13732        fn inline_size(_context: fidl::encoding::Context) -> usize {
13733            32
13734        }
13735    }
13736
13737    unsafe impl<D: fidl::encoding::ResourceDialect>
13738        fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D>
13739        for &MultipleBoundedNullableVectorsOfUint32s
13740    {
13741        #[inline]
13742        unsafe fn encode(
13743            self,
13744            encoder: &mut fidl::encoding::Encoder<'_, D>,
13745            offset: usize,
13746            _depth: fidl::encoding::Depth,
13747        ) -> fidl::Result<()> {
13748            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13749            // Delegate to tuple encoding.
13750            fidl::encoding::Encode::<MultipleBoundedNullableVectorsOfUint32s, D>::encode(
13751                (
13752                    <fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13753                    <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13754                ),
13755                encoder, offset, _depth
13756            )
13757        }
13758    }
13759    unsafe impl<
13760        D: fidl::encoding::ResourceDialect,
13761        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D>,
13762        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
13763    > fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D> for (T0, T1)
13764    {
13765        #[inline]
13766        unsafe fn encode(
13767            self,
13768            encoder: &mut fidl::encoding::Encoder<'_, D>,
13769            offset: usize,
13770            depth: fidl::encoding::Depth,
13771        ) -> fidl::Result<()> {
13772            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13773            // Zero out padding regions. There's no need to apply masks
13774            // because the unmasked parts will be overwritten by fields.
13775            // Write the fields.
13776            self.0.encode(encoder, offset + 0, depth)?;
13777            self.1.encode(encoder, offset + 16, depth)?;
13778            Ok(())
13779        }
13780    }
13781
13782    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13783        for MultipleBoundedNullableVectorsOfUint32s
13784    {
13785        #[inline(always)]
13786        fn new_empty() -> Self {
13787            Self {
13788                vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D),
13789                vu1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
13790            }
13791        }
13792
13793        #[inline]
13794        unsafe fn decode(
13795            &mut self,
13796            decoder: &mut fidl::encoding::Decoder<'_, D>,
13797            offset: usize,
13798            _depth: fidl::encoding::Depth,
13799        ) -> fidl::Result<()> {
13800            decoder.debug_check_bounds::<Self>(offset);
13801            // Verify that padding bytes are zero.
13802            fidl::decode!(
13803                fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>,
13804                D,
13805                &mut self.vu0,
13806                decoder,
13807                offset + 0,
13808                _depth
13809            )?;
13810            fidl::decode!(
13811                fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
13812                D,
13813                &mut self.vu1,
13814                decoder,
13815                offset + 16,
13816                _depth
13817            )?;
13818            Ok(())
13819        }
13820    }
13821
13822    impl fidl::encoding::ValueTypeMarker for MultipleNonnullableStrings {
13823        type Borrowed<'a> = &'a Self;
13824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13825            value
13826        }
13827    }
13828
13829    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableStrings {
13830        type Owned = Self;
13831
13832        #[inline(always)]
13833        fn inline_align(_context: fidl::encoding::Context) -> usize {
13834            8
13835        }
13836
13837        #[inline(always)]
13838        fn inline_size(_context: fidl::encoding::Context) -> usize {
13839            32
13840        }
13841    }
13842
13843    unsafe impl<D: fidl::encoding::ResourceDialect>
13844        fidl::encoding::Encode<MultipleNonnullableStrings, D> for &MultipleNonnullableStrings
13845    {
13846        #[inline]
13847        unsafe fn encode(
13848            self,
13849            encoder: &mut fidl::encoding::Encoder<'_, D>,
13850            offset: usize,
13851            _depth: fidl::encoding::Depth,
13852        ) -> fidl::Result<()> {
13853            encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13854            // Delegate to tuple encoding.
13855            fidl::encoding::Encode::<MultipleNonnullableStrings, D>::encode(
13856                (
13857                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13858                        &self.s0,
13859                    ),
13860                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13861                        &self.s1,
13862                    ),
13863                ),
13864                encoder,
13865                offset,
13866                _depth,
13867            )
13868        }
13869    }
13870    unsafe impl<
13871        D: fidl::encoding::ResourceDialect,
13872        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13873        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13874    > fidl::encoding::Encode<MultipleNonnullableStrings, D> for (T0, T1)
13875    {
13876        #[inline]
13877        unsafe fn encode(
13878            self,
13879            encoder: &mut fidl::encoding::Encoder<'_, D>,
13880            offset: usize,
13881            depth: fidl::encoding::Depth,
13882        ) -> fidl::Result<()> {
13883            encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13884            // Zero out padding regions. There's no need to apply masks
13885            // because the unmasked parts will be overwritten by fields.
13886            // Write the fields.
13887            self.0.encode(encoder, offset + 0, depth)?;
13888            self.1.encode(encoder, offset + 16, depth)?;
13889            Ok(())
13890        }
13891    }
13892
13893    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13894        for MultipleNonnullableStrings
13895    {
13896        #[inline(always)]
13897        fn new_empty() -> Self {
13898            Self {
13899                s0: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13900                s1: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13901            }
13902        }
13903
13904        #[inline]
13905        unsafe fn decode(
13906            &mut self,
13907            decoder: &mut fidl::encoding::Decoder<'_, D>,
13908            offset: usize,
13909            _depth: fidl::encoding::Depth,
13910        ) -> fidl::Result<()> {
13911            decoder.debug_check_bounds::<Self>(offset);
13912            // Verify that padding bytes are zero.
13913            fidl::decode!(
13914                fidl::encoding::UnboundedString,
13915                D,
13916                &mut self.s0,
13917                decoder,
13918                offset + 0,
13919                _depth
13920            )?;
13921            fidl::decode!(
13922                fidl::encoding::UnboundedString,
13923                D,
13924                &mut self.s1,
13925                decoder,
13926                offset + 16,
13927                _depth
13928            )?;
13929            Ok(())
13930        }
13931    }
13932
13933    impl fidl::encoding::ValueTypeMarker for MultipleNonnullableVectorsOfUint32s {
13934        type Borrowed<'a> = &'a Self;
13935        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13936            value
13937        }
13938    }
13939
13940    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableVectorsOfUint32s {
13941        type Owned = Self;
13942
13943        #[inline(always)]
13944        fn inline_align(_context: fidl::encoding::Context) -> usize {
13945            8
13946        }
13947
13948        #[inline(always)]
13949        fn inline_size(_context: fidl::encoding::Context) -> usize {
13950            32
13951        }
13952    }
13953
13954    unsafe impl<D: fidl::encoding::ResourceDialect>
13955        fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D>
13956        for &MultipleNonnullableVectorsOfUint32s
13957    {
13958        #[inline]
13959        unsafe fn encode(
13960            self,
13961            encoder: &mut fidl::encoding::Encoder<'_, D>,
13962            offset: usize,
13963            _depth: fidl::encoding::Depth,
13964        ) -> fidl::Result<()> {
13965            encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13966            // Delegate to tuple encoding.
13967            fidl::encoding::Encode::<MultipleNonnullableVectorsOfUint32s, D>::encode(
13968                (
13969                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13970                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13971                ),
13972                encoder, offset, _depth
13973            )
13974        }
13975    }
13976    unsafe impl<
13977        D: fidl::encoding::ResourceDialect,
13978        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13979        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13980    > fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D> for (T0, T1)
13981    {
13982        #[inline]
13983        unsafe fn encode(
13984            self,
13985            encoder: &mut fidl::encoding::Encoder<'_, D>,
13986            offset: usize,
13987            depth: fidl::encoding::Depth,
13988        ) -> fidl::Result<()> {
13989            encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13990            // Zero out padding regions. There's no need to apply masks
13991            // because the unmasked parts will be overwritten by fields.
13992            // Write the fields.
13993            self.0.encode(encoder, offset + 0, depth)?;
13994            self.1.encode(encoder, offset + 16, depth)?;
13995            Ok(())
13996        }
13997    }
13998
13999    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14000        for MultipleNonnullableVectorsOfUint32s
14001    {
14002        #[inline(always)]
14003        fn new_empty() -> Self {
14004            Self {
14005                vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
14006                vu1: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
14007            }
14008        }
14009
14010        #[inline]
14011        unsafe fn decode(
14012            &mut self,
14013            decoder: &mut fidl::encoding::Decoder<'_, D>,
14014            offset: usize,
14015            _depth: fidl::encoding::Depth,
14016        ) -> fidl::Result<()> {
14017            decoder.debug_check_bounds::<Self>(offset);
14018            // Verify that padding bytes are zero.
14019            fidl::decode!(
14020                fidl::encoding::UnboundedVector<u32>,
14021                D,
14022                &mut self.vu0,
14023                decoder,
14024                offset + 0,
14025                _depth
14026            )?;
14027            fidl::decode!(
14028                fidl::encoding::UnboundedVector<u32>,
14029                D,
14030                &mut self.vu1,
14031                decoder,
14032                offset + 16,
14033                _depth
14034            )?;
14035            Ok(())
14036        }
14037    }
14038
14039    impl fidl::encoding::ValueTypeMarker for MultipleNullableStrings {
14040        type Borrowed<'a> = &'a Self;
14041        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14042            value
14043        }
14044    }
14045
14046    unsafe impl fidl::encoding::TypeMarker for MultipleNullableStrings {
14047        type Owned = Self;
14048
14049        #[inline(always)]
14050        fn inline_align(_context: fidl::encoding::Context) -> usize {
14051            8
14052        }
14053
14054        #[inline(always)]
14055        fn inline_size(_context: fidl::encoding::Context) -> usize {
14056            32
14057        }
14058    }
14059
14060    unsafe impl<D: fidl::encoding::ResourceDialect>
14061        fidl::encoding::Encode<MultipleNullableStrings, D> for &MultipleNullableStrings
14062    {
14063        #[inline]
14064        unsafe fn encode(
14065            self,
14066            encoder: &mut fidl::encoding::Encoder<'_, D>,
14067            offset: usize,
14068            _depth: fidl::encoding::Depth,
14069        ) -> fidl::Result<()> {
14070            encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
14071            // Delegate to tuple encoding.
14072            fidl::encoding::Encode::<MultipleNullableStrings, D>::encode(
14073                (
14074                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
14075                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s1),
14076                ),
14077                encoder, offset, _depth
14078            )
14079        }
14080    }
14081    unsafe impl<
14082        D: fidl::encoding::ResourceDialect,
14083        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
14084        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
14085    > fidl::encoding::Encode<MultipleNullableStrings, D> for (T0, T1)
14086    {
14087        #[inline]
14088        unsafe fn encode(
14089            self,
14090            encoder: &mut fidl::encoding::Encoder<'_, D>,
14091            offset: usize,
14092            depth: fidl::encoding::Depth,
14093        ) -> fidl::Result<()> {
14094            encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
14095            // Zero out padding regions. There's no need to apply masks
14096            // because the unmasked parts will be overwritten by fields.
14097            // Write the fields.
14098            self.0.encode(encoder, offset + 0, depth)?;
14099            self.1.encode(encoder, offset + 16, depth)?;
14100            Ok(())
14101        }
14102    }
14103
14104    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14105        for MultipleNullableStrings
14106    {
14107        #[inline(always)]
14108        fn new_empty() -> Self {
14109            Self {
14110                s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
14111                s1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
14112            }
14113        }
14114
14115        #[inline]
14116        unsafe fn decode(
14117            &mut self,
14118            decoder: &mut fidl::encoding::Decoder<'_, D>,
14119            offset: usize,
14120            _depth: fidl::encoding::Depth,
14121        ) -> fidl::Result<()> {
14122            decoder.debug_check_bounds::<Self>(offset);
14123            // Verify that padding bytes are zero.
14124            fidl::decode!(
14125                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14126                D,
14127                &mut self.s0,
14128                decoder,
14129                offset + 0,
14130                _depth
14131            )?;
14132            fidl::decode!(
14133                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14134                D,
14135                &mut self.s1,
14136                decoder,
14137                offset + 16,
14138                _depth
14139            )?;
14140            Ok(())
14141        }
14142    }
14143
14144    impl fidl::encoding::ValueTypeMarker for MultipleShortNonnullableStrings {
14145        type Borrowed<'a> = &'a Self;
14146        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14147            value
14148        }
14149    }
14150
14151    unsafe impl fidl::encoding::TypeMarker for MultipleShortNonnullableStrings {
14152        type Owned = Self;
14153
14154        #[inline(always)]
14155        fn inline_align(_context: fidl::encoding::Context) -> usize {
14156            8
14157        }
14158
14159        #[inline(always)]
14160        fn inline_size(_context: fidl::encoding::Context) -> usize {
14161            32
14162        }
14163    }
14164
14165    unsafe impl<D: fidl::encoding::ResourceDialect>
14166        fidl::encoding::Encode<MultipleShortNonnullableStrings, D>
14167        for &MultipleShortNonnullableStrings
14168    {
14169        #[inline]
14170        unsafe fn encode(
14171            self,
14172            encoder: &mut fidl::encoding::Encoder<'_, D>,
14173            offset: usize,
14174            _depth: fidl::encoding::Depth,
14175        ) -> fidl::Result<()> {
14176            encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
14177            // Delegate to tuple encoding.
14178            fidl::encoding::Encode::<MultipleShortNonnullableStrings, D>::encode(
14179                (
14180                    <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
14181                        &self.s0,
14182                    ),
14183                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
14184                        &self.s1,
14185                    ),
14186                ),
14187                encoder,
14188                offset,
14189                _depth,
14190            )
14191        }
14192    }
14193    unsafe impl<
14194        D: fidl::encoding::ResourceDialect,
14195        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
14196        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
14197    > fidl::encoding::Encode<MultipleShortNonnullableStrings, D> for (T0, T1)
14198    {
14199        #[inline]
14200        unsafe fn encode(
14201            self,
14202            encoder: &mut fidl::encoding::Encoder<'_, D>,
14203            offset: usize,
14204            depth: fidl::encoding::Depth,
14205        ) -> fidl::Result<()> {
14206            encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
14207            // Zero out padding regions. There's no need to apply masks
14208            // because the unmasked parts will be overwritten by fields.
14209            // Write the fields.
14210            self.0.encode(encoder, offset + 0, depth)?;
14211            self.1.encode(encoder, offset + 16, depth)?;
14212            Ok(())
14213        }
14214    }
14215
14216    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14217        for MultipleShortNonnullableStrings
14218    {
14219        #[inline(always)]
14220        fn new_empty() -> Self {
14221            Self {
14222                s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14223                s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14224            }
14225        }
14226
14227        #[inline]
14228        unsafe fn decode(
14229            &mut self,
14230            decoder: &mut fidl::encoding::Decoder<'_, D>,
14231            offset: usize,
14232            _depth: fidl::encoding::Depth,
14233        ) -> fidl::Result<()> {
14234            decoder.debug_check_bounds::<Self>(offset);
14235            // Verify that padding bytes are zero.
14236            fidl::decode!(
14237                fidl::encoding::BoundedString<4>,
14238                D,
14239                &mut self.s0,
14240                decoder,
14241                offset + 0,
14242                _depth
14243            )?;
14244            fidl::decode!(
14245                fidl::encoding::BoundedString<32>,
14246                D,
14247                &mut self.s1,
14248                decoder,
14249                offset + 16,
14250                _depth
14251            )?;
14252            Ok(())
14253        }
14254    }
14255
14256    impl fidl::encoding::ValueTypeMarker for MultipleShortNullableStrings {
14257        type Borrowed<'a> = &'a Self;
14258        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14259            value
14260        }
14261    }
14262
14263    unsafe impl fidl::encoding::TypeMarker for MultipleShortNullableStrings {
14264        type Owned = Self;
14265
14266        #[inline(always)]
14267        fn inline_align(_context: fidl::encoding::Context) -> usize {
14268            8
14269        }
14270
14271        #[inline(always)]
14272        fn inline_size(_context: fidl::encoding::Context) -> usize {
14273            32
14274        }
14275    }
14276
14277    unsafe impl<D: fidl::encoding::ResourceDialect>
14278        fidl::encoding::Encode<MultipleShortNullableStrings, D> for &MultipleShortNullableStrings
14279    {
14280        #[inline]
14281        unsafe fn encode(
14282            self,
14283            encoder: &mut fidl::encoding::Encoder<'_, D>,
14284            offset: usize,
14285            _depth: fidl::encoding::Depth,
14286        ) -> fidl::Result<()> {
14287            encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14288            // Delegate to tuple encoding.
14289            fidl::encoding::Encode::<MultipleShortNullableStrings, D>::encode(
14290                (
14291                    <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
14292                        &self.s0,
14293                    ),
14294                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
14295                        &self.s1,
14296                    ),
14297                ),
14298                encoder,
14299                offset,
14300                _depth,
14301            )
14302        }
14303    }
14304    unsafe impl<
14305        D: fidl::encoding::ResourceDialect,
14306        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
14307        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
14308    > fidl::encoding::Encode<MultipleShortNullableStrings, D> for (T0, T1)
14309    {
14310        #[inline]
14311        unsafe fn encode(
14312            self,
14313            encoder: &mut fidl::encoding::Encoder<'_, D>,
14314            offset: usize,
14315            depth: fidl::encoding::Depth,
14316        ) -> fidl::Result<()> {
14317            encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14318            // Zero out padding regions. There's no need to apply masks
14319            // because the unmasked parts will be overwritten by fields.
14320            // Write the fields.
14321            self.0.encode(encoder, offset + 0, depth)?;
14322            self.1.encode(encoder, offset + 16, depth)?;
14323            Ok(())
14324        }
14325    }
14326
14327    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14328        for MultipleShortNullableStrings
14329    {
14330        #[inline(always)]
14331        fn new_empty() -> Self {
14332            Self {
14333                s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14334                s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14335            }
14336        }
14337
14338        #[inline]
14339        unsafe fn decode(
14340            &mut self,
14341            decoder: &mut fidl::encoding::Decoder<'_, D>,
14342            offset: usize,
14343            _depth: fidl::encoding::Depth,
14344        ) -> fidl::Result<()> {
14345            decoder.debug_check_bounds::<Self>(offset);
14346            // Verify that padding bytes are zero.
14347            fidl::decode!(
14348                fidl::encoding::BoundedString<4>,
14349                D,
14350                &mut self.s0,
14351                decoder,
14352                offset + 0,
14353                _depth
14354            )?;
14355            fidl::decode!(
14356                fidl::encoding::BoundedString<32>,
14357                D,
14358                &mut self.s1,
14359                decoder,
14360                offset + 16,
14361                _depth
14362            )?;
14363            Ok(())
14364        }
14365    }
14366
14367    impl fidl::encoding::ValueTypeMarker for MutualRecursionUnionStruct {
14368        type Borrowed<'a> = &'a Self;
14369        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14370            value
14371        }
14372    }
14373
14374    unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnionStruct {
14375        type Owned = Self;
14376
14377        #[inline(always)]
14378        fn inline_align(_context: fidl::encoding::Context) -> usize {
14379            8
14380        }
14381
14382        #[inline(always)]
14383        fn inline_size(_context: fidl::encoding::Context) -> usize {
14384            16
14385        }
14386    }
14387
14388    unsafe impl<D: fidl::encoding::ResourceDialect>
14389        fidl::encoding::Encode<MutualRecursionUnionStruct, D> for &MutualRecursionUnionStruct
14390    {
14391        #[inline]
14392        unsafe fn encode(
14393            self,
14394            encoder: &mut fidl::encoding::Encoder<'_, D>,
14395            offset: usize,
14396            _depth: fidl::encoding::Depth,
14397        ) -> fidl::Result<()> {
14398            encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14399            // Delegate to tuple encoding.
14400            fidl::encoding::Encode::<MutualRecursionUnionStruct, D>::encode(
14401                (
14402                    <fidl::encoding::OptionalUnion<MutualRecursionUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
14403                ),
14404                encoder, offset, _depth
14405            )
14406        }
14407    }
14408    unsafe impl<
14409        D: fidl::encoding::ResourceDialect,
14410        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<MutualRecursionUnion>, D>,
14411    > fidl::encoding::Encode<MutualRecursionUnionStruct, D> for (T0,)
14412    {
14413        #[inline]
14414        unsafe fn encode(
14415            self,
14416            encoder: &mut fidl::encoding::Encoder<'_, D>,
14417            offset: usize,
14418            depth: fidl::encoding::Depth,
14419        ) -> fidl::Result<()> {
14420            encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14421            // Zero out padding regions. There's no need to apply masks
14422            // because the unmasked parts will be overwritten by fields.
14423            // Write the fields.
14424            self.0.encode(encoder, offset + 0, depth)?;
14425            Ok(())
14426        }
14427    }
14428
14429    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14430        for MutualRecursionUnionStruct
14431    {
14432        #[inline(always)]
14433        fn new_empty() -> Self {
14434            Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<MutualRecursionUnion>, D) }
14435        }
14436
14437        #[inline]
14438        unsafe fn decode(
14439            &mut self,
14440            decoder: &mut fidl::encoding::Decoder<'_, D>,
14441            offset: usize,
14442            _depth: fidl::encoding::Depth,
14443        ) -> fidl::Result<()> {
14444            decoder.debug_check_bounds::<Self>(offset);
14445            // Verify that padding bytes are zero.
14446            fidl::decode!(
14447                fidl::encoding::OptionalUnion<MutualRecursionUnion>,
14448                D,
14449                &mut self.u,
14450                decoder,
14451                offset + 0,
14452                _depth
14453            )?;
14454            Ok(())
14455        }
14456    }
14457
14458    impl fidl::encoding::ValueTypeMarker for MyBool {
14459        type Borrowed<'a> = &'a Self;
14460        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14461            value
14462        }
14463    }
14464
14465    unsafe impl fidl::encoding::TypeMarker for MyBool {
14466        type Owned = Self;
14467
14468        #[inline(always)]
14469        fn inline_align(_context: fidl::encoding::Context) -> usize {
14470            1
14471        }
14472
14473        #[inline(always)]
14474        fn inline_size(_context: fidl::encoding::Context) -> usize {
14475            1
14476        }
14477    }
14478
14479    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyBool, D> for &MyBool {
14480        #[inline]
14481        unsafe fn encode(
14482            self,
14483            encoder: &mut fidl::encoding::Encoder<'_, D>,
14484            offset: usize,
14485            _depth: fidl::encoding::Depth,
14486        ) -> fidl::Result<()> {
14487            encoder.debug_check_bounds::<MyBool>(offset);
14488            // Delegate to tuple encoding.
14489            fidl::encoding::Encode::<MyBool, D>::encode(
14490                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14491                encoder,
14492                offset,
14493                _depth,
14494            )
14495        }
14496    }
14497    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
14498        fidl::encoding::Encode<MyBool, D> for (T0,)
14499    {
14500        #[inline]
14501        unsafe fn encode(
14502            self,
14503            encoder: &mut fidl::encoding::Encoder<'_, D>,
14504            offset: usize,
14505            depth: fidl::encoding::Depth,
14506        ) -> fidl::Result<()> {
14507            encoder.debug_check_bounds::<MyBool>(offset);
14508            // Zero out padding regions. There's no need to apply masks
14509            // because the unmasked parts will be overwritten by fields.
14510            // Write the fields.
14511            self.0.encode(encoder, offset + 0, depth)?;
14512            Ok(())
14513        }
14514    }
14515
14516    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyBool {
14517        #[inline(always)]
14518        fn new_empty() -> Self {
14519            Self { value: fidl::new_empty!(bool, D) }
14520        }
14521
14522        #[inline]
14523        unsafe fn decode(
14524            &mut self,
14525            decoder: &mut fidl::encoding::Decoder<'_, D>,
14526            offset: usize,
14527            _depth: fidl::encoding::Depth,
14528        ) -> fidl::Result<()> {
14529            decoder.debug_check_bounds::<Self>(offset);
14530            // Verify that padding bytes are zero.
14531            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
14532            Ok(())
14533        }
14534    }
14535
14536    impl fidl::encoding::ValueTypeMarker for MyByte {
14537        type Borrowed<'a> = &'a Self;
14538        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14539            value
14540        }
14541    }
14542
14543    unsafe impl fidl::encoding::TypeMarker for MyByte {
14544        type Owned = Self;
14545
14546        #[inline(always)]
14547        fn inline_align(_context: fidl::encoding::Context) -> usize {
14548            1
14549        }
14550
14551        #[inline(always)]
14552        fn inline_size(_context: fidl::encoding::Context) -> usize {
14553            1
14554        }
14555        #[inline(always)]
14556        fn encode_is_copy() -> bool {
14557            true
14558        }
14559
14560        #[inline(always)]
14561        fn decode_is_copy() -> bool {
14562            true
14563        }
14564    }
14565
14566    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyByte, D> for &MyByte {
14567        #[inline]
14568        unsafe fn encode(
14569            self,
14570            encoder: &mut fidl::encoding::Encoder<'_, D>,
14571            offset: usize,
14572            _depth: fidl::encoding::Depth,
14573        ) -> fidl::Result<()> {
14574            encoder.debug_check_bounds::<MyByte>(offset);
14575            unsafe {
14576                // Copy the object into the buffer.
14577                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14578                (buf_ptr as *mut MyByte).write_unaligned((self as *const MyByte).read());
14579                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14580                // done second because the memcpy will write garbage to these bytes.
14581            }
14582            Ok(())
14583        }
14584    }
14585    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
14586        fidl::encoding::Encode<MyByte, D> for (T0,)
14587    {
14588        #[inline]
14589        unsafe fn encode(
14590            self,
14591            encoder: &mut fidl::encoding::Encoder<'_, D>,
14592            offset: usize,
14593            depth: fidl::encoding::Depth,
14594        ) -> fidl::Result<()> {
14595            encoder.debug_check_bounds::<MyByte>(offset);
14596            // Zero out padding regions. There's no need to apply masks
14597            // because the unmasked parts will be overwritten by fields.
14598            // Write the fields.
14599            self.0.encode(encoder, offset + 0, depth)?;
14600            Ok(())
14601        }
14602    }
14603
14604    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyByte {
14605        #[inline(always)]
14606        fn new_empty() -> Self {
14607            Self { value: fidl::new_empty!(u8, D) }
14608        }
14609
14610        #[inline]
14611        unsafe fn decode(
14612            &mut self,
14613            decoder: &mut fidl::encoding::Decoder<'_, D>,
14614            offset: usize,
14615            _depth: fidl::encoding::Depth,
14616        ) -> fidl::Result<()> {
14617            decoder.debug_check_bounds::<Self>(offset);
14618            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14619            // Verify that padding bytes are zero.
14620            // Copy from the buffer into the object.
14621            unsafe {
14622                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
14623            }
14624            Ok(())
14625        }
14626    }
14627
14628    impl fidl::encoding::ValueTypeMarker for MyFloat32 {
14629        type Borrowed<'a> = &'a Self;
14630        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14631            value
14632        }
14633    }
14634
14635    unsafe impl fidl::encoding::TypeMarker for MyFloat32 {
14636        type Owned = Self;
14637
14638        #[inline(always)]
14639        fn inline_align(_context: fidl::encoding::Context) -> usize {
14640            4
14641        }
14642
14643        #[inline(always)]
14644        fn inline_size(_context: fidl::encoding::Context) -> usize {
14645            4
14646        }
14647    }
14648
14649    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat32, D>
14650        for &MyFloat32
14651    {
14652        #[inline]
14653        unsafe fn encode(
14654            self,
14655            encoder: &mut fidl::encoding::Encoder<'_, D>,
14656            offset: usize,
14657            _depth: fidl::encoding::Depth,
14658        ) -> fidl::Result<()> {
14659            encoder.debug_check_bounds::<MyFloat32>(offset);
14660            // Delegate to tuple encoding.
14661            fidl::encoding::Encode::<MyFloat32, D>::encode(
14662                (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14663                encoder,
14664                offset,
14665                _depth,
14666            )
14667        }
14668    }
14669    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
14670        fidl::encoding::Encode<MyFloat32, D> for (T0,)
14671    {
14672        #[inline]
14673        unsafe fn encode(
14674            self,
14675            encoder: &mut fidl::encoding::Encoder<'_, D>,
14676            offset: usize,
14677            depth: fidl::encoding::Depth,
14678        ) -> fidl::Result<()> {
14679            encoder.debug_check_bounds::<MyFloat32>(offset);
14680            // Zero out padding regions. There's no need to apply masks
14681            // because the unmasked parts will be overwritten by fields.
14682            // Write the fields.
14683            self.0.encode(encoder, offset + 0, depth)?;
14684            Ok(())
14685        }
14686    }
14687
14688    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat32 {
14689        #[inline(always)]
14690        fn new_empty() -> Self {
14691            Self { value: fidl::new_empty!(f32, D) }
14692        }
14693
14694        #[inline]
14695        unsafe fn decode(
14696            &mut self,
14697            decoder: &mut fidl::encoding::Decoder<'_, D>,
14698            offset: usize,
14699            _depth: fidl::encoding::Depth,
14700        ) -> fidl::Result<()> {
14701            decoder.debug_check_bounds::<Self>(offset);
14702            // Verify that padding bytes are zero.
14703            fidl::decode!(f32, D, &mut self.value, decoder, offset + 0, _depth)?;
14704            Ok(())
14705        }
14706    }
14707
14708    impl fidl::encoding::ValueTypeMarker for MyFloat64 {
14709        type Borrowed<'a> = &'a Self;
14710        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14711            value
14712        }
14713    }
14714
14715    unsafe impl fidl::encoding::TypeMarker for MyFloat64 {
14716        type Owned = Self;
14717
14718        #[inline(always)]
14719        fn inline_align(_context: fidl::encoding::Context) -> usize {
14720            8
14721        }
14722
14723        #[inline(always)]
14724        fn inline_size(_context: fidl::encoding::Context) -> usize {
14725            8
14726        }
14727    }
14728
14729    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat64, D>
14730        for &MyFloat64
14731    {
14732        #[inline]
14733        unsafe fn encode(
14734            self,
14735            encoder: &mut fidl::encoding::Encoder<'_, D>,
14736            offset: usize,
14737            _depth: fidl::encoding::Depth,
14738        ) -> fidl::Result<()> {
14739            encoder.debug_check_bounds::<MyFloat64>(offset);
14740            // Delegate to tuple encoding.
14741            fidl::encoding::Encode::<MyFloat64, D>::encode(
14742                (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14743                encoder,
14744                offset,
14745                _depth,
14746            )
14747        }
14748    }
14749    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
14750        fidl::encoding::Encode<MyFloat64, D> for (T0,)
14751    {
14752        #[inline]
14753        unsafe fn encode(
14754            self,
14755            encoder: &mut fidl::encoding::Encoder<'_, D>,
14756            offset: usize,
14757            depth: fidl::encoding::Depth,
14758        ) -> fidl::Result<()> {
14759            encoder.debug_check_bounds::<MyFloat64>(offset);
14760            // Zero out padding regions. There's no need to apply masks
14761            // because the unmasked parts will be overwritten by fields.
14762            // Write the fields.
14763            self.0.encode(encoder, offset + 0, depth)?;
14764            Ok(())
14765        }
14766    }
14767
14768    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat64 {
14769        #[inline(always)]
14770        fn new_empty() -> Self {
14771            Self { value: fidl::new_empty!(f64, D) }
14772        }
14773
14774        #[inline]
14775        unsafe fn decode(
14776            &mut self,
14777            decoder: &mut fidl::encoding::Decoder<'_, D>,
14778            offset: usize,
14779            _depth: fidl::encoding::Depth,
14780        ) -> fidl::Result<()> {
14781            decoder.debug_check_bounds::<Self>(offset);
14782            // Verify that padding bytes are zero.
14783            fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
14784            Ok(())
14785        }
14786    }
14787
14788    impl fidl::encoding::ValueTypeMarker for MyInt16 {
14789        type Borrowed<'a> = &'a Self;
14790        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14791            value
14792        }
14793    }
14794
14795    unsafe impl fidl::encoding::TypeMarker for MyInt16 {
14796        type Owned = Self;
14797
14798        #[inline(always)]
14799        fn inline_align(_context: fidl::encoding::Context) -> usize {
14800            2
14801        }
14802
14803        #[inline(always)]
14804        fn inline_size(_context: fidl::encoding::Context) -> usize {
14805            2
14806        }
14807        #[inline(always)]
14808        fn encode_is_copy() -> bool {
14809            true
14810        }
14811
14812        #[inline(always)]
14813        fn decode_is_copy() -> bool {
14814            true
14815        }
14816    }
14817
14818    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt16, D> for &MyInt16 {
14819        #[inline]
14820        unsafe fn encode(
14821            self,
14822            encoder: &mut fidl::encoding::Encoder<'_, D>,
14823            offset: usize,
14824            _depth: fidl::encoding::Depth,
14825        ) -> fidl::Result<()> {
14826            encoder.debug_check_bounds::<MyInt16>(offset);
14827            unsafe {
14828                // Copy the object into the buffer.
14829                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14830                (buf_ptr as *mut MyInt16).write_unaligned((self as *const MyInt16).read());
14831                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14832                // done second because the memcpy will write garbage to these bytes.
14833            }
14834            Ok(())
14835        }
14836    }
14837    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
14838        fidl::encoding::Encode<MyInt16, D> for (T0,)
14839    {
14840        #[inline]
14841        unsafe fn encode(
14842            self,
14843            encoder: &mut fidl::encoding::Encoder<'_, D>,
14844            offset: usize,
14845            depth: fidl::encoding::Depth,
14846        ) -> fidl::Result<()> {
14847            encoder.debug_check_bounds::<MyInt16>(offset);
14848            // Zero out padding regions. There's no need to apply masks
14849            // because the unmasked parts will be overwritten by fields.
14850            // Write the fields.
14851            self.0.encode(encoder, offset + 0, depth)?;
14852            Ok(())
14853        }
14854    }
14855
14856    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt16 {
14857        #[inline(always)]
14858        fn new_empty() -> Self {
14859            Self { value: fidl::new_empty!(i16, D) }
14860        }
14861
14862        #[inline]
14863        unsafe fn decode(
14864            &mut self,
14865            decoder: &mut fidl::encoding::Decoder<'_, D>,
14866            offset: usize,
14867            _depth: fidl::encoding::Depth,
14868        ) -> fidl::Result<()> {
14869            decoder.debug_check_bounds::<Self>(offset);
14870            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14871            // Verify that padding bytes are zero.
14872            // Copy from the buffer into the object.
14873            unsafe {
14874                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
14875            }
14876            Ok(())
14877        }
14878    }
14879
14880    impl fidl::encoding::ValueTypeMarker for MyInt32 {
14881        type Borrowed<'a> = &'a Self;
14882        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14883            value
14884        }
14885    }
14886
14887    unsafe impl fidl::encoding::TypeMarker for MyInt32 {
14888        type Owned = Self;
14889
14890        #[inline(always)]
14891        fn inline_align(_context: fidl::encoding::Context) -> usize {
14892            4
14893        }
14894
14895        #[inline(always)]
14896        fn inline_size(_context: fidl::encoding::Context) -> usize {
14897            4
14898        }
14899        #[inline(always)]
14900        fn encode_is_copy() -> bool {
14901            true
14902        }
14903
14904        #[inline(always)]
14905        fn decode_is_copy() -> bool {
14906            true
14907        }
14908    }
14909
14910    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt32, D> for &MyInt32 {
14911        #[inline]
14912        unsafe fn encode(
14913            self,
14914            encoder: &mut fidl::encoding::Encoder<'_, D>,
14915            offset: usize,
14916            _depth: fidl::encoding::Depth,
14917        ) -> fidl::Result<()> {
14918            encoder.debug_check_bounds::<MyInt32>(offset);
14919            unsafe {
14920                // Copy the object into the buffer.
14921                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14922                (buf_ptr as *mut MyInt32).write_unaligned((self as *const MyInt32).read());
14923                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14924                // done second because the memcpy will write garbage to these bytes.
14925            }
14926            Ok(())
14927        }
14928    }
14929    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
14930        fidl::encoding::Encode<MyInt32, D> for (T0,)
14931    {
14932        #[inline]
14933        unsafe fn encode(
14934            self,
14935            encoder: &mut fidl::encoding::Encoder<'_, D>,
14936            offset: usize,
14937            depth: fidl::encoding::Depth,
14938        ) -> fidl::Result<()> {
14939            encoder.debug_check_bounds::<MyInt32>(offset);
14940            // Zero out padding regions. There's no need to apply masks
14941            // because the unmasked parts will be overwritten by fields.
14942            // Write the fields.
14943            self.0.encode(encoder, offset + 0, depth)?;
14944            Ok(())
14945        }
14946    }
14947
14948    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt32 {
14949        #[inline(always)]
14950        fn new_empty() -> Self {
14951            Self { value: fidl::new_empty!(i32, D) }
14952        }
14953
14954        #[inline]
14955        unsafe fn decode(
14956            &mut self,
14957            decoder: &mut fidl::encoding::Decoder<'_, D>,
14958            offset: usize,
14959            _depth: fidl::encoding::Depth,
14960        ) -> fidl::Result<()> {
14961            decoder.debug_check_bounds::<Self>(offset);
14962            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14963            // Verify that padding bytes are zero.
14964            // Copy from the buffer into the object.
14965            unsafe {
14966                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14967            }
14968            Ok(())
14969        }
14970    }
14971
14972    impl fidl::encoding::ValueTypeMarker for MyInt64 {
14973        type Borrowed<'a> = &'a Self;
14974        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14975            value
14976        }
14977    }
14978
14979    unsafe impl fidl::encoding::TypeMarker for MyInt64 {
14980        type Owned = Self;
14981
14982        #[inline(always)]
14983        fn inline_align(_context: fidl::encoding::Context) -> usize {
14984            8
14985        }
14986
14987        #[inline(always)]
14988        fn inline_size(_context: fidl::encoding::Context) -> usize {
14989            8
14990        }
14991        #[inline(always)]
14992        fn encode_is_copy() -> bool {
14993            true
14994        }
14995
14996        #[inline(always)]
14997        fn decode_is_copy() -> bool {
14998            true
14999        }
15000    }
15001
15002    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt64, D> for &MyInt64 {
15003        #[inline]
15004        unsafe fn encode(
15005            self,
15006            encoder: &mut fidl::encoding::Encoder<'_, D>,
15007            offset: usize,
15008            _depth: fidl::encoding::Depth,
15009        ) -> fidl::Result<()> {
15010            encoder.debug_check_bounds::<MyInt64>(offset);
15011            unsafe {
15012                // Copy the object into the buffer.
15013                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15014                (buf_ptr as *mut MyInt64).write_unaligned((self as *const MyInt64).read());
15015                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15016                // done second because the memcpy will write garbage to these bytes.
15017            }
15018            Ok(())
15019        }
15020    }
15021    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
15022        fidl::encoding::Encode<MyInt64, D> for (T0,)
15023    {
15024        #[inline]
15025        unsafe fn encode(
15026            self,
15027            encoder: &mut fidl::encoding::Encoder<'_, D>,
15028            offset: usize,
15029            depth: fidl::encoding::Depth,
15030        ) -> fidl::Result<()> {
15031            encoder.debug_check_bounds::<MyInt64>(offset);
15032            // Zero out padding regions. There's no need to apply masks
15033            // because the unmasked parts will be overwritten by fields.
15034            // Write the fields.
15035            self.0.encode(encoder, offset + 0, depth)?;
15036            Ok(())
15037        }
15038    }
15039
15040    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt64 {
15041        #[inline(always)]
15042        fn new_empty() -> Self {
15043            Self { value: fidl::new_empty!(i64, D) }
15044        }
15045
15046        #[inline]
15047        unsafe fn decode(
15048            &mut self,
15049            decoder: &mut fidl::encoding::Decoder<'_, D>,
15050            offset: usize,
15051            _depth: fidl::encoding::Depth,
15052        ) -> fidl::Result<()> {
15053            decoder.debug_check_bounds::<Self>(offset);
15054            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15055            // Verify that padding bytes are zero.
15056            // Copy from the buffer into the object.
15057            unsafe {
15058                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15059            }
15060            Ok(())
15061        }
15062    }
15063
15064    impl fidl::encoding::ValueTypeMarker for MyInt8 {
15065        type Borrowed<'a> = &'a Self;
15066        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15067            value
15068        }
15069    }
15070
15071    unsafe impl fidl::encoding::TypeMarker for MyInt8 {
15072        type Owned = Self;
15073
15074        #[inline(always)]
15075        fn inline_align(_context: fidl::encoding::Context) -> usize {
15076            1
15077        }
15078
15079        #[inline(always)]
15080        fn inline_size(_context: fidl::encoding::Context) -> usize {
15081            1
15082        }
15083        #[inline(always)]
15084        fn encode_is_copy() -> bool {
15085            true
15086        }
15087
15088        #[inline(always)]
15089        fn decode_is_copy() -> bool {
15090            true
15091        }
15092    }
15093
15094    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt8, D> for &MyInt8 {
15095        #[inline]
15096        unsafe fn encode(
15097            self,
15098            encoder: &mut fidl::encoding::Encoder<'_, D>,
15099            offset: usize,
15100            _depth: fidl::encoding::Depth,
15101        ) -> fidl::Result<()> {
15102            encoder.debug_check_bounds::<MyInt8>(offset);
15103            unsafe {
15104                // Copy the object into the buffer.
15105                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15106                (buf_ptr as *mut MyInt8).write_unaligned((self as *const MyInt8).read());
15107                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15108                // done second because the memcpy will write garbage to these bytes.
15109            }
15110            Ok(())
15111        }
15112    }
15113    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
15114        fidl::encoding::Encode<MyInt8, D> for (T0,)
15115    {
15116        #[inline]
15117        unsafe fn encode(
15118            self,
15119            encoder: &mut fidl::encoding::Encoder<'_, D>,
15120            offset: usize,
15121            depth: fidl::encoding::Depth,
15122        ) -> fidl::Result<()> {
15123            encoder.debug_check_bounds::<MyInt8>(offset);
15124            // Zero out padding regions. There's no need to apply masks
15125            // because the unmasked parts will be overwritten by fields.
15126            // Write the fields.
15127            self.0.encode(encoder, offset + 0, depth)?;
15128            Ok(())
15129        }
15130    }
15131
15132    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt8 {
15133        #[inline(always)]
15134        fn new_empty() -> Self {
15135            Self { value: fidl::new_empty!(i8, D) }
15136        }
15137
15138        #[inline]
15139        unsafe fn decode(
15140            &mut self,
15141            decoder: &mut fidl::encoding::Decoder<'_, D>,
15142            offset: usize,
15143            _depth: fidl::encoding::Depth,
15144        ) -> fidl::Result<()> {
15145            decoder.debug_check_bounds::<Self>(offset);
15146            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15147            // Verify that padding bytes are zero.
15148            // Copy from the buffer into the object.
15149            unsafe {
15150                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
15151            }
15152            Ok(())
15153        }
15154    }
15155
15156    impl fidl::encoding::ValueTypeMarker for MyUint16 {
15157        type Borrowed<'a> = &'a Self;
15158        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15159            value
15160        }
15161    }
15162
15163    unsafe impl fidl::encoding::TypeMarker for MyUint16 {
15164        type Owned = Self;
15165
15166        #[inline(always)]
15167        fn inline_align(_context: fidl::encoding::Context) -> usize {
15168            2
15169        }
15170
15171        #[inline(always)]
15172        fn inline_size(_context: fidl::encoding::Context) -> usize {
15173            2
15174        }
15175        #[inline(always)]
15176        fn encode_is_copy() -> bool {
15177            true
15178        }
15179
15180        #[inline(always)]
15181        fn decode_is_copy() -> bool {
15182            true
15183        }
15184    }
15185
15186    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint16, D> for &MyUint16 {
15187        #[inline]
15188        unsafe fn encode(
15189            self,
15190            encoder: &mut fidl::encoding::Encoder<'_, D>,
15191            offset: usize,
15192            _depth: fidl::encoding::Depth,
15193        ) -> fidl::Result<()> {
15194            encoder.debug_check_bounds::<MyUint16>(offset);
15195            unsafe {
15196                // Copy the object into the buffer.
15197                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15198                (buf_ptr as *mut MyUint16).write_unaligned((self as *const MyUint16).read());
15199                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15200                // done second because the memcpy will write garbage to these bytes.
15201            }
15202            Ok(())
15203        }
15204    }
15205    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
15206        fidl::encoding::Encode<MyUint16, D> for (T0,)
15207    {
15208        #[inline]
15209        unsafe fn encode(
15210            self,
15211            encoder: &mut fidl::encoding::Encoder<'_, D>,
15212            offset: usize,
15213            depth: fidl::encoding::Depth,
15214        ) -> fidl::Result<()> {
15215            encoder.debug_check_bounds::<MyUint16>(offset);
15216            // Zero out padding regions. There's no need to apply masks
15217            // because the unmasked parts will be overwritten by fields.
15218            // Write the fields.
15219            self.0.encode(encoder, offset + 0, depth)?;
15220            Ok(())
15221        }
15222    }
15223
15224    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint16 {
15225        #[inline(always)]
15226        fn new_empty() -> Self {
15227            Self { value: fidl::new_empty!(u16, D) }
15228        }
15229
15230        #[inline]
15231        unsafe fn decode(
15232            &mut self,
15233            decoder: &mut fidl::encoding::Decoder<'_, D>,
15234            offset: usize,
15235            _depth: fidl::encoding::Depth,
15236        ) -> fidl::Result<()> {
15237            decoder.debug_check_bounds::<Self>(offset);
15238            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15239            // Verify that padding bytes are zero.
15240            // Copy from the buffer into the object.
15241            unsafe {
15242                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
15243            }
15244            Ok(())
15245        }
15246    }
15247
15248    impl fidl::encoding::ValueTypeMarker for MyUint32 {
15249        type Borrowed<'a> = &'a Self;
15250        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15251            value
15252        }
15253    }
15254
15255    unsafe impl fidl::encoding::TypeMarker for MyUint32 {
15256        type Owned = Self;
15257
15258        #[inline(always)]
15259        fn inline_align(_context: fidl::encoding::Context) -> usize {
15260            4
15261        }
15262
15263        #[inline(always)]
15264        fn inline_size(_context: fidl::encoding::Context) -> usize {
15265            4
15266        }
15267        #[inline(always)]
15268        fn encode_is_copy() -> bool {
15269            true
15270        }
15271
15272        #[inline(always)]
15273        fn decode_is_copy() -> bool {
15274            true
15275        }
15276    }
15277
15278    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint32, D> for &MyUint32 {
15279        #[inline]
15280        unsafe fn encode(
15281            self,
15282            encoder: &mut fidl::encoding::Encoder<'_, D>,
15283            offset: usize,
15284            _depth: fidl::encoding::Depth,
15285        ) -> fidl::Result<()> {
15286            encoder.debug_check_bounds::<MyUint32>(offset);
15287            unsafe {
15288                // Copy the object into the buffer.
15289                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15290                (buf_ptr as *mut MyUint32).write_unaligned((self as *const MyUint32).read());
15291                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15292                // done second because the memcpy will write garbage to these bytes.
15293            }
15294            Ok(())
15295        }
15296    }
15297    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
15298        fidl::encoding::Encode<MyUint32, D> for (T0,)
15299    {
15300        #[inline]
15301        unsafe fn encode(
15302            self,
15303            encoder: &mut fidl::encoding::Encoder<'_, D>,
15304            offset: usize,
15305            depth: fidl::encoding::Depth,
15306        ) -> fidl::Result<()> {
15307            encoder.debug_check_bounds::<MyUint32>(offset);
15308            // Zero out padding regions. There's no need to apply masks
15309            // because the unmasked parts will be overwritten by fields.
15310            // Write the fields.
15311            self.0.encode(encoder, offset + 0, depth)?;
15312            Ok(())
15313        }
15314    }
15315
15316    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint32 {
15317        #[inline(always)]
15318        fn new_empty() -> Self {
15319            Self { value: fidl::new_empty!(u32, D) }
15320        }
15321
15322        #[inline]
15323        unsafe fn decode(
15324            &mut self,
15325            decoder: &mut fidl::encoding::Decoder<'_, D>,
15326            offset: usize,
15327            _depth: fidl::encoding::Depth,
15328        ) -> fidl::Result<()> {
15329            decoder.debug_check_bounds::<Self>(offset);
15330            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15331            // Verify that padding bytes are zero.
15332            // Copy from the buffer into the object.
15333            unsafe {
15334                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
15335            }
15336            Ok(())
15337        }
15338    }
15339
15340    impl fidl::encoding::ValueTypeMarker for MyUint64 {
15341        type Borrowed<'a> = &'a Self;
15342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15343            value
15344        }
15345    }
15346
15347    unsafe impl fidl::encoding::TypeMarker for MyUint64 {
15348        type Owned = Self;
15349
15350        #[inline(always)]
15351        fn inline_align(_context: fidl::encoding::Context) -> usize {
15352            8
15353        }
15354
15355        #[inline(always)]
15356        fn inline_size(_context: fidl::encoding::Context) -> usize {
15357            8
15358        }
15359        #[inline(always)]
15360        fn encode_is_copy() -> bool {
15361            true
15362        }
15363
15364        #[inline(always)]
15365        fn decode_is_copy() -> bool {
15366            true
15367        }
15368    }
15369
15370    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint64, D> for &MyUint64 {
15371        #[inline]
15372        unsafe fn encode(
15373            self,
15374            encoder: &mut fidl::encoding::Encoder<'_, D>,
15375            offset: usize,
15376            _depth: fidl::encoding::Depth,
15377        ) -> fidl::Result<()> {
15378            encoder.debug_check_bounds::<MyUint64>(offset);
15379            unsafe {
15380                // Copy the object into the buffer.
15381                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15382                (buf_ptr as *mut MyUint64).write_unaligned((self as *const MyUint64).read());
15383                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15384                // done second because the memcpy will write garbage to these bytes.
15385            }
15386            Ok(())
15387        }
15388    }
15389    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
15390        fidl::encoding::Encode<MyUint64, D> for (T0,)
15391    {
15392        #[inline]
15393        unsafe fn encode(
15394            self,
15395            encoder: &mut fidl::encoding::Encoder<'_, D>,
15396            offset: usize,
15397            depth: fidl::encoding::Depth,
15398        ) -> fidl::Result<()> {
15399            encoder.debug_check_bounds::<MyUint64>(offset);
15400            // Zero out padding regions. There's no need to apply masks
15401            // because the unmasked parts will be overwritten by fields.
15402            // Write the fields.
15403            self.0.encode(encoder, offset + 0, depth)?;
15404            Ok(())
15405        }
15406    }
15407
15408    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint64 {
15409        #[inline(always)]
15410        fn new_empty() -> Self {
15411            Self { value: fidl::new_empty!(u64, D) }
15412        }
15413
15414        #[inline]
15415        unsafe fn decode(
15416            &mut self,
15417            decoder: &mut fidl::encoding::Decoder<'_, D>,
15418            offset: usize,
15419            _depth: fidl::encoding::Depth,
15420        ) -> fidl::Result<()> {
15421            decoder.debug_check_bounds::<Self>(offset);
15422            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15423            // Verify that padding bytes are zero.
15424            // Copy from the buffer into the object.
15425            unsafe {
15426                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15427            }
15428            Ok(())
15429        }
15430    }
15431
15432    impl fidl::encoding::ValueTypeMarker for MyUint8 {
15433        type Borrowed<'a> = &'a Self;
15434        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15435            value
15436        }
15437    }
15438
15439    unsafe impl fidl::encoding::TypeMarker for MyUint8 {
15440        type Owned = Self;
15441
15442        #[inline(always)]
15443        fn inline_align(_context: fidl::encoding::Context) -> usize {
15444            1
15445        }
15446
15447        #[inline(always)]
15448        fn inline_size(_context: fidl::encoding::Context) -> usize {
15449            1
15450        }
15451        #[inline(always)]
15452        fn encode_is_copy() -> bool {
15453            true
15454        }
15455
15456        #[inline(always)]
15457        fn decode_is_copy() -> bool {
15458            true
15459        }
15460    }
15461
15462    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint8, D> for &MyUint8 {
15463        #[inline]
15464        unsafe fn encode(
15465            self,
15466            encoder: &mut fidl::encoding::Encoder<'_, D>,
15467            offset: usize,
15468            _depth: fidl::encoding::Depth,
15469        ) -> fidl::Result<()> {
15470            encoder.debug_check_bounds::<MyUint8>(offset);
15471            unsafe {
15472                // Copy the object into the buffer.
15473                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15474                (buf_ptr as *mut MyUint8).write_unaligned((self as *const MyUint8).read());
15475                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15476                // done second because the memcpy will write garbage to these bytes.
15477            }
15478            Ok(())
15479        }
15480    }
15481    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
15482        fidl::encoding::Encode<MyUint8, D> for (T0,)
15483    {
15484        #[inline]
15485        unsafe fn encode(
15486            self,
15487            encoder: &mut fidl::encoding::Encoder<'_, D>,
15488            offset: usize,
15489            depth: fidl::encoding::Depth,
15490        ) -> fidl::Result<()> {
15491            encoder.debug_check_bounds::<MyUint8>(offset);
15492            // Zero out padding regions. There's no need to apply masks
15493            // because the unmasked parts will be overwritten by fields.
15494            // Write the fields.
15495            self.0.encode(encoder, offset + 0, depth)?;
15496            Ok(())
15497        }
15498    }
15499
15500    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint8 {
15501        #[inline(always)]
15502        fn new_empty() -> Self {
15503            Self { value: fidl::new_empty!(u8, D) }
15504        }
15505
15506        #[inline]
15507        unsafe fn decode(
15508            &mut self,
15509            decoder: &mut fidl::encoding::Decoder<'_, D>,
15510            offset: usize,
15511            _depth: fidl::encoding::Depth,
15512        ) -> fidl::Result<()> {
15513            decoder.debug_check_bounds::<Self>(offset);
15514            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15515            // Verify that padding bytes are zero.
15516            // Copy from the buffer into the object.
15517            unsafe {
15518                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
15519            }
15520            Ok(())
15521        }
15522    }
15523
15524    impl fidl::encoding::ValueTypeMarker for NoCodingTablesStressor {
15525        type Borrowed<'a> = &'a Self;
15526        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15527            value
15528        }
15529    }
15530
15531    unsafe impl fidl::encoding::TypeMarker for NoCodingTablesStressor {
15532        type Owned = Self;
15533
15534        #[inline(always)]
15535        fn inline_align(_context: fidl::encoding::Context) -> usize {
15536            8
15537        }
15538
15539        #[inline(always)]
15540        fn inline_size(_context: fidl::encoding::Context) -> usize {
15541            136
15542        }
15543    }
15544
15545    unsafe impl<D: fidl::encoding::ResourceDialect>
15546        fidl::encoding::Encode<NoCodingTablesStressor, D> for &NoCodingTablesStressor
15547    {
15548        #[inline]
15549        unsafe fn encode(
15550            self,
15551            encoder: &mut fidl::encoding::Encoder<'_, D>,
15552            offset: usize,
15553            _depth: fidl::encoding::Depth,
15554        ) -> fidl::Result<()> {
15555            encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15556            // Delegate to tuple encoding.
15557            fidl::encoding::Encode::<NoCodingTablesStressor, D>::encode(
15558                (
15559                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
15560                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
15561                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u1),
15562                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
15563                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
15564                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
15565                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
15566                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
15567                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u3),
15568                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
15569                    <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15570                        &self.p1,
15571                    ),
15572                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
15573                    <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15574                        &self.p2,
15575                    ),
15576                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
15577                ),
15578                encoder,
15579                offset,
15580                _depth,
15581            )
15582        }
15583    }
15584    unsafe impl<
15585        D: fidl::encoding::ResourceDialect,
15586        T0: fidl::encoding::Encode<u64, D>,
15587        T1: fidl::encoding::Encode<u64, D>,
15588        T2: fidl::encoding::Encode<UnionSize36Align4, D>,
15589        T3: fidl::encoding::Encode<u64, D>,
15590        T4: fidl::encoding::Encode<u64, D>,
15591        T5: fidl::encoding::Encode<UnionSize36Align4, D>,
15592        T6: fidl::encoding::Encode<u64, D>,
15593        T7: fidl::encoding::Encode<u64, D>,
15594        T8: fidl::encoding::Encode<UnionSize36Align4, D>,
15595        T9: fidl::encoding::Encode<u64, D>,
15596        T10: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15597        T11: fidl::encoding::Encode<u64, D>,
15598        T12: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15599        T13: fidl::encoding::Encode<u64, D>,
15600    > fidl::encoding::Encode<NoCodingTablesStressor, D>
15601        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
15602    {
15603        #[inline]
15604        unsafe fn encode(
15605            self,
15606            encoder: &mut fidl::encoding::Encoder<'_, D>,
15607            offset: usize,
15608            depth: fidl::encoding::Depth,
15609        ) -> fidl::Result<()> {
15610            encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15611            // Zero out padding regions. There's no need to apply masks
15612            // because the unmasked parts will be overwritten by fields.
15613            // Write the fields.
15614            self.0.encode(encoder, offset + 0, depth)?;
15615            self.1.encode(encoder, offset + 8, depth)?;
15616            self.2.encode(encoder, offset + 16, depth)?;
15617            self.3.encode(encoder, offset + 32, depth)?;
15618            self.4.encode(encoder, offset + 40, depth)?;
15619            self.5.encode(encoder, offset + 48, depth)?;
15620            self.6.encode(encoder, offset + 64, depth)?;
15621            self.7.encode(encoder, offset + 72, depth)?;
15622            self.8.encode(encoder, offset + 80, depth)?;
15623            self.9.encode(encoder, offset + 96, depth)?;
15624            self.10.encode(encoder, offset + 104, depth)?;
15625            self.11.encode(encoder, offset + 112, depth)?;
15626            self.12.encode(encoder, offset + 120, depth)?;
15627            self.13.encode(encoder, offset + 128, depth)?;
15628            Ok(())
15629        }
15630    }
15631
15632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15633        for NoCodingTablesStressor
15634    {
15635        #[inline(always)]
15636        fn new_empty() -> Self {
15637            Self {
15638                f1: fidl::new_empty!(u64, D),
15639                f2: fidl::new_empty!(u64, D),
15640                u1: fidl::new_empty!(UnionSize36Align4, D),
15641                f3: fidl::new_empty!(u64, D),
15642                f4: fidl::new_empty!(u64, D),
15643                u2: fidl::new_empty!(UnionSize36Align4, D),
15644                f5: fidl::new_empty!(u64, D),
15645                f6: fidl::new_empty!(u64, D),
15646                u3: fidl::new_empty!(UnionSize36Align4, D),
15647                f7: fidl::new_empty!(u64, D),
15648                p1: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15649                f8: fidl::new_empty!(u64, D),
15650                p2: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15651                f9: fidl::new_empty!(u64, D),
15652            }
15653        }
15654
15655        #[inline]
15656        unsafe fn decode(
15657            &mut self,
15658            decoder: &mut fidl::encoding::Decoder<'_, D>,
15659            offset: usize,
15660            _depth: fidl::encoding::Depth,
15661        ) -> fidl::Result<()> {
15662            decoder.debug_check_bounds::<Self>(offset);
15663            // Verify that padding bytes are zero.
15664            fidl::decode!(u64, D, &mut self.f1, decoder, offset + 0, _depth)?;
15665            fidl::decode!(u64, D, &mut self.f2, decoder, offset + 8, _depth)?;
15666            fidl::decode!(UnionSize36Align4, D, &mut self.u1, decoder, offset + 16, _depth)?;
15667            fidl::decode!(u64, D, &mut self.f3, decoder, offset + 32, _depth)?;
15668            fidl::decode!(u64, D, &mut self.f4, decoder, offset + 40, _depth)?;
15669            fidl::decode!(UnionSize36Align4, D, &mut self.u2, decoder, offset + 48, _depth)?;
15670            fidl::decode!(u64, D, &mut self.f5, decoder, offset + 64, _depth)?;
15671            fidl::decode!(u64, D, &mut self.f6, decoder, offset + 72, _depth)?;
15672            fidl::decode!(UnionSize36Align4, D, &mut self.u3, decoder, offset + 80, _depth)?;
15673            fidl::decode!(u64, D, &mut self.f7, decoder, offset + 96, _depth)?;
15674            fidl::decode!(
15675                fidl::encoding::Boxed<Size8Align8>,
15676                D,
15677                &mut self.p1,
15678                decoder,
15679                offset + 104,
15680                _depth
15681            )?;
15682            fidl::decode!(u64, D, &mut self.f8, decoder, offset + 112, _depth)?;
15683            fidl::decode!(
15684                fidl::encoding::Boxed<Size8Align8>,
15685                D,
15686                &mut self.p2,
15687                decoder,
15688                offset + 120,
15689                _depth
15690            )?;
15691            fidl::decode!(u64, D, &mut self.f9, decoder, offset + 128, _depth)?;
15692            Ok(())
15693        }
15694    }
15695
15696    impl fidl::encoding::ValueTypeMarker for NodeAttributes {
15697        type Borrowed<'a> = &'a Self;
15698        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15699            value
15700        }
15701    }
15702
15703    unsafe impl fidl::encoding::TypeMarker for NodeAttributes {
15704        type Owned = Self;
15705
15706        #[inline(always)]
15707        fn inline_align(_context: fidl::encoding::Context) -> usize {
15708            8
15709        }
15710
15711        #[inline(always)]
15712        fn inline_size(_context: fidl::encoding::Context) -> usize {
15713            56
15714        }
15715    }
15716
15717    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NodeAttributes, D>
15718        for &NodeAttributes
15719    {
15720        #[inline]
15721        unsafe fn encode(
15722            self,
15723            encoder: &mut fidl::encoding::Encoder<'_, D>,
15724            offset: usize,
15725            _depth: fidl::encoding::Depth,
15726        ) -> fidl::Result<()> {
15727            encoder.debug_check_bounds::<NodeAttributes>(offset);
15728            unsafe {
15729                // Copy the object into the buffer.
15730                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15731                (buf_ptr as *mut NodeAttributes)
15732                    .write_unaligned((self as *const NodeAttributes).read());
15733                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15734                // done second because the memcpy will write garbage to these bytes.
15735                let padding_ptr = buf_ptr.offset(0) as *mut u64;
15736                let padding_mask = 0xffffffff00000000u64;
15737                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
15738            }
15739            Ok(())
15740        }
15741    }
15742    unsafe impl<
15743        D: fidl::encoding::ResourceDialect,
15744        T0: fidl::encoding::Encode<u32, D>,
15745        T1: fidl::encoding::Encode<u64, D>,
15746        T2: fidl::encoding::Encode<u64, D>,
15747        T3: fidl::encoding::Encode<u64, D>,
15748        T4: fidl::encoding::Encode<u64, D>,
15749        T5: fidl::encoding::Encode<u64, D>,
15750        T6: fidl::encoding::Encode<u64, D>,
15751    > fidl::encoding::Encode<NodeAttributes, D> for (T0, T1, T2, T3, T4, T5, T6)
15752    {
15753        #[inline]
15754        unsafe fn encode(
15755            self,
15756            encoder: &mut fidl::encoding::Encoder<'_, D>,
15757            offset: usize,
15758            depth: fidl::encoding::Depth,
15759        ) -> fidl::Result<()> {
15760            encoder.debug_check_bounds::<NodeAttributes>(offset);
15761            // Zero out padding regions. There's no need to apply masks
15762            // because the unmasked parts will be overwritten by fields.
15763            unsafe {
15764                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
15765                (ptr as *mut u64).write_unaligned(0);
15766            }
15767            // Write the fields.
15768            self.0.encode(encoder, offset + 0, depth)?;
15769            self.1.encode(encoder, offset + 8, depth)?;
15770            self.2.encode(encoder, offset + 16, depth)?;
15771            self.3.encode(encoder, offset + 24, depth)?;
15772            self.4.encode(encoder, offset + 32, depth)?;
15773            self.5.encode(encoder, offset + 40, depth)?;
15774            self.6.encode(encoder, offset + 48, depth)?;
15775            Ok(())
15776        }
15777    }
15778
15779    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeAttributes {
15780        #[inline(always)]
15781        fn new_empty() -> Self {
15782            Self {
15783                mode: fidl::new_empty!(u32, D),
15784                id: fidl::new_empty!(u64, D),
15785                content_size: fidl::new_empty!(u64, D),
15786                storage_size: fidl::new_empty!(u64, D),
15787                link_count: fidl::new_empty!(u64, D),
15788                creation_time: fidl::new_empty!(u64, D),
15789                modification_time: fidl::new_empty!(u64, D),
15790            }
15791        }
15792
15793        #[inline]
15794        unsafe fn decode(
15795            &mut self,
15796            decoder: &mut fidl::encoding::Decoder<'_, D>,
15797            offset: usize,
15798            _depth: fidl::encoding::Depth,
15799        ) -> fidl::Result<()> {
15800            decoder.debug_check_bounds::<Self>(offset);
15801            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15802            // Verify that padding bytes are zero.
15803            let ptr = unsafe { buf_ptr.offset(0) };
15804            let padval = unsafe { (ptr as *const u64).read_unaligned() };
15805            let mask = 0xffffffff00000000u64;
15806            let maskedval = padval & mask;
15807            if maskedval != 0 {
15808                return Err(fidl::Error::NonZeroPadding {
15809                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
15810                });
15811            }
15812            // Copy from the buffer into the object.
15813            unsafe {
15814                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 56);
15815            }
15816            Ok(())
15817        }
15818    }
15819
15820    impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign4 {
15821        type Borrowed<'a> = &'a Self;
15822        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15823            value
15824        }
15825    }
15826
15827    unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign4 {
15828        type Owned = Self;
15829
15830        #[inline(always)]
15831        fn inline_align(_context: fidl::encoding::Context) -> usize {
15832            4
15833        }
15834
15835        #[inline(always)]
15836        fn inline_size(_context: fidl::encoding::Context) -> usize {
15837            8
15838        }
15839        #[inline(always)]
15840        fn encode_is_copy() -> bool {
15841            true
15842        }
15843
15844        #[inline(always)]
15845        fn decode_is_copy() -> bool {
15846            true
15847        }
15848    }
15849
15850    unsafe impl<D: fidl::encoding::ResourceDialect>
15851        fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>
15852        for &OneLayerStructNoPaddingAlign4
15853    {
15854        #[inline]
15855        unsafe fn encode(
15856            self,
15857            encoder: &mut fidl::encoding::Encoder<'_, D>,
15858            offset: usize,
15859            _depth: fidl::encoding::Depth,
15860        ) -> fidl::Result<()> {
15861            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15862            unsafe {
15863                // Copy the object into the buffer.
15864                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15865                (buf_ptr as *mut OneLayerStructNoPaddingAlign4)
15866                    .write_unaligned((self as *const OneLayerStructNoPaddingAlign4).read());
15867                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15868                // done second because the memcpy will write garbage to these bytes.
15869            }
15870            Ok(())
15871        }
15872    }
15873    unsafe impl<
15874        D: fidl::encoding::ResourceDialect,
15875        T0: fidl::encoding::Encode<u16, D>,
15876        T1: fidl::encoding::Encode<u8, D>,
15877        T2: fidl::encoding::Encode<u8, D>,
15878        T3: fidl::encoding::Encode<u32, D>,
15879    > fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D> for (T0, T1, T2, T3)
15880    {
15881        #[inline]
15882        unsafe fn encode(
15883            self,
15884            encoder: &mut fidl::encoding::Encoder<'_, D>,
15885            offset: usize,
15886            depth: fidl::encoding::Depth,
15887        ) -> fidl::Result<()> {
15888            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15889            // Zero out padding regions. There's no need to apply masks
15890            // because the unmasked parts will be overwritten by fields.
15891            // Write the fields.
15892            self.0.encode(encoder, offset + 0, depth)?;
15893            self.1.encode(encoder, offset + 2, depth)?;
15894            self.2.encode(encoder, offset + 3, depth)?;
15895            self.3.encode(encoder, offset + 4, depth)?;
15896            Ok(())
15897        }
15898    }
15899
15900    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15901        for OneLayerStructNoPaddingAlign4
15902    {
15903        #[inline(always)]
15904        fn new_empty() -> Self {
15905            Self {
15906                a: fidl::new_empty!(u16, D),
15907                b: fidl::new_empty!(u8, D),
15908                c: fidl::new_empty!(u8, D),
15909                d: fidl::new_empty!(u32, D),
15910            }
15911        }
15912
15913        #[inline]
15914        unsafe fn decode(
15915            &mut self,
15916            decoder: &mut fidl::encoding::Decoder<'_, D>,
15917            offset: usize,
15918            _depth: fidl::encoding::Depth,
15919        ) -> fidl::Result<()> {
15920            decoder.debug_check_bounds::<Self>(offset);
15921            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15922            // Verify that padding bytes are zero.
15923            // Copy from the buffer into the object.
15924            unsafe {
15925                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15926            }
15927            Ok(())
15928        }
15929    }
15930
15931    impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign8 {
15932        type Borrowed<'a> = &'a Self;
15933        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15934            value
15935        }
15936    }
15937
15938    unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign8 {
15939        type Owned = Self;
15940
15941        #[inline(always)]
15942        fn inline_align(_context: fidl::encoding::Context) -> usize {
15943            8
15944        }
15945
15946        #[inline(always)]
15947        fn inline_size(_context: fidl::encoding::Context) -> usize {
15948            16
15949        }
15950        #[inline(always)]
15951        fn encode_is_copy() -> bool {
15952            true
15953        }
15954
15955        #[inline(always)]
15956        fn decode_is_copy() -> bool {
15957            true
15958        }
15959    }
15960
15961    unsafe impl<D: fidl::encoding::ResourceDialect>
15962        fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>
15963        for &OneLayerStructNoPaddingAlign8
15964    {
15965        #[inline]
15966        unsafe fn encode(
15967            self,
15968            encoder: &mut fidl::encoding::Encoder<'_, D>,
15969            offset: usize,
15970            _depth: fidl::encoding::Depth,
15971        ) -> fidl::Result<()> {
15972            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15973            unsafe {
15974                // Copy the object into the buffer.
15975                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15976                (buf_ptr as *mut OneLayerStructNoPaddingAlign8)
15977                    .write_unaligned((self as *const OneLayerStructNoPaddingAlign8).read());
15978                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
15979                // done second because the memcpy will write garbage to these bytes.
15980            }
15981            Ok(())
15982        }
15983    }
15984    unsafe impl<
15985        D: fidl::encoding::ResourceDialect,
15986        T0: fidl::encoding::Encode<u32, D>,
15987        T1: fidl::encoding::Encode<u16, D>,
15988        T2: fidl::encoding::Encode<u16, D>,
15989        T3: fidl::encoding::Encode<u64, D>,
15990    > fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D> for (T0, T1, T2, T3)
15991    {
15992        #[inline]
15993        unsafe fn encode(
15994            self,
15995            encoder: &mut fidl::encoding::Encoder<'_, D>,
15996            offset: usize,
15997            depth: fidl::encoding::Depth,
15998        ) -> fidl::Result<()> {
15999            encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
16000            // Zero out padding regions. There's no need to apply masks
16001            // because the unmasked parts will be overwritten by fields.
16002            // Write the fields.
16003            self.0.encode(encoder, offset + 0, depth)?;
16004            self.1.encode(encoder, offset + 4, depth)?;
16005            self.2.encode(encoder, offset + 6, depth)?;
16006            self.3.encode(encoder, offset + 8, depth)?;
16007            Ok(())
16008        }
16009    }
16010
16011    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16012        for OneLayerStructNoPaddingAlign8
16013    {
16014        #[inline(always)]
16015        fn new_empty() -> Self {
16016            Self {
16017                a: fidl::new_empty!(u32, D),
16018                b: fidl::new_empty!(u16, D),
16019                c: fidl::new_empty!(u16, D),
16020                d: fidl::new_empty!(u64, D),
16021            }
16022        }
16023
16024        #[inline]
16025        unsafe fn decode(
16026            &mut self,
16027            decoder: &mut fidl::encoding::Decoder<'_, D>,
16028            offset: usize,
16029            _depth: fidl::encoding::Depth,
16030        ) -> fidl::Result<()> {
16031            decoder.debug_check_bounds::<Self>(offset);
16032            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16033            // Verify that padding bytes are zero.
16034            // Copy from the buffer into the object.
16035            unsafe {
16036                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
16037            }
16038            Ok(())
16039        }
16040    }
16041
16042    impl fidl::encoding::ValueTypeMarker for OneLayerStructWithBool {
16043        type Borrowed<'a> = &'a Self;
16044        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16045            value
16046        }
16047    }
16048
16049    unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithBool {
16050        type Owned = Self;
16051
16052        #[inline(always)]
16053        fn inline_align(_context: fidl::encoding::Context) -> usize {
16054            4
16055        }
16056
16057        #[inline(always)]
16058        fn inline_size(_context: fidl::encoding::Context) -> usize {
16059            8
16060        }
16061    }
16062
16063    unsafe impl<D: fidl::encoding::ResourceDialect>
16064        fidl::encoding::Encode<OneLayerStructWithBool, D> for &OneLayerStructWithBool
16065    {
16066        #[inline]
16067        unsafe fn encode(
16068            self,
16069            encoder: &mut fidl::encoding::Encoder<'_, D>,
16070            offset: usize,
16071            _depth: fidl::encoding::Depth,
16072        ) -> fidl::Result<()> {
16073            encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
16074            // Delegate to tuple encoding.
16075            fidl::encoding::Encode::<OneLayerStructWithBool, D>::encode(
16076                (
16077                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16078                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16079                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.c),
16080                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.d),
16081                ),
16082                encoder,
16083                offset,
16084                _depth,
16085            )
16086        }
16087    }
16088    unsafe impl<
16089        D: fidl::encoding::ResourceDialect,
16090        T0: fidl::encoding::Encode<bool, D>,
16091        T1: fidl::encoding::Encode<u8, D>,
16092        T2: fidl::encoding::Encode<u16, D>,
16093        T3: fidl::encoding::Encode<u32, D>,
16094    > fidl::encoding::Encode<OneLayerStructWithBool, D> for (T0, T1, T2, T3)
16095    {
16096        #[inline]
16097        unsafe fn encode(
16098            self,
16099            encoder: &mut fidl::encoding::Encoder<'_, D>,
16100            offset: usize,
16101            depth: fidl::encoding::Depth,
16102        ) -> fidl::Result<()> {
16103            encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
16104            // Zero out padding regions. There's no need to apply masks
16105            // because the unmasked parts will be overwritten by fields.
16106            // Write the fields.
16107            self.0.encode(encoder, offset + 0, depth)?;
16108            self.1.encode(encoder, offset + 1, depth)?;
16109            self.2.encode(encoder, offset + 2, depth)?;
16110            self.3.encode(encoder, offset + 4, depth)?;
16111            Ok(())
16112        }
16113    }
16114
16115    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16116        for OneLayerStructWithBool
16117    {
16118        #[inline(always)]
16119        fn new_empty() -> Self {
16120            Self {
16121                a: fidl::new_empty!(bool, D),
16122                b: fidl::new_empty!(u8, D),
16123                c: fidl::new_empty!(u16, D),
16124                d: fidl::new_empty!(u32, D),
16125            }
16126        }
16127
16128        #[inline]
16129        unsafe fn decode(
16130            &mut self,
16131            decoder: &mut fidl::encoding::Decoder<'_, D>,
16132            offset: usize,
16133            _depth: fidl::encoding::Depth,
16134        ) -> fidl::Result<()> {
16135            decoder.debug_check_bounds::<Self>(offset);
16136            // Verify that padding bytes are zero.
16137            fidl::decode!(bool, D, &mut self.a, decoder, offset + 0, _depth)?;
16138            fidl::decode!(u8, D, &mut self.b, decoder, offset + 1, _depth)?;
16139            fidl::decode!(u16, D, &mut self.c, decoder, offset + 2, _depth)?;
16140            fidl::decode!(u32, D, &mut self.d, decoder, offset + 4, _depth)?;
16141            Ok(())
16142        }
16143    }
16144
16145    impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign4 {
16146        type Borrowed<'a> = &'a Self;
16147        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16148            value
16149        }
16150    }
16151
16152    unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign4 {
16153        type Owned = Self;
16154
16155        #[inline(always)]
16156        fn inline_align(_context: fidl::encoding::Context) -> usize {
16157            4
16158        }
16159
16160        #[inline(always)]
16161        fn inline_size(_context: fidl::encoding::Context) -> usize {
16162            8
16163        }
16164    }
16165
16166    unsafe impl<D: fidl::encoding::ResourceDialect>
16167        fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>
16168        for &OneLayerStructWithPaddingAlign4
16169    {
16170        #[inline]
16171        unsafe fn encode(
16172            self,
16173            encoder: &mut fidl::encoding::Encoder<'_, D>,
16174            offset: usize,
16175            _depth: fidl::encoding::Depth,
16176        ) -> fidl::Result<()> {
16177            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
16178            unsafe {
16179                // Copy the object into the buffer.
16180                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
16181                (buf_ptr as *mut OneLayerStructWithPaddingAlign4)
16182                    .write_unaligned((self as *const OneLayerStructWithPaddingAlign4).read());
16183                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
16184                // done second because the memcpy will write garbage to these bytes.
16185                let padding_ptr = buf_ptr.offset(0) as *mut u32;
16186                let padding_mask = 0xff000000u32;
16187                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
16188            }
16189            Ok(())
16190        }
16191    }
16192    unsafe impl<
16193        D: fidl::encoding::ResourceDialect,
16194        T0: fidl::encoding::Encode<u16, D>,
16195        T1: fidl::encoding::Encode<u8, D>,
16196        T2: fidl::encoding::Encode<u32, D>,
16197    > fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D> for (T0, T1, T2)
16198    {
16199        #[inline]
16200        unsafe fn encode(
16201            self,
16202            encoder: &mut fidl::encoding::Encoder<'_, D>,
16203            offset: usize,
16204            depth: fidl::encoding::Depth,
16205        ) -> fidl::Result<()> {
16206            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
16207            // Zero out padding regions. There's no need to apply masks
16208            // because the unmasked parts will be overwritten by fields.
16209            unsafe {
16210                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16211                (ptr as *mut u32).write_unaligned(0);
16212            }
16213            // Write the fields.
16214            self.0.encode(encoder, offset + 0, depth)?;
16215            self.1.encode(encoder, offset + 2, depth)?;
16216            self.2.encode(encoder, offset + 4, depth)?;
16217            Ok(())
16218        }
16219    }
16220
16221    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16222        for OneLayerStructWithPaddingAlign4
16223    {
16224        #[inline(always)]
16225        fn new_empty() -> Self {
16226            Self {
16227                a: fidl::new_empty!(u16, D),
16228                b: fidl::new_empty!(u8, D),
16229                c: fidl::new_empty!(u32, D),
16230            }
16231        }
16232
16233        #[inline]
16234        unsafe fn decode(
16235            &mut self,
16236            decoder: &mut fidl::encoding::Decoder<'_, D>,
16237            offset: usize,
16238            _depth: fidl::encoding::Depth,
16239        ) -> fidl::Result<()> {
16240            decoder.debug_check_bounds::<Self>(offset);
16241            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16242            // Verify that padding bytes are zero.
16243            let ptr = unsafe { buf_ptr.offset(0) };
16244            let padval = unsafe { (ptr as *const u32).read_unaligned() };
16245            let mask = 0xff000000u32;
16246            let maskedval = padval & mask;
16247            if maskedval != 0 {
16248                return Err(fidl::Error::NonZeroPadding {
16249                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16250                });
16251            }
16252            // Copy from the buffer into the object.
16253            unsafe {
16254                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
16255            }
16256            Ok(())
16257        }
16258    }
16259
16260    impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign8 {
16261        type Borrowed<'a> = &'a Self;
16262        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16263            value
16264        }
16265    }
16266
16267    unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign8 {
16268        type Owned = Self;
16269
16270        #[inline(always)]
16271        fn inline_align(_context: fidl::encoding::Context) -> usize {
16272            8
16273        }
16274
16275        #[inline(always)]
16276        fn inline_size(_context: fidl::encoding::Context) -> usize {
16277            16
16278        }
16279    }
16280
16281    unsafe impl<D: fidl::encoding::ResourceDialect>
16282        fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>
16283        for &OneLayerStructWithPaddingAlign8
16284    {
16285        #[inline]
16286        unsafe fn encode(
16287            self,
16288            encoder: &mut fidl::encoding::Encoder<'_, D>,
16289            offset: usize,
16290            _depth: fidl::encoding::Depth,
16291        ) -> fidl::Result<()> {
16292            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16293            unsafe {
16294                // Copy the object into the buffer.
16295                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
16296                (buf_ptr as *mut OneLayerStructWithPaddingAlign8)
16297                    .write_unaligned((self as *const OneLayerStructWithPaddingAlign8).read());
16298                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
16299                // done second because the memcpy will write garbage to these bytes.
16300                let padding_ptr = buf_ptr.offset(0) as *mut u64;
16301                let padding_mask = 0xffff000000000000u64;
16302                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
16303            }
16304            Ok(())
16305        }
16306    }
16307    unsafe impl<
16308        D: fidl::encoding::ResourceDialect,
16309        T0: fidl::encoding::Encode<u32, D>,
16310        T1: fidl::encoding::Encode<u16, D>,
16311        T2: fidl::encoding::Encode<u64, D>,
16312    > fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D> for (T0, T1, T2)
16313    {
16314        #[inline]
16315        unsafe fn encode(
16316            self,
16317            encoder: &mut fidl::encoding::Encoder<'_, D>,
16318            offset: usize,
16319            depth: fidl::encoding::Depth,
16320        ) -> fidl::Result<()> {
16321            encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16322            // Zero out padding regions. There's no need to apply masks
16323            // because the unmasked parts will be overwritten by fields.
16324            unsafe {
16325                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16326                (ptr as *mut u64).write_unaligned(0);
16327            }
16328            // Write the fields.
16329            self.0.encode(encoder, offset + 0, depth)?;
16330            self.1.encode(encoder, offset + 4, depth)?;
16331            self.2.encode(encoder, offset + 8, depth)?;
16332            Ok(())
16333        }
16334    }
16335
16336    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16337        for OneLayerStructWithPaddingAlign8
16338    {
16339        #[inline(always)]
16340        fn new_empty() -> Self {
16341            Self {
16342                a: fidl::new_empty!(u32, D),
16343                b: fidl::new_empty!(u16, D),
16344                c: fidl::new_empty!(u64, D),
16345            }
16346        }
16347
16348        #[inline]
16349        unsafe fn decode(
16350            &mut self,
16351            decoder: &mut fidl::encoding::Decoder<'_, D>,
16352            offset: usize,
16353            _depth: fidl::encoding::Depth,
16354        ) -> fidl::Result<()> {
16355            decoder.debug_check_bounds::<Self>(offset);
16356            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16357            // Verify that padding bytes are zero.
16358            let ptr = unsafe { buf_ptr.offset(0) };
16359            let padval = unsafe { (ptr as *const u64).read_unaligned() };
16360            let mask = 0xffff000000000000u64;
16361            let maskedval = padval & mask;
16362            if maskedval != 0 {
16363                return Err(fidl::Error::NonZeroPadding {
16364                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16365                });
16366            }
16367            // Copy from the buffer into the object.
16368            unsafe {
16369                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
16370            }
16371            Ok(())
16372        }
16373    }
16374
16375    impl fidl::encoding::ValueTypeMarker for OptionalEmptyStructWrapper {
16376        type Borrowed<'a> = &'a Self;
16377        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16378            value
16379        }
16380    }
16381
16382    unsafe impl fidl::encoding::TypeMarker for OptionalEmptyStructWrapper {
16383        type Owned = Self;
16384
16385        #[inline(always)]
16386        fn inline_align(_context: fidl::encoding::Context) -> usize {
16387            8
16388        }
16389
16390        #[inline(always)]
16391        fn inline_size(_context: fidl::encoding::Context) -> usize {
16392            8
16393        }
16394    }
16395
16396    unsafe impl<D: fidl::encoding::ResourceDialect>
16397        fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for &OptionalEmptyStructWrapper
16398    {
16399        #[inline]
16400        unsafe fn encode(
16401            self,
16402            encoder: &mut fidl::encoding::Encoder<'_, D>,
16403            offset: usize,
16404            _depth: fidl::encoding::Depth,
16405        ) -> fidl::Result<()> {
16406            encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16407            // Delegate to tuple encoding.
16408            fidl::encoding::Encode::<OptionalEmptyStructWrapper, D>::encode(
16409                (<fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(
16410                    &self.s,
16411                ),),
16412                encoder,
16413                offset,
16414                _depth,
16415            )
16416        }
16417    }
16418    unsafe impl<
16419        D: fidl::encoding::ResourceDialect,
16420        T0: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
16421    > fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for (T0,)
16422    {
16423        #[inline]
16424        unsafe fn encode(
16425            self,
16426            encoder: &mut fidl::encoding::Encoder<'_, D>,
16427            offset: usize,
16428            depth: fidl::encoding::Depth,
16429        ) -> fidl::Result<()> {
16430            encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16431            // Zero out padding regions. There's no need to apply masks
16432            // because the unmasked parts will be overwritten by fields.
16433            // Write the fields.
16434            self.0.encode(encoder, offset + 0, depth)?;
16435            Ok(())
16436        }
16437    }
16438
16439    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16440        for OptionalEmptyStructWrapper
16441    {
16442        #[inline(always)]
16443        fn new_empty() -> Self {
16444            Self { s: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D) }
16445        }
16446
16447        #[inline]
16448        unsafe fn decode(
16449            &mut self,
16450            decoder: &mut fidl::encoding::Decoder<'_, D>,
16451            offset: usize,
16452            _depth: fidl::encoding::Depth,
16453        ) -> fidl::Result<()> {
16454            decoder.debug_check_bounds::<Self>(offset);
16455            // Verify that padding bytes are zero.
16456            fidl::decode!(
16457                fidl::encoding::Boxed<EmptyStruct>,
16458                D,
16459                &mut self.s,
16460                decoder,
16461                offset + 0,
16462                _depth
16463            )?;
16464            Ok(())
16465        }
16466    }
16467
16468    impl fidl::encoding::ValueTypeMarker for OptionalStringWrapper {
16469        type Borrowed<'a> = &'a Self;
16470        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16471            value
16472        }
16473    }
16474
16475    unsafe impl fidl::encoding::TypeMarker for OptionalStringWrapper {
16476        type Owned = Self;
16477
16478        #[inline(always)]
16479        fn inline_align(_context: fidl::encoding::Context) -> usize {
16480            8
16481        }
16482
16483        #[inline(always)]
16484        fn inline_size(_context: fidl::encoding::Context) -> usize {
16485            16
16486        }
16487    }
16488
16489    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalStringWrapper, D>
16490        for &OptionalStringWrapper
16491    {
16492        #[inline]
16493        unsafe fn encode(
16494            self,
16495            encoder: &mut fidl::encoding::Encoder<'_, D>,
16496            offset: usize,
16497            _depth: fidl::encoding::Depth,
16498        ) -> fidl::Result<()> {
16499            encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16500            // Delegate to tuple encoding.
16501            fidl::encoding::Encode::<OptionalStringWrapper, D>::encode(
16502                (
16503                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
16504                ),
16505                encoder, offset, _depth
16506            )
16507        }
16508    }
16509    unsafe impl<
16510        D: fidl::encoding::ResourceDialect,
16511        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
16512    > fidl::encoding::Encode<OptionalStringWrapper, D> for (T0,)
16513    {
16514        #[inline]
16515        unsafe fn encode(
16516            self,
16517            encoder: &mut fidl::encoding::Encoder<'_, D>,
16518            offset: usize,
16519            depth: fidl::encoding::Depth,
16520        ) -> fidl::Result<()> {
16521            encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16522            // Zero out padding regions. There's no need to apply masks
16523            // because the unmasked parts will be overwritten by fields.
16524            // Write the fields.
16525            self.0.encode(encoder, offset + 0, depth)?;
16526            Ok(())
16527        }
16528    }
16529
16530    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalStringWrapper {
16531        #[inline(always)]
16532        fn new_empty() -> Self {
16533            Self {
16534                str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
16535            }
16536        }
16537
16538        #[inline]
16539        unsafe fn decode(
16540            &mut self,
16541            decoder: &mut fidl::encoding::Decoder<'_, D>,
16542            offset: usize,
16543            _depth: fidl::encoding::Depth,
16544        ) -> fidl::Result<()> {
16545            decoder.debug_check_bounds::<Self>(offset);
16546            // Verify that padding bytes are zero.
16547            fidl::decode!(
16548                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
16549                D,
16550                &mut self.str,
16551                decoder,
16552                offset + 0,
16553                _depth
16554            )?;
16555            Ok(())
16556        }
16557    }
16558
16559    impl fidl::encoding::ValueTypeMarker for OptionalVectorWrapper {
16560        type Borrowed<'a> = &'a Self;
16561        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16562            value
16563        }
16564    }
16565
16566    unsafe impl fidl::encoding::TypeMarker for OptionalVectorWrapper {
16567        type Owned = Self;
16568
16569        #[inline(always)]
16570        fn inline_align(_context: fidl::encoding::Context) -> usize {
16571            8
16572        }
16573
16574        #[inline(always)]
16575        fn inline_size(_context: fidl::encoding::Context) -> usize {
16576            16
16577        }
16578    }
16579
16580    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalVectorWrapper, D>
16581        for &OptionalVectorWrapper
16582    {
16583        #[inline]
16584        unsafe fn encode(
16585            self,
16586            encoder: &mut fidl::encoding::Encoder<'_, D>,
16587            offset: usize,
16588            _depth: fidl::encoding::Depth,
16589        ) -> fidl::Result<()> {
16590            encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16591            // Delegate to tuple encoding.
16592            fidl::encoding::Encode::<OptionalVectorWrapper, D>::encode(
16593                (
16594                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16595                ),
16596                encoder, offset, _depth
16597            )
16598        }
16599    }
16600    unsafe impl<
16601        D: fidl::encoding::ResourceDialect,
16602        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>, D>,
16603    > fidl::encoding::Encode<OptionalVectorWrapper, D> for (T0,)
16604    {
16605        #[inline]
16606        unsafe fn encode(
16607            self,
16608            encoder: &mut fidl::encoding::Encoder<'_, D>,
16609            offset: usize,
16610            depth: fidl::encoding::Depth,
16611        ) -> fidl::Result<()> {
16612            encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16613            // Zero out padding regions. There's no need to apply masks
16614            // because the unmasked parts will be overwritten by fields.
16615            // Write the fields.
16616            self.0.encode(encoder, offset + 0, depth)?;
16617            Ok(())
16618        }
16619    }
16620
16621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalVectorWrapper {
16622        #[inline(always)]
16623        fn new_empty() -> Self {
16624            Self {
16625                v: fidl::new_empty!(
16626                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16627                    D
16628                ),
16629            }
16630        }
16631
16632        #[inline]
16633        unsafe fn decode(
16634            &mut self,
16635            decoder: &mut fidl::encoding::Decoder<'_, D>,
16636            offset: usize,
16637            _depth: fidl::encoding::Depth,
16638        ) -> fidl::Result<()> {
16639            decoder.debug_check_bounds::<Self>(offset);
16640            // Verify that padding bytes are zero.
16641            fidl::decode!(
16642                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16643                D,
16644                &mut self.v,
16645                decoder,
16646                offset + 0,
16647                _depth
16648            )?;
16649            Ok(())
16650        }
16651    }
16652
16653    impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed4 {
16654        type Borrowed<'a> = &'a Self;
16655        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16656            value
16657        }
16658    }
16659
16660    unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed4 {
16661        type Owned = Self;
16662
16663        #[inline(always)]
16664        fn inline_align(_context: fidl::encoding::Context) -> usize {
16665            8
16666        }
16667
16668        #[inline(always)]
16669        fn inline_size(_context: fidl::encoding::Context) -> usize {
16670            16
16671        }
16672    }
16673
16674    unsafe impl<D: fidl::encoding::ResourceDialect>
16675        fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for &OutOfLinePaddingZeroed4
16676    {
16677        #[inline]
16678        unsafe fn encode(
16679            self,
16680            encoder: &mut fidl::encoding::Encoder<'_, D>,
16681            offset: usize,
16682            _depth: fidl::encoding::Depth,
16683        ) -> fidl::Result<()> {
16684            encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16685            // Delegate to tuple encoding.
16686            fidl::encoding::Encode::<OutOfLinePaddingZeroed4, D>::encode(
16687                (
16688                    <fidl::encoding::Boxed<Uint32Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16689                    <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16690                ),
16691                encoder, offset, _depth
16692            )
16693        }
16694    }
16695    unsafe impl<
16696        D: fidl::encoding::ResourceDialect,
16697        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint32Struct>, D>,
16698        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16699    > fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for (T0, T1)
16700    {
16701        #[inline]
16702        unsafe fn encode(
16703            self,
16704            encoder: &mut fidl::encoding::Encoder<'_, D>,
16705            offset: usize,
16706            depth: fidl::encoding::Depth,
16707        ) -> fidl::Result<()> {
16708            encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16709            // Zero out padding regions. There's no need to apply masks
16710            // because the unmasked parts will be overwritten by fields.
16711            // Write the fields.
16712            self.0.encode(encoder, offset + 0, depth)?;
16713            self.1.encode(encoder, offset + 8, depth)?;
16714            Ok(())
16715        }
16716    }
16717
16718    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16719        for OutOfLinePaddingZeroed4
16720    {
16721        #[inline(always)]
16722        fn new_empty() -> Self {
16723            Self {
16724                a: fidl::new_empty!(fidl::encoding::Boxed<Uint32Struct>, D),
16725                b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16726            }
16727        }
16728
16729        #[inline]
16730        unsafe fn decode(
16731            &mut self,
16732            decoder: &mut fidl::encoding::Decoder<'_, D>,
16733            offset: usize,
16734            _depth: fidl::encoding::Depth,
16735        ) -> fidl::Result<()> {
16736            decoder.debug_check_bounds::<Self>(offset);
16737            // Verify that padding bytes are zero.
16738            fidl::decode!(
16739                fidl::encoding::Boxed<Uint32Struct>,
16740                D,
16741                &mut self.a,
16742                decoder,
16743                offset + 0,
16744                _depth
16745            )?;
16746            fidl::decode!(
16747                fidl::encoding::Boxed<Uint64Struct>,
16748                D,
16749                &mut self.b,
16750                decoder,
16751                offset + 8,
16752                _depth
16753            )?;
16754            Ok(())
16755        }
16756    }
16757
16758    impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed6 {
16759        type Borrowed<'a> = &'a Self;
16760        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16761            value
16762        }
16763    }
16764
16765    unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed6 {
16766        type Owned = Self;
16767
16768        #[inline(always)]
16769        fn inline_align(_context: fidl::encoding::Context) -> usize {
16770            8
16771        }
16772
16773        #[inline(always)]
16774        fn inline_size(_context: fidl::encoding::Context) -> usize {
16775            16
16776        }
16777    }
16778
16779    unsafe impl<D: fidl::encoding::ResourceDialect>
16780        fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for &OutOfLinePaddingZeroed6
16781    {
16782        #[inline]
16783        unsafe fn encode(
16784            self,
16785            encoder: &mut fidl::encoding::Encoder<'_, D>,
16786            offset: usize,
16787            _depth: fidl::encoding::Depth,
16788        ) -> fidl::Result<()> {
16789            encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16790            // Delegate to tuple encoding.
16791            fidl::encoding::Encode::<OutOfLinePaddingZeroed6, D>::encode(
16792                (
16793                    <fidl::encoding::Boxed<Uint16Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16794                    <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16795                ),
16796                encoder, offset, _depth
16797            )
16798        }
16799    }
16800    unsafe impl<
16801        D: fidl::encoding::ResourceDialect,
16802        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint16Struct>, D>,
16803        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16804    > fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for (T0, T1)
16805    {
16806        #[inline]
16807        unsafe fn encode(
16808            self,
16809            encoder: &mut fidl::encoding::Encoder<'_, D>,
16810            offset: usize,
16811            depth: fidl::encoding::Depth,
16812        ) -> fidl::Result<()> {
16813            encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16814            // Zero out padding regions. There's no need to apply masks
16815            // because the unmasked parts will be overwritten by fields.
16816            // Write the fields.
16817            self.0.encode(encoder, offset + 0, depth)?;
16818            self.1.encode(encoder, offset + 8, depth)?;
16819            Ok(())
16820        }
16821    }
16822
16823    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16824        for OutOfLinePaddingZeroed6
16825    {
16826        #[inline(always)]
16827        fn new_empty() -> Self {
16828            Self {
16829                a: fidl::new_empty!(fidl::encoding::Boxed<Uint16Struct>, D),
16830                b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16831            }
16832        }
16833
16834        #[inline]
16835        unsafe fn decode(
16836            &mut self,
16837            decoder: &mut fidl::encoding::Decoder<'_, D>,
16838            offset: usize,
16839            _depth: fidl::encoding::Depth,
16840        ) -> fidl::Result<()> {
16841            decoder.debug_check_bounds::<Self>(offset);
16842            // Verify that padding bytes are zero.
16843            fidl::decode!(
16844                fidl::encoding::Boxed<Uint16Struct>,
16845                D,
16846                &mut self.a,
16847                decoder,
16848                offset + 0,
16849                _depth
16850            )?;
16851            fidl::decode!(
16852                fidl::encoding::Boxed<Uint64Struct>,
16853                D,
16854                &mut self.b,
16855                decoder,
16856                offset + 8,
16857                _depth
16858            )?;
16859            Ok(())
16860        }
16861    }
16862
16863    impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed7 {
16864        type Borrowed<'a> = &'a Self;
16865        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16866            value
16867        }
16868    }
16869
16870    unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed7 {
16871        type Owned = Self;
16872
16873        #[inline(always)]
16874        fn inline_align(_context: fidl::encoding::Context) -> usize {
16875            8
16876        }
16877
16878        #[inline(always)]
16879        fn inline_size(_context: fidl::encoding::Context) -> usize {
16880            16
16881        }
16882    }
16883
16884    unsafe impl<D: fidl::encoding::ResourceDialect>
16885        fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for &OutOfLinePaddingZeroed7
16886    {
16887        #[inline]
16888        unsafe fn encode(
16889            self,
16890            encoder: &mut fidl::encoding::Encoder<'_, D>,
16891            offset: usize,
16892            _depth: fidl::encoding::Depth,
16893        ) -> fidl::Result<()> {
16894            encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16895            // Delegate to tuple encoding.
16896            fidl::encoding::Encode::<OutOfLinePaddingZeroed7, D>::encode(
16897                (
16898                    <fidl::encoding::Boxed<Uint8Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16899                    <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16900                ),
16901                encoder, offset, _depth
16902            )
16903        }
16904    }
16905    unsafe impl<
16906        D: fidl::encoding::ResourceDialect,
16907        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint8Struct>, D>,
16908        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16909    > fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for (T0, T1)
16910    {
16911        #[inline]
16912        unsafe fn encode(
16913            self,
16914            encoder: &mut fidl::encoding::Encoder<'_, D>,
16915            offset: usize,
16916            depth: fidl::encoding::Depth,
16917        ) -> fidl::Result<()> {
16918            encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16919            // Zero out padding regions. There's no need to apply masks
16920            // because the unmasked parts will be overwritten by fields.
16921            // Write the fields.
16922            self.0.encode(encoder, offset + 0, depth)?;
16923            self.1.encode(encoder, offset + 8, depth)?;
16924            Ok(())
16925        }
16926    }
16927
16928    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16929        for OutOfLinePaddingZeroed7
16930    {
16931        #[inline(always)]
16932        fn new_empty() -> Self {
16933            Self {
16934                a: fidl::new_empty!(fidl::encoding::Boxed<Uint8Struct>, D),
16935                b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16936            }
16937        }
16938
16939        #[inline]
16940        unsafe fn decode(
16941            &mut self,
16942            decoder: &mut fidl::encoding::Decoder<'_, D>,
16943            offset: usize,
16944            _depth: fidl::encoding::Depth,
16945        ) -> fidl::Result<()> {
16946            decoder.debug_check_bounds::<Self>(offset);
16947            // Verify that padding bytes are zero.
16948            fidl::decode!(
16949                fidl::encoding::Boxed<Uint8Struct>,
16950                D,
16951                &mut self.a,
16952                decoder,
16953                offset + 0,
16954                _depth
16955            )?;
16956            fidl::decode!(
16957                fidl::encoding::Boxed<Uint64Struct>,
16958                D,
16959                &mut self.b,
16960                decoder,
16961                offset + 8,
16962                _depth
16963            )?;
16964            Ok(())
16965        }
16966    }
16967
16968    impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1 {
16969        type Borrowed<'a> = &'a Self;
16970        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16971            value
16972        }
16973    }
16974
16975    unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1 {
16976        type Owned = Self;
16977
16978        #[inline(always)]
16979        fn inline_align(_context: fidl::encoding::Context) -> usize {
16980            8
16981        }
16982
16983        #[inline(always)]
16984        fn inline_size(_context: fidl::encoding::Context) -> usize {
16985            48
16986        }
16987    }
16988
16989    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OutOfLineSandwich1, D>
16990        for &OutOfLineSandwich1
16991    {
16992        #[inline]
16993        unsafe fn encode(
16994            self,
16995            encoder: &mut fidl::encoding::Encoder<'_, D>,
16996            offset: usize,
16997            _depth: fidl::encoding::Depth,
16998        ) -> fidl::Result<()> {
16999            encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
17000            // Delegate to tuple encoding.
17001            fidl::encoding::Encode::<OutOfLineSandwich1, D>::encode(
17002                (
17003                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
17004                    <fidl::encoding::Vector<Sandwich1, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17005                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
17006                ),
17007                encoder, offset, _depth
17008            )
17009        }
17010    }
17011    unsafe impl<
17012        D: fidl::encoding::ResourceDialect,
17013        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17014        T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1, 1>, D>,
17015        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17016    > fidl::encoding::Encode<OutOfLineSandwich1, D> for (T0, T1, T2)
17017    {
17018        #[inline]
17019        unsafe fn encode(
17020            self,
17021            encoder: &mut fidl::encoding::Encoder<'_, D>,
17022            offset: usize,
17023            depth: fidl::encoding::Depth,
17024        ) -> fidl::Result<()> {
17025            encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
17026            // Zero out padding regions. There's no need to apply masks
17027            // because the unmasked parts will be overwritten by fields.
17028            // Write the fields.
17029            self.0.encode(encoder, offset + 0, depth)?;
17030            self.1.encode(encoder, offset + 16, depth)?;
17031            self.2.encode(encoder, offset + 32, depth)?;
17032            Ok(())
17033        }
17034    }
17035
17036    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfLineSandwich1 {
17037        #[inline(always)]
17038        fn new_empty() -> Self {
17039            Self {
17040                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17041                v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1, 1>, D),
17042                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17043            }
17044        }
17045
17046        #[inline]
17047        unsafe fn decode(
17048            &mut self,
17049            decoder: &mut fidl::encoding::Decoder<'_, D>,
17050            offset: usize,
17051            _depth: fidl::encoding::Depth,
17052        ) -> fidl::Result<()> {
17053            decoder.debug_check_bounds::<Self>(offset);
17054            // Verify that padding bytes are zero.
17055            fidl::decode!(
17056                fidl::encoding::UnboundedString,
17057                D,
17058                &mut self.before,
17059                decoder,
17060                offset + 0,
17061                _depth
17062            )?;
17063            fidl::decode!(fidl::encoding::Vector<Sandwich1, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
17064            fidl::decode!(
17065                fidl::encoding::UnboundedString,
17066                D,
17067                &mut self.after,
17068                decoder,
17069                offset + 32,
17070                _depth
17071            )?;
17072            Ok(())
17073        }
17074    }
17075
17076    impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1WithOptUnion {
17077        type Borrowed<'a> = &'a Self;
17078        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17079            value
17080        }
17081    }
17082
17083    unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1WithOptUnion {
17084        type Owned = Self;
17085
17086        #[inline(always)]
17087        fn inline_align(_context: fidl::encoding::Context) -> usize {
17088            8
17089        }
17090
17091        #[inline(always)]
17092        fn inline_size(_context: fidl::encoding::Context) -> usize {
17093            48
17094        }
17095    }
17096
17097    unsafe impl<D: fidl::encoding::ResourceDialect>
17098        fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D>
17099        for &OutOfLineSandwich1WithOptUnion
17100    {
17101        #[inline]
17102        unsafe fn encode(
17103            self,
17104            encoder: &mut fidl::encoding::Encoder<'_, D>,
17105            offset: usize,
17106            _depth: fidl::encoding::Depth,
17107        ) -> fidl::Result<()> {
17108            encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
17109            // Delegate to tuple encoding.
17110            fidl::encoding::Encode::<OutOfLineSandwich1WithOptUnion, D>::encode(
17111                (
17112                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
17113                    <fidl::encoding::Vector<Sandwich1WithOptUnion, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17114                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
17115                ),
17116                encoder, offset, _depth
17117            )
17118        }
17119    }
17120    unsafe impl<
17121        D: fidl::encoding::ResourceDialect,
17122        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17123        T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D>,
17124        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
17125    > fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D> for (T0, T1, T2)
17126    {
17127        #[inline]
17128        unsafe fn encode(
17129            self,
17130            encoder: &mut fidl::encoding::Encoder<'_, D>,
17131            offset: usize,
17132            depth: fidl::encoding::Depth,
17133        ) -> fidl::Result<()> {
17134            encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
17135            // Zero out padding regions. There's no need to apply masks
17136            // because the unmasked parts will be overwritten by fields.
17137            // Write the fields.
17138            self.0.encode(encoder, offset + 0, depth)?;
17139            self.1.encode(encoder, offset + 16, depth)?;
17140            self.2.encode(encoder, offset + 32, depth)?;
17141            Ok(())
17142        }
17143    }
17144
17145    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17146        for OutOfLineSandwich1WithOptUnion
17147    {
17148        #[inline(always)]
17149        fn new_empty() -> Self {
17150            Self {
17151                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17152                v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D),
17153                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
17154            }
17155        }
17156
17157        #[inline]
17158        unsafe fn decode(
17159            &mut self,
17160            decoder: &mut fidl::encoding::Decoder<'_, D>,
17161            offset: usize,
17162            _depth: fidl::encoding::Depth,
17163        ) -> fidl::Result<()> {
17164            decoder.debug_check_bounds::<Self>(offset);
17165            // Verify that padding bytes are zero.
17166            fidl::decode!(
17167                fidl::encoding::UnboundedString,
17168                D,
17169                &mut self.before,
17170                decoder,
17171                offset + 0,
17172                _depth
17173            )?;
17174            fidl::decode!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
17175            fidl::decode!(
17176                fidl::encoding::UnboundedString,
17177                D,
17178                &mut self.after,
17179                decoder,
17180                offset + 32,
17181                _depth
17182            )?;
17183            Ok(())
17184        }
17185    }
17186
17187    impl fidl::encoding::ValueTypeMarker for PaddedTableStruct {
17188        type Borrowed<'a> = &'a Self;
17189        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17190            value
17191        }
17192    }
17193
17194    unsafe impl fidl::encoding::TypeMarker for PaddedTableStruct {
17195        type Owned = Self;
17196
17197        #[inline(always)]
17198        fn inline_align(_context: fidl::encoding::Context) -> usize {
17199            8
17200        }
17201
17202        #[inline(always)]
17203        fn inline_size(_context: fidl::encoding::Context) -> usize {
17204            16
17205        }
17206    }
17207
17208    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTableStruct, D>
17209        for &PaddedTableStruct
17210    {
17211        #[inline]
17212        unsafe fn encode(
17213            self,
17214            encoder: &mut fidl::encoding::Encoder<'_, D>,
17215            offset: usize,
17216            _depth: fidl::encoding::Depth,
17217        ) -> fidl::Result<()> {
17218            encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17219            // Delegate to tuple encoding.
17220            fidl::encoding::Encode::<PaddedTableStruct, D>::encode(
17221                (<PaddedTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
17222                encoder,
17223                offset,
17224                _depth,
17225            )
17226        }
17227    }
17228    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedTable, D>>
17229        fidl::encoding::Encode<PaddedTableStruct, D> for (T0,)
17230    {
17231        #[inline]
17232        unsafe fn encode(
17233            self,
17234            encoder: &mut fidl::encoding::Encoder<'_, D>,
17235            offset: usize,
17236            depth: fidl::encoding::Depth,
17237        ) -> fidl::Result<()> {
17238            encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17239            // Zero out padding regions. There's no need to apply masks
17240            // because the unmasked parts will be overwritten by fields.
17241            // Write the fields.
17242            self.0.encode(encoder, offset + 0, depth)?;
17243            Ok(())
17244        }
17245    }
17246
17247    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTableStruct {
17248        #[inline(always)]
17249        fn new_empty() -> Self {
17250            Self { t: fidl::new_empty!(PaddedTable, D) }
17251        }
17252
17253        #[inline]
17254        unsafe fn decode(
17255            &mut self,
17256            decoder: &mut fidl::encoding::Decoder<'_, D>,
17257            offset: usize,
17258            _depth: fidl::encoding::Depth,
17259        ) -> fidl::Result<()> {
17260            decoder.debug_check_bounds::<Self>(offset);
17261            // Verify that padding bytes are zero.
17262            fidl::decode!(PaddedTable, D, &mut self.t, decoder, offset + 0, _depth)?;
17263            Ok(())
17264        }
17265    }
17266
17267    impl fidl::encoding::ValueTypeMarker for PaddedUnionStruct {
17268        type Borrowed<'a> = &'a Self;
17269        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17270            value
17271        }
17272    }
17273
17274    unsafe impl fidl::encoding::TypeMarker for PaddedUnionStruct {
17275        type Owned = Self;
17276
17277        #[inline(always)]
17278        fn inline_align(_context: fidl::encoding::Context) -> usize {
17279            8
17280        }
17281
17282        #[inline(always)]
17283        fn inline_size(_context: fidl::encoding::Context) -> usize {
17284            16
17285        }
17286    }
17287
17288    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnionStruct, D>
17289        for &PaddedUnionStruct
17290    {
17291        #[inline]
17292        unsafe fn encode(
17293            self,
17294            encoder: &mut fidl::encoding::Encoder<'_, D>,
17295            offset: usize,
17296            _depth: fidl::encoding::Depth,
17297        ) -> fidl::Result<()> {
17298            encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17299            // Delegate to tuple encoding.
17300            fidl::encoding::Encode::<PaddedUnionStruct, D>::encode(
17301                (<PaddedUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
17302                encoder,
17303                offset,
17304                _depth,
17305            )
17306        }
17307    }
17308    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedUnion, D>>
17309        fidl::encoding::Encode<PaddedUnionStruct, D> for (T0,)
17310    {
17311        #[inline]
17312        unsafe fn encode(
17313            self,
17314            encoder: &mut fidl::encoding::Encoder<'_, D>,
17315            offset: usize,
17316            depth: fidl::encoding::Depth,
17317        ) -> fidl::Result<()> {
17318            encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17319            // Zero out padding regions. There's no need to apply masks
17320            // because the unmasked parts will be overwritten by fields.
17321            // Write the fields.
17322            self.0.encode(encoder, offset + 0, depth)?;
17323            Ok(())
17324        }
17325    }
17326
17327    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnionStruct {
17328        #[inline(always)]
17329        fn new_empty() -> Self {
17330            Self { u: fidl::new_empty!(PaddedUnion, D) }
17331        }
17332
17333        #[inline]
17334        unsafe fn decode(
17335            &mut self,
17336            decoder: &mut fidl::encoding::Decoder<'_, D>,
17337            offset: usize,
17338            _depth: fidl::encoding::Depth,
17339        ) -> fidl::Result<()> {
17340            decoder.debug_check_bounds::<Self>(offset);
17341            // Verify that padding bytes are zero.
17342            fidl::decode!(PaddedUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
17343            Ok(())
17344        }
17345    }
17346
17347    impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17348        type Borrowed<'a> = &'a Self;
17349        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17350            value
17351        }
17352    }
17353
17354    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17355        type Owned = Self;
17356
17357        #[inline(always)]
17358        fn inline_align(_context: fidl::encoding::Context) -> usize {
17359            2
17360        }
17361
17362        #[inline(always)]
17363        fn inline_size(_context: fidl::encoding::Context) -> usize {
17364            6
17365        }
17366    }
17367
17368    unsafe impl<D: fidl::encoding::ResourceDialect>
17369        fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D>
17370        for &PaddingAlignment2MaskMayBe4Bytes
17371    {
17372        #[inline]
17373        unsafe fn encode(
17374            self,
17375            encoder: &mut fidl::encoding::Encoder<'_, D>,
17376            offset: usize,
17377            _depth: fidl::encoding::Depth,
17378        ) -> fidl::Result<()> {
17379            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17380            unsafe {
17381                // Copy the object into the buffer.
17382                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17383                (buf_ptr as *mut PaddingAlignment2MaskMayBe4Bytes)
17384                    .write_unaligned((self as *const PaddingAlignment2MaskMayBe4Bytes).read());
17385                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17386                // done second because the memcpy will write garbage to these bytes.
17387                let padding_ptr = buf_ptr.offset(0) as *mut u16;
17388                let padding_mask = 0xff00u16;
17389                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17390            }
17391            Ok(())
17392        }
17393    }
17394    unsafe impl<
17395        D: fidl::encoding::ResourceDialect,
17396        T0: fidl::encoding::Encode<u8, D>,
17397        T1: fidl::encoding::Encode<u16, D>,
17398        T2: fidl::encoding::Encode<u16, D>,
17399    > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D> for (T0, T1, T2)
17400    {
17401        #[inline]
17402        unsafe fn encode(
17403            self,
17404            encoder: &mut fidl::encoding::Encoder<'_, D>,
17405            offset: usize,
17406            depth: fidl::encoding::Depth,
17407        ) -> fidl::Result<()> {
17408            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17409            // Zero out padding regions. There's no need to apply masks
17410            // because the unmasked parts will be overwritten by fields.
17411            unsafe {
17412                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17413                (ptr as *mut u16).write_unaligned(0);
17414            }
17415            // Write the fields.
17416            self.0.encode(encoder, offset + 0, depth)?;
17417            self.1.encode(encoder, offset + 2, depth)?;
17418            self.2.encode(encoder, offset + 4, depth)?;
17419            Ok(())
17420        }
17421    }
17422
17423    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17424        for PaddingAlignment2MaskMayBe4Bytes
17425    {
17426        #[inline(always)]
17427        fn new_empty() -> Self {
17428            Self {
17429                a: fidl::new_empty!(u8, D),
17430                b: fidl::new_empty!(u16, D),
17431                c: fidl::new_empty!(u16, D),
17432            }
17433        }
17434
17435        #[inline]
17436        unsafe fn decode(
17437            &mut self,
17438            decoder: &mut fidl::encoding::Decoder<'_, D>,
17439            offset: usize,
17440            _depth: fidl::encoding::Depth,
17441        ) -> fidl::Result<()> {
17442            decoder.debug_check_bounds::<Self>(offset);
17443            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17444            // Verify that padding bytes are zero.
17445            let ptr = unsafe { buf_ptr.offset(0) };
17446            let padval = unsafe { (ptr as *const u16).read_unaligned() };
17447            let mask = 0xff00u16;
17448            let maskedval = padval & mask;
17449            if maskedval != 0 {
17450                return Err(fidl::Error::NonZeroPadding {
17451                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17452                });
17453            }
17454            // Copy from the buffer into the object.
17455            unsafe {
17456                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
17457            }
17458            Ok(())
17459        }
17460    }
17461
17462    impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17463        type Borrowed<'a> = &'a Self;
17464        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17465            value
17466        }
17467    }
17468
17469    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17470        type Owned = Self;
17471
17472        #[inline(always)]
17473        fn inline_align(_context: fidl::encoding::Context) -> usize {
17474            8
17475        }
17476
17477        #[inline(always)]
17478        fn inline_size(_context: fidl::encoding::Context) -> usize {
17479            16
17480        }
17481    }
17482
17483    unsafe impl<D: fidl::encoding::ResourceDialect>
17484        fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D>
17485        for &PaddingAlignment2MaskMayBe4BytesVector
17486    {
17487        #[inline]
17488        unsafe fn encode(
17489            self,
17490            encoder: &mut fidl::encoding::Encoder<'_, D>,
17491            offset: usize,
17492            _depth: fidl::encoding::Depth,
17493        ) -> fidl::Result<()> {
17494            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17495            // Delegate to tuple encoding.
17496            fidl::encoding::Encode::<PaddingAlignment2MaskMayBe4BytesVector, D>::encode(
17497                (
17498                    <fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17499                ),
17500                encoder, offset, _depth
17501            )
17502        }
17503    }
17504    unsafe impl<
17505        D: fidl::encoding::ResourceDialect,
17506        T0: fidl::encoding::Encode<
17507                fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17508                D,
17509            >,
17510    > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D> for (T0,)
17511    {
17512        #[inline]
17513        unsafe fn encode(
17514            self,
17515            encoder: &mut fidl::encoding::Encoder<'_, D>,
17516            offset: usize,
17517            depth: fidl::encoding::Depth,
17518        ) -> fidl::Result<()> {
17519            encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17520            // Zero out padding regions. There's no need to apply masks
17521            // because the unmasked parts will be overwritten by fields.
17522            // Write the fields.
17523            self.0.encode(encoder, offset + 0, depth)?;
17524            Ok(())
17525        }
17526    }
17527
17528    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17529        for PaddingAlignment2MaskMayBe4BytesVector
17530    {
17531        #[inline(always)]
17532        fn new_empty() -> Self {
17533            Self {
17534                v: fidl::new_empty!(
17535                    fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17536                    D
17537                ),
17538            }
17539        }
17540
17541        #[inline]
17542        unsafe fn decode(
17543            &mut self,
17544            decoder: &mut fidl::encoding::Decoder<'_, D>,
17545            offset: usize,
17546            _depth: fidl::encoding::Depth,
17547        ) -> fidl::Result<()> {
17548            decoder.debug_check_bounds::<Self>(offset);
17549            // Verify that padding bytes are zero.
17550            fidl::decode!(
17551                fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17552                D,
17553                &mut self.v,
17554                decoder,
17555                offset + 0,
17556                _depth
17557            )?;
17558            Ok(())
17559        }
17560    }
17561
17562    impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17563        type Borrowed<'a> = &'a Self;
17564        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17565            value
17566        }
17567    }
17568
17569    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17570        type Owned = Self;
17571
17572        #[inline(always)]
17573        fn inline_align(_context: fidl::encoding::Context) -> usize {
17574            4
17575        }
17576
17577        #[inline(always)]
17578        fn inline_size(_context: fidl::encoding::Context) -> usize {
17579            12
17580        }
17581    }
17582
17583    unsafe impl<D: fidl::encoding::ResourceDialect>
17584        fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D>
17585        for &PaddingAlignment4MaskMayBe8Bytes
17586    {
17587        #[inline]
17588        unsafe fn encode(
17589            self,
17590            encoder: &mut fidl::encoding::Encoder<'_, D>,
17591            offset: usize,
17592            _depth: fidl::encoding::Depth,
17593        ) -> fidl::Result<()> {
17594            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17595            unsafe {
17596                // Copy the object into the buffer.
17597                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17598                (buf_ptr as *mut PaddingAlignment4MaskMayBe8Bytes)
17599                    .write_unaligned((self as *const PaddingAlignment4MaskMayBe8Bytes).read());
17600                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17601                // done second because the memcpy will write garbage to these bytes.
17602                let padding_ptr = buf_ptr.offset(0) as *mut u32;
17603                let padding_mask = 0xffffff00u32;
17604                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17605            }
17606            Ok(())
17607        }
17608    }
17609    unsafe impl<
17610        D: fidl::encoding::ResourceDialect,
17611        T0: fidl::encoding::Encode<u8, D>,
17612        T1: fidl::encoding::Encode<u32, D>,
17613        T2: fidl::encoding::Encode<u32, D>,
17614    > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D> for (T0, T1, T2)
17615    {
17616        #[inline]
17617        unsafe fn encode(
17618            self,
17619            encoder: &mut fidl::encoding::Encoder<'_, D>,
17620            offset: usize,
17621            depth: fidl::encoding::Depth,
17622        ) -> fidl::Result<()> {
17623            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17624            // Zero out padding regions. There's no need to apply masks
17625            // because the unmasked parts will be overwritten by fields.
17626            unsafe {
17627                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17628                (ptr as *mut u32).write_unaligned(0);
17629            }
17630            // Write the fields.
17631            self.0.encode(encoder, offset + 0, depth)?;
17632            self.1.encode(encoder, offset + 4, depth)?;
17633            self.2.encode(encoder, offset + 8, depth)?;
17634            Ok(())
17635        }
17636    }
17637
17638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17639        for PaddingAlignment4MaskMayBe8Bytes
17640    {
17641        #[inline(always)]
17642        fn new_empty() -> Self {
17643            Self {
17644                a: fidl::new_empty!(u8, D),
17645                b: fidl::new_empty!(u32, D),
17646                c: fidl::new_empty!(u32, D),
17647            }
17648        }
17649
17650        #[inline]
17651        unsafe fn decode(
17652            &mut self,
17653            decoder: &mut fidl::encoding::Decoder<'_, D>,
17654            offset: usize,
17655            _depth: fidl::encoding::Depth,
17656        ) -> fidl::Result<()> {
17657            decoder.debug_check_bounds::<Self>(offset);
17658            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17659            // Verify that padding bytes are zero.
17660            let ptr = unsafe { buf_ptr.offset(0) };
17661            let padval = unsafe { (ptr as *const u32).read_unaligned() };
17662            let mask = 0xffffff00u32;
17663            let maskedval = padval & mask;
17664            if maskedval != 0 {
17665                return Err(fidl::Error::NonZeroPadding {
17666                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17667                });
17668            }
17669            // Copy from the buffer into the object.
17670            unsafe {
17671                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
17672            }
17673            Ok(())
17674        }
17675    }
17676
17677    impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17678        type Borrowed<'a> = &'a Self;
17679        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17680            value
17681        }
17682    }
17683
17684    unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17685        type Owned = Self;
17686
17687        #[inline(always)]
17688        fn inline_align(_context: fidl::encoding::Context) -> usize {
17689            8
17690        }
17691
17692        #[inline(always)]
17693        fn inline_size(_context: fidl::encoding::Context) -> usize {
17694            16
17695        }
17696    }
17697
17698    unsafe impl<D: fidl::encoding::ResourceDialect>
17699        fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D>
17700        for &PaddingAlignment4MaskMayBe8BytesVector
17701    {
17702        #[inline]
17703        unsafe fn encode(
17704            self,
17705            encoder: &mut fidl::encoding::Encoder<'_, D>,
17706            offset: usize,
17707            _depth: fidl::encoding::Depth,
17708        ) -> fidl::Result<()> {
17709            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17710            // Delegate to tuple encoding.
17711            fidl::encoding::Encode::<PaddingAlignment4MaskMayBe8BytesVector, D>::encode(
17712                (
17713                    <fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17714                ),
17715                encoder, offset, _depth
17716            )
17717        }
17718    }
17719    unsafe impl<
17720        D: fidl::encoding::ResourceDialect,
17721        T0: fidl::encoding::Encode<
17722                fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17723                D,
17724            >,
17725    > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D> for (T0,)
17726    {
17727        #[inline]
17728        unsafe fn encode(
17729            self,
17730            encoder: &mut fidl::encoding::Encoder<'_, D>,
17731            offset: usize,
17732            depth: fidl::encoding::Depth,
17733        ) -> fidl::Result<()> {
17734            encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17735            // Zero out padding regions. There's no need to apply masks
17736            // because the unmasked parts will be overwritten by fields.
17737            // Write the fields.
17738            self.0.encode(encoder, offset + 0, depth)?;
17739            Ok(())
17740        }
17741    }
17742
17743    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17744        for PaddingAlignment4MaskMayBe8BytesVector
17745    {
17746        #[inline(always)]
17747        fn new_empty() -> Self {
17748            Self {
17749                v: fidl::new_empty!(
17750                    fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17751                    D
17752                ),
17753            }
17754        }
17755
17756        #[inline]
17757        unsafe fn decode(
17758            &mut self,
17759            decoder: &mut fidl::encoding::Decoder<'_, D>,
17760            offset: usize,
17761            _depth: fidl::encoding::Depth,
17762        ) -> fidl::Result<()> {
17763            decoder.debug_check_bounds::<Self>(offset);
17764            // Verify that padding bytes are zero.
17765            fidl::decode!(
17766                fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17767                D,
17768                &mut self.v,
17769                decoder,
17770                offset + 0,
17771                _depth
17772            )?;
17773            Ok(())
17774        }
17775    }
17776
17777    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int32 {
17778        type Borrowed<'a> = &'a Self;
17779        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17780            value
17781        }
17782    }
17783
17784    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int32 {
17785        type Owned = Self;
17786
17787        #[inline(always)]
17788        fn inline_align(_context: fidl::encoding::Context) -> usize {
17789            4
17790        }
17791
17792        #[inline(always)]
17793        fn inline_size(_context: fidl::encoding::Context) -> usize {
17794            8
17795        }
17796    }
17797
17798    unsafe impl<D: fidl::encoding::ResourceDialect>
17799        fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D>
17800        for &PaddingBetweenFieldsInt16Int32
17801    {
17802        #[inline]
17803        unsafe fn encode(
17804            self,
17805            encoder: &mut fidl::encoding::Encoder<'_, D>,
17806            offset: usize,
17807            _depth: fidl::encoding::Depth,
17808        ) -> fidl::Result<()> {
17809            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17810            unsafe {
17811                // Copy the object into the buffer.
17812                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17813                (buf_ptr as *mut PaddingBetweenFieldsInt16Int32)
17814                    .write_unaligned((self as *const PaddingBetweenFieldsInt16Int32).read());
17815                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17816                // done second because the memcpy will write garbage to these bytes.
17817                let padding_ptr = buf_ptr.offset(0) as *mut u32;
17818                let padding_mask = 0xffff0000u32;
17819                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17820            }
17821            Ok(())
17822        }
17823    }
17824    unsafe impl<
17825        D: fidl::encoding::ResourceDialect,
17826        T0: fidl::encoding::Encode<i16, D>,
17827        T1: fidl::encoding::Encode<i32, D>,
17828    > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D> for (T0, T1)
17829    {
17830        #[inline]
17831        unsafe fn encode(
17832            self,
17833            encoder: &mut fidl::encoding::Encoder<'_, D>,
17834            offset: usize,
17835            depth: fidl::encoding::Depth,
17836        ) -> fidl::Result<()> {
17837            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17838            // Zero out padding regions. There's no need to apply masks
17839            // because the unmasked parts will be overwritten by fields.
17840            unsafe {
17841                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17842                (ptr as *mut u32).write_unaligned(0);
17843            }
17844            // Write the fields.
17845            self.0.encode(encoder, offset + 0, depth)?;
17846            self.1.encode(encoder, offset + 4, depth)?;
17847            Ok(())
17848        }
17849    }
17850
17851    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17852        for PaddingBetweenFieldsInt16Int32
17853    {
17854        #[inline(always)]
17855        fn new_empty() -> Self {
17856            Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i32, D) }
17857        }
17858
17859        #[inline]
17860        unsafe fn decode(
17861            &mut self,
17862            decoder: &mut fidl::encoding::Decoder<'_, D>,
17863            offset: usize,
17864            _depth: fidl::encoding::Depth,
17865        ) -> fidl::Result<()> {
17866            decoder.debug_check_bounds::<Self>(offset);
17867            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17868            // Verify that padding bytes are zero.
17869            let ptr = unsafe { buf_ptr.offset(0) };
17870            let padval = unsafe { (ptr as *const u32).read_unaligned() };
17871            let mask = 0xffff0000u32;
17872            let maskedval = padval & mask;
17873            if maskedval != 0 {
17874                return Err(fidl::Error::NonZeroPadding {
17875                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17876                });
17877            }
17878            // Copy from the buffer into the object.
17879            unsafe {
17880                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
17881            }
17882            Ok(())
17883        }
17884    }
17885
17886    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int64 {
17887        type Borrowed<'a> = &'a Self;
17888        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17889            value
17890        }
17891    }
17892
17893    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int64 {
17894        type Owned = Self;
17895
17896        #[inline(always)]
17897        fn inline_align(_context: fidl::encoding::Context) -> usize {
17898            8
17899        }
17900
17901        #[inline(always)]
17902        fn inline_size(_context: fidl::encoding::Context) -> usize {
17903            16
17904        }
17905    }
17906
17907    unsafe impl<D: fidl::encoding::ResourceDialect>
17908        fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D>
17909        for &PaddingBetweenFieldsInt16Int64
17910    {
17911        #[inline]
17912        unsafe fn encode(
17913            self,
17914            encoder: &mut fidl::encoding::Encoder<'_, D>,
17915            offset: usize,
17916            _depth: fidl::encoding::Depth,
17917        ) -> fidl::Result<()> {
17918            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17919            unsafe {
17920                // Copy the object into the buffer.
17921                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17922                (buf_ptr as *mut PaddingBetweenFieldsInt16Int64)
17923                    .write_unaligned((self as *const PaddingBetweenFieldsInt16Int64).read());
17924                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
17925                // done second because the memcpy will write garbage to these bytes.
17926                let padding_ptr = buf_ptr.offset(0) as *mut u64;
17927                let padding_mask = 0xffffffffffff0000u64;
17928                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17929            }
17930            Ok(())
17931        }
17932    }
17933    unsafe impl<
17934        D: fidl::encoding::ResourceDialect,
17935        T0: fidl::encoding::Encode<i16, D>,
17936        T1: fidl::encoding::Encode<i64, D>,
17937    > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D> for (T0, T1)
17938    {
17939        #[inline]
17940        unsafe fn encode(
17941            self,
17942            encoder: &mut fidl::encoding::Encoder<'_, D>,
17943            offset: usize,
17944            depth: fidl::encoding::Depth,
17945        ) -> fidl::Result<()> {
17946            encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17947            // Zero out padding regions. There's no need to apply masks
17948            // because the unmasked parts will be overwritten by fields.
17949            unsafe {
17950                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17951                (ptr as *mut u64).write_unaligned(0);
17952            }
17953            // Write the fields.
17954            self.0.encode(encoder, offset + 0, depth)?;
17955            self.1.encode(encoder, offset + 8, depth)?;
17956            Ok(())
17957        }
17958    }
17959
17960    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17961        for PaddingBetweenFieldsInt16Int64
17962    {
17963        #[inline(always)]
17964        fn new_empty() -> Self {
17965            Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i64, D) }
17966        }
17967
17968        #[inline]
17969        unsafe fn decode(
17970            &mut self,
17971            decoder: &mut fidl::encoding::Decoder<'_, D>,
17972            offset: usize,
17973            _depth: fidl::encoding::Depth,
17974        ) -> fidl::Result<()> {
17975            decoder.debug_check_bounds::<Self>(offset);
17976            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17977            // Verify that padding bytes are zero.
17978            let ptr = unsafe { buf_ptr.offset(0) };
17979            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17980            let mask = 0xffffffffffff0000u64;
17981            let maskedval = padval & mask;
17982            if maskedval != 0 {
17983                return Err(fidl::Error::NonZeroPadding {
17984                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17985                });
17986            }
17987            // Copy from the buffer into the object.
17988            unsafe {
17989                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
17990            }
17991            Ok(())
17992        }
17993    }
17994
17995    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt32Int64 {
17996        type Borrowed<'a> = &'a Self;
17997        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17998            value
17999        }
18000    }
18001
18002    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt32Int64 {
18003        type Owned = Self;
18004
18005        #[inline(always)]
18006        fn inline_align(_context: fidl::encoding::Context) -> usize {
18007            8
18008        }
18009
18010        #[inline(always)]
18011        fn inline_size(_context: fidl::encoding::Context) -> usize {
18012            16
18013        }
18014    }
18015
18016    unsafe impl<D: fidl::encoding::ResourceDialect>
18017        fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D>
18018        for &PaddingBetweenFieldsInt32Int64
18019    {
18020        #[inline]
18021        unsafe fn encode(
18022            self,
18023            encoder: &mut fidl::encoding::Encoder<'_, D>,
18024            offset: usize,
18025            _depth: fidl::encoding::Depth,
18026        ) -> fidl::Result<()> {
18027            encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
18028            unsafe {
18029                // Copy the object into the buffer.
18030                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18031                (buf_ptr as *mut PaddingBetweenFieldsInt32Int64)
18032                    .write_unaligned((self as *const PaddingBetweenFieldsInt32Int64).read());
18033                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18034                // done second because the memcpy will write garbage to these bytes.
18035                let padding_ptr = buf_ptr.offset(0) as *mut u64;
18036                let padding_mask = 0xffffffff00000000u64;
18037                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18038            }
18039            Ok(())
18040        }
18041    }
18042    unsafe impl<
18043        D: fidl::encoding::ResourceDialect,
18044        T0: fidl::encoding::Encode<i32, D>,
18045        T1: fidl::encoding::Encode<i64, D>,
18046    > fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D> for (T0, T1)
18047    {
18048        #[inline]
18049        unsafe fn encode(
18050            self,
18051            encoder: &mut fidl::encoding::Encoder<'_, D>,
18052            offset: usize,
18053            depth: fidl::encoding::Depth,
18054        ) -> fidl::Result<()> {
18055            encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
18056            // Zero out padding regions. There's no need to apply masks
18057            // because the unmasked parts will be overwritten by fields.
18058            unsafe {
18059                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18060                (ptr as *mut u64).write_unaligned(0);
18061            }
18062            // Write the fields.
18063            self.0.encode(encoder, offset + 0, depth)?;
18064            self.1.encode(encoder, offset + 8, depth)?;
18065            Ok(())
18066        }
18067    }
18068
18069    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18070        for PaddingBetweenFieldsInt32Int64
18071    {
18072        #[inline(always)]
18073        fn new_empty() -> Self {
18074            Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i64, D) }
18075        }
18076
18077        #[inline]
18078        unsafe fn decode(
18079            &mut self,
18080            decoder: &mut fidl::encoding::Decoder<'_, D>,
18081            offset: usize,
18082            _depth: fidl::encoding::Depth,
18083        ) -> fidl::Result<()> {
18084            decoder.debug_check_bounds::<Self>(offset);
18085            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18086            // Verify that padding bytes are zero.
18087            let ptr = unsafe { buf_ptr.offset(0) };
18088            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18089            let mask = 0xffffffff00000000u64;
18090            let maskedval = padval & mask;
18091            if maskedval != 0 {
18092                return Err(fidl::Error::NonZeroPadding {
18093                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18094                });
18095            }
18096            // Copy from the buffer into the object.
18097            unsafe {
18098                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
18099            }
18100            Ok(())
18101        }
18102    }
18103
18104    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int16 {
18105        type Borrowed<'a> = &'a Self;
18106        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18107            value
18108        }
18109    }
18110
18111    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int16 {
18112        type Owned = Self;
18113
18114        #[inline(always)]
18115        fn inline_align(_context: fidl::encoding::Context) -> usize {
18116            2
18117        }
18118
18119        #[inline(always)]
18120        fn inline_size(_context: fidl::encoding::Context) -> usize {
18121            4
18122        }
18123    }
18124
18125    unsafe impl<D: fidl::encoding::ResourceDialect>
18126        fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D>
18127        for &PaddingBetweenFieldsInt8Int16
18128    {
18129        #[inline]
18130        unsafe fn encode(
18131            self,
18132            encoder: &mut fidl::encoding::Encoder<'_, D>,
18133            offset: usize,
18134            _depth: fidl::encoding::Depth,
18135        ) -> fidl::Result<()> {
18136            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
18137            unsafe {
18138                // Copy the object into the buffer.
18139                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18140                (buf_ptr as *mut PaddingBetweenFieldsInt8Int16)
18141                    .write_unaligned((self as *const PaddingBetweenFieldsInt8Int16).read());
18142                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18143                // done second because the memcpy will write garbage to these bytes.
18144                let padding_ptr = buf_ptr.offset(0) as *mut u16;
18145                let padding_mask = 0xff00u16;
18146                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18147            }
18148            Ok(())
18149        }
18150    }
18151    unsafe impl<
18152        D: fidl::encoding::ResourceDialect,
18153        T0: fidl::encoding::Encode<i8, D>,
18154        T1: fidl::encoding::Encode<i16, D>,
18155    > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D> for (T0, T1)
18156    {
18157        #[inline]
18158        unsafe fn encode(
18159            self,
18160            encoder: &mut fidl::encoding::Encoder<'_, D>,
18161            offset: usize,
18162            depth: fidl::encoding::Depth,
18163        ) -> fidl::Result<()> {
18164            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
18165            // Zero out padding regions. There's no need to apply masks
18166            // because the unmasked parts will be overwritten by fields.
18167            unsafe {
18168                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18169                (ptr as *mut u16).write_unaligned(0);
18170            }
18171            // Write the fields.
18172            self.0.encode(encoder, offset + 0, depth)?;
18173            self.1.encode(encoder, offset + 2, depth)?;
18174            Ok(())
18175        }
18176    }
18177
18178    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18179        for PaddingBetweenFieldsInt8Int16
18180    {
18181        #[inline(always)]
18182        fn new_empty() -> Self {
18183            Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i16, D) }
18184        }
18185
18186        #[inline]
18187        unsafe fn decode(
18188            &mut self,
18189            decoder: &mut fidl::encoding::Decoder<'_, D>,
18190            offset: usize,
18191            _depth: fidl::encoding::Depth,
18192        ) -> fidl::Result<()> {
18193            decoder.debug_check_bounds::<Self>(offset);
18194            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18195            // Verify that padding bytes are zero.
18196            let ptr = unsafe { buf_ptr.offset(0) };
18197            let padval = unsafe { (ptr as *const u16).read_unaligned() };
18198            let mask = 0xff00u16;
18199            let maskedval = padval & mask;
18200            if maskedval != 0 {
18201                return Err(fidl::Error::NonZeroPadding {
18202                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18203                });
18204            }
18205            // Copy from the buffer into the object.
18206            unsafe {
18207                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18208            }
18209            Ok(())
18210        }
18211    }
18212
18213    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int32 {
18214        type Borrowed<'a> = &'a Self;
18215        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18216            value
18217        }
18218    }
18219
18220    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int32 {
18221        type Owned = Self;
18222
18223        #[inline(always)]
18224        fn inline_align(_context: fidl::encoding::Context) -> usize {
18225            4
18226        }
18227
18228        #[inline(always)]
18229        fn inline_size(_context: fidl::encoding::Context) -> usize {
18230            8
18231        }
18232    }
18233
18234    unsafe impl<D: fidl::encoding::ResourceDialect>
18235        fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D>
18236        for &PaddingBetweenFieldsInt8Int32
18237    {
18238        #[inline]
18239        unsafe fn encode(
18240            self,
18241            encoder: &mut fidl::encoding::Encoder<'_, D>,
18242            offset: usize,
18243            _depth: fidl::encoding::Depth,
18244        ) -> fidl::Result<()> {
18245            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18246            unsafe {
18247                // Copy the object into the buffer.
18248                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18249                (buf_ptr as *mut PaddingBetweenFieldsInt8Int32)
18250                    .write_unaligned((self as *const PaddingBetweenFieldsInt8Int32).read());
18251                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18252                // done second because the memcpy will write garbage to these bytes.
18253                let padding_ptr = buf_ptr.offset(0) as *mut u32;
18254                let padding_mask = 0xffffff00u32;
18255                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18256            }
18257            Ok(())
18258        }
18259    }
18260    unsafe impl<
18261        D: fidl::encoding::ResourceDialect,
18262        T0: fidl::encoding::Encode<i8, D>,
18263        T1: fidl::encoding::Encode<i32, D>,
18264    > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D> for (T0, T1)
18265    {
18266        #[inline]
18267        unsafe fn encode(
18268            self,
18269            encoder: &mut fidl::encoding::Encoder<'_, D>,
18270            offset: usize,
18271            depth: fidl::encoding::Depth,
18272        ) -> fidl::Result<()> {
18273            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18274            // Zero out padding regions. There's no need to apply masks
18275            // because the unmasked parts will be overwritten by fields.
18276            unsafe {
18277                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18278                (ptr as *mut u32).write_unaligned(0);
18279            }
18280            // Write the fields.
18281            self.0.encode(encoder, offset + 0, depth)?;
18282            self.1.encode(encoder, offset + 4, depth)?;
18283            Ok(())
18284        }
18285    }
18286
18287    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18288        for PaddingBetweenFieldsInt8Int32
18289    {
18290        #[inline(always)]
18291        fn new_empty() -> Self {
18292            Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i32, D) }
18293        }
18294
18295        #[inline]
18296        unsafe fn decode(
18297            &mut self,
18298            decoder: &mut fidl::encoding::Decoder<'_, D>,
18299            offset: usize,
18300            _depth: fidl::encoding::Depth,
18301        ) -> fidl::Result<()> {
18302            decoder.debug_check_bounds::<Self>(offset);
18303            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18304            // Verify that padding bytes are zero.
18305            let ptr = unsafe { buf_ptr.offset(0) };
18306            let padval = unsafe { (ptr as *const u32).read_unaligned() };
18307            let mask = 0xffffff00u32;
18308            let maskedval = padval & mask;
18309            if maskedval != 0 {
18310                return Err(fidl::Error::NonZeroPadding {
18311                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18312                });
18313            }
18314            // Copy from the buffer into the object.
18315            unsafe {
18316                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18317            }
18318            Ok(())
18319        }
18320    }
18321
18322    impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int64 {
18323        type Borrowed<'a> = &'a Self;
18324        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18325            value
18326        }
18327    }
18328
18329    unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int64 {
18330        type Owned = Self;
18331
18332        #[inline(always)]
18333        fn inline_align(_context: fidl::encoding::Context) -> usize {
18334            8
18335        }
18336
18337        #[inline(always)]
18338        fn inline_size(_context: fidl::encoding::Context) -> usize {
18339            16
18340        }
18341    }
18342
18343    unsafe impl<D: fidl::encoding::ResourceDialect>
18344        fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D>
18345        for &PaddingBetweenFieldsInt8Int64
18346    {
18347        #[inline]
18348        unsafe fn encode(
18349            self,
18350            encoder: &mut fidl::encoding::Encoder<'_, D>,
18351            offset: usize,
18352            _depth: fidl::encoding::Depth,
18353        ) -> fidl::Result<()> {
18354            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18355            unsafe {
18356                // Copy the object into the buffer.
18357                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18358                (buf_ptr as *mut PaddingBetweenFieldsInt8Int64)
18359                    .write_unaligned((self as *const PaddingBetweenFieldsInt8Int64).read());
18360                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18361                // done second because the memcpy will write garbage to these bytes.
18362                let padding_ptr = buf_ptr.offset(0) as *mut u64;
18363                let padding_mask = 0xffffffffffffff00u64;
18364                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18365            }
18366            Ok(())
18367        }
18368    }
18369    unsafe impl<
18370        D: fidl::encoding::ResourceDialect,
18371        T0: fidl::encoding::Encode<i8, D>,
18372        T1: fidl::encoding::Encode<i64, D>,
18373    > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D> for (T0, T1)
18374    {
18375        #[inline]
18376        unsafe fn encode(
18377            self,
18378            encoder: &mut fidl::encoding::Encoder<'_, D>,
18379            offset: usize,
18380            depth: fidl::encoding::Depth,
18381        ) -> fidl::Result<()> {
18382            encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18383            // Zero out padding regions. There's no need to apply masks
18384            // because the unmasked parts will be overwritten by fields.
18385            unsafe {
18386                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18387                (ptr as *mut u64).write_unaligned(0);
18388            }
18389            // Write the fields.
18390            self.0.encode(encoder, offset + 0, depth)?;
18391            self.1.encode(encoder, offset + 8, depth)?;
18392            Ok(())
18393        }
18394    }
18395
18396    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18397        for PaddingBetweenFieldsInt8Int64
18398    {
18399        #[inline(always)]
18400        fn new_empty() -> Self {
18401            Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i64, D) }
18402        }
18403
18404        #[inline]
18405        unsafe fn decode(
18406            &mut self,
18407            decoder: &mut fidl::encoding::Decoder<'_, D>,
18408            offset: usize,
18409            _depth: fidl::encoding::Depth,
18410        ) -> fidl::Result<()> {
18411            decoder.debug_check_bounds::<Self>(offset);
18412            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18413            // Verify that padding bytes are zero.
18414            let ptr = unsafe { buf_ptr.offset(0) };
18415            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18416            let mask = 0xffffffffffffff00u64;
18417            let maskedval = padval & mask;
18418            if maskedval != 0 {
18419                return Err(fidl::Error::NonZeroPadding {
18420                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18421                });
18422            }
18423            // Copy from the buffer into the object.
18424            unsafe {
18425                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
18426            }
18427            Ok(())
18428        }
18429    }
18430
18431    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject1Byte {
18432        type Borrowed<'a> = &'a Self;
18433        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18434            value
18435        }
18436    }
18437
18438    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject1Byte {
18439        type Owned = Self;
18440
18441        #[inline(always)]
18442        fn inline_align(_context: fidl::encoding::Context) -> usize {
18443            1
18444        }
18445
18446        #[inline(always)]
18447        fn inline_size(_context: fidl::encoding::Context) -> usize {
18448            1
18449        }
18450        #[inline(always)]
18451        fn encode_is_copy() -> bool {
18452            true
18453        }
18454
18455        #[inline(always)]
18456        fn decode_is_copy() -> bool {
18457            true
18458        }
18459    }
18460
18461    unsafe impl<D: fidl::encoding::ResourceDialect>
18462        fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D>
18463        for &PaddingEndOfInlineObject1Byte
18464    {
18465        #[inline]
18466        unsafe fn encode(
18467            self,
18468            encoder: &mut fidl::encoding::Encoder<'_, D>,
18469            offset: usize,
18470            _depth: fidl::encoding::Depth,
18471        ) -> fidl::Result<()> {
18472            encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18473            unsafe {
18474                // Copy the object into the buffer.
18475                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18476                (buf_ptr as *mut PaddingEndOfInlineObject1Byte)
18477                    .write_unaligned((self as *const PaddingEndOfInlineObject1Byte).read());
18478                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18479                // done second because the memcpy will write garbage to these bytes.
18480            }
18481            Ok(())
18482        }
18483    }
18484    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct1Byte, D>>
18485        fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D> for (T0,)
18486    {
18487        #[inline]
18488        unsafe fn encode(
18489            self,
18490            encoder: &mut fidl::encoding::Encoder<'_, D>,
18491            offset: usize,
18492            depth: fidl::encoding::Depth,
18493        ) -> fidl::Result<()> {
18494            encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18495            // Zero out padding regions. There's no need to apply masks
18496            // because the unmasked parts will be overwritten by fields.
18497            // Write the fields.
18498            self.0.encode(encoder, offset + 0, depth)?;
18499            Ok(())
18500        }
18501    }
18502
18503    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18504        for PaddingEndOfInlineObject1Byte
18505    {
18506        #[inline(always)]
18507        fn new_empty() -> Self {
18508            Self { a: fidl::new_empty!(Struct1Byte, D) }
18509        }
18510
18511        #[inline]
18512        unsafe fn decode(
18513            &mut self,
18514            decoder: &mut fidl::encoding::Decoder<'_, D>,
18515            offset: usize,
18516            _depth: fidl::encoding::Depth,
18517        ) -> fidl::Result<()> {
18518            decoder.debug_check_bounds::<Self>(offset);
18519            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18520            // Verify that padding bytes are zero.
18521            // Copy from the buffer into the object.
18522            unsafe {
18523                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
18524            }
18525            Ok(())
18526        }
18527    }
18528
18529    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject2Byte {
18530        type Borrowed<'a> = &'a Self;
18531        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18532            value
18533        }
18534    }
18535
18536    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject2Byte {
18537        type Owned = Self;
18538
18539        #[inline(always)]
18540        fn inline_align(_context: fidl::encoding::Context) -> usize {
18541            2
18542        }
18543
18544        #[inline(always)]
18545        fn inline_size(_context: fidl::encoding::Context) -> usize {
18546            2
18547        }
18548        #[inline(always)]
18549        fn encode_is_copy() -> bool {
18550            true
18551        }
18552
18553        #[inline(always)]
18554        fn decode_is_copy() -> bool {
18555            true
18556        }
18557    }
18558
18559    unsafe impl<D: fidl::encoding::ResourceDialect>
18560        fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D>
18561        for &PaddingEndOfInlineObject2Byte
18562    {
18563        #[inline]
18564        unsafe fn encode(
18565            self,
18566            encoder: &mut fidl::encoding::Encoder<'_, D>,
18567            offset: usize,
18568            _depth: fidl::encoding::Depth,
18569        ) -> fidl::Result<()> {
18570            encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18571            unsafe {
18572                // Copy the object into the buffer.
18573                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18574                (buf_ptr as *mut PaddingEndOfInlineObject2Byte)
18575                    .write_unaligned((self as *const PaddingEndOfInlineObject2Byte).read());
18576                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18577                // done second because the memcpy will write garbage to these bytes.
18578            }
18579            Ok(())
18580        }
18581    }
18582    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct2Byte, D>>
18583        fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D> for (T0,)
18584    {
18585        #[inline]
18586        unsafe fn encode(
18587            self,
18588            encoder: &mut fidl::encoding::Encoder<'_, D>,
18589            offset: usize,
18590            depth: fidl::encoding::Depth,
18591        ) -> fidl::Result<()> {
18592            encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18593            // Zero out padding regions. There's no need to apply masks
18594            // because the unmasked parts will be overwritten by fields.
18595            // Write the fields.
18596            self.0.encode(encoder, offset + 0, depth)?;
18597            Ok(())
18598        }
18599    }
18600
18601    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18602        for PaddingEndOfInlineObject2Byte
18603    {
18604        #[inline(always)]
18605        fn new_empty() -> Self {
18606            Self { a: fidl::new_empty!(Struct2Byte, D) }
18607        }
18608
18609        #[inline]
18610        unsafe fn decode(
18611            &mut self,
18612            decoder: &mut fidl::encoding::Decoder<'_, D>,
18613            offset: usize,
18614            _depth: fidl::encoding::Depth,
18615        ) -> fidl::Result<()> {
18616            decoder.debug_check_bounds::<Self>(offset);
18617            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18618            // Verify that padding bytes are zero.
18619            // Copy from the buffer into the object.
18620            unsafe {
18621                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
18622            }
18623            Ok(())
18624        }
18625    }
18626
18627    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject3Byte {
18628        type Borrowed<'a> = &'a Self;
18629        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18630            value
18631        }
18632    }
18633
18634    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject3Byte {
18635        type Owned = Self;
18636
18637        #[inline(always)]
18638        fn inline_align(_context: fidl::encoding::Context) -> usize {
18639            2
18640        }
18641
18642        #[inline(always)]
18643        fn inline_size(_context: fidl::encoding::Context) -> usize {
18644            4
18645        }
18646    }
18647
18648    unsafe impl<D: fidl::encoding::ResourceDialect>
18649        fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D>
18650        for &PaddingEndOfInlineObject3Byte
18651    {
18652        #[inline]
18653        unsafe fn encode(
18654            self,
18655            encoder: &mut fidl::encoding::Encoder<'_, D>,
18656            offset: usize,
18657            _depth: fidl::encoding::Depth,
18658        ) -> fidl::Result<()> {
18659            encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18660            unsafe {
18661                // Copy the object into the buffer.
18662                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18663                (buf_ptr as *mut PaddingEndOfInlineObject3Byte)
18664                    .write_unaligned((self as *const PaddingEndOfInlineObject3Byte).read());
18665                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18666                // done second because the memcpy will write garbage to these bytes.
18667                let padding_ptr = buf_ptr.offset(2) as *mut u16;
18668                let padding_mask = 0xff00u16;
18669                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18670            }
18671            Ok(())
18672        }
18673    }
18674    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct3Byte, D>>
18675        fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D> for (T0,)
18676    {
18677        #[inline]
18678        unsafe fn encode(
18679            self,
18680            encoder: &mut fidl::encoding::Encoder<'_, D>,
18681            offset: usize,
18682            depth: fidl::encoding::Depth,
18683        ) -> fidl::Result<()> {
18684            encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18685            // Zero out padding regions. There's no need to apply masks
18686            // because the unmasked parts will be overwritten by fields.
18687            // Write the fields.
18688            self.0.encode(encoder, offset + 0, depth)?;
18689            Ok(())
18690        }
18691    }
18692
18693    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18694        for PaddingEndOfInlineObject3Byte
18695    {
18696        #[inline(always)]
18697        fn new_empty() -> Self {
18698            Self { a: fidl::new_empty!(Struct3Byte, D) }
18699        }
18700
18701        #[inline]
18702        unsafe fn decode(
18703            &mut self,
18704            decoder: &mut fidl::encoding::Decoder<'_, D>,
18705            offset: usize,
18706            _depth: fidl::encoding::Depth,
18707        ) -> fidl::Result<()> {
18708            decoder.debug_check_bounds::<Self>(offset);
18709            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18710            // Verify that padding bytes are zero.
18711            let ptr = unsafe { buf_ptr.offset(2) };
18712            let padval = unsafe { (ptr as *const u16).read_unaligned() };
18713            let mask = 0xff00u16;
18714            let maskedval = padval & mask;
18715            if maskedval != 0 {
18716                return Err(fidl::Error::NonZeroPadding {
18717                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
18718                });
18719            }
18720            // Copy from the buffer into the object.
18721            unsafe {
18722                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18723            }
18724            Ok(())
18725        }
18726    }
18727
18728    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject4Byte {
18729        type Borrowed<'a> = &'a Self;
18730        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18731            value
18732        }
18733    }
18734
18735    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject4Byte {
18736        type Owned = Self;
18737
18738        #[inline(always)]
18739        fn inline_align(_context: fidl::encoding::Context) -> usize {
18740            4
18741        }
18742
18743        #[inline(always)]
18744        fn inline_size(_context: fidl::encoding::Context) -> usize {
18745            4
18746        }
18747        #[inline(always)]
18748        fn encode_is_copy() -> bool {
18749            true
18750        }
18751
18752        #[inline(always)]
18753        fn decode_is_copy() -> bool {
18754            true
18755        }
18756    }
18757
18758    unsafe impl<D: fidl::encoding::ResourceDialect>
18759        fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D>
18760        for &PaddingEndOfInlineObject4Byte
18761    {
18762        #[inline]
18763        unsafe fn encode(
18764            self,
18765            encoder: &mut fidl::encoding::Encoder<'_, D>,
18766            offset: usize,
18767            _depth: fidl::encoding::Depth,
18768        ) -> fidl::Result<()> {
18769            encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18770            unsafe {
18771                // Copy the object into the buffer.
18772                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18773                (buf_ptr as *mut PaddingEndOfInlineObject4Byte)
18774                    .write_unaligned((self as *const PaddingEndOfInlineObject4Byte).read());
18775                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18776                // done second because the memcpy will write garbage to these bytes.
18777            }
18778            Ok(())
18779        }
18780    }
18781    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct4Byte, D>>
18782        fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D> for (T0,)
18783    {
18784        #[inline]
18785        unsafe fn encode(
18786            self,
18787            encoder: &mut fidl::encoding::Encoder<'_, D>,
18788            offset: usize,
18789            depth: fidl::encoding::Depth,
18790        ) -> fidl::Result<()> {
18791            encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18792            // Zero out padding regions. There's no need to apply masks
18793            // because the unmasked parts will be overwritten by fields.
18794            // Write the fields.
18795            self.0.encode(encoder, offset + 0, depth)?;
18796            Ok(())
18797        }
18798    }
18799
18800    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18801        for PaddingEndOfInlineObject4Byte
18802    {
18803        #[inline(always)]
18804        fn new_empty() -> Self {
18805            Self { a: fidl::new_empty!(Struct4Byte, D) }
18806        }
18807
18808        #[inline]
18809        unsafe fn decode(
18810            &mut self,
18811            decoder: &mut fidl::encoding::Decoder<'_, D>,
18812            offset: usize,
18813            _depth: fidl::encoding::Depth,
18814        ) -> fidl::Result<()> {
18815            decoder.debug_check_bounds::<Self>(offset);
18816            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18817            // Verify that padding bytes are zero.
18818            // Copy from the buffer into the object.
18819            unsafe {
18820                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18821            }
18822            Ok(())
18823        }
18824    }
18825
18826    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject5Byte {
18827        type Borrowed<'a> = &'a Self;
18828        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18829            value
18830        }
18831    }
18832
18833    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject5Byte {
18834        type Owned = Self;
18835
18836        #[inline(always)]
18837        fn inline_align(_context: fidl::encoding::Context) -> usize {
18838            4
18839        }
18840
18841        #[inline(always)]
18842        fn inline_size(_context: fidl::encoding::Context) -> usize {
18843            8
18844        }
18845    }
18846
18847    unsafe impl<D: fidl::encoding::ResourceDialect>
18848        fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D>
18849        for &PaddingEndOfInlineObject5Byte
18850    {
18851        #[inline]
18852        unsafe fn encode(
18853            self,
18854            encoder: &mut fidl::encoding::Encoder<'_, D>,
18855            offset: usize,
18856            _depth: fidl::encoding::Depth,
18857        ) -> fidl::Result<()> {
18858            encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18859            unsafe {
18860                // Copy the object into the buffer.
18861                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18862                (buf_ptr as *mut PaddingEndOfInlineObject5Byte)
18863                    .write_unaligned((self as *const PaddingEndOfInlineObject5Byte).read());
18864                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18865                // done second because the memcpy will write garbage to these bytes.
18866                let padding_ptr = buf_ptr.offset(4) as *mut u32;
18867                let padding_mask = 0xffffff00u32;
18868                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18869            }
18870            Ok(())
18871        }
18872    }
18873    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct5Byte, D>>
18874        fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D> for (T0,)
18875    {
18876        #[inline]
18877        unsafe fn encode(
18878            self,
18879            encoder: &mut fidl::encoding::Encoder<'_, D>,
18880            offset: usize,
18881            depth: fidl::encoding::Depth,
18882        ) -> fidl::Result<()> {
18883            encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18884            // Zero out padding regions. There's no need to apply masks
18885            // because the unmasked parts will be overwritten by fields.
18886            // Write the fields.
18887            self.0.encode(encoder, offset + 0, depth)?;
18888            Ok(())
18889        }
18890    }
18891
18892    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18893        for PaddingEndOfInlineObject5Byte
18894    {
18895        #[inline(always)]
18896        fn new_empty() -> Self {
18897            Self { a: fidl::new_empty!(Struct5Byte, D) }
18898        }
18899
18900        #[inline]
18901        unsafe fn decode(
18902            &mut self,
18903            decoder: &mut fidl::encoding::Decoder<'_, D>,
18904            offset: usize,
18905            _depth: fidl::encoding::Depth,
18906        ) -> fidl::Result<()> {
18907            decoder.debug_check_bounds::<Self>(offset);
18908            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18909            // Verify that padding bytes are zero.
18910            let ptr = unsafe { buf_ptr.offset(4) };
18911            let padval = unsafe { (ptr as *const u32).read_unaligned() };
18912            let mask = 0xffffff00u32;
18913            let maskedval = padval & mask;
18914            if maskedval != 0 {
18915                return Err(fidl::Error::NonZeroPadding {
18916                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18917                });
18918            }
18919            // Copy from the buffer into the object.
18920            unsafe {
18921                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18922            }
18923            Ok(())
18924        }
18925    }
18926
18927    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject6Byte {
18928        type Borrowed<'a> = &'a Self;
18929        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18930            value
18931        }
18932    }
18933
18934    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject6Byte {
18935        type Owned = Self;
18936
18937        #[inline(always)]
18938        fn inline_align(_context: fidl::encoding::Context) -> usize {
18939            4
18940        }
18941
18942        #[inline(always)]
18943        fn inline_size(_context: fidl::encoding::Context) -> usize {
18944            8
18945        }
18946    }
18947
18948    unsafe impl<D: fidl::encoding::ResourceDialect>
18949        fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D>
18950        for &PaddingEndOfInlineObject6Byte
18951    {
18952        #[inline]
18953        unsafe fn encode(
18954            self,
18955            encoder: &mut fidl::encoding::Encoder<'_, D>,
18956            offset: usize,
18957            _depth: fidl::encoding::Depth,
18958        ) -> fidl::Result<()> {
18959            encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18960            unsafe {
18961                // Copy the object into the buffer.
18962                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18963                (buf_ptr as *mut PaddingEndOfInlineObject6Byte)
18964                    .write_unaligned((self as *const PaddingEndOfInlineObject6Byte).read());
18965                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
18966                // done second because the memcpy will write garbage to these bytes.
18967                let padding_ptr = buf_ptr.offset(4) as *mut u32;
18968                let padding_mask = 0xffff0000u32;
18969                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18970            }
18971            Ok(())
18972        }
18973    }
18974    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct6Byte, D>>
18975        fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D> for (T0,)
18976    {
18977        #[inline]
18978        unsafe fn encode(
18979            self,
18980            encoder: &mut fidl::encoding::Encoder<'_, D>,
18981            offset: usize,
18982            depth: fidl::encoding::Depth,
18983        ) -> fidl::Result<()> {
18984            encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18985            // Zero out padding regions. There's no need to apply masks
18986            // because the unmasked parts will be overwritten by fields.
18987            // Write the fields.
18988            self.0.encode(encoder, offset + 0, depth)?;
18989            Ok(())
18990        }
18991    }
18992
18993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18994        for PaddingEndOfInlineObject6Byte
18995    {
18996        #[inline(always)]
18997        fn new_empty() -> Self {
18998            Self { a: fidl::new_empty!(Struct6Byte, D) }
18999        }
19000
19001        #[inline]
19002        unsafe fn decode(
19003            &mut self,
19004            decoder: &mut fidl::encoding::Decoder<'_, D>,
19005            offset: usize,
19006            _depth: fidl::encoding::Depth,
19007        ) -> fidl::Result<()> {
19008            decoder.debug_check_bounds::<Self>(offset);
19009            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
19010            // Verify that padding bytes are zero.
19011            let ptr = unsafe { buf_ptr.offset(4) };
19012            let padval = unsafe { (ptr as *const u32).read_unaligned() };
19013            let mask = 0xffff0000u32;
19014            let maskedval = padval & mask;
19015            if maskedval != 0 {
19016                return Err(fidl::Error::NonZeroPadding {
19017                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
19018                });
19019            }
19020            // Copy from the buffer into the object.
19021            unsafe {
19022                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
19023            }
19024            Ok(())
19025        }
19026    }
19027
19028    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject7Byte {
19029        type Borrowed<'a> = &'a Self;
19030        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19031            value
19032        }
19033    }
19034
19035    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject7Byte {
19036        type Owned = Self;
19037
19038        #[inline(always)]
19039        fn inline_align(_context: fidl::encoding::Context) -> usize {
19040            4
19041        }
19042
19043        #[inline(always)]
19044        fn inline_size(_context: fidl::encoding::Context) -> usize {
19045            8
19046        }
19047    }
19048
19049    unsafe impl<D: fidl::encoding::ResourceDialect>
19050        fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D>
19051        for &PaddingEndOfInlineObject7Byte
19052    {
19053        #[inline]
19054        unsafe fn encode(
19055            self,
19056            encoder: &mut fidl::encoding::Encoder<'_, D>,
19057            offset: usize,
19058            _depth: fidl::encoding::Depth,
19059        ) -> fidl::Result<()> {
19060            encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
19061            unsafe {
19062                // Copy the object into the buffer.
19063                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
19064                (buf_ptr as *mut PaddingEndOfInlineObject7Byte)
19065                    .write_unaligned((self as *const PaddingEndOfInlineObject7Byte).read());
19066                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
19067                // done second because the memcpy will write garbage to these bytes.
19068                let padding_ptr = buf_ptr.offset(4) as *mut u32;
19069                let padding_mask = 0xff000000u32;
19070                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
19071            }
19072            Ok(())
19073        }
19074    }
19075    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct7Byte, D>>
19076        fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D> for (T0,)
19077    {
19078        #[inline]
19079        unsafe fn encode(
19080            self,
19081            encoder: &mut fidl::encoding::Encoder<'_, D>,
19082            offset: usize,
19083            depth: fidl::encoding::Depth,
19084        ) -> fidl::Result<()> {
19085            encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
19086            // Zero out padding regions. There's no need to apply masks
19087            // because the unmasked parts will be overwritten by fields.
19088            // Write the fields.
19089            self.0.encode(encoder, offset + 0, depth)?;
19090            Ok(())
19091        }
19092    }
19093
19094    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19095        for PaddingEndOfInlineObject7Byte
19096    {
19097        #[inline(always)]
19098        fn new_empty() -> Self {
19099            Self { a: fidl::new_empty!(Struct7Byte, D) }
19100        }
19101
19102        #[inline]
19103        unsafe fn decode(
19104            &mut self,
19105            decoder: &mut fidl::encoding::Decoder<'_, D>,
19106            offset: usize,
19107            _depth: fidl::encoding::Depth,
19108        ) -> fidl::Result<()> {
19109            decoder.debug_check_bounds::<Self>(offset);
19110            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
19111            // Verify that padding bytes are zero.
19112            let ptr = unsafe { buf_ptr.offset(4) };
19113            let padval = unsafe { (ptr as *const u32).read_unaligned() };
19114            let mask = 0xff000000u32;
19115            let maskedval = padval & mask;
19116            if maskedval != 0 {
19117                return Err(fidl::Error::NonZeroPadding {
19118                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
19119                });
19120            }
19121            // Copy from the buffer into the object.
19122            unsafe {
19123                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
19124            }
19125            Ok(())
19126        }
19127    }
19128
19129    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
19130        type Borrowed<'a> = &'a Self;
19131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19132            value
19133        }
19134    }
19135
19136    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
19137        type Owned = Self;
19138
19139        #[inline(always)]
19140        fn inline_align(_context: fidl::encoding::Context) -> usize {
19141            8
19142        }
19143
19144        #[inline(always)]
19145        fn inline_size(_context: fidl::encoding::Context) -> usize {
19146            16
19147        }
19148    }
19149
19150    unsafe impl<D: fidl::encoding::ResourceDialect>
19151        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>
19152        for &PaddingEndOfInlineObjectBeforeNextObject1Byte
19153    {
19154        #[inline]
19155        unsafe fn encode(
19156            self,
19157            encoder: &mut fidl::encoding::Encoder<'_, D>,
19158            offset: usize,
19159            _depth: fidl::encoding::Depth,
19160        ) -> fidl::Result<()> {
19161            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
19162            // Delegate to tuple encoding.
19163            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>::encode(
19164                (
19165                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19166                        &self.out_of_line,
19167                    ),
19168                    <Struct1Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19169                ),
19170                encoder,
19171                offset,
19172                _depth,
19173            )
19174        }
19175    }
19176    unsafe impl<
19177        D: fidl::encoding::ResourceDialect,
19178        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19179        T1: fidl::encoding::Encode<Struct1Byte, D>,
19180    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D> for (T0, T1)
19181    {
19182        #[inline]
19183        unsafe fn encode(
19184            self,
19185            encoder: &mut fidl::encoding::Encoder<'_, D>,
19186            offset: usize,
19187            depth: fidl::encoding::Depth,
19188        ) -> fidl::Result<()> {
19189            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
19190            // Zero out padding regions. There's no need to apply masks
19191            // because the unmasked parts will be overwritten by fields.
19192            unsafe {
19193                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19194                (ptr as *mut u64).write_unaligned(0);
19195            }
19196            // Write the fields.
19197            self.0.encode(encoder, offset + 0, depth)?;
19198            self.1.encode(encoder, offset + 8, depth)?;
19199            Ok(())
19200        }
19201    }
19202
19203    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19204        for PaddingEndOfInlineObjectBeforeNextObject1Byte
19205    {
19206        #[inline(always)]
19207        fn new_empty() -> Self {
19208            Self {
19209                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19210                in_line: fidl::new_empty!(Struct1Byte, D),
19211            }
19212        }
19213
19214        #[inline]
19215        unsafe fn decode(
19216            &mut self,
19217            decoder: &mut fidl::encoding::Decoder<'_, D>,
19218            offset: usize,
19219            _depth: fidl::encoding::Depth,
19220        ) -> fidl::Result<()> {
19221            decoder.debug_check_bounds::<Self>(offset);
19222            // Verify that padding bytes are zero.
19223            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19224            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19225            let mask = 0xffffffffffffff00u64;
19226            let maskedval = padval & mask;
19227            if maskedval != 0 {
19228                return Err(fidl::Error::NonZeroPadding {
19229                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19230                });
19231            }
19232            fidl::decode!(
19233                fidl::encoding::Boxed<Struct8Byte>,
19234                D,
19235                &mut self.out_of_line,
19236                decoder,
19237                offset + 0,
19238                _depth
19239            )?;
19240            fidl::decode!(Struct1Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19241            Ok(())
19242        }
19243    }
19244
19245    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19246        type Borrowed<'a> = &'a Self;
19247        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19248            value
19249        }
19250    }
19251
19252    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19253        type Owned = Self;
19254
19255        #[inline(always)]
19256        fn inline_align(_context: fidl::encoding::Context) -> usize {
19257            8
19258        }
19259
19260        #[inline(always)]
19261        fn inline_size(_context: fidl::encoding::Context) -> usize {
19262            16
19263        }
19264    }
19265
19266    unsafe impl<D: fidl::encoding::ResourceDialect>
19267        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>
19268        for &PaddingEndOfInlineObjectBeforeNextObject2Byte
19269    {
19270        #[inline]
19271        unsafe fn encode(
19272            self,
19273            encoder: &mut fidl::encoding::Encoder<'_, D>,
19274            offset: usize,
19275            _depth: fidl::encoding::Depth,
19276        ) -> fidl::Result<()> {
19277            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19278            // Delegate to tuple encoding.
19279            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>::encode(
19280                (
19281                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19282                        &self.out_of_line,
19283                    ),
19284                    <Struct2Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19285                ),
19286                encoder,
19287                offset,
19288                _depth,
19289            )
19290        }
19291    }
19292    unsafe impl<
19293        D: fidl::encoding::ResourceDialect,
19294        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19295        T1: fidl::encoding::Encode<Struct2Byte, D>,
19296    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D> for (T0, T1)
19297    {
19298        #[inline]
19299        unsafe fn encode(
19300            self,
19301            encoder: &mut fidl::encoding::Encoder<'_, D>,
19302            offset: usize,
19303            depth: fidl::encoding::Depth,
19304        ) -> fidl::Result<()> {
19305            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19306            // Zero out padding regions. There's no need to apply masks
19307            // because the unmasked parts will be overwritten by fields.
19308            unsafe {
19309                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19310                (ptr as *mut u64).write_unaligned(0);
19311            }
19312            // Write the fields.
19313            self.0.encode(encoder, offset + 0, depth)?;
19314            self.1.encode(encoder, offset + 8, depth)?;
19315            Ok(())
19316        }
19317    }
19318
19319    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19320        for PaddingEndOfInlineObjectBeforeNextObject2Byte
19321    {
19322        #[inline(always)]
19323        fn new_empty() -> Self {
19324            Self {
19325                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19326                in_line: fidl::new_empty!(Struct2Byte, D),
19327            }
19328        }
19329
19330        #[inline]
19331        unsafe fn decode(
19332            &mut self,
19333            decoder: &mut fidl::encoding::Decoder<'_, D>,
19334            offset: usize,
19335            _depth: fidl::encoding::Depth,
19336        ) -> fidl::Result<()> {
19337            decoder.debug_check_bounds::<Self>(offset);
19338            // Verify that padding bytes are zero.
19339            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19340            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19341            let mask = 0xffffffffffff0000u64;
19342            let maskedval = padval & mask;
19343            if maskedval != 0 {
19344                return Err(fidl::Error::NonZeroPadding {
19345                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19346                });
19347            }
19348            fidl::decode!(
19349                fidl::encoding::Boxed<Struct8Byte>,
19350                D,
19351                &mut self.out_of_line,
19352                decoder,
19353                offset + 0,
19354                _depth
19355            )?;
19356            fidl::decode!(Struct2Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19357            Ok(())
19358        }
19359    }
19360
19361    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19362        type Borrowed<'a> = &'a Self;
19363        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19364            value
19365        }
19366    }
19367
19368    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19369        type Owned = Self;
19370
19371        #[inline(always)]
19372        fn inline_align(_context: fidl::encoding::Context) -> usize {
19373            8
19374        }
19375
19376        #[inline(always)]
19377        fn inline_size(_context: fidl::encoding::Context) -> usize {
19378            16
19379        }
19380    }
19381
19382    unsafe impl<D: fidl::encoding::ResourceDialect>
19383        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>
19384        for &PaddingEndOfInlineObjectBeforeNextObject3Byte
19385    {
19386        #[inline]
19387        unsafe fn encode(
19388            self,
19389            encoder: &mut fidl::encoding::Encoder<'_, D>,
19390            offset: usize,
19391            _depth: fidl::encoding::Depth,
19392        ) -> fidl::Result<()> {
19393            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19394            // Delegate to tuple encoding.
19395            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>::encode(
19396                (
19397                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19398                        &self.out_of_line,
19399                    ),
19400                    <Struct3Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19401                ),
19402                encoder,
19403                offset,
19404                _depth,
19405            )
19406        }
19407    }
19408    unsafe impl<
19409        D: fidl::encoding::ResourceDialect,
19410        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19411        T1: fidl::encoding::Encode<Struct3Byte, D>,
19412    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D> for (T0, T1)
19413    {
19414        #[inline]
19415        unsafe fn encode(
19416            self,
19417            encoder: &mut fidl::encoding::Encoder<'_, D>,
19418            offset: usize,
19419            depth: fidl::encoding::Depth,
19420        ) -> fidl::Result<()> {
19421            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19422            // Zero out padding regions. There's no need to apply masks
19423            // because the unmasked parts will be overwritten by fields.
19424            unsafe {
19425                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19426                (ptr as *mut u64).write_unaligned(0);
19427            }
19428            // Write the fields.
19429            self.0.encode(encoder, offset + 0, depth)?;
19430            self.1.encode(encoder, offset + 8, depth)?;
19431            Ok(())
19432        }
19433    }
19434
19435    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19436        for PaddingEndOfInlineObjectBeforeNextObject3Byte
19437    {
19438        #[inline(always)]
19439        fn new_empty() -> Self {
19440            Self {
19441                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19442                in_line: fidl::new_empty!(Struct3Byte, D),
19443            }
19444        }
19445
19446        #[inline]
19447        unsafe fn decode(
19448            &mut self,
19449            decoder: &mut fidl::encoding::Decoder<'_, D>,
19450            offset: usize,
19451            _depth: fidl::encoding::Depth,
19452        ) -> fidl::Result<()> {
19453            decoder.debug_check_bounds::<Self>(offset);
19454            // Verify that padding bytes are zero.
19455            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19456            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19457            let mask = 0xffffffff00000000u64;
19458            let maskedval = padval & mask;
19459            if maskedval != 0 {
19460                return Err(fidl::Error::NonZeroPadding {
19461                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19462                });
19463            }
19464            fidl::decode!(
19465                fidl::encoding::Boxed<Struct8Byte>,
19466                D,
19467                &mut self.out_of_line,
19468                decoder,
19469                offset + 0,
19470                _depth
19471            )?;
19472            fidl::decode!(Struct3Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19473            Ok(())
19474        }
19475    }
19476
19477    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19478        type Borrowed<'a> = &'a Self;
19479        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19480            value
19481        }
19482    }
19483
19484    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19485        type Owned = Self;
19486
19487        #[inline(always)]
19488        fn inline_align(_context: fidl::encoding::Context) -> usize {
19489            8
19490        }
19491
19492        #[inline(always)]
19493        fn inline_size(_context: fidl::encoding::Context) -> usize {
19494            16
19495        }
19496    }
19497
19498    unsafe impl<D: fidl::encoding::ResourceDialect>
19499        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>
19500        for &PaddingEndOfInlineObjectBeforeNextObject4Byte
19501    {
19502        #[inline]
19503        unsafe fn encode(
19504            self,
19505            encoder: &mut fidl::encoding::Encoder<'_, D>,
19506            offset: usize,
19507            _depth: fidl::encoding::Depth,
19508        ) -> fidl::Result<()> {
19509            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19510            // Delegate to tuple encoding.
19511            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>::encode(
19512                (
19513                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19514                        &self.out_of_line,
19515                    ),
19516                    <Struct4Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19517                ),
19518                encoder,
19519                offset,
19520                _depth,
19521            )
19522        }
19523    }
19524    unsafe impl<
19525        D: fidl::encoding::ResourceDialect,
19526        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19527        T1: fidl::encoding::Encode<Struct4Byte, D>,
19528    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D> for (T0, T1)
19529    {
19530        #[inline]
19531        unsafe fn encode(
19532            self,
19533            encoder: &mut fidl::encoding::Encoder<'_, D>,
19534            offset: usize,
19535            depth: fidl::encoding::Depth,
19536        ) -> fidl::Result<()> {
19537            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19538            // Zero out padding regions. There's no need to apply masks
19539            // because the unmasked parts will be overwritten by fields.
19540            unsafe {
19541                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19542                (ptr as *mut u64).write_unaligned(0);
19543            }
19544            // Write the fields.
19545            self.0.encode(encoder, offset + 0, depth)?;
19546            self.1.encode(encoder, offset + 8, depth)?;
19547            Ok(())
19548        }
19549    }
19550
19551    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19552        for PaddingEndOfInlineObjectBeforeNextObject4Byte
19553    {
19554        #[inline(always)]
19555        fn new_empty() -> Self {
19556            Self {
19557                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19558                in_line: fidl::new_empty!(Struct4Byte, D),
19559            }
19560        }
19561
19562        #[inline]
19563        unsafe fn decode(
19564            &mut self,
19565            decoder: &mut fidl::encoding::Decoder<'_, D>,
19566            offset: usize,
19567            _depth: fidl::encoding::Depth,
19568        ) -> fidl::Result<()> {
19569            decoder.debug_check_bounds::<Self>(offset);
19570            // Verify that padding bytes are zero.
19571            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19572            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19573            let mask = 0xffffffff00000000u64;
19574            let maskedval = padval & mask;
19575            if maskedval != 0 {
19576                return Err(fidl::Error::NonZeroPadding {
19577                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19578                });
19579            }
19580            fidl::decode!(
19581                fidl::encoding::Boxed<Struct8Byte>,
19582                D,
19583                &mut self.out_of_line,
19584                decoder,
19585                offset + 0,
19586                _depth
19587            )?;
19588            fidl::decode!(Struct4Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19589            Ok(())
19590        }
19591    }
19592
19593    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19594        type Borrowed<'a> = &'a Self;
19595        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19596            value
19597        }
19598    }
19599
19600    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19601        type Owned = Self;
19602
19603        #[inline(always)]
19604        fn inline_align(_context: fidl::encoding::Context) -> usize {
19605            8
19606        }
19607
19608        #[inline(always)]
19609        fn inline_size(_context: fidl::encoding::Context) -> usize {
19610            16
19611        }
19612    }
19613
19614    unsafe impl<D: fidl::encoding::ResourceDialect>
19615        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>
19616        for &PaddingEndOfInlineObjectBeforeNextObject5Byte
19617    {
19618        #[inline]
19619        unsafe fn encode(
19620            self,
19621            encoder: &mut fidl::encoding::Encoder<'_, D>,
19622            offset: usize,
19623            _depth: fidl::encoding::Depth,
19624        ) -> fidl::Result<()> {
19625            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19626            // Delegate to tuple encoding.
19627            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>::encode(
19628                (
19629                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19630                        &self.out_of_line,
19631                    ),
19632                    <Struct5Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19633                ),
19634                encoder,
19635                offset,
19636                _depth,
19637            )
19638        }
19639    }
19640    unsafe impl<
19641        D: fidl::encoding::ResourceDialect,
19642        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19643        T1: fidl::encoding::Encode<Struct5Byte, D>,
19644    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D> for (T0, T1)
19645    {
19646        #[inline]
19647        unsafe fn encode(
19648            self,
19649            encoder: &mut fidl::encoding::Encoder<'_, D>,
19650            offset: usize,
19651            depth: fidl::encoding::Depth,
19652        ) -> fidl::Result<()> {
19653            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19654            // Zero out padding regions. There's no need to apply masks
19655            // because the unmasked parts will be overwritten by fields.
19656            // Write the fields.
19657            self.0.encode(encoder, offset + 0, depth)?;
19658            self.1.encode(encoder, offset + 8, depth)?;
19659            Ok(())
19660        }
19661    }
19662
19663    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19664        for PaddingEndOfInlineObjectBeforeNextObject5Byte
19665    {
19666        #[inline(always)]
19667        fn new_empty() -> Self {
19668            Self {
19669                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19670                in_line: fidl::new_empty!(Struct5Byte, D),
19671            }
19672        }
19673
19674        #[inline]
19675        unsafe fn decode(
19676            &mut self,
19677            decoder: &mut fidl::encoding::Decoder<'_, D>,
19678            offset: usize,
19679            _depth: fidl::encoding::Depth,
19680        ) -> fidl::Result<()> {
19681            decoder.debug_check_bounds::<Self>(offset);
19682            // Verify that padding bytes are zero.
19683            fidl::decode!(
19684                fidl::encoding::Boxed<Struct8Byte>,
19685                D,
19686                &mut self.out_of_line,
19687                decoder,
19688                offset + 0,
19689                _depth
19690            )?;
19691            fidl::decode!(Struct5Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19692            Ok(())
19693        }
19694    }
19695
19696    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19697        type Borrowed<'a> = &'a Self;
19698        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19699            value
19700        }
19701    }
19702
19703    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19704        type Owned = Self;
19705
19706        #[inline(always)]
19707        fn inline_align(_context: fidl::encoding::Context) -> usize {
19708            8
19709        }
19710
19711        #[inline(always)]
19712        fn inline_size(_context: fidl::encoding::Context) -> usize {
19713            16
19714        }
19715    }
19716
19717    unsafe impl<D: fidl::encoding::ResourceDialect>
19718        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>
19719        for &PaddingEndOfInlineObjectBeforeNextObject6Byte
19720    {
19721        #[inline]
19722        unsafe fn encode(
19723            self,
19724            encoder: &mut fidl::encoding::Encoder<'_, D>,
19725            offset: usize,
19726            _depth: fidl::encoding::Depth,
19727        ) -> fidl::Result<()> {
19728            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19729            // Delegate to tuple encoding.
19730            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>::encode(
19731                (
19732                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19733                        &self.out_of_line,
19734                    ),
19735                    <Struct6Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19736                ),
19737                encoder,
19738                offset,
19739                _depth,
19740            )
19741        }
19742    }
19743    unsafe impl<
19744        D: fidl::encoding::ResourceDialect,
19745        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19746        T1: fidl::encoding::Encode<Struct6Byte, D>,
19747    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D> for (T0, T1)
19748    {
19749        #[inline]
19750        unsafe fn encode(
19751            self,
19752            encoder: &mut fidl::encoding::Encoder<'_, D>,
19753            offset: usize,
19754            depth: fidl::encoding::Depth,
19755        ) -> fidl::Result<()> {
19756            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19757            // Zero out padding regions. There's no need to apply masks
19758            // because the unmasked parts will be overwritten by fields.
19759            // Write the fields.
19760            self.0.encode(encoder, offset + 0, depth)?;
19761            self.1.encode(encoder, offset + 8, depth)?;
19762            Ok(())
19763        }
19764    }
19765
19766    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19767        for PaddingEndOfInlineObjectBeforeNextObject6Byte
19768    {
19769        #[inline(always)]
19770        fn new_empty() -> Self {
19771            Self {
19772                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19773                in_line: fidl::new_empty!(Struct6Byte, D),
19774            }
19775        }
19776
19777        #[inline]
19778        unsafe fn decode(
19779            &mut self,
19780            decoder: &mut fidl::encoding::Decoder<'_, D>,
19781            offset: usize,
19782            _depth: fidl::encoding::Depth,
19783        ) -> fidl::Result<()> {
19784            decoder.debug_check_bounds::<Self>(offset);
19785            // Verify that padding bytes are zero.
19786            fidl::decode!(
19787                fidl::encoding::Boxed<Struct8Byte>,
19788                D,
19789                &mut self.out_of_line,
19790                decoder,
19791                offset + 0,
19792                _depth
19793            )?;
19794            fidl::decode!(Struct6Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19795            Ok(())
19796        }
19797    }
19798
19799    impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19800        type Borrowed<'a> = &'a Self;
19801        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19802            value
19803        }
19804    }
19805
19806    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19807        type Owned = Self;
19808
19809        #[inline(always)]
19810        fn inline_align(_context: fidl::encoding::Context) -> usize {
19811            8
19812        }
19813
19814        #[inline(always)]
19815        fn inline_size(_context: fidl::encoding::Context) -> usize {
19816            16
19817        }
19818    }
19819
19820    unsafe impl<D: fidl::encoding::ResourceDialect>
19821        fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>
19822        for &PaddingEndOfInlineObjectBeforeNextObject7Byte
19823    {
19824        #[inline]
19825        unsafe fn encode(
19826            self,
19827            encoder: &mut fidl::encoding::Encoder<'_, D>,
19828            offset: usize,
19829            _depth: fidl::encoding::Depth,
19830        ) -> fidl::Result<()> {
19831            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19832            // Delegate to tuple encoding.
19833            fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>::encode(
19834                (
19835                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19836                        &self.out_of_line,
19837                    ),
19838                    <Struct7Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19839                ),
19840                encoder,
19841                offset,
19842                _depth,
19843            )
19844        }
19845    }
19846    unsafe impl<
19847        D: fidl::encoding::ResourceDialect,
19848        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19849        T1: fidl::encoding::Encode<Struct7Byte, D>,
19850    > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D> for (T0, T1)
19851    {
19852        #[inline]
19853        unsafe fn encode(
19854            self,
19855            encoder: &mut fidl::encoding::Encoder<'_, D>,
19856            offset: usize,
19857            depth: fidl::encoding::Depth,
19858        ) -> fidl::Result<()> {
19859            encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19860            // Zero out padding regions. There's no need to apply masks
19861            // because the unmasked parts will be overwritten by fields.
19862            // Write the fields.
19863            self.0.encode(encoder, offset + 0, depth)?;
19864            self.1.encode(encoder, offset + 8, depth)?;
19865            Ok(())
19866        }
19867    }
19868
19869    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19870        for PaddingEndOfInlineObjectBeforeNextObject7Byte
19871    {
19872        #[inline(always)]
19873        fn new_empty() -> Self {
19874            Self {
19875                out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19876                in_line: fidl::new_empty!(Struct7Byte, D),
19877            }
19878        }
19879
19880        #[inline]
19881        unsafe fn decode(
19882            &mut self,
19883            decoder: &mut fidl::encoding::Decoder<'_, D>,
19884            offset: usize,
19885            _depth: fidl::encoding::Depth,
19886        ) -> fidl::Result<()> {
19887            decoder.debug_check_bounds::<Self>(offset);
19888            // Verify that padding bytes are zero.
19889            fidl::decode!(
19890                fidl::encoding::Boxed<Struct8Byte>,
19891                D,
19892                &mut self.out_of_line,
19893                decoder,
19894                offset + 0,
19895                _depth
19896            )?;
19897            fidl::decode!(Struct7Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19898            Ok(())
19899        }
19900    }
19901
19902    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject1Byte {
19903        type Borrowed<'a> = &'a Self;
19904        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19905            value
19906        }
19907    }
19908
19909    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject1Byte {
19910        type Owned = Self;
19911
19912        #[inline(always)]
19913        fn inline_align(_context: fidl::encoding::Context) -> usize {
19914            8
19915        }
19916
19917        #[inline(always)]
19918        fn inline_size(_context: fidl::encoding::Context) -> usize {
19919            8
19920        }
19921    }
19922
19923    unsafe impl<D: fidl::encoding::ResourceDialect>
19924        fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D>
19925        for &PaddingEndOfOutOfLineObject1Byte
19926    {
19927        #[inline]
19928        unsafe fn encode(
19929            self,
19930            encoder: &mut fidl::encoding::Encoder<'_, D>,
19931            offset: usize,
19932            _depth: fidl::encoding::Depth,
19933        ) -> fidl::Result<()> {
19934            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19935            // Delegate to tuple encoding.
19936            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject1Byte, D>::encode(
19937                (<fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19938                    &self.out_of_line,
19939                ),),
19940                encoder,
19941                offset,
19942                _depth,
19943            )
19944        }
19945    }
19946    unsafe impl<
19947        D: fidl::encoding::ResourceDialect,
19948        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
19949    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D> for (T0,)
19950    {
19951        #[inline]
19952        unsafe fn encode(
19953            self,
19954            encoder: &mut fidl::encoding::Encoder<'_, D>,
19955            offset: usize,
19956            depth: fidl::encoding::Depth,
19957        ) -> fidl::Result<()> {
19958            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19959            // Zero out padding regions. There's no need to apply masks
19960            // because the unmasked parts will be overwritten by fields.
19961            // Write the fields.
19962            self.0.encode(encoder, offset + 0, depth)?;
19963            Ok(())
19964        }
19965    }
19966
19967    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19968        for PaddingEndOfOutOfLineObject1Byte
19969    {
19970        #[inline(always)]
19971        fn new_empty() -> Self {
19972            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D) }
19973        }
19974
19975        #[inline]
19976        unsafe fn decode(
19977            &mut self,
19978            decoder: &mut fidl::encoding::Decoder<'_, D>,
19979            offset: usize,
19980            _depth: fidl::encoding::Depth,
19981        ) -> fidl::Result<()> {
19982            decoder.debug_check_bounds::<Self>(offset);
19983            // Verify that padding bytes are zero.
19984            fidl::decode!(
19985                fidl::encoding::Boxed<Struct1Byte>,
19986                D,
19987                &mut self.out_of_line,
19988                decoder,
19989                offset + 0,
19990                _depth
19991            )?;
19992            Ok(())
19993        }
19994    }
19995
19996    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject2Byte {
19997        type Borrowed<'a> = &'a Self;
19998        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19999            value
20000        }
20001    }
20002
20003    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject2Byte {
20004        type Owned = Self;
20005
20006        #[inline(always)]
20007        fn inline_align(_context: fidl::encoding::Context) -> usize {
20008            8
20009        }
20010
20011        #[inline(always)]
20012        fn inline_size(_context: fidl::encoding::Context) -> usize {
20013            8
20014        }
20015    }
20016
20017    unsafe impl<D: fidl::encoding::ResourceDialect>
20018        fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D>
20019        for &PaddingEndOfOutOfLineObject2Byte
20020    {
20021        #[inline]
20022        unsafe fn encode(
20023            self,
20024            encoder: &mut fidl::encoding::Encoder<'_, D>,
20025            offset: usize,
20026            _depth: fidl::encoding::Depth,
20027        ) -> fidl::Result<()> {
20028            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
20029            // Delegate to tuple encoding.
20030            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject2Byte, D>::encode(
20031                (<fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20032                    &self.out_of_line,
20033                ),),
20034                encoder,
20035                offset,
20036                _depth,
20037            )
20038        }
20039    }
20040    unsafe impl<
20041        D: fidl::encoding::ResourceDialect,
20042        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
20043    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D> for (T0,)
20044    {
20045        #[inline]
20046        unsafe fn encode(
20047            self,
20048            encoder: &mut fidl::encoding::Encoder<'_, D>,
20049            offset: usize,
20050            depth: fidl::encoding::Depth,
20051        ) -> fidl::Result<()> {
20052            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
20053            // Zero out padding regions. There's no need to apply masks
20054            // because the unmasked parts will be overwritten by fields.
20055            // Write the fields.
20056            self.0.encode(encoder, offset + 0, depth)?;
20057            Ok(())
20058        }
20059    }
20060
20061    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20062        for PaddingEndOfOutOfLineObject2Byte
20063    {
20064        #[inline(always)]
20065        fn new_empty() -> Self {
20066            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D) }
20067        }
20068
20069        #[inline]
20070        unsafe fn decode(
20071            &mut self,
20072            decoder: &mut fidl::encoding::Decoder<'_, D>,
20073            offset: usize,
20074            _depth: fidl::encoding::Depth,
20075        ) -> fidl::Result<()> {
20076            decoder.debug_check_bounds::<Self>(offset);
20077            // Verify that padding bytes are zero.
20078            fidl::decode!(
20079                fidl::encoding::Boxed<Struct2Byte>,
20080                D,
20081                &mut self.out_of_line,
20082                decoder,
20083                offset + 0,
20084                _depth
20085            )?;
20086            Ok(())
20087        }
20088    }
20089
20090    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject3Byte {
20091        type Borrowed<'a> = &'a Self;
20092        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20093            value
20094        }
20095    }
20096
20097    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject3Byte {
20098        type Owned = Self;
20099
20100        #[inline(always)]
20101        fn inline_align(_context: fidl::encoding::Context) -> usize {
20102            8
20103        }
20104
20105        #[inline(always)]
20106        fn inline_size(_context: fidl::encoding::Context) -> usize {
20107            8
20108        }
20109    }
20110
20111    unsafe impl<D: fidl::encoding::ResourceDialect>
20112        fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D>
20113        for &PaddingEndOfOutOfLineObject3Byte
20114    {
20115        #[inline]
20116        unsafe fn encode(
20117            self,
20118            encoder: &mut fidl::encoding::Encoder<'_, D>,
20119            offset: usize,
20120            _depth: fidl::encoding::Depth,
20121        ) -> fidl::Result<()> {
20122            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
20123            // Delegate to tuple encoding.
20124            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject3Byte, D>::encode(
20125                (<fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20126                    &self.out_of_line,
20127                ),),
20128                encoder,
20129                offset,
20130                _depth,
20131            )
20132        }
20133    }
20134    unsafe impl<
20135        D: fidl::encoding::ResourceDialect,
20136        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
20137    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D> for (T0,)
20138    {
20139        #[inline]
20140        unsafe fn encode(
20141            self,
20142            encoder: &mut fidl::encoding::Encoder<'_, D>,
20143            offset: usize,
20144            depth: fidl::encoding::Depth,
20145        ) -> fidl::Result<()> {
20146            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
20147            // Zero out padding regions. There's no need to apply masks
20148            // because the unmasked parts will be overwritten by fields.
20149            // Write the fields.
20150            self.0.encode(encoder, offset + 0, depth)?;
20151            Ok(())
20152        }
20153    }
20154
20155    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20156        for PaddingEndOfOutOfLineObject3Byte
20157    {
20158        #[inline(always)]
20159        fn new_empty() -> Self {
20160            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D) }
20161        }
20162
20163        #[inline]
20164        unsafe fn decode(
20165            &mut self,
20166            decoder: &mut fidl::encoding::Decoder<'_, D>,
20167            offset: usize,
20168            _depth: fidl::encoding::Depth,
20169        ) -> fidl::Result<()> {
20170            decoder.debug_check_bounds::<Self>(offset);
20171            // Verify that padding bytes are zero.
20172            fidl::decode!(
20173                fidl::encoding::Boxed<Struct3Byte>,
20174                D,
20175                &mut self.out_of_line,
20176                decoder,
20177                offset + 0,
20178                _depth
20179            )?;
20180            Ok(())
20181        }
20182    }
20183
20184    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject4Byte {
20185        type Borrowed<'a> = &'a Self;
20186        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20187            value
20188        }
20189    }
20190
20191    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject4Byte {
20192        type Owned = Self;
20193
20194        #[inline(always)]
20195        fn inline_align(_context: fidl::encoding::Context) -> usize {
20196            8
20197        }
20198
20199        #[inline(always)]
20200        fn inline_size(_context: fidl::encoding::Context) -> usize {
20201            8
20202        }
20203    }
20204
20205    unsafe impl<D: fidl::encoding::ResourceDialect>
20206        fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D>
20207        for &PaddingEndOfOutOfLineObject4Byte
20208    {
20209        #[inline]
20210        unsafe fn encode(
20211            self,
20212            encoder: &mut fidl::encoding::Encoder<'_, D>,
20213            offset: usize,
20214            _depth: fidl::encoding::Depth,
20215        ) -> fidl::Result<()> {
20216            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20217            // Delegate to tuple encoding.
20218            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject4Byte, D>::encode(
20219                (<fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20220                    &self.out_of_line,
20221                ),),
20222                encoder,
20223                offset,
20224                _depth,
20225            )
20226        }
20227    }
20228    unsafe impl<
20229        D: fidl::encoding::ResourceDialect,
20230        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20231    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D> for (T0,)
20232    {
20233        #[inline]
20234        unsafe fn encode(
20235            self,
20236            encoder: &mut fidl::encoding::Encoder<'_, D>,
20237            offset: usize,
20238            depth: fidl::encoding::Depth,
20239        ) -> fidl::Result<()> {
20240            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20241            // Zero out padding regions. There's no need to apply masks
20242            // because the unmasked parts will be overwritten by fields.
20243            // Write the fields.
20244            self.0.encode(encoder, offset + 0, depth)?;
20245            Ok(())
20246        }
20247    }
20248
20249    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20250        for PaddingEndOfOutOfLineObject4Byte
20251    {
20252        #[inline(always)]
20253        fn new_empty() -> Self {
20254            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D) }
20255        }
20256
20257        #[inline]
20258        unsafe fn decode(
20259            &mut self,
20260            decoder: &mut fidl::encoding::Decoder<'_, D>,
20261            offset: usize,
20262            _depth: fidl::encoding::Depth,
20263        ) -> fidl::Result<()> {
20264            decoder.debug_check_bounds::<Self>(offset);
20265            // Verify that padding bytes are zero.
20266            fidl::decode!(
20267                fidl::encoding::Boxed<Struct4Byte>,
20268                D,
20269                &mut self.out_of_line,
20270                decoder,
20271                offset + 0,
20272                _depth
20273            )?;
20274            Ok(())
20275        }
20276    }
20277
20278    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject5Byte {
20279        type Borrowed<'a> = &'a Self;
20280        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20281            value
20282        }
20283    }
20284
20285    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject5Byte {
20286        type Owned = Self;
20287
20288        #[inline(always)]
20289        fn inline_align(_context: fidl::encoding::Context) -> usize {
20290            8
20291        }
20292
20293        #[inline(always)]
20294        fn inline_size(_context: fidl::encoding::Context) -> usize {
20295            8
20296        }
20297    }
20298
20299    unsafe impl<D: fidl::encoding::ResourceDialect>
20300        fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D>
20301        for &PaddingEndOfOutOfLineObject5Byte
20302    {
20303        #[inline]
20304        unsafe fn encode(
20305            self,
20306            encoder: &mut fidl::encoding::Encoder<'_, D>,
20307            offset: usize,
20308            _depth: fidl::encoding::Depth,
20309        ) -> fidl::Result<()> {
20310            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20311            // Delegate to tuple encoding.
20312            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject5Byte, D>::encode(
20313                (<fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20314                    &self.out_of_line,
20315                ),),
20316                encoder,
20317                offset,
20318                _depth,
20319            )
20320        }
20321    }
20322    unsafe impl<
20323        D: fidl::encoding::ResourceDialect,
20324        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
20325    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D> for (T0,)
20326    {
20327        #[inline]
20328        unsafe fn encode(
20329            self,
20330            encoder: &mut fidl::encoding::Encoder<'_, D>,
20331            offset: usize,
20332            depth: fidl::encoding::Depth,
20333        ) -> fidl::Result<()> {
20334            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20335            // Zero out padding regions. There's no need to apply masks
20336            // because the unmasked parts will be overwritten by fields.
20337            // Write the fields.
20338            self.0.encode(encoder, offset + 0, depth)?;
20339            Ok(())
20340        }
20341    }
20342
20343    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20344        for PaddingEndOfOutOfLineObject5Byte
20345    {
20346        #[inline(always)]
20347        fn new_empty() -> Self {
20348            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D) }
20349        }
20350
20351        #[inline]
20352        unsafe fn decode(
20353            &mut self,
20354            decoder: &mut fidl::encoding::Decoder<'_, D>,
20355            offset: usize,
20356            _depth: fidl::encoding::Depth,
20357        ) -> fidl::Result<()> {
20358            decoder.debug_check_bounds::<Self>(offset);
20359            // Verify that padding bytes are zero.
20360            fidl::decode!(
20361                fidl::encoding::Boxed<Struct5Byte>,
20362                D,
20363                &mut self.out_of_line,
20364                decoder,
20365                offset + 0,
20366                _depth
20367            )?;
20368            Ok(())
20369        }
20370    }
20371
20372    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject6Byte {
20373        type Borrowed<'a> = &'a Self;
20374        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20375            value
20376        }
20377    }
20378
20379    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject6Byte {
20380        type Owned = Self;
20381
20382        #[inline(always)]
20383        fn inline_align(_context: fidl::encoding::Context) -> usize {
20384            8
20385        }
20386
20387        #[inline(always)]
20388        fn inline_size(_context: fidl::encoding::Context) -> usize {
20389            8
20390        }
20391    }
20392
20393    unsafe impl<D: fidl::encoding::ResourceDialect>
20394        fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D>
20395        for &PaddingEndOfOutOfLineObject6Byte
20396    {
20397        #[inline]
20398        unsafe fn encode(
20399            self,
20400            encoder: &mut fidl::encoding::Encoder<'_, D>,
20401            offset: usize,
20402            _depth: fidl::encoding::Depth,
20403        ) -> fidl::Result<()> {
20404            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20405            // Delegate to tuple encoding.
20406            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject6Byte, D>::encode(
20407                (<fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20408                    &self.out_of_line,
20409                ),),
20410                encoder,
20411                offset,
20412                _depth,
20413            )
20414        }
20415    }
20416    unsafe impl<
20417        D: fidl::encoding::ResourceDialect,
20418        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
20419    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D> for (T0,)
20420    {
20421        #[inline]
20422        unsafe fn encode(
20423            self,
20424            encoder: &mut fidl::encoding::Encoder<'_, D>,
20425            offset: usize,
20426            depth: fidl::encoding::Depth,
20427        ) -> fidl::Result<()> {
20428            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20429            // Zero out padding regions. There's no need to apply masks
20430            // because the unmasked parts will be overwritten by fields.
20431            // Write the fields.
20432            self.0.encode(encoder, offset + 0, depth)?;
20433            Ok(())
20434        }
20435    }
20436
20437    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20438        for PaddingEndOfOutOfLineObject6Byte
20439    {
20440        #[inline(always)]
20441        fn new_empty() -> Self {
20442            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D) }
20443        }
20444
20445        #[inline]
20446        unsafe fn decode(
20447            &mut self,
20448            decoder: &mut fidl::encoding::Decoder<'_, D>,
20449            offset: usize,
20450            _depth: fidl::encoding::Depth,
20451        ) -> fidl::Result<()> {
20452            decoder.debug_check_bounds::<Self>(offset);
20453            // Verify that padding bytes are zero.
20454            fidl::decode!(
20455                fidl::encoding::Boxed<Struct6Byte>,
20456                D,
20457                &mut self.out_of_line,
20458                decoder,
20459                offset + 0,
20460                _depth
20461            )?;
20462            Ok(())
20463        }
20464    }
20465
20466    impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject7Byte {
20467        type Borrowed<'a> = &'a Self;
20468        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20469            value
20470        }
20471    }
20472
20473    unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject7Byte {
20474        type Owned = Self;
20475
20476        #[inline(always)]
20477        fn inline_align(_context: fidl::encoding::Context) -> usize {
20478            8
20479        }
20480
20481        #[inline(always)]
20482        fn inline_size(_context: fidl::encoding::Context) -> usize {
20483            8
20484        }
20485    }
20486
20487    unsafe impl<D: fidl::encoding::ResourceDialect>
20488        fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D>
20489        for &PaddingEndOfOutOfLineObject7Byte
20490    {
20491        #[inline]
20492        unsafe fn encode(
20493            self,
20494            encoder: &mut fidl::encoding::Encoder<'_, D>,
20495            offset: usize,
20496            _depth: fidl::encoding::Depth,
20497        ) -> fidl::Result<()> {
20498            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20499            // Delegate to tuple encoding.
20500            fidl::encoding::Encode::<PaddingEndOfOutOfLineObject7Byte, D>::encode(
20501                (<fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20502                    &self.out_of_line,
20503                ),),
20504                encoder,
20505                offset,
20506                _depth,
20507            )
20508        }
20509    }
20510    unsafe impl<
20511        D: fidl::encoding::ResourceDialect,
20512        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
20513    > fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D> for (T0,)
20514    {
20515        #[inline]
20516        unsafe fn encode(
20517            self,
20518            encoder: &mut fidl::encoding::Encoder<'_, D>,
20519            offset: usize,
20520            depth: fidl::encoding::Depth,
20521        ) -> fidl::Result<()> {
20522            encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20523            // Zero out padding regions. There's no need to apply masks
20524            // because the unmasked parts will be overwritten by fields.
20525            // Write the fields.
20526            self.0.encode(encoder, offset + 0, depth)?;
20527            Ok(())
20528        }
20529    }
20530
20531    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20532        for PaddingEndOfOutOfLineObject7Byte
20533    {
20534        #[inline(always)]
20535        fn new_empty() -> Self {
20536            Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D) }
20537        }
20538
20539        #[inline]
20540        unsafe fn decode(
20541            &mut self,
20542            decoder: &mut fidl::encoding::Decoder<'_, D>,
20543            offset: usize,
20544            _depth: fidl::encoding::Depth,
20545        ) -> fidl::Result<()> {
20546            decoder.debug_check_bounds::<Self>(offset);
20547            // Verify that padding bytes are zero.
20548            fidl::decode!(
20549                fidl::encoding::Boxed<Struct7Byte>,
20550                D,
20551                &mut self.out_of_line,
20552                decoder,
20553                offset + 0,
20554                _depth
20555            )?;
20556            Ok(())
20557        }
20558    }
20559
20560    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20561        type Borrowed<'a> = &'a Self;
20562        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20563            value
20564        }
20565    }
20566
20567    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20568        type Owned = Self;
20569
20570        #[inline(always)]
20571        fn inline_align(_context: fidl::encoding::Context) -> usize {
20572            8
20573        }
20574
20575        #[inline(always)]
20576        fn inline_size(_context: fidl::encoding::Context) -> usize {
20577            16
20578        }
20579    }
20580
20581    unsafe impl<D: fidl::encoding::ResourceDialect>
20582        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D>
20583        for &PaddingInBetweenOutOfLineObjects1Byte
20584    {
20585        #[inline]
20586        unsafe fn encode(
20587            self,
20588            encoder: &mut fidl::encoding::Encoder<'_, D>,
20589            offset: usize,
20590            _depth: fidl::encoding::Depth,
20591        ) -> fidl::Result<()> {
20592            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20593            // Delegate to tuple encoding.
20594            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects1Byte, D>::encode(
20595                (
20596                    <fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20597                        &self.first,
20598                    ),
20599                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20600                        &self.second,
20601                    ),
20602                ),
20603                encoder,
20604                offset,
20605                _depth,
20606            )
20607        }
20608    }
20609    unsafe impl<
20610        D: fidl::encoding::ResourceDialect,
20611        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
20612        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20613    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D> for (T0, T1)
20614    {
20615        #[inline]
20616        unsafe fn encode(
20617            self,
20618            encoder: &mut fidl::encoding::Encoder<'_, D>,
20619            offset: usize,
20620            depth: fidl::encoding::Depth,
20621        ) -> fidl::Result<()> {
20622            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20623            // Zero out padding regions. There's no need to apply masks
20624            // because the unmasked parts will be overwritten by fields.
20625            // Write the fields.
20626            self.0.encode(encoder, offset + 0, depth)?;
20627            self.1.encode(encoder, offset + 8, depth)?;
20628            Ok(())
20629        }
20630    }
20631
20632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20633        for PaddingInBetweenOutOfLineObjects1Byte
20634    {
20635        #[inline(always)]
20636        fn new_empty() -> Self {
20637            Self {
20638                first: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D),
20639                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20640            }
20641        }
20642
20643        #[inline]
20644        unsafe fn decode(
20645            &mut self,
20646            decoder: &mut fidl::encoding::Decoder<'_, D>,
20647            offset: usize,
20648            _depth: fidl::encoding::Depth,
20649        ) -> fidl::Result<()> {
20650            decoder.debug_check_bounds::<Self>(offset);
20651            // Verify that padding bytes are zero.
20652            fidl::decode!(
20653                fidl::encoding::Boxed<Struct1Byte>,
20654                D,
20655                &mut self.first,
20656                decoder,
20657                offset + 0,
20658                _depth
20659            )?;
20660            fidl::decode!(
20661                fidl::encoding::Boxed<Struct8Byte>,
20662                D,
20663                &mut self.second,
20664                decoder,
20665                offset + 8,
20666                _depth
20667            )?;
20668            Ok(())
20669        }
20670    }
20671
20672    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20673        type Borrowed<'a> = &'a Self;
20674        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20675            value
20676        }
20677    }
20678
20679    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20680        type Owned = Self;
20681
20682        #[inline(always)]
20683        fn inline_align(_context: fidl::encoding::Context) -> usize {
20684            8
20685        }
20686
20687        #[inline(always)]
20688        fn inline_size(_context: fidl::encoding::Context) -> usize {
20689            16
20690        }
20691    }
20692
20693    unsafe impl<D: fidl::encoding::ResourceDialect>
20694        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D>
20695        for &PaddingInBetweenOutOfLineObjects2Byte
20696    {
20697        #[inline]
20698        unsafe fn encode(
20699            self,
20700            encoder: &mut fidl::encoding::Encoder<'_, D>,
20701            offset: usize,
20702            _depth: fidl::encoding::Depth,
20703        ) -> fidl::Result<()> {
20704            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20705            // Delegate to tuple encoding.
20706            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects2Byte, D>::encode(
20707                (
20708                    <fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20709                        &self.first,
20710                    ),
20711                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20712                        &self.second,
20713                    ),
20714                ),
20715                encoder,
20716                offset,
20717                _depth,
20718            )
20719        }
20720    }
20721    unsafe impl<
20722        D: fidl::encoding::ResourceDialect,
20723        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
20724        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20725    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D> for (T0, T1)
20726    {
20727        #[inline]
20728        unsafe fn encode(
20729            self,
20730            encoder: &mut fidl::encoding::Encoder<'_, D>,
20731            offset: usize,
20732            depth: fidl::encoding::Depth,
20733        ) -> fidl::Result<()> {
20734            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20735            // Zero out padding regions. There's no need to apply masks
20736            // because the unmasked parts will be overwritten by fields.
20737            // Write the fields.
20738            self.0.encode(encoder, offset + 0, depth)?;
20739            self.1.encode(encoder, offset + 8, depth)?;
20740            Ok(())
20741        }
20742    }
20743
20744    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20745        for PaddingInBetweenOutOfLineObjects2Byte
20746    {
20747        #[inline(always)]
20748        fn new_empty() -> Self {
20749            Self {
20750                first: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D),
20751                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20752            }
20753        }
20754
20755        #[inline]
20756        unsafe fn decode(
20757            &mut self,
20758            decoder: &mut fidl::encoding::Decoder<'_, D>,
20759            offset: usize,
20760            _depth: fidl::encoding::Depth,
20761        ) -> fidl::Result<()> {
20762            decoder.debug_check_bounds::<Self>(offset);
20763            // Verify that padding bytes are zero.
20764            fidl::decode!(
20765                fidl::encoding::Boxed<Struct2Byte>,
20766                D,
20767                &mut self.first,
20768                decoder,
20769                offset + 0,
20770                _depth
20771            )?;
20772            fidl::decode!(
20773                fidl::encoding::Boxed<Struct8Byte>,
20774                D,
20775                &mut self.second,
20776                decoder,
20777                offset + 8,
20778                _depth
20779            )?;
20780            Ok(())
20781        }
20782    }
20783
20784    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20785        type Borrowed<'a> = &'a Self;
20786        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20787            value
20788        }
20789    }
20790
20791    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20792        type Owned = Self;
20793
20794        #[inline(always)]
20795        fn inline_align(_context: fidl::encoding::Context) -> usize {
20796            8
20797        }
20798
20799        #[inline(always)]
20800        fn inline_size(_context: fidl::encoding::Context) -> usize {
20801            16
20802        }
20803    }
20804
20805    unsafe impl<D: fidl::encoding::ResourceDialect>
20806        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D>
20807        for &PaddingInBetweenOutOfLineObjects3Byte
20808    {
20809        #[inline]
20810        unsafe fn encode(
20811            self,
20812            encoder: &mut fidl::encoding::Encoder<'_, D>,
20813            offset: usize,
20814            _depth: fidl::encoding::Depth,
20815        ) -> fidl::Result<()> {
20816            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20817            // Delegate to tuple encoding.
20818            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects3Byte, D>::encode(
20819                (
20820                    <fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20821                        &self.first,
20822                    ),
20823                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20824                        &self.second,
20825                    ),
20826                ),
20827                encoder,
20828                offset,
20829                _depth,
20830            )
20831        }
20832    }
20833    unsafe impl<
20834        D: fidl::encoding::ResourceDialect,
20835        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
20836        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20837    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D> for (T0, T1)
20838    {
20839        #[inline]
20840        unsafe fn encode(
20841            self,
20842            encoder: &mut fidl::encoding::Encoder<'_, D>,
20843            offset: usize,
20844            depth: fidl::encoding::Depth,
20845        ) -> fidl::Result<()> {
20846            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20847            // Zero out padding regions. There's no need to apply masks
20848            // because the unmasked parts will be overwritten by fields.
20849            // Write the fields.
20850            self.0.encode(encoder, offset + 0, depth)?;
20851            self.1.encode(encoder, offset + 8, depth)?;
20852            Ok(())
20853        }
20854    }
20855
20856    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20857        for PaddingInBetweenOutOfLineObjects3Byte
20858    {
20859        #[inline(always)]
20860        fn new_empty() -> Self {
20861            Self {
20862                first: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D),
20863                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20864            }
20865        }
20866
20867        #[inline]
20868        unsafe fn decode(
20869            &mut self,
20870            decoder: &mut fidl::encoding::Decoder<'_, D>,
20871            offset: usize,
20872            _depth: fidl::encoding::Depth,
20873        ) -> fidl::Result<()> {
20874            decoder.debug_check_bounds::<Self>(offset);
20875            // Verify that padding bytes are zero.
20876            fidl::decode!(
20877                fidl::encoding::Boxed<Struct3Byte>,
20878                D,
20879                &mut self.first,
20880                decoder,
20881                offset + 0,
20882                _depth
20883            )?;
20884            fidl::decode!(
20885                fidl::encoding::Boxed<Struct8Byte>,
20886                D,
20887                &mut self.second,
20888                decoder,
20889                offset + 8,
20890                _depth
20891            )?;
20892            Ok(())
20893        }
20894    }
20895
20896    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20897        type Borrowed<'a> = &'a Self;
20898        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20899            value
20900        }
20901    }
20902
20903    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20904        type Owned = Self;
20905
20906        #[inline(always)]
20907        fn inline_align(_context: fidl::encoding::Context) -> usize {
20908            8
20909        }
20910
20911        #[inline(always)]
20912        fn inline_size(_context: fidl::encoding::Context) -> usize {
20913            16
20914        }
20915    }
20916
20917    unsafe impl<D: fidl::encoding::ResourceDialect>
20918        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D>
20919        for &PaddingInBetweenOutOfLineObjects4Byte
20920    {
20921        #[inline]
20922        unsafe fn encode(
20923            self,
20924            encoder: &mut fidl::encoding::Encoder<'_, D>,
20925            offset: usize,
20926            _depth: fidl::encoding::Depth,
20927        ) -> fidl::Result<()> {
20928            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20929            // Delegate to tuple encoding.
20930            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects4Byte, D>::encode(
20931                (
20932                    <fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20933                        &self.first,
20934                    ),
20935                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20936                        &self.second,
20937                    ),
20938                ),
20939                encoder,
20940                offset,
20941                _depth,
20942            )
20943        }
20944    }
20945    unsafe impl<
20946        D: fidl::encoding::ResourceDialect,
20947        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20948        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20949    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D> for (T0, T1)
20950    {
20951        #[inline]
20952        unsafe fn encode(
20953            self,
20954            encoder: &mut fidl::encoding::Encoder<'_, D>,
20955            offset: usize,
20956            depth: fidl::encoding::Depth,
20957        ) -> fidl::Result<()> {
20958            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20959            // Zero out padding regions. There's no need to apply masks
20960            // because the unmasked parts will be overwritten by fields.
20961            // Write the fields.
20962            self.0.encode(encoder, offset + 0, depth)?;
20963            self.1.encode(encoder, offset + 8, depth)?;
20964            Ok(())
20965        }
20966    }
20967
20968    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20969        for PaddingInBetweenOutOfLineObjects4Byte
20970    {
20971        #[inline(always)]
20972        fn new_empty() -> Self {
20973            Self {
20974                first: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D),
20975                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20976            }
20977        }
20978
20979        #[inline]
20980        unsafe fn decode(
20981            &mut self,
20982            decoder: &mut fidl::encoding::Decoder<'_, D>,
20983            offset: usize,
20984            _depth: fidl::encoding::Depth,
20985        ) -> fidl::Result<()> {
20986            decoder.debug_check_bounds::<Self>(offset);
20987            // Verify that padding bytes are zero.
20988            fidl::decode!(
20989                fidl::encoding::Boxed<Struct4Byte>,
20990                D,
20991                &mut self.first,
20992                decoder,
20993                offset + 0,
20994                _depth
20995            )?;
20996            fidl::decode!(
20997                fidl::encoding::Boxed<Struct8Byte>,
20998                D,
20999                &mut self.second,
21000                decoder,
21001                offset + 8,
21002                _depth
21003            )?;
21004            Ok(())
21005        }
21006    }
21007
21008    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
21009        type Borrowed<'a> = &'a Self;
21010        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21011            value
21012        }
21013    }
21014
21015    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
21016        type Owned = Self;
21017
21018        #[inline(always)]
21019        fn inline_align(_context: fidl::encoding::Context) -> usize {
21020            8
21021        }
21022
21023        #[inline(always)]
21024        fn inline_size(_context: fidl::encoding::Context) -> usize {
21025            16
21026        }
21027    }
21028
21029    unsafe impl<D: fidl::encoding::ResourceDialect>
21030        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D>
21031        for &PaddingInBetweenOutOfLineObjects5Byte
21032    {
21033        #[inline]
21034        unsafe fn encode(
21035            self,
21036            encoder: &mut fidl::encoding::Encoder<'_, D>,
21037            offset: usize,
21038            _depth: fidl::encoding::Depth,
21039        ) -> fidl::Result<()> {
21040            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
21041            // Delegate to tuple encoding.
21042            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects5Byte, D>::encode(
21043                (
21044                    <fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21045                        &self.first,
21046                    ),
21047                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21048                        &self.second,
21049                    ),
21050                ),
21051                encoder,
21052                offset,
21053                _depth,
21054            )
21055        }
21056    }
21057    unsafe impl<
21058        D: fidl::encoding::ResourceDialect,
21059        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
21060        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21061    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D> for (T0, T1)
21062    {
21063        #[inline]
21064        unsafe fn encode(
21065            self,
21066            encoder: &mut fidl::encoding::Encoder<'_, D>,
21067            offset: usize,
21068            depth: fidl::encoding::Depth,
21069        ) -> fidl::Result<()> {
21070            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
21071            // Zero out padding regions. There's no need to apply masks
21072            // because the unmasked parts will be overwritten by fields.
21073            // Write the fields.
21074            self.0.encode(encoder, offset + 0, depth)?;
21075            self.1.encode(encoder, offset + 8, depth)?;
21076            Ok(())
21077        }
21078    }
21079
21080    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21081        for PaddingInBetweenOutOfLineObjects5Byte
21082    {
21083        #[inline(always)]
21084        fn new_empty() -> Self {
21085            Self {
21086                first: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D),
21087                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21088            }
21089        }
21090
21091        #[inline]
21092        unsafe fn decode(
21093            &mut self,
21094            decoder: &mut fidl::encoding::Decoder<'_, D>,
21095            offset: usize,
21096            _depth: fidl::encoding::Depth,
21097        ) -> fidl::Result<()> {
21098            decoder.debug_check_bounds::<Self>(offset);
21099            // Verify that padding bytes are zero.
21100            fidl::decode!(
21101                fidl::encoding::Boxed<Struct5Byte>,
21102                D,
21103                &mut self.first,
21104                decoder,
21105                offset + 0,
21106                _depth
21107            )?;
21108            fidl::decode!(
21109                fidl::encoding::Boxed<Struct8Byte>,
21110                D,
21111                &mut self.second,
21112                decoder,
21113                offset + 8,
21114                _depth
21115            )?;
21116            Ok(())
21117        }
21118    }
21119
21120    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
21121        type Borrowed<'a> = &'a Self;
21122        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21123            value
21124        }
21125    }
21126
21127    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
21128        type Owned = Self;
21129
21130        #[inline(always)]
21131        fn inline_align(_context: fidl::encoding::Context) -> usize {
21132            8
21133        }
21134
21135        #[inline(always)]
21136        fn inline_size(_context: fidl::encoding::Context) -> usize {
21137            16
21138        }
21139    }
21140
21141    unsafe impl<D: fidl::encoding::ResourceDialect>
21142        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D>
21143        for &PaddingInBetweenOutOfLineObjects6Byte
21144    {
21145        #[inline]
21146        unsafe fn encode(
21147            self,
21148            encoder: &mut fidl::encoding::Encoder<'_, D>,
21149            offset: usize,
21150            _depth: fidl::encoding::Depth,
21151        ) -> fidl::Result<()> {
21152            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
21153            // Delegate to tuple encoding.
21154            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects6Byte, D>::encode(
21155                (
21156                    <fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21157                        &self.first,
21158                    ),
21159                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21160                        &self.second,
21161                    ),
21162                ),
21163                encoder,
21164                offset,
21165                _depth,
21166            )
21167        }
21168    }
21169    unsafe impl<
21170        D: fidl::encoding::ResourceDialect,
21171        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
21172        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21173    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D> for (T0, T1)
21174    {
21175        #[inline]
21176        unsafe fn encode(
21177            self,
21178            encoder: &mut fidl::encoding::Encoder<'_, D>,
21179            offset: usize,
21180            depth: fidl::encoding::Depth,
21181        ) -> fidl::Result<()> {
21182            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
21183            // Zero out padding regions. There's no need to apply masks
21184            // because the unmasked parts will be overwritten by fields.
21185            // Write the fields.
21186            self.0.encode(encoder, offset + 0, depth)?;
21187            self.1.encode(encoder, offset + 8, depth)?;
21188            Ok(())
21189        }
21190    }
21191
21192    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21193        for PaddingInBetweenOutOfLineObjects6Byte
21194    {
21195        #[inline(always)]
21196        fn new_empty() -> Self {
21197            Self {
21198                first: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D),
21199                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21200            }
21201        }
21202
21203        #[inline]
21204        unsafe fn decode(
21205            &mut self,
21206            decoder: &mut fidl::encoding::Decoder<'_, D>,
21207            offset: usize,
21208            _depth: fidl::encoding::Depth,
21209        ) -> fidl::Result<()> {
21210            decoder.debug_check_bounds::<Self>(offset);
21211            // Verify that padding bytes are zero.
21212            fidl::decode!(
21213                fidl::encoding::Boxed<Struct6Byte>,
21214                D,
21215                &mut self.first,
21216                decoder,
21217                offset + 0,
21218                _depth
21219            )?;
21220            fidl::decode!(
21221                fidl::encoding::Boxed<Struct8Byte>,
21222                D,
21223                &mut self.second,
21224                decoder,
21225                offset + 8,
21226                _depth
21227            )?;
21228            Ok(())
21229        }
21230    }
21231
21232    impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21233        type Borrowed<'a> = &'a Self;
21234        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21235            value
21236        }
21237    }
21238
21239    unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21240        type Owned = Self;
21241
21242        #[inline(always)]
21243        fn inline_align(_context: fidl::encoding::Context) -> usize {
21244            8
21245        }
21246
21247        #[inline(always)]
21248        fn inline_size(_context: fidl::encoding::Context) -> usize {
21249            16
21250        }
21251    }
21252
21253    unsafe impl<D: fidl::encoding::ResourceDialect>
21254        fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D>
21255        for &PaddingInBetweenOutOfLineObjects7Byte
21256    {
21257        #[inline]
21258        unsafe fn encode(
21259            self,
21260            encoder: &mut fidl::encoding::Encoder<'_, D>,
21261            offset: usize,
21262            _depth: fidl::encoding::Depth,
21263        ) -> fidl::Result<()> {
21264            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21265            // Delegate to tuple encoding.
21266            fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects7Byte, D>::encode(
21267                (
21268                    <fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21269                        &self.first,
21270                    ),
21271                    <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21272                        &self.second,
21273                    ),
21274                ),
21275                encoder,
21276                offset,
21277                _depth,
21278            )
21279        }
21280    }
21281    unsafe impl<
21282        D: fidl::encoding::ResourceDialect,
21283        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
21284        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21285    > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D> for (T0, T1)
21286    {
21287        #[inline]
21288        unsafe fn encode(
21289            self,
21290            encoder: &mut fidl::encoding::Encoder<'_, D>,
21291            offset: usize,
21292            depth: fidl::encoding::Depth,
21293        ) -> fidl::Result<()> {
21294            encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21295            // Zero out padding regions. There's no need to apply masks
21296            // because the unmasked parts will be overwritten by fields.
21297            // Write the fields.
21298            self.0.encode(encoder, offset + 0, depth)?;
21299            self.1.encode(encoder, offset + 8, depth)?;
21300            Ok(())
21301        }
21302    }
21303
21304    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21305        for PaddingInBetweenOutOfLineObjects7Byte
21306    {
21307        #[inline(always)]
21308        fn new_empty() -> Self {
21309            Self {
21310                first: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D),
21311                second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21312            }
21313        }
21314
21315        #[inline]
21316        unsafe fn decode(
21317            &mut self,
21318            decoder: &mut fidl::encoding::Decoder<'_, D>,
21319            offset: usize,
21320            _depth: fidl::encoding::Depth,
21321        ) -> fidl::Result<()> {
21322            decoder.debug_check_bounds::<Self>(offset);
21323            // Verify that padding bytes are zero.
21324            fidl::decode!(
21325                fidl::encoding::Boxed<Struct7Byte>,
21326                D,
21327                &mut self.first,
21328                decoder,
21329                offset + 0,
21330                _depth
21331            )?;
21332            fidl::decode!(
21333                fidl::encoding::Boxed<Struct8Byte>,
21334                D,
21335                &mut self.second,
21336                decoder,
21337                offset + 8,
21338                _depth
21339            )?;
21340            Ok(())
21341        }
21342    }
21343
21344    impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStruct {
21345        type Borrowed<'a> = &'a Self;
21346        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21347            value
21348        }
21349    }
21350
21351    unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStruct {
21352        type Owned = Self;
21353
21354        #[inline(always)]
21355        fn inline_align(_context: fidl::encoding::Context) -> usize {
21356            8
21357        }
21358
21359        #[inline(always)]
21360        fn inline_size(_context: fidl::encoding::Context) -> usize {
21361            8
21362        }
21363    }
21364
21365    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveEmptyStruct, D>
21366        for &RecursiveEmptyStruct
21367    {
21368        #[inline]
21369        unsafe fn encode(
21370            self,
21371            encoder: &mut fidl::encoding::Encoder<'_, D>,
21372            offset: usize,
21373            _depth: fidl::encoding::Depth,
21374        ) -> fidl::Result<()> {
21375            encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21376            // Delegate to tuple encoding.
21377            fidl::encoding::Encode::<RecursiveEmptyStruct, D>::encode(
21378                (
21379                    <fidl::encoding::Boxed<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21380                ),
21381                encoder, offset, _depth
21382            )
21383        }
21384    }
21385    unsafe impl<
21386        D: fidl::encoding::ResourceDialect,
21387        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveEmptyStruct>, D>,
21388    > fidl::encoding::Encode<RecursiveEmptyStruct, D> for (T0,)
21389    {
21390        #[inline]
21391        unsafe fn encode(
21392            self,
21393            encoder: &mut fidl::encoding::Encoder<'_, D>,
21394            offset: usize,
21395            depth: fidl::encoding::Depth,
21396        ) -> fidl::Result<()> {
21397            encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21398            // Zero out padding regions. There's no need to apply masks
21399            // because the unmasked parts will be overwritten by fields.
21400            // Write the fields.
21401            self.0.encode(encoder, offset + 0, depth)?;
21402            Ok(())
21403        }
21404    }
21405
21406    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveEmptyStruct {
21407        #[inline(always)]
21408        fn new_empty() -> Self {
21409            Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveEmptyStruct>, D) }
21410        }
21411
21412        #[inline]
21413        unsafe fn decode(
21414            &mut self,
21415            decoder: &mut fidl::encoding::Decoder<'_, D>,
21416            offset: usize,
21417            _depth: fidl::encoding::Depth,
21418        ) -> fidl::Result<()> {
21419            decoder.debug_check_bounds::<Self>(offset);
21420            // Verify that padding bytes are zero.
21421            fidl::decode!(
21422                fidl::encoding::Boxed<RecursiveEmptyStruct>,
21423                D,
21424                &mut self.inner,
21425                decoder,
21426                offset + 0,
21427                _depth
21428            )?;
21429            Ok(())
21430        }
21431    }
21432
21433    impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructArrayWrapper {
21434        type Borrowed<'a> = &'a Self;
21435        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21436            value
21437        }
21438    }
21439
21440    unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructArrayWrapper {
21441        type Owned = Self;
21442
21443        #[inline(always)]
21444        fn inline_align(_context: fidl::encoding::Context) -> usize {
21445            8
21446        }
21447
21448        #[inline(always)]
21449        fn inline_size(_context: fidl::encoding::Context) -> usize {
21450            8
21451        }
21452    }
21453
21454    unsafe impl<D: fidl::encoding::ResourceDialect>
21455        fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D>
21456        for &RecursiveEmptyStructArrayWrapper
21457    {
21458        #[inline]
21459        unsafe fn encode(
21460            self,
21461            encoder: &mut fidl::encoding::Encoder<'_, D>,
21462            offset: usize,
21463            _depth: fidl::encoding::Depth,
21464        ) -> fidl::Result<()> {
21465            encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21466            // Delegate to tuple encoding.
21467            fidl::encoding::Encode::<RecursiveEmptyStructArrayWrapper, D>::encode(
21468                (
21469                    <fidl::encoding::Array<RecursiveEmptyStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
21470                ),
21471                encoder, offset, _depth
21472            )
21473        }
21474    }
21475    unsafe impl<
21476        D: fidl::encoding::ResourceDialect,
21477        T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveEmptyStruct, 1>, D>,
21478    > fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D> for (T0,)
21479    {
21480        #[inline]
21481        unsafe fn encode(
21482            self,
21483            encoder: &mut fidl::encoding::Encoder<'_, D>,
21484            offset: usize,
21485            depth: fidl::encoding::Depth,
21486        ) -> fidl::Result<()> {
21487            encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21488            // Zero out padding regions. There's no need to apply masks
21489            // because the unmasked parts will be overwritten by fields.
21490            // Write the fields.
21491            self.0.encode(encoder, offset + 0, depth)?;
21492            Ok(())
21493        }
21494    }
21495
21496    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21497        for RecursiveEmptyStructArrayWrapper
21498    {
21499        #[inline(always)]
21500        fn new_empty() -> Self {
21501            Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D) }
21502        }
21503
21504        #[inline]
21505        unsafe fn decode(
21506            &mut self,
21507            decoder: &mut fidl::encoding::Decoder<'_, D>,
21508            offset: usize,
21509            _depth: fidl::encoding::Depth,
21510        ) -> fidl::Result<()> {
21511            decoder.debug_check_bounds::<Self>(offset);
21512            // Verify that padding bytes are zero.
21513            fidl::decode!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
21514            Ok(())
21515        }
21516    }
21517
21518    impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructVectorWrapper {
21519        type Borrowed<'a> = &'a Self;
21520        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21521            value
21522        }
21523    }
21524
21525    unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructVectorWrapper {
21526        type Owned = Self;
21527
21528        #[inline(always)]
21529        fn inline_align(_context: fidl::encoding::Context) -> usize {
21530            8
21531        }
21532
21533        #[inline(always)]
21534        fn inline_size(_context: fidl::encoding::Context) -> usize {
21535            16
21536        }
21537    }
21538
21539    unsafe impl<D: fidl::encoding::ResourceDialect>
21540        fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D>
21541        for &RecursiveEmptyStructVectorWrapper
21542    {
21543        #[inline]
21544        unsafe fn encode(
21545            self,
21546            encoder: &mut fidl::encoding::Encoder<'_, D>,
21547            offset: usize,
21548            _depth: fidl::encoding::Depth,
21549        ) -> fidl::Result<()> {
21550            encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21551            // Delegate to tuple encoding.
21552            fidl::encoding::Encode::<RecursiveEmptyStructVectorWrapper, D>::encode(
21553                (
21554                    <fidl::encoding::UnboundedVector<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21555                ),
21556                encoder, offset, _depth
21557            )
21558        }
21559    }
21560    unsafe impl<
21561        D: fidl::encoding::ResourceDialect,
21562        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D>,
21563    > fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D> for (T0,)
21564    {
21565        #[inline]
21566        unsafe fn encode(
21567            self,
21568            encoder: &mut fidl::encoding::Encoder<'_, D>,
21569            offset: usize,
21570            depth: fidl::encoding::Depth,
21571        ) -> fidl::Result<()> {
21572            encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21573            // Zero out padding regions. There's no need to apply masks
21574            // because the unmasked parts will be overwritten by fields.
21575            // Write the fields.
21576            self.0.encode(encoder, offset + 0, depth)?;
21577            Ok(())
21578        }
21579    }
21580
21581    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21582        for RecursiveEmptyStructVectorWrapper
21583    {
21584        #[inline(always)]
21585        fn new_empty() -> Self {
21586            Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D) }
21587        }
21588
21589        #[inline]
21590        unsafe fn decode(
21591            &mut self,
21592            decoder: &mut fidl::encoding::Decoder<'_, D>,
21593            offset: usize,
21594            _depth: fidl::encoding::Depth,
21595        ) -> fidl::Result<()> {
21596            decoder.debug_check_bounds::<Self>(offset);
21597            // Verify that padding bytes are zero.
21598            fidl::decode!(
21599                fidl::encoding::UnboundedVector<RecursiveEmptyStruct>,
21600                D,
21601                &mut self.vec,
21602                decoder,
21603                offset + 0,
21604                _depth
21605            )?;
21606            Ok(())
21607        }
21608    }
21609
21610    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTableStruct {
21611        type Borrowed<'a> = &'a Self;
21612        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21613            value
21614        }
21615    }
21616
21617    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTableStruct {
21618        type Owned = Self;
21619
21620        #[inline(always)]
21621        fn inline_align(_context: fidl::encoding::Context) -> usize {
21622            8
21623        }
21624
21625        #[inline(always)]
21626        fn inline_size(_context: fidl::encoding::Context) -> usize {
21627            16
21628        }
21629    }
21630
21631    unsafe impl<D: fidl::encoding::ResourceDialect>
21632        fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D>
21633        for &RecursiveOptionalAndTableStruct
21634    {
21635        #[inline]
21636        unsafe fn encode(
21637            self,
21638            encoder: &mut fidl::encoding::Encoder<'_, D>,
21639            offset: usize,
21640            _depth: fidl::encoding::Depth,
21641        ) -> fidl::Result<()> {
21642            encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21643            // Delegate to tuple encoding.
21644            fidl::encoding::Encode::<RecursiveOptionalAndTableStruct, D>::encode(
21645                (<RecursiveOptionalAndTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
21646                encoder,
21647                offset,
21648                _depth,
21649            )
21650        }
21651    }
21652    unsafe impl<
21653        D: fidl::encoding::ResourceDialect,
21654        T0: fidl::encoding::Encode<RecursiveOptionalAndTable, D>,
21655    > fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D> for (T0,)
21656    {
21657        #[inline]
21658        unsafe fn encode(
21659            self,
21660            encoder: &mut fidl::encoding::Encoder<'_, D>,
21661            offset: usize,
21662            depth: fidl::encoding::Depth,
21663        ) -> fidl::Result<()> {
21664            encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21665            // Zero out padding regions. There's no need to apply masks
21666            // because the unmasked parts will be overwritten by fields.
21667            // Write the fields.
21668            self.0.encode(encoder, offset + 0, depth)?;
21669            Ok(())
21670        }
21671    }
21672
21673    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21674        for RecursiveOptionalAndTableStruct
21675    {
21676        #[inline(always)]
21677        fn new_empty() -> Self {
21678            Self { t: fidl::new_empty!(RecursiveOptionalAndTable, D) }
21679        }
21680
21681        #[inline]
21682        unsafe fn decode(
21683            &mut self,
21684            decoder: &mut fidl::encoding::Decoder<'_, D>,
21685            offset: usize,
21686            _depth: fidl::encoding::Depth,
21687        ) -> fidl::Result<()> {
21688            decoder.debug_check_bounds::<Self>(offset);
21689            // Verify that padding bytes are zero.
21690            fidl::decode!(RecursiveOptionalAndTable, D, &mut self.t, decoder, offset + 0, _depth)?;
21691            Ok(())
21692        }
21693    }
21694
21695    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnionStruct {
21696        type Borrowed<'a> = &'a Self;
21697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21698            value
21699        }
21700    }
21701
21702    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnionStruct {
21703        type Owned = Self;
21704
21705        #[inline(always)]
21706        fn inline_align(_context: fidl::encoding::Context) -> usize {
21707            8
21708        }
21709
21710        #[inline(always)]
21711        fn inline_size(_context: fidl::encoding::Context) -> usize {
21712            16
21713        }
21714    }
21715
21716    unsafe impl<D: fidl::encoding::ResourceDialect>
21717        fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D>
21718        for &RecursiveOptionalAndUnionStruct
21719    {
21720        #[inline]
21721        unsafe fn encode(
21722            self,
21723            encoder: &mut fidl::encoding::Encoder<'_, D>,
21724            offset: usize,
21725            _depth: fidl::encoding::Depth,
21726        ) -> fidl::Result<()> {
21727            encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21728            // Delegate to tuple encoding.
21729            fidl::encoding::Encode::<RecursiveOptionalAndUnionStruct, D>::encode(
21730                (<RecursiveOptionalAndUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
21731                encoder,
21732                offset,
21733                _depth,
21734            )
21735        }
21736    }
21737    unsafe impl<
21738        D: fidl::encoding::ResourceDialect,
21739        T0: fidl::encoding::Encode<RecursiveOptionalAndUnion, D>,
21740    > fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D> for (T0,)
21741    {
21742        #[inline]
21743        unsafe fn encode(
21744            self,
21745            encoder: &mut fidl::encoding::Encoder<'_, D>,
21746            offset: usize,
21747            depth: fidl::encoding::Depth,
21748        ) -> fidl::Result<()> {
21749            encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21750            // Zero out padding regions. There's no need to apply masks
21751            // because the unmasked parts will be overwritten by fields.
21752            // Write the fields.
21753            self.0.encode(encoder, offset + 0, depth)?;
21754            Ok(())
21755        }
21756    }
21757
21758    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21759        for RecursiveOptionalAndUnionStruct
21760    {
21761        #[inline(always)]
21762        fn new_empty() -> Self {
21763            Self { u: fidl::new_empty!(RecursiveOptionalAndUnion, D) }
21764        }
21765
21766        #[inline]
21767        unsafe fn decode(
21768            &mut self,
21769            decoder: &mut fidl::encoding::Decoder<'_, D>,
21770            offset: usize,
21771            _depth: fidl::encoding::Depth,
21772        ) -> fidl::Result<()> {
21773            decoder.debug_check_bounds::<Self>(offset);
21774            // Verify that padding bytes are zero.
21775            fidl::decode!(RecursiveOptionalAndUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
21776            Ok(())
21777        }
21778    }
21779
21780    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndVectorStruct {
21781        type Borrowed<'a> = &'a Self;
21782        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21783            value
21784        }
21785    }
21786
21787    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndVectorStruct {
21788        type Owned = Self;
21789
21790        #[inline(always)]
21791        fn inline_align(_context: fidl::encoding::Context) -> usize {
21792            8
21793        }
21794
21795        #[inline(always)]
21796        fn inline_size(_context: fidl::encoding::Context) -> usize {
21797            16
21798        }
21799    }
21800
21801    unsafe impl<D: fidl::encoding::ResourceDialect>
21802        fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D>
21803        for &RecursiveOptionalAndVectorStruct
21804    {
21805        #[inline]
21806        unsafe fn encode(
21807            self,
21808            encoder: &mut fidl::encoding::Encoder<'_, D>,
21809            offset: usize,
21810            _depth: fidl::encoding::Depth,
21811        ) -> fidl::Result<()> {
21812            encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21813            // Delegate to tuple encoding.
21814            fidl::encoding::Encode::<RecursiveOptionalAndVectorStruct, D>::encode(
21815                (
21816                    <fidl::encoding::UnboundedVector<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21817                ),
21818                encoder, offset, _depth
21819            )
21820        }
21821    }
21822    unsafe impl<
21823        D: fidl::encoding::ResourceDialect,
21824        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D>,
21825    > fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D> for (T0,)
21826    {
21827        #[inline]
21828        unsafe fn encode(
21829            self,
21830            encoder: &mut fidl::encoding::Encoder<'_, D>,
21831            offset: usize,
21832            depth: fidl::encoding::Depth,
21833        ) -> fidl::Result<()> {
21834            encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21835            // Zero out padding regions. There's no need to apply masks
21836            // because the unmasked parts will be overwritten by fields.
21837            // Write the fields.
21838            self.0.encode(encoder, offset + 0, depth)?;
21839            Ok(())
21840        }
21841    }
21842
21843    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21844        for RecursiveOptionalAndVectorStruct
21845    {
21846        #[inline(always)]
21847        fn new_empty() -> Self {
21848            Self {
21849                vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D),
21850            }
21851        }
21852
21853        #[inline]
21854        unsafe fn decode(
21855            &mut self,
21856            decoder: &mut fidl::encoding::Decoder<'_, D>,
21857            offset: usize,
21858            _depth: fidl::encoding::Depth,
21859        ) -> fidl::Result<()> {
21860            decoder.debug_check_bounds::<Self>(offset);
21861            // Verify that padding bytes are zero.
21862            fidl::decode!(
21863                fidl::encoding::UnboundedVector<RecursiveOptionalStruct>,
21864                D,
21865                &mut self.vec,
21866                decoder,
21867                offset + 0,
21868                _depth
21869            )?;
21870            Ok(())
21871        }
21872    }
21873
21874    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalBasicStruct {
21875        type Borrowed<'a> = &'a Self;
21876        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21877            value
21878        }
21879    }
21880
21881    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalBasicStruct {
21882        type Owned = Self;
21883
21884        #[inline(always)]
21885        fn inline_align(_context: fidl::encoding::Context) -> usize {
21886            8
21887        }
21888
21889        #[inline(always)]
21890        fn inline_size(_context: fidl::encoding::Context) -> usize {
21891            8
21892        }
21893    }
21894
21895    unsafe impl<D: fidl::encoding::ResourceDialect>
21896        fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for &RecursiveOptionalBasicStruct
21897    {
21898        #[inline]
21899        unsafe fn encode(
21900            self,
21901            encoder: &mut fidl::encoding::Encoder<'_, D>,
21902            offset: usize,
21903            _depth: fidl::encoding::Depth,
21904        ) -> fidl::Result<()> {
21905            encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21906            // Delegate to tuple encoding.
21907            fidl::encoding::Encode::<RecursiveOptionalBasicStruct, D>::encode(
21908                (
21909                    <fidl::encoding::Boxed<RecursiveOptionalBasicStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21910                ),
21911                encoder, offset, _depth
21912            )
21913        }
21914    }
21915    unsafe impl<
21916        D: fidl::encoding::ResourceDialect,
21917        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D>,
21918    > fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for (T0,)
21919    {
21920        #[inline]
21921        unsafe fn encode(
21922            self,
21923            encoder: &mut fidl::encoding::Encoder<'_, D>,
21924            offset: usize,
21925            depth: fidl::encoding::Depth,
21926        ) -> fidl::Result<()> {
21927            encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21928            // Zero out padding regions. There's no need to apply masks
21929            // because the unmasked parts will be overwritten by fields.
21930            // Write the fields.
21931            self.0.encode(encoder, offset + 0, depth)?;
21932            Ok(())
21933        }
21934    }
21935
21936    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21937        for RecursiveOptionalBasicStruct
21938    {
21939        #[inline(always)]
21940        fn new_empty() -> Self {
21941            Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D) }
21942        }
21943
21944        #[inline]
21945        unsafe fn decode(
21946            &mut self,
21947            decoder: &mut fidl::encoding::Decoder<'_, D>,
21948            offset: usize,
21949            _depth: fidl::encoding::Depth,
21950        ) -> fidl::Result<()> {
21951            decoder.debug_check_bounds::<Self>(offset);
21952            // Verify that padding bytes are zero.
21953            fidl::decode!(
21954                fidl::encoding::Boxed<RecursiveOptionalBasicStruct>,
21955                D,
21956                &mut self.inner,
21957                decoder,
21958                offset + 0,
21959                _depth
21960            )?;
21961            Ok(())
21962        }
21963    }
21964
21965    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStruct {
21966        type Borrowed<'a> = &'a Self;
21967        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21968            value
21969        }
21970    }
21971
21972    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStruct {
21973        type Owned = Self;
21974
21975        #[inline(always)]
21976        fn inline_align(_context: fidl::encoding::Context) -> usize {
21977            8
21978        }
21979
21980        #[inline(always)]
21981        fn inline_size(_context: fidl::encoding::Context) -> usize {
21982            8
21983        }
21984    }
21985
21986    unsafe impl<D: fidl::encoding::ResourceDialect>
21987        fidl::encoding::Encode<RecursiveOptionalStruct, D> for &RecursiveOptionalStruct
21988    {
21989        #[inline]
21990        unsafe fn encode(
21991            self,
21992            encoder: &mut fidl::encoding::Encoder<'_, D>,
21993            offset: usize,
21994            _depth: fidl::encoding::Depth,
21995        ) -> fidl::Result<()> {
21996            encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
21997            // Delegate to tuple encoding.
21998            fidl::encoding::Encode::<RecursiveOptionalStruct, D>::encode(
21999                (
22000                    <fidl::encoding::Boxed<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
22001                ),
22002                encoder, offset, _depth
22003            )
22004        }
22005    }
22006    unsafe impl<
22007        D: fidl::encoding::ResourceDialect,
22008        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStruct>, D>,
22009    > fidl::encoding::Encode<RecursiveOptionalStruct, D> for (T0,)
22010    {
22011        #[inline]
22012        unsafe fn encode(
22013            self,
22014            encoder: &mut fidl::encoding::Encoder<'_, D>,
22015            offset: usize,
22016            depth: fidl::encoding::Depth,
22017        ) -> fidl::Result<()> {
22018            encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
22019            // Zero out padding regions. There's no need to apply masks
22020            // because the unmasked parts will be overwritten by fields.
22021            // Write the fields.
22022            self.0.encode(encoder, offset + 0, depth)?;
22023            Ok(())
22024        }
22025    }
22026
22027    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22028        for RecursiveOptionalStruct
22029    {
22030        #[inline(always)]
22031        fn new_empty() -> Self {
22032            Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalStruct>, D) }
22033        }
22034
22035        #[inline]
22036        unsafe fn decode(
22037            &mut self,
22038            decoder: &mut fidl::encoding::Decoder<'_, D>,
22039            offset: usize,
22040            _depth: fidl::encoding::Depth,
22041        ) -> fidl::Result<()> {
22042            decoder.debug_check_bounds::<Self>(offset);
22043            // Verify that padding bytes are zero.
22044            fidl::decode!(
22045                fidl::encoding::Boxed<RecursiveOptionalStruct>,
22046                D,
22047                &mut self.inner,
22048                decoder,
22049                offset + 0,
22050                _depth
22051            )?;
22052            Ok(())
22053        }
22054    }
22055
22056    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructArrayWrapper {
22057        type Borrowed<'a> = &'a Self;
22058        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22059            value
22060        }
22061    }
22062
22063    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructArrayWrapper {
22064        type Owned = Self;
22065
22066        #[inline(always)]
22067        fn inline_align(_context: fidl::encoding::Context) -> usize {
22068            8
22069        }
22070
22071        #[inline(always)]
22072        fn inline_size(_context: fidl::encoding::Context) -> usize {
22073            8
22074        }
22075    }
22076
22077    unsafe impl<D: fidl::encoding::ResourceDialect>
22078        fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D>
22079        for &RecursiveOptionalStructArrayWrapper
22080    {
22081        #[inline]
22082        unsafe fn encode(
22083            self,
22084            encoder: &mut fidl::encoding::Encoder<'_, D>,
22085            offset: usize,
22086            _depth: fidl::encoding::Depth,
22087        ) -> fidl::Result<()> {
22088            encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
22089            // Delegate to tuple encoding.
22090            fidl::encoding::Encode::<RecursiveOptionalStructArrayWrapper, D>::encode(
22091                (
22092                    <fidl::encoding::Array<RecursiveOptionalStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
22093                ),
22094                encoder, offset, _depth
22095            )
22096        }
22097    }
22098    unsafe impl<
22099        D: fidl::encoding::ResourceDialect,
22100        T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveOptionalStruct, 1>, D>,
22101    > fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D> for (T0,)
22102    {
22103        #[inline]
22104        unsafe fn encode(
22105            self,
22106            encoder: &mut fidl::encoding::Encoder<'_, D>,
22107            offset: usize,
22108            depth: fidl::encoding::Depth,
22109        ) -> fidl::Result<()> {
22110            encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
22111            // Zero out padding regions. There's no need to apply masks
22112            // because the unmasked parts will be overwritten by fields.
22113            // Write the fields.
22114            self.0.encode(encoder, offset + 0, depth)?;
22115            Ok(())
22116        }
22117    }
22118
22119    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22120        for RecursiveOptionalStructArrayWrapper
22121    {
22122        #[inline(always)]
22123        fn new_empty() -> Self {
22124            Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D) }
22125        }
22126
22127        #[inline]
22128        unsafe fn decode(
22129            &mut self,
22130            decoder: &mut fidl::encoding::Decoder<'_, D>,
22131            offset: usize,
22132            _depth: fidl::encoding::Depth,
22133        ) -> fidl::Result<()> {
22134            decoder.debug_check_bounds::<Self>(offset);
22135            // Verify that padding bytes are zero.
22136            fidl::decode!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
22137            Ok(())
22138        }
22139    }
22140
22141    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructWithString {
22142        type Borrowed<'a> = &'a Self;
22143        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22144            value
22145        }
22146    }
22147
22148    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructWithString {
22149        type Owned = Self;
22150
22151        #[inline(always)]
22152        fn inline_align(_context: fidl::encoding::Context) -> usize {
22153            8
22154        }
22155
22156        #[inline(always)]
22157        fn inline_size(_context: fidl::encoding::Context) -> usize {
22158            24
22159        }
22160    }
22161
22162    unsafe impl<D: fidl::encoding::ResourceDialect>
22163        fidl::encoding::Encode<RecursiveOptionalStructWithString, D>
22164        for &RecursiveOptionalStructWithString
22165    {
22166        #[inline]
22167        unsafe fn encode(
22168            self,
22169            encoder: &mut fidl::encoding::Encoder<'_, D>,
22170            offset: usize,
22171            _depth: fidl::encoding::Depth,
22172        ) -> fidl::Result<()> {
22173            encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
22174            // Delegate to tuple encoding.
22175            fidl::encoding::Encode::<RecursiveOptionalStructWithString, D>::encode(
22176                (
22177                    <fidl::encoding::Boxed<RecursiveOptionalStructWithString> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
22178                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
22179                ),
22180                encoder, offset, _depth
22181            )
22182        }
22183    }
22184    unsafe impl<
22185        D: fidl::encoding::ResourceDialect,
22186        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStructWithString>, D>,
22187        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
22188    > fidl::encoding::Encode<RecursiveOptionalStructWithString, D> for (T0, T1)
22189    {
22190        #[inline]
22191        unsafe fn encode(
22192            self,
22193            encoder: &mut fidl::encoding::Encoder<'_, D>,
22194            offset: usize,
22195            depth: fidl::encoding::Depth,
22196        ) -> fidl::Result<()> {
22197            encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
22198            // Zero out padding regions. There's no need to apply masks
22199            // because the unmasked parts will be overwritten by fields.
22200            // Write the fields.
22201            self.0.encode(encoder, offset + 0, depth)?;
22202            self.1.encode(encoder, offset + 8, depth)?;
22203            Ok(())
22204        }
22205    }
22206
22207    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22208        for RecursiveOptionalStructWithString
22209    {
22210        #[inline(always)]
22211        fn new_empty() -> Self {
22212            Self {
22213                inner: fidl::new_empty!(
22214                    fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22215                    D
22216                ),
22217                str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
22218            }
22219        }
22220
22221        #[inline]
22222        unsafe fn decode(
22223            &mut self,
22224            decoder: &mut fidl::encoding::Decoder<'_, D>,
22225            offset: usize,
22226            _depth: fidl::encoding::Depth,
22227        ) -> fidl::Result<()> {
22228            decoder.debug_check_bounds::<Self>(offset);
22229            // Verify that padding bytes are zero.
22230            fidl::decode!(
22231                fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22232                D,
22233                &mut self.inner,
22234                decoder,
22235                offset + 0,
22236                _depth
22237            )?;
22238            fidl::decode!(
22239                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
22240                D,
22241                &mut self.str,
22242                decoder,
22243                offset + 8,
22244                _depth
22245            )?;
22246            Ok(())
22247        }
22248    }
22249
22250    impl fidl::encoding::ValueTypeMarker for RecursiveTableHolder {
22251        type Borrowed<'a> = &'a Self;
22252        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22253            value
22254        }
22255    }
22256
22257    unsafe impl fidl::encoding::TypeMarker for RecursiveTableHolder {
22258        type Owned = Self;
22259
22260        #[inline(always)]
22261        fn inline_align(_context: fidl::encoding::Context) -> usize {
22262            8
22263        }
22264
22265        #[inline(always)]
22266        fn inline_size(_context: fidl::encoding::Context) -> usize {
22267            16
22268        }
22269    }
22270
22271    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTableHolder, D>
22272        for &RecursiveTableHolder
22273    {
22274        #[inline]
22275        unsafe fn encode(
22276            self,
22277            encoder: &mut fidl::encoding::Encoder<'_, D>,
22278            offset: usize,
22279            _depth: fidl::encoding::Depth,
22280        ) -> fidl::Result<()> {
22281            encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22282            // Delegate to tuple encoding.
22283            fidl::encoding::Encode::<RecursiveTableHolder, D>::encode(
22284                (<RecursiveTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
22285                encoder,
22286                offset,
22287                _depth,
22288            )
22289        }
22290    }
22291    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RecursiveTable, D>>
22292        fidl::encoding::Encode<RecursiveTableHolder, D> for (T0,)
22293    {
22294        #[inline]
22295        unsafe fn encode(
22296            self,
22297            encoder: &mut fidl::encoding::Encoder<'_, D>,
22298            offset: usize,
22299            depth: fidl::encoding::Depth,
22300        ) -> fidl::Result<()> {
22301            encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22302            // Zero out padding regions. There's no need to apply masks
22303            // because the unmasked parts will be overwritten by fields.
22304            // Write the fields.
22305            self.0.encode(encoder, offset + 0, depth)?;
22306            Ok(())
22307        }
22308    }
22309
22310    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTableHolder {
22311        #[inline(always)]
22312        fn new_empty() -> Self {
22313            Self { t: fidl::new_empty!(RecursiveTable, D) }
22314        }
22315
22316        #[inline]
22317        unsafe fn decode(
22318            &mut self,
22319            decoder: &mut fidl::encoding::Decoder<'_, D>,
22320            offset: usize,
22321            _depth: fidl::encoding::Depth,
22322        ) -> fidl::Result<()> {
22323            decoder.debug_check_bounds::<Self>(offset);
22324            // Verify that padding bytes are zero.
22325            fidl::decode!(RecursiveTable, D, &mut self.t, decoder, offset + 0, _depth)?;
22326            Ok(())
22327        }
22328    }
22329
22330    impl fidl::encoding::ValueTypeMarker for RecursiveTableOptionalHolder {
22331        type Borrowed<'a> = &'a Self;
22332        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22333            value
22334        }
22335    }
22336
22337    unsafe impl fidl::encoding::TypeMarker for RecursiveTableOptionalHolder {
22338        type Owned = Self;
22339
22340        #[inline(always)]
22341        fn inline_align(_context: fidl::encoding::Context) -> usize {
22342            8
22343        }
22344
22345        #[inline(always)]
22346        fn inline_size(_context: fidl::encoding::Context) -> usize {
22347            8
22348        }
22349    }
22350
22351    unsafe impl<D: fidl::encoding::ResourceDialect>
22352        fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for &RecursiveTableOptionalHolder
22353    {
22354        #[inline]
22355        unsafe fn encode(
22356            self,
22357            encoder: &mut fidl::encoding::Encoder<'_, D>,
22358            offset: usize,
22359            _depth: fidl::encoding::Depth,
22360        ) -> fidl::Result<()> {
22361            encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22362            // Delegate to tuple encoding.
22363            fidl::encoding::Encode::<RecursiveTableOptionalHolder, D>::encode(
22364                (
22365                    <fidl::encoding::Boxed<RecursiveTableHolder> as fidl::encoding::ValueTypeMarker>::borrow(&self.o),
22366                ),
22367                encoder, offset, _depth
22368            )
22369        }
22370    }
22371    unsafe impl<
22372        D: fidl::encoding::ResourceDialect,
22373        T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveTableHolder>, D>,
22374    > fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for (T0,)
22375    {
22376        #[inline]
22377        unsafe fn encode(
22378            self,
22379            encoder: &mut fidl::encoding::Encoder<'_, D>,
22380            offset: usize,
22381            depth: fidl::encoding::Depth,
22382        ) -> fidl::Result<()> {
22383            encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22384            // Zero out padding regions. There's no need to apply masks
22385            // because the unmasked parts will be overwritten by fields.
22386            // Write the fields.
22387            self.0.encode(encoder, offset + 0, depth)?;
22388            Ok(())
22389        }
22390    }
22391
22392    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22393        for RecursiveTableOptionalHolder
22394    {
22395        #[inline(always)]
22396        fn new_empty() -> Self {
22397            Self { o: fidl::new_empty!(fidl::encoding::Boxed<RecursiveTableHolder>, D) }
22398        }
22399
22400        #[inline]
22401        unsafe fn decode(
22402            &mut self,
22403            decoder: &mut fidl::encoding::Decoder<'_, D>,
22404            offset: usize,
22405            _depth: fidl::encoding::Depth,
22406        ) -> fidl::Result<()> {
22407            decoder.debug_check_bounds::<Self>(offset);
22408            // Verify that padding bytes are zero.
22409            fidl::decode!(
22410                fidl::encoding::Boxed<RecursiveTableHolder>,
22411                D,
22412                &mut self.o,
22413                decoder,
22414                offset + 0,
22415                _depth
22416            )?;
22417            Ok(())
22418        }
22419    }
22420
22421    impl fidl::encoding::ValueTypeMarker for RecursiveUnionStruct {
22422        type Borrowed<'a> = &'a Self;
22423        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22424            value
22425        }
22426    }
22427
22428    unsafe impl fidl::encoding::TypeMarker for RecursiveUnionStruct {
22429        type Owned = Self;
22430
22431        #[inline(always)]
22432        fn inline_align(_context: fidl::encoding::Context) -> usize {
22433            8
22434        }
22435
22436        #[inline(always)]
22437        fn inline_size(_context: fidl::encoding::Context) -> usize {
22438            16
22439        }
22440    }
22441
22442    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnionStruct, D>
22443        for &RecursiveUnionStruct
22444    {
22445        #[inline]
22446        unsafe fn encode(
22447            self,
22448            encoder: &mut fidl::encoding::Encoder<'_, D>,
22449            offset: usize,
22450            _depth: fidl::encoding::Depth,
22451        ) -> fidl::Result<()> {
22452            encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22453            // Delegate to tuple encoding.
22454            fidl::encoding::Encode::<RecursiveUnionStruct, D>::encode(
22455                (
22456                    <fidl::encoding::OptionalUnion<RecursiveUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
22457                ),
22458                encoder, offset, _depth
22459            )
22460        }
22461    }
22462    unsafe impl<
22463        D: fidl::encoding::ResourceDialect,
22464        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<RecursiveUnion>, D>,
22465    > fidl::encoding::Encode<RecursiveUnionStruct, D> for (T0,)
22466    {
22467        #[inline]
22468        unsafe fn encode(
22469            self,
22470            encoder: &mut fidl::encoding::Encoder<'_, D>,
22471            offset: usize,
22472            depth: fidl::encoding::Depth,
22473        ) -> fidl::Result<()> {
22474            encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22475            // Zero out padding regions. There's no need to apply masks
22476            // because the unmasked parts will be overwritten by fields.
22477            // Write the fields.
22478            self.0.encode(encoder, offset + 0, depth)?;
22479            Ok(())
22480        }
22481    }
22482
22483    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnionStruct {
22484        #[inline(always)]
22485        fn new_empty() -> Self {
22486            Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<RecursiveUnion>, D) }
22487        }
22488
22489        #[inline]
22490        unsafe fn decode(
22491            &mut self,
22492            decoder: &mut fidl::encoding::Decoder<'_, D>,
22493            offset: usize,
22494            _depth: fidl::encoding::Depth,
22495        ) -> fidl::Result<()> {
22496            decoder.debug_check_bounds::<Self>(offset);
22497            // Verify that padding bytes are zero.
22498            fidl::decode!(
22499                fidl::encoding::OptionalUnion<RecursiveUnion>,
22500                D,
22501                &mut self.u,
22502                decoder,
22503                offset + 0,
22504                _depth
22505            )?;
22506            Ok(())
22507        }
22508    }
22509
22510    impl fidl::encoding::ValueTypeMarker for RecursiveVectorStruct {
22511        type Borrowed<'a> = &'a Self;
22512        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22513            value
22514        }
22515    }
22516
22517    unsafe impl fidl::encoding::TypeMarker for RecursiveVectorStruct {
22518        type Owned = Self;
22519
22520        #[inline(always)]
22521        fn inline_align(_context: fidl::encoding::Context) -> usize {
22522            8
22523        }
22524
22525        #[inline(always)]
22526        fn inline_size(_context: fidl::encoding::Context) -> usize {
22527            16
22528        }
22529    }
22530
22531    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorStruct, D>
22532        for &RecursiveVectorStruct
22533    {
22534        #[inline]
22535        unsafe fn encode(
22536            self,
22537            encoder: &mut fidl::encoding::Encoder<'_, D>,
22538            offset: usize,
22539            _depth: fidl::encoding::Depth,
22540        ) -> fidl::Result<()> {
22541            encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22542            // Delegate to tuple encoding.
22543            fidl::encoding::Encode::<RecursiveVectorStruct, D>::encode(
22544                (
22545                    <fidl::encoding::Optional<
22546                        fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22547                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
22548                ),
22549                encoder,
22550                offset,
22551                _depth,
22552            )
22553        }
22554    }
22555    unsafe impl<
22556        D: fidl::encoding::ResourceDialect,
22557        T0: fidl::encoding::Encode<
22558                fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22559                D,
22560            >,
22561    > fidl::encoding::Encode<RecursiveVectorStruct, D> for (T0,)
22562    {
22563        #[inline]
22564        unsafe fn encode(
22565            self,
22566            encoder: &mut fidl::encoding::Encoder<'_, D>,
22567            offset: usize,
22568            depth: fidl::encoding::Depth,
22569        ) -> fidl::Result<()> {
22570            encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22571            // Zero out padding regions. There's no need to apply masks
22572            // because the unmasked parts will be overwritten by fields.
22573            // Write the fields.
22574            self.0.encode(encoder, offset + 0, depth)?;
22575            Ok(())
22576        }
22577    }
22578
22579    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorStruct {
22580        #[inline(always)]
22581        fn new_empty() -> Self {
22582            Self {
22583                vec: fidl::new_empty!(
22584                    fidl::encoding::Optional<
22585                        fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22586                    >,
22587                    D
22588                ),
22589            }
22590        }
22591
22592        #[inline]
22593        unsafe fn decode(
22594            &mut self,
22595            decoder: &mut fidl::encoding::Decoder<'_, D>,
22596            offset: usize,
22597            _depth: fidl::encoding::Depth,
22598        ) -> fidl::Result<()> {
22599            decoder.debug_check_bounds::<Self>(offset);
22600            // Verify that padding bytes are zero.
22601            fidl::decode!(
22602                fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22603                D,
22604                &mut self.vec,
22605                decoder,
22606                offset + 0,
22607                _depth
22608            )?;
22609            Ok(())
22610        }
22611    }
22612
22613    impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnionStruct {
22614        type Borrowed<'a> = &'a Self;
22615        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22616            value
22617        }
22618    }
22619
22620    unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnionStruct {
22621        type Owned = Self;
22622
22623        #[inline(always)]
22624        fn inline_align(_context: fidl::encoding::Context) -> usize {
22625            8
22626        }
22627
22628        #[inline(always)]
22629        fn inline_size(_context: fidl::encoding::Context) -> usize {
22630            16
22631        }
22632    }
22633
22634    unsafe impl<D: fidl::encoding::ResourceDialect>
22635        fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for &RecursiveVectorUnionStruct
22636    {
22637        #[inline]
22638        unsafe fn encode(
22639            self,
22640            encoder: &mut fidl::encoding::Encoder<'_, D>,
22641            offset: usize,
22642            _depth: fidl::encoding::Depth,
22643        ) -> fidl::Result<()> {
22644            encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22645            // Delegate to tuple encoding.
22646            fidl::encoding::Encode::<RecursiveVectorUnionStruct, D>::encode(
22647                (<RecursiveVectorUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
22648                encoder,
22649                offset,
22650                _depth,
22651            )
22652        }
22653    }
22654    unsafe impl<
22655        D: fidl::encoding::ResourceDialect,
22656        T0: fidl::encoding::Encode<RecursiveVectorUnion, D>,
22657    > fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for (T0,)
22658    {
22659        #[inline]
22660        unsafe fn encode(
22661            self,
22662            encoder: &mut fidl::encoding::Encoder<'_, D>,
22663            offset: usize,
22664            depth: fidl::encoding::Depth,
22665        ) -> fidl::Result<()> {
22666            encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22667            // Zero out padding regions. There's no need to apply masks
22668            // because the unmasked parts will be overwritten by fields.
22669            // Write the fields.
22670            self.0.encode(encoder, offset + 0, depth)?;
22671            Ok(())
22672        }
22673    }
22674
22675    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22676        for RecursiveVectorUnionStruct
22677    {
22678        #[inline(always)]
22679        fn new_empty() -> Self {
22680            Self { u: fidl::new_empty!(RecursiveVectorUnion, D) }
22681        }
22682
22683        #[inline]
22684        unsafe fn decode(
22685            &mut self,
22686            decoder: &mut fidl::encoding::Decoder<'_, D>,
22687            offset: usize,
22688            _depth: fidl::encoding::Depth,
22689        ) -> fidl::Result<()> {
22690            decoder.debug_check_bounds::<Self>(offset);
22691            // Verify that padding bytes are zero.
22692            fidl::decode!(RecursiveVectorUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
22693            Ok(())
22694        }
22695    }
22696
22697    impl fidl::encoding::ValueTypeMarker for Regression1 {
22698        type Borrowed<'a> = &'a Self;
22699        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22700            value
22701        }
22702    }
22703
22704    unsafe impl fidl::encoding::TypeMarker for Regression1 {
22705        type Owned = Self;
22706
22707        #[inline(always)]
22708        fn inline_align(_context: fidl::encoding::Context) -> usize {
22709            8
22710        }
22711
22712        #[inline(always)]
22713        fn inline_size(_context: fidl::encoding::Context) -> usize {
22714            32
22715        }
22716    }
22717
22718    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression1, D>
22719        for &Regression1
22720    {
22721        #[inline]
22722        unsafe fn encode(
22723            self,
22724            encoder: &mut fidl::encoding::Encoder<'_, D>,
22725            offset: usize,
22726            _depth: fidl::encoding::Depth,
22727        ) -> fidl::Result<()> {
22728            encoder.debug_check_bounds::<Regression1>(offset);
22729            unsafe {
22730                // Copy the object into the buffer.
22731                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
22732                (buf_ptr as *mut Regression1).write_unaligned((self as *const Regression1).read());
22733                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
22734                // done second because the memcpy will write garbage to these bytes.
22735                let padding_ptr = buf_ptr.offset(0) as *mut u64;
22736                let padding_mask = 0xffffff00u64;
22737                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22738                let padding_ptr = buf_ptr.offset(8) as *mut u64;
22739                let padding_mask = 0xffffffff0000ff00u64;
22740                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22741                let padding_ptr = buf_ptr.offset(24) as *mut u64;
22742                let padding_mask = 0xffffffffffffff00u64;
22743                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22744            }
22745            Ok(())
22746        }
22747    }
22748    unsafe impl<
22749        D: fidl::encoding::ResourceDialect,
22750        T0: fidl::encoding::Encode<u8, D>,
22751        T1: fidl::encoding::Encode<u32, D>,
22752        T2: fidl::encoding::Encode<u8, D>,
22753        T3: fidl::encoding::Encode<u16, D>,
22754        T4: fidl::encoding::Encode<u64, D>,
22755        T5: fidl::encoding::Encode<u8, D>,
22756    > fidl::encoding::Encode<Regression1, D> for (T0, T1, T2, T3, T4, T5)
22757    {
22758        #[inline]
22759        unsafe fn encode(
22760            self,
22761            encoder: &mut fidl::encoding::Encoder<'_, D>,
22762            offset: usize,
22763            depth: fidl::encoding::Depth,
22764        ) -> fidl::Result<()> {
22765            encoder.debug_check_bounds::<Regression1>(offset);
22766            // Zero out padding regions. There's no need to apply masks
22767            // because the unmasked parts will be overwritten by fields.
22768            unsafe {
22769                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22770                (ptr as *mut u64).write_unaligned(0);
22771            }
22772            unsafe {
22773                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
22774                (ptr as *mut u64).write_unaligned(0);
22775            }
22776            unsafe {
22777                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
22778                (ptr as *mut u64).write_unaligned(0);
22779            }
22780            // Write the fields.
22781            self.0.encode(encoder, offset + 0, depth)?;
22782            self.1.encode(encoder, offset + 4, depth)?;
22783            self.2.encode(encoder, offset + 8, depth)?;
22784            self.3.encode(encoder, offset + 10, depth)?;
22785            self.4.encode(encoder, offset + 16, depth)?;
22786            self.5.encode(encoder, offset + 24, depth)?;
22787            Ok(())
22788        }
22789    }
22790
22791    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression1 {
22792        #[inline(always)]
22793        fn new_empty() -> Self {
22794            Self {
22795                f1: fidl::new_empty!(u8, D),
22796                f2: fidl::new_empty!(u32, D),
22797                f3: fidl::new_empty!(u8, D),
22798                f4: fidl::new_empty!(u16, D),
22799                f5: fidl::new_empty!(u64, D),
22800                f6: fidl::new_empty!(u8, D),
22801            }
22802        }
22803
22804        #[inline]
22805        unsafe fn decode(
22806            &mut self,
22807            decoder: &mut fidl::encoding::Decoder<'_, D>,
22808            offset: usize,
22809            _depth: fidl::encoding::Depth,
22810        ) -> fidl::Result<()> {
22811            decoder.debug_check_bounds::<Self>(offset);
22812            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
22813            // Verify that padding bytes are zero.
22814            let ptr = unsafe { buf_ptr.offset(0) };
22815            let padval = unsafe { (ptr as *const u64).read_unaligned() };
22816            let mask = 0xffffff00u64;
22817            let maskedval = padval & mask;
22818            if maskedval != 0 {
22819                return Err(fidl::Error::NonZeroPadding {
22820                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22821                });
22822            }
22823            let ptr = unsafe { buf_ptr.offset(8) };
22824            let padval = unsafe { (ptr as *const u64).read_unaligned() };
22825            let mask = 0xffffffff0000ff00u64;
22826            let maskedval = padval & mask;
22827            if maskedval != 0 {
22828                return Err(fidl::Error::NonZeroPadding {
22829                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
22830                });
22831            }
22832            let ptr = unsafe { buf_ptr.offset(24) };
22833            let padval = unsafe { (ptr as *const u64).read_unaligned() };
22834            let mask = 0xffffffffffffff00u64;
22835            let maskedval = padval & mask;
22836            if maskedval != 0 {
22837                return Err(fidl::Error::NonZeroPadding {
22838                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
22839                });
22840            }
22841            // Copy from the buffer into the object.
22842            unsafe {
22843                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
22844            }
22845            Ok(())
22846        }
22847    }
22848
22849    impl fidl::encoding::ValueTypeMarker for Regression10V1 {
22850        type Borrowed<'a> = &'a Self;
22851        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22852            value
22853        }
22854    }
22855
22856    unsafe impl fidl::encoding::TypeMarker for Regression10V1 {
22857        type Owned = Self;
22858
22859        #[inline(always)]
22860        fn inline_align(_context: fidl::encoding::Context) -> usize {
22861            8
22862        }
22863
22864        #[inline(always)]
22865        fn inline_size(_context: fidl::encoding::Context) -> usize {
22866            16
22867        }
22868    }
22869
22870    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V1, D>
22871        for &Regression10V1
22872    {
22873        #[inline]
22874        unsafe fn encode(
22875            self,
22876            encoder: &mut fidl::encoding::Encoder<'_, D>,
22877            offset: usize,
22878            _depth: fidl::encoding::Depth,
22879        ) -> fidl::Result<()> {
22880            encoder.debug_check_bounds::<Regression10V1>(offset);
22881            // Delegate to tuple encoding.
22882            fidl::encoding::Encode::<Regression10V1, D>::encode(
22883                (<Regression10TableV1 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22884                encoder,
22885                offset,
22886                _depth,
22887            )
22888        }
22889    }
22890    unsafe impl<
22891        D: fidl::encoding::ResourceDialect,
22892        T0: fidl::encoding::Encode<Regression10TableV1, D>,
22893    > fidl::encoding::Encode<Regression10V1, D> for (T0,)
22894    {
22895        #[inline]
22896        unsafe fn encode(
22897            self,
22898            encoder: &mut fidl::encoding::Encoder<'_, D>,
22899            offset: usize,
22900            depth: fidl::encoding::Depth,
22901        ) -> fidl::Result<()> {
22902            encoder.debug_check_bounds::<Regression10V1>(offset);
22903            // Zero out padding regions. There's no need to apply masks
22904            // because the unmasked parts will be overwritten by fields.
22905            // Write the fields.
22906            self.0.encode(encoder, offset + 0, depth)?;
22907            Ok(())
22908        }
22909    }
22910
22911    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V1 {
22912        #[inline(always)]
22913        fn new_empty() -> Self {
22914            Self { table: fidl::new_empty!(Regression10TableV1, D) }
22915        }
22916
22917        #[inline]
22918        unsafe fn decode(
22919            &mut self,
22920            decoder: &mut fidl::encoding::Decoder<'_, D>,
22921            offset: usize,
22922            _depth: fidl::encoding::Depth,
22923        ) -> fidl::Result<()> {
22924            decoder.debug_check_bounds::<Self>(offset);
22925            // Verify that padding bytes are zero.
22926            fidl::decode!(Regression10TableV1, D, &mut self.table, decoder, offset + 0, _depth)?;
22927            Ok(())
22928        }
22929    }
22930
22931    impl fidl::encoding::ValueTypeMarker for Regression10V2 {
22932        type Borrowed<'a> = &'a Self;
22933        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22934            value
22935        }
22936    }
22937
22938    unsafe impl fidl::encoding::TypeMarker for Regression10V2 {
22939        type Owned = Self;
22940
22941        #[inline(always)]
22942        fn inline_align(_context: fidl::encoding::Context) -> usize {
22943            8
22944        }
22945
22946        #[inline(always)]
22947        fn inline_size(_context: fidl::encoding::Context) -> usize {
22948            16
22949        }
22950    }
22951
22952    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V2, D>
22953        for &Regression10V2
22954    {
22955        #[inline]
22956        unsafe fn encode(
22957            self,
22958            encoder: &mut fidl::encoding::Encoder<'_, D>,
22959            offset: usize,
22960            _depth: fidl::encoding::Depth,
22961        ) -> fidl::Result<()> {
22962            encoder.debug_check_bounds::<Regression10V2>(offset);
22963            // Delegate to tuple encoding.
22964            fidl::encoding::Encode::<Regression10V2, D>::encode(
22965                (<Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22966                encoder,
22967                offset,
22968                _depth,
22969            )
22970        }
22971    }
22972    unsafe impl<
22973        D: fidl::encoding::ResourceDialect,
22974        T0: fidl::encoding::Encode<Regression10TableV2, D>,
22975    > fidl::encoding::Encode<Regression10V2, D> for (T0,)
22976    {
22977        #[inline]
22978        unsafe fn encode(
22979            self,
22980            encoder: &mut fidl::encoding::Encoder<'_, D>,
22981            offset: usize,
22982            depth: fidl::encoding::Depth,
22983        ) -> fidl::Result<()> {
22984            encoder.debug_check_bounds::<Regression10V2>(offset);
22985            // Zero out padding regions. There's no need to apply masks
22986            // because the unmasked parts will be overwritten by fields.
22987            // Write the fields.
22988            self.0.encode(encoder, offset + 0, depth)?;
22989            Ok(())
22990        }
22991    }
22992
22993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V2 {
22994        #[inline(always)]
22995        fn new_empty() -> Self {
22996            Self { table: fidl::new_empty!(Regression10TableV2, D) }
22997        }
22998
22999        #[inline]
23000        unsafe fn decode(
23001            &mut self,
23002            decoder: &mut fidl::encoding::Decoder<'_, D>,
23003            offset: usize,
23004            _depth: fidl::encoding::Depth,
23005        ) -> fidl::Result<()> {
23006            decoder.debug_check_bounds::<Self>(offset);
23007            // Verify that padding bytes are zero.
23008            fidl::decode!(Regression10TableV2, D, &mut self.table, decoder, offset + 0, _depth)?;
23009            Ok(())
23010        }
23011    }
23012
23013    impl fidl::encoding::ValueTypeMarker for Regression10V3 {
23014        type Borrowed<'a> = &'a Self;
23015        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23016            value
23017        }
23018    }
23019
23020    unsafe impl fidl::encoding::TypeMarker for Regression10V3 {
23021        type Owned = Self;
23022
23023        #[inline(always)]
23024        fn inline_align(_context: fidl::encoding::Context) -> usize {
23025            8
23026        }
23027
23028        #[inline(always)]
23029        fn inline_size(_context: fidl::encoding::Context) -> usize {
23030            16
23031        }
23032    }
23033
23034    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V3, D>
23035        for &Regression10V3
23036    {
23037        #[inline]
23038        unsafe fn encode(
23039            self,
23040            encoder: &mut fidl::encoding::Encoder<'_, D>,
23041            offset: usize,
23042            _depth: fidl::encoding::Depth,
23043        ) -> fidl::Result<()> {
23044            encoder.debug_check_bounds::<Regression10V3>(offset);
23045            // Delegate to tuple encoding.
23046            fidl::encoding::Encode::<Regression10V3, D>::encode(
23047                (<Regression10TableV3 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
23048                encoder,
23049                offset,
23050                _depth,
23051            )
23052        }
23053    }
23054    unsafe impl<
23055        D: fidl::encoding::ResourceDialect,
23056        T0: fidl::encoding::Encode<Regression10TableV3, D>,
23057    > fidl::encoding::Encode<Regression10V3, D> for (T0,)
23058    {
23059        #[inline]
23060        unsafe fn encode(
23061            self,
23062            encoder: &mut fidl::encoding::Encoder<'_, D>,
23063            offset: usize,
23064            depth: fidl::encoding::Depth,
23065        ) -> fidl::Result<()> {
23066            encoder.debug_check_bounds::<Regression10V3>(offset);
23067            // Zero out padding regions. There's no need to apply masks
23068            // because the unmasked parts will be overwritten by fields.
23069            // Write the fields.
23070            self.0.encode(encoder, offset + 0, depth)?;
23071            Ok(())
23072        }
23073    }
23074
23075    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V3 {
23076        #[inline(always)]
23077        fn new_empty() -> Self {
23078            Self { table: fidl::new_empty!(Regression10TableV3, D) }
23079        }
23080
23081        #[inline]
23082        unsafe fn decode(
23083            &mut self,
23084            decoder: &mut fidl::encoding::Decoder<'_, D>,
23085            offset: usize,
23086            _depth: fidl::encoding::Depth,
23087        ) -> fidl::Result<()> {
23088            decoder.debug_check_bounds::<Self>(offset);
23089            // Verify that padding bytes are zero.
23090            fidl::decode!(Regression10TableV3, D, &mut self.table, decoder, offset + 0, _depth)?;
23091            Ok(())
23092        }
23093    }
23094
23095    impl fidl::encoding::ValueTypeMarker for Regression11 {
23096        type Borrowed<'a> = &'a Self;
23097        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23098            value
23099        }
23100    }
23101
23102    unsafe impl fidl::encoding::TypeMarker for Regression11 {
23103        type Owned = Self;
23104
23105        #[inline(always)]
23106        fn inline_align(_context: fidl::encoding::Context) -> usize {
23107            8
23108        }
23109
23110        #[inline(always)]
23111        fn inline_size(_context: fidl::encoding::Context) -> usize {
23112            16
23113        }
23114    }
23115
23116    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression11, D>
23117        for &Regression11
23118    {
23119        #[inline]
23120        unsafe fn encode(
23121            self,
23122            encoder: &mut fidl::encoding::Encoder<'_, D>,
23123            offset: usize,
23124            _depth: fidl::encoding::Depth,
23125        ) -> fidl::Result<()> {
23126            encoder.debug_check_bounds::<Regression11>(offset);
23127            // Delegate to tuple encoding.
23128            fidl::encoding::Encode::<Regression11, D>::encode(
23129                (<UnionWithRegression10Table as fidl::encoding::ValueTypeMarker>::borrow(
23130                    &self.table_of_table,
23131                ),),
23132                encoder,
23133                offset,
23134                _depth,
23135            )
23136        }
23137    }
23138    unsafe impl<
23139        D: fidl::encoding::ResourceDialect,
23140        T0: fidl::encoding::Encode<UnionWithRegression10Table, D>,
23141    > fidl::encoding::Encode<Regression11, D> for (T0,)
23142    {
23143        #[inline]
23144        unsafe fn encode(
23145            self,
23146            encoder: &mut fidl::encoding::Encoder<'_, D>,
23147            offset: usize,
23148            depth: fidl::encoding::Depth,
23149        ) -> fidl::Result<()> {
23150            encoder.debug_check_bounds::<Regression11>(offset);
23151            // Zero out padding regions. There's no need to apply masks
23152            // because the unmasked parts will be overwritten by fields.
23153            // Write the fields.
23154            self.0.encode(encoder, offset + 0, depth)?;
23155            Ok(())
23156        }
23157    }
23158
23159    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression11 {
23160        #[inline(always)]
23161        fn new_empty() -> Self {
23162            Self { table_of_table: fidl::new_empty!(UnionWithRegression10Table, D) }
23163        }
23164
23165        #[inline]
23166        unsafe fn decode(
23167            &mut self,
23168            decoder: &mut fidl::encoding::Decoder<'_, D>,
23169            offset: usize,
23170            _depth: fidl::encoding::Depth,
23171        ) -> fidl::Result<()> {
23172            decoder.debug_check_bounds::<Self>(offset);
23173            // Verify that padding bytes are zero.
23174            fidl::decode!(
23175                UnionWithRegression10Table,
23176                D,
23177                &mut self.table_of_table,
23178                decoder,
23179                offset + 0,
23180                _depth
23181            )?;
23182            Ok(())
23183        }
23184    }
23185
23186    impl fidl::encoding::ValueTypeMarker for Regression2 {
23187        type Borrowed<'a> = &'a Self;
23188        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23189            value
23190        }
23191    }
23192
23193    unsafe impl fidl::encoding::TypeMarker for Regression2 {
23194        type Owned = Self;
23195
23196        #[inline(always)]
23197        fn inline_align(_context: fidl::encoding::Context) -> usize {
23198            8
23199        }
23200
23201        #[inline(always)]
23202        fn inline_size(_context: fidl::encoding::Context) -> usize {
23203            40
23204        }
23205    }
23206
23207    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression2, D>
23208        for &Regression2
23209    {
23210        #[inline]
23211        unsafe fn encode(
23212            self,
23213            encoder: &mut fidl::encoding::Encoder<'_, D>,
23214            offset: usize,
23215            _depth: fidl::encoding::Depth,
23216        ) -> fidl::Result<()> {
23217            encoder.debug_check_bounds::<Regression2>(offset);
23218            unsafe {
23219                // Copy the object into the buffer.
23220                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23221                (buf_ptr as *mut Regression2).write_unaligned((self as *const Regression2).read());
23222                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
23223                // done second because the memcpy will write garbage to these bytes.
23224                let padding_ptr = buf_ptr.offset(0) as *mut u64;
23225                let padding_mask = 0xffffff00u64;
23226                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23227                let padding_ptr = buf_ptr.offset(8) as *mut u64;
23228                let padding_mask = 0xffffffff0000ff00u64;
23229                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23230                let padding_ptr = buf_ptr.offset(24) as *mut u64;
23231                let padding_mask = 0xffffffffffffff00u64;
23232                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23233                let padding_ptr = buf_ptr.offset(32) as *mut u64;
23234                let padding_mask = 0xffffffffffffff00u64;
23235                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23236            }
23237            Ok(())
23238        }
23239    }
23240    unsafe impl<
23241        D: fidl::encoding::ResourceDialect,
23242        T0: fidl::encoding::Encode<Regression1, D>,
23243        T1: fidl::encoding::Encode<u8, D>,
23244    > fidl::encoding::Encode<Regression2, D> for (T0, T1)
23245    {
23246        #[inline]
23247        unsafe fn encode(
23248            self,
23249            encoder: &mut fidl::encoding::Encoder<'_, D>,
23250            offset: usize,
23251            depth: fidl::encoding::Depth,
23252        ) -> fidl::Result<()> {
23253            encoder.debug_check_bounds::<Regression2>(offset);
23254            // Zero out padding regions. There's no need to apply masks
23255            // because the unmasked parts will be overwritten by fields.
23256            unsafe {
23257                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
23258                (ptr as *mut u64).write_unaligned(0);
23259            }
23260            // Write the fields.
23261            self.0.encode(encoder, offset + 0, depth)?;
23262            self.1.encode(encoder, offset + 32, depth)?;
23263            Ok(())
23264        }
23265    }
23266
23267    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression2 {
23268        #[inline(always)]
23269        fn new_empty() -> Self {
23270            Self { head: fidl::new_empty!(Regression1, D), f7: fidl::new_empty!(u8, D) }
23271        }
23272
23273        #[inline]
23274        unsafe fn decode(
23275            &mut self,
23276            decoder: &mut fidl::encoding::Decoder<'_, D>,
23277            offset: usize,
23278            _depth: fidl::encoding::Depth,
23279        ) -> fidl::Result<()> {
23280            decoder.debug_check_bounds::<Self>(offset);
23281            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23282            // Verify that padding bytes are zero.
23283            let ptr = unsafe { buf_ptr.offset(0) };
23284            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23285            let mask = 0xffffff00u64;
23286            let maskedval = padval & mask;
23287            if maskedval != 0 {
23288                return Err(fidl::Error::NonZeroPadding {
23289                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23290                });
23291            }
23292            let ptr = unsafe { buf_ptr.offset(8) };
23293            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23294            let mask = 0xffffffff0000ff00u64;
23295            let maskedval = padval & mask;
23296            if maskedval != 0 {
23297                return Err(fidl::Error::NonZeroPadding {
23298                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23299                });
23300            }
23301            let ptr = unsafe { buf_ptr.offset(24) };
23302            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23303            let mask = 0xffffffffffffff00u64;
23304            let maskedval = padval & mask;
23305            if maskedval != 0 {
23306                return Err(fidl::Error::NonZeroPadding {
23307                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23308                });
23309            }
23310            let ptr = unsafe { buf_ptr.offset(32) };
23311            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23312            let mask = 0xffffffffffffff00u64;
23313            let maskedval = padval & mask;
23314            if maskedval != 0 {
23315                return Err(fidl::Error::NonZeroPadding {
23316                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
23317                });
23318            }
23319            // Copy from the buffer into the object.
23320            unsafe {
23321                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 40);
23322            }
23323            Ok(())
23324        }
23325    }
23326
23327    impl fidl::encoding::ValueTypeMarker for Regression3 {
23328        type Borrowed<'a> = &'a Self;
23329        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23330            value
23331        }
23332    }
23333
23334    unsafe impl fidl::encoding::TypeMarker for Regression3 {
23335        type Owned = Self;
23336
23337        #[inline(always)]
23338        fn inline_align(_context: fidl::encoding::Context) -> usize {
23339            8
23340        }
23341
23342        #[inline(always)]
23343        fn inline_size(_context: fidl::encoding::Context) -> usize {
23344            8
23345        }
23346    }
23347
23348    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression3, D>
23349        for &Regression3
23350    {
23351        #[inline]
23352        unsafe fn encode(
23353            self,
23354            encoder: &mut fidl::encoding::Encoder<'_, D>,
23355            offset: usize,
23356            _depth: fidl::encoding::Depth,
23357        ) -> fidl::Result<()> {
23358            encoder.debug_check_bounds::<Regression3>(offset);
23359            // Delegate to tuple encoding.
23360            fidl::encoding::Encode::<Regression3, D>::encode(
23361                (<fidl::encoding::Boxed<Regression2> as fidl::encoding::ValueTypeMarker>::borrow(
23362                    &self.opt_value,
23363                ),),
23364                encoder,
23365                offset,
23366                _depth,
23367            )
23368        }
23369    }
23370    unsafe impl<
23371        D: fidl::encoding::ResourceDialect,
23372        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Regression2>, D>,
23373    > fidl::encoding::Encode<Regression3, D> for (T0,)
23374    {
23375        #[inline]
23376        unsafe fn encode(
23377            self,
23378            encoder: &mut fidl::encoding::Encoder<'_, D>,
23379            offset: usize,
23380            depth: fidl::encoding::Depth,
23381        ) -> fidl::Result<()> {
23382            encoder.debug_check_bounds::<Regression3>(offset);
23383            // Zero out padding regions. There's no need to apply masks
23384            // because the unmasked parts will be overwritten by fields.
23385            // Write the fields.
23386            self.0.encode(encoder, offset + 0, depth)?;
23387            Ok(())
23388        }
23389    }
23390
23391    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression3 {
23392        #[inline(always)]
23393        fn new_empty() -> Self {
23394            Self { opt_value: fidl::new_empty!(fidl::encoding::Boxed<Regression2>, D) }
23395        }
23396
23397        #[inline]
23398        unsafe fn decode(
23399            &mut self,
23400            decoder: &mut fidl::encoding::Decoder<'_, D>,
23401            offset: usize,
23402            _depth: fidl::encoding::Depth,
23403        ) -> fidl::Result<()> {
23404            decoder.debug_check_bounds::<Self>(offset);
23405            // Verify that padding bytes are zero.
23406            fidl::decode!(
23407                fidl::encoding::Boxed<Regression2>,
23408                D,
23409                &mut self.opt_value,
23410                decoder,
23411                offset + 0,
23412                _depth
23413            )?;
23414            Ok(())
23415        }
23416    }
23417
23418    impl fidl::encoding::ValueTypeMarker for Regression4 {
23419        type Borrowed<'a> = &'a Self;
23420        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23421            value
23422        }
23423    }
23424
23425    unsafe impl fidl::encoding::TypeMarker for Regression4 {
23426        type Owned = Self;
23427
23428        #[inline(always)]
23429        fn inline_align(_context: fidl::encoding::Context) -> usize {
23430            8
23431        }
23432
23433        #[inline(always)]
23434        fn inline_size(_context: fidl::encoding::Context) -> usize {
23435            32
23436        }
23437    }
23438
23439    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression4, D>
23440        for &Regression4
23441    {
23442        #[inline]
23443        unsafe fn encode(
23444            self,
23445            encoder: &mut fidl::encoding::Encoder<'_, D>,
23446            offset: usize,
23447            _depth: fidl::encoding::Depth,
23448        ) -> fidl::Result<()> {
23449            encoder.debug_check_bounds::<Regression4>(offset);
23450            unsafe {
23451                // Copy the object into the buffer.
23452                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23453                (buf_ptr as *mut Regression4).write_unaligned((self as *const Regression4).read());
23454                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
23455                // done second because the memcpy will write garbage to these bytes.
23456                let padding_ptr = buf_ptr.offset(0) as *mut u64;
23457                let padding_mask = 0xffffff00u64;
23458                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23459                let padding_ptr = buf_ptr.offset(8) as *mut u64;
23460                let padding_mask = 0xffff000000000000u64;
23461                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23462                let padding_ptr = buf_ptr.offset(24) as *mut u64;
23463                let padding_mask = 0xffffffffffffff00u64;
23464                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23465            }
23466            Ok(())
23467        }
23468    }
23469    unsafe impl<
23470        D: fidl::encoding::ResourceDialect,
23471        T0: fidl::encoding::Encode<u8, D>,
23472        T1: fidl::encoding::Encode<u32, D>,
23473        T2: fidl::encoding::Encode<StructSize3Align1, D>,
23474        T3: fidl::encoding::Encode<u8, D>,
23475        T4: fidl::encoding::Encode<u16, D>,
23476        T5: fidl::encoding::Encode<u64, D>,
23477        T6: fidl::encoding::Encode<u8, D>,
23478    > fidl::encoding::Encode<Regression4, D> for (T0, T1, T2, T3, T4, T5, T6)
23479    {
23480        #[inline]
23481        unsafe fn encode(
23482            self,
23483            encoder: &mut fidl::encoding::Encoder<'_, D>,
23484            offset: usize,
23485            depth: fidl::encoding::Depth,
23486        ) -> fidl::Result<()> {
23487            encoder.debug_check_bounds::<Regression4>(offset);
23488            // Zero out padding regions. There's no need to apply masks
23489            // because the unmasked parts will be overwritten by fields.
23490            unsafe {
23491                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23492                (ptr as *mut u64).write_unaligned(0);
23493            }
23494            unsafe {
23495                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23496                (ptr as *mut u64).write_unaligned(0);
23497            }
23498            unsafe {
23499                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23500                (ptr as *mut u64).write_unaligned(0);
23501            }
23502            // Write the fields.
23503            self.0.encode(encoder, offset + 0, depth)?;
23504            self.1.encode(encoder, offset + 4, depth)?;
23505            self.2.encode(encoder, offset + 8, depth)?;
23506            self.3.encode(encoder, offset + 11, depth)?;
23507            self.4.encode(encoder, offset + 12, depth)?;
23508            self.5.encode(encoder, offset + 16, depth)?;
23509            self.6.encode(encoder, offset + 24, depth)?;
23510            Ok(())
23511        }
23512    }
23513
23514    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression4 {
23515        #[inline(always)]
23516        fn new_empty() -> Self {
23517            Self {
23518                f1: fidl::new_empty!(u8, D),
23519                f2: fidl::new_empty!(u32, D),
23520                s1: fidl::new_empty!(StructSize3Align1, D),
23521                f3: fidl::new_empty!(u8, D),
23522                f4: fidl::new_empty!(u16, D),
23523                f5: fidl::new_empty!(u64, D),
23524                f6: fidl::new_empty!(u8, D),
23525            }
23526        }
23527
23528        #[inline]
23529        unsafe fn decode(
23530            &mut self,
23531            decoder: &mut fidl::encoding::Decoder<'_, D>,
23532            offset: usize,
23533            _depth: fidl::encoding::Depth,
23534        ) -> fidl::Result<()> {
23535            decoder.debug_check_bounds::<Self>(offset);
23536            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23537            // Verify that padding bytes are zero.
23538            let ptr = unsafe { buf_ptr.offset(0) };
23539            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23540            let mask = 0xffffff00u64;
23541            let maskedval = padval & mask;
23542            if maskedval != 0 {
23543                return Err(fidl::Error::NonZeroPadding {
23544                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23545                });
23546            }
23547            let ptr = unsafe { buf_ptr.offset(8) };
23548            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23549            let mask = 0xffff000000000000u64;
23550            let maskedval = padval & mask;
23551            if maskedval != 0 {
23552                return Err(fidl::Error::NonZeroPadding {
23553                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23554                });
23555            }
23556            let ptr = unsafe { buf_ptr.offset(24) };
23557            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23558            let mask = 0xffffffffffffff00u64;
23559            let maskedval = padval & mask;
23560            if maskedval != 0 {
23561                return Err(fidl::Error::NonZeroPadding {
23562                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23563                });
23564            }
23565            // Copy from the buffer into the object.
23566            unsafe {
23567                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
23568            }
23569            Ok(())
23570        }
23571    }
23572
23573    impl fidl::encoding::ValueTypeMarker for Regression5 {
23574        type Borrowed<'a> = &'a Self;
23575        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23576            value
23577        }
23578    }
23579
23580    unsafe impl fidl::encoding::TypeMarker for Regression5 {
23581        type Owned = Self;
23582
23583        #[inline(always)]
23584        fn inline_align(_context: fidl::encoding::Context) -> usize {
23585            8
23586        }
23587
23588        #[inline(always)]
23589        fn inline_size(_context: fidl::encoding::Context) -> usize {
23590            32
23591        }
23592    }
23593
23594    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression5, D>
23595        for &Regression5
23596    {
23597        #[inline]
23598        unsafe fn encode(
23599            self,
23600            encoder: &mut fidl::encoding::Encoder<'_, D>,
23601            offset: usize,
23602            _depth: fidl::encoding::Depth,
23603        ) -> fidl::Result<()> {
23604            encoder.debug_check_bounds::<Regression5>(offset);
23605            // Delegate to tuple encoding.
23606            fidl::encoding::Encode::<Regression5, D>::encode(
23607                (
23608                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23609                    <EnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23610                    <EnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23611                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23612                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23613                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23614                ),
23615                encoder,
23616                offset,
23617                _depth,
23618            )
23619        }
23620    }
23621    unsafe impl<
23622        D: fidl::encoding::ResourceDialect,
23623        T0: fidl::encoding::Encode<u8, D>,
23624        T1: fidl::encoding::Encode<EnumUint32, D>,
23625        T2: fidl::encoding::Encode<EnumUint8, D>,
23626        T3: fidl::encoding::Encode<u16, D>,
23627        T4: fidl::encoding::Encode<u64, D>,
23628        T5: fidl::encoding::Encode<u8, D>,
23629    > fidl::encoding::Encode<Regression5, D> for (T0, T1, T2, T3, T4, T5)
23630    {
23631        #[inline]
23632        unsafe fn encode(
23633            self,
23634            encoder: &mut fidl::encoding::Encoder<'_, D>,
23635            offset: usize,
23636            depth: fidl::encoding::Depth,
23637        ) -> fidl::Result<()> {
23638            encoder.debug_check_bounds::<Regression5>(offset);
23639            // Zero out padding regions. There's no need to apply masks
23640            // because the unmasked parts will be overwritten by fields.
23641            unsafe {
23642                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23643                (ptr as *mut u64).write_unaligned(0);
23644            }
23645            unsafe {
23646                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23647                (ptr as *mut u64).write_unaligned(0);
23648            }
23649            unsafe {
23650                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23651                (ptr as *mut u64).write_unaligned(0);
23652            }
23653            // Write the fields.
23654            self.0.encode(encoder, offset + 0, depth)?;
23655            self.1.encode(encoder, offset + 4, depth)?;
23656            self.2.encode(encoder, offset + 8, depth)?;
23657            self.3.encode(encoder, offset + 10, depth)?;
23658            self.4.encode(encoder, offset + 16, depth)?;
23659            self.5.encode(encoder, offset + 24, depth)?;
23660            Ok(())
23661        }
23662    }
23663
23664    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression5 {
23665        #[inline(always)]
23666        fn new_empty() -> Self {
23667            Self {
23668                f1: fidl::new_empty!(u8, D),
23669                f2: fidl::new_empty!(EnumUint32, D),
23670                f3: fidl::new_empty!(EnumUint8, D),
23671                f4: fidl::new_empty!(u16, D),
23672                f5: fidl::new_empty!(u64, D),
23673                f6: fidl::new_empty!(u8, D),
23674            }
23675        }
23676
23677        #[inline]
23678        unsafe fn decode(
23679            &mut self,
23680            decoder: &mut fidl::encoding::Decoder<'_, D>,
23681            offset: usize,
23682            _depth: fidl::encoding::Depth,
23683        ) -> fidl::Result<()> {
23684            decoder.debug_check_bounds::<Self>(offset);
23685            // Verify that padding bytes are zero.
23686            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23687            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23688            let mask = 0xffffff00u64;
23689            let maskedval = padval & mask;
23690            if maskedval != 0 {
23691                return Err(fidl::Error::NonZeroPadding {
23692                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23693                });
23694            }
23695            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23696            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23697            let mask = 0xffffffff0000ff00u64;
23698            let maskedval = padval & mask;
23699            if maskedval != 0 {
23700                return Err(fidl::Error::NonZeroPadding {
23701                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23702                });
23703            }
23704            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23705            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23706            let mask = 0xffffffffffffff00u64;
23707            let maskedval = padval & mask;
23708            if maskedval != 0 {
23709                return Err(fidl::Error::NonZeroPadding {
23710                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23711                });
23712            }
23713            fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23714            fidl::decode!(EnumUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23715            fidl::decode!(EnumUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23716            fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23717            fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23718            fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23719            Ok(())
23720        }
23721    }
23722
23723    impl fidl::encoding::ValueTypeMarker for Regression6 {
23724        type Borrowed<'a> = &'a Self;
23725        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23726            value
23727        }
23728    }
23729
23730    unsafe impl fidl::encoding::TypeMarker for Regression6 {
23731        type Owned = Self;
23732
23733        #[inline(always)]
23734        fn inline_align(_context: fidl::encoding::Context) -> usize {
23735            8
23736        }
23737
23738        #[inline(always)]
23739        fn inline_size(_context: fidl::encoding::Context) -> usize {
23740            32
23741        }
23742    }
23743
23744    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression6, D>
23745        for &Regression6
23746    {
23747        #[inline]
23748        unsafe fn encode(
23749            self,
23750            encoder: &mut fidl::encoding::Encoder<'_, D>,
23751            offset: usize,
23752            _depth: fidl::encoding::Depth,
23753        ) -> fidl::Result<()> {
23754            encoder.debug_check_bounds::<Regression6>(offset);
23755            // Delegate to tuple encoding.
23756            fidl::encoding::Encode::<Regression6, D>::encode(
23757                (
23758                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23759                    <BitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23760                    <BitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23761                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23762                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23763                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23764                ),
23765                encoder,
23766                offset,
23767                _depth,
23768            )
23769        }
23770    }
23771    unsafe impl<
23772        D: fidl::encoding::ResourceDialect,
23773        T0: fidl::encoding::Encode<u8, D>,
23774        T1: fidl::encoding::Encode<BitsUint32, D>,
23775        T2: fidl::encoding::Encode<BitsUint8, D>,
23776        T3: fidl::encoding::Encode<u16, D>,
23777        T4: fidl::encoding::Encode<u64, D>,
23778        T5: fidl::encoding::Encode<u8, D>,
23779    > fidl::encoding::Encode<Regression6, D> for (T0, T1, T2, T3, T4, T5)
23780    {
23781        #[inline]
23782        unsafe fn encode(
23783            self,
23784            encoder: &mut fidl::encoding::Encoder<'_, D>,
23785            offset: usize,
23786            depth: fidl::encoding::Depth,
23787        ) -> fidl::Result<()> {
23788            encoder.debug_check_bounds::<Regression6>(offset);
23789            // Zero out padding regions. There's no need to apply masks
23790            // because the unmasked parts will be overwritten by fields.
23791            unsafe {
23792                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23793                (ptr as *mut u64).write_unaligned(0);
23794            }
23795            unsafe {
23796                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23797                (ptr as *mut u64).write_unaligned(0);
23798            }
23799            unsafe {
23800                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23801                (ptr as *mut u64).write_unaligned(0);
23802            }
23803            // Write the fields.
23804            self.0.encode(encoder, offset + 0, depth)?;
23805            self.1.encode(encoder, offset + 4, depth)?;
23806            self.2.encode(encoder, offset + 8, depth)?;
23807            self.3.encode(encoder, offset + 10, depth)?;
23808            self.4.encode(encoder, offset + 16, depth)?;
23809            self.5.encode(encoder, offset + 24, depth)?;
23810            Ok(())
23811        }
23812    }
23813
23814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression6 {
23815        #[inline(always)]
23816        fn new_empty() -> Self {
23817            Self {
23818                f1: fidl::new_empty!(u8, D),
23819                f2: fidl::new_empty!(BitsUint32, D),
23820                f3: fidl::new_empty!(BitsUint8, D),
23821                f4: fidl::new_empty!(u16, D),
23822                f5: fidl::new_empty!(u64, D),
23823                f6: fidl::new_empty!(u8, D),
23824            }
23825        }
23826
23827        #[inline]
23828        unsafe fn decode(
23829            &mut self,
23830            decoder: &mut fidl::encoding::Decoder<'_, D>,
23831            offset: usize,
23832            _depth: fidl::encoding::Depth,
23833        ) -> fidl::Result<()> {
23834            decoder.debug_check_bounds::<Self>(offset);
23835            // Verify that padding bytes are zero.
23836            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23837            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23838            let mask = 0xffffff00u64;
23839            let maskedval = padval & mask;
23840            if maskedval != 0 {
23841                return Err(fidl::Error::NonZeroPadding {
23842                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23843                });
23844            }
23845            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23846            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23847            let mask = 0xffffffff0000ff00u64;
23848            let maskedval = padval & mask;
23849            if maskedval != 0 {
23850                return Err(fidl::Error::NonZeroPadding {
23851                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23852                });
23853            }
23854            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23855            let padval = unsafe { (ptr as *const u64).read_unaligned() };
23856            let mask = 0xffffffffffffff00u64;
23857            let maskedval = padval & mask;
23858            if maskedval != 0 {
23859                return Err(fidl::Error::NonZeroPadding {
23860                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23861                });
23862            }
23863            fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23864            fidl::decode!(BitsUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23865            fidl::decode!(BitsUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23866            fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23867            fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23868            fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23869            Ok(())
23870        }
23871    }
23872
23873    impl fidl::encoding::ValueTypeMarker for Regression7TableUnionXUnion {
23874        type Borrowed<'a> = &'a Self;
23875        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23876            value
23877        }
23878    }
23879
23880    unsafe impl fidl::encoding::TypeMarker for Regression7TableUnionXUnion {
23881        type Owned = Self;
23882
23883        #[inline(always)]
23884        fn inline_align(_context: fidl::encoding::Context) -> usize {
23885            8
23886        }
23887
23888        #[inline(always)]
23889        fn inline_size(_context: fidl::encoding::Context) -> usize {
23890            16
23891        }
23892    }
23893
23894    unsafe impl<D: fidl::encoding::ResourceDialect>
23895        fidl::encoding::Encode<Regression7TableUnionXUnion, D> for &Regression7TableUnionXUnion
23896    {
23897        #[inline]
23898        unsafe fn encode(
23899            self,
23900            encoder: &mut fidl::encoding::Encoder<'_, D>,
23901            offset: usize,
23902            _depth: fidl::encoding::Depth,
23903        ) -> fidl::Result<()> {
23904            encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23905            // Delegate to tuple encoding.
23906            fidl::encoding::Encode::<Regression7TableUnionXUnion, D>::encode(
23907                (
23908                    <TableOfUnionThenXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
23909                ),
23910                encoder, offset, _depth
23911            )
23912        }
23913    }
23914    unsafe impl<
23915        D: fidl::encoding::ResourceDialect,
23916        T0: fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>,
23917    > fidl::encoding::Encode<Regression7TableUnionXUnion, D> for (T0,)
23918    {
23919        #[inline]
23920        unsafe fn encode(
23921            self,
23922            encoder: &mut fidl::encoding::Encoder<'_, D>,
23923            offset: usize,
23924            depth: fidl::encoding::Depth,
23925        ) -> fidl::Result<()> {
23926            encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23927            // Zero out padding regions. There's no need to apply masks
23928            // because the unmasked parts will be overwritten by fields.
23929            // Write the fields.
23930            self.0.encode(encoder, offset + 0, depth)?;
23931            Ok(())
23932        }
23933    }
23934
23935    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23936        for Regression7TableUnionXUnion
23937    {
23938        #[inline(always)]
23939        fn new_empty() -> Self {
23940            Self { value: fidl::new_empty!(TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D) }
23941        }
23942
23943        #[inline]
23944        unsafe fn decode(
23945            &mut self,
23946            decoder: &mut fidl::encoding::Decoder<'_, D>,
23947            offset: usize,
23948            _depth: fidl::encoding::Depth,
23949        ) -> fidl::Result<()> {
23950            decoder.debug_check_bounds::<Self>(offset);
23951            // Verify that padding bytes are zero.
23952            fidl::decode!(
23953                TableOfUnionThenXUnionThenTableThenXUnionThenUnion,
23954                D,
23955                &mut self.value,
23956                decoder,
23957                offset + 0,
23958                _depth
23959            )?;
23960            Ok(())
23961        }
23962    }
23963
23964    impl fidl::encoding::ValueTypeMarker for Regression8OptUnionSize12Align4 {
23965        type Borrowed<'a> = &'a Self;
23966        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23967            value
23968        }
23969    }
23970
23971    unsafe impl fidl::encoding::TypeMarker for Regression8OptUnionSize12Align4 {
23972        type Owned = Self;
23973
23974        #[inline(always)]
23975        fn inline_align(_context: fidl::encoding::Context) -> usize {
23976            8
23977        }
23978
23979        #[inline(always)]
23980        fn inline_size(_context: fidl::encoding::Context) -> usize {
23981            48
23982        }
23983    }
23984
23985    unsafe impl<D: fidl::encoding::ResourceDialect>
23986        fidl::encoding::Encode<Regression8OptUnionSize12Align4, D>
23987        for &Regression8OptUnionSize12Align4
23988    {
23989        #[inline]
23990        unsafe fn encode(
23991            self,
23992            encoder: &mut fidl::encoding::Encoder<'_, D>,
23993            offset: usize,
23994            _depth: fidl::encoding::Depth,
23995        ) -> fidl::Result<()> {
23996            encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
23997            // Delegate to tuple encoding.
23998            fidl::encoding::Encode::<Regression8OptUnionSize12Align4, D>::encode(
23999                (
24000                    <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union1),
24001                    <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union2),
24002                    <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union3),
24003                ),
24004                encoder, offset, _depth
24005            )
24006        }
24007    }
24008    unsafe impl<
24009        D: fidl::encoding::ResourceDialect,
24010        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
24011        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
24012        T2: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
24013    > fidl::encoding::Encode<Regression8OptUnionSize12Align4, D> for (T0, T1, T2)
24014    {
24015        #[inline]
24016        unsafe fn encode(
24017            self,
24018            encoder: &mut fidl::encoding::Encoder<'_, D>,
24019            offset: usize,
24020            depth: fidl::encoding::Depth,
24021        ) -> fidl::Result<()> {
24022            encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
24023            // Zero out padding regions. There's no need to apply masks
24024            // because the unmasked parts will be overwritten by fields.
24025            // Write the fields.
24026            self.0.encode(encoder, offset + 0, depth)?;
24027            self.1.encode(encoder, offset + 16, depth)?;
24028            self.2.encode(encoder, offset + 32, depth)?;
24029            Ok(())
24030        }
24031    }
24032
24033    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24034        for Regression8OptUnionSize12Align4
24035    {
24036        #[inline(always)]
24037        fn new_empty() -> Self {
24038            Self {
24039                opt_union1: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
24040                opt_union2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
24041                opt_union3: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
24042            }
24043        }
24044
24045        #[inline]
24046        unsafe fn decode(
24047            &mut self,
24048            decoder: &mut fidl::encoding::Decoder<'_, D>,
24049            offset: usize,
24050            _depth: fidl::encoding::Depth,
24051        ) -> fidl::Result<()> {
24052            decoder.debug_check_bounds::<Self>(offset);
24053            // Verify that padding bytes are zero.
24054            fidl::decode!(
24055                fidl::encoding::OptionalUnion<UnionSize12Align4>,
24056                D,
24057                &mut self.opt_union1,
24058                decoder,
24059                offset + 0,
24060                _depth
24061            )?;
24062            fidl::decode!(
24063                fidl::encoding::OptionalUnion<UnionSize12Align4>,
24064                D,
24065                &mut self.opt_union2,
24066                decoder,
24067                offset + 16,
24068                _depth
24069            )?;
24070            fidl::decode!(
24071                fidl::encoding::OptionalUnion<UnionSize12Align4>,
24072                D,
24073                &mut self.opt_union3,
24074                decoder,
24075                offset + 32,
24076                _depth
24077            )?;
24078            Ok(())
24079        }
24080    }
24081
24082    impl fidl::encoding::ValueTypeMarker for Regression8TableWithUnionSize12Align4 {
24083        type Borrowed<'a> = &'a Self;
24084        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24085            value
24086        }
24087    }
24088
24089    unsafe impl fidl::encoding::TypeMarker for Regression8TableWithUnionSize12Align4 {
24090        type Owned = Self;
24091
24092        #[inline(always)]
24093        fn inline_align(_context: fidl::encoding::Context) -> usize {
24094            8
24095        }
24096
24097        #[inline(always)]
24098        fn inline_size(_context: fidl::encoding::Context) -> usize {
24099            16
24100        }
24101    }
24102
24103    unsafe impl<D: fidl::encoding::ResourceDialect>
24104        fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D>
24105        for &Regression8TableWithUnionSize12Align4
24106    {
24107        #[inline]
24108        unsafe fn encode(
24109            self,
24110            encoder: &mut fidl::encoding::Encoder<'_, D>,
24111            offset: usize,
24112            _depth: fidl::encoding::Depth,
24113        ) -> fidl::Result<()> {
24114            encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
24115            // Delegate to tuple encoding.
24116            fidl::encoding::Encode::<Regression8TableWithUnionSize12Align4, D>::encode(
24117                (<TableWithUnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(
24118                    &self.value,
24119                ),),
24120                encoder,
24121                offset,
24122                _depth,
24123            )
24124        }
24125    }
24126    unsafe impl<
24127        D: fidl::encoding::ResourceDialect,
24128        T0: fidl::encoding::Encode<TableWithUnionSize12Align4, D>,
24129    > fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D> for (T0,)
24130    {
24131        #[inline]
24132        unsafe fn encode(
24133            self,
24134            encoder: &mut fidl::encoding::Encoder<'_, D>,
24135            offset: usize,
24136            depth: fidl::encoding::Depth,
24137        ) -> fidl::Result<()> {
24138            encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
24139            // Zero out padding regions. There's no need to apply masks
24140            // because the unmasked parts will be overwritten by fields.
24141            // Write the fields.
24142            self.0.encode(encoder, offset + 0, depth)?;
24143            Ok(())
24144        }
24145    }
24146
24147    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24148        for Regression8TableWithUnionSize12Align4
24149    {
24150        #[inline(always)]
24151        fn new_empty() -> Self {
24152            Self { value: fidl::new_empty!(TableWithUnionSize12Align4, D) }
24153        }
24154
24155        #[inline]
24156        unsafe fn decode(
24157            &mut self,
24158            decoder: &mut fidl::encoding::Decoder<'_, D>,
24159            offset: usize,
24160            _depth: fidl::encoding::Depth,
24161        ) -> fidl::Result<()> {
24162            decoder.debug_check_bounds::<Self>(offset);
24163            // Verify that padding bytes are zero.
24164            fidl::decode!(
24165                TableWithUnionSize12Align4,
24166                D,
24167                &mut self.value,
24168                decoder,
24169                offset + 0,
24170                _depth
24171            )?;
24172            Ok(())
24173        }
24174    }
24175
24176    impl fidl::encoding::ValueTypeMarker for Regression8VectorOfOptUnionSize12Align4 {
24177        type Borrowed<'a> = &'a Self;
24178        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24179            value
24180        }
24181    }
24182
24183    unsafe impl fidl::encoding::TypeMarker for Regression8VectorOfOptUnionSize12Align4 {
24184        type Owned = Self;
24185
24186        #[inline(always)]
24187        fn inline_align(_context: fidl::encoding::Context) -> usize {
24188            8
24189        }
24190
24191        #[inline(always)]
24192        fn inline_size(_context: fidl::encoding::Context) -> usize {
24193            16
24194        }
24195    }
24196
24197    unsafe impl<D: fidl::encoding::ResourceDialect>
24198        fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D>
24199        for &Regression8VectorOfOptUnionSize12Align4
24200    {
24201        #[inline]
24202        unsafe fn encode(
24203            self,
24204            encoder: &mut fidl::encoding::Encoder<'_, D>,
24205            offset: usize,
24206            _depth: fidl::encoding::Depth,
24207        ) -> fidl::Result<()> {
24208            encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24209            // Delegate to tuple encoding.
24210            fidl::encoding::Encode::<Regression8VectorOfOptUnionSize12Align4, D>::encode(
24211                (
24212                    <fidl::encoding::UnboundedVector<
24213                        fidl::encoding::OptionalUnion<UnionSize12Align4>,
24214                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
24215                ),
24216                encoder,
24217                offset,
24218                _depth,
24219            )
24220        }
24221    }
24222    unsafe impl<
24223        D: fidl::encoding::ResourceDialect,
24224        T0: fidl::encoding::Encode<
24225                fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24226                D,
24227            >,
24228    > fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D> for (T0,)
24229    {
24230        #[inline]
24231        unsafe fn encode(
24232            self,
24233            encoder: &mut fidl::encoding::Encoder<'_, D>,
24234            offset: usize,
24235            depth: fidl::encoding::Depth,
24236        ) -> fidl::Result<()> {
24237            encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24238            // Zero out padding regions. There's no need to apply masks
24239            // because the unmasked parts will be overwritten by fields.
24240            // Write the fields.
24241            self.0.encode(encoder, offset + 0, depth)?;
24242            Ok(())
24243        }
24244    }
24245
24246    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24247        for Regression8VectorOfOptUnionSize12Align4
24248    {
24249        #[inline(always)]
24250        fn new_empty() -> Self {
24251            Self {
24252                value: fidl::new_empty!(
24253                    fidl::encoding::UnboundedVector<
24254                        fidl::encoding::OptionalUnion<UnionSize12Align4>,
24255                    >,
24256                    D
24257                ),
24258            }
24259        }
24260
24261        #[inline]
24262        unsafe fn decode(
24263            &mut self,
24264            decoder: &mut fidl::encoding::Decoder<'_, D>,
24265            offset: usize,
24266            _depth: fidl::encoding::Depth,
24267        ) -> fidl::Result<()> {
24268            decoder.debug_check_bounds::<Self>(offset);
24269            // Verify that padding bytes are zero.
24270            fidl::decode!(
24271                fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24272                D,
24273                &mut self.value,
24274                decoder,
24275                offset + 0,
24276                _depth
24277            )?;
24278            Ok(())
24279        }
24280    }
24281
24282    impl fidl::encoding::ValueTypeMarker for Regression9Message {
24283        type Borrowed<'a> = &'a Self;
24284        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24285            value
24286        }
24287    }
24288
24289    unsafe impl fidl::encoding::TypeMarker for Regression9Message {
24290        type Owned = Self;
24291
24292        #[inline(always)]
24293        fn inline_align(_context: fidl::encoding::Context) -> usize {
24294            8
24295        }
24296
24297        #[inline(always)]
24298        fn inline_size(_context: fidl::encoding::Context) -> usize {
24299            32
24300        }
24301    }
24302
24303    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Message, D>
24304        for &Regression9Message
24305    {
24306        #[inline]
24307        unsafe fn encode(
24308            self,
24309            encoder: &mut fidl::encoding::Encoder<'_, D>,
24310            offset: usize,
24311            _depth: fidl::encoding::Depth,
24312        ) -> fidl::Result<()> {
24313            encoder.debug_check_bounds::<Regression9Message>(offset);
24314            // Delegate to tuple encoding.
24315            fidl::encoding::Encode::<Regression9Message, D>::encode(
24316                (
24317                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24318                    <Regression9Result as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24319                ),
24320                encoder,
24321                offset,
24322                _depth,
24323            )
24324        }
24325    }
24326    unsafe impl<
24327        D: fidl::encoding::ResourceDialect,
24328        T0: fidl::encoding::Encode<TransactionHeader, D>,
24329        T1: fidl::encoding::Encode<Regression9Result, D>,
24330    > fidl::encoding::Encode<Regression9Message, D> for (T0, T1)
24331    {
24332        #[inline]
24333        unsafe fn encode(
24334            self,
24335            encoder: &mut fidl::encoding::Encoder<'_, D>,
24336            offset: usize,
24337            depth: fidl::encoding::Depth,
24338        ) -> fidl::Result<()> {
24339            encoder.debug_check_bounds::<Regression9Message>(offset);
24340            // Zero out padding regions. There's no need to apply masks
24341            // because the unmasked parts will be overwritten by fields.
24342            // Write the fields.
24343            self.0.encode(encoder, offset + 0, depth)?;
24344            self.1.encode(encoder, offset + 16, depth)?;
24345            Ok(())
24346        }
24347    }
24348
24349    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Message {
24350        #[inline(always)]
24351        fn new_empty() -> Self {
24352            Self {
24353                header: fidl::new_empty!(TransactionHeader, D),
24354                body: fidl::new_empty!(Regression9Result, D),
24355            }
24356        }
24357
24358        #[inline]
24359        unsafe fn decode(
24360            &mut self,
24361            decoder: &mut fidl::encoding::Decoder<'_, D>,
24362            offset: usize,
24363            _depth: fidl::encoding::Depth,
24364        ) -> fidl::Result<()> {
24365            decoder.debug_check_bounds::<Self>(offset);
24366            // Verify that padding bytes are zero.
24367            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24368            fidl::decode!(Regression9Result, D, &mut self.body, decoder, offset + 16, _depth)?;
24369            Ok(())
24370        }
24371    }
24372
24373    impl fidl::encoding::ValueTypeMarker for Regression9Value {
24374        type Borrowed<'a> = &'a Self;
24375        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24376            value
24377        }
24378    }
24379
24380    unsafe impl fidl::encoding::TypeMarker for Regression9Value {
24381        type Owned = Self;
24382
24383        #[inline(always)]
24384        fn inline_align(_context: fidl::encoding::Context) -> usize {
24385            8
24386        }
24387
24388        #[inline(always)]
24389        fn inline_size(_context: fidl::encoding::Context) -> usize {
24390            32
24391        }
24392    }
24393
24394    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Value, D>
24395        for &Regression9Value
24396    {
24397        #[inline]
24398        unsafe fn encode(
24399            self,
24400            encoder: &mut fidl::encoding::Encoder<'_, D>,
24401            offset: usize,
24402            _depth: fidl::encoding::Depth,
24403        ) -> fidl::Result<()> {
24404            encoder.debug_check_bounds::<Regression9Value>(offset);
24405            // Delegate to tuple encoding.
24406            fidl::encoding::Encode::<Regression9Value, D>::encode(
24407                (
24408                    <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
24409                    <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
24410                ),
24411                encoder, offset, _depth
24412            )
24413        }
24414    }
24415    unsafe impl<
24416        D: fidl::encoding::ResourceDialect,
24417        T0: fidl::encoding::Encode<StringBoolUnion, D>,
24418        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
24419    > fidl::encoding::Encode<Regression9Value, D> for (T0, T1)
24420    {
24421        #[inline]
24422        unsafe fn encode(
24423            self,
24424            encoder: &mut fidl::encoding::Encoder<'_, D>,
24425            offset: usize,
24426            depth: fidl::encoding::Depth,
24427        ) -> fidl::Result<()> {
24428            encoder.debug_check_bounds::<Regression9Value>(offset);
24429            // Zero out padding regions. There's no need to apply masks
24430            // because the unmasked parts will be overwritten by fields.
24431            // Write the fields.
24432            self.0.encode(encoder, offset + 0, depth)?;
24433            self.1.encode(encoder, offset + 16, depth)?;
24434            Ok(())
24435        }
24436    }
24437
24438    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Value {
24439        #[inline(always)]
24440        fn new_empty() -> Self {
24441            Self {
24442                u: fidl::new_empty!(StringBoolUnion, D),
24443                nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
24444            }
24445        }
24446
24447        #[inline]
24448        unsafe fn decode(
24449            &mut self,
24450            decoder: &mut fidl::encoding::Decoder<'_, D>,
24451            offset: usize,
24452            _depth: fidl::encoding::Depth,
24453        ) -> fidl::Result<()> {
24454            decoder.debug_check_bounds::<Self>(offset);
24455            // Verify that padding bytes are zero.
24456            fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24457            fidl::decode!(
24458                fidl::encoding::OptionalUnion<StringBoolUnion>,
24459                D,
24460                &mut self.nullable_u,
24461                decoder,
24462                offset + 16,
24463                _depth
24464            )?;
24465            Ok(())
24466        }
24467    }
24468
24469    impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnionStruct {
24470        type Borrowed<'a> = &'a Self;
24471        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24472            value
24473        }
24474    }
24475
24476    unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnionStruct {
24477        type Owned = Self;
24478
24479        #[inline(always)]
24480        fn inline_align(_context: fidl::encoding::Context) -> usize {
24481            8
24482        }
24483
24484        #[inline(always)]
24485        fn inline_size(_context: fidl::encoding::Context) -> usize {
24486            16
24487        }
24488    }
24489
24490    unsafe impl<D: fidl::encoding::ResourceDialect>
24491        fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for &ReverseOrdinalUnionStruct
24492    {
24493        #[inline]
24494        unsafe fn encode(
24495            self,
24496            encoder: &mut fidl::encoding::Encoder<'_, D>,
24497            offset: usize,
24498            _depth: fidl::encoding::Depth,
24499        ) -> fidl::Result<()> {
24500            encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24501            // Delegate to tuple encoding.
24502            fidl::encoding::Encode::<ReverseOrdinalUnionStruct, D>::encode(
24503                (<ReverseOrdinalUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
24504                encoder,
24505                offset,
24506                _depth,
24507            )
24508        }
24509    }
24510    unsafe impl<
24511        D: fidl::encoding::ResourceDialect,
24512        T0: fidl::encoding::Encode<ReverseOrdinalUnion, D>,
24513    > fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for (T0,)
24514    {
24515        #[inline]
24516        unsafe fn encode(
24517            self,
24518            encoder: &mut fidl::encoding::Encoder<'_, D>,
24519            offset: usize,
24520            depth: fidl::encoding::Depth,
24521        ) -> fidl::Result<()> {
24522            encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24523            // Zero out padding regions. There's no need to apply masks
24524            // because the unmasked parts will be overwritten by fields.
24525            // Write the fields.
24526            self.0.encode(encoder, offset + 0, depth)?;
24527            Ok(())
24528        }
24529    }
24530
24531    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24532        for ReverseOrdinalUnionStruct
24533    {
24534        #[inline(always)]
24535        fn new_empty() -> Self {
24536            Self { u: fidl::new_empty!(ReverseOrdinalUnion, D) }
24537        }
24538
24539        #[inline]
24540        unsafe fn decode(
24541            &mut self,
24542            decoder: &mut fidl::encoding::Decoder<'_, D>,
24543            offset: usize,
24544            _depth: fidl::encoding::Depth,
24545        ) -> fidl::Result<()> {
24546            decoder.debug_check_bounds::<Self>(offset);
24547            // Verify that padding bytes are zero.
24548            fidl::decode!(ReverseOrdinalUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24549            Ok(())
24550        }
24551    }
24552
24553    impl fidl::encoding::ValueTypeMarker for Sandwich1 {
24554        type Borrowed<'a> = &'a Self;
24555        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24556            value
24557        }
24558    }
24559
24560    unsafe impl fidl::encoding::TypeMarker for Sandwich1 {
24561        type Owned = Self;
24562
24563        #[inline(always)]
24564        fn inline_align(_context: fidl::encoding::Context) -> usize {
24565            8
24566        }
24567
24568        #[inline(always)]
24569        fn inline_size(_context: fidl::encoding::Context) -> usize {
24570            32
24571        }
24572    }
24573
24574    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1, D>
24575        for &Sandwich1
24576    {
24577        #[inline]
24578        unsafe fn encode(
24579            self,
24580            encoder: &mut fidl::encoding::Encoder<'_, D>,
24581            offset: usize,
24582            _depth: fidl::encoding::Depth,
24583        ) -> fidl::Result<()> {
24584            encoder.debug_check_bounds::<Sandwich1>(offset);
24585            // Delegate to tuple encoding.
24586            fidl::encoding::Encode::<Sandwich1, D>::encode(
24587                (
24588                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24589                    <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24590                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24591                ),
24592                encoder,
24593                offset,
24594                _depth,
24595            )
24596        }
24597    }
24598    unsafe impl<
24599        D: fidl::encoding::ResourceDialect,
24600        T0: fidl::encoding::Encode<u32, D>,
24601        T1: fidl::encoding::Encode<UnionSize8Align4, D>,
24602        T2: fidl::encoding::Encode<u32, D>,
24603    > fidl::encoding::Encode<Sandwich1, D> for (T0, T1, T2)
24604    {
24605        #[inline]
24606        unsafe fn encode(
24607            self,
24608            encoder: &mut fidl::encoding::Encoder<'_, D>,
24609            offset: usize,
24610            depth: fidl::encoding::Depth,
24611        ) -> fidl::Result<()> {
24612            encoder.debug_check_bounds::<Sandwich1>(offset);
24613            // Zero out padding regions. There's no need to apply masks
24614            // because the unmasked parts will be overwritten by fields.
24615            unsafe {
24616                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24617                (ptr as *mut u64).write_unaligned(0);
24618            }
24619            unsafe {
24620                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24621                (ptr as *mut u64).write_unaligned(0);
24622            }
24623            // Write the fields.
24624            self.0.encode(encoder, offset + 0, depth)?;
24625            self.1.encode(encoder, offset + 8, depth)?;
24626            self.2.encode(encoder, offset + 24, depth)?;
24627            Ok(())
24628        }
24629    }
24630
24631    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1 {
24632        #[inline(always)]
24633        fn new_empty() -> Self {
24634            Self {
24635                before: fidl::new_empty!(u32, D),
24636                the_union: fidl::new_empty!(UnionSize8Align4, D),
24637                after: fidl::new_empty!(u32, D),
24638            }
24639        }
24640
24641        #[inline]
24642        unsafe fn decode(
24643            &mut self,
24644            decoder: &mut fidl::encoding::Decoder<'_, D>,
24645            offset: usize,
24646            _depth: fidl::encoding::Depth,
24647        ) -> fidl::Result<()> {
24648            decoder.debug_check_bounds::<Self>(offset);
24649            // Verify that padding bytes are zero.
24650            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24651            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24652            let mask = 0xffffffff00000000u64;
24653            let maskedval = padval & mask;
24654            if maskedval != 0 {
24655                return Err(fidl::Error::NonZeroPadding {
24656                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24657                });
24658            }
24659            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24660            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24661            let mask = 0xffffffff00000000u64;
24662            let maskedval = padval & mask;
24663            if maskedval != 0 {
24664                return Err(fidl::Error::NonZeroPadding {
24665                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24666                });
24667            }
24668            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24669            fidl::decode!(UnionSize8Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24670            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24671            Ok(())
24672        }
24673    }
24674
24675    impl fidl::encoding::ValueTypeMarker for Sandwich1Message {
24676        type Borrowed<'a> = &'a Self;
24677        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24678            value
24679        }
24680    }
24681
24682    unsafe impl fidl::encoding::TypeMarker for Sandwich1Message {
24683        type Owned = Self;
24684
24685        #[inline(always)]
24686        fn inline_align(_context: fidl::encoding::Context) -> usize {
24687            8
24688        }
24689
24690        #[inline(always)]
24691        fn inline_size(_context: fidl::encoding::Context) -> usize {
24692            48
24693        }
24694    }
24695
24696    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1Message, D>
24697        for &Sandwich1Message
24698    {
24699        #[inline]
24700        unsafe fn encode(
24701            self,
24702            encoder: &mut fidl::encoding::Encoder<'_, D>,
24703            offset: usize,
24704            _depth: fidl::encoding::Depth,
24705        ) -> fidl::Result<()> {
24706            encoder.debug_check_bounds::<Sandwich1Message>(offset);
24707            // Delegate to tuple encoding.
24708            fidl::encoding::Encode::<Sandwich1Message, D>::encode(
24709                (
24710                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24711                    <Sandwich1 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24712                ),
24713                encoder,
24714                offset,
24715                _depth,
24716            )
24717        }
24718    }
24719    unsafe impl<
24720        D: fidl::encoding::ResourceDialect,
24721        T0: fidl::encoding::Encode<TransactionHeader, D>,
24722        T1: fidl::encoding::Encode<Sandwich1, D>,
24723    > fidl::encoding::Encode<Sandwich1Message, D> for (T0, T1)
24724    {
24725        #[inline]
24726        unsafe fn encode(
24727            self,
24728            encoder: &mut fidl::encoding::Encoder<'_, D>,
24729            offset: usize,
24730            depth: fidl::encoding::Depth,
24731        ) -> fidl::Result<()> {
24732            encoder.debug_check_bounds::<Sandwich1Message>(offset);
24733            // Zero out padding regions. There's no need to apply masks
24734            // because the unmasked parts will be overwritten by fields.
24735            // Write the fields.
24736            self.0.encode(encoder, offset + 0, depth)?;
24737            self.1.encode(encoder, offset + 16, depth)?;
24738            Ok(())
24739        }
24740    }
24741
24742    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1Message {
24743        #[inline(always)]
24744        fn new_empty() -> Self {
24745            Self {
24746                header: fidl::new_empty!(TransactionHeader, D),
24747                body: fidl::new_empty!(Sandwich1, D),
24748            }
24749        }
24750
24751        #[inline]
24752        unsafe fn decode(
24753            &mut self,
24754            decoder: &mut fidl::encoding::Decoder<'_, D>,
24755            offset: usize,
24756            _depth: fidl::encoding::Depth,
24757        ) -> fidl::Result<()> {
24758            decoder.debug_check_bounds::<Self>(offset);
24759            // Verify that padding bytes are zero.
24760            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24761            fidl::decode!(Sandwich1, D, &mut self.body, decoder, offset + 16, _depth)?;
24762            Ok(())
24763        }
24764    }
24765
24766    impl fidl::encoding::ValueTypeMarker for Sandwich1WithOptUnion {
24767        type Borrowed<'a> = &'a Self;
24768        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24769            value
24770        }
24771    }
24772
24773    unsafe impl fidl::encoding::TypeMarker for Sandwich1WithOptUnion {
24774        type Owned = Self;
24775
24776        #[inline(always)]
24777        fn inline_align(_context: fidl::encoding::Context) -> usize {
24778            8
24779        }
24780
24781        #[inline(always)]
24782        fn inline_size(_context: fidl::encoding::Context) -> usize {
24783            32
24784        }
24785    }
24786
24787    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1WithOptUnion, D>
24788        for &Sandwich1WithOptUnion
24789    {
24790        #[inline]
24791        unsafe fn encode(
24792            self,
24793            encoder: &mut fidl::encoding::Encoder<'_, D>,
24794            offset: usize,
24795            _depth: fidl::encoding::Depth,
24796        ) -> fidl::Result<()> {
24797            encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24798            // Delegate to tuple encoding.
24799            fidl::encoding::Encode::<Sandwich1WithOptUnion, D>::encode(
24800                (
24801                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24802                    <fidl::encoding::OptionalUnion<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union),
24803                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24804                ),
24805                encoder, offset, _depth
24806            )
24807        }
24808    }
24809    unsafe impl<
24810        D: fidl::encoding::ResourceDialect,
24811        T0: fidl::encoding::Encode<u32, D>,
24812        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize8Align4>, D>,
24813        T2: fidl::encoding::Encode<u32, D>,
24814    > fidl::encoding::Encode<Sandwich1WithOptUnion, D> for (T0, T1, T2)
24815    {
24816        #[inline]
24817        unsafe fn encode(
24818            self,
24819            encoder: &mut fidl::encoding::Encoder<'_, D>,
24820            offset: usize,
24821            depth: fidl::encoding::Depth,
24822        ) -> fidl::Result<()> {
24823            encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24824            // Zero out padding regions. There's no need to apply masks
24825            // because the unmasked parts will be overwritten by fields.
24826            unsafe {
24827                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24828                (ptr as *mut u64).write_unaligned(0);
24829            }
24830            unsafe {
24831                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24832                (ptr as *mut u64).write_unaligned(0);
24833            }
24834            // Write the fields.
24835            self.0.encode(encoder, offset + 0, depth)?;
24836            self.1.encode(encoder, offset + 8, depth)?;
24837            self.2.encode(encoder, offset + 24, depth)?;
24838            Ok(())
24839        }
24840    }
24841
24842    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1WithOptUnion {
24843        #[inline(always)]
24844        fn new_empty() -> Self {
24845            Self {
24846                before: fidl::new_empty!(u32, D),
24847                opt_union: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize8Align4>, D),
24848                after: fidl::new_empty!(u32, D),
24849            }
24850        }
24851
24852        #[inline]
24853        unsafe fn decode(
24854            &mut self,
24855            decoder: &mut fidl::encoding::Decoder<'_, D>,
24856            offset: usize,
24857            _depth: fidl::encoding::Depth,
24858        ) -> fidl::Result<()> {
24859            decoder.debug_check_bounds::<Self>(offset);
24860            // Verify that padding bytes are zero.
24861            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24862            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24863            let mask = 0xffffffff00000000u64;
24864            let maskedval = padval & mask;
24865            if maskedval != 0 {
24866                return Err(fidl::Error::NonZeroPadding {
24867                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24868                });
24869            }
24870            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24871            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24872            let mask = 0xffffffff00000000u64;
24873            let maskedval = padval & mask;
24874            if maskedval != 0 {
24875                return Err(fidl::Error::NonZeroPadding {
24876                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24877                });
24878            }
24879            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24880            fidl::decode!(
24881                fidl::encoding::OptionalUnion<UnionSize8Align4>,
24882                D,
24883                &mut self.opt_union,
24884                decoder,
24885                offset + 8,
24886                _depth
24887            )?;
24888            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24889            Ok(())
24890        }
24891    }
24892
24893    impl fidl::encoding::ValueTypeMarker for Sandwich2 {
24894        type Borrowed<'a> = &'a Self;
24895        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24896            value
24897        }
24898    }
24899
24900    unsafe impl fidl::encoding::TypeMarker for Sandwich2 {
24901        type Owned = Self;
24902
24903        #[inline(always)]
24904        fn inline_align(_context: fidl::encoding::Context) -> usize {
24905            8
24906        }
24907
24908        #[inline(always)]
24909        fn inline_size(_context: fidl::encoding::Context) -> usize {
24910            32
24911        }
24912    }
24913
24914    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich2, D>
24915        for &Sandwich2
24916    {
24917        #[inline]
24918        unsafe fn encode(
24919            self,
24920            encoder: &mut fidl::encoding::Encoder<'_, D>,
24921            offset: usize,
24922            _depth: fidl::encoding::Depth,
24923        ) -> fidl::Result<()> {
24924            encoder.debug_check_bounds::<Sandwich2>(offset);
24925            // Delegate to tuple encoding.
24926            fidl::encoding::Encode::<Sandwich2, D>::encode(
24927                (
24928                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24929                    <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24930                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24931                ),
24932                encoder,
24933                offset,
24934                _depth,
24935            )
24936        }
24937    }
24938    unsafe impl<
24939        D: fidl::encoding::ResourceDialect,
24940        T0: fidl::encoding::Encode<u32, D>,
24941        T1: fidl::encoding::Encode<UnionSize12Align4, D>,
24942        T2: fidl::encoding::Encode<u32, D>,
24943    > fidl::encoding::Encode<Sandwich2, D> for (T0, T1, T2)
24944    {
24945        #[inline]
24946        unsafe fn encode(
24947            self,
24948            encoder: &mut fidl::encoding::Encoder<'_, D>,
24949            offset: usize,
24950            depth: fidl::encoding::Depth,
24951        ) -> fidl::Result<()> {
24952            encoder.debug_check_bounds::<Sandwich2>(offset);
24953            // Zero out padding regions. There's no need to apply masks
24954            // because the unmasked parts will be overwritten by fields.
24955            unsafe {
24956                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24957                (ptr as *mut u64).write_unaligned(0);
24958            }
24959            unsafe {
24960                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24961                (ptr as *mut u64).write_unaligned(0);
24962            }
24963            // Write the fields.
24964            self.0.encode(encoder, offset + 0, depth)?;
24965            self.1.encode(encoder, offset + 8, depth)?;
24966            self.2.encode(encoder, offset + 24, depth)?;
24967            Ok(())
24968        }
24969    }
24970
24971    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich2 {
24972        #[inline(always)]
24973        fn new_empty() -> Self {
24974            Self {
24975                before: fidl::new_empty!(u32, D),
24976                the_union: fidl::new_empty!(UnionSize12Align4, D),
24977                after: fidl::new_empty!(u32, D),
24978            }
24979        }
24980
24981        #[inline]
24982        unsafe fn decode(
24983            &mut self,
24984            decoder: &mut fidl::encoding::Decoder<'_, D>,
24985            offset: usize,
24986            _depth: fidl::encoding::Depth,
24987        ) -> fidl::Result<()> {
24988            decoder.debug_check_bounds::<Self>(offset);
24989            // Verify that padding bytes are zero.
24990            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24991            let padval = unsafe { (ptr as *const u64).read_unaligned() };
24992            let mask = 0xffffffff00000000u64;
24993            let maskedval = padval & mask;
24994            if maskedval != 0 {
24995                return Err(fidl::Error::NonZeroPadding {
24996                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24997                });
24998            }
24999            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25000            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25001            let mask = 0xffffffff00000000u64;
25002            let maskedval = padval & mask;
25003            if maskedval != 0 {
25004                return Err(fidl::Error::NonZeroPadding {
25005                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25006                });
25007            }
25008            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25009            fidl::decode!(UnionSize12Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25010            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25011            Ok(())
25012        }
25013    }
25014
25015    impl fidl::encoding::ValueTypeMarker for Sandwich3 {
25016        type Borrowed<'a> = &'a Self;
25017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25018            value
25019        }
25020    }
25021
25022    unsafe impl fidl::encoding::TypeMarker for Sandwich3 {
25023        type Owned = Self;
25024
25025        #[inline(always)]
25026        fn inline_align(_context: fidl::encoding::Context) -> usize {
25027            8
25028        }
25029
25030        #[inline(always)]
25031        fn inline_size(_context: fidl::encoding::Context) -> usize {
25032            32
25033        }
25034    }
25035
25036    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich3, D>
25037        for &Sandwich3
25038    {
25039        #[inline]
25040        unsafe fn encode(
25041            self,
25042            encoder: &mut fidl::encoding::Encoder<'_, D>,
25043            offset: usize,
25044            _depth: fidl::encoding::Depth,
25045        ) -> fidl::Result<()> {
25046            encoder.debug_check_bounds::<Sandwich3>(offset);
25047            // Delegate to tuple encoding.
25048            fidl::encoding::Encode::<Sandwich3, D>::encode(
25049                (
25050                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25051                    <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
25052                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25053                ),
25054                encoder,
25055                offset,
25056                _depth,
25057            )
25058        }
25059    }
25060    unsafe impl<
25061        D: fidl::encoding::ResourceDialect,
25062        T0: fidl::encoding::Encode<u32, D>,
25063        T1: fidl::encoding::Encode<UnionSize24Align8, D>,
25064        T2: fidl::encoding::Encode<u32, D>,
25065    > fidl::encoding::Encode<Sandwich3, D> for (T0, T1, T2)
25066    {
25067        #[inline]
25068        unsafe fn encode(
25069            self,
25070            encoder: &mut fidl::encoding::Encoder<'_, D>,
25071            offset: usize,
25072            depth: fidl::encoding::Depth,
25073        ) -> fidl::Result<()> {
25074            encoder.debug_check_bounds::<Sandwich3>(offset);
25075            // Zero out padding regions. There's no need to apply masks
25076            // because the unmasked parts will be overwritten by fields.
25077            unsafe {
25078                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25079                (ptr as *mut u64).write_unaligned(0);
25080            }
25081            unsafe {
25082                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25083                (ptr as *mut u64).write_unaligned(0);
25084            }
25085            // Write the fields.
25086            self.0.encode(encoder, offset + 0, depth)?;
25087            self.1.encode(encoder, offset + 8, depth)?;
25088            self.2.encode(encoder, offset + 24, depth)?;
25089            Ok(())
25090        }
25091    }
25092
25093    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich3 {
25094        #[inline(always)]
25095        fn new_empty() -> Self {
25096            Self {
25097                before: fidl::new_empty!(u32, D),
25098                the_union: fidl::new_empty!(UnionSize24Align8, D),
25099                after: fidl::new_empty!(u32, D),
25100            }
25101        }
25102
25103        #[inline]
25104        unsafe fn decode(
25105            &mut self,
25106            decoder: &mut fidl::encoding::Decoder<'_, D>,
25107            offset: usize,
25108            _depth: fidl::encoding::Depth,
25109        ) -> fidl::Result<()> {
25110            decoder.debug_check_bounds::<Self>(offset);
25111            // Verify that padding bytes are zero.
25112            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25113            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25114            let mask = 0xffffffff00000000u64;
25115            let maskedval = padval & mask;
25116            if maskedval != 0 {
25117                return Err(fidl::Error::NonZeroPadding {
25118                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25119                });
25120            }
25121            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25122            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25123            let mask = 0xffffffff00000000u64;
25124            let maskedval = padval & mask;
25125            if maskedval != 0 {
25126                return Err(fidl::Error::NonZeroPadding {
25127                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25128                });
25129            }
25130            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25131            fidl::decode!(UnionSize24Align8, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25132            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25133            Ok(())
25134        }
25135    }
25136
25137    impl fidl::encoding::ValueTypeMarker for Sandwich4 {
25138        type Borrowed<'a> = &'a Self;
25139        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25140            value
25141        }
25142    }
25143
25144    unsafe impl fidl::encoding::TypeMarker for Sandwich4 {
25145        type Owned = Self;
25146
25147        #[inline(always)]
25148        fn inline_align(_context: fidl::encoding::Context) -> usize {
25149            8
25150        }
25151
25152        #[inline(always)]
25153        fn inline_size(_context: fidl::encoding::Context) -> usize {
25154            32
25155        }
25156    }
25157
25158    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4, D>
25159        for &Sandwich4
25160    {
25161        #[inline]
25162        unsafe fn encode(
25163            self,
25164            encoder: &mut fidl::encoding::Encoder<'_, D>,
25165            offset: usize,
25166            _depth: fidl::encoding::Depth,
25167        ) -> fidl::Result<()> {
25168            encoder.debug_check_bounds::<Sandwich4>(offset);
25169            // Delegate to tuple encoding.
25170            fidl::encoding::Encode::<Sandwich4, D>::encode(
25171                (
25172                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25173                    <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
25174                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25175                ),
25176                encoder,
25177                offset,
25178                _depth,
25179            )
25180        }
25181    }
25182    unsafe impl<
25183        D: fidl::encoding::ResourceDialect,
25184        T0: fidl::encoding::Encode<u32, D>,
25185        T1: fidl::encoding::Encode<UnionSize36Align4, D>,
25186        T2: fidl::encoding::Encode<u32, D>,
25187    > fidl::encoding::Encode<Sandwich4, D> for (T0, T1, T2)
25188    {
25189        #[inline]
25190        unsafe fn encode(
25191            self,
25192            encoder: &mut fidl::encoding::Encoder<'_, D>,
25193            offset: usize,
25194            depth: fidl::encoding::Depth,
25195        ) -> fidl::Result<()> {
25196            encoder.debug_check_bounds::<Sandwich4>(offset);
25197            // Zero out padding regions. There's no need to apply masks
25198            // because the unmasked parts will be overwritten by fields.
25199            unsafe {
25200                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25201                (ptr as *mut u64).write_unaligned(0);
25202            }
25203            unsafe {
25204                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25205                (ptr as *mut u64).write_unaligned(0);
25206            }
25207            // Write the fields.
25208            self.0.encode(encoder, offset + 0, depth)?;
25209            self.1.encode(encoder, offset + 8, depth)?;
25210            self.2.encode(encoder, offset + 24, depth)?;
25211            Ok(())
25212        }
25213    }
25214
25215    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4 {
25216        #[inline(always)]
25217        fn new_empty() -> Self {
25218            Self {
25219                before: fidl::new_empty!(u32, D),
25220                the_union: fidl::new_empty!(UnionSize36Align4, D),
25221                after: fidl::new_empty!(u32, D),
25222            }
25223        }
25224
25225        #[inline]
25226        unsafe fn decode(
25227            &mut self,
25228            decoder: &mut fidl::encoding::Decoder<'_, D>,
25229            offset: usize,
25230            _depth: fidl::encoding::Depth,
25231        ) -> fidl::Result<()> {
25232            decoder.debug_check_bounds::<Self>(offset);
25233            // Verify that padding bytes are zero.
25234            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25235            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25236            let mask = 0xffffffff00000000u64;
25237            let maskedval = padval & mask;
25238            if maskedval != 0 {
25239                return Err(fidl::Error::NonZeroPadding {
25240                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25241                });
25242            }
25243            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25244            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25245            let mask = 0xffffffff00000000u64;
25246            let maskedval = padval & mask;
25247            if maskedval != 0 {
25248                return Err(fidl::Error::NonZeroPadding {
25249                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25250                });
25251            }
25252            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25253            fidl::decode!(UnionSize36Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25254            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25255            Ok(())
25256        }
25257    }
25258
25259    impl fidl::encoding::ValueTypeMarker for Sandwich4Align8 {
25260        type Borrowed<'a> = &'a Self;
25261        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25262            value
25263        }
25264    }
25265
25266    unsafe impl fidl::encoding::TypeMarker for Sandwich4Align8 {
25267        type Owned = Self;
25268
25269        #[inline(always)]
25270        fn inline_align(_context: fidl::encoding::Context) -> usize {
25271            8
25272        }
25273
25274        #[inline(always)]
25275        fn inline_size(_context: fidl::encoding::Context) -> usize {
25276            40
25277        }
25278    }
25279
25280    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Align8, D>
25281        for &Sandwich4Align8
25282    {
25283        #[inline]
25284        unsafe fn encode(
25285            self,
25286            encoder: &mut fidl::encoding::Encoder<'_, D>,
25287            offset: usize,
25288            _depth: fidl::encoding::Depth,
25289        ) -> fidl::Result<()> {
25290            encoder.debug_check_bounds::<Sandwich4Align8>(offset);
25291            // Delegate to tuple encoding.
25292            fidl::encoding::Encode::<Sandwich4Align8, D>::encode(
25293                (
25294                    <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25295                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.alignment8_enforcement),
25296                ),
25297                encoder,
25298                offset,
25299                _depth,
25300            )
25301        }
25302    }
25303    unsafe impl<
25304        D: fidl::encoding::ResourceDialect,
25305        T0: fidl::encoding::Encode<Sandwich4, D>,
25306        T1: fidl::encoding::Encode<u64, D>,
25307    > fidl::encoding::Encode<Sandwich4Align8, D> for (T0, T1)
25308    {
25309        #[inline]
25310        unsafe fn encode(
25311            self,
25312            encoder: &mut fidl::encoding::Encoder<'_, D>,
25313            offset: usize,
25314            depth: fidl::encoding::Depth,
25315        ) -> fidl::Result<()> {
25316            encoder.debug_check_bounds::<Sandwich4Align8>(offset);
25317            // Zero out padding regions. There's no need to apply masks
25318            // because the unmasked parts will be overwritten by fields.
25319            // Write the fields.
25320            self.0.encode(encoder, offset + 0, depth)?;
25321            self.1.encode(encoder, offset + 32, depth)?;
25322            Ok(())
25323        }
25324    }
25325
25326    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Align8 {
25327        #[inline(always)]
25328        fn new_empty() -> Self {
25329            Self {
25330                sandwich4: fidl::new_empty!(Sandwich4, D),
25331                alignment8_enforcement: fidl::new_empty!(u64, D),
25332            }
25333        }
25334
25335        #[inline]
25336        unsafe fn decode(
25337            &mut self,
25338            decoder: &mut fidl::encoding::Decoder<'_, D>,
25339            offset: usize,
25340            _depth: fidl::encoding::Depth,
25341        ) -> fidl::Result<()> {
25342            decoder.debug_check_bounds::<Self>(offset);
25343            // Verify that padding bytes are zero.
25344            fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25345            fidl::decode!(u64, D, &mut self.alignment8_enforcement, decoder, offset + 32, _depth)?;
25346            Ok(())
25347        }
25348    }
25349
25350    impl fidl::encoding::ValueTypeMarker for Sandwich4Align8WithPointer {
25351        type Borrowed<'a> = &'a Self;
25352        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25353            value
25354        }
25355    }
25356
25357    unsafe impl fidl::encoding::TypeMarker for Sandwich4Align8WithPointer {
25358        type Owned = Self;
25359
25360        #[inline(always)]
25361        fn inline_align(_context: fidl::encoding::Context) -> usize {
25362            8
25363        }
25364
25365        #[inline(always)]
25366        fn inline_size(_context: fidl::encoding::Context) -> usize {
25367            40
25368        }
25369    }
25370
25371    unsafe impl<D: fidl::encoding::ResourceDialect>
25372        fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for &Sandwich4Align8WithPointer
25373    {
25374        #[inline]
25375        unsafe fn encode(
25376            self,
25377            encoder: &mut fidl::encoding::Encoder<'_, D>,
25378            offset: usize,
25379            _depth: fidl::encoding::Depth,
25380        ) -> fidl::Result<()> {
25381            encoder.debug_check_bounds::<Sandwich4Align8WithPointer>(offset);
25382            // Delegate to tuple encoding.
25383            fidl::encoding::Encode::<Sandwich4Align8WithPointer, D>::encode(
25384                (
25385                    <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25386                    <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
25387                        &self.alignment8_enforcement,
25388                    ),
25389                ),
25390                encoder,
25391                offset,
25392                _depth,
25393            )
25394        }
25395    }
25396    unsafe impl<
25397        D: fidl::encoding::ResourceDialect,
25398        T0: fidl::encoding::Encode<Sandwich4, D>,
25399        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
25400    > fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for (T0, T1)
25401    {
25402        #[inline]
25403        unsafe fn encode(
25404            self,
25405            encoder: &mut fidl::encoding::Encoder<'_, D>,
25406            offset: usize,
25407            depth: fidl::encoding::Depth,
25408        ) -> fidl::Result<()> {
25409            encoder.debug_check_bounds::<Sandwich4Align8WithPointer>(offset);
25410            // Zero out padding regions. There's no need to apply masks
25411            // because the unmasked parts will be overwritten by fields.
25412            // Write the fields.
25413            self.0.encode(encoder, offset + 0, depth)?;
25414            self.1.encode(encoder, offset + 32, depth)?;
25415            Ok(())
25416        }
25417    }
25418
25419    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
25420        for Sandwich4Align8WithPointer
25421    {
25422        #[inline(always)]
25423        fn new_empty() -> Self {
25424            Self {
25425                sandwich4: fidl::new_empty!(Sandwich4, D),
25426                alignment8_enforcement: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
25427            }
25428        }
25429
25430        #[inline]
25431        unsafe fn decode(
25432            &mut self,
25433            decoder: &mut fidl::encoding::Decoder<'_, D>,
25434            offset: usize,
25435            _depth: fidl::encoding::Depth,
25436        ) -> fidl::Result<()> {
25437            decoder.debug_check_bounds::<Self>(offset);
25438            // Verify that padding bytes are zero.
25439            fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25440            fidl::decode!(
25441                fidl::encoding::Boxed<Size8Align8>,
25442                D,
25443                &mut self.alignment8_enforcement,
25444                decoder,
25445                offset + 32,
25446                _depth
25447            )?;
25448            Ok(())
25449        }
25450    }
25451
25452    impl fidl::encoding::ValueTypeMarker for Sandwich4Message {
25453        type Borrowed<'a> = &'a Self;
25454        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25455            value
25456        }
25457    }
25458
25459    unsafe impl fidl::encoding::TypeMarker for Sandwich4Message {
25460        type Owned = Self;
25461
25462        #[inline(always)]
25463        fn inline_align(_context: fidl::encoding::Context) -> usize {
25464            8
25465        }
25466
25467        #[inline(always)]
25468        fn inline_size(_context: fidl::encoding::Context) -> usize {
25469            48
25470        }
25471    }
25472
25473    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Message, D>
25474        for &Sandwich4Message
25475    {
25476        #[inline]
25477        unsafe fn encode(
25478            self,
25479            encoder: &mut fidl::encoding::Encoder<'_, D>,
25480            offset: usize,
25481            _depth: fidl::encoding::Depth,
25482        ) -> fidl::Result<()> {
25483            encoder.debug_check_bounds::<Sandwich4Message>(offset);
25484            // Delegate to tuple encoding.
25485            fidl::encoding::Encode::<Sandwich4Message, D>::encode(
25486                (
25487                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25488                    <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25489                ),
25490                encoder,
25491                offset,
25492                _depth,
25493            )
25494        }
25495    }
25496    unsafe impl<
25497        D: fidl::encoding::ResourceDialect,
25498        T0: fidl::encoding::Encode<TransactionHeader, D>,
25499        T1: fidl::encoding::Encode<Sandwich4, D>,
25500    > fidl::encoding::Encode<Sandwich4Message, D> for (T0, T1)
25501    {
25502        #[inline]
25503        unsafe fn encode(
25504            self,
25505            encoder: &mut fidl::encoding::Encoder<'_, D>,
25506            offset: usize,
25507            depth: fidl::encoding::Depth,
25508        ) -> fidl::Result<()> {
25509            encoder.debug_check_bounds::<Sandwich4Message>(offset);
25510            // Zero out padding regions. There's no need to apply masks
25511            // because the unmasked parts will be overwritten by fields.
25512            // Write the fields.
25513            self.0.encode(encoder, offset + 0, depth)?;
25514            self.1.encode(encoder, offset + 16, depth)?;
25515            Ok(())
25516        }
25517    }
25518
25519    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Message {
25520        #[inline(always)]
25521        fn new_empty() -> Self {
25522            Self {
25523                header: fidl::new_empty!(TransactionHeader, D),
25524                body: fidl::new_empty!(Sandwich4, D),
25525            }
25526        }
25527
25528        #[inline]
25529        unsafe fn decode(
25530            &mut self,
25531            decoder: &mut fidl::encoding::Decoder<'_, D>,
25532            offset: usize,
25533            _depth: fidl::encoding::Depth,
25534        ) -> fidl::Result<()> {
25535            decoder.debug_check_bounds::<Self>(offset);
25536            // Verify that padding bytes are zero.
25537            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25538            fidl::decode!(Sandwich4, D, &mut self.body, decoder, offset + 16, _depth)?;
25539            Ok(())
25540        }
25541    }
25542
25543    impl fidl::encoding::ValueTypeMarker for Sandwich5 {
25544        type Borrowed<'a> = &'a Self;
25545        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25546            value
25547        }
25548    }
25549
25550    unsafe impl fidl::encoding::TypeMarker for Sandwich5 {
25551        type Owned = Self;
25552
25553        #[inline(always)]
25554        fn inline_align(_context: fidl::encoding::Context) -> usize {
25555            8
25556        }
25557
25558        #[inline(always)]
25559        fn inline_size(_context: fidl::encoding::Context) -> usize {
25560            32
25561        }
25562    }
25563
25564    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5, D>
25565        for &Sandwich5
25566    {
25567        #[inline]
25568        unsafe fn encode(
25569            self,
25570            encoder: &mut fidl::encoding::Encoder<'_, D>,
25571            offset: usize,
25572            _depth: fidl::encoding::Depth,
25573        ) -> fidl::Result<()> {
25574            encoder.debug_check_bounds::<Sandwich5>(offset);
25575            // Delegate to tuple encoding.
25576            fidl::encoding::Encode::<Sandwich5, D>::encode(
25577                (
25578                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25579                    <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
25580                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25581                ),
25582                encoder,
25583                offset,
25584                _depth,
25585            )
25586        }
25587    }
25588    unsafe impl<
25589        D: fidl::encoding::ResourceDialect,
25590        T0: fidl::encoding::Encode<u32, D>,
25591        T1: fidl::encoding::Encode<UnionOfUnion, D>,
25592        T2: fidl::encoding::Encode<u32, D>,
25593    > fidl::encoding::Encode<Sandwich5, D> for (T0, T1, T2)
25594    {
25595        #[inline]
25596        unsafe fn encode(
25597            self,
25598            encoder: &mut fidl::encoding::Encoder<'_, D>,
25599            offset: usize,
25600            depth: fidl::encoding::Depth,
25601        ) -> fidl::Result<()> {
25602            encoder.debug_check_bounds::<Sandwich5>(offset);
25603            // Zero out padding regions. There's no need to apply masks
25604            // because the unmasked parts will be overwritten by fields.
25605            unsafe {
25606                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25607                (ptr as *mut u64).write_unaligned(0);
25608            }
25609            unsafe {
25610                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25611                (ptr as *mut u64).write_unaligned(0);
25612            }
25613            // Write the fields.
25614            self.0.encode(encoder, offset + 0, depth)?;
25615            self.1.encode(encoder, offset + 8, depth)?;
25616            self.2.encode(encoder, offset + 24, depth)?;
25617            Ok(())
25618        }
25619    }
25620
25621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5 {
25622        #[inline(always)]
25623        fn new_empty() -> Self {
25624            Self {
25625                before: fidl::new_empty!(u32, D),
25626                union_of_union: fidl::new_empty!(UnionOfUnion, D),
25627                after: fidl::new_empty!(u32, D),
25628            }
25629        }
25630
25631        #[inline]
25632        unsafe fn decode(
25633            &mut self,
25634            decoder: &mut fidl::encoding::Decoder<'_, D>,
25635            offset: usize,
25636            _depth: fidl::encoding::Depth,
25637        ) -> fidl::Result<()> {
25638            decoder.debug_check_bounds::<Self>(offset);
25639            // Verify that padding bytes are zero.
25640            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25641            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25642            let mask = 0xffffffff00000000u64;
25643            let maskedval = padval & mask;
25644            if maskedval != 0 {
25645                return Err(fidl::Error::NonZeroPadding {
25646                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25647                });
25648            }
25649            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25650            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25651            let mask = 0xffffffff00000000u64;
25652            let maskedval = padval & mask;
25653            if maskedval != 0 {
25654                return Err(fidl::Error::NonZeroPadding {
25655                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25656                });
25657            }
25658            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25659            fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
25660            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25661            Ok(())
25662        }
25663    }
25664
25665    impl fidl::encoding::ValueTypeMarker for Sandwich5Message {
25666        type Borrowed<'a> = &'a Self;
25667        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25668            value
25669        }
25670    }
25671
25672    unsafe impl fidl::encoding::TypeMarker for Sandwich5Message {
25673        type Owned = Self;
25674
25675        #[inline(always)]
25676        fn inline_align(_context: fidl::encoding::Context) -> usize {
25677            8
25678        }
25679
25680        #[inline(always)]
25681        fn inline_size(_context: fidl::encoding::Context) -> usize {
25682            48
25683        }
25684    }
25685
25686    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5Message, D>
25687        for &Sandwich5Message
25688    {
25689        #[inline]
25690        unsafe fn encode(
25691            self,
25692            encoder: &mut fidl::encoding::Encoder<'_, D>,
25693            offset: usize,
25694            _depth: fidl::encoding::Depth,
25695        ) -> fidl::Result<()> {
25696            encoder.debug_check_bounds::<Sandwich5Message>(offset);
25697            // Delegate to tuple encoding.
25698            fidl::encoding::Encode::<Sandwich5Message, D>::encode(
25699                (
25700                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25701                    <Sandwich5 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25702                ),
25703                encoder,
25704                offset,
25705                _depth,
25706            )
25707        }
25708    }
25709    unsafe impl<
25710        D: fidl::encoding::ResourceDialect,
25711        T0: fidl::encoding::Encode<TransactionHeader, D>,
25712        T1: fidl::encoding::Encode<Sandwich5, D>,
25713    > fidl::encoding::Encode<Sandwich5Message, D> for (T0, T1)
25714    {
25715        #[inline]
25716        unsafe fn encode(
25717            self,
25718            encoder: &mut fidl::encoding::Encoder<'_, D>,
25719            offset: usize,
25720            depth: fidl::encoding::Depth,
25721        ) -> fidl::Result<()> {
25722            encoder.debug_check_bounds::<Sandwich5Message>(offset);
25723            // Zero out padding regions. There's no need to apply masks
25724            // because the unmasked parts will be overwritten by fields.
25725            // Write the fields.
25726            self.0.encode(encoder, offset + 0, depth)?;
25727            self.1.encode(encoder, offset + 16, depth)?;
25728            Ok(())
25729        }
25730    }
25731
25732    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5Message {
25733        #[inline(always)]
25734        fn new_empty() -> Self {
25735            Self {
25736                header: fidl::new_empty!(TransactionHeader, D),
25737                body: fidl::new_empty!(Sandwich5, D),
25738            }
25739        }
25740
25741        #[inline]
25742        unsafe fn decode(
25743            &mut self,
25744            decoder: &mut fidl::encoding::Decoder<'_, D>,
25745            offset: usize,
25746            _depth: fidl::encoding::Depth,
25747        ) -> fidl::Result<()> {
25748            decoder.debug_check_bounds::<Self>(offset);
25749            // Verify that padding bytes are zero.
25750            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25751            fidl::decode!(Sandwich5, D, &mut self.body, decoder, offset + 16, _depth)?;
25752            Ok(())
25753        }
25754    }
25755
25756    impl fidl::encoding::ValueTypeMarker for Sandwich7 {
25757        type Borrowed<'a> = &'a Self;
25758        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25759            value
25760        }
25761    }
25762
25763    unsafe impl fidl::encoding::TypeMarker for Sandwich7 {
25764        type Owned = Self;
25765
25766        #[inline(always)]
25767        fn inline_align(_context: fidl::encoding::Context) -> usize {
25768            8
25769        }
25770
25771        #[inline(always)]
25772        fn inline_size(_context: fidl::encoding::Context) -> usize {
25773            24
25774        }
25775    }
25776
25777    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7, D>
25778        for &Sandwich7
25779    {
25780        #[inline]
25781        unsafe fn encode(
25782            self,
25783            encoder: &mut fidl::encoding::Encoder<'_, D>,
25784            offset: usize,
25785            _depth: fidl::encoding::Depth,
25786        ) -> fidl::Result<()> {
25787            encoder.debug_check_bounds::<Sandwich7>(offset);
25788            // Delegate to tuple encoding.
25789            fidl::encoding::Encode::<Sandwich7, D>::encode(
25790                (
25791                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25792                    <fidl::encoding::Boxed<Sandwich1> as fidl::encoding::ValueTypeMarker>::borrow(
25793                        &self.opt_sandwich1,
25794                    ),
25795                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25796                ),
25797                encoder,
25798                offset,
25799                _depth,
25800            )
25801        }
25802    }
25803    unsafe impl<
25804        D: fidl::encoding::ResourceDialect,
25805        T0: fidl::encoding::Encode<u32, D>,
25806        T1: fidl::encoding::Encode<fidl::encoding::Boxed<Sandwich1>, D>,
25807        T2: fidl::encoding::Encode<u32, D>,
25808    > fidl::encoding::Encode<Sandwich7, D> for (T0, T1, T2)
25809    {
25810        #[inline]
25811        unsafe fn encode(
25812            self,
25813            encoder: &mut fidl::encoding::Encoder<'_, D>,
25814            offset: usize,
25815            depth: fidl::encoding::Depth,
25816        ) -> fidl::Result<()> {
25817            encoder.debug_check_bounds::<Sandwich7>(offset);
25818            // Zero out padding regions. There's no need to apply masks
25819            // because the unmasked parts will be overwritten by fields.
25820            unsafe {
25821                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25822                (ptr as *mut u64).write_unaligned(0);
25823            }
25824            unsafe {
25825                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
25826                (ptr as *mut u64).write_unaligned(0);
25827            }
25828            // Write the fields.
25829            self.0.encode(encoder, offset + 0, depth)?;
25830            self.1.encode(encoder, offset + 8, depth)?;
25831            self.2.encode(encoder, offset + 16, depth)?;
25832            Ok(())
25833        }
25834    }
25835
25836    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7 {
25837        #[inline(always)]
25838        fn new_empty() -> Self {
25839            Self {
25840                before: fidl::new_empty!(u32, D),
25841                opt_sandwich1: fidl::new_empty!(fidl::encoding::Boxed<Sandwich1>, D),
25842                after: fidl::new_empty!(u32, D),
25843            }
25844        }
25845
25846        #[inline]
25847        unsafe fn decode(
25848            &mut self,
25849            decoder: &mut fidl::encoding::Decoder<'_, D>,
25850            offset: usize,
25851            _depth: fidl::encoding::Depth,
25852        ) -> fidl::Result<()> {
25853            decoder.debug_check_bounds::<Self>(offset);
25854            // Verify that padding bytes are zero.
25855            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25856            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25857            let mask = 0xffffffff00000000u64;
25858            let maskedval = padval & mask;
25859            if maskedval != 0 {
25860                return Err(fidl::Error::NonZeroPadding {
25861                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25862                });
25863            }
25864            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
25865            let padval = unsafe { (ptr as *const u64).read_unaligned() };
25866            let mask = 0xffffffff00000000u64;
25867            let maskedval = padval & mask;
25868            if maskedval != 0 {
25869                return Err(fidl::Error::NonZeroPadding {
25870                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
25871                });
25872            }
25873            fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25874            fidl::decode!(
25875                fidl::encoding::Boxed<Sandwich1>,
25876                D,
25877                &mut self.opt_sandwich1,
25878                decoder,
25879                offset + 8,
25880                _depth
25881            )?;
25882            fidl::decode!(u32, D, &mut self.after, decoder, offset + 16, _depth)?;
25883            Ok(())
25884        }
25885    }
25886
25887    impl fidl::encoding::ValueTypeMarker for Sandwich7Message {
25888        type Borrowed<'a> = &'a Self;
25889        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25890            value
25891        }
25892    }
25893
25894    unsafe impl fidl::encoding::TypeMarker for Sandwich7Message {
25895        type Owned = Self;
25896
25897        #[inline(always)]
25898        fn inline_align(_context: fidl::encoding::Context) -> usize {
25899            8
25900        }
25901
25902        #[inline(always)]
25903        fn inline_size(_context: fidl::encoding::Context) -> usize {
25904            40
25905        }
25906    }
25907
25908    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7Message, D>
25909        for &Sandwich7Message
25910    {
25911        #[inline]
25912        unsafe fn encode(
25913            self,
25914            encoder: &mut fidl::encoding::Encoder<'_, D>,
25915            offset: usize,
25916            _depth: fidl::encoding::Depth,
25917        ) -> fidl::Result<()> {
25918            encoder.debug_check_bounds::<Sandwich7Message>(offset);
25919            // Delegate to tuple encoding.
25920            fidl::encoding::Encode::<Sandwich7Message, D>::encode(
25921                (
25922                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25923                    <Sandwich7 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25924                ),
25925                encoder,
25926                offset,
25927                _depth,
25928            )
25929        }
25930    }
25931    unsafe impl<
25932        D: fidl::encoding::ResourceDialect,
25933        T0: fidl::encoding::Encode<TransactionHeader, D>,
25934        T1: fidl::encoding::Encode<Sandwich7, D>,
25935    > fidl::encoding::Encode<Sandwich7Message, D> for (T0, T1)
25936    {
25937        #[inline]
25938        unsafe fn encode(
25939            self,
25940            encoder: &mut fidl::encoding::Encoder<'_, D>,
25941            offset: usize,
25942            depth: fidl::encoding::Depth,
25943        ) -> fidl::Result<()> {
25944            encoder.debug_check_bounds::<Sandwich7Message>(offset);
25945            // Zero out padding regions. There's no need to apply masks
25946            // because the unmasked parts will be overwritten by fields.
25947            // Write the fields.
25948            self.0.encode(encoder, offset + 0, depth)?;
25949            self.1.encode(encoder, offset + 16, depth)?;
25950            Ok(())
25951        }
25952    }
25953
25954    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7Message {
25955        #[inline(always)]
25956        fn new_empty() -> Self {
25957            Self {
25958                header: fidl::new_empty!(TransactionHeader, D),
25959                body: fidl::new_empty!(Sandwich7, D),
25960            }
25961        }
25962
25963        #[inline]
25964        unsafe fn decode(
25965            &mut self,
25966            decoder: &mut fidl::encoding::Decoder<'_, D>,
25967            offset: usize,
25968            _depth: fidl::encoding::Depth,
25969        ) -> fidl::Result<()> {
25970            decoder.debug_check_bounds::<Self>(offset);
25971            // Verify that padding bytes are zero.
25972            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25973            fidl::decode!(Sandwich7, D, &mut self.body, decoder, offset + 16, _depth)?;
25974            Ok(())
25975        }
25976    }
25977
25978    impl fidl::encoding::ValueTypeMarker for Sandwich8 {
25979        type Borrowed<'a> = &'a Self;
25980        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25981            value
25982        }
25983    }
25984
25985    unsafe impl fidl::encoding::TypeMarker for Sandwich8 {
25986        type Owned = Self;
25987
25988        #[inline(always)]
25989        fn inline_align(_context: fidl::encoding::Context) -> usize {
25990            8
25991        }
25992
25993        #[inline(always)]
25994        fn inline_size(_context: fidl::encoding::Context) -> usize {
25995            32
25996        }
25997    }
25998
25999    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich8, D>
26000        for &Sandwich8
26001    {
26002        #[inline]
26003        unsafe fn encode(
26004            self,
26005            encoder: &mut fidl::encoding::Encoder<'_, D>,
26006            offset: usize,
26007            _depth: fidl::encoding::Depth,
26008        ) -> fidl::Result<()> {
26009            encoder.debug_check_bounds::<Sandwich8>(offset);
26010            // Delegate to tuple encoding.
26011            fidl::encoding::Encode::<Sandwich8, D>::encode(
26012                (
26013                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
26014                    <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
26015                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
26016                ),
26017                encoder,
26018                offset,
26019                _depth,
26020            )
26021        }
26022    }
26023    unsafe impl<
26024        D: fidl::encoding::ResourceDialect,
26025        T0: fidl::encoding::Encode<u64, D>,
26026        T1: fidl::encoding::Encode<UnionOfUnion, D>,
26027        T2: fidl::encoding::Encode<u32, D>,
26028    > fidl::encoding::Encode<Sandwich8, D> for (T0, T1, T2)
26029    {
26030        #[inline]
26031        unsafe fn encode(
26032            self,
26033            encoder: &mut fidl::encoding::Encoder<'_, D>,
26034            offset: usize,
26035            depth: fidl::encoding::Depth,
26036        ) -> fidl::Result<()> {
26037            encoder.debug_check_bounds::<Sandwich8>(offset);
26038            // Zero out padding regions. There's no need to apply masks
26039            // because the unmasked parts will be overwritten by fields.
26040            unsafe {
26041                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
26042                (ptr as *mut u64).write_unaligned(0);
26043            }
26044            // Write the fields.
26045            self.0.encode(encoder, offset + 0, depth)?;
26046            self.1.encode(encoder, offset + 8, depth)?;
26047            self.2.encode(encoder, offset + 24, depth)?;
26048            Ok(())
26049        }
26050    }
26051
26052    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich8 {
26053        #[inline(always)]
26054        fn new_empty() -> Self {
26055            Self {
26056                before: fidl::new_empty!(u64, D),
26057                union_of_union: fidl::new_empty!(UnionOfUnion, D),
26058                after: fidl::new_empty!(u32, D),
26059            }
26060        }
26061
26062        #[inline]
26063        unsafe fn decode(
26064            &mut self,
26065            decoder: &mut fidl::encoding::Decoder<'_, D>,
26066            offset: usize,
26067            _depth: fidl::encoding::Depth,
26068        ) -> fidl::Result<()> {
26069            decoder.debug_check_bounds::<Self>(offset);
26070            // Verify that padding bytes are zero.
26071            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
26072            let padval = unsafe { (ptr as *const u64).read_unaligned() };
26073            let mask = 0xffffffff00000000u64;
26074            let maskedval = padval & mask;
26075            if maskedval != 0 {
26076                return Err(fidl::Error::NonZeroPadding {
26077                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
26078                });
26079            }
26080            fidl::decode!(u64, D, &mut self.before, decoder, offset + 0, _depth)?;
26081            fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
26082            fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
26083            Ok(())
26084        }
26085    }
26086
26087    impl fidl::encoding::ValueTypeMarker for Sandwich9 {
26088        type Borrowed<'a> = &'a Self;
26089        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26090            value
26091        }
26092    }
26093
26094    unsafe impl fidl::encoding::TypeMarker for Sandwich9 {
26095        type Owned = Self;
26096
26097        #[inline(always)]
26098        fn inline_align(_context: fidl::encoding::Context) -> usize {
26099            8
26100        }
26101
26102        #[inline(always)]
26103        fn inline_size(_context: fidl::encoding::Context) -> usize {
26104            32
26105        }
26106    }
26107
26108    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich9, D>
26109        for &Sandwich9
26110    {
26111        #[inline]
26112        unsafe fn encode(
26113            self,
26114            encoder: &mut fidl::encoding::Encoder<'_, D>,
26115            offset: usize,
26116            _depth: fidl::encoding::Depth,
26117        ) -> fidl::Result<()> {
26118            encoder.debug_check_bounds::<Sandwich9>(offset);
26119            // Delegate to tuple encoding.
26120            fidl::encoding::Encode::<Sandwich9, D>::encode(
26121                (
26122                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
26123                    <UnionWithVectorOfVectors as fidl::encoding::ValueTypeMarker>::borrow(
26124                        &self.the_union,
26125                    ),
26126                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
26127                ),
26128                encoder,
26129                offset,
26130                _depth,
26131            )
26132        }
26133    }
26134    unsafe impl<
26135        D: fidl::encoding::ResourceDialect,
26136        T0: fidl::encoding::Encode<u16, D>,
26137        T1: fidl::encoding::Encode<UnionWithVectorOfVectors, D>,
26138        T2: fidl::encoding::Encode<u16, D>,
26139    > fidl::encoding::Encode<Sandwich9, D> for (T0, T1, T2)
26140    {
26141        #[inline]
26142        unsafe fn encode(
26143            self,
26144            encoder: &mut fidl::encoding::Encoder<'_, D>,
26145            offset: usize,
26146            depth: fidl::encoding::Depth,
26147        ) -> fidl::Result<()> {
26148            encoder.debug_check_bounds::<Sandwich9>(offset);
26149            // Zero out padding regions. There's no need to apply masks
26150            // because the unmasked parts will be overwritten by fields.
26151            unsafe {
26152                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
26153                (ptr as *mut u64).write_unaligned(0);
26154            }
26155            unsafe {
26156                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
26157                (ptr as *mut u64).write_unaligned(0);
26158            }
26159            // Write the fields.
26160            self.0.encode(encoder, offset + 0, depth)?;
26161            self.1.encode(encoder, offset + 8, depth)?;
26162            self.2.encode(encoder, offset + 24, depth)?;
26163            Ok(())
26164        }
26165    }
26166
26167    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich9 {
26168        #[inline(always)]
26169        fn new_empty() -> Self {
26170            Self {
26171                before: fidl::new_empty!(u16, D),
26172                the_union: fidl::new_empty!(UnionWithVectorOfVectors, D),
26173                after: fidl::new_empty!(u16, D),
26174            }
26175        }
26176
26177        #[inline]
26178        unsafe fn decode(
26179            &mut self,
26180            decoder: &mut fidl::encoding::Decoder<'_, D>,
26181            offset: usize,
26182            _depth: fidl::encoding::Depth,
26183        ) -> fidl::Result<()> {
26184            decoder.debug_check_bounds::<Self>(offset);
26185            // Verify that padding bytes are zero.
26186            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
26187            let padval = unsafe { (ptr as *const u64).read_unaligned() };
26188            let mask = 0xffffffffffff0000u64;
26189            let maskedval = padval & mask;
26190            if maskedval != 0 {
26191                return Err(fidl::Error::NonZeroPadding {
26192                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
26193                });
26194            }
26195            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
26196            let padval = unsafe { (ptr as *const u64).read_unaligned() };
26197            let mask = 0xffffffffffff0000u64;
26198            let maskedval = padval & mask;
26199            if maskedval != 0 {
26200                return Err(fidl::Error::NonZeroPadding {
26201                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
26202                });
26203            }
26204            fidl::decode!(u16, D, &mut self.before, decoder, offset + 0, _depth)?;
26205            fidl::decode!(
26206                UnionWithVectorOfVectors,
26207                D,
26208                &mut self.the_union,
26209                decoder,
26210                offset + 8,
26211                _depth
26212            )?;
26213            fidl::decode!(u16, D, &mut self.after, decoder, offset + 24, _depth)?;
26214            Ok(())
26215        }
26216    }
26217
26218    impl fidl::encoding::ValueTypeMarker for SimpleTableArrayStruct {
26219        type Borrowed<'a> = &'a Self;
26220        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26221            value
26222        }
26223    }
26224
26225    unsafe impl fidl::encoding::TypeMarker for SimpleTableArrayStruct {
26226        type Owned = Self;
26227
26228        #[inline(always)]
26229        fn inline_align(_context: fidl::encoding::Context) -> usize {
26230            8
26231        }
26232
26233        #[inline(always)]
26234        fn inline_size(_context: fidl::encoding::Context) -> usize {
26235            32
26236        }
26237    }
26238
26239    unsafe impl<D: fidl::encoding::ResourceDialect>
26240        fidl::encoding::Encode<SimpleTableArrayStruct, D> for &SimpleTableArrayStruct
26241    {
26242        #[inline]
26243        unsafe fn encode(
26244            self,
26245            encoder: &mut fidl::encoding::Encoder<'_, D>,
26246            offset: usize,
26247            _depth: fidl::encoding::Depth,
26248        ) -> fidl::Result<()> {
26249            encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26250            // Delegate to tuple encoding.
26251            fidl::encoding::Encode::<SimpleTableArrayStruct, D>::encode(
26252                (
26253                    <fidl::encoding::Array<TransformerSimpleTable, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_array),
26254                ),
26255                encoder, offset, _depth
26256            )
26257        }
26258    }
26259    unsafe impl<
26260        D: fidl::encoding::ResourceDialect,
26261        T0: fidl::encoding::Encode<fidl::encoding::Array<TransformerSimpleTable, 2>, D>,
26262    > fidl::encoding::Encode<SimpleTableArrayStruct, D> for (T0,)
26263    {
26264        #[inline]
26265        unsafe fn encode(
26266            self,
26267            encoder: &mut fidl::encoding::Encoder<'_, D>,
26268            offset: usize,
26269            depth: fidl::encoding::Depth,
26270        ) -> fidl::Result<()> {
26271            encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26272            // Zero out padding regions. There's no need to apply masks
26273            // because the unmasked parts will be overwritten by fields.
26274            // Write the fields.
26275            self.0.encode(encoder, offset + 0, depth)?;
26276            Ok(())
26277        }
26278    }
26279
26280    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26281        for SimpleTableArrayStruct
26282    {
26283        #[inline(always)]
26284        fn new_empty() -> Self {
26285            Self {
26286                the_array: fidl::new_empty!(fidl::encoding::Array<TransformerSimpleTable, 2>, D),
26287            }
26288        }
26289
26290        #[inline]
26291        unsafe fn decode(
26292            &mut self,
26293            decoder: &mut fidl::encoding::Decoder<'_, D>,
26294            offset: usize,
26295            _depth: fidl::encoding::Depth,
26296        ) -> fidl::Result<()> {
26297            decoder.debug_check_bounds::<Self>(offset);
26298            // Verify that padding bytes are zero.
26299            fidl::decode!(fidl::encoding::Array<TransformerSimpleTable, 2>, D, &mut self.the_array, decoder, offset + 0, _depth)?;
26300            Ok(())
26301        }
26302    }
26303
26304    impl fidl::encoding::ValueTypeMarker for SimpleTableThenUint64 {
26305        type Borrowed<'a> = &'a Self;
26306        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26307            value
26308        }
26309    }
26310
26311    unsafe impl fidl::encoding::TypeMarker for SimpleTableThenUint64 {
26312        type Owned = Self;
26313
26314        #[inline(always)]
26315        fn inline_align(_context: fidl::encoding::Context) -> usize {
26316            8
26317        }
26318
26319        #[inline(always)]
26320        fn inline_size(_context: fidl::encoding::Context) -> usize {
26321            24
26322        }
26323    }
26324
26325    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTableThenUint64, D>
26326        for &SimpleTableThenUint64
26327    {
26328        #[inline]
26329        unsafe fn encode(
26330            self,
26331            encoder: &mut fidl::encoding::Encoder<'_, D>,
26332            offset: usize,
26333            _depth: fidl::encoding::Depth,
26334        ) -> fidl::Result<()> {
26335            encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26336            // Delegate to tuple encoding.
26337            fidl::encoding::Encode::<SimpleTableThenUint64, D>::encode(
26338                (
26339                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),
26340                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.number),
26341                ),
26342                encoder,
26343                offset,
26344                _depth,
26345            )
26346        }
26347    }
26348    unsafe impl<
26349        D: fidl::encoding::ResourceDialect,
26350        T0: fidl::encoding::Encode<SimpleTable, D>,
26351        T1: fidl::encoding::Encode<u64, D>,
26352    > fidl::encoding::Encode<SimpleTableThenUint64, D> for (T0, T1)
26353    {
26354        #[inline]
26355        unsafe fn encode(
26356            self,
26357            encoder: &mut fidl::encoding::Encoder<'_, D>,
26358            offset: usize,
26359            depth: fidl::encoding::Depth,
26360        ) -> fidl::Result<()> {
26361            encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26362            // Zero out padding regions. There's no need to apply masks
26363            // because the unmasked parts will be overwritten by fields.
26364            // Write the fields.
26365            self.0.encode(encoder, offset + 0, depth)?;
26366            self.1.encode(encoder, offset + 16, depth)?;
26367            Ok(())
26368        }
26369    }
26370
26371    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTableThenUint64 {
26372        #[inline(always)]
26373        fn new_empty() -> Self {
26374            Self { table: fidl::new_empty!(SimpleTable, D), number: fidl::new_empty!(u64, D) }
26375        }
26376
26377        #[inline]
26378        unsafe fn decode(
26379            &mut self,
26380            decoder: &mut fidl::encoding::Decoder<'_, D>,
26381            offset: usize,
26382            _depth: fidl::encoding::Depth,
26383        ) -> fidl::Result<()> {
26384            decoder.debug_check_bounds::<Self>(offset);
26385            // Verify that padding bytes are zero.
26386            fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
26387            fidl::decode!(u64, D, &mut self.number, decoder, offset + 16, _depth)?;
26388            Ok(())
26389        }
26390    }
26391
26392    impl fidl::encoding::ValueTypeMarker for SingleVariantUnionStruct {
26393        type Borrowed<'a> = &'a Self;
26394        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26395            value
26396        }
26397    }
26398
26399    unsafe impl fidl::encoding::TypeMarker for SingleVariantUnionStruct {
26400        type Owned = Self;
26401
26402        #[inline(always)]
26403        fn inline_align(_context: fidl::encoding::Context) -> usize {
26404            8
26405        }
26406
26407        #[inline(always)]
26408        fn inline_size(_context: fidl::encoding::Context) -> usize {
26409            16
26410        }
26411    }
26412
26413    unsafe impl<D: fidl::encoding::ResourceDialect>
26414        fidl::encoding::Encode<SingleVariantUnionStruct, D> for &SingleVariantUnionStruct
26415    {
26416        #[inline]
26417        unsafe fn encode(
26418            self,
26419            encoder: &mut fidl::encoding::Encoder<'_, D>,
26420            offset: usize,
26421            _depth: fidl::encoding::Depth,
26422        ) -> fidl::Result<()> {
26423            encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26424            // Delegate to tuple encoding.
26425            fidl::encoding::Encode::<SingleVariantUnionStruct, D>::encode(
26426                (<SingleVariantUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
26427                encoder,
26428                offset,
26429                _depth,
26430            )
26431        }
26432    }
26433    unsafe impl<
26434        D: fidl::encoding::ResourceDialect,
26435        T0: fidl::encoding::Encode<SingleVariantUnion, D>,
26436    > fidl::encoding::Encode<SingleVariantUnionStruct, D> for (T0,)
26437    {
26438        #[inline]
26439        unsafe fn encode(
26440            self,
26441            encoder: &mut fidl::encoding::Encoder<'_, D>,
26442            offset: usize,
26443            depth: fidl::encoding::Depth,
26444        ) -> fidl::Result<()> {
26445            encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26446            // Zero out padding regions. There's no need to apply masks
26447            // because the unmasked parts will be overwritten by fields.
26448            // Write the fields.
26449            self.0.encode(encoder, offset + 0, depth)?;
26450            Ok(())
26451        }
26452    }
26453
26454    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26455        for SingleVariantUnionStruct
26456    {
26457        #[inline(always)]
26458        fn new_empty() -> Self {
26459            Self { u: fidl::new_empty!(SingleVariantUnion, D) }
26460        }
26461
26462        #[inline]
26463        unsafe fn decode(
26464            &mut self,
26465            decoder: &mut fidl::encoding::Decoder<'_, D>,
26466            offset: usize,
26467            _depth: fidl::encoding::Depth,
26468        ) -> fidl::Result<()> {
26469            decoder.debug_check_bounds::<Self>(offset);
26470            // Verify that padding bytes are zero.
26471            fidl::decode!(SingleVariantUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
26472            Ok(())
26473        }
26474    }
26475
26476    impl fidl::encoding::ValueTypeMarker for Size5Alignment1 {
26477        type Borrowed<'a> = &'a Self;
26478        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26479            value
26480        }
26481    }
26482
26483    unsafe impl fidl::encoding::TypeMarker for Size5Alignment1 {
26484        type Owned = Self;
26485
26486        #[inline(always)]
26487        fn inline_align(_context: fidl::encoding::Context) -> usize {
26488            1
26489        }
26490
26491        #[inline(always)]
26492        fn inline_size(_context: fidl::encoding::Context) -> usize {
26493            5
26494        }
26495        #[inline(always)]
26496        fn encode_is_copy() -> bool {
26497            true
26498        }
26499
26500        #[inline(always)]
26501        fn decode_is_copy() -> bool {
26502            true
26503        }
26504    }
26505
26506    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1, D>
26507        for &Size5Alignment1
26508    {
26509        #[inline]
26510        unsafe fn encode(
26511            self,
26512            encoder: &mut fidl::encoding::Encoder<'_, D>,
26513            offset: usize,
26514            _depth: fidl::encoding::Depth,
26515        ) -> fidl::Result<()> {
26516            encoder.debug_check_bounds::<Size5Alignment1>(offset);
26517            unsafe {
26518                // Copy the object into the buffer.
26519                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26520                (buf_ptr as *mut Size5Alignment1)
26521                    .write_unaligned((self as *const Size5Alignment1).read());
26522                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26523                // done second because the memcpy will write garbage to these bytes.
26524            }
26525            Ok(())
26526        }
26527    }
26528    unsafe impl<
26529        D: fidl::encoding::ResourceDialect,
26530        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 5>, D>,
26531    > fidl::encoding::Encode<Size5Alignment1, D> for (T0,)
26532    {
26533        #[inline]
26534        unsafe fn encode(
26535            self,
26536            encoder: &mut fidl::encoding::Encoder<'_, D>,
26537            offset: usize,
26538            depth: fidl::encoding::Depth,
26539        ) -> fidl::Result<()> {
26540            encoder.debug_check_bounds::<Size5Alignment1>(offset);
26541            // Zero out padding regions. There's no need to apply masks
26542            // because the unmasked parts will be overwritten by fields.
26543            // Write the fields.
26544            self.0.encode(encoder, offset + 0, depth)?;
26545            Ok(())
26546        }
26547    }
26548
26549    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1 {
26550        #[inline(always)]
26551        fn new_empty() -> Self {
26552            Self { data: fidl::new_empty!(fidl::encoding::Array<u8, 5>, D) }
26553        }
26554
26555        #[inline]
26556        unsafe fn decode(
26557            &mut self,
26558            decoder: &mut fidl::encoding::Decoder<'_, D>,
26559            offset: usize,
26560            _depth: fidl::encoding::Depth,
26561        ) -> fidl::Result<()> {
26562            decoder.debug_check_bounds::<Self>(offset);
26563            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26564            // Verify that padding bytes are zero.
26565            // Copy from the buffer into the object.
26566            unsafe {
26567                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 5);
26568            }
26569            Ok(())
26570        }
26571    }
26572
26573    impl fidl::encoding::ValueTypeMarker for Size5Alignment1Array {
26574        type Borrowed<'a> = &'a Self;
26575        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26576            value
26577        }
26578    }
26579
26580    unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Array {
26581        type Owned = Self;
26582
26583        #[inline(always)]
26584        fn inline_align(_context: fidl::encoding::Context) -> usize {
26585            1
26586        }
26587
26588        #[inline(always)]
26589        fn inline_size(_context: fidl::encoding::Context) -> usize {
26590            15
26591        }
26592        #[inline(always)]
26593        fn encode_is_copy() -> bool {
26594            true
26595        }
26596
26597        #[inline(always)]
26598        fn decode_is_copy() -> bool {
26599            true
26600        }
26601    }
26602
26603    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Array, D>
26604        for &Size5Alignment1Array
26605    {
26606        #[inline]
26607        unsafe fn encode(
26608            self,
26609            encoder: &mut fidl::encoding::Encoder<'_, D>,
26610            offset: usize,
26611            _depth: fidl::encoding::Depth,
26612        ) -> fidl::Result<()> {
26613            encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26614            unsafe {
26615                // Copy the object into the buffer.
26616                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26617                (buf_ptr as *mut Size5Alignment1Array)
26618                    .write_unaligned((self as *const Size5Alignment1Array).read());
26619                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26620                // done second because the memcpy will write garbage to these bytes.
26621            }
26622            Ok(())
26623        }
26624    }
26625    unsafe impl<
26626        D: fidl::encoding::ResourceDialect,
26627        T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment1, 3>, D>,
26628    > fidl::encoding::Encode<Size5Alignment1Array, D> for (T0,)
26629    {
26630        #[inline]
26631        unsafe fn encode(
26632            self,
26633            encoder: &mut fidl::encoding::Encoder<'_, D>,
26634            offset: usize,
26635            depth: fidl::encoding::Depth,
26636        ) -> fidl::Result<()> {
26637            encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26638            // Zero out padding regions. There's no need to apply masks
26639            // because the unmasked parts will be overwritten by fields.
26640            // Write the fields.
26641            self.0.encode(encoder, offset + 0, depth)?;
26642            Ok(())
26643        }
26644    }
26645
26646    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Array {
26647        #[inline(always)]
26648        fn new_empty() -> Self {
26649            Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment1, 3>, D) }
26650        }
26651
26652        #[inline]
26653        unsafe fn decode(
26654            &mut self,
26655            decoder: &mut fidl::encoding::Decoder<'_, D>,
26656            offset: usize,
26657            _depth: fidl::encoding::Depth,
26658        ) -> fidl::Result<()> {
26659            decoder.debug_check_bounds::<Self>(offset);
26660            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26661            // Verify that padding bytes are zero.
26662            // Copy from the buffer into the object.
26663            unsafe {
26664                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 15);
26665            }
26666            Ok(())
26667        }
26668    }
26669
26670    impl fidl::encoding::ValueTypeMarker for Size5Alignment1Vector {
26671        type Borrowed<'a> = &'a Self;
26672        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26673            value
26674        }
26675    }
26676
26677    unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Vector {
26678        type Owned = Self;
26679
26680        #[inline(always)]
26681        fn inline_align(_context: fidl::encoding::Context) -> usize {
26682            8
26683        }
26684
26685        #[inline(always)]
26686        fn inline_size(_context: fidl::encoding::Context) -> usize {
26687            16
26688        }
26689    }
26690
26691    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Vector, D>
26692        for &Size5Alignment1Vector
26693    {
26694        #[inline]
26695        unsafe fn encode(
26696            self,
26697            encoder: &mut fidl::encoding::Encoder<'_, D>,
26698            offset: usize,
26699            _depth: fidl::encoding::Depth,
26700        ) -> fidl::Result<()> {
26701            encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26702            // Delegate to tuple encoding.
26703            fidl::encoding::Encode::<Size5Alignment1Vector, D>::encode(
26704                (
26705                    <fidl::encoding::UnboundedVector<Size5Alignment1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
26706                ),
26707                encoder, offset, _depth
26708            )
26709        }
26710    }
26711    unsafe impl<
26712        D: fidl::encoding::ResourceDialect,
26713        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment1>, D>,
26714    > fidl::encoding::Encode<Size5Alignment1Vector, D> for (T0,)
26715    {
26716        #[inline]
26717        unsafe fn encode(
26718            self,
26719            encoder: &mut fidl::encoding::Encoder<'_, D>,
26720            offset: usize,
26721            depth: fidl::encoding::Depth,
26722        ) -> fidl::Result<()> {
26723            encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26724            // Zero out padding regions. There's no need to apply masks
26725            // because the unmasked parts will be overwritten by fields.
26726            // Write the fields.
26727            self.0.encode(encoder, offset + 0, depth)?;
26728            Ok(())
26729        }
26730    }
26731
26732    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Vector {
26733        #[inline(always)]
26734        fn new_empty() -> Self {
26735            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment1>, D) }
26736        }
26737
26738        #[inline]
26739        unsafe fn decode(
26740            &mut self,
26741            decoder: &mut fidl::encoding::Decoder<'_, D>,
26742            offset: usize,
26743            _depth: fidl::encoding::Depth,
26744        ) -> fidl::Result<()> {
26745            decoder.debug_check_bounds::<Self>(offset);
26746            // Verify that padding bytes are zero.
26747            fidl::decode!(
26748                fidl::encoding::UnboundedVector<Size5Alignment1>,
26749                D,
26750                &mut self.v,
26751                decoder,
26752                offset + 0,
26753                _depth
26754            )?;
26755            Ok(())
26756        }
26757    }
26758
26759    impl fidl::encoding::ValueTypeMarker for Size5Alignment4 {
26760        type Borrowed<'a> = &'a Self;
26761        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26762            value
26763        }
26764    }
26765
26766    unsafe impl fidl::encoding::TypeMarker for Size5Alignment4 {
26767        type Owned = Self;
26768
26769        #[inline(always)]
26770        fn inline_align(_context: fidl::encoding::Context) -> usize {
26771            4
26772        }
26773
26774        #[inline(always)]
26775        fn inline_size(_context: fidl::encoding::Context) -> usize {
26776            8
26777        }
26778    }
26779
26780    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4, D>
26781        for &Size5Alignment4
26782    {
26783        #[inline]
26784        unsafe fn encode(
26785            self,
26786            encoder: &mut fidl::encoding::Encoder<'_, D>,
26787            offset: usize,
26788            _depth: fidl::encoding::Depth,
26789        ) -> fidl::Result<()> {
26790            encoder.debug_check_bounds::<Size5Alignment4>(offset);
26791            unsafe {
26792                // Copy the object into the buffer.
26793                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26794                (buf_ptr as *mut Size5Alignment4)
26795                    .write_unaligned((self as *const Size5Alignment4).read());
26796                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26797                // done second because the memcpy will write garbage to these bytes.
26798                let padding_ptr = buf_ptr.offset(4) as *mut u32;
26799                let padding_mask = 0xffffff00u32;
26800                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26801            }
26802            Ok(())
26803        }
26804    }
26805    unsafe impl<
26806        D: fidl::encoding::ResourceDialect,
26807        T0: fidl::encoding::Encode<u32, D>,
26808        T1: fidl::encoding::Encode<u8, D>,
26809    > fidl::encoding::Encode<Size5Alignment4, D> for (T0, T1)
26810    {
26811        #[inline]
26812        unsafe fn encode(
26813            self,
26814            encoder: &mut fidl::encoding::Encoder<'_, D>,
26815            offset: usize,
26816            depth: fidl::encoding::Depth,
26817        ) -> fidl::Result<()> {
26818            encoder.debug_check_bounds::<Size5Alignment4>(offset);
26819            // Zero out padding regions. There's no need to apply masks
26820            // because the unmasked parts will be overwritten by fields.
26821            unsafe {
26822                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
26823                (ptr as *mut u32).write_unaligned(0);
26824            }
26825            // Write the fields.
26826            self.0.encode(encoder, offset + 0, depth)?;
26827            self.1.encode(encoder, offset + 4, depth)?;
26828            Ok(())
26829        }
26830    }
26831
26832    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4 {
26833        #[inline(always)]
26834        fn new_empty() -> Self {
26835            Self { four: fidl::new_empty!(u32, D), one: fidl::new_empty!(u8, D) }
26836        }
26837
26838        #[inline]
26839        unsafe fn decode(
26840            &mut self,
26841            decoder: &mut fidl::encoding::Decoder<'_, D>,
26842            offset: usize,
26843            _depth: fidl::encoding::Depth,
26844        ) -> fidl::Result<()> {
26845            decoder.debug_check_bounds::<Self>(offset);
26846            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26847            // Verify that padding bytes are zero.
26848            let ptr = unsafe { buf_ptr.offset(4) };
26849            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26850            let mask = 0xffffff00u32;
26851            let maskedval = padval & mask;
26852            if maskedval != 0 {
26853                return Err(fidl::Error::NonZeroPadding {
26854                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26855                });
26856            }
26857            // Copy from the buffer into the object.
26858            unsafe {
26859                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
26860            }
26861            Ok(())
26862        }
26863    }
26864
26865    impl fidl::encoding::ValueTypeMarker for Size5Alignment4Array {
26866        type Borrowed<'a> = &'a Self;
26867        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26868            value
26869        }
26870    }
26871
26872    unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Array {
26873        type Owned = Self;
26874
26875        #[inline(always)]
26876        fn inline_align(_context: fidl::encoding::Context) -> usize {
26877            4
26878        }
26879
26880        #[inline(always)]
26881        fn inline_size(_context: fidl::encoding::Context) -> usize {
26882            24
26883        }
26884    }
26885
26886    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Array, D>
26887        for &Size5Alignment4Array
26888    {
26889        #[inline]
26890        unsafe fn encode(
26891            self,
26892            encoder: &mut fidl::encoding::Encoder<'_, D>,
26893            offset: usize,
26894            _depth: fidl::encoding::Depth,
26895        ) -> fidl::Result<()> {
26896            encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26897            unsafe {
26898                // Copy the object into the buffer.
26899                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26900                (buf_ptr as *mut Size5Alignment4Array)
26901                    .write_unaligned((self as *const Size5Alignment4Array).read());
26902                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
26903                // done second because the memcpy will write garbage to these bytes.
26904                let padding_ptr = buf_ptr.offset(4) as *mut u32;
26905                let padding_mask = 0xffffff00u32;
26906                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26907                let padding_ptr = buf_ptr.offset(12) as *mut u32;
26908                let padding_mask = 0xffffff00u32;
26909                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26910                let padding_ptr = buf_ptr.offset(20) as *mut u32;
26911                let padding_mask = 0xffffff00u32;
26912                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26913            }
26914            Ok(())
26915        }
26916    }
26917    unsafe impl<
26918        D: fidl::encoding::ResourceDialect,
26919        T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment4, 3>, D>,
26920    > fidl::encoding::Encode<Size5Alignment4Array, D> for (T0,)
26921    {
26922        #[inline]
26923        unsafe fn encode(
26924            self,
26925            encoder: &mut fidl::encoding::Encoder<'_, D>,
26926            offset: usize,
26927            depth: fidl::encoding::Depth,
26928        ) -> fidl::Result<()> {
26929            encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26930            // Zero out padding regions. There's no need to apply masks
26931            // because the unmasked parts will be overwritten by fields.
26932            // Write the fields.
26933            self.0.encode(encoder, offset + 0, depth)?;
26934            Ok(())
26935        }
26936    }
26937
26938    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Array {
26939        #[inline(always)]
26940        fn new_empty() -> Self {
26941            Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment4, 3>, D) }
26942        }
26943
26944        #[inline]
26945        unsafe fn decode(
26946            &mut self,
26947            decoder: &mut fidl::encoding::Decoder<'_, D>,
26948            offset: usize,
26949            _depth: fidl::encoding::Depth,
26950        ) -> fidl::Result<()> {
26951            decoder.debug_check_bounds::<Self>(offset);
26952            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26953            // Verify that padding bytes are zero.
26954            let ptr = unsafe { buf_ptr.offset(4) };
26955            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26956            let mask = 0xffffff00u32;
26957            let maskedval = padval & mask;
26958            if maskedval != 0 {
26959                return Err(fidl::Error::NonZeroPadding {
26960                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26961                });
26962            }
26963            let ptr = unsafe { buf_ptr.offset(12) };
26964            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26965            let mask = 0xffffff00u32;
26966            let maskedval = padval & mask;
26967            if maskedval != 0 {
26968                return Err(fidl::Error::NonZeroPadding {
26969                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
26970                });
26971            }
26972            let ptr = unsafe { buf_ptr.offset(20) };
26973            let padval = unsafe { (ptr as *const u32).read_unaligned() };
26974            let mask = 0xffffff00u32;
26975            let maskedval = padval & mask;
26976            if maskedval != 0 {
26977                return Err(fidl::Error::NonZeroPadding {
26978                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
26979                });
26980            }
26981            // Copy from the buffer into the object.
26982            unsafe {
26983                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
26984            }
26985            Ok(())
26986        }
26987    }
26988
26989    impl fidl::encoding::ValueTypeMarker for Size5Alignment4Vector {
26990        type Borrowed<'a> = &'a Self;
26991        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26992            value
26993        }
26994    }
26995
26996    unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Vector {
26997        type Owned = Self;
26998
26999        #[inline(always)]
27000        fn inline_align(_context: fidl::encoding::Context) -> usize {
27001            8
27002        }
27003
27004        #[inline(always)]
27005        fn inline_size(_context: fidl::encoding::Context) -> usize {
27006            16
27007        }
27008    }
27009
27010    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Vector, D>
27011        for &Size5Alignment4Vector
27012    {
27013        #[inline]
27014        unsafe fn encode(
27015            self,
27016            encoder: &mut fidl::encoding::Encoder<'_, D>,
27017            offset: usize,
27018            _depth: fidl::encoding::Depth,
27019        ) -> fidl::Result<()> {
27020            encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
27021            // Delegate to tuple encoding.
27022            fidl::encoding::Encode::<Size5Alignment4Vector, D>::encode(
27023                (
27024                    <fidl::encoding::UnboundedVector<Size5Alignment4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
27025                ),
27026                encoder, offset, _depth
27027            )
27028        }
27029    }
27030    unsafe impl<
27031        D: fidl::encoding::ResourceDialect,
27032        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment4>, D>,
27033    > fidl::encoding::Encode<Size5Alignment4Vector, D> for (T0,)
27034    {
27035        #[inline]
27036        unsafe fn encode(
27037            self,
27038            encoder: &mut fidl::encoding::Encoder<'_, D>,
27039            offset: usize,
27040            depth: fidl::encoding::Depth,
27041        ) -> fidl::Result<()> {
27042            encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
27043            // Zero out padding regions. There's no need to apply masks
27044            // because the unmasked parts will be overwritten by fields.
27045            // Write the fields.
27046            self.0.encode(encoder, offset + 0, depth)?;
27047            Ok(())
27048        }
27049    }
27050
27051    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Vector {
27052        #[inline(always)]
27053        fn new_empty() -> Self {
27054            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment4>, D) }
27055        }
27056
27057        #[inline]
27058        unsafe fn decode(
27059            &mut self,
27060            decoder: &mut fidl::encoding::Decoder<'_, D>,
27061            offset: usize,
27062            _depth: fidl::encoding::Depth,
27063        ) -> fidl::Result<()> {
27064            decoder.debug_check_bounds::<Self>(offset);
27065            // Verify that padding bytes are zero.
27066            fidl::decode!(
27067                fidl::encoding::UnboundedVector<Size5Alignment4>,
27068                D,
27069                &mut self.v,
27070                decoder,
27071                offset + 0,
27072                _depth
27073            )?;
27074            Ok(())
27075        }
27076    }
27077
27078    impl fidl::encoding::ValueTypeMarker for Size8Align8 {
27079        type Borrowed<'a> = &'a Self;
27080        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27081            value
27082        }
27083    }
27084
27085    unsafe impl fidl::encoding::TypeMarker for Size8Align8 {
27086        type Owned = Self;
27087
27088        #[inline(always)]
27089        fn inline_align(_context: fidl::encoding::Context) -> usize {
27090            8
27091        }
27092
27093        #[inline(always)]
27094        fn inline_size(_context: fidl::encoding::Context) -> usize {
27095            8
27096        }
27097        #[inline(always)]
27098        fn encode_is_copy() -> bool {
27099            true
27100        }
27101
27102        #[inline(always)]
27103        fn decode_is_copy() -> bool {
27104            true
27105        }
27106    }
27107
27108    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size8Align8, D>
27109        for &Size8Align8
27110    {
27111        #[inline]
27112        unsafe fn encode(
27113            self,
27114            encoder: &mut fidl::encoding::Encoder<'_, D>,
27115            offset: usize,
27116            _depth: fidl::encoding::Depth,
27117        ) -> fidl::Result<()> {
27118            encoder.debug_check_bounds::<Size8Align8>(offset);
27119            unsafe {
27120                // Copy the object into the buffer.
27121                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
27122                (buf_ptr as *mut Size8Align8).write_unaligned((self as *const Size8Align8).read());
27123                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
27124                // done second because the memcpy will write garbage to these bytes.
27125            }
27126            Ok(())
27127        }
27128    }
27129    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
27130        fidl::encoding::Encode<Size8Align8, D> for (T0,)
27131    {
27132        #[inline]
27133        unsafe fn encode(
27134            self,
27135            encoder: &mut fidl::encoding::Encoder<'_, D>,
27136            offset: usize,
27137            depth: fidl::encoding::Depth,
27138        ) -> fidl::Result<()> {
27139            encoder.debug_check_bounds::<Size8Align8>(offset);
27140            // Zero out padding regions. There's no need to apply masks
27141            // because the unmasked parts will be overwritten by fields.
27142            // Write the fields.
27143            self.0.encode(encoder, offset + 0, depth)?;
27144            Ok(())
27145        }
27146    }
27147
27148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size8Align8 {
27149        #[inline(always)]
27150        fn new_empty() -> Self {
27151            Self { data: fidl::new_empty!(u64, D) }
27152        }
27153
27154        #[inline]
27155        unsafe fn decode(
27156            &mut self,
27157            decoder: &mut fidl::encoding::Decoder<'_, D>,
27158            offset: usize,
27159            _depth: fidl::encoding::Depth,
27160        ) -> fidl::Result<()> {
27161            decoder.debug_check_bounds::<Self>(offset);
27162            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
27163            // Verify that padding bytes are zero.
27164            // Copy from the buffer into the object.
27165            unsafe {
27166                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
27167            }
27168            Ok(())
27169        }
27170    }
27171
27172    impl fidl::encoding::ValueTypeMarker for StrictBitsUint16Struct {
27173        type Borrowed<'a> = &'a Self;
27174        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27175            value
27176        }
27177    }
27178
27179    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16Struct {
27180        type Owned = Self;
27181
27182        #[inline(always)]
27183        fn inline_align(_context: fidl::encoding::Context) -> usize {
27184            2
27185        }
27186
27187        #[inline(always)]
27188        fn inline_size(_context: fidl::encoding::Context) -> usize {
27189            2
27190        }
27191    }
27192
27193    unsafe impl<D: fidl::encoding::ResourceDialect>
27194        fidl::encoding::Encode<StrictBitsUint16Struct, D> for &StrictBitsUint16Struct
27195    {
27196        #[inline]
27197        unsafe fn encode(
27198            self,
27199            encoder: &mut fidl::encoding::Encoder<'_, D>,
27200            offset: usize,
27201            _depth: fidl::encoding::Depth,
27202        ) -> fidl::Result<()> {
27203            encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27204            // Delegate to tuple encoding.
27205            fidl::encoding::Encode::<StrictBitsUint16Struct, D>::encode(
27206                (<StrictBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27207                encoder,
27208                offset,
27209                _depth,
27210            )
27211        }
27212    }
27213    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint16, D>>
27214        fidl::encoding::Encode<StrictBitsUint16Struct, D> for (T0,)
27215    {
27216        #[inline]
27217        unsafe fn encode(
27218            self,
27219            encoder: &mut fidl::encoding::Encoder<'_, D>,
27220            offset: usize,
27221            depth: fidl::encoding::Depth,
27222        ) -> fidl::Result<()> {
27223            encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27224            // Zero out padding regions. There's no need to apply masks
27225            // because the unmasked parts will be overwritten by fields.
27226            // Write the fields.
27227            self.0.encode(encoder, offset + 0, depth)?;
27228            Ok(())
27229        }
27230    }
27231
27232    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27233        for StrictBitsUint16Struct
27234    {
27235        #[inline(always)]
27236        fn new_empty() -> Self {
27237            Self { b: fidl::new_empty!(StrictBitsUint16, D) }
27238        }
27239
27240        #[inline]
27241        unsafe fn decode(
27242            &mut self,
27243            decoder: &mut fidl::encoding::Decoder<'_, D>,
27244            offset: usize,
27245            _depth: fidl::encoding::Depth,
27246        ) -> fidl::Result<()> {
27247            decoder.debug_check_bounds::<Self>(offset);
27248            // Verify that padding bytes are zero.
27249            fidl::decode!(StrictBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
27250            Ok(())
27251        }
27252    }
27253
27254    impl fidl::encoding::ValueTypeMarker for StrictBitsUint32Struct {
27255        type Borrowed<'a> = &'a Self;
27256        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27257            value
27258        }
27259    }
27260
27261    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32Struct {
27262        type Owned = Self;
27263
27264        #[inline(always)]
27265        fn inline_align(_context: fidl::encoding::Context) -> usize {
27266            4
27267        }
27268
27269        #[inline(always)]
27270        fn inline_size(_context: fidl::encoding::Context) -> usize {
27271            4
27272        }
27273    }
27274
27275    unsafe impl<D: fidl::encoding::ResourceDialect>
27276        fidl::encoding::Encode<StrictBitsUint32Struct, D> for &StrictBitsUint32Struct
27277    {
27278        #[inline]
27279        unsafe fn encode(
27280            self,
27281            encoder: &mut fidl::encoding::Encoder<'_, D>,
27282            offset: usize,
27283            _depth: fidl::encoding::Depth,
27284        ) -> fidl::Result<()> {
27285            encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27286            // Delegate to tuple encoding.
27287            fidl::encoding::Encode::<StrictBitsUint32Struct, D>::encode(
27288                (<StrictBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27289                encoder,
27290                offset,
27291                _depth,
27292            )
27293        }
27294    }
27295    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint32, D>>
27296        fidl::encoding::Encode<StrictBitsUint32Struct, D> for (T0,)
27297    {
27298        #[inline]
27299        unsafe fn encode(
27300            self,
27301            encoder: &mut fidl::encoding::Encoder<'_, D>,
27302            offset: usize,
27303            depth: fidl::encoding::Depth,
27304        ) -> fidl::Result<()> {
27305            encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27306            // Zero out padding regions. There's no need to apply masks
27307            // because the unmasked parts will be overwritten by fields.
27308            // Write the fields.
27309            self.0.encode(encoder, offset + 0, depth)?;
27310            Ok(())
27311        }
27312    }
27313
27314    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27315        for StrictBitsUint32Struct
27316    {
27317        #[inline(always)]
27318        fn new_empty() -> Self {
27319            Self { b: fidl::new_empty!(StrictBitsUint32, D) }
27320        }
27321
27322        #[inline]
27323        unsafe fn decode(
27324            &mut self,
27325            decoder: &mut fidl::encoding::Decoder<'_, D>,
27326            offset: usize,
27327            _depth: fidl::encoding::Depth,
27328        ) -> fidl::Result<()> {
27329            decoder.debug_check_bounds::<Self>(offset);
27330            // Verify that padding bytes are zero.
27331            fidl::decode!(StrictBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
27332            Ok(())
27333        }
27334    }
27335
27336    impl fidl::encoding::ValueTypeMarker for StrictBitsUint64Struct {
27337        type Borrowed<'a> = &'a Self;
27338        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27339            value
27340        }
27341    }
27342
27343    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64Struct {
27344        type Owned = Self;
27345
27346        #[inline(always)]
27347        fn inline_align(_context: fidl::encoding::Context) -> usize {
27348            8
27349        }
27350
27351        #[inline(always)]
27352        fn inline_size(_context: fidl::encoding::Context) -> usize {
27353            8
27354        }
27355    }
27356
27357    unsafe impl<D: fidl::encoding::ResourceDialect>
27358        fidl::encoding::Encode<StrictBitsUint64Struct, D> for &StrictBitsUint64Struct
27359    {
27360        #[inline]
27361        unsafe fn encode(
27362            self,
27363            encoder: &mut fidl::encoding::Encoder<'_, D>,
27364            offset: usize,
27365            _depth: fidl::encoding::Depth,
27366        ) -> fidl::Result<()> {
27367            encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27368            // Delegate to tuple encoding.
27369            fidl::encoding::Encode::<StrictBitsUint64Struct, D>::encode(
27370                (<StrictBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27371                encoder,
27372                offset,
27373                _depth,
27374            )
27375        }
27376    }
27377    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint64, D>>
27378        fidl::encoding::Encode<StrictBitsUint64Struct, D> for (T0,)
27379    {
27380        #[inline]
27381        unsafe fn encode(
27382            self,
27383            encoder: &mut fidl::encoding::Encoder<'_, D>,
27384            offset: usize,
27385            depth: fidl::encoding::Depth,
27386        ) -> fidl::Result<()> {
27387            encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27388            // Zero out padding regions. There's no need to apply masks
27389            // because the unmasked parts will be overwritten by fields.
27390            // Write the fields.
27391            self.0.encode(encoder, offset + 0, depth)?;
27392            Ok(())
27393        }
27394    }
27395
27396    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27397        for StrictBitsUint64Struct
27398    {
27399        #[inline(always)]
27400        fn new_empty() -> Self {
27401            Self { b: fidl::new_empty!(StrictBitsUint64, D) }
27402        }
27403
27404        #[inline]
27405        unsafe fn decode(
27406            &mut self,
27407            decoder: &mut fidl::encoding::Decoder<'_, D>,
27408            offset: usize,
27409            _depth: fidl::encoding::Depth,
27410        ) -> fidl::Result<()> {
27411            decoder.debug_check_bounds::<Self>(offset);
27412            // Verify that padding bytes are zero.
27413            fidl::decode!(StrictBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
27414            Ok(())
27415        }
27416    }
27417
27418    impl fidl::encoding::ValueTypeMarker for StrictBitsUint8Struct {
27419        type Borrowed<'a> = &'a Self;
27420        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27421            value
27422        }
27423    }
27424
27425    unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8Struct {
27426        type Owned = Self;
27427
27428        #[inline(always)]
27429        fn inline_align(_context: fidl::encoding::Context) -> usize {
27430            1
27431        }
27432
27433        #[inline(always)]
27434        fn inline_size(_context: fidl::encoding::Context) -> usize {
27435            1
27436        }
27437    }
27438
27439    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictBitsUint8Struct, D>
27440        for &StrictBitsUint8Struct
27441    {
27442        #[inline]
27443        unsafe fn encode(
27444            self,
27445            encoder: &mut fidl::encoding::Encoder<'_, D>,
27446            offset: usize,
27447            _depth: fidl::encoding::Depth,
27448        ) -> fidl::Result<()> {
27449            encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27450            // Delegate to tuple encoding.
27451            fidl::encoding::Encode::<StrictBitsUint8Struct, D>::encode(
27452                (<StrictBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27453                encoder,
27454                offset,
27455                _depth,
27456            )
27457        }
27458    }
27459    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint8, D>>
27460        fidl::encoding::Encode<StrictBitsUint8Struct, D> for (T0,)
27461    {
27462        #[inline]
27463        unsafe fn encode(
27464            self,
27465            encoder: &mut fidl::encoding::Encoder<'_, D>,
27466            offset: usize,
27467            depth: fidl::encoding::Depth,
27468        ) -> fidl::Result<()> {
27469            encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27470            // Zero out padding regions. There's no need to apply masks
27471            // because the unmasked parts will be overwritten by fields.
27472            // Write the fields.
27473            self.0.encode(encoder, offset + 0, depth)?;
27474            Ok(())
27475        }
27476    }
27477
27478    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8Struct {
27479        #[inline(always)]
27480        fn new_empty() -> Self {
27481            Self { b: fidl::new_empty!(StrictBitsUint8, D) }
27482        }
27483
27484        #[inline]
27485        unsafe fn decode(
27486            &mut self,
27487            decoder: &mut fidl::encoding::Decoder<'_, D>,
27488            offset: usize,
27489            _depth: fidl::encoding::Depth,
27490        ) -> fidl::Result<()> {
27491            decoder.debug_check_bounds::<Self>(offset);
27492            // Verify that padding bytes are zero.
27493            fidl::decode!(StrictBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
27494            Ok(())
27495        }
27496    }
27497
27498    impl fidl::encoding::ValueTypeMarker for StrictEnumInt16Struct {
27499        type Borrowed<'a> = &'a Self;
27500        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27501            value
27502        }
27503    }
27504
27505    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16Struct {
27506        type Owned = Self;
27507
27508        #[inline(always)]
27509        fn inline_align(_context: fidl::encoding::Context) -> usize {
27510            2
27511        }
27512
27513        #[inline(always)]
27514        fn inline_size(_context: fidl::encoding::Context) -> usize {
27515            2
27516        }
27517    }
27518
27519    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt16Struct, D>
27520        for &StrictEnumInt16Struct
27521    {
27522        #[inline]
27523        unsafe fn encode(
27524            self,
27525            encoder: &mut fidl::encoding::Encoder<'_, D>,
27526            offset: usize,
27527            _depth: fidl::encoding::Depth,
27528        ) -> fidl::Result<()> {
27529            encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27530            // Delegate to tuple encoding.
27531            fidl::encoding::Encode::<StrictEnumInt16Struct, D>::encode(
27532                (<StrictEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27533                encoder,
27534                offset,
27535                _depth,
27536            )
27537        }
27538    }
27539    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt16, D>>
27540        fidl::encoding::Encode<StrictEnumInt16Struct, D> for (T0,)
27541    {
27542        #[inline]
27543        unsafe fn encode(
27544            self,
27545            encoder: &mut fidl::encoding::Encoder<'_, D>,
27546            offset: usize,
27547            depth: fidl::encoding::Depth,
27548        ) -> fidl::Result<()> {
27549            encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27550            // Zero out padding regions. There's no need to apply masks
27551            // because the unmasked parts will be overwritten by fields.
27552            // Write the fields.
27553            self.0.encode(encoder, offset + 0, depth)?;
27554            Ok(())
27555        }
27556    }
27557
27558    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16Struct {
27559        #[inline(always)]
27560        fn new_empty() -> Self {
27561            Self { e: fidl::new_empty!(StrictEnumInt16, D) }
27562        }
27563
27564        #[inline]
27565        unsafe fn decode(
27566            &mut self,
27567            decoder: &mut fidl::encoding::Decoder<'_, D>,
27568            offset: usize,
27569            _depth: fidl::encoding::Depth,
27570        ) -> fidl::Result<()> {
27571            decoder.debug_check_bounds::<Self>(offset);
27572            // Verify that padding bytes are zero.
27573            fidl::decode!(StrictEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
27574            Ok(())
27575        }
27576    }
27577
27578    impl fidl::encoding::ValueTypeMarker for StrictEnumInt32Struct {
27579        type Borrowed<'a> = &'a Self;
27580        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27581            value
27582        }
27583    }
27584
27585    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32Struct {
27586        type Owned = Self;
27587
27588        #[inline(always)]
27589        fn inline_align(_context: fidl::encoding::Context) -> usize {
27590            4
27591        }
27592
27593        #[inline(always)]
27594        fn inline_size(_context: fidl::encoding::Context) -> usize {
27595            4
27596        }
27597    }
27598
27599    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt32Struct, D>
27600        for &StrictEnumInt32Struct
27601    {
27602        #[inline]
27603        unsafe fn encode(
27604            self,
27605            encoder: &mut fidl::encoding::Encoder<'_, D>,
27606            offset: usize,
27607            _depth: fidl::encoding::Depth,
27608        ) -> fidl::Result<()> {
27609            encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27610            // Delegate to tuple encoding.
27611            fidl::encoding::Encode::<StrictEnumInt32Struct, D>::encode(
27612                (<StrictEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27613                encoder,
27614                offset,
27615                _depth,
27616            )
27617        }
27618    }
27619    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt32, D>>
27620        fidl::encoding::Encode<StrictEnumInt32Struct, D> for (T0,)
27621    {
27622        #[inline]
27623        unsafe fn encode(
27624            self,
27625            encoder: &mut fidl::encoding::Encoder<'_, D>,
27626            offset: usize,
27627            depth: fidl::encoding::Depth,
27628        ) -> fidl::Result<()> {
27629            encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27630            // Zero out padding regions. There's no need to apply masks
27631            // because the unmasked parts will be overwritten by fields.
27632            // Write the fields.
27633            self.0.encode(encoder, offset + 0, depth)?;
27634            Ok(())
27635        }
27636    }
27637
27638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32Struct {
27639        #[inline(always)]
27640        fn new_empty() -> Self {
27641            Self { e: fidl::new_empty!(StrictEnumInt32, D) }
27642        }
27643
27644        #[inline]
27645        unsafe fn decode(
27646            &mut self,
27647            decoder: &mut fidl::encoding::Decoder<'_, D>,
27648            offset: usize,
27649            _depth: fidl::encoding::Depth,
27650        ) -> fidl::Result<()> {
27651            decoder.debug_check_bounds::<Self>(offset);
27652            // Verify that padding bytes are zero.
27653            fidl::decode!(StrictEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
27654            Ok(())
27655        }
27656    }
27657
27658    impl fidl::encoding::ValueTypeMarker for StrictEnumInt64Struct {
27659        type Borrowed<'a> = &'a Self;
27660        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27661            value
27662        }
27663    }
27664
27665    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64Struct {
27666        type Owned = Self;
27667
27668        #[inline(always)]
27669        fn inline_align(_context: fidl::encoding::Context) -> usize {
27670            8
27671        }
27672
27673        #[inline(always)]
27674        fn inline_size(_context: fidl::encoding::Context) -> usize {
27675            8
27676        }
27677    }
27678
27679    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt64Struct, D>
27680        for &StrictEnumInt64Struct
27681    {
27682        #[inline]
27683        unsafe fn encode(
27684            self,
27685            encoder: &mut fidl::encoding::Encoder<'_, D>,
27686            offset: usize,
27687            _depth: fidl::encoding::Depth,
27688        ) -> fidl::Result<()> {
27689            encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27690            // Delegate to tuple encoding.
27691            fidl::encoding::Encode::<StrictEnumInt64Struct, D>::encode(
27692                (<StrictEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27693                encoder,
27694                offset,
27695                _depth,
27696            )
27697        }
27698    }
27699    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt64, D>>
27700        fidl::encoding::Encode<StrictEnumInt64Struct, D> for (T0,)
27701    {
27702        #[inline]
27703        unsafe fn encode(
27704            self,
27705            encoder: &mut fidl::encoding::Encoder<'_, D>,
27706            offset: usize,
27707            depth: fidl::encoding::Depth,
27708        ) -> fidl::Result<()> {
27709            encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27710            // Zero out padding regions. There's no need to apply masks
27711            // because the unmasked parts will be overwritten by fields.
27712            // Write the fields.
27713            self.0.encode(encoder, offset + 0, depth)?;
27714            Ok(())
27715        }
27716    }
27717
27718    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64Struct {
27719        #[inline(always)]
27720        fn new_empty() -> Self {
27721            Self { e: fidl::new_empty!(StrictEnumInt64, D) }
27722        }
27723
27724        #[inline]
27725        unsafe fn decode(
27726            &mut self,
27727            decoder: &mut fidl::encoding::Decoder<'_, D>,
27728            offset: usize,
27729            _depth: fidl::encoding::Depth,
27730        ) -> fidl::Result<()> {
27731            decoder.debug_check_bounds::<Self>(offset);
27732            // Verify that padding bytes are zero.
27733            fidl::decode!(StrictEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
27734            Ok(())
27735        }
27736    }
27737
27738    impl fidl::encoding::ValueTypeMarker for StrictEnumInt8Struct {
27739        type Borrowed<'a> = &'a Self;
27740        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27741            value
27742        }
27743    }
27744
27745    unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8Struct {
27746        type Owned = Self;
27747
27748        #[inline(always)]
27749        fn inline_align(_context: fidl::encoding::Context) -> usize {
27750            1
27751        }
27752
27753        #[inline(always)]
27754        fn inline_size(_context: fidl::encoding::Context) -> usize {
27755            1
27756        }
27757    }
27758
27759    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt8Struct, D>
27760        for &StrictEnumInt8Struct
27761    {
27762        #[inline]
27763        unsafe fn encode(
27764            self,
27765            encoder: &mut fidl::encoding::Encoder<'_, D>,
27766            offset: usize,
27767            _depth: fidl::encoding::Depth,
27768        ) -> fidl::Result<()> {
27769            encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27770            // Delegate to tuple encoding.
27771            fidl::encoding::Encode::<StrictEnumInt8Struct, D>::encode(
27772                (<StrictEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27773                encoder,
27774                offset,
27775                _depth,
27776            )
27777        }
27778    }
27779    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt8, D>>
27780        fidl::encoding::Encode<StrictEnumInt8Struct, D> for (T0,)
27781    {
27782        #[inline]
27783        unsafe fn encode(
27784            self,
27785            encoder: &mut fidl::encoding::Encoder<'_, D>,
27786            offset: usize,
27787            depth: fidl::encoding::Depth,
27788        ) -> fidl::Result<()> {
27789            encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27790            // Zero out padding regions. There's no need to apply masks
27791            // because the unmasked parts will be overwritten by fields.
27792            // Write the fields.
27793            self.0.encode(encoder, offset + 0, depth)?;
27794            Ok(())
27795        }
27796    }
27797
27798    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8Struct {
27799        #[inline(always)]
27800        fn new_empty() -> Self {
27801            Self { e: fidl::new_empty!(StrictEnumInt8, D) }
27802        }
27803
27804        #[inline]
27805        unsafe fn decode(
27806            &mut self,
27807            decoder: &mut fidl::encoding::Decoder<'_, D>,
27808            offset: usize,
27809            _depth: fidl::encoding::Depth,
27810        ) -> fidl::Result<()> {
27811            decoder.debug_check_bounds::<Self>(offset);
27812            // Verify that padding bytes are zero.
27813            fidl::decode!(StrictEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
27814            Ok(())
27815        }
27816    }
27817
27818    impl fidl::encoding::ValueTypeMarker for StrictEnumUint16Struct {
27819        type Borrowed<'a> = &'a Self;
27820        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27821            value
27822        }
27823    }
27824
27825    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16Struct {
27826        type Owned = Self;
27827
27828        #[inline(always)]
27829        fn inline_align(_context: fidl::encoding::Context) -> usize {
27830            2
27831        }
27832
27833        #[inline(always)]
27834        fn inline_size(_context: fidl::encoding::Context) -> usize {
27835            2
27836        }
27837    }
27838
27839    unsafe impl<D: fidl::encoding::ResourceDialect>
27840        fidl::encoding::Encode<StrictEnumUint16Struct, D> for &StrictEnumUint16Struct
27841    {
27842        #[inline]
27843        unsafe fn encode(
27844            self,
27845            encoder: &mut fidl::encoding::Encoder<'_, D>,
27846            offset: usize,
27847            _depth: fidl::encoding::Depth,
27848        ) -> fidl::Result<()> {
27849            encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27850            // Delegate to tuple encoding.
27851            fidl::encoding::Encode::<StrictEnumUint16Struct, D>::encode(
27852                (<StrictEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27853                encoder,
27854                offset,
27855                _depth,
27856            )
27857        }
27858    }
27859    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint16, D>>
27860        fidl::encoding::Encode<StrictEnumUint16Struct, D> for (T0,)
27861    {
27862        #[inline]
27863        unsafe fn encode(
27864            self,
27865            encoder: &mut fidl::encoding::Encoder<'_, D>,
27866            offset: usize,
27867            depth: fidl::encoding::Depth,
27868        ) -> fidl::Result<()> {
27869            encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27870            // Zero out padding regions. There's no need to apply masks
27871            // because the unmasked parts will be overwritten by fields.
27872            // Write the fields.
27873            self.0.encode(encoder, offset + 0, depth)?;
27874            Ok(())
27875        }
27876    }
27877
27878    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27879        for StrictEnumUint16Struct
27880    {
27881        #[inline(always)]
27882        fn new_empty() -> Self {
27883            Self { e: fidl::new_empty!(StrictEnumUint16, D) }
27884        }
27885
27886        #[inline]
27887        unsafe fn decode(
27888            &mut self,
27889            decoder: &mut fidl::encoding::Decoder<'_, D>,
27890            offset: usize,
27891            _depth: fidl::encoding::Depth,
27892        ) -> fidl::Result<()> {
27893            decoder.debug_check_bounds::<Self>(offset);
27894            // Verify that padding bytes are zero.
27895            fidl::decode!(StrictEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
27896            Ok(())
27897        }
27898    }
27899
27900    impl fidl::encoding::ValueTypeMarker for StrictEnumUint32Struct {
27901        type Borrowed<'a> = &'a Self;
27902        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27903            value
27904        }
27905    }
27906
27907    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32Struct {
27908        type Owned = Self;
27909
27910        #[inline(always)]
27911        fn inline_align(_context: fidl::encoding::Context) -> usize {
27912            4
27913        }
27914
27915        #[inline(always)]
27916        fn inline_size(_context: fidl::encoding::Context) -> usize {
27917            4
27918        }
27919    }
27920
27921    unsafe impl<D: fidl::encoding::ResourceDialect>
27922        fidl::encoding::Encode<StrictEnumUint32Struct, D> for &StrictEnumUint32Struct
27923    {
27924        #[inline]
27925        unsafe fn encode(
27926            self,
27927            encoder: &mut fidl::encoding::Encoder<'_, D>,
27928            offset: usize,
27929            _depth: fidl::encoding::Depth,
27930        ) -> fidl::Result<()> {
27931            encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27932            // Delegate to tuple encoding.
27933            fidl::encoding::Encode::<StrictEnumUint32Struct, D>::encode(
27934                (<StrictEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27935                encoder,
27936                offset,
27937                _depth,
27938            )
27939        }
27940    }
27941    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint32, D>>
27942        fidl::encoding::Encode<StrictEnumUint32Struct, D> for (T0,)
27943    {
27944        #[inline]
27945        unsafe fn encode(
27946            self,
27947            encoder: &mut fidl::encoding::Encoder<'_, D>,
27948            offset: usize,
27949            depth: fidl::encoding::Depth,
27950        ) -> fidl::Result<()> {
27951            encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27952            // Zero out padding regions. There's no need to apply masks
27953            // because the unmasked parts will be overwritten by fields.
27954            // Write the fields.
27955            self.0.encode(encoder, offset + 0, depth)?;
27956            Ok(())
27957        }
27958    }
27959
27960    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27961        for StrictEnumUint32Struct
27962    {
27963        #[inline(always)]
27964        fn new_empty() -> Self {
27965            Self { e: fidl::new_empty!(StrictEnumUint32, D) }
27966        }
27967
27968        #[inline]
27969        unsafe fn decode(
27970            &mut self,
27971            decoder: &mut fidl::encoding::Decoder<'_, D>,
27972            offset: usize,
27973            _depth: fidl::encoding::Depth,
27974        ) -> fidl::Result<()> {
27975            decoder.debug_check_bounds::<Self>(offset);
27976            // Verify that padding bytes are zero.
27977            fidl::decode!(StrictEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
27978            Ok(())
27979        }
27980    }
27981
27982    impl fidl::encoding::ValueTypeMarker for StrictEnumUint64Struct {
27983        type Borrowed<'a> = &'a Self;
27984        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27985            value
27986        }
27987    }
27988
27989    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64Struct {
27990        type Owned = Self;
27991
27992        #[inline(always)]
27993        fn inline_align(_context: fidl::encoding::Context) -> usize {
27994            8
27995        }
27996
27997        #[inline(always)]
27998        fn inline_size(_context: fidl::encoding::Context) -> usize {
27999            8
28000        }
28001    }
28002
28003    unsafe impl<D: fidl::encoding::ResourceDialect>
28004        fidl::encoding::Encode<StrictEnumUint64Struct, D> for &StrictEnumUint64Struct
28005    {
28006        #[inline]
28007        unsafe fn encode(
28008            self,
28009            encoder: &mut fidl::encoding::Encoder<'_, D>,
28010            offset: usize,
28011            _depth: fidl::encoding::Depth,
28012        ) -> fidl::Result<()> {
28013            encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
28014            // Delegate to tuple encoding.
28015            fidl::encoding::Encode::<StrictEnumUint64Struct, D>::encode(
28016                (<StrictEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
28017                encoder,
28018                offset,
28019                _depth,
28020            )
28021        }
28022    }
28023    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint64, D>>
28024        fidl::encoding::Encode<StrictEnumUint64Struct, D> for (T0,)
28025    {
28026        #[inline]
28027        unsafe fn encode(
28028            self,
28029            encoder: &mut fidl::encoding::Encoder<'_, D>,
28030            offset: usize,
28031            depth: fidl::encoding::Depth,
28032        ) -> fidl::Result<()> {
28033            encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
28034            // Zero out padding regions. There's no need to apply masks
28035            // because the unmasked parts will be overwritten by fields.
28036            // Write the fields.
28037            self.0.encode(encoder, offset + 0, depth)?;
28038            Ok(())
28039        }
28040    }
28041
28042    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28043        for StrictEnumUint64Struct
28044    {
28045        #[inline(always)]
28046        fn new_empty() -> Self {
28047            Self { e: fidl::new_empty!(StrictEnumUint64, D) }
28048        }
28049
28050        #[inline]
28051        unsafe fn decode(
28052            &mut self,
28053            decoder: &mut fidl::encoding::Decoder<'_, D>,
28054            offset: usize,
28055            _depth: fidl::encoding::Depth,
28056        ) -> fidl::Result<()> {
28057            decoder.debug_check_bounds::<Self>(offset);
28058            // Verify that padding bytes are zero.
28059            fidl::decode!(StrictEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
28060            Ok(())
28061        }
28062    }
28063
28064    impl fidl::encoding::ValueTypeMarker for StrictEnumUint8Struct {
28065        type Borrowed<'a> = &'a Self;
28066        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28067            value
28068        }
28069    }
28070
28071    unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8Struct {
28072        type Owned = Self;
28073
28074        #[inline(always)]
28075        fn inline_align(_context: fidl::encoding::Context) -> usize {
28076            1
28077        }
28078
28079        #[inline(always)]
28080        fn inline_size(_context: fidl::encoding::Context) -> usize {
28081            1
28082        }
28083    }
28084
28085    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumUint8Struct, D>
28086        for &StrictEnumUint8Struct
28087    {
28088        #[inline]
28089        unsafe fn encode(
28090            self,
28091            encoder: &mut fidl::encoding::Encoder<'_, D>,
28092            offset: usize,
28093            _depth: fidl::encoding::Depth,
28094        ) -> fidl::Result<()> {
28095            encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
28096            // Delegate to tuple encoding.
28097            fidl::encoding::Encode::<StrictEnumUint8Struct, D>::encode(
28098                (<StrictEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
28099                encoder,
28100                offset,
28101                _depth,
28102            )
28103        }
28104    }
28105    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint8, D>>
28106        fidl::encoding::Encode<StrictEnumUint8Struct, D> for (T0,)
28107    {
28108        #[inline]
28109        unsafe fn encode(
28110            self,
28111            encoder: &mut fidl::encoding::Encoder<'_, D>,
28112            offset: usize,
28113            depth: fidl::encoding::Depth,
28114        ) -> fidl::Result<()> {
28115            encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
28116            // Zero out padding regions. There's no need to apply masks
28117            // because the unmasked parts will be overwritten by fields.
28118            // Write the fields.
28119            self.0.encode(encoder, offset + 0, depth)?;
28120            Ok(())
28121        }
28122    }
28123
28124    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8Struct {
28125        #[inline(always)]
28126        fn new_empty() -> Self {
28127            Self { e: fidl::new_empty!(StrictEnumUint8, D) }
28128        }
28129
28130        #[inline]
28131        unsafe fn decode(
28132            &mut self,
28133            decoder: &mut fidl::encoding::Decoder<'_, D>,
28134            offset: usize,
28135            _depth: fidl::encoding::Depth,
28136        ) -> fidl::Result<()> {
28137            decoder.debug_check_bounds::<Self>(offset);
28138            // Verify that padding bytes are zero.
28139            fidl::decode!(StrictEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
28140            Ok(())
28141        }
28142    }
28143
28144    impl fidl::encoding::ValueTypeMarker for StringUnionStruct {
28145        type Borrowed<'a> = &'a Self;
28146        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28147            value
28148        }
28149    }
28150
28151    unsafe impl fidl::encoding::TypeMarker for StringUnionStruct {
28152        type Owned = Self;
28153
28154        #[inline(always)]
28155        fn inline_align(_context: fidl::encoding::Context) -> usize {
28156            8
28157        }
28158
28159        #[inline(always)]
28160        fn inline_size(_context: fidl::encoding::Context) -> usize {
28161            32
28162        }
28163    }
28164
28165    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionStruct, D>
28166        for &StringUnionStruct
28167    {
28168        #[inline]
28169        unsafe fn encode(
28170            self,
28171            encoder: &mut fidl::encoding::Encoder<'_, D>,
28172            offset: usize,
28173            _depth: fidl::encoding::Depth,
28174        ) -> fidl::Result<()> {
28175            encoder.debug_check_bounds::<StringUnionStruct>(offset);
28176            // Delegate to tuple encoding.
28177            fidl::encoding::Encode::<StringUnionStruct, D>::encode(
28178                (
28179                    <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
28180                    <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
28181                ),
28182                encoder, offset, _depth
28183            )
28184        }
28185    }
28186    unsafe impl<
28187        D: fidl::encoding::ResourceDialect,
28188        T0: fidl::encoding::Encode<StringBoolUnion, D>,
28189        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
28190    > fidl::encoding::Encode<StringUnionStruct, D> for (T0, T1)
28191    {
28192        #[inline]
28193        unsafe fn encode(
28194            self,
28195            encoder: &mut fidl::encoding::Encoder<'_, D>,
28196            offset: usize,
28197            depth: fidl::encoding::Depth,
28198        ) -> fidl::Result<()> {
28199            encoder.debug_check_bounds::<StringUnionStruct>(offset);
28200            // Zero out padding regions. There's no need to apply masks
28201            // because the unmasked parts will be overwritten by fields.
28202            // Write the fields.
28203            self.0.encode(encoder, offset + 0, depth)?;
28204            self.1.encode(encoder, offset + 16, depth)?;
28205            Ok(())
28206        }
28207    }
28208
28209    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionStruct {
28210        #[inline(always)]
28211        fn new_empty() -> Self {
28212            Self {
28213                u: fidl::new_empty!(StringBoolUnion, D),
28214                nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
28215            }
28216        }
28217
28218        #[inline]
28219        unsafe fn decode(
28220            &mut self,
28221            decoder: &mut fidl::encoding::Decoder<'_, D>,
28222            offset: usize,
28223            _depth: fidl::encoding::Depth,
28224        ) -> fidl::Result<()> {
28225            decoder.debug_check_bounds::<Self>(offset);
28226            // Verify that padding bytes are zero.
28227            fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
28228            fidl::decode!(
28229                fidl::encoding::OptionalUnion<StringBoolUnion>,
28230                D,
28231                &mut self.nullable_u,
28232                decoder,
28233                offset + 16,
28234                _depth
28235            )?;
28236            Ok(())
28237        }
28238    }
28239
28240    impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapper {
28241        type Borrowed<'a> = &'a Self;
28242        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28243            value
28244        }
28245    }
28246
28247    unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapper {
28248        type Owned = Self;
28249
28250        #[inline(always)]
28251        fn inline_align(_context: fidl::encoding::Context) -> usize {
28252            8
28253        }
28254
28255        #[inline(always)]
28256        fn inline_size(_context: fidl::encoding::Context) -> usize {
28257            32
28258        }
28259    }
28260
28261    unsafe impl<D: fidl::encoding::ResourceDialect>
28262        fidl::encoding::Encode<StringUnionStructWrapper, D> for &StringUnionStructWrapper
28263    {
28264        #[inline]
28265        unsafe fn encode(
28266            self,
28267            encoder: &mut fidl::encoding::Encoder<'_, D>,
28268            offset: usize,
28269            _depth: fidl::encoding::Depth,
28270        ) -> fidl::Result<()> {
28271            encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28272            // Delegate to tuple encoding.
28273            fidl::encoding::Encode::<StringUnionStructWrapper, D>::encode(
28274                (<StringUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.sus),),
28275                encoder,
28276                offset,
28277                _depth,
28278            )
28279        }
28280    }
28281    unsafe impl<
28282        D: fidl::encoding::ResourceDialect,
28283        T0: fidl::encoding::Encode<StringUnionStruct, D>,
28284    > fidl::encoding::Encode<StringUnionStructWrapper, D> for (T0,)
28285    {
28286        #[inline]
28287        unsafe fn encode(
28288            self,
28289            encoder: &mut fidl::encoding::Encoder<'_, D>,
28290            offset: usize,
28291            depth: fidl::encoding::Depth,
28292        ) -> fidl::Result<()> {
28293            encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28294            // Zero out padding regions. There's no need to apply masks
28295            // because the unmasked parts will be overwritten by fields.
28296            // Write the fields.
28297            self.0.encode(encoder, offset + 0, depth)?;
28298            Ok(())
28299        }
28300    }
28301
28302    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28303        for StringUnionStructWrapper
28304    {
28305        #[inline(always)]
28306        fn new_empty() -> Self {
28307            Self { sus: fidl::new_empty!(StringUnionStruct, D) }
28308        }
28309
28310        #[inline]
28311        unsafe fn decode(
28312            &mut self,
28313            decoder: &mut fidl::encoding::Decoder<'_, D>,
28314            offset: usize,
28315            _depth: fidl::encoding::Depth,
28316        ) -> fidl::Result<()> {
28317            decoder.debug_check_bounds::<Self>(offset);
28318            // Verify that padding bytes are zero.
28319            fidl::decode!(StringUnionStruct, D, &mut self.sus, decoder, offset + 0, _depth)?;
28320            Ok(())
28321        }
28322    }
28323
28324    impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapperResponse {
28325        type Borrowed<'a> = &'a Self;
28326        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28327            value
28328        }
28329    }
28330
28331    unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapperResponse {
28332        type Owned = Self;
28333
28334        #[inline(always)]
28335        fn inline_align(_context: fidl::encoding::Context) -> usize {
28336            8
28337        }
28338
28339        #[inline(always)]
28340        fn inline_size(_context: fidl::encoding::Context) -> usize {
28341            48
28342        }
28343    }
28344
28345    unsafe impl<D: fidl::encoding::ResourceDialect>
28346        fidl::encoding::Encode<StringUnionStructWrapperResponse, D>
28347        for &StringUnionStructWrapperResponse
28348    {
28349        #[inline]
28350        unsafe fn encode(
28351            self,
28352            encoder: &mut fidl::encoding::Encoder<'_, D>,
28353            offset: usize,
28354            _depth: fidl::encoding::Depth,
28355        ) -> fidl::Result<()> {
28356            encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28357            // Delegate to tuple encoding.
28358            fidl::encoding::Encode::<StringUnionStructWrapperResponse, D>::encode(
28359                (
28360                    <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
28361                    <StringUnionStructWrapper as fidl::encoding::ValueTypeMarker>::borrow(
28362                        &self.body,
28363                    ),
28364                ),
28365                encoder,
28366                offset,
28367                _depth,
28368            )
28369        }
28370    }
28371    unsafe impl<
28372        D: fidl::encoding::ResourceDialect,
28373        T0: fidl::encoding::Encode<TransactionHeader, D>,
28374        T1: fidl::encoding::Encode<StringUnionStructWrapper, D>,
28375    > fidl::encoding::Encode<StringUnionStructWrapperResponse, D> for (T0, T1)
28376    {
28377        #[inline]
28378        unsafe fn encode(
28379            self,
28380            encoder: &mut fidl::encoding::Encoder<'_, D>,
28381            offset: usize,
28382            depth: fidl::encoding::Depth,
28383        ) -> fidl::Result<()> {
28384            encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28385            // Zero out padding regions. There's no need to apply masks
28386            // because the unmasked parts will be overwritten by fields.
28387            // Write the fields.
28388            self.0.encode(encoder, offset + 0, depth)?;
28389            self.1.encode(encoder, offset + 16, depth)?;
28390            Ok(())
28391        }
28392    }
28393
28394    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28395        for StringUnionStructWrapperResponse
28396    {
28397        #[inline(always)]
28398        fn new_empty() -> Self {
28399            Self {
28400                header: fidl::new_empty!(TransactionHeader, D),
28401                body: fidl::new_empty!(StringUnionStructWrapper, D),
28402            }
28403        }
28404
28405        #[inline]
28406        unsafe fn decode(
28407            &mut self,
28408            decoder: &mut fidl::encoding::Decoder<'_, D>,
28409            offset: usize,
28410            _depth: fidl::encoding::Depth,
28411        ) -> fidl::Result<()> {
28412            decoder.debug_check_bounds::<Self>(offset);
28413            // Verify that padding bytes are zero.
28414            fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
28415            fidl::decode!(
28416                StringUnionStructWrapper,
28417                D,
28418                &mut self.body,
28419                decoder,
28420                offset + 16,
28421                _depth
28422            )?;
28423            Ok(())
28424        }
28425    }
28426
28427    impl fidl::encoding::ValueTypeMarker for StringUnionVector {
28428        type Borrowed<'a> = &'a Self;
28429        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28430            value
28431        }
28432    }
28433
28434    unsafe impl fidl::encoding::TypeMarker for StringUnionVector {
28435        type Owned = Self;
28436
28437        #[inline(always)]
28438        fn inline_align(_context: fidl::encoding::Context) -> usize {
28439            8
28440        }
28441
28442        #[inline(always)]
28443        fn inline_size(_context: fidl::encoding::Context) -> usize {
28444            16
28445        }
28446    }
28447
28448    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionVector, D>
28449        for &StringUnionVector
28450    {
28451        #[inline]
28452        unsafe fn encode(
28453            self,
28454            encoder: &mut fidl::encoding::Encoder<'_, D>,
28455            offset: usize,
28456            _depth: fidl::encoding::Depth,
28457        ) -> fidl::Result<()> {
28458            encoder.debug_check_bounds::<StringUnionVector>(offset);
28459            // Delegate to tuple encoding.
28460            fidl::encoding::Encode::<StringUnionVector, D>::encode(
28461                (
28462                    <fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_vector),
28463                ),
28464                encoder, offset, _depth
28465            )
28466        }
28467    }
28468    unsafe impl<
28469        D: fidl::encoding::ResourceDialect,
28470        T0: fidl::encoding::Encode<
28471                fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28472                D,
28473            >,
28474    > fidl::encoding::Encode<StringUnionVector, D> for (T0,)
28475    {
28476        #[inline]
28477        unsafe fn encode(
28478            self,
28479            encoder: &mut fidl::encoding::Encoder<'_, D>,
28480            offset: usize,
28481            depth: fidl::encoding::Depth,
28482        ) -> fidl::Result<()> {
28483            encoder.debug_check_bounds::<StringUnionVector>(offset);
28484            // Zero out padding regions. There's no need to apply masks
28485            // because the unmasked parts will be overwritten by fields.
28486            // Write the fields.
28487            self.0.encode(encoder, offset + 0, depth)?;
28488            Ok(())
28489        }
28490    }
28491
28492    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionVector {
28493        #[inline(always)]
28494        fn new_empty() -> Self {
28495            Self {
28496                the_vector: fidl::new_empty!(
28497                    fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28498                    D
28499                ),
28500            }
28501        }
28502
28503        #[inline]
28504        unsafe fn decode(
28505            &mut self,
28506            decoder: &mut fidl::encoding::Decoder<'_, D>,
28507            offset: usize,
28508            _depth: fidl::encoding::Depth,
28509        ) -> fidl::Result<()> {
28510            decoder.debug_check_bounds::<Self>(offset);
28511            // Verify that padding bytes are zero.
28512            fidl::decode!(
28513                fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28514                D,
28515                &mut self.the_vector,
28516                decoder,
28517                offset + 0,
28518                _depth
28519            )?;
28520            Ok(())
28521        }
28522    }
28523
28524    impl fidl::encoding::ValueTypeMarker for StringWithLimitInArray {
28525        type Borrowed<'a> = &'a Self;
28526        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28527            value
28528        }
28529    }
28530
28531    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInArray {
28532        type Owned = Self;
28533
28534        #[inline(always)]
28535        fn inline_align(_context: fidl::encoding::Context) -> usize {
28536            8
28537        }
28538
28539        #[inline(always)]
28540        fn inline_size(_context: fidl::encoding::Context) -> usize {
28541            32
28542        }
28543    }
28544
28545    unsafe impl<D: fidl::encoding::ResourceDialect>
28546        fidl::encoding::Encode<StringWithLimitInArray, D> for &StringWithLimitInArray
28547    {
28548        #[inline]
28549        unsafe fn encode(
28550            self,
28551            encoder: &mut fidl::encoding::Encoder<'_, D>,
28552            offset: usize,
28553            _depth: fidl::encoding::Depth,
28554        ) -> fidl::Result<()> {
28555            encoder.debug_check_bounds::<StringWithLimitInArray>(offset);
28556            // Delegate to tuple encoding.
28557            fidl::encoding::Encode::<StringWithLimitInArray, D>::encode(
28558                (
28559                    <fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
28560                ),
28561                encoder, offset, _depth
28562            )
28563        }
28564    }
28565    unsafe impl<
28566        D: fidl::encoding::ResourceDialect,
28567        T0: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2>, D>,
28568    > fidl::encoding::Encode<StringWithLimitInArray, D> for (T0,)
28569    {
28570        #[inline]
28571        unsafe fn encode(
28572            self,
28573            encoder: &mut fidl::encoding::Encoder<'_, D>,
28574            offset: usize,
28575            depth: fidl::encoding::Depth,
28576        ) -> fidl::Result<()> {
28577            encoder.debug_check_bounds::<StringWithLimitInArray>(offset);
28578            // Zero out padding regions. There's no need to apply masks
28579            // because the unmasked parts will be overwritten by fields.
28580            // Write the fields.
28581            self.0.encode(encoder, offset + 0, depth)?;
28582            Ok(())
28583        }
28584    }
28585
28586    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28587        for StringWithLimitInArray
28588    {
28589        #[inline(always)]
28590        fn new_empty() -> Self {
28591            Self {
28592                a: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2>, D),
28593            }
28594        }
28595
28596        #[inline]
28597        unsafe fn decode(
28598            &mut self,
28599            decoder: &mut fidl::encoding::Decoder<'_, D>,
28600            offset: usize,
28601            _depth: fidl::encoding::Depth,
28602        ) -> fidl::Result<()> {
28603            decoder.debug_check_bounds::<Self>(offset);
28604            // Verify that padding bytes are zero.
28605            fidl::decode!(
28606                fidl::encoding::Array<fidl::encoding::BoundedString<2>, 2>,
28607                D,
28608                &mut self.a,
28609                decoder,
28610                offset + 0,
28611                _depth
28612            )?;
28613            Ok(())
28614        }
28615    }
28616
28617    impl fidl::encoding::ValueTypeMarker for StringWithLimitInTable {
28618        type Borrowed<'a> = &'a Self;
28619        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28620            value
28621        }
28622    }
28623
28624    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInTable {
28625        type Owned = Self;
28626
28627        #[inline(always)]
28628        fn inline_align(_context: fidl::encoding::Context) -> usize {
28629            8
28630        }
28631
28632        #[inline(always)]
28633        fn inline_size(_context: fidl::encoding::Context) -> usize {
28634            16
28635        }
28636    }
28637
28638    unsafe impl<D: fidl::encoding::ResourceDialect>
28639        fidl::encoding::Encode<StringWithLimitInTable, D> for &StringWithLimitInTable
28640    {
28641        #[inline]
28642        unsafe fn encode(
28643            self,
28644            encoder: &mut fidl::encoding::Encoder<'_, D>,
28645            offset: usize,
28646            _depth: fidl::encoding::Depth,
28647        ) -> fidl::Result<()> {
28648            encoder.debug_check_bounds::<StringWithLimitInTable>(offset);
28649            // Delegate to tuple encoding.
28650            fidl::encoding::Encode::<StringWithLimitInTable, D>::encode(
28651                (<TableWithStringWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
28652                encoder,
28653                offset,
28654                _depth,
28655            )
28656        }
28657    }
28658    unsafe impl<
28659        D: fidl::encoding::ResourceDialect,
28660        T0: fidl::encoding::Encode<TableWithStringWithLimit, D>,
28661    > fidl::encoding::Encode<StringWithLimitInTable, D> for (T0,)
28662    {
28663        #[inline]
28664        unsafe fn encode(
28665            self,
28666            encoder: &mut fidl::encoding::Encoder<'_, D>,
28667            offset: usize,
28668            depth: fidl::encoding::Depth,
28669        ) -> fidl::Result<()> {
28670            encoder.debug_check_bounds::<StringWithLimitInTable>(offset);
28671            // Zero out padding regions. There's no need to apply masks
28672            // because the unmasked parts will be overwritten by fields.
28673            // Write the fields.
28674            self.0.encode(encoder, offset + 0, depth)?;
28675            Ok(())
28676        }
28677    }
28678
28679    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28680        for StringWithLimitInTable
28681    {
28682        #[inline(always)]
28683        fn new_empty() -> Self {
28684            Self { t: fidl::new_empty!(TableWithStringWithLimit, D) }
28685        }
28686
28687        #[inline]
28688        unsafe fn decode(
28689            &mut self,
28690            decoder: &mut fidl::encoding::Decoder<'_, D>,
28691            offset: usize,
28692            _depth: fidl::encoding::Depth,
28693        ) -> fidl::Result<()> {
28694            decoder.debug_check_bounds::<Self>(offset);
28695            // Verify that padding bytes are zero.
28696            fidl::decode!(TableWithStringWithLimit, D, &mut self.t, decoder, offset + 0, _depth)?;
28697            Ok(())
28698        }
28699    }
28700
28701    impl fidl::encoding::ValueTypeMarker for StringWithLimitInUnion {
28702        type Borrowed<'a> = &'a Self;
28703        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28704            value
28705        }
28706    }
28707
28708    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInUnion {
28709        type Owned = Self;
28710
28711        #[inline(always)]
28712        fn inline_align(_context: fidl::encoding::Context) -> usize {
28713            8
28714        }
28715
28716        #[inline(always)]
28717        fn inline_size(_context: fidl::encoding::Context) -> usize {
28718            16
28719        }
28720    }
28721
28722    unsafe impl<D: fidl::encoding::ResourceDialect>
28723        fidl::encoding::Encode<StringWithLimitInUnion, D> for &StringWithLimitInUnion
28724    {
28725        #[inline]
28726        unsafe fn encode(
28727            self,
28728            encoder: &mut fidl::encoding::Encoder<'_, D>,
28729            offset: usize,
28730            _depth: fidl::encoding::Depth,
28731        ) -> fidl::Result<()> {
28732            encoder.debug_check_bounds::<StringWithLimitInUnion>(offset);
28733            // Delegate to tuple encoding.
28734            fidl::encoding::Encode::<StringWithLimitInUnion, D>::encode(
28735                (<UnionWithStringWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
28736                encoder,
28737                offset,
28738                _depth,
28739            )
28740        }
28741    }
28742    unsafe impl<
28743        D: fidl::encoding::ResourceDialect,
28744        T0: fidl::encoding::Encode<UnionWithStringWithLimit, D>,
28745    > fidl::encoding::Encode<StringWithLimitInUnion, D> for (T0,)
28746    {
28747        #[inline]
28748        unsafe fn encode(
28749            self,
28750            encoder: &mut fidl::encoding::Encoder<'_, D>,
28751            offset: usize,
28752            depth: fidl::encoding::Depth,
28753        ) -> fidl::Result<()> {
28754            encoder.debug_check_bounds::<StringWithLimitInUnion>(offset);
28755            // Zero out padding regions. There's no need to apply masks
28756            // because the unmasked parts will be overwritten by fields.
28757            // Write the fields.
28758            self.0.encode(encoder, offset + 0, depth)?;
28759            Ok(())
28760        }
28761    }
28762
28763    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28764        for StringWithLimitInUnion
28765    {
28766        #[inline(always)]
28767        fn new_empty() -> Self {
28768            Self { u: fidl::new_empty!(UnionWithStringWithLimit, D) }
28769        }
28770
28771        #[inline]
28772        unsafe fn decode(
28773            &mut self,
28774            decoder: &mut fidl::encoding::Decoder<'_, D>,
28775            offset: usize,
28776            _depth: fidl::encoding::Depth,
28777        ) -> fidl::Result<()> {
28778            decoder.debug_check_bounds::<Self>(offset);
28779            // Verify that padding bytes are zero.
28780            fidl::decode!(UnionWithStringWithLimit, D, &mut self.u, decoder, offset + 0, _depth)?;
28781            Ok(())
28782        }
28783    }
28784
28785    impl fidl::encoding::ValueTypeMarker for StringWithLimitInVector {
28786        type Borrowed<'a> = &'a Self;
28787        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28788            value
28789        }
28790    }
28791
28792    unsafe impl fidl::encoding::TypeMarker for StringWithLimitInVector {
28793        type Owned = Self;
28794
28795        #[inline(always)]
28796        fn inline_align(_context: fidl::encoding::Context) -> usize {
28797            8
28798        }
28799
28800        #[inline(always)]
28801        fn inline_size(_context: fidl::encoding::Context) -> usize {
28802            16
28803        }
28804    }
28805
28806    unsafe impl<D: fidl::encoding::ResourceDialect>
28807        fidl::encoding::Encode<StringWithLimitInVector, D> for &StringWithLimitInVector
28808    {
28809        #[inline]
28810        unsafe fn encode(
28811            self,
28812            encoder: &mut fidl::encoding::Encoder<'_, D>,
28813            offset: usize,
28814            _depth: fidl::encoding::Depth,
28815        ) -> fidl::Result<()> {
28816            encoder.debug_check_bounds::<StringWithLimitInVector>(offset);
28817            // Delegate to tuple encoding.
28818            fidl::encoding::Encode::<StringWithLimitInVector, D>::encode(
28819                (<fidl::encoding::UnboundedVector<
28820                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28821                > as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
28822                encoder,
28823                offset,
28824                _depth,
28825            )
28826        }
28827    }
28828    unsafe impl<
28829        D: fidl::encoding::ResourceDialect,
28830        T0: fidl::encoding::Encode<
28831                fidl::encoding::UnboundedVector<
28832                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28833                >,
28834                D,
28835            >,
28836    > fidl::encoding::Encode<StringWithLimitInVector, D> for (T0,)
28837    {
28838        #[inline]
28839        unsafe fn encode(
28840            self,
28841            encoder: &mut fidl::encoding::Encoder<'_, D>,
28842            offset: usize,
28843            depth: fidl::encoding::Depth,
28844        ) -> fidl::Result<()> {
28845            encoder.debug_check_bounds::<StringWithLimitInVector>(offset);
28846            // Zero out padding regions. There's no need to apply masks
28847            // because the unmasked parts will be overwritten by fields.
28848            // Write the fields.
28849            self.0.encode(encoder, offset + 0, depth)?;
28850            Ok(())
28851        }
28852    }
28853
28854    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28855        for StringWithLimitInVector
28856    {
28857        #[inline(always)]
28858        fn new_empty() -> Self {
28859            Self {
28860                v: fidl::new_empty!(
28861                    fidl::encoding::UnboundedVector<
28862                        fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28863                    >,
28864                    D
28865                ),
28866            }
28867        }
28868
28869        #[inline]
28870        unsafe fn decode(
28871            &mut self,
28872            decoder: &mut fidl::encoding::Decoder<'_, D>,
28873            offset: usize,
28874            _depth: fidl::encoding::Depth,
28875        ) -> fidl::Result<()> {
28876            decoder.debug_check_bounds::<Self>(offset);
28877            // Verify that padding bytes are zero.
28878            fidl::decode!(
28879                fidl::encoding::UnboundedVector<
28880                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
28881                >,
28882                D,
28883                &mut self.v,
28884                decoder,
28885                offset + 0,
28886                _depth
28887            )?;
28888            Ok(())
28889        }
28890    }
28891
28892    impl fidl::encoding::ValueTypeMarker for StringWrapper {
28893        type Borrowed<'a> = &'a Self;
28894        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28895            value
28896        }
28897    }
28898
28899    unsafe impl fidl::encoding::TypeMarker for StringWrapper {
28900        type Owned = Self;
28901
28902        #[inline(always)]
28903        fn inline_align(_context: fidl::encoding::Context) -> usize {
28904            8
28905        }
28906
28907        #[inline(always)]
28908        fn inline_size(_context: fidl::encoding::Context) -> usize {
28909            16
28910        }
28911    }
28912
28913    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringWrapper, D>
28914        for &StringWrapper
28915    {
28916        #[inline]
28917        unsafe fn encode(
28918            self,
28919            encoder: &mut fidl::encoding::Encoder<'_, D>,
28920            offset: usize,
28921            _depth: fidl::encoding::Depth,
28922        ) -> fidl::Result<()> {
28923            encoder.debug_check_bounds::<StringWrapper>(offset);
28924            // Delegate to tuple encoding.
28925            fidl::encoding::Encode::<StringWrapper, D>::encode(
28926                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
28927                    &self.str,
28928                ),),
28929                encoder,
28930                offset,
28931                _depth,
28932            )
28933        }
28934    }
28935    unsafe impl<
28936        D: fidl::encoding::ResourceDialect,
28937        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
28938    > fidl::encoding::Encode<StringWrapper, D> for (T0,)
28939    {
28940        #[inline]
28941        unsafe fn encode(
28942            self,
28943            encoder: &mut fidl::encoding::Encoder<'_, D>,
28944            offset: usize,
28945            depth: fidl::encoding::Depth,
28946        ) -> fidl::Result<()> {
28947            encoder.debug_check_bounds::<StringWrapper>(offset);
28948            // Zero out padding regions. There's no need to apply masks
28949            // because the unmasked parts will be overwritten by fields.
28950            // Write the fields.
28951            self.0.encode(encoder, offset + 0, depth)?;
28952            Ok(())
28953        }
28954    }
28955
28956    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringWrapper {
28957        #[inline(always)]
28958        fn new_empty() -> Self {
28959            Self { str: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
28960        }
28961
28962        #[inline]
28963        unsafe fn decode(
28964            &mut self,
28965            decoder: &mut fidl::encoding::Decoder<'_, D>,
28966            offset: usize,
28967            _depth: fidl::encoding::Depth,
28968        ) -> fidl::Result<()> {
28969            decoder.debug_check_bounds::<Self>(offset);
28970            // Verify that padding bytes are zero.
28971            fidl::decode!(
28972                fidl::encoding::UnboundedString,
28973                D,
28974                &mut self.str,
28975                decoder,
28976                offset + 0,
28977                _depth
28978            )?;
28979            Ok(())
28980        }
28981    }
28982
28983    impl fidl::encoding::ValueTypeMarker for Struct1Byte {
28984        type Borrowed<'a> = &'a Self;
28985        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28986            value
28987        }
28988    }
28989
28990    unsafe impl fidl::encoding::TypeMarker for Struct1Byte {
28991        type Owned = Self;
28992
28993        #[inline(always)]
28994        fn inline_align(_context: fidl::encoding::Context) -> usize {
28995            1
28996        }
28997
28998        #[inline(always)]
28999        fn inline_size(_context: fidl::encoding::Context) -> usize {
29000            1
29001        }
29002        #[inline(always)]
29003        fn encode_is_copy() -> bool {
29004            true
29005        }
29006
29007        #[inline(always)]
29008        fn decode_is_copy() -> bool {
29009            true
29010        }
29011    }
29012
29013    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct1Byte, D>
29014        for &Struct1Byte
29015    {
29016        #[inline]
29017        unsafe fn encode(
29018            self,
29019            encoder: &mut fidl::encoding::Encoder<'_, D>,
29020            offset: usize,
29021            _depth: fidl::encoding::Depth,
29022        ) -> fidl::Result<()> {
29023            encoder.debug_check_bounds::<Struct1Byte>(offset);
29024            unsafe {
29025                // Copy the object into the buffer.
29026                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29027                (buf_ptr as *mut Struct1Byte).write_unaligned((self as *const Struct1Byte).read());
29028                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29029                // done second because the memcpy will write garbage to these bytes.
29030            }
29031            Ok(())
29032        }
29033    }
29034    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
29035        fidl::encoding::Encode<Struct1Byte, D> for (T0,)
29036    {
29037        #[inline]
29038        unsafe fn encode(
29039            self,
29040            encoder: &mut fidl::encoding::Encoder<'_, D>,
29041            offset: usize,
29042            depth: fidl::encoding::Depth,
29043        ) -> fidl::Result<()> {
29044            encoder.debug_check_bounds::<Struct1Byte>(offset);
29045            // Zero out padding regions. There's no need to apply masks
29046            // because the unmasked parts will be overwritten by fields.
29047            // Write the fields.
29048            self.0.encode(encoder, offset + 0, depth)?;
29049            Ok(())
29050        }
29051    }
29052
29053    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct1Byte {
29054        #[inline(always)]
29055        fn new_empty() -> Self {
29056            Self { a: fidl::new_empty!(i8, D) }
29057        }
29058
29059        #[inline]
29060        unsafe fn decode(
29061            &mut self,
29062            decoder: &mut fidl::encoding::Decoder<'_, D>,
29063            offset: usize,
29064            _depth: fidl::encoding::Depth,
29065        ) -> fidl::Result<()> {
29066            decoder.debug_check_bounds::<Self>(offset);
29067            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29068            // Verify that padding bytes are zero.
29069            // Copy from the buffer into the object.
29070            unsafe {
29071                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
29072            }
29073            Ok(())
29074        }
29075    }
29076
29077    impl fidl::encoding::ValueTypeMarker for Struct2Byte {
29078        type Borrowed<'a> = &'a Self;
29079        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29080            value
29081        }
29082    }
29083
29084    unsafe impl fidl::encoding::TypeMarker for Struct2Byte {
29085        type Owned = Self;
29086
29087        #[inline(always)]
29088        fn inline_align(_context: fidl::encoding::Context) -> usize {
29089            2
29090        }
29091
29092        #[inline(always)]
29093        fn inline_size(_context: fidl::encoding::Context) -> usize {
29094            2
29095        }
29096        #[inline(always)]
29097        fn encode_is_copy() -> bool {
29098            true
29099        }
29100
29101        #[inline(always)]
29102        fn decode_is_copy() -> bool {
29103            true
29104        }
29105    }
29106
29107    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct2Byte, D>
29108        for &Struct2Byte
29109    {
29110        #[inline]
29111        unsafe fn encode(
29112            self,
29113            encoder: &mut fidl::encoding::Encoder<'_, D>,
29114            offset: usize,
29115            _depth: fidl::encoding::Depth,
29116        ) -> fidl::Result<()> {
29117            encoder.debug_check_bounds::<Struct2Byte>(offset);
29118            unsafe {
29119                // Copy the object into the buffer.
29120                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29121                (buf_ptr as *mut Struct2Byte).write_unaligned((self as *const Struct2Byte).read());
29122                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29123                // done second because the memcpy will write garbage to these bytes.
29124            }
29125            Ok(())
29126        }
29127    }
29128    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
29129        fidl::encoding::Encode<Struct2Byte, D> for (T0,)
29130    {
29131        #[inline]
29132        unsafe fn encode(
29133            self,
29134            encoder: &mut fidl::encoding::Encoder<'_, D>,
29135            offset: usize,
29136            depth: fidl::encoding::Depth,
29137        ) -> fidl::Result<()> {
29138            encoder.debug_check_bounds::<Struct2Byte>(offset);
29139            // Zero out padding regions. There's no need to apply masks
29140            // because the unmasked parts will be overwritten by fields.
29141            // Write the fields.
29142            self.0.encode(encoder, offset + 0, depth)?;
29143            Ok(())
29144        }
29145    }
29146
29147    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct2Byte {
29148        #[inline(always)]
29149        fn new_empty() -> Self {
29150            Self { a: fidl::new_empty!(i16, D) }
29151        }
29152
29153        #[inline]
29154        unsafe fn decode(
29155            &mut self,
29156            decoder: &mut fidl::encoding::Decoder<'_, D>,
29157            offset: usize,
29158            _depth: fidl::encoding::Depth,
29159        ) -> fidl::Result<()> {
29160            decoder.debug_check_bounds::<Self>(offset);
29161            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29162            // Verify that padding bytes are zero.
29163            // Copy from the buffer into the object.
29164            unsafe {
29165                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
29166            }
29167            Ok(())
29168        }
29169    }
29170
29171    impl fidl::encoding::ValueTypeMarker for Struct3Byte {
29172        type Borrowed<'a> = &'a Self;
29173        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29174            value
29175        }
29176    }
29177
29178    unsafe impl fidl::encoding::TypeMarker for Struct3Byte {
29179        type Owned = Self;
29180
29181        #[inline(always)]
29182        fn inline_align(_context: fidl::encoding::Context) -> usize {
29183            2
29184        }
29185
29186        #[inline(always)]
29187        fn inline_size(_context: fidl::encoding::Context) -> usize {
29188            4
29189        }
29190    }
29191
29192    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct3Byte, D>
29193        for &Struct3Byte
29194    {
29195        #[inline]
29196        unsafe fn encode(
29197            self,
29198            encoder: &mut fidl::encoding::Encoder<'_, D>,
29199            offset: usize,
29200            _depth: fidl::encoding::Depth,
29201        ) -> fidl::Result<()> {
29202            encoder.debug_check_bounds::<Struct3Byte>(offset);
29203            unsafe {
29204                // Copy the object into the buffer.
29205                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29206                (buf_ptr as *mut Struct3Byte).write_unaligned((self as *const Struct3Byte).read());
29207                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29208                // done second because the memcpy will write garbage to these bytes.
29209                let padding_ptr = buf_ptr.offset(2) as *mut u16;
29210                let padding_mask = 0xff00u16;
29211                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29212            }
29213            Ok(())
29214        }
29215    }
29216    unsafe impl<
29217        D: fidl::encoding::ResourceDialect,
29218        T0: fidl::encoding::Encode<i16, D>,
29219        T1: fidl::encoding::Encode<i8, D>,
29220    > fidl::encoding::Encode<Struct3Byte, D> for (T0, T1)
29221    {
29222        #[inline]
29223        unsafe fn encode(
29224            self,
29225            encoder: &mut fidl::encoding::Encoder<'_, D>,
29226            offset: usize,
29227            depth: fidl::encoding::Depth,
29228        ) -> fidl::Result<()> {
29229            encoder.debug_check_bounds::<Struct3Byte>(offset);
29230            // Zero out padding regions. There's no need to apply masks
29231            // because the unmasked parts will be overwritten by fields.
29232            unsafe {
29233                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
29234                (ptr as *mut u16).write_unaligned(0);
29235            }
29236            // Write the fields.
29237            self.0.encode(encoder, offset + 0, depth)?;
29238            self.1.encode(encoder, offset + 2, depth)?;
29239            Ok(())
29240        }
29241    }
29242
29243    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct3Byte {
29244        #[inline(always)]
29245        fn new_empty() -> Self {
29246            Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i8, D) }
29247        }
29248
29249        #[inline]
29250        unsafe fn decode(
29251            &mut self,
29252            decoder: &mut fidl::encoding::Decoder<'_, D>,
29253            offset: usize,
29254            _depth: fidl::encoding::Depth,
29255        ) -> fidl::Result<()> {
29256            decoder.debug_check_bounds::<Self>(offset);
29257            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29258            // Verify that padding bytes are zero.
29259            let ptr = unsafe { buf_ptr.offset(2) };
29260            let padval = unsafe { (ptr as *const u16).read_unaligned() };
29261            let mask = 0xff00u16;
29262            let maskedval = padval & mask;
29263            if maskedval != 0 {
29264                return Err(fidl::Error::NonZeroPadding {
29265                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
29266                });
29267            }
29268            // Copy from the buffer into the object.
29269            unsafe {
29270                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
29271            }
29272            Ok(())
29273        }
29274    }
29275
29276    impl fidl::encoding::ValueTypeMarker for Struct4Byte {
29277        type Borrowed<'a> = &'a Self;
29278        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29279            value
29280        }
29281    }
29282
29283    unsafe impl fidl::encoding::TypeMarker for Struct4Byte {
29284        type Owned = Self;
29285
29286        #[inline(always)]
29287        fn inline_align(_context: fidl::encoding::Context) -> usize {
29288            4
29289        }
29290
29291        #[inline(always)]
29292        fn inline_size(_context: fidl::encoding::Context) -> usize {
29293            4
29294        }
29295        #[inline(always)]
29296        fn encode_is_copy() -> bool {
29297            true
29298        }
29299
29300        #[inline(always)]
29301        fn decode_is_copy() -> bool {
29302            true
29303        }
29304    }
29305
29306    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct4Byte, D>
29307        for &Struct4Byte
29308    {
29309        #[inline]
29310        unsafe fn encode(
29311            self,
29312            encoder: &mut fidl::encoding::Encoder<'_, D>,
29313            offset: usize,
29314            _depth: fidl::encoding::Depth,
29315        ) -> fidl::Result<()> {
29316            encoder.debug_check_bounds::<Struct4Byte>(offset);
29317            unsafe {
29318                // Copy the object into the buffer.
29319                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29320                (buf_ptr as *mut Struct4Byte).write_unaligned((self as *const Struct4Byte).read());
29321                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29322                // done second because the memcpy will write garbage to these bytes.
29323            }
29324            Ok(())
29325        }
29326    }
29327    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
29328        fidl::encoding::Encode<Struct4Byte, D> for (T0,)
29329    {
29330        #[inline]
29331        unsafe fn encode(
29332            self,
29333            encoder: &mut fidl::encoding::Encoder<'_, D>,
29334            offset: usize,
29335            depth: fidl::encoding::Depth,
29336        ) -> fidl::Result<()> {
29337            encoder.debug_check_bounds::<Struct4Byte>(offset);
29338            // Zero out padding regions. There's no need to apply masks
29339            // because the unmasked parts will be overwritten by fields.
29340            // Write the fields.
29341            self.0.encode(encoder, offset + 0, depth)?;
29342            Ok(())
29343        }
29344    }
29345
29346    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct4Byte {
29347        #[inline(always)]
29348        fn new_empty() -> Self {
29349            Self { a: fidl::new_empty!(i32, D) }
29350        }
29351
29352        #[inline]
29353        unsafe fn decode(
29354            &mut self,
29355            decoder: &mut fidl::encoding::Decoder<'_, D>,
29356            offset: usize,
29357            _depth: fidl::encoding::Depth,
29358        ) -> fidl::Result<()> {
29359            decoder.debug_check_bounds::<Self>(offset);
29360            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29361            // Verify that padding bytes are zero.
29362            // Copy from the buffer into the object.
29363            unsafe {
29364                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
29365            }
29366            Ok(())
29367        }
29368    }
29369
29370    impl fidl::encoding::ValueTypeMarker for Struct5Byte {
29371        type Borrowed<'a> = &'a Self;
29372        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29373            value
29374        }
29375    }
29376
29377    unsafe impl fidl::encoding::TypeMarker for Struct5Byte {
29378        type Owned = Self;
29379
29380        #[inline(always)]
29381        fn inline_align(_context: fidl::encoding::Context) -> usize {
29382            4
29383        }
29384
29385        #[inline(always)]
29386        fn inline_size(_context: fidl::encoding::Context) -> usize {
29387            8
29388        }
29389    }
29390
29391    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct5Byte, D>
29392        for &Struct5Byte
29393    {
29394        #[inline]
29395        unsafe fn encode(
29396            self,
29397            encoder: &mut fidl::encoding::Encoder<'_, D>,
29398            offset: usize,
29399            _depth: fidl::encoding::Depth,
29400        ) -> fidl::Result<()> {
29401            encoder.debug_check_bounds::<Struct5Byte>(offset);
29402            unsafe {
29403                // Copy the object into the buffer.
29404                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29405                (buf_ptr as *mut Struct5Byte).write_unaligned((self as *const Struct5Byte).read());
29406                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29407                // done second because the memcpy will write garbage to these bytes.
29408                let padding_ptr = buf_ptr.offset(4) as *mut u32;
29409                let padding_mask = 0xffffff00u32;
29410                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29411            }
29412            Ok(())
29413        }
29414    }
29415    unsafe impl<
29416        D: fidl::encoding::ResourceDialect,
29417        T0: fidl::encoding::Encode<i32, D>,
29418        T1: fidl::encoding::Encode<i8, D>,
29419    > fidl::encoding::Encode<Struct5Byte, D> for (T0, T1)
29420    {
29421        #[inline]
29422        unsafe fn encode(
29423            self,
29424            encoder: &mut fidl::encoding::Encoder<'_, D>,
29425            offset: usize,
29426            depth: fidl::encoding::Depth,
29427        ) -> fidl::Result<()> {
29428            encoder.debug_check_bounds::<Struct5Byte>(offset);
29429            // Zero out padding regions. There's no need to apply masks
29430            // because the unmasked parts will be overwritten by fields.
29431            unsafe {
29432                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29433                (ptr as *mut u32).write_unaligned(0);
29434            }
29435            // Write the fields.
29436            self.0.encode(encoder, offset + 0, depth)?;
29437            self.1.encode(encoder, offset + 4, depth)?;
29438            Ok(())
29439        }
29440    }
29441
29442    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct5Byte {
29443        #[inline(always)]
29444        fn new_empty() -> Self {
29445            Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i8, D) }
29446        }
29447
29448        #[inline]
29449        unsafe fn decode(
29450            &mut self,
29451            decoder: &mut fidl::encoding::Decoder<'_, D>,
29452            offset: usize,
29453            _depth: fidl::encoding::Depth,
29454        ) -> fidl::Result<()> {
29455            decoder.debug_check_bounds::<Self>(offset);
29456            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29457            // Verify that padding bytes are zero.
29458            let ptr = unsafe { buf_ptr.offset(4) };
29459            let padval = unsafe { (ptr as *const u32).read_unaligned() };
29460            let mask = 0xffffff00u32;
29461            let maskedval = padval & mask;
29462            if maskedval != 0 {
29463                return Err(fidl::Error::NonZeroPadding {
29464                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29465                });
29466            }
29467            // Copy from the buffer into the object.
29468            unsafe {
29469                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29470            }
29471            Ok(())
29472        }
29473    }
29474
29475    impl fidl::encoding::ValueTypeMarker for Struct6Byte {
29476        type Borrowed<'a> = &'a Self;
29477        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29478            value
29479        }
29480    }
29481
29482    unsafe impl fidl::encoding::TypeMarker for Struct6Byte {
29483        type Owned = Self;
29484
29485        #[inline(always)]
29486        fn inline_align(_context: fidl::encoding::Context) -> usize {
29487            4
29488        }
29489
29490        #[inline(always)]
29491        fn inline_size(_context: fidl::encoding::Context) -> usize {
29492            8
29493        }
29494    }
29495
29496    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct6Byte, D>
29497        for &Struct6Byte
29498    {
29499        #[inline]
29500        unsafe fn encode(
29501            self,
29502            encoder: &mut fidl::encoding::Encoder<'_, D>,
29503            offset: usize,
29504            _depth: fidl::encoding::Depth,
29505        ) -> fidl::Result<()> {
29506            encoder.debug_check_bounds::<Struct6Byte>(offset);
29507            unsafe {
29508                // Copy the object into the buffer.
29509                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29510                (buf_ptr as *mut Struct6Byte).write_unaligned((self as *const Struct6Byte).read());
29511                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29512                // done second because the memcpy will write garbage to these bytes.
29513                let padding_ptr = buf_ptr.offset(4) as *mut u32;
29514                let padding_mask = 0xffff0000u32;
29515                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29516            }
29517            Ok(())
29518        }
29519    }
29520    unsafe impl<
29521        D: fidl::encoding::ResourceDialect,
29522        T0: fidl::encoding::Encode<i32, D>,
29523        T1: fidl::encoding::Encode<i16, D>,
29524    > fidl::encoding::Encode<Struct6Byte, D> for (T0, T1)
29525    {
29526        #[inline]
29527        unsafe fn encode(
29528            self,
29529            encoder: &mut fidl::encoding::Encoder<'_, D>,
29530            offset: usize,
29531            depth: fidl::encoding::Depth,
29532        ) -> fidl::Result<()> {
29533            encoder.debug_check_bounds::<Struct6Byte>(offset);
29534            // Zero out padding regions. There's no need to apply masks
29535            // because the unmasked parts will be overwritten by fields.
29536            unsafe {
29537                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29538                (ptr as *mut u32).write_unaligned(0);
29539            }
29540            // Write the fields.
29541            self.0.encode(encoder, offset + 0, depth)?;
29542            self.1.encode(encoder, offset + 4, depth)?;
29543            Ok(())
29544        }
29545    }
29546
29547    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct6Byte {
29548        #[inline(always)]
29549        fn new_empty() -> Self {
29550            Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i16, D) }
29551        }
29552
29553        #[inline]
29554        unsafe fn decode(
29555            &mut self,
29556            decoder: &mut fidl::encoding::Decoder<'_, D>,
29557            offset: usize,
29558            _depth: fidl::encoding::Depth,
29559        ) -> fidl::Result<()> {
29560            decoder.debug_check_bounds::<Self>(offset);
29561            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29562            // Verify that padding bytes are zero.
29563            let ptr = unsafe { buf_ptr.offset(4) };
29564            let padval = unsafe { (ptr as *const u32).read_unaligned() };
29565            let mask = 0xffff0000u32;
29566            let maskedval = padval & mask;
29567            if maskedval != 0 {
29568                return Err(fidl::Error::NonZeroPadding {
29569                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29570                });
29571            }
29572            // Copy from the buffer into the object.
29573            unsafe {
29574                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29575            }
29576            Ok(())
29577        }
29578    }
29579
29580    impl fidl::encoding::ValueTypeMarker for Struct7Byte {
29581        type Borrowed<'a> = &'a Self;
29582        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29583            value
29584        }
29585    }
29586
29587    unsafe impl fidl::encoding::TypeMarker for Struct7Byte {
29588        type Owned = Self;
29589
29590        #[inline(always)]
29591        fn inline_align(_context: fidl::encoding::Context) -> usize {
29592            4
29593        }
29594
29595        #[inline(always)]
29596        fn inline_size(_context: fidl::encoding::Context) -> usize {
29597            8
29598        }
29599    }
29600
29601    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct7Byte, D>
29602        for &Struct7Byte
29603    {
29604        #[inline]
29605        unsafe fn encode(
29606            self,
29607            encoder: &mut fidl::encoding::Encoder<'_, D>,
29608            offset: usize,
29609            _depth: fidl::encoding::Depth,
29610        ) -> fidl::Result<()> {
29611            encoder.debug_check_bounds::<Struct7Byte>(offset);
29612            unsafe {
29613                // Copy the object into the buffer.
29614                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29615                (buf_ptr as *mut Struct7Byte).write_unaligned((self as *const Struct7Byte).read());
29616                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29617                // done second because the memcpy will write garbage to these bytes.
29618                let padding_ptr = buf_ptr.offset(4) as *mut u32;
29619                let padding_mask = 0xff000000u32;
29620                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29621            }
29622            Ok(())
29623        }
29624    }
29625    unsafe impl<
29626        D: fidl::encoding::ResourceDialect,
29627        T0: fidl::encoding::Encode<i32, D>,
29628        T1: fidl::encoding::Encode<i16, D>,
29629        T2: fidl::encoding::Encode<i8, D>,
29630    > fidl::encoding::Encode<Struct7Byte, D> for (T0, T1, T2)
29631    {
29632        #[inline]
29633        unsafe fn encode(
29634            self,
29635            encoder: &mut fidl::encoding::Encoder<'_, D>,
29636            offset: usize,
29637            depth: fidl::encoding::Depth,
29638        ) -> fidl::Result<()> {
29639            encoder.debug_check_bounds::<Struct7Byte>(offset);
29640            // Zero out padding regions. There's no need to apply masks
29641            // because the unmasked parts will be overwritten by fields.
29642            unsafe {
29643                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29644                (ptr as *mut u32).write_unaligned(0);
29645            }
29646            // Write the fields.
29647            self.0.encode(encoder, offset + 0, depth)?;
29648            self.1.encode(encoder, offset + 4, depth)?;
29649            self.2.encode(encoder, offset + 6, depth)?;
29650            Ok(())
29651        }
29652    }
29653
29654    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct7Byte {
29655        #[inline(always)]
29656        fn new_empty() -> Self {
29657            Self {
29658                a: fidl::new_empty!(i32, D),
29659                b: fidl::new_empty!(i16, D),
29660                c: fidl::new_empty!(i8, D),
29661            }
29662        }
29663
29664        #[inline]
29665        unsafe fn decode(
29666            &mut self,
29667            decoder: &mut fidl::encoding::Decoder<'_, D>,
29668            offset: usize,
29669            _depth: fidl::encoding::Depth,
29670        ) -> fidl::Result<()> {
29671            decoder.debug_check_bounds::<Self>(offset);
29672            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29673            // Verify that padding bytes are zero.
29674            let ptr = unsafe { buf_ptr.offset(4) };
29675            let padval = unsafe { (ptr as *const u32).read_unaligned() };
29676            let mask = 0xff000000u32;
29677            let maskedval = padval & mask;
29678            if maskedval != 0 {
29679                return Err(fidl::Error::NonZeroPadding {
29680                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29681                });
29682            }
29683            // Copy from the buffer into the object.
29684            unsafe {
29685                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29686            }
29687            Ok(())
29688        }
29689    }
29690
29691    impl fidl::encoding::ValueTypeMarker for Struct8Byte {
29692        type Borrowed<'a> = &'a Self;
29693        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29694            value
29695        }
29696    }
29697
29698    unsafe impl fidl::encoding::TypeMarker for Struct8Byte {
29699        type Owned = Self;
29700
29701        #[inline(always)]
29702        fn inline_align(_context: fidl::encoding::Context) -> usize {
29703            8
29704        }
29705
29706        #[inline(always)]
29707        fn inline_size(_context: fidl::encoding::Context) -> usize {
29708            8
29709        }
29710        #[inline(always)]
29711        fn encode_is_copy() -> bool {
29712            true
29713        }
29714
29715        #[inline(always)]
29716        fn decode_is_copy() -> bool {
29717            true
29718        }
29719    }
29720
29721    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct8Byte, D>
29722        for &Struct8Byte
29723    {
29724        #[inline]
29725        unsafe fn encode(
29726            self,
29727            encoder: &mut fidl::encoding::Encoder<'_, D>,
29728            offset: usize,
29729            _depth: fidl::encoding::Depth,
29730        ) -> fidl::Result<()> {
29731            encoder.debug_check_bounds::<Struct8Byte>(offset);
29732            unsafe {
29733                // Copy the object into the buffer.
29734                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29735                (buf_ptr as *mut Struct8Byte).write_unaligned((self as *const Struct8Byte).read());
29736                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
29737                // done second because the memcpy will write garbage to these bytes.
29738            }
29739            Ok(())
29740        }
29741    }
29742    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
29743        fidl::encoding::Encode<Struct8Byte, D> for (T0,)
29744    {
29745        #[inline]
29746        unsafe fn encode(
29747            self,
29748            encoder: &mut fidl::encoding::Encoder<'_, D>,
29749            offset: usize,
29750            depth: fidl::encoding::Depth,
29751        ) -> fidl::Result<()> {
29752            encoder.debug_check_bounds::<Struct8Byte>(offset);
29753            // Zero out padding regions. There's no need to apply masks
29754            // because the unmasked parts will be overwritten by fields.
29755            // Write the fields.
29756            self.0.encode(encoder, offset + 0, depth)?;
29757            Ok(())
29758        }
29759    }
29760
29761    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct8Byte {
29762        #[inline(always)]
29763        fn new_empty() -> Self {
29764            Self { a: fidl::new_empty!(i64, D) }
29765        }
29766
29767        #[inline]
29768        unsafe fn decode(
29769            &mut self,
29770            decoder: &mut fidl::encoding::Decoder<'_, D>,
29771            offset: usize,
29772            _depth: fidl::encoding::Depth,
29773        ) -> fidl::Result<()> {
29774            decoder.debug_check_bounds::<Self>(offset);
29775            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29776            // Verify that padding bytes are zero.
29777            // Copy from the buffer into the object.
29778            unsafe {
29779                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29780            }
29781            Ok(())
29782        }
29783    }
29784
29785    impl fidl::encoding::ValueTypeMarker for StructOfEmptyFlexibleUnion {
29786        type Borrowed<'a> = &'a Self;
29787        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29788            value
29789        }
29790    }
29791
29792    unsafe impl fidl::encoding::TypeMarker for StructOfEmptyFlexibleUnion {
29793        type Owned = Self;
29794
29795        #[inline(always)]
29796        fn inline_align(_context: fidl::encoding::Context) -> usize {
29797            8
29798        }
29799
29800        #[inline(always)]
29801        fn inline_size(_context: fidl::encoding::Context) -> usize {
29802            16
29803        }
29804    }
29805
29806    unsafe impl<D: fidl::encoding::ResourceDialect>
29807        fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for &StructOfEmptyFlexibleUnion
29808    {
29809        #[inline]
29810        unsafe fn encode(
29811            self,
29812            encoder: &mut fidl::encoding::Encoder<'_, D>,
29813            offset: usize,
29814            _depth: fidl::encoding::Depth,
29815        ) -> fidl::Result<()> {
29816            encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29817            // Delegate to tuple encoding.
29818            fidl::encoding::Encode::<StructOfEmptyFlexibleUnion, D>::encode(
29819                (<EmptyFlexibleUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.empty),),
29820                encoder,
29821                offset,
29822                _depth,
29823            )
29824        }
29825    }
29826    unsafe impl<
29827        D: fidl::encoding::ResourceDialect,
29828        T0: fidl::encoding::Encode<EmptyFlexibleUnion, D>,
29829    > fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for (T0,)
29830    {
29831        #[inline]
29832        unsafe fn encode(
29833            self,
29834            encoder: &mut fidl::encoding::Encoder<'_, D>,
29835            offset: usize,
29836            depth: fidl::encoding::Depth,
29837        ) -> fidl::Result<()> {
29838            encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29839            // Zero out padding regions. There's no need to apply masks
29840            // because the unmasked parts will be overwritten by fields.
29841            // Write the fields.
29842            self.0.encode(encoder, offset + 0, depth)?;
29843            Ok(())
29844        }
29845    }
29846
29847    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29848        for StructOfEmptyFlexibleUnion
29849    {
29850        #[inline(always)]
29851        fn new_empty() -> Self {
29852            Self { empty: fidl::new_empty!(EmptyFlexibleUnion, D) }
29853        }
29854
29855        #[inline]
29856        unsafe fn decode(
29857            &mut self,
29858            decoder: &mut fidl::encoding::Decoder<'_, D>,
29859            offset: usize,
29860            _depth: fidl::encoding::Depth,
29861        ) -> fidl::Result<()> {
29862            decoder.debug_check_bounds::<Self>(offset);
29863            // Verify that padding bytes are zero.
29864            fidl::decode!(EmptyFlexibleUnion, D, &mut self.empty, decoder, offset + 0, _depth)?;
29865            Ok(())
29866        }
29867    }
29868
29869    impl fidl::encoding::ValueTypeMarker for StructOfEmptyTable {
29870        type Borrowed<'a> = &'a Self;
29871        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29872            value
29873        }
29874    }
29875
29876    unsafe impl fidl::encoding::TypeMarker for StructOfEmptyTable {
29877        type Owned = Self;
29878
29879        #[inline(always)]
29880        fn inline_align(_context: fidl::encoding::Context) -> usize {
29881            8
29882        }
29883
29884        #[inline(always)]
29885        fn inline_size(_context: fidl::encoding::Context) -> usize {
29886            16
29887        }
29888    }
29889
29890    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfEmptyTable, D>
29891        for &StructOfEmptyTable
29892    {
29893        #[inline]
29894        unsafe fn encode(
29895            self,
29896            encoder: &mut fidl::encoding::Encoder<'_, D>,
29897            offset: usize,
29898            _depth: fidl::encoding::Depth,
29899        ) -> fidl::Result<()> {
29900            encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29901            // Delegate to tuple encoding.
29902            fidl::encoding::Encode::<StructOfEmptyTable, D>::encode(
29903                (<EmptyTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29904                encoder,
29905                offset,
29906                _depth,
29907            )
29908        }
29909    }
29910    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyTable, D>>
29911        fidl::encoding::Encode<StructOfEmptyTable, D> for (T0,)
29912    {
29913        #[inline]
29914        unsafe fn encode(
29915            self,
29916            encoder: &mut fidl::encoding::Encoder<'_, D>,
29917            offset: usize,
29918            depth: fidl::encoding::Depth,
29919        ) -> fidl::Result<()> {
29920            encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29921            // Zero out padding regions. There's no need to apply masks
29922            // because the unmasked parts will be overwritten by fields.
29923            // Write the fields.
29924            self.0.encode(encoder, offset + 0, depth)?;
29925            Ok(())
29926        }
29927    }
29928
29929    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfEmptyTable {
29930        #[inline(always)]
29931        fn new_empty() -> Self {
29932            Self { table: fidl::new_empty!(EmptyTable, D) }
29933        }
29934
29935        #[inline]
29936        unsafe fn decode(
29937            &mut self,
29938            decoder: &mut fidl::encoding::Decoder<'_, D>,
29939            offset: usize,
29940            _depth: fidl::encoding::Depth,
29941        ) -> fidl::Result<()> {
29942            decoder.debug_check_bounds::<Self>(offset);
29943            // Verify that padding bytes are zero.
29944            fidl::decode!(EmptyTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29945            Ok(())
29946        }
29947    }
29948
29949    impl fidl::encoding::ValueTypeMarker for StructOfReverseOrdinalTable {
29950        type Borrowed<'a> = &'a Self;
29951        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29952            value
29953        }
29954    }
29955
29956    unsafe impl fidl::encoding::TypeMarker for StructOfReverseOrdinalTable {
29957        type Owned = Self;
29958
29959        #[inline(always)]
29960        fn inline_align(_context: fidl::encoding::Context) -> usize {
29961            8
29962        }
29963
29964        #[inline(always)]
29965        fn inline_size(_context: fidl::encoding::Context) -> usize {
29966            16
29967        }
29968    }
29969
29970    unsafe impl<D: fidl::encoding::ResourceDialect>
29971        fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for &StructOfReverseOrdinalTable
29972    {
29973        #[inline]
29974        unsafe fn encode(
29975            self,
29976            encoder: &mut fidl::encoding::Encoder<'_, D>,
29977            offset: usize,
29978            _depth: fidl::encoding::Depth,
29979        ) -> fidl::Result<()> {
29980            encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29981            // Delegate to tuple encoding.
29982            fidl::encoding::Encode::<StructOfReverseOrdinalTable, D>::encode(
29983                (<ReverseOrdinalTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29984                encoder,
29985                offset,
29986                _depth,
29987            )
29988        }
29989    }
29990    unsafe impl<
29991        D: fidl::encoding::ResourceDialect,
29992        T0: fidl::encoding::Encode<ReverseOrdinalTable, D>,
29993    > fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for (T0,)
29994    {
29995        #[inline]
29996        unsafe fn encode(
29997            self,
29998            encoder: &mut fidl::encoding::Encoder<'_, D>,
29999            offset: usize,
30000            depth: fidl::encoding::Depth,
30001        ) -> fidl::Result<()> {
30002            encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
30003            // Zero out padding regions. There's no need to apply masks
30004            // because the unmasked parts will be overwritten by fields.
30005            // Write the fields.
30006            self.0.encode(encoder, offset + 0, depth)?;
30007            Ok(())
30008        }
30009    }
30010
30011    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30012        for StructOfReverseOrdinalTable
30013    {
30014        #[inline(always)]
30015        fn new_empty() -> Self {
30016            Self { table: fidl::new_empty!(ReverseOrdinalTable, D) }
30017        }
30018
30019        #[inline]
30020        unsafe fn decode(
30021            &mut self,
30022            decoder: &mut fidl::encoding::Decoder<'_, D>,
30023            offset: usize,
30024            _depth: fidl::encoding::Depth,
30025        ) -> fidl::Result<()> {
30026            decoder.debug_check_bounds::<Self>(offset);
30027            // Verify that padding bytes are zero.
30028            fidl::decode!(ReverseOrdinalTable, D, &mut self.table, decoder, offset + 0, _depth)?;
30029            Ok(())
30030        }
30031    }
30032
30033    impl fidl::encoding::ValueTypeMarker for StructOfSimpleTable {
30034        type Borrowed<'a> = &'a Self;
30035        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30036            value
30037        }
30038    }
30039
30040    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleTable {
30041        type Owned = Self;
30042
30043        #[inline(always)]
30044        fn inline_align(_context: fidl::encoding::Context) -> usize {
30045            8
30046        }
30047
30048        #[inline(always)]
30049        fn inline_size(_context: fidl::encoding::Context) -> usize {
30050            16
30051        }
30052    }
30053
30054    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfSimpleTable, D>
30055        for &StructOfSimpleTable
30056    {
30057        #[inline]
30058        unsafe fn encode(
30059            self,
30060            encoder: &mut fidl::encoding::Encoder<'_, D>,
30061            offset: usize,
30062            _depth: fidl::encoding::Depth,
30063        ) -> fidl::Result<()> {
30064            encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
30065            // Delegate to tuple encoding.
30066            fidl::encoding::Encode::<StructOfSimpleTable, D>::encode(
30067                (<SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
30068                encoder,
30069                offset,
30070                _depth,
30071            )
30072        }
30073    }
30074    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SimpleTable, D>>
30075        fidl::encoding::Encode<StructOfSimpleTable, D> for (T0,)
30076    {
30077        #[inline]
30078        unsafe fn encode(
30079            self,
30080            encoder: &mut fidl::encoding::Encoder<'_, D>,
30081            offset: usize,
30082            depth: fidl::encoding::Depth,
30083        ) -> fidl::Result<()> {
30084            encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
30085            // Zero out padding regions. There's no need to apply masks
30086            // because the unmasked parts will be overwritten by fields.
30087            // Write the fields.
30088            self.0.encode(encoder, offset + 0, depth)?;
30089            Ok(())
30090        }
30091    }
30092
30093    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfSimpleTable {
30094        #[inline(always)]
30095        fn new_empty() -> Self {
30096            Self { table: fidl::new_empty!(SimpleTable, D) }
30097        }
30098
30099        #[inline]
30100        unsafe fn decode(
30101            &mut self,
30102            decoder: &mut fidl::encoding::Decoder<'_, D>,
30103            offset: usize,
30104            _depth: fidl::encoding::Depth,
30105        ) -> fidl::Result<()> {
30106            decoder.debug_check_bounds::<Self>(offset);
30107            // Verify that padding bytes are zero.
30108            fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
30109            Ok(())
30110        }
30111    }
30112
30113    impl fidl::encoding::ValueTypeMarker for StructOfTableWithGaps {
30114        type Borrowed<'a> = &'a Self;
30115        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30116            value
30117        }
30118    }
30119
30120    unsafe impl fidl::encoding::TypeMarker for StructOfTableWithGaps {
30121        type Owned = Self;
30122
30123        #[inline(always)]
30124        fn inline_align(_context: fidl::encoding::Context) -> usize {
30125            8
30126        }
30127
30128        #[inline(always)]
30129        fn inline_size(_context: fidl::encoding::Context) -> usize {
30130            16
30131        }
30132    }
30133
30134    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfTableWithGaps, D>
30135        for &StructOfTableWithGaps
30136    {
30137        #[inline]
30138        unsafe fn encode(
30139            self,
30140            encoder: &mut fidl::encoding::Encoder<'_, D>,
30141            offset: usize,
30142            _depth: fidl::encoding::Depth,
30143        ) -> fidl::Result<()> {
30144            encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
30145            // Delegate to tuple encoding.
30146            fidl::encoding::Encode::<StructOfTableWithGaps, D>::encode(
30147                (<TableWithGaps as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
30148                encoder,
30149                offset,
30150                _depth,
30151            )
30152        }
30153    }
30154    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithGaps, D>>
30155        fidl::encoding::Encode<StructOfTableWithGaps, D> for (T0,)
30156    {
30157        #[inline]
30158        unsafe fn encode(
30159            self,
30160            encoder: &mut fidl::encoding::Encoder<'_, D>,
30161            offset: usize,
30162            depth: fidl::encoding::Depth,
30163        ) -> fidl::Result<()> {
30164            encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
30165            // Zero out padding regions. There's no need to apply masks
30166            // because the unmasked parts will be overwritten by fields.
30167            // Write the fields.
30168            self.0.encode(encoder, offset + 0, depth)?;
30169            Ok(())
30170        }
30171    }
30172
30173    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfTableWithGaps {
30174        #[inline(always)]
30175        fn new_empty() -> Self {
30176            Self { table: fidl::new_empty!(TableWithGaps, D) }
30177        }
30178
30179        #[inline]
30180        unsafe fn decode(
30181            &mut self,
30182            decoder: &mut fidl::encoding::Decoder<'_, D>,
30183            offset: usize,
30184            _depth: fidl::encoding::Depth,
30185        ) -> fidl::Result<()> {
30186            decoder.debug_check_bounds::<Self>(offset);
30187            // Verify that padding bytes are zero.
30188            fidl::decode!(TableWithGaps, D, &mut self.table, decoder, offset + 0, _depth)?;
30189            Ok(())
30190        }
30191    }
30192
30193    impl fidl::encoding::ValueTypeMarker for StructOfTableWithStringAndVector {
30194        type Borrowed<'a> = &'a Self;
30195        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30196            value
30197        }
30198    }
30199
30200    unsafe impl fidl::encoding::TypeMarker for StructOfTableWithStringAndVector {
30201        type Owned = Self;
30202
30203        #[inline(always)]
30204        fn inline_align(_context: fidl::encoding::Context) -> usize {
30205            8
30206        }
30207
30208        #[inline(always)]
30209        fn inline_size(_context: fidl::encoding::Context) -> usize {
30210            16
30211        }
30212    }
30213
30214    unsafe impl<D: fidl::encoding::ResourceDialect>
30215        fidl::encoding::Encode<StructOfTableWithStringAndVector, D>
30216        for &StructOfTableWithStringAndVector
30217    {
30218        #[inline]
30219        unsafe fn encode(
30220            self,
30221            encoder: &mut fidl::encoding::Encoder<'_, D>,
30222            offset: usize,
30223            _depth: fidl::encoding::Depth,
30224        ) -> fidl::Result<()> {
30225            encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
30226            // Delegate to tuple encoding.
30227            fidl::encoding::Encode::<StructOfTableWithStringAndVector, D>::encode(
30228                (<TableWithStringAndVector as fidl::encoding::ValueTypeMarker>::borrow(
30229                    &self.table,
30230                ),),
30231                encoder,
30232                offset,
30233                _depth,
30234            )
30235        }
30236    }
30237    unsafe impl<
30238        D: fidl::encoding::ResourceDialect,
30239        T0: fidl::encoding::Encode<TableWithStringAndVector, D>,
30240    > fidl::encoding::Encode<StructOfTableWithStringAndVector, D> for (T0,)
30241    {
30242        #[inline]
30243        unsafe fn encode(
30244            self,
30245            encoder: &mut fidl::encoding::Encoder<'_, D>,
30246            offset: usize,
30247            depth: fidl::encoding::Depth,
30248        ) -> fidl::Result<()> {
30249            encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
30250            // Zero out padding regions. There's no need to apply masks
30251            // because the unmasked parts will be overwritten by fields.
30252            // Write the fields.
30253            self.0.encode(encoder, offset + 0, depth)?;
30254            Ok(())
30255        }
30256    }
30257
30258    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30259        for StructOfTableWithStringAndVector
30260    {
30261        #[inline(always)]
30262        fn new_empty() -> Self {
30263            Self { table: fidl::new_empty!(TableWithStringAndVector, D) }
30264        }
30265
30266        #[inline]
30267        unsafe fn decode(
30268            &mut self,
30269            decoder: &mut fidl::encoding::Decoder<'_, D>,
30270            offset: usize,
30271            _depth: fidl::encoding::Depth,
30272        ) -> fidl::Result<()> {
30273            decoder.debug_check_bounds::<Self>(offset);
30274            // Verify that padding bytes are zero.
30275            fidl::decode!(
30276                TableWithStringAndVector,
30277                D,
30278                &mut self.table,
30279                decoder,
30280                offset + 0,
30281                _depth
30282            )?;
30283            Ok(())
30284        }
30285    }
30286
30287    impl fidl::encoding::ValueTypeMarker for StructOfTableWithXUnion {
30288        type Borrowed<'a> = &'a Self;
30289        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30290            value
30291        }
30292    }
30293
30294    unsafe impl fidl::encoding::TypeMarker for StructOfTableWithXUnion {
30295        type Owned = Self;
30296
30297        #[inline(always)]
30298        fn inline_align(_context: fidl::encoding::Context) -> usize {
30299            8
30300        }
30301
30302        #[inline(always)]
30303        fn inline_size(_context: fidl::encoding::Context) -> usize {
30304            16
30305        }
30306    }
30307
30308    unsafe impl<D: fidl::encoding::ResourceDialect>
30309        fidl::encoding::Encode<StructOfTableWithXUnion, D> for &StructOfTableWithXUnion
30310    {
30311        #[inline]
30312        unsafe fn encode(
30313            self,
30314            encoder: &mut fidl::encoding::Encoder<'_, D>,
30315            offset: usize,
30316            _depth: fidl::encoding::Depth,
30317        ) -> fidl::Result<()> {
30318            encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
30319            // Delegate to tuple encoding.
30320            fidl::encoding::Encode::<StructOfTableWithXUnion, D>::encode(
30321                (<TableWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
30322                encoder,
30323                offset,
30324                _depth,
30325            )
30326        }
30327    }
30328    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithXUnion, D>>
30329        fidl::encoding::Encode<StructOfTableWithXUnion, D> for (T0,)
30330    {
30331        #[inline]
30332        unsafe fn encode(
30333            self,
30334            encoder: &mut fidl::encoding::Encoder<'_, D>,
30335            offset: usize,
30336            depth: fidl::encoding::Depth,
30337        ) -> fidl::Result<()> {
30338            encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
30339            // Zero out padding regions. There's no need to apply masks
30340            // because the unmasked parts will be overwritten by fields.
30341            // Write the fields.
30342            self.0.encode(encoder, offset + 0, depth)?;
30343            Ok(())
30344        }
30345    }
30346
30347    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30348        for StructOfTableWithXUnion
30349    {
30350        #[inline(always)]
30351        fn new_empty() -> Self {
30352            Self { value: fidl::new_empty!(TableWithXUnion, D) }
30353        }
30354
30355        #[inline]
30356        unsafe fn decode(
30357            &mut self,
30358            decoder: &mut fidl::encoding::Decoder<'_, D>,
30359            offset: usize,
30360            _depth: fidl::encoding::Depth,
30361        ) -> fidl::Result<()> {
30362            decoder.debug_check_bounds::<Self>(offset);
30363            // Verify that padding bytes are zero.
30364            fidl::decode!(TableWithXUnion, D, &mut self.value, decoder, offset + 0, _depth)?;
30365            Ok(())
30366        }
30367    }
30368
30369    impl fidl::encoding::ValueTypeMarker for StructOfUnionOfTable {
30370        type Borrowed<'a> = &'a Self;
30371        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30372            value
30373        }
30374    }
30375
30376    unsafe impl fidl::encoding::TypeMarker for StructOfUnionOfTable {
30377        type Owned = Self;
30378
30379        #[inline(always)]
30380        fn inline_align(_context: fidl::encoding::Context) -> usize {
30381            8
30382        }
30383
30384        #[inline(always)]
30385        fn inline_size(_context: fidl::encoding::Context) -> usize {
30386            16
30387        }
30388    }
30389
30390    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfUnionOfTable, D>
30391        for &StructOfUnionOfTable
30392    {
30393        #[inline]
30394        unsafe fn encode(
30395            self,
30396            encoder: &mut fidl::encoding::Encoder<'_, D>,
30397            offset: usize,
30398            _depth: fidl::encoding::Depth,
30399        ) -> fidl::Result<()> {
30400            encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
30401            // Delegate to tuple encoding.
30402            fidl::encoding::Encode::<StructOfUnionOfTable, D>::encode(
30403                (<UnionOfTable as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
30404                encoder,
30405                offset,
30406                _depth,
30407            )
30408        }
30409    }
30410    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<UnionOfTable, D>>
30411        fidl::encoding::Encode<StructOfUnionOfTable, D> for (T0,)
30412    {
30413        #[inline]
30414        unsafe fn encode(
30415            self,
30416            encoder: &mut fidl::encoding::Encoder<'_, D>,
30417            offset: usize,
30418            depth: fidl::encoding::Depth,
30419        ) -> fidl::Result<()> {
30420            encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
30421            // Zero out padding regions. There's no need to apply masks
30422            // because the unmasked parts will be overwritten by fields.
30423            // Write the fields.
30424            self.0.encode(encoder, offset + 0, depth)?;
30425            Ok(())
30426        }
30427    }
30428
30429    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfUnionOfTable {
30430        #[inline(always)]
30431        fn new_empty() -> Self {
30432            Self { u: fidl::new_empty!(UnionOfTable, D) }
30433        }
30434
30435        #[inline]
30436        unsafe fn decode(
30437            &mut self,
30438            decoder: &mut fidl::encoding::Decoder<'_, D>,
30439            offset: usize,
30440            _depth: fidl::encoding::Depth,
30441        ) -> fidl::Result<()> {
30442            decoder.debug_check_bounds::<Self>(offset);
30443            // Verify that padding bytes are zero.
30444            fidl::decode!(UnionOfTable, D, &mut self.u, decoder, offset + 0, _depth)?;
30445            Ok(())
30446        }
30447    }
30448
30449    impl fidl::encoding::ValueTypeMarker for StructSize16Align8 {
30450        type Borrowed<'a> = &'a Self;
30451        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30452            value
30453        }
30454    }
30455
30456    unsafe impl fidl::encoding::TypeMarker for StructSize16Align8 {
30457        type Owned = Self;
30458
30459        #[inline(always)]
30460        fn inline_align(_context: fidl::encoding::Context) -> usize {
30461            8
30462        }
30463
30464        #[inline(always)]
30465        fn inline_size(_context: fidl::encoding::Context) -> usize {
30466            16
30467        }
30468        #[inline(always)]
30469        fn encode_is_copy() -> bool {
30470            true
30471        }
30472
30473        #[inline(always)]
30474        fn decode_is_copy() -> bool {
30475            true
30476        }
30477    }
30478
30479    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize16Align8, D>
30480        for &StructSize16Align8
30481    {
30482        #[inline]
30483        unsafe fn encode(
30484            self,
30485            encoder: &mut fidl::encoding::Encoder<'_, D>,
30486            offset: usize,
30487            _depth: fidl::encoding::Depth,
30488        ) -> fidl::Result<()> {
30489            encoder.debug_check_bounds::<StructSize16Align8>(offset);
30490            unsafe {
30491                // Copy the object into the buffer.
30492                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30493                (buf_ptr as *mut StructSize16Align8)
30494                    .write_unaligned((self as *const StructSize16Align8).read());
30495                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
30496                // done second because the memcpy will write garbage to these bytes.
30497            }
30498            Ok(())
30499        }
30500    }
30501    unsafe impl<
30502        D: fidl::encoding::ResourceDialect,
30503        T0: fidl::encoding::Encode<u64, D>,
30504        T1: fidl::encoding::Encode<u64, D>,
30505    > fidl::encoding::Encode<StructSize16Align8, D> for (T0, T1)
30506    {
30507        #[inline]
30508        unsafe fn encode(
30509            self,
30510            encoder: &mut fidl::encoding::Encoder<'_, D>,
30511            offset: usize,
30512            depth: fidl::encoding::Depth,
30513        ) -> fidl::Result<()> {
30514            encoder.debug_check_bounds::<StructSize16Align8>(offset);
30515            // Zero out padding regions. There's no need to apply masks
30516            // because the unmasked parts will be overwritten by fields.
30517            // Write the fields.
30518            self.0.encode(encoder, offset + 0, depth)?;
30519            self.1.encode(encoder, offset + 8, depth)?;
30520            Ok(())
30521        }
30522    }
30523
30524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize16Align8 {
30525        #[inline(always)]
30526        fn new_empty() -> Self {
30527            Self { f1: fidl::new_empty!(u64, D), f2: fidl::new_empty!(u64, D) }
30528        }
30529
30530        #[inline]
30531        unsafe fn decode(
30532            &mut self,
30533            decoder: &mut fidl::encoding::Decoder<'_, D>,
30534            offset: usize,
30535            _depth: fidl::encoding::Depth,
30536        ) -> fidl::Result<()> {
30537            decoder.debug_check_bounds::<Self>(offset);
30538            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30539            // Verify that padding bytes are zero.
30540            // Copy from the buffer into the object.
30541            unsafe {
30542                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
30543            }
30544            Ok(())
30545        }
30546    }
30547
30548    impl fidl::encoding::ValueTypeMarker for StructSize3Align1 {
30549        type Borrowed<'a> = &'a Self;
30550        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30551            value
30552        }
30553    }
30554
30555    unsafe impl fidl::encoding::TypeMarker for StructSize3Align1 {
30556        type Owned = Self;
30557
30558        #[inline(always)]
30559        fn inline_align(_context: fidl::encoding::Context) -> usize {
30560            1
30561        }
30562
30563        #[inline(always)]
30564        fn inline_size(_context: fidl::encoding::Context) -> usize {
30565            3
30566        }
30567        #[inline(always)]
30568        fn encode_is_copy() -> bool {
30569            true
30570        }
30571
30572        #[inline(always)]
30573        fn decode_is_copy() -> bool {
30574            true
30575        }
30576    }
30577
30578    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align1, D>
30579        for &StructSize3Align1
30580    {
30581        #[inline]
30582        unsafe fn encode(
30583            self,
30584            encoder: &mut fidl::encoding::Encoder<'_, D>,
30585            offset: usize,
30586            _depth: fidl::encoding::Depth,
30587        ) -> fidl::Result<()> {
30588            encoder.debug_check_bounds::<StructSize3Align1>(offset);
30589            unsafe {
30590                // Copy the object into the buffer.
30591                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30592                (buf_ptr as *mut StructSize3Align1)
30593                    .write_unaligned((self as *const StructSize3Align1).read());
30594                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
30595                // done second because the memcpy will write garbage to these bytes.
30596            }
30597            Ok(())
30598        }
30599    }
30600    unsafe impl<
30601        D: fidl::encoding::ResourceDialect,
30602        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
30603    > fidl::encoding::Encode<StructSize3Align1, D> for (T0,)
30604    {
30605        #[inline]
30606        unsafe fn encode(
30607            self,
30608            encoder: &mut fidl::encoding::Encoder<'_, D>,
30609            offset: usize,
30610            depth: fidl::encoding::Depth,
30611        ) -> fidl::Result<()> {
30612            encoder.debug_check_bounds::<StructSize3Align1>(offset);
30613            // Zero out padding regions. There's no need to apply masks
30614            // because the unmasked parts will be overwritten by fields.
30615            // Write the fields.
30616            self.0.encode(encoder, offset + 0, depth)?;
30617            Ok(())
30618        }
30619    }
30620
30621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align1 {
30622        #[inline(always)]
30623        fn new_empty() -> Self {
30624            Self { three_bytes: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D) }
30625        }
30626
30627        #[inline]
30628        unsafe fn decode(
30629            &mut self,
30630            decoder: &mut fidl::encoding::Decoder<'_, D>,
30631            offset: usize,
30632            _depth: fidl::encoding::Depth,
30633        ) -> fidl::Result<()> {
30634            decoder.debug_check_bounds::<Self>(offset);
30635            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30636            // Verify that padding bytes are zero.
30637            // Copy from the buffer into the object.
30638            unsafe {
30639                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
30640            }
30641            Ok(())
30642        }
30643    }
30644
30645    impl fidl::encoding::ValueTypeMarker for StructSize3Align2 {
30646        type Borrowed<'a> = &'a Self;
30647        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30648            value
30649        }
30650    }
30651
30652    unsafe impl fidl::encoding::TypeMarker for StructSize3Align2 {
30653        type Owned = Self;
30654
30655        #[inline(always)]
30656        fn inline_align(_context: fidl::encoding::Context) -> usize {
30657            2
30658        }
30659
30660        #[inline(always)]
30661        fn inline_size(_context: fidl::encoding::Context) -> usize {
30662            4
30663        }
30664    }
30665
30666    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align2, D>
30667        for &StructSize3Align2
30668    {
30669        #[inline]
30670        unsafe fn encode(
30671            self,
30672            encoder: &mut fidl::encoding::Encoder<'_, D>,
30673            offset: usize,
30674            _depth: fidl::encoding::Depth,
30675        ) -> fidl::Result<()> {
30676            encoder.debug_check_bounds::<StructSize3Align2>(offset);
30677            unsafe {
30678                // Copy the object into the buffer.
30679                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30680                (buf_ptr as *mut StructSize3Align2)
30681                    .write_unaligned((self as *const StructSize3Align2).read());
30682                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
30683                // done second because the memcpy will write garbage to these bytes.
30684                let padding_ptr = buf_ptr.offset(2) as *mut u16;
30685                let padding_mask = 0xff00u16;
30686                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
30687            }
30688            Ok(())
30689        }
30690    }
30691    unsafe impl<
30692        D: fidl::encoding::ResourceDialect,
30693        T0: fidl::encoding::Encode<u16, D>,
30694        T1: fidl::encoding::Encode<u8, D>,
30695    > fidl::encoding::Encode<StructSize3Align2, D> for (T0, T1)
30696    {
30697        #[inline]
30698        unsafe fn encode(
30699            self,
30700            encoder: &mut fidl::encoding::Encoder<'_, D>,
30701            offset: usize,
30702            depth: fidl::encoding::Depth,
30703        ) -> fidl::Result<()> {
30704            encoder.debug_check_bounds::<StructSize3Align2>(offset);
30705            // Zero out padding regions. There's no need to apply masks
30706            // because the unmasked parts will be overwritten by fields.
30707            unsafe {
30708                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
30709                (ptr as *mut u16).write_unaligned(0);
30710            }
30711            // Write the fields.
30712            self.0.encode(encoder, offset + 0, depth)?;
30713            self.1.encode(encoder, offset + 2, depth)?;
30714            Ok(())
30715        }
30716    }
30717
30718    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align2 {
30719        #[inline(always)]
30720        fn new_empty() -> Self {
30721            Self { f1: fidl::new_empty!(u16, D), f2: fidl::new_empty!(u8, D) }
30722        }
30723
30724        #[inline]
30725        unsafe fn decode(
30726            &mut self,
30727            decoder: &mut fidl::encoding::Decoder<'_, D>,
30728            offset: usize,
30729            _depth: fidl::encoding::Depth,
30730        ) -> fidl::Result<()> {
30731            decoder.debug_check_bounds::<Self>(offset);
30732            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30733            // Verify that padding bytes are zero.
30734            let ptr = unsafe { buf_ptr.offset(2) };
30735            let padval = unsafe { (ptr as *const u16).read_unaligned() };
30736            let mask = 0xff00u16;
30737            let maskedval = padval & mask;
30738            if maskedval != 0 {
30739                return Err(fidl::Error::NonZeroPadding {
30740                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
30741                });
30742            }
30743            // Copy from the buffer into the object.
30744            unsafe {
30745                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
30746            }
30747            Ok(())
30748        }
30749    }
30750
30751    impl fidl::encoding::ValueTypeMarker for StructTableNoFields {
30752        type Borrowed<'a> = &'a Self;
30753        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30754            value
30755        }
30756    }
30757
30758    unsafe impl fidl::encoding::TypeMarker for StructTableNoFields {
30759        type Owned = Self;
30760
30761        #[inline(always)]
30762        fn inline_align(_context: fidl::encoding::Context) -> usize {
30763            8
30764        }
30765
30766        #[inline(always)]
30767        fn inline_size(_context: fidl::encoding::Context) -> usize {
30768            16
30769        }
30770    }
30771
30772    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructTableNoFields, D>
30773        for &StructTableNoFields
30774    {
30775        #[inline]
30776        unsafe fn encode(
30777            self,
30778            encoder: &mut fidl::encoding::Encoder<'_, D>,
30779            offset: usize,
30780            _depth: fidl::encoding::Depth,
30781        ) -> fidl::Result<()> {
30782            encoder.debug_check_bounds::<StructTableNoFields>(offset);
30783            // Delegate to tuple encoding.
30784            fidl::encoding::Encode::<StructTableNoFields, D>::encode(
30785                (<TableNoFields as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30786                encoder,
30787                offset,
30788                _depth,
30789            )
30790        }
30791    }
30792    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableNoFields, D>>
30793        fidl::encoding::Encode<StructTableNoFields, D> for (T0,)
30794    {
30795        #[inline]
30796        unsafe fn encode(
30797            self,
30798            encoder: &mut fidl::encoding::Encoder<'_, D>,
30799            offset: usize,
30800            depth: fidl::encoding::Depth,
30801        ) -> fidl::Result<()> {
30802            encoder.debug_check_bounds::<StructTableNoFields>(offset);
30803            // Zero out padding regions. There's no need to apply masks
30804            // because the unmasked parts will be overwritten by fields.
30805            // Write the fields.
30806            self.0.encode(encoder, offset + 0, depth)?;
30807            Ok(())
30808        }
30809    }
30810
30811    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructTableNoFields {
30812        #[inline(always)]
30813        fn new_empty() -> Self {
30814            Self { t: fidl::new_empty!(TableNoFields, D) }
30815        }
30816
30817        #[inline]
30818        unsafe fn decode(
30819            &mut self,
30820            decoder: &mut fidl::encoding::Decoder<'_, D>,
30821            offset: usize,
30822            _depth: fidl::encoding::Depth,
30823        ) -> fidl::Result<()> {
30824            decoder.debug_check_bounds::<Self>(offset);
30825            // Verify that padding bytes are zero.
30826            fidl::decode!(TableNoFields, D, &mut self.t, decoder, offset + 0, _depth)?;
30827            Ok(())
30828        }
30829    }
30830
30831    impl fidl::encoding::ValueTypeMarker for StructWithArrays {
30832        type Borrowed<'a> = &'a Self;
30833        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30834            value
30835        }
30836    }
30837
30838    unsafe impl fidl::encoding::TypeMarker for StructWithArrays {
30839        type Owned = Self;
30840
30841        #[inline(always)]
30842        fn inline_align(_context: fidl::encoding::Context) -> usize {
30843            8
30844        }
30845
30846        #[inline(always)]
30847        fn inline_size(_context: fidl::encoding::Context) -> usize {
30848            120
30849        }
30850    }
30851
30852    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithArrays, D>
30853        for &StructWithArrays
30854    {
30855        #[inline]
30856        unsafe fn encode(
30857            self,
30858            encoder: &mut fidl::encoding::Encoder<'_, D>,
30859            offset: usize,
30860            _depth: fidl::encoding::Depth,
30861        ) -> fidl::Result<()> {
30862            encoder.debug_check_bounds::<StructWithArrays>(offset);
30863            // Delegate to tuple encoding.
30864            fidl::encoding::Encode::<StructWithArrays, D>::encode(
30865                (
30866                    <fidl::encoding::Array<i32, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_int),
30867                    <fidl::encoding::Array<fidl::encoding::UnboundedString, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_string),
30868                    <fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_string),
30869                    <fidl::encoding::Array<StructWithInt, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_struct),
30870                    <fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_struct),
30871                    <fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_arr_int),
30872                ),
30873                encoder, offset, _depth
30874            )
30875        }
30876    }
30877    unsafe impl<
30878        D: fidl::encoding::ResourceDialect,
30879        T0: fidl::encoding::Encode<fidl::encoding::Array<i32, 2>, D>,
30880        T1: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D>,
30881        T2: fidl::encoding::Encode<
30882                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30883                D,
30884            >,
30885        T3: fidl::encoding::Encode<fidl::encoding::Array<StructWithInt, 2>, D>,
30886        T4: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>, D>,
30887        T5: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>, D>,
30888    > fidl::encoding::Encode<StructWithArrays, D> for (T0, T1, T2, T3, T4, T5)
30889    {
30890        #[inline]
30891        unsafe fn encode(
30892            self,
30893            encoder: &mut fidl::encoding::Encoder<'_, D>,
30894            offset: usize,
30895            depth: fidl::encoding::Depth,
30896        ) -> fidl::Result<()> {
30897            encoder.debug_check_bounds::<StructWithArrays>(offset);
30898            // Zero out padding regions. There's no need to apply masks
30899            // because the unmasked parts will be overwritten by fields.
30900            // Write the fields.
30901            self.0.encode(encoder, offset + 0, depth)?;
30902            self.1.encode(encoder, offset + 8, depth)?;
30903            self.2.encode(encoder, offset + 40, depth)?;
30904            self.3.encode(encoder, offset + 72, depth)?;
30905            self.4.encode(encoder, offset + 80, depth)?;
30906            self.5.encode(encoder, offset + 96, depth)?;
30907            Ok(())
30908        }
30909    }
30910
30911    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithArrays {
30912        #[inline(always)]
30913        fn new_empty() -> Self {
30914            Self {
30915                arr_int: fidl::new_empty!(fidl::encoding::Array<i32, 2>, D),
30916                arr_string: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D),
30917                arr_nullable_string: fidl::new_empty!(
30918                    fidl::encoding::Array<
30919                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30920                        2,
30921                    >,
30922                    D
30923                ),
30924                arr_struct: fidl::new_empty!(fidl::encoding::Array<StructWithInt, 2>, D),
30925                arr_nullable_struct: fidl::new_empty!(
30926                    fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30927                    D
30928                ),
30929                arr_arr_int: fidl::new_empty!(
30930                    fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30931                    D
30932                ),
30933            }
30934        }
30935
30936        #[inline]
30937        unsafe fn decode(
30938            &mut self,
30939            decoder: &mut fidl::encoding::Decoder<'_, D>,
30940            offset: usize,
30941            _depth: fidl::encoding::Depth,
30942        ) -> fidl::Result<()> {
30943            decoder.debug_check_bounds::<Self>(offset);
30944            // Verify that padding bytes are zero.
30945            fidl::decode!(fidl::encoding::Array<i32, 2>, D, &mut self.arr_int, decoder, offset + 0, _depth)?;
30946            fidl::decode!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D, &mut self.arr_string, decoder, offset + 8, _depth)?;
30947            fidl::decode!(
30948                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30949                D,
30950                &mut self.arr_nullable_string,
30951                decoder,
30952                offset + 40,
30953                _depth
30954            )?;
30955            fidl::decode!(fidl::encoding::Array<StructWithInt, 2>, D, &mut self.arr_struct, decoder, offset + 72, _depth)?;
30956            fidl::decode!(
30957                fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30958                D,
30959                &mut self.arr_nullable_struct,
30960                decoder,
30961                offset + 80,
30962                _depth
30963            )?;
30964            fidl::decode!(
30965                fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30966                D,
30967                &mut self.arr_arr_int,
30968                decoder,
30969                offset + 96,
30970                _depth
30971            )?;
30972            Ok(())
30973        }
30974    }
30975
30976    impl fidl::encoding::ValueTypeMarker for StructWithInt {
30977        type Borrowed<'a> = &'a Self;
30978        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30979            value
30980        }
30981    }
30982
30983    unsafe impl fidl::encoding::TypeMarker for StructWithInt {
30984        type Owned = Self;
30985
30986        #[inline(always)]
30987        fn inline_align(_context: fidl::encoding::Context) -> usize {
30988            4
30989        }
30990
30991        #[inline(always)]
30992        fn inline_size(_context: fidl::encoding::Context) -> usize {
30993            4
30994        }
30995        #[inline(always)]
30996        fn encode_is_copy() -> bool {
30997            true
30998        }
30999
31000        #[inline(always)]
31001        fn decode_is_copy() -> bool {
31002            true
31003        }
31004    }
31005
31006    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithInt, D>
31007        for &StructWithInt
31008    {
31009        #[inline]
31010        unsafe fn encode(
31011            self,
31012            encoder: &mut fidl::encoding::Encoder<'_, D>,
31013            offset: usize,
31014            _depth: fidl::encoding::Depth,
31015        ) -> fidl::Result<()> {
31016            encoder.debug_check_bounds::<StructWithInt>(offset);
31017            unsafe {
31018                // Copy the object into the buffer.
31019                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
31020                (buf_ptr as *mut StructWithInt)
31021                    .write_unaligned((self as *const StructWithInt).read());
31022                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
31023                // done second because the memcpy will write garbage to these bytes.
31024            }
31025            Ok(())
31026        }
31027    }
31028    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
31029        fidl::encoding::Encode<StructWithInt, D> for (T0,)
31030    {
31031        #[inline]
31032        unsafe fn encode(
31033            self,
31034            encoder: &mut fidl::encoding::Encoder<'_, D>,
31035            offset: usize,
31036            depth: fidl::encoding::Depth,
31037        ) -> fidl::Result<()> {
31038            encoder.debug_check_bounds::<StructWithInt>(offset);
31039            // Zero out padding regions. There's no need to apply masks
31040            // because the unmasked parts will be overwritten by fields.
31041            // Write the fields.
31042            self.0.encode(encoder, offset + 0, depth)?;
31043            Ok(())
31044        }
31045    }
31046
31047    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithInt {
31048        #[inline(always)]
31049        fn new_empty() -> Self {
31050            Self { x: fidl::new_empty!(i32, D) }
31051        }
31052
31053        #[inline]
31054        unsafe fn decode(
31055            &mut self,
31056            decoder: &mut fidl::encoding::Decoder<'_, D>,
31057            offset: usize,
31058            _depth: fidl::encoding::Depth,
31059        ) -> fidl::Result<()> {
31060            decoder.debug_check_bounds::<Self>(offset);
31061            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
31062            // Verify that padding bytes are zero.
31063            // Copy from the buffer into the object.
31064            unsafe {
31065                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
31066            }
31067            Ok(())
31068        }
31069    }
31070
31071    impl fidl::encoding::ValueTypeMarker for StructWithOptionals {
31072        type Borrowed<'a> = &'a Self;
31073        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31074            value
31075        }
31076    }
31077
31078    unsafe impl fidl::encoding::TypeMarker for StructWithOptionals {
31079        type Owned = Self;
31080
31081        #[inline(always)]
31082        fn inline_align(_context: fidl::encoding::Context) -> usize {
31083            8
31084        }
31085
31086        #[inline(always)]
31087        fn inline_size(_context: fidl::encoding::Context) -> usize {
31088            96
31089        }
31090    }
31091
31092    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithOptionals, D>
31093        for &StructWithOptionals
31094    {
31095        #[inline]
31096        unsafe fn encode(
31097            self,
31098            encoder: &mut fidl::encoding::Encoder<'_, D>,
31099            offset: usize,
31100            _depth: fidl::encoding::Depth,
31101        ) -> fidl::Result<()> {
31102            encoder.debug_check_bounds::<StructWithOptionals>(offset);
31103            // Delegate to tuple encoding.
31104            fidl::encoding::Encode::<StructWithOptionals, D>::encode(
31105                (
31106                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
31107                    <fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.s2),
31108                    <TableWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.t),
31109                    <XUnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31110                    <fidl::encoding::OptionalUnion<XUnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu2),
31111                    <UnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
31112                    <fidl::encoding::OptionalUnion<UnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
31113                ),
31114                encoder, offset, _depth
31115            )
31116        }
31117    }
31118    unsafe impl<
31119        D: fidl::encoding::ResourceDialect,
31120        T0: fidl::encoding::Encode<EmptyStruct, D>,
31121        T1: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
31122        T2: fidl::encoding::Encode<TableWithEmptyStruct, D>,
31123        T3: fidl::encoding::Encode<XUnionWithEmptyStruct, D>,
31124        T4: fidl::encoding::Encode<fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D>,
31125        T5: fidl::encoding::Encode<UnionWithEmptyStruct, D>,
31126        T6: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D>,
31127    > fidl::encoding::Encode<StructWithOptionals, D> for (T0, T1, T2, T3, T4, T5, T6)
31128    {
31129        #[inline]
31130        unsafe fn encode(
31131            self,
31132            encoder: &mut fidl::encoding::Encoder<'_, D>,
31133            offset: usize,
31134            depth: fidl::encoding::Depth,
31135        ) -> fidl::Result<()> {
31136            encoder.debug_check_bounds::<StructWithOptionals>(offset);
31137            // Zero out padding regions. There's no need to apply masks
31138            // because the unmasked parts will be overwritten by fields.
31139            unsafe {
31140                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
31141                (ptr as *mut u64).write_unaligned(0);
31142            }
31143            // Write the fields.
31144            self.0.encode(encoder, offset + 0, depth)?;
31145            self.1.encode(encoder, offset + 8, depth)?;
31146            self.2.encode(encoder, offset + 16, depth)?;
31147            self.3.encode(encoder, offset + 32, depth)?;
31148            self.4.encode(encoder, offset + 48, depth)?;
31149            self.5.encode(encoder, offset + 64, depth)?;
31150            self.6.encode(encoder, offset + 80, depth)?;
31151            Ok(())
31152        }
31153    }
31154
31155    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithOptionals {
31156        #[inline(always)]
31157        fn new_empty() -> Self {
31158            Self {
31159                s: fidl::new_empty!(EmptyStruct, D),
31160                s2: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D),
31161                t: fidl::new_empty!(TableWithEmptyStruct, D),
31162                xu: fidl::new_empty!(XUnionWithEmptyStruct, D),
31163                xu2: fidl::new_empty!(fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D),
31164                u: fidl::new_empty!(UnionWithEmptyStruct, D),
31165                u2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D),
31166            }
31167        }
31168
31169        #[inline]
31170        unsafe fn decode(
31171            &mut self,
31172            decoder: &mut fidl::encoding::Decoder<'_, D>,
31173            offset: usize,
31174            _depth: fidl::encoding::Depth,
31175        ) -> fidl::Result<()> {
31176            decoder.debug_check_bounds::<Self>(offset);
31177            // Verify that padding bytes are zero.
31178            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
31179            let padval = unsafe { (ptr as *const u64).read_unaligned() };
31180            let mask = 0xffffffffffffff00u64;
31181            let maskedval = padval & mask;
31182            if maskedval != 0 {
31183                return Err(fidl::Error::NonZeroPadding {
31184                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
31185                });
31186            }
31187            fidl::decode!(EmptyStruct, D, &mut self.s, decoder, offset + 0, _depth)?;
31188            fidl::decode!(
31189                fidl::encoding::Boxed<EmptyStruct>,
31190                D,
31191                &mut self.s2,
31192                decoder,
31193                offset + 8,
31194                _depth
31195            )?;
31196            fidl::decode!(TableWithEmptyStruct, D, &mut self.t, decoder, offset + 16, _depth)?;
31197            fidl::decode!(XUnionWithEmptyStruct, D, &mut self.xu, decoder, offset + 32, _depth)?;
31198            fidl::decode!(
31199                fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>,
31200                D,
31201                &mut self.xu2,
31202                decoder,
31203                offset + 48,
31204                _depth
31205            )?;
31206            fidl::decode!(UnionWithEmptyStruct, D, &mut self.u, decoder, offset + 64, _depth)?;
31207            fidl::decode!(
31208                fidl::encoding::OptionalUnion<UnionWithEmptyStruct>,
31209                D,
31210                &mut self.u2,
31211                decoder,
31212                offset + 80,
31213                _depth
31214            )?;
31215            Ok(())
31216        }
31217    }
31218
31219    impl fidl::encoding::ValueTypeMarker for StructWithVectors {
31220        type Borrowed<'a> = &'a Self;
31221        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31222            value
31223        }
31224    }
31225
31226    unsafe impl fidl::encoding::TypeMarker for StructWithVectors {
31227        type Owned = Self;
31228
31229        #[inline(always)]
31230        fn inline_align(_context: fidl::encoding::Context) -> usize {
31231            8
31232        }
31233
31234        #[inline(always)]
31235        fn inline_size(_context: fidl::encoding::Context) -> usize {
31236            112
31237        }
31238    }
31239
31240    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithVectors, D>
31241        for &StructWithVectors
31242    {
31243        #[inline]
31244        unsafe fn encode(
31245            self,
31246            encoder: &mut fidl::encoding::Encoder<'_, D>,
31247            offset: usize,
31248            _depth: fidl::encoding::Depth,
31249        ) -> fidl::Result<()> {
31250            encoder.debug_check_bounds::<StructWithVectors>(offset);
31251            // Delegate to tuple encoding.
31252            fidl::encoding::Encode::<StructWithVectors, D>::encode(
31253                (
31254                    <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_empty),
31255                    <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_int),
31256                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_string),
31257                    <fidl::encoding::UnboundedVector<fidl::encoding::Optional<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_string),
31258                    <fidl::encoding::UnboundedVector<StructWithInt> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_struct),
31259                    <fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_struct),
31260                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_vec_int),
31261                ),
31262                encoder, offset, _depth
31263            )
31264        }
31265    }
31266    unsafe impl<
31267        D: fidl::encoding::ResourceDialect,
31268        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
31269        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
31270        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
31271        T3: fidl::encoding::Encode<
31272                fidl::encoding::UnboundedVector<
31273                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
31274                >,
31275                D,
31276            >,
31277        T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StructWithInt>, D>,
31278        T5: fidl::encoding::Encode<
31279                fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
31280                D,
31281            >,
31282        T6: fidl::encoding::Encode<
31283                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
31284                D,
31285            >,
31286    > fidl::encoding::Encode<StructWithVectors, D> for (T0, T1, T2, T3, T4, T5, T6)
31287    {
31288        #[inline]
31289        unsafe fn encode(
31290            self,
31291            encoder: &mut fidl::encoding::Encoder<'_, D>,
31292            offset: usize,
31293            depth: fidl::encoding::Depth,
31294        ) -> fidl::Result<()> {
31295            encoder.debug_check_bounds::<StructWithVectors>(offset);
31296            // Zero out padding regions. There's no need to apply masks
31297            // because the unmasked parts will be overwritten by fields.
31298            // Write the fields.
31299            self.0.encode(encoder, offset + 0, depth)?;
31300            self.1.encode(encoder, offset + 16, depth)?;
31301            self.2.encode(encoder, offset + 32, depth)?;
31302            self.3.encode(encoder, offset + 48, depth)?;
31303            self.4.encode(encoder, offset + 64, depth)?;
31304            self.5.encode(encoder, offset + 80, depth)?;
31305            self.6.encode(encoder, offset + 96, depth)?;
31306            Ok(())
31307        }
31308    }
31309
31310    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithVectors {
31311        #[inline(always)]
31312        fn new_empty() -> Self {
31313            Self {
31314                vec_empty: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
31315                vec_int: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
31316                vec_string: fidl::new_empty!(
31317                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
31318                    D
31319                ),
31320                vec_nullable_string: fidl::new_empty!(
31321                    fidl::encoding::UnboundedVector<
31322                        fidl::encoding::Optional<fidl::encoding::UnboundedString>,
31323                    >,
31324                    D
31325                ),
31326                vec_struct: fidl::new_empty!(fidl::encoding::UnboundedVector<StructWithInt>, D),
31327                vec_nullable_struct: fidl::new_empty!(
31328                    fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
31329                    D
31330                ),
31331                vec_vec_int: fidl::new_empty!(
31332                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
31333                    D
31334                ),
31335            }
31336        }
31337
31338        #[inline]
31339        unsafe fn decode(
31340            &mut self,
31341            decoder: &mut fidl::encoding::Decoder<'_, D>,
31342            offset: usize,
31343            _depth: fidl::encoding::Depth,
31344        ) -> fidl::Result<()> {
31345            decoder.debug_check_bounds::<Self>(offset);
31346            // Verify that padding bytes are zero.
31347            fidl::decode!(
31348                fidl::encoding::UnboundedVector<i32>,
31349                D,
31350                &mut self.vec_empty,
31351                decoder,
31352                offset + 0,
31353                _depth
31354            )?;
31355            fidl::decode!(
31356                fidl::encoding::UnboundedVector<i32>,
31357                D,
31358                &mut self.vec_int,
31359                decoder,
31360                offset + 16,
31361                _depth
31362            )?;
31363            fidl::decode!(
31364                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
31365                D,
31366                &mut self.vec_string,
31367                decoder,
31368                offset + 32,
31369                _depth
31370            )?;
31371            fidl::decode!(
31372                fidl::encoding::UnboundedVector<
31373                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
31374                >,
31375                D,
31376                &mut self.vec_nullable_string,
31377                decoder,
31378                offset + 48,
31379                _depth
31380            )?;
31381            fidl::decode!(
31382                fidl::encoding::UnboundedVector<StructWithInt>,
31383                D,
31384                &mut self.vec_struct,
31385                decoder,
31386                offset + 64,
31387                _depth
31388            )?;
31389            fidl::decode!(
31390                fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
31391                D,
31392                &mut self.vec_nullable_struct,
31393                decoder,
31394                offset + 80,
31395                _depth
31396            )?;
31397            fidl::decode!(
31398                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
31399                D,
31400                &mut self.vec_vec_int,
31401                decoder,
31402                offset + 96,
31403                _depth
31404            )?;
31405            Ok(())
31406        }
31407    }
31408
31409    impl fidl::encoding::ValueTypeMarker for TableFieldInlinedStruct {
31410        type Borrowed<'a> = &'a Self;
31411        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31412            value
31413        }
31414    }
31415
31416    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedStruct {
31417        type Owned = Self;
31418
31419        #[inline(always)]
31420        fn inline_align(_context: fidl::encoding::Context) -> usize {
31421            8
31422        }
31423
31424        #[inline(always)]
31425        fn inline_size(_context: fidl::encoding::Context) -> usize {
31426            16
31427        }
31428    }
31429
31430    unsafe impl<D: fidl::encoding::ResourceDialect>
31431        fidl::encoding::Encode<TableFieldInlinedStruct, D> for &TableFieldInlinedStruct
31432    {
31433        #[inline]
31434        unsafe fn encode(
31435            self,
31436            encoder: &mut fidl::encoding::Encoder<'_, D>,
31437            offset: usize,
31438            _depth: fidl::encoding::Depth,
31439        ) -> fidl::Result<()> {
31440            encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
31441            // Delegate to tuple encoding.
31442            fidl::encoding::Encode::<TableFieldInlinedStruct, D>::encode(
31443                (<TableFieldInlined as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31444                encoder,
31445                offset,
31446                _depth,
31447            )
31448        }
31449    }
31450    unsafe impl<
31451        D: fidl::encoding::ResourceDialect,
31452        T0: fidl::encoding::Encode<TableFieldInlined, D>,
31453    > fidl::encoding::Encode<TableFieldInlinedStruct, D> for (T0,)
31454    {
31455        #[inline]
31456        unsafe fn encode(
31457            self,
31458            encoder: &mut fidl::encoding::Encoder<'_, D>,
31459            offset: usize,
31460            depth: fidl::encoding::Depth,
31461        ) -> fidl::Result<()> {
31462            encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
31463            // Zero out padding regions. There's no need to apply masks
31464            // because the unmasked parts will be overwritten by fields.
31465            // Write the fields.
31466            self.0.encode(encoder, offset + 0, depth)?;
31467            Ok(())
31468        }
31469    }
31470
31471    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31472        for TableFieldInlinedStruct
31473    {
31474        #[inline(always)]
31475        fn new_empty() -> Self {
31476            Self { t: fidl::new_empty!(TableFieldInlined, D) }
31477        }
31478
31479        #[inline]
31480        unsafe fn decode(
31481            &mut self,
31482            decoder: &mut fidl::encoding::Decoder<'_, D>,
31483            offset: usize,
31484            _depth: fidl::encoding::Depth,
31485        ) -> fidl::Result<()> {
31486            decoder.debug_check_bounds::<Self>(offset);
31487            // Verify that padding bytes are zero.
31488            fidl::decode!(TableFieldInlined, D, &mut self.t, decoder, offset + 0, _depth)?;
31489            Ok(())
31490        }
31491    }
31492
31493    impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLineStruct {
31494        type Borrowed<'a> = &'a Self;
31495        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31496            value
31497        }
31498    }
31499
31500    unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLineStruct {
31501        type Owned = Self;
31502
31503        #[inline(always)]
31504        fn inline_align(_context: fidl::encoding::Context) -> usize {
31505            8
31506        }
31507
31508        #[inline(always)]
31509        fn inline_size(_context: fidl::encoding::Context) -> usize {
31510            16
31511        }
31512    }
31513
31514    unsafe impl<D: fidl::encoding::ResourceDialect>
31515        fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for &TableFieldOutOfLineStruct
31516    {
31517        #[inline]
31518        unsafe fn encode(
31519            self,
31520            encoder: &mut fidl::encoding::Encoder<'_, D>,
31521            offset: usize,
31522            _depth: fidl::encoding::Depth,
31523        ) -> fidl::Result<()> {
31524            encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
31525            // Delegate to tuple encoding.
31526            fidl::encoding::Encode::<TableFieldOutOfLineStruct, D>::encode(
31527                (<TableFieldOutOfLine as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31528                encoder,
31529                offset,
31530                _depth,
31531            )
31532        }
31533    }
31534    unsafe impl<
31535        D: fidl::encoding::ResourceDialect,
31536        T0: fidl::encoding::Encode<TableFieldOutOfLine, D>,
31537    > fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for (T0,)
31538    {
31539        #[inline]
31540        unsafe fn encode(
31541            self,
31542            encoder: &mut fidl::encoding::Encoder<'_, D>,
31543            offset: usize,
31544            depth: fidl::encoding::Depth,
31545        ) -> fidl::Result<()> {
31546            encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
31547            // Zero out padding regions. There's no need to apply masks
31548            // because the unmasked parts will be overwritten by fields.
31549            // Write the fields.
31550            self.0.encode(encoder, offset + 0, depth)?;
31551            Ok(())
31552        }
31553    }
31554
31555    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31556        for TableFieldOutOfLineStruct
31557    {
31558        #[inline(always)]
31559        fn new_empty() -> Self {
31560            Self { t: fidl::new_empty!(TableFieldOutOfLine, D) }
31561        }
31562
31563        #[inline]
31564        unsafe fn decode(
31565            &mut self,
31566            decoder: &mut fidl::encoding::Decoder<'_, D>,
31567            offset: usize,
31568            _depth: fidl::encoding::Depth,
31569        ) -> fidl::Result<()> {
31570            decoder.debug_check_bounds::<Self>(offset);
31571            // Verify that padding bytes are zero.
31572            fidl::decode!(TableFieldOutOfLine, D, &mut self.t, decoder, offset + 0, _depth)?;
31573            Ok(())
31574        }
31575    }
31576
31577    impl fidl::encoding::ValueTypeMarker for TableFieldUnknownStruct {
31578        type Borrowed<'a> = &'a Self;
31579        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31580            value
31581        }
31582    }
31583
31584    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownStruct {
31585        type Owned = Self;
31586
31587        #[inline(always)]
31588        fn inline_align(_context: fidl::encoding::Context) -> usize {
31589            8
31590        }
31591
31592        #[inline(always)]
31593        fn inline_size(_context: fidl::encoding::Context) -> usize {
31594            16
31595        }
31596    }
31597
31598    unsafe impl<D: fidl::encoding::ResourceDialect>
31599        fidl::encoding::Encode<TableFieldUnknownStruct, D> for &TableFieldUnknownStruct
31600    {
31601        #[inline]
31602        unsafe fn encode(
31603            self,
31604            encoder: &mut fidl::encoding::Encoder<'_, D>,
31605            offset: usize,
31606            _depth: fidl::encoding::Depth,
31607        ) -> fidl::Result<()> {
31608            encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31609            // Delegate to tuple encoding.
31610            fidl::encoding::Encode::<TableFieldUnknownStruct, D>::encode(
31611                (<TableFieldUnknown as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31612                encoder,
31613                offset,
31614                _depth,
31615            )
31616        }
31617    }
31618    unsafe impl<
31619        D: fidl::encoding::ResourceDialect,
31620        T0: fidl::encoding::Encode<TableFieldUnknown, D>,
31621    > fidl::encoding::Encode<TableFieldUnknownStruct, D> for (T0,)
31622    {
31623        #[inline]
31624        unsafe fn encode(
31625            self,
31626            encoder: &mut fidl::encoding::Encoder<'_, D>,
31627            offset: usize,
31628            depth: fidl::encoding::Depth,
31629        ) -> fidl::Result<()> {
31630            encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31631            // Zero out padding regions. There's no need to apply masks
31632            // because the unmasked parts will be overwritten by fields.
31633            // Write the fields.
31634            self.0.encode(encoder, offset + 0, depth)?;
31635            Ok(())
31636        }
31637    }
31638
31639    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31640        for TableFieldUnknownStruct
31641    {
31642        #[inline(always)]
31643        fn new_empty() -> Self {
31644            Self { t: fidl::new_empty!(TableFieldUnknown, D) }
31645        }
31646
31647        #[inline]
31648        unsafe fn decode(
31649            &mut self,
31650            decoder: &mut fidl::encoding::Decoder<'_, D>,
31651            offset: usize,
31652            _depth: fidl::encoding::Depth,
31653        ) -> fidl::Result<()> {
31654            decoder.debug_check_bounds::<Self>(offset);
31655            // Verify that padding bytes are zero.
31656            fidl::decode!(TableFieldUnknown, D, &mut self.t, decoder, offset + 0, _depth)?;
31657            Ok(())
31658        }
31659    }
31660
31661    impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31662        type Borrowed<'a> = &'a Self;
31663        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31664            value
31665        }
31666    }
31667
31668    unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31669        type Owned = Self;
31670
31671        #[inline(always)]
31672        fn inline_align(_context: fidl::encoding::Context) -> usize {
31673            8
31674        }
31675
31676        #[inline(always)]
31677        fn inline_size(_context: fidl::encoding::Context) -> usize {
31678            16
31679        }
31680    }
31681
31682    unsafe impl<D: fidl::encoding::ResourceDialect>
31683        fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D>
31684        for &TableFieldUnsetFlexibleEnumInlinedStruct
31685    {
31686        #[inline]
31687        unsafe fn encode(
31688            self,
31689            encoder: &mut fidl::encoding::Encoder<'_, D>,
31690            offset: usize,
31691            _depth: fidl::encoding::Depth,
31692        ) -> fidl::Result<()> {
31693            encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31694            // Delegate to tuple encoding.
31695            fidl::encoding::Encode::<TableFieldUnsetFlexibleEnumInlinedStruct, D>::encode(
31696                (<TableFieldUnsetFlexibleEnumInlined as fidl::encoding::ValueTypeMarker>::borrow(
31697                    &self.t,
31698                ),),
31699                encoder,
31700                offset,
31701                _depth,
31702            )
31703        }
31704    }
31705    unsafe impl<
31706        D: fidl::encoding::ResourceDialect,
31707        T0: fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>,
31708    > fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D> for (T0,)
31709    {
31710        #[inline]
31711        unsafe fn encode(
31712            self,
31713            encoder: &mut fidl::encoding::Encoder<'_, D>,
31714            offset: usize,
31715            depth: fidl::encoding::Depth,
31716        ) -> fidl::Result<()> {
31717            encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31718            // Zero out padding regions. There's no need to apply masks
31719            // because the unmasked parts will be overwritten by fields.
31720            // Write the fields.
31721            self.0.encode(encoder, offset + 0, depth)?;
31722            Ok(())
31723        }
31724    }
31725
31726    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31727        for TableFieldUnsetFlexibleEnumInlinedStruct
31728    {
31729        #[inline(always)]
31730        fn new_empty() -> Self {
31731            Self { t: fidl::new_empty!(TableFieldUnsetFlexibleEnumInlined, D) }
31732        }
31733
31734        #[inline]
31735        unsafe fn decode(
31736            &mut self,
31737            decoder: &mut fidl::encoding::Decoder<'_, D>,
31738            offset: usize,
31739            _depth: fidl::encoding::Depth,
31740        ) -> fidl::Result<()> {
31741            decoder.debug_check_bounds::<Self>(offset);
31742            // Verify that padding bytes are zero.
31743            fidl::decode!(
31744                TableFieldUnsetFlexibleEnumInlined,
31745                D,
31746                &mut self.t,
31747                decoder,
31748                offset + 0,
31749                _depth
31750            )?;
31751            Ok(())
31752        }
31753    }
31754
31755    impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwichStruct {
31756        type Borrowed<'a> = &'a Self;
31757        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31758            value
31759        }
31760    }
31761
31762    unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwichStruct {
31763        type Owned = Self;
31764
31765        #[inline(always)]
31766        fn inline_align(_context: fidl::encoding::Context) -> usize {
31767            8
31768        }
31769
31770        #[inline(always)]
31771        fn inline_size(_context: fidl::encoding::Context) -> usize {
31772            16
31773        }
31774    }
31775
31776    unsafe impl<D: fidl::encoding::ResourceDialect>
31777        fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D>
31778        for &TableStructWithReservedSandwichStruct
31779    {
31780        #[inline]
31781        unsafe fn encode(
31782            self,
31783            encoder: &mut fidl::encoding::Encoder<'_, D>,
31784            offset: usize,
31785            _depth: fidl::encoding::Depth,
31786        ) -> fidl::Result<()> {
31787            encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31788            // Delegate to tuple encoding.
31789            fidl::encoding::Encode::<TableStructWithReservedSandwichStruct, D>::encode(
31790                (<TableStructWithReservedSandwich as fidl::encoding::ValueTypeMarker>::borrow(
31791                    &self.table,
31792                ),),
31793                encoder,
31794                offset,
31795                _depth,
31796            )
31797        }
31798    }
31799    unsafe impl<
31800        D: fidl::encoding::ResourceDialect,
31801        T0: fidl::encoding::Encode<TableStructWithReservedSandwich, D>,
31802    > fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D> for (T0,)
31803    {
31804        #[inline]
31805        unsafe fn encode(
31806            self,
31807            encoder: &mut fidl::encoding::Encoder<'_, D>,
31808            offset: usize,
31809            depth: fidl::encoding::Depth,
31810        ) -> fidl::Result<()> {
31811            encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31812            // Zero out padding regions. There's no need to apply masks
31813            // because the unmasked parts will be overwritten by fields.
31814            // Write the fields.
31815            self.0.encode(encoder, offset + 0, depth)?;
31816            Ok(())
31817        }
31818    }
31819
31820    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31821        for TableStructWithReservedSandwichStruct
31822    {
31823        #[inline(always)]
31824        fn new_empty() -> Self {
31825            Self { table: fidl::new_empty!(TableStructWithReservedSandwich, D) }
31826        }
31827
31828        #[inline]
31829        unsafe fn decode(
31830            &mut self,
31831            decoder: &mut fidl::encoding::Decoder<'_, D>,
31832            offset: usize,
31833            _depth: fidl::encoding::Depth,
31834        ) -> fidl::Result<()> {
31835            decoder.debug_check_bounds::<Self>(offset);
31836            // Verify that padding bytes are zero.
31837            fidl::decode!(
31838                TableStructWithReservedSandwich,
31839                D,
31840                &mut self.table,
31841                decoder,
31842                offset + 0,
31843                _depth
31844            )?;
31845            Ok(())
31846        }
31847    }
31848
31849    impl fidl::encoding::ValueTypeMarker for TableStructWithUint32SandwichStruct {
31850        type Borrowed<'a> = &'a Self;
31851        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31852            value
31853        }
31854    }
31855
31856    unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32SandwichStruct {
31857        type Owned = Self;
31858
31859        #[inline(always)]
31860        fn inline_align(_context: fidl::encoding::Context) -> usize {
31861            8
31862        }
31863
31864        #[inline(always)]
31865        fn inline_size(_context: fidl::encoding::Context) -> usize {
31866            16
31867        }
31868    }
31869
31870    unsafe impl<D: fidl::encoding::ResourceDialect>
31871        fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D>
31872        for &TableStructWithUint32SandwichStruct
31873    {
31874        #[inline]
31875        unsafe fn encode(
31876            self,
31877            encoder: &mut fidl::encoding::Encoder<'_, D>,
31878            offset: usize,
31879            _depth: fidl::encoding::Depth,
31880        ) -> fidl::Result<()> {
31881            encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31882            // Delegate to tuple encoding.
31883            fidl::encoding::Encode::<TableStructWithUint32SandwichStruct, D>::encode(
31884                (<TableStructWithUint32Sandwich as fidl::encoding::ValueTypeMarker>::borrow(
31885                    &self.table,
31886                ),),
31887                encoder,
31888                offset,
31889                _depth,
31890            )
31891        }
31892    }
31893    unsafe impl<
31894        D: fidl::encoding::ResourceDialect,
31895        T0: fidl::encoding::Encode<TableStructWithUint32Sandwich, D>,
31896    > fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D> for (T0,)
31897    {
31898        #[inline]
31899        unsafe fn encode(
31900            self,
31901            encoder: &mut fidl::encoding::Encoder<'_, D>,
31902            offset: usize,
31903            depth: fidl::encoding::Depth,
31904        ) -> fidl::Result<()> {
31905            encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31906            // Zero out padding regions. There's no need to apply masks
31907            // because the unmasked parts will be overwritten by fields.
31908            // Write the fields.
31909            self.0.encode(encoder, offset + 0, depth)?;
31910            Ok(())
31911        }
31912    }
31913
31914    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31915        for TableStructWithUint32SandwichStruct
31916    {
31917        #[inline(always)]
31918        fn new_empty() -> Self {
31919            Self { table: fidl::new_empty!(TableStructWithUint32Sandwich, D) }
31920        }
31921
31922        #[inline]
31923        unsafe fn decode(
31924            &mut self,
31925            decoder: &mut fidl::encoding::Decoder<'_, D>,
31926            offset: usize,
31927            _depth: fidl::encoding::Depth,
31928        ) -> fidl::Result<()> {
31929            decoder.debug_check_bounds::<Self>(offset);
31930            // Verify that padding bytes are zero.
31931            fidl::decode!(
31932                TableStructWithUint32Sandwich,
31933                D,
31934                &mut self.table,
31935                decoder,
31936                offset + 0,
31937                _depth
31938            )?;
31939            Ok(())
31940        }
31941    }
31942
31943    impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnionStruct {
31944        type Borrowed<'a> = &'a Self;
31945        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31946            value
31947        }
31948    }
31949
31950    unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnionStruct {
31951        type Owned = Self;
31952
31953        #[inline(always)]
31954        fn inline_align(_context: fidl::encoding::Context) -> usize {
31955            8
31956        }
31957
31958        #[inline(always)]
31959        fn inline_size(_context: fidl::encoding::Context) -> usize {
31960            16
31961        }
31962    }
31963
31964    unsafe impl<D: fidl::encoding::ResourceDialect>
31965        fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D>
31966        for &TableWithReservedFieldThenUnionStruct
31967    {
31968        #[inline]
31969        unsafe fn encode(
31970            self,
31971            encoder: &mut fidl::encoding::Encoder<'_, D>,
31972            offset: usize,
31973            _depth: fidl::encoding::Depth,
31974        ) -> fidl::Result<()> {
31975            encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31976            // Delegate to tuple encoding.
31977            fidl::encoding::Encode::<TableWithReservedFieldThenUnionStruct, D>::encode(
31978                (<TableWithReservedFieldThenUnion as fidl::encoding::ValueTypeMarker>::borrow(
31979                    &self.t,
31980                ),),
31981                encoder,
31982                offset,
31983                _depth,
31984            )
31985        }
31986    }
31987    unsafe impl<
31988        D: fidl::encoding::ResourceDialect,
31989        T0: fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>,
31990    > fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D> for (T0,)
31991    {
31992        #[inline]
31993        unsafe fn encode(
31994            self,
31995            encoder: &mut fidl::encoding::Encoder<'_, D>,
31996            offset: usize,
31997            depth: fidl::encoding::Depth,
31998        ) -> fidl::Result<()> {
31999            encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
32000            // Zero out padding regions. There's no need to apply masks
32001            // because the unmasked parts will be overwritten by fields.
32002            // Write the fields.
32003            self.0.encode(encoder, offset + 0, depth)?;
32004            Ok(())
32005        }
32006    }
32007
32008    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32009        for TableWithReservedFieldThenUnionStruct
32010    {
32011        #[inline(always)]
32012        fn new_empty() -> Self {
32013            Self { t: fidl::new_empty!(TableWithReservedFieldThenUnion, D) }
32014        }
32015
32016        #[inline]
32017        unsafe fn decode(
32018            &mut self,
32019            decoder: &mut fidl::encoding::Decoder<'_, D>,
32020            offset: usize,
32021            _depth: fidl::encoding::Depth,
32022        ) -> fidl::Result<()> {
32023            decoder.debug_check_bounds::<Self>(offset);
32024            // Verify that padding bytes are zero.
32025            fidl::decode!(
32026                TableWithReservedFieldThenUnion,
32027                D,
32028                &mut self.t,
32029                decoder,
32030                offset + 0,
32031                _depth
32032            )?;
32033            Ok(())
32034        }
32035    }
32036
32037    impl fidl::encoding::ValueTypeMarker for TestAddEthernetDeviceRequest {
32038        type Borrowed<'a> = &'a Self;
32039        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32040            value
32041        }
32042    }
32043
32044    unsafe impl fidl::encoding::TypeMarker for TestAddEthernetDeviceRequest {
32045        type Owned = Self;
32046
32047        #[inline(always)]
32048        fn inline_align(_context: fidl::encoding::Context) -> usize {
32049            8
32050        }
32051
32052        #[inline(always)]
32053        fn inline_size(_context: fidl::encoding::Context) -> usize {
32054            56
32055        }
32056    }
32057
32058    unsafe impl<D: fidl::encoding::ResourceDialect>
32059        fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for &TestAddEthernetDeviceRequest
32060    {
32061        #[inline]
32062        unsafe fn encode(
32063            self,
32064            encoder: &mut fidl::encoding::Encoder<'_, D>,
32065            offset: usize,
32066            _depth: fidl::encoding::Depth,
32067        ) -> fidl::Result<()> {
32068            encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
32069            // Delegate to tuple encoding.
32070            fidl::encoding::Encode::<TestAddEthernetDeviceRequest, D>::encode(
32071                (
32072                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
32073                        &self.topological_path,
32074                    ),
32075                    <InterfaceConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
32076                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
32077                ),
32078                encoder,
32079                offset,
32080                _depth,
32081            )
32082        }
32083    }
32084    unsafe impl<
32085        D: fidl::encoding::ResourceDialect,
32086        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32087        T1: fidl::encoding::Encode<InterfaceConfig, D>,
32088        T2: fidl::encoding::Encode<u32, D>,
32089    > fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for (T0, T1, T2)
32090    {
32091        #[inline]
32092        unsafe fn encode(
32093            self,
32094            encoder: &mut fidl::encoding::Encoder<'_, D>,
32095            offset: usize,
32096            depth: fidl::encoding::Depth,
32097        ) -> fidl::Result<()> {
32098            encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
32099            // Zero out padding regions. There's no need to apply masks
32100            // because the unmasked parts will be overwritten by fields.
32101            unsafe {
32102                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
32103                (ptr as *mut u64).write_unaligned(0);
32104            }
32105            // Write the fields.
32106            self.0.encode(encoder, offset + 0, depth)?;
32107            self.1.encode(encoder, offset + 16, depth)?;
32108            self.2.encode(encoder, offset + 48, depth)?;
32109            Ok(())
32110        }
32111    }
32112
32113    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32114        for TestAddEthernetDeviceRequest
32115    {
32116        #[inline(always)]
32117        fn new_empty() -> Self {
32118            Self {
32119                topological_path: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32120                config: fidl::new_empty!(InterfaceConfig, D),
32121                this_should_be_a_handle: fidl::new_empty!(u32, D),
32122            }
32123        }
32124
32125        #[inline]
32126        unsafe fn decode(
32127            &mut self,
32128            decoder: &mut fidl::encoding::Decoder<'_, D>,
32129            offset: usize,
32130            _depth: fidl::encoding::Depth,
32131        ) -> fidl::Result<()> {
32132            decoder.debug_check_bounds::<Self>(offset);
32133            // Verify that padding bytes are zero.
32134            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
32135            let padval = unsafe { (ptr as *const u64).read_unaligned() };
32136            let mask = 0xffffffff00000000u64;
32137            let maskedval = padval & mask;
32138            if maskedval != 0 {
32139                return Err(fidl::Error::NonZeroPadding {
32140                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
32141                });
32142            }
32143            fidl::decode!(
32144                fidl::encoding::UnboundedString,
32145                D,
32146                &mut self.topological_path,
32147                decoder,
32148                offset + 0,
32149                _depth
32150            )?;
32151            fidl::decode!(InterfaceConfig, D, &mut self.config, decoder, offset + 16, _depth)?;
32152            fidl::decode!(u32, D, &mut self.this_should_be_a_handle, decoder, offset + 48, _depth)?;
32153            Ok(())
32154        }
32155    }
32156
32157    impl fidl::encoding::ValueTypeMarker for TestFlexibleXUnionInStruct {
32158        type Borrowed<'a> = &'a Self;
32159        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32160            value
32161        }
32162    }
32163
32164    unsafe impl fidl::encoding::TypeMarker for TestFlexibleXUnionInStruct {
32165        type Owned = Self;
32166
32167        #[inline(always)]
32168        fn inline_align(_context: fidl::encoding::Context) -> usize {
32169            8
32170        }
32171
32172        #[inline(always)]
32173        fn inline_size(_context: fidl::encoding::Context) -> usize {
32174            16
32175        }
32176    }
32177
32178    unsafe impl<D: fidl::encoding::ResourceDialect>
32179        fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for &TestFlexibleXUnionInStruct
32180    {
32181        #[inline]
32182        unsafe fn encode(
32183            self,
32184            encoder: &mut fidl::encoding::Encoder<'_, D>,
32185            offset: usize,
32186            _depth: fidl::encoding::Depth,
32187        ) -> fidl::Result<()> {
32188            encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
32189            // Delegate to tuple encoding.
32190            fidl::encoding::Encode::<TestFlexibleXUnionInStruct, D>::encode(
32191                (<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
32192                encoder,
32193                offset,
32194                _depth,
32195            )
32196        }
32197    }
32198    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SampleXUnion, D>>
32199        fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for (T0,)
32200    {
32201        #[inline]
32202        unsafe fn encode(
32203            self,
32204            encoder: &mut fidl::encoding::Encoder<'_, D>,
32205            offset: usize,
32206            depth: fidl::encoding::Depth,
32207        ) -> fidl::Result<()> {
32208            encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
32209            // Zero out padding regions. There's no need to apply masks
32210            // because the unmasked parts will be overwritten by fields.
32211            // Write the fields.
32212            self.0.encode(encoder, offset + 0, depth)?;
32213            Ok(())
32214        }
32215    }
32216
32217    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32218        for TestFlexibleXUnionInStruct
32219    {
32220        #[inline(always)]
32221        fn new_empty() -> Self {
32222            Self { xu: fidl::new_empty!(SampleXUnion, D) }
32223        }
32224
32225        #[inline]
32226        unsafe fn decode(
32227            &mut self,
32228            decoder: &mut fidl::encoding::Decoder<'_, D>,
32229            offset: usize,
32230            _depth: fidl::encoding::Depth,
32231        ) -> fidl::Result<()> {
32232            decoder.debug_check_bounds::<Self>(offset);
32233            // Verify that padding bytes are zero.
32234            fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
32235            Ok(())
32236        }
32237    }
32238
32239    impl fidl::encoding::ValueTypeMarker for TestInlineXUnionInStruct {
32240        type Borrowed<'a> = &'a Self;
32241        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32242            value
32243        }
32244    }
32245
32246    unsafe impl fidl::encoding::TypeMarker for TestInlineXUnionInStruct {
32247        type Owned = Self;
32248
32249        #[inline(always)]
32250        fn inline_align(_context: fidl::encoding::Context) -> usize {
32251            8
32252        }
32253
32254        #[inline(always)]
32255        fn inline_size(_context: fidl::encoding::Context) -> usize {
32256            48
32257        }
32258    }
32259
32260    unsafe impl<D: fidl::encoding::ResourceDialect>
32261        fidl::encoding::Encode<TestInlineXUnionInStruct, D> for &TestInlineXUnionInStruct
32262    {
32263        #[inline]
32264        unsafe fn encode(
32265            self,
32266            encoder: &mut fidl::encoding::Encoder<'_, D>,
32267            offset: usize,
32268            _depth: fidl::encoding::Depth,
32269        ) -> fidl::Result<()> {
32270            encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
32271            // Delegate to tuple encoding.
32272            fidl::encoding::Encode::<TestInlineXUnionInStruct, D>::encode(
32273                (
32274                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
32275                        &self.before,
32276                    ),
32277                    <SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32278                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
32279                        &self.after,
32280                    ),
32281                ),
32282                encoder,
32283                offset,
32284                _depth,
32285            )
32286        }
32287    }
32288    unsafe impl<
32289        D: fidl::encoding::ResourceDialect,
32290        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32291        T1: fidl::encoding::Encode<SampleXUnion, D>,
32292        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32293    > fidl::encoding::Encode<TestInlineXUnionInStruct, D> for (T0, T1, T2)
32294    {
32295        #[inline]
32296        unsafe fn encode(
32297            self,
32298            encoder: &mut fidl::encoding::Encoder<'_, D>,
32299            offset: usize,
32300            depth: fidl::encoding::Depth,
32301        ) -> fidl::Result<()> {
32302            encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
32303            // Zero out padding regions. There's no need to apply masks
32304            // because the unmasked parts will be overwritten by fields.
32305            // Write the fields.
32306            self.0.encode(encoder, offset + 0, depth)?;
32307            self.1.encode(encoder, offset + 16, depth)?;
32308            self.2.encode(encoder, offset + 32, depth)?;
32309            Ok(())
32310        }
32311    }
32312
32313    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32314        for TestInlineXUnionInStruct
32315    {
32316        #[inline(always)]
32317        fn new_empty() -> Self {
32318            Self {
32319                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32320                xu: fidl::new_empty!(SampleXUnion, D),
32321                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32322            }
32323        }
32324
32325        #[inline]
32326        unsafe fn decode(
32327            &mut self,
32328            decoder: &mut fidl::encoding::Decoder<'_, D>,
32329            offset: usize,
32330            _depth: fidl::encoding::Depth,
32331        ) -> fidl::Result<()> {
32332            decoder.debug_check_bounds::<Self>(offset);
32333            // Verify that padding bytes are zero.
32334            fidl::decode!(
32335                fidl::encoding::UnboundedString,
32336                D,
32337                &mut self.before,
32338                decoder,
32339                offset + 0,
32340                _depth
32341            )?;
32342            fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 16, _depth)?;
32343            fidl::decode!(
32344                fidl::encoding::UnboundedString,
32345                D,
32346                &mut self.after,
32347                decoder,
32348                offset + 32,
32349                _depth
32350            )?;
32351            Ok(())
32352        }
32353    }
32354
32355    impl fidl::encoding::ValueTypeMarker for TestOptionalFlexibleXUnionInStruct {
32356        type Borrowed<'a> = &'a Self;
32357        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32358            value
32359        }
32360    }
32361
32362    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleXUnionInStruct {
32363        type Owned = Self;
32364
32365        #[inline(always)]
32366        fn inline_align(_context: fidl::encoding::Context) -> usize {
32367            8
32368        }
32369
32370        #[inline(always)]
32371        fn inline_size(_context: fidl::encoding::Context) -> usize {
32372            16
32373        }
32374    }
32375
32376    unsafe impl<D: fidl::encoding::ResourceDialect>
32377        fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D>
32378        for &TestOptionalFlexibleXUnionInStruct
32379    {
32380        #[inline]
32381        unsafe fn encode(
32382            self,
32383            encoder: &mut fidl::encoding::Encoder<'_, D>,
32384            offset: usize,
32385            _depth: fidl::encoding::Depth,
32386        ) -> fidl::Result<()> {
32387            encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
32388            // Delegate to tuple encoding.
32389            fidl::encoding::Encode::<TestOptionalFlexibleXUnionInStruct, D>::encode(
32390                (
32391                    <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32392                ),
32393                encoder, offset, _depth
32394            )
32395        }
32396    }
32397    unsafe impl<
32398        D: fidl::encoding::ResourceDialect,
32399        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
32400    > fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D> for (T0,)
32401    {
32402        #[inline]
32403        unsafe fn encode(
32404            self,
32405            encoder: &mut fidl::encoding::Encoder<'_, D>,
32406            offset: usize,
32407            depth: fidl::encoding::Depth,
32408        ) -> fidl::Result<()> {
32409            encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
32410            // Zero out padding regions. There's no need to apply masks
32411            // because the unmasked parts will be overwritten by fields.
32412            // Write the fields.
32413            self.0.encode(encoder, offset + 0, depth)?;
32414            Ok(())
32415        }
32416    }
32417
32418    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32419        for TestOptionalFlexibleXUnionInStruct
32420    {
32421        #[inline(always)]
32422        fn new_empty() -> Self {
32423            Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D) }
32424        }
32425
32426        #[inline]
32427        unsafe fn decode(
32428            &mut self,
32429            decoder: &mut fidl::encoding::Decoder<'_, D>,
32430            offset: usize,
32431            _depth: fidl::encoding::Depth,
32432        ) -> fidl::Result<()> {
32433            decoder.debug_check_bounds::<Self>(offset);
32434            // Verify that padding bytes are zero.
32435            fidl::decode!(
32436                fidl::encoding::OptionalUnion<SampleXUnion>,
32437                D,
32438                &mut self.xu,
32439                decoder,
32440                offset + 0,
32441                _depth
32442            )?;
32443            Ok(())
32444        }
32445    }
32446
32447    impl fidl::encoding::ValueTypeMarker for TestOptionalStrictXUnionInStruct {
32448        type Borrowed<'a> = &'a Self;
32449        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32450            value
32451        }
32452    }
32453
32454    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictXUnionInStruct {
32455        type Owned = Self;
32456
32457        #[inline(always)]
32458        fn inline_align(_context: fidl::encoding::Context) -> usize {
32459            8
32460        }
32461
32462        #[inline(always)]
32463        fn inline_size(_context: fidl::encoding::Context) -> usize {
32464            16
32465        }
32466    }
32467
32468    unsafe impl<D: fidl::encoding::ResourceDialect>
32469        fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D>
32470        for &TestOptionalStrictXUnionInStruct
32471    {
32472        #[inline]
32473        unsafe fn encode(
32474            self,
32475            encoder: &mut fidl::encoding::Encoder<'_, D>,
32476            offset: usize,
32477            _depth: fidl::encoding::Depth,
32478        ) -> fidl::Result<()> {
32479            encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
32480            // Delegate to tuple encoding.
32481            fidl::encoding::Encode::<TestOptionalStrictXUnionInStruct, D>::encode(
32482                (
32483                    <fidl::encoding::OptionalUnion<SampleStrictXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32484                ),
32485                encoder, offset, _depth
32486            )
32487        }
32488    }
32489    unsafe impl<
32490        D: fidl::encoding::ResourceDialect,
32491        T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleStrictXUnion>, D>,
32492    > fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D> for (T0,)
32493    {
32494        #[inline]
32495        unsafe fn encode(
32496            self,
32497            encoder: &mut fidl::encoding::Encoder<'_, D>,
32498            offset: usize,
32499            depth: fidl::encoding::Depth,
32500        ) -> fidl::Result<()> {
32501            encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
32502            // Zero out padding regions. There's no need to apply masks
32503            // because the unmasked parts will be overwritten by fields.
32504            // Write the fields.
32505            self.0.encode(encoder, offset + 0, depth)?;
32506            Ok(())
32507        }
32508    }
32509
32510    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32511        for TestOptionalStrictXUnionInStruct
32512    {
32513        #[inline(always)]
32514        fn new_empty() -> Self {
32515            Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleStrictXUnion>, D) }
32516        }
32517
32518        #[inline]
32519        unsafe fn decode(
32520            &mut self,
32521            decoder: &mut fidl::encoding::Decoder<'_, D>,
32522            offset: usize,
32523            _depth: fidl::encoding::Depth,
32524        ) -> fidl::Result<()> {
32525            decoder.debug_check_bounds::<Self>(offset);
32526            // Verify that padding bytes are zero.
32527            fidl::decode!(
32528                fidl::encoding::OptionalUnion<SampleStrictXUnion>,
32529                D,
32530                &mut self.xu,
32531                decoder,
32532                offset + 0,
32533                _depth
32534            )?;
32535            Ok(())
32536        }
32537    }
32538
32539    impl fidl::encoding::ValueTypeMarker for TestOptionalXUnionInStruct {
32540        type Borrowed<'a> = &'a Self;
32541        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32542            value
32543        }
32544    }
32545
32546    unsafe impl fidl::encoding::TypeMarker for TestOptionalXUnionInStruct {
32547        type Owned = Self;
32548
32549        #[inline(always)]
32550        fn inline_align(_context: fidl::encoding::Context) -> usize {
32551            8
32552        }
32553
32554        #[inline(always)]
32555        fn inline_size(_context: fidl::encoding::Context) -> usize {
32556            48
32557        }
32558    }
32559
32560    unsafe impl<D: fidl::encoding::ResourceDialect>
32561        fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for &TestOptionalXUnionInStruct
32562    {
32563        #[inline]
32564        unsafe fn encode(
32565            self,
32566            encoder: &mut fidl::encoding::Encoder<'_, D>,
32567            offset: usize,
32568            _depth: fidl::encoding::Depth,
32569        ) -> fidl::Result<()> {
32570            encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
32571            // Delegate to tuple encoding.
32572            fidl::encoding::Encode::<TestOptionalXUnionInStruct, D>::encode(
32573                (
32574                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
32575                    <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32576                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
32577                ),
32578                encoder, offset, _depth
32579            )
32580        }
32581    }
32582    unsafe impl<
32583        D: fidl::encoding::ResourceDialect,
32584        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32585        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
32586        T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32587    > fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for (T0, T1, T2)
32588    {
32589        #[inline]
32590        unsafe fn encode(
32591            self,
32592            encoder: &mut fidl::encoding::Encoder<'_, D>,
32593            offset: usize,
32594            depth: fidl::encoding::Depth,
32595        ) -> fidl::Result<()> {
32596            encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
32597            // Zero out padding regions. There's no need to apply masks
32598            // because the unmasked parts will be overwritten by fields.
32599            // Write the fields.
32600            self.0.encode(encoder, offset + 0, depth)?;
32601            self.1.encode(encoder, offset + 16, depth)?;
32602            self.2.encode(encoder, offset + 32, depth)?;
32603            Ok(())
32604        }
32605    }
32606
32607    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32608        for TestOptionalXUnionInStruct
32609    {
32610        #[inline(always)]
32611        fn new_empty() -> Self {
32612            Self {
32613                before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32614                xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D),
32615                after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32616            }
32617        }
32618
32619        #[inline]
32620        unsafe fn decode(
32621            &mut self,
32622            decoder: &mut fidl::encoding::Decoder<'_, D>,
32623            offset: usize,
32624            _depth: fidl::encoding::Depth,
32625        ) -> fidl::Result<()> {
32626            decoder.debug_check_bounds::<Self>(offset);
32627            // Verify that padding bytes are zero.
32628            fidl::decode!(
32629                fidl::encoding::UnboundedString,
32630                D,
32631                &mut self.before,
32632                decoder,
32633                offset + 0,
32634                _depth
32635            )?;
32636            fidl::decode!(
32637                fidl::encoding::OptionalUnion<SampleXUnion>,
32638                D,
32639                &mut self.xu,
32640                decoder,
32641                offset + 16,
32642                _depth
32643            )?;
32644            fidl::decode!(
32645                fidl::encoding::UnboundedString,
32646                D,
32647                &mut self.after,
32648                decoder,
32649                offset + 32,
32650                _depth
32651            )?;
32652            Ok(())
32653        }
32654    }
32655
32656    impl fidl::encoding::ValueTypeMarker for TestStrictXUnionInStruct {
32657        type Borrowed<'a> = &'a Self;
32658        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32659            value
32660        }
32661    }
32662
32663    unsafe impl fidl::encoding::TypeMarker for TestStrictXUnionInStruct {
32664        type Owned = Self;
32665
32666        #[inline(always)]
32667        fn inline_align(_context: fidl::encoding::Context) -> usize {
32668            8
32669        }
32670
32671        #[inline(always)]
32672        fn inline_size(_context: fidl::encoding::Context) -> usize {
32673            16
32674        }
32675    }
32676
32677    unsafe impl<D: fidl::encoding::ResourceDialect>
32678        fidl::encoding::Encode<TestStrictXUnionInStruct, D> for &TestStrictXUnionInStruct
32679    {
32680        #[inline]
32681        unsafe fn encode(
32682            self,
32683            encoder: &mut fidl::encoding::Encoder<'_, D>,
32684            offset: usize,
32685            _depth: fidl::encoding::Depth,
32686        ) -> fidl::Result<()> {
32687            encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32688            // Delegate to tuple encoding.
32689            fidl::encoding::Encode::<TestStrictXUnionInStruct, D>::encode(
32690                (<SampleStrictXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
32691                encoder,
32692                offset,
32693                _depth,
32694            )
32695        }
32696    }
32697    unsafe impl<
32698        D: fidl::encoding::ResourceDialect,
32699        T0: fidl::encoding::Encode<SampleStrictXUnion, D>,
32700    > fidl::encoding::Encode<TestStrictXUnionInStruct, D> for (T0,)
32701    {
32702        #[inline]
32703        unsafe fn encode(
32704            self,
32705            encoder: &mut fidl::encoding::Encoder<'_, D>,
32706            offset: usize,
32707            depth: fidl::encoding::Depth,
32708        ) -> fidl::Result<()> {
32709            encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32710            // Zero out padding regions. There's no need to apply masks
32711            // because the unmasked parts will be overwritten by fields.
32712            // Write the fields.
32713            self.0.encode(encoder, offset + 0, depth)?;
32714            Ok(())
32715        }
32716    }
32717
32718    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32719        for TestStrictXUnionInStruct
32720    {
32721        #[inline(always)]
32722        fn new_empty() -> Self {
32723            Self { xu: fidl::new_empty!(SampleStrictXUnion, D) }
32724        }
32725
32726        #[inline]
32727        unsafe fn decode(
32728            &mut self,
32729            decoder: &mut fidl::encoding::Decoder<'_, D>,
32730            offset: usize,
32731            _depth: fidl::encoding::Depth,
32732        ) -> fidl::Result<()> {
32733            decoder.debug_check_bounds::<Self>(offset);
32734            // Verify that padding bytes are zero.
32735            fidl::decode!(SampleStrictXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
32736            Ok(())
32737        }
32738    }
32739
32740    impl fidl::encoding::ValueTypeMarker for TestXUnionInTable {
32741        type Borrowed<'a> = &'a Self;
32742        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32743            value
32744        }
32745    }
32746
32747    unsafe impl fidl::encoding::TypeMarker for TestXUnionInTable {
32748        type Owned = Self;
32749
32750        #[inline(always)]
32751        fn inline_align(_context: fidl::encoding::Context) -> usize {
32752            8
32753        }
32754
32755        #[inline(always)]
32756        fn inline_size(_context: fidl::encoding::Context) -> usize {
32757            16
32758        }
32759    }
32760
32761    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestXUnionInTable, D>
32762        for &TestXUnionInTable
32763    {
32764        #[inline]
32765        unsafe fn encode(
32766            self,
32767            encoder: &mut fidl::encoding::Encoder<'_, D>,
32768            offset: usize,
32769            _depth: fidl::encoding::Depth,
32770        ) -> fidl::Result<()> {
32771            encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32772            // Delegate to tuple encoding.
32773            fidl::encoding::Encode::<TestXUnionInTable, D>::encode(
32774                (<XUnionInTable as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
32775                encoder,
32776                offset,
32777                _depth,
32778            )
32779        }
32780    }
32781    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionInTable, D>>
32782        fidl::encoding::Encode<TestXUnionInTable, D> for (T0,)
32783    {
32784        #[inline]
32785        unsafe fn encode(
32786            self,
32787            encoder: &mut fidl::encoding::Encoder<'_, D>,
32788            offset: usize,
32789            depth: fidl::encoding::Depth,
32790        ) -> fidl::Result<()> {
32791            encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32792            // Zero out padding regions. There's no need to apply masks
32793            // because the unmasked parts will be overwritten by fields.
32794            // Write the fields.
32795            self.0.encode(encoder, offset + 0, depth)?;
32796            Ok(())
32797        }
32798    }
32799
32800    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestXUnionInTable {
32801        #[inline(always)]
32802        fn new_empty() -> Self {
32803            Self { value: fidl::new_empty!(XUnionInTable, D) }
32804        }
32805
32806        #[inline]
32807        unsafe fn decode(
32808            &mut self,
32809            decoder: &mut fidl::encoding::Decoder<'_, D>,
32810            offset: usize,
32811            _depth: fidl::encoding::Depth,
32812        ) -> fidl::Result<()> {
32813            decoder.debug_check_bounds::<Self>(offset);
32814            // Verify that padding bytes are zero.
32815            fidl::decode!(XUnionInTable, D, &mut self.value, decoder, offset + 0, _depth)?;
32816            Ok(())
32817        }
32818    }
32819
32820    impl fidl::encoding::ValueTypeMarker for ThreeByte {
32821        type Borrowed<'a> = &'a Self;
32822        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32823            value
32824        }
32825    }
32826
32827    unsafe impl fidl::encoding::TypeMarker for ThreeByte {
32828        type Owned = Self;
32829
32830        #[inline(always)]
32831        fn inline_align(_context: fidl::encoding::Context) -> usize {
32832            1
32833        }
32834
32835        #[inline(always)]
32836        fn inline_size(_context: fidl::encoding::Context) -> usize {
32837            3
32838        }
32839        #[inline(always)]
32840        fn encode_is_copy() -> bool {
32841            true
32842        }
32843
32844        #[inline(always)]
32845        fn decode_is_copy() -> bool {
32846            true
32847        }
32848    }
32849
32850    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByte, D>
32851        for &ThreeByte
32852    {
32853        #[inline]
32854        unsafe fn encode(
32855            self,
32856            encoder: &mut fidl::encoding::Encoder<'_, D>,
32857            offset: usize,
32858            _depth: fidl::encoding::Depth,
32859        ) -> fidl::Result<()> {
32860            encoder.debug_check_bounds::<ThreeByte>(offset);
32861            unsafe {
32862                // Copy the object into the buffer.
32863                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32864                (buf_ptr as *mut ThreeByte).write_unaligned((self as *const ThreeByte).read());
32865                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
32866                // done second because the memcpy will write garbage to these bytes.
32867            }
32868            Ok(())
32869        }
32870    }
32871    unsafe impl<
32872        D: fidl::encoding::ResourceDialect,
32873        T0: fidl::encoding::Encode<u8, D>,
32874        T1: fidl::encoding::Encode<u8, D>,
32875        T2: fidl::encoding::Encode<u8, D>,
32876    > fidl::encoding::Encode<ThreeByte, D> for (T0, T1, T2)
32877    {
32878        #[inline]
32879        unsafe fn encode(
32880            self,
32881            encoder: &mut fidl::encoding::Encoder<'_, D>,
32882            offset: usize,
32883            depth: fidl::encoding::Depth,
32884        ) -> fidl::Result<()> {
32885            encoder.debug_check_bounds::<ThreeByte>(offset);
32886            // Zero out padding regions. There's no need to apply masks
32887            // because the unmasked parts will be overwritten by fields.
32888            // Write the fields.
32889            self.0.encode(encoder, offset + 0, depth)?;
32890            self.1.encode(encoder, offset + 1, depth)?;
32891            self.2.encode(encoder, offset + 2, depth)?;
32892            Ok(())
32893        }
32894    }
32895
32896    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByte {
32897        #[inline(always)]
32898        fn new_empty() -> Self {
32899            Self {
32900                elem1: fidl::new_empty!(u8, D),
32901                elem2: fidl::new_empty!(u8, D),
32902                elem3: fidl::new_empty!(u8, D),
32903            }
32904        }
32905
32906        #[inline]
32907        unsafe fn decode(
32908            &mut self,
32909            decoder: &mut fidl::encoding::Decoder<'_, D>,
32910            offset: usize,
32911            _depth: fidl::encoding::Depth,
32912        ) -> fidl::Result<()> {
32913            decoder.debug_check_bounds::<Self>(offset);
32914            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32915            // Verify that padding bytes are zero.
32916            // Copy from the buffer into the object.
32917            unsafe {
32918                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
32919            }
32920            Ok(())
32921        }
32922    }
32923
32924    impl fidl::encoding::ValueTypeMarker for ThreeByteInArray {
32925        type Borrowed<'a> = &'a Self;
32926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32927            value
32928        }
32929    }
32930
32931    unsafe impl fidl::encoding::TypeMarker for ThreeByteInArray {
32932        type Owned = Self;
32933
32934        #[inline(always)]
32935        fn inline_align(_context: fidl::encoding::Context) -> usize {
32936            1
32937        }
32938
32939        #[inline(always)]
32940        fn inline_size(_context: fidl::encoding::Context) -> usize {
32941            9
32942        }
32943        #[inline(always)]
32944        fn encode_is_copy() -> bool {
32945            true
32946        }
32947
32948        #[inline(always)]
32949        fn decode_is_copy() -> bool {
32950            true
32951        }
32952    }
32953
32954    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInArray, D>
32955        for &ThreeByteInArray
32956    {
32957        #[inline]
32958        unsafe fn encode(
32959            self,
32960            encoder: &mut fidl::encoding::Encoder<'_, D>,
32961            offset: usize,
32962            _depth: fidl::encoding::Depth,
32963        ) -> fidl::Result<()> {
32964            encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32965            unsafe {
32966                // Copy the object into the buffer.
32967                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32968                (buf_ptr as *mut ThreeByteInArray)
32969                    .write_unaligned((self as *const ThreeByteInArray).read());
32970                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
32971                // done second because the memcpy will write garbage to these bytes.
32972            }
32973            Ok(())
32974        }
32975    }
32976    unsafe impl<
32977        D: fidl::encoding::ResourceDialect,
32978        T0: fidl::encoding::Encode<fidl::encoding::Array<ThreeByte, 3>, D>,
32979    > fidl::encoding::Encode<ThreeByteInArray, D> for (T0,)
32980    {
32981        #[inline]
32982        unsafe fn encode(
32983            self,
32984            encoder: &mut fidl::encoding::Encoder<'_, D>,
32985            offset: usize,
32986            depth: fidl::encoding::Depth,
32987        ) -> fidl::Result<()> {
32988            encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32989            // Zero out padding regions. There's no need to apply masks
32990            // because the unmasked parts will be overwritten by fields.
32991            // Write the fields.
32992            self.0.encode(encoder, offset + 0, depth)?;
32993            Ok(())
32994        }
32995    }
32996
32997    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInArray {
32998        #[inline(always)]
32999        fn new_empty() -> Self {
33000            Self { elems: fidl::new_empty!(fidl::encoding::Array<ThreeByte, 3>, D) }
33001        }
33002
33003        #[inline]
33004        unsafe fn decode(
33005            &mut self,
33006            decoder: &mut fidl::encoding::Decoder<'_, D>,
33007            offset: usize,
33008            _depth: fidl::encoding::Depth,
33009        ) -> fidl::Result<()> {
33010            decoder.debug_check_bounds::<Self>(offset);
33011            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33012            // Verify that padding bytes are zero.
33013            // Copy from the buffer into the object.
33014            unsafe {
33015                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
33016            }
33017            Ok(())
33018        }
33019    }
33020
33021    impl fidl::encoding::ValueTypeMarker for ThreeByteInStruct {
33022        type Borrowed<'a> = &'a Self;
33023        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33024            value
33025        }
33026    }
33027
33028    unsafe impl fidl::encoding::TypeMarker for ThreeByteInStruct {
33029        type Owned = Self;
33030
33031        #[inline(always)]
33032        fn inline_align(_context: fidl::encoding::Context) -> usize {
33033            1
33034        }
33035
33036        #[inline(always)]
33037        fn inline_size(_context: fidl::encoding::Context) -> usize {
33038            9
33039        }
33040        #[inline(always)]
33041        fn encode_is_copy() -> bool {
33042            true
33043        }
33044
33045        #[inline(always)]
33046        fn decode_is_copy() -> bool {
33047            true
33048        }
33049    }
33050
33051    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInStruct, D>
33052        for &ThreeByteInStruct
33053    {
33054        #[inline]
33055        unsafe fn encode(
33056            self,
33057            encoder: &mut fidl::encoding::Encoder<'_, D>,
33058            offset: usize,
33059            _depth: fidl::encoding::Depth,
33060        ) -> fidl::Result<()> {
33061            encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
33062            unsafe {
33063                // Copy the object into the buffer.
33064                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33065                (buf_ptr as *mut ThreeByteInStruct)
33066                    .write_unaligned((self as *const ThreeByteInStruct).read());
33067                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33068                // done second because the memcpy will write garbage to these bytes.
33069            }
33070            Ok(())
33071        }
33072    }
33073    unsafe impl<
33074        D: fidl::encoding::ResourceDialect,
33075        T0: fidl::encoding::Encode<ThreeByte, D>,
33076        T1: fidl::encoding::Encode<ThreeByte, D>,
33077        T2: fidl::encoding::Encode<ThreeByte, D>,
33078    > fidl::encoding::Encode<ThreeByteInStruct, D> for (T0, T1, T2)
33079    {
33080        #[inline]
33081        unsafe fn encode(
33082            self,
33083            encoder: &mut fidl::encoding::Encoder<'_, D>,
33084            offset: usize,
33085            depth: fidl::encoding::Depth,
33086        ) -> fidl::Result<()> {
33087            encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
33088            // Zero out padding regions. There's no need to apply masks
33089            // because the unmasked parts will be overwritten by fields.
33090            // Write the fields.
33091            self.0.encode(encoder, offset + 0, depth)?;
33092            self.1.encode(encoder, offset + 3, depth)?;
33093            self.2.encode(encoder, offset + 6, depth)?;
33094            Ok(())
33095        }
33096    }
33097
33098    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInStruct {
33099        #[inline(always)]
33100        fn new_empty() -> Self {
33101            Self {
33102                elem1: fidl::new_empty!(ThreeByte, D),
33103                elem2: fidl::new_empty!(ThreeByte, D),
33104                elem3: fidl::new_empty!(ThreeByte, D),
33105            }
33106        }
33107
33108        #[inline]
33109        unsafe fn decode(
33110            &mut self,
33111            decoder: &mut fidl::encoding::Decoder<'_, D>,
33112            offset: usize,
33113            _depth: fidl::encoding::Depth,
33114        ) -> fidl::Result<()> {
33115            decoder.debug_check_bounds::<Self>(offset);
33116            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33117            // Verify that padding bytes are zero.
33118            // Copy from the buffer into the object.
33119            unsafe {
33120                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
33121            }
33122            Ok(())
33123        }
33124    }
33125
33126    impl fidl::encoding::ValueTypeMarker for ThreeByteInVector {
33127        type Borrowed<'a> = &'a Self;
33128        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33129            value
33130        }
33131    }
33132
33133    unsafe impl fidl::encoding::TypeMarker for ThreeByteInVector {
33134        type Owned = Self;
33135
33136        #[inline(always)]
33137        fn inline_align(_context: fidl::encoding::Context) -> usize {
33138            8
33139        }
33140
33141        #[inline(always)]
33142        fn inline_size(_context: fidl::encoding::Context) -> usize {
33143            16
33144        }
33145    }
33146
33147    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInVector, D>
33148        for &ThreeByteInVector
33149    {
33150        #[inline]
33151        unsafe fn encode(
33152            self,
33153            encoder: &mut fidl::encoding::Encoder<'_, D>,
33154            offset: usize,
33155            _depth: fidl::encoding::Depth,
33156        ) -> fidl::Result<()> {
33157            encoder.debug_check_bounds::<ThreeByteInVector>(offset);
33158            // Delegate to tuple encoding.
33159            fidl::encoding::Encode::<ThreeByteInVector, D>::encode(
33160                (
33161                    <fidl::encoding::UnboundedVector<ThreeByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
33162                ),
33163                encoder, offset, _depth
33164            )
33165        }
33166    }
33167    unsafe impl<
33168        D: fidl::encoding::ResourceDialect,
33169        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ThreeByte>, D>,
33170    > fidl::encoding::Encode<ThreeByteInVector, D> for (T0,)
33171    {
33172        #[inline]
33173        unsafe fn encode(
33174            self,
33175            encoder: &mut fidl::encoding::Encoder<'_, D>,
33176            offset: usize,
33177            depth: fidl::encoding::Depth,
33178        ) -> fidl::Result<()> {
33179            encoder.debug_check_bounds::<ThreeByteInVector>(offset);
33180            // Zero out padding regions. There's no need to apply masks
33181            // because the unmasked parts will be overwritten by fields.
33182            // Write the fields.
33183            self.0.encode(encoder, offset + 0, depth)?;
33184            Ok(())
33185        }
33186    }
33187
33188    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInVector {
33189        #[inline(always)]
33190        fn new_empty() -> Self {
33191            Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<ThreeByte>, D) }
33192        }
33193
33194        #[inline]
33195        unsafe fn decode(
33196            &mut self,
33197            decoder: &mut fidl::encoding::Decoder<'_, D>,
33198            offset: usize,
33199            _depth: fidl::encoding::Depth,
33200        ) -> fidl::Result<()> {
33201            decoder.debug_check_bounds::<Self>(offset);
33202            // Verify that padding bytes are zero.
33203            fidl::decode!(
33204                fidl::encoding::UnboundedVector<ThreeByte>,
33205                D,
33206                &mut self.elems,
33207                decoder,
33208                offset + 0,
33209                _depth
33210            )?;
33211            Ok(())
33212        }
33213    }
33214
33215    impl fidl::encoding::ValueTypeMarker for TransactionHeader {
33216        type Borrowed<'a> = &'a Self;
33217        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33218            value
33219        }
33220    }
33221
33222    unsafe impl fidl::encoding::TypeMarker for TransactionHeader {
33223        type Owned = Self;
33224
33225        #[inline(always)]
33226        fn inline_align(_context: fidl::encoding::Context) -> usize {
33227            8
33228        }
33229
33230        #[inline(always)]
33231        fn inline_size(_context: fidl::encoding::Context) -> usize {
33232            16
33233        }
33234        #[inline(always)]
33235        fn encode_is_copy() -> bool {
33236            true
33237        }
33238
33239        #[inline(always)]
33240        fn decode_is_copy() -> bool {
33241            true
33242        }
33243    }
33244
33245    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TransactionHeader, D>
33246        for &TransactionHeader
33247    {
33248        #[inline]
33249        unsafe fn encode(
33250            self,
33251            encoder: &mut fidl::encoding::Encoder<'_, D>,
33252            offset: usize,
33253            _depth: fidl::encoding::Depth,
33254        ) -> fidl::Result<()> {
33255            encoder.debug_check_bounds::<TransactionHeader>(offset);
33256            unsafe {
33257                // Copy the object into the buffer.
33258                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33259                (buf_ptr as *mut TransactionHeader)
33260                    .write_unaligned((self as *const TransactionHeader).read());
33261                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33262                // done second because the memcpy will write garbage to these bytes.
33263            }
33264            Ok(())
33265        }
33266    }
33267    unsafe impl<
33268        D: fidl::encoding::ResourceDialect,
33269        T0: fidl::encoding::Encode<u32, D>,
33270        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
33271        T2: fidl::encoding::Encode<u8, D>,
33272        T3: fidl::encoding::Encode<u64, D>,
33273    > fidl::encoding::Encode<TransactionHeader, D> for (T0, T1, T2, T3)
33274    {
33275        #[inline]
33276        unsafe fn encode(
33277            self,
33278            encoder: &mut fidl::encoding::Encoder<'_, D>,
33279            offset: usize,
33280            depth: fidl::encoding::Depth,
33281        ) -> fidl::Result<()> {
33282            encoder.debug_check_bounds::<TransactionHeader>(offset);
33283            // Zero out padding regions. There's no need to apply masks
33284            // because the unmasked parts will be overwritten by fields.
33285            // Write the fields.
33286            self.0.encode(encoder, offset + 0, depth)?;
33287            self.1.encode(encoder, offset + 4, depth)?;
33288            self.2.encode(encoder, offset + 7, depth)?;
33289            self.3.encode(encoder, offset + 8, depth)?;
33290            Ok(())
33291        }
33292    }
33293
33294    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TransactionHeader {
33295        #[inline(always)]
33296        fn new_empty() -> Self {
33297            Self {
33298                tx_id: fidl::new_empty!(u32, D),
33299                flags: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
33300                magic_number: fidl::new_empty!(u8, D),
33301                ordinal: fidl::new_empty!(u64, D),
33302            }
33303        }
33304
33305        #[inline]
33306        unsafe fn decode(
33307            &mut self,
33308            decoder: &mut fidl::encoding::Decoder<'_, D>,
33309            offset: usize,
33310            _depth: fidl::encoding::Depth,
33311        ) -> fidl::Result<()> {
33312            decoder.debug_check_bounds::<Self>(offset);
33313            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33314            // Verify that padding bytes are zero.
33315            // Copy from the buffer into the object.
33316            unsafe {
33317                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
33318            }
33319            Ok(())
33320        }
33321    }
33322
33323    impl fidl::encoding::ValueTypeMarker for TransformerEmptyStruct {
33324        type Borrowed<'a> = &'a Self;
33325        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33326            value
33327        }
33328    }
33329
33330    unsafe impl fidl::encoding::TypeMarker for TransformerEmptyStruct {
33331        type Owned = Self;
33332
33333        #[inline(always)]
33334        fn inline_align(_context: fidl::encoding::Context) -> usize {
33335            1
33336        }
33337
33338        #[inline(always)]
33339        fn inline_size(_context: fidl::encoding::Context) -> usize {
33340            1
33341        }
33342    }
33343
33344    unsafe impl<D: fidl::encoding::ResourceDialect>
33345        fidl::encoding::Encode<TransformerEmptyStruct, D> for &TransformerEmptyStruct
33346    {
33347        #[inline]
33348        unsafe fn encode(
33349            self,
33350            encoder: &mut fidl::encoding::Encoder<'_, D>,
33351            offset: usize,
33352            _depth: fidl::encoding::Depth,
33353        ) -> fidl::Result<()> {
33354            encoder.debug_check_bounds::<TransformerEmptyStruct>(offset);
33355            encoder.write_num(0u8, offset);
33356            Ok(())
33357        }
33358    }
33359
33360    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33361        for TransformerEmptyStruct
33362    {
33363        #[inline(always)]
33364        fn new_empty() -> Self {
33365            Self
33366        }
33367
33368        #[inline]
33369        unsafe fn decode(
33370            &mut self,
33371            decoder: &mut fidl::encoding::Decoder<'_, D>,
33372            offset: usize,
33373            _depth: fidl::encoding::Depth,
33374        ) -> fidl::Result<()> {
33375            decoder.debug_check_bounds::<Self>(offset);
33376            match decoder.read_num::<u8>(offset) {
33377                0 => Ok(()),
33378                _ => Err(fidl::Error::Invalid),
33379            }
33380        }
33381    }
33382
33383    impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStruct {
33384        type Borrowed<'a> = &'a Self;
33385        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33386            value
33387        }
33388    }
33389
33390    unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStruct {
33391        type Owned = Self;
33392
33393        #[inline(always)]
33394        fn inline_align(_context: fidl::encoding::Context) -> usize {
33395            1
33396        }
33397
33398        #[inline(always)]
33399        fn inline_size(_context: fidl::encoding::Context) -> usize {
33400            2
33401        }
33402    }
33403
33404    unsafe impl<D: fidl::encoding::ResourceDialect>
33405        fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for &TwoEmptyStructsInStruct
33406    {
33407        #[inline]
33408        unsafe fn encode(
33409            self,
33410            encoder: &mut fidl::encoding::Encoder<'_, D>,
33411            offset: usize,
33412            _depth: fidl::encoding::Depth,
33413        ) -> fidl::Result<()> {
33414            encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
33415            // Delegate to tuple encoding.
33416            fidl::encoding::Encode::<TwoEmptyStructsInStruct, D>::encode(
33417                (
33418                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
33419                    <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
33420                ),
33421                encoder,
33422                offset,
33423                _depth,
33424            )
33425        }
33426    }
33427    unsafe impl<
33428        D: fidl::encoding::ResourceDialect,
33429        T0: fidl::encoding::Encode<EmptyStruct, D>,
33430        T1: fidl::encoding::Encode<EmptyStruct, D>,
33431    > fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for (T0, T1)
33432    {
33433        #[inline]
33434        unsafe fn encode(
33435            self,
33436            encoder: &mut fidl::encoding::Encoder<'_, D>,
33437            offset: usize,
33438            depth: fidl::encoding::Depth,
33439        ) -> fidl::Result<()> {
33440            encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
33441            // Zero out padding regions. There's no need to apply masks
33442            // because the unmasked parts will be overwritten by fields.
33443            // Write the fields.
33444            self.0.encode(encoder, offset + 0, depth)?;
33445            self.1.encode(encoder, offset + 1, depth)?;
33446            Ok(())
33447        }
33448    }
33449
33450    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33451        for TwoEmptyStructsInStruct
33452    {
33453        #[inline(always)]
33454        fn new_empty() -> Self {
33455            Self { a: fidl::new_empty!(EmptyStruct, D), b: fidl::new_empty!(EmptyStruct, D) }
33456        }
33457
33458        #[inline]
33459        unsafe fn decode(
33460            &mut self,
33461            decoder: &mut fidl::encoding::Decoder<'_, D>,
33462            offset: usize,
33463            _depth: fidl::encoding::Depth,
33464        ) -> fidl::Result<()> {
33465            decoder.debug_check_bounds::<Self>(offset);
33466            // Verify that padding bytes are zero.
33467            fidl::decode!(EmptyStruct, D, &mut self.a, decoder, offset + 0, _depth)?;
33468            fidl::decode!(EmptyStruct, D, &mut self.b, decoder, offset + 1, _depth)?;
33469            Ok(())
33470        }
33471    }
33472
33473    impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStructInVectorInStruct {
33474        type Borrowed<'a> = &'a Self;
33475        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33476            value
33477        }
33478    }
33479
33480    unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStructInVectorInStruct {
33481        type Owned = Self;
33482
33483        #[inline(always)]
33484        fn inline_align(_context: fidl::encoding::Context) -> usize {
33485            8
33486        }
33487
33488        #[inline(always)]
33489        fn inline_size(_context: fidl::encoding::Context) -> usize {
33490            16
33491        }
33492    }
33493
33494    unsafe impl<D: fidl::encoding::ResourceDialect>
33495        fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D>
33496        for &TwoEmptyStructsInStructInVectorInStruct
33497    {
33498        #[inline]
33499        unsafe fn encode(
33500            self,
33501            encoder: &mut fidl::encoding::Encoder<'_, D>,
33502            offset: usize,
33503            _depth: fidl::encoding::Depth,
33504        ) -> fidl::Result<()> {
33505            encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
33506            // Delegate to tuple encoding.
33507            fidl::encoding::Encode::<TwoEmptyStructsInStructInVectorInStruct, D>::encode(
33508                (
33509                    <fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
33510                ),
33511                encoder, offset, _depth
33512            )
33513        }
33514    }
33515    unsafe impl<
33516        D: fidl::encoding::ResourceDialect,
33517        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D>,
33518    > fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D> for (T0,)
33519    {
33520        #[inline]
33521        unsafe fn encode(
33522            self,
33523            encoder: &mut fidl::encoding::Encoder<'_, D>,
33524            offset: usize,
33525            depth: fidl::encoding::Depth,
33526        ) -> fidl::Result<()> {
33527            encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
33528            // Zero out padding regions. There's no need to apply masks
33529            // because the unmasked parts will be overwritten by fields.
33530            // Write the fields.
33531            self.0.encode(encoder, offset + 0, depth)?;
33532            Ok(())
33533        }
33534    }
33535
33536    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33537        for TwoEmptyStructsInStructInVectorInStruct
33538    {
33539        #[inline(always)]
33540        fn new_empty() -> Self {
33541            Self {
33542                v: fidl::new_empty!(fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D),
33543            }
33544        }
33545
33546        #[inline]
33547        unsafe fn decode(
33548            &mut self,
33549            decoder: &mut fidl::encoding::Decoder<'_, D>,
33550            offset: usize,
33551            _depth: fidl::encoding::Depth,
33552        ) -> fidl::Result<()> {
33553            decoder.debug_check_bounds::<Self>(offset);
33554            // Verify that padding bytes are zero.
33555            fidl::decode!(
33556                fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>,
33557                D,
33558                &mut self.v,
33559                decoder,
33560                offset + 0,
33561                _depth
33562            )?;
33563            Ok(())
33564        }
33565    }
33566
33567    impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerBool {
33568        type Borrowed<'a> = &'a Self;
33569        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33570            value
33571        }
33572    }
33573
33574    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerBool {
33575        type Owned = Self;
33576
33577        #[inline(always)]
33578        fn inline_align(_context: fidl::encoding::Context) -> usize {
33579            8
33580        }
33581
33582        #[inline(always)]
33583        fn inline_size(_context: fidl::encoding::Context) -> usize {
33584            16
33585        }
33586    }
33587
33588    unsafe impl<D: fidl::encoding::ResourceDialect>
33589        fidl::encoding::Encode<TwoLayerStructInnerBool, D> for &TwoLayerStructInnerBool
33590    {
33591        #[inline]
33592        unsafe fn encode(
33593            self,
33594            encoder: &mut fidl::encoding::Encoder<'_, D>,
33595            offset: usize,
33596            _depth: fidl::encoding::Depth,
33597        ) -> fidl::Result<()> {
33598            encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33599            // Delegate to tuple encoding.
33600            fidl::encoding::Encode::<TwoLayerStructInnerBool, D>::encode(
33601                (
33602                    <OneLayerStructWithBool as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
33603                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
33604                ),
33605                encoder,
33606                offset,
33607                _depth,
33608            )
33609        }
33610    }
33611    unsafe impl<
33612        D: fidl::encoding::ResourceDialect,
33613        T0: fidl::encoding::Encode<OneLayerStructWithBool, D>,
33614        T1: fidl::encoding::Encode<u64, D>,
33615    > fidl::encoding::Encode<TwoLayerStructInnerBool, D> for (T0, T1)
33616    {
33617        #[inline]
33618        unsafe fn encode(
33619            self,
33620            encoder: &mut fidl::encoding::Encoder<'_, D>,
33621            offset: usize,
33622            depth: fidl::encoding::Depth,
33623        ) -> fidl::Result<()> {
33624            encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33625            // Zero out padding regions. There's no need to apply masks
33626            // because the unmasked parts will be overwritten by fields.
33627            // Write the fields.
33628            self.0.encode(encoder, offset + 0, depth)?;
33629            self.1.encode(encoder, offset + 8, depth)?;
33630            Ok(())
33631        }
33632    }
33633
33634    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33635        for TwoLayerStructInnerBool
33636    {
33637        #[inline(always)]
33638        fn new_empty() -> Self {
33639            Self { s: fidl::new_empty!(OneLayerStructWithBool, D), a: fidl::new_empty!(u64, D) }
33640        }
33641
33642        #[inline]
33643        unsafe fn decode(
33644            &mut self,
33645            decoder: &mut fidl::encoding::Decoder<'_, D>,
33646            offset: usize,
33647            _depth: fidl::encoding::Depth,
33648        ) -> fidl::Result<()> {
33649            decoder.debug_check_bounds::<Self>(offset);
33650            // Verify that padding bytes are zero.
33651            fidl::decode!(OneLayerStructWithBool, D, &mut self.s, decoder, offset + 0, _depth)?;
33652            fidl::decode!(u64, D, &mut self.a, decoder, offset + 8, _depth)?;
33653            Ok(())
33654        }
33655    }
33656
33657    impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign4 {
33658        type Borrowed<'a> = &'a Self;
33659        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33660            value
33661        }
33662    }
33663
33664    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign4 {
33665        type Owned = Self;
33666
33667        #[inline(always)]
33668        fn inline_align(_context: fidl::encoding::Context) -> usize {
33669            4
33670        }
33671
33672        #[inline(always)]
33673        fn inline_size(_context: fidl::encoding::Context) -> usize {
33674            12
33675        }
33676    }
33677
33678    unsafe impl<D: fidl::encoding::ResourceDialect>
33679        fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D>
33680        for &TwoLayerStructInnerPaddingAlign4
33681    {
33682        #[inline]
33683        unsafe fn encode(
33684            self,
33685            encoder: &mut fidl::encoding::Encoder<'_, D>,
33686            offset: usize,
33687            _depth: fidl::encoding::Depth,
33688        ) -> fidl::Result<()> {
33689            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33690            unsafe {
33691                // Copy the object into the buffer.
33692                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33693                (buf_ptr as *mut TwoLayerStructInnerPaddingAlign4)
33694                    .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign4).read());
33695                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33696                // done second because the memcpy will write garbage to these bytes.
33697                let padding_ptr = buf_ptr.offset(0) as *mut u32;
33698                let padding_mask = 0xff000000u32;
33699                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33700            }
33701            Ok(())
33702        }
33703    }
33704    unsafe impl<
33705        D: fidl::encoding::ResourceDialect,
33706        T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>,
33707        T1: fidl::encoding::Encode<u32, D>,
33708    > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D> for (T0, T1)
33709    {
33710        #[inline]
33711        unsafe fn encode(
33712            self,
33713            encoder: &mut fidl::encoding::Encoder<'_, D>,
33714            offset: usize,
33715            depth: fidl::encoding::Depth,
33716        ) -> fidl::Result<()> {
33717            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33718            // Zero out padding regions. There's no need to apply masks
33719            // because the unmasked parts will be overwritten by fields.
33720            // Write the fields.
33721            self.0.encode(encoder, offset + 0, depth)?;
33722            self.1.encode(encoder, offset + 8, depth)?;
33723            Ok(())
33724        }
33725    }
33726
33727    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33728        for TwoLayerStructInnerPaddingAlign4
33729    {
33730        #[inline(always)]
33731        fn new_empty() -> Self {
33732            Self {
33733                s: fidl::new_empty!(OneLayerStructWithPaddingAlign4, D),
33734                a: fidl::new_empty!(u32, D),
33735            }
33736        }
33737
33738        #[inline]
33739        unsafe fn decode(
33740            &mut self,
33741            decoder: &mut fidl::encoding::Decoder<'_, D>,
33742            offset: usize,
33743            _depth: fidl::encoding::Depth,
33744        ) -> fidl::Result<()> {
33745            decoder.debug_check_bounds::<Self>(offset);
33746            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33747            // Verify that padding bytes are zero.
33748            let ptr = unsafe { buf_ptr.offset(0) };
33749            let padval = unsafe { (ptr as *const u32).read_unaligned() };
33750            let mask = 0xff000000u32;
33751            let maskedval = padval & mask;
33752            if maskedval != 0 {
33753                return Err(fidl::Error::NonZeroPadding {
33754                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33755                });
33756            }
33757            // Copy from the buffer into the object.
33758            unsafe {
33759                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33760            }
33761            Ok(())
33762        }
33763    }
33764
33765    impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign8 {
33766        type Borrowed<'a> = &'a Self;
33767        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33768            value
33769        }
33770    }
33771
33772    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign8 {
33773        type Owned = Self;
33774
33775        #[inline(always)]
33776        fn inline_align(_context: fidl::encoding::Context) -> usize {
33777            8
33778        }
33779
33780        #[inline(always)]
33781        fn inline_size(_context: fidl::encoding::Context) -> usize {
33782            24
33783        }
33784    }
33785
33786    unsafe impl<D: fidl::encoding::ResourceDialect>
33787        fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D>
33788        for &TwoLayerStructInnerPaddingAlign8
33789    {
33790        #[inline]
33791        unsafe fn encode(
33792            self,
33793            encoder: &mut fidl::encoding::Encoder<'_, D>,
33794            offset: usize,
33795            _depth: fidl::encoding::Depth,
33796        ) -> fidl::Result<()> {
33797            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33798            unsafe {
33799                // Copy the object into the buffer.
33800                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33801                (buf_ptr as *mut TwoLayerStructInnerPaddingAlign8)
33802                    .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign8).read());
33803                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33804                // done second because the memcpy will write garbage to these bytes.
33805                let padding_ptr = buf_ptr.offset(0) as *mut u64;
33806                let padding_mask = 0xffff000000000000u64;
33807                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33808            }
33809            Ok(())
33810        }
33811    }
33812    unsafe impl<
33813        D: fidl::encoding::ResourceDialect,
33814        T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>,
33815        T1: fidl::encoding::Encode<u64, D>,
33816    > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D> for (T0, T1)
33817    {
33818        #[inline]
33819        unsafe fn encode(
33820            self,
33821            encoder: &mut fidl::encoding::Encoder<'_, D>,
33822            offset: usize,
33823            depth: fidl::encoding::Depth,
33824        ) -> fidl::Result<()> {
33825            encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33826            // Zero out padding regions. There's no need to apply masks
33827            // because the unmasked parts will be overwritten by fields.
33828            // Write the fields.
33829            self.0.encode(encoder, offset + 0, depth)?;
33830            self.1.encode(encoder, offset + 16, depth)?;
33831            Ok(())
33832        }
33833    }
33834
33835    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33836        for TwoLayerStructInnerPaddingAlign8
33837    {
33838        #[inline(always)]
33839        fn new_empty() -> Self {
33840            Self {
33841                s: fidl::new_empty!(OneLayerStructWithPaddingAlign8, D),
33842                a: fidl::new_empty!(u64, D),
33843            }
33844        }
33845
33846        #[inline]
33847        unsafe fn decode(
33848            &mut self,
33849            decoder: &mut fidl::encoding::Decoder<'_, D>,
33850            offset: usize,
33851            _depth: fidl::encoding::Depth,
33852        ) -> fidl::Result<()> {
33853            decoder.debug_check_bounds::<Self>(offset);
33854            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33855            // Verify that padding bytes are zero.
33856            let ptr = unsafe { buf_ptr.offset(0) };
33857            let padval = unsafe { (ptr as *const u64).read_unaligned() };
33858            let mask = 0xffff000000000000u64;
33859            let maskedval = padval & mask;
33860            if maskedval != 0 {
33861                return Err(fidl::Error::NonZeroPadding {
33862                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33863                });
33864            }
33865            // Copy from the buffer into the object.
33866            unsafe {
33867                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
33868            }
33869            Ok(())
33870        }
33871    }
33872
33873    impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign4 {
33874        type Borrowed<'a> = &'a Self;
33875        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33876            value
33877        }
33878    }
33879
33880    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign4 {
33881        type Owned = Self;
33882
33883        #[inline(always)]
33884        fn inline_align(_context: fidl::encoding::Context) -> usize {
33885            4
33886        }
33887
33888        #[inline(always)]
33889        fn inline_size(_context: fidl::encoding::Context) -> usize {
33890            12
33891        }
33892        #[inline(always)]
33893        fn encode_is_copy() -> bool {
33894            true
33895        }
33896
33897        #[inline(always)]
33898        fn decode_is_copy() -> bool {
33899            true
33900        }
33901    }
33902
33903    unsafe impl<D: fidl::encoding::ResourceDialect>
33904        fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D>
33905        for &TwoLayerStructNoPaddingAlign4
33906    {
33907        #[inline]
33908        unsafe fn encode(
33909            self,
33910            encoder: &mut fidl::encoding::Encoder<'_, D>,
33911            offset: usize,
33912            _depth: fidl::encoding::Depth,
33913        ) -> fidl::Result<()> {
33914            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33915            unsafe {
33916                // Copy the object into the buffer.
33917                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33918                (buf_ptr as *mut TwoLayerStructNoPaddingAlign4)
33919                    .write_unaligned((self as *const TwoLayerStructNoPaddingAlign4).read());
33920                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
33921                // done second because the memcpy will write garbage to these bytes.
33922            }
33923            Ok(())
33924        }
33925    }
33926    unsafe impl<
33927        D: fidl::encoding::ResourceDialect,
33928        T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>,
33929        T1: fidl::encoding::Encode<u32, D>,
33930    > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D> for (T0, T1)
33931    {
33932        #[inline]
33933        unsafe fn encode(
33934            self,
33935            encoder: &mut fidl::encoding::Encoder<'_, D>,
33936            offset: usize,
33937            depth: fidl::encoding::Depth,
33938        ) -> fidl::Result<()> {
33939            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33940            // Zero out padding regions. There's no need to apply masks
33941            // because the unmasked parts will be overwritten by fields.
33942            // Write the fields.
33943            self.0.encode(encoder, offset + 0, depth)?;
33944            self.1.encode(encoder, offset + 8, depth)?;
33945            Ok(())
33946        }
33947    }
33948
33949    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33950        for TwoLayerStructNoPaddingAlign4
33951    {
33952        #[inline(always)]
33953        fn new_empty() -> Self {
33954            Self {
33955                s: fidl::new_empty!(OneLayerStructNoPaddingAlign4, D),
33956                a: fidl::new_empty!(u32, D),
33957            }
33958        }
33959
33960        #[inline]
33961        unsafe fn decode(
33962            &mut self,
33963            decoder: &mut fidl::encoding::Decoder<'_, D>,
33964            offset: usize,
33965            _depth: fidl::encoding::Depth,
33966        ) -> fidl::Result<()> {
33967            decoder.debug_check_bounds::<Self>(offset);
33968            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33969            // Verify that padding bytes are zero.
33970            // Copy from the buffer into the object.
33971            unsafe {
33972                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33973            }
33974            Ok(())
33975        }
33976    }
33977
33978    impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign8 {
33979        type Borrowed<'a> = &'a Self;
33980        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33981            value
33982        }
33983    }
33984
33985    unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign8 {
33986        type Owned = Self;
33987
33988        #[inline(always)]
33989        fn inline_align(_context: fidl::encoding::Context) -> usize {
33990            8
33991        }
33992
33993        #[inline(always)]
33994        fn inline_size(_context: fidl::encoding::Context) -> usize {
33995            24
33996        }
33997        #[inline(always)]
33998        fn encode_is_copy() -> bool {
33999            true
34000        }
34001
34002        #[inline(always)]
34003        fn decode_is_copy() -> bool {
34004            true
34005        }
34006    }
34007
34008    unsafe impl<D: fidl::encoding::ResourceDialect>
34009        fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D>
34010        for &TwoLayerStructNoPaddingAlign8
34011    {
34012        #[inline]
34013        unsafe fn encode(
34014            self,
34015            encoder: &mut fidl::encoding::Encoder<'_, D>,
34016            offset: usize,
34017            _depth: fidl::encoding::Depth,
34018        ) -> fidl::Result<()> {
34019            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
34020            unsafe {
34021                // Copy the object into the buffer.
34022                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34023                (buf_ptr as *mut TwoLayerStructNoPaddingAlign8)
34024                    .write_unaligned((self as *const TwoLayerStructNoPaddingAlign8).read());
34025                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34026                // done second because the memcpy will write garbage to these bytes.
34027            }
34028            Ok(())
34029        }
34030    }
34031    unsafe impl<
34032        D: fidl::encoding::ResourceDialect,
34033        T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>,
34034        T1: fidl::encoding::Encode<u64, D>,
34035    > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D> for (T0, T1)
34036    {
34037        #[inline]
34038        unsafe fn encode(
34039            self,
34040            encoder: &mut fidl::encoding::Encoder<'_, D>,
34041            offset: usize,
34042            depth: fidl::encoding::Depth,
34043        ) -> fidl::Result<()> {
34044            encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
34045            // Zero out padding regions. There's no need to apply masks
34046            // because the unmasked parts will be overwritten by fields.
34047            // Write the fields.
34048            self.0.encode(encoder, offset + 0, depth)?;
34049            self.1.encode(encoder, offset + 16, depth)?;
34050            Ok(())
34051        }
34052    }
34053
34054    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34055        for TwoLayerStructNoPaddingAlign8
34056    {
34057        #[inline(always)]
34058        fn new_empty() -> Self {
34059            Self {
34060                s: fidl::new_empty!(OneLayerStructNoPaddingAlign8, D),
34061                a: fidl::new_empty!(u64, D),
34062            }
34063        }
34064
34065        #[inline]
34066        unsafe fn decode(
34067            &mut self,
34068            decoder: &mut fidl::encoding::Decoder<'_, D>,
34069            offset: usize,
34070            _depth: fidl::encoding::Depth,
34071        ) -> fidl::Result<()> {
34072            decoder.debug_check_bounds::<Self>(offset);
34073            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34074            // Verify that padding bytes are zero.
34075            // Copy from the buffer into the object.
34076            unsafe {
34077                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
34078            }
34079            Ok(())
34080        }
34081    }
34082
34083    impl fidl::encoding::ValueTypeMarker for Uint16Struct {
34084        type Borrowed<'a> = &'a Self;
34085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34086            value
34087        }
34088    }
34089
34090    unsafe impl fidl::encoding::TypeMarker for Uint16Struct {
34091        type Owned = Self;
34092
34093        #[inline(always)]
34094        fn inline_align(_context: fidl::encoding::Context) -> usize {
34095            2
34096        }
34097
34098        #[inline(always)]
34099        fn inline_size(_context: fidl::encoding::Context) -> usize {
34100            2
34101        }
34102        #[inline(always)]
34103        fn encode_is_copy() -> bool {
34104            true
34105        }
34106
34107        #[inline(always)]
34108        fn decode_is_copy() -> bool {
34109            true
34110        }
34111    }
34112
34113    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint16Struct, D>
34114        for &Uint16Struct
34115    {
34116        #[inline]
34117        unsafe fn encode(
34118            self,
34119            encoder: &mut fidl::encoding::Encoder<'_, D>,
34120            offset: usize,
34121            _depth: fidl::encoding::Depth,
34122        ) -> fidl::Result<()> {
34123            encoder.debug_check_bounds::<Uint16Struct>(offset);
34124            unsafe {
34125                // Copy the object into the buffer.
34126                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34127                (buf_ptr as *mut Uint16Struct)
34128                    .write_unaligned((self as *const Uint16Struct).read());
34129                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34130                // done second because the memcpy will write garbage to these bytes.
34131            }
34132            Ok(())
34133        }
34134    }
34135    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
34136        fidl::encoding::Encode<Uint16Struct, D> for (T0,)
34137    {
34138        #[inline]
34139        unsafe fn encode(
34140            self,
34141            encoder: &mut fidl::encoding::Encoder<'_, D>,
34142            offset: usize,
34143            depth: fidl::encoding::Depth,
34144        ) -> fidl::Result<()> {
34145            encoder.debug_check_bounds::<Uint16Struct>(offset);
34146            // Zero out padding regions. There's no need to apply masks
34147            // because the unmasked parts will be overwritten by fields.
34148            // Write the fields.
34149            self.0.encode(encoder, offset + 0, depth)?;
34150            Ok(())
34151        }
34152    }
34153
34154    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint16Struct {
34155        #[inline(always)]
34156        fn new_empty() -> Self {
34157            Self { val: fidl::new_empty!(u16, D) }
34158        }
34159
34160        #[inline]
34161        unsafe fn decode(
34162            &mut self,
34163            decoder: &mut fidl::encoding::Decoder<'_, D>,
34164            offset: usize,
34165            _depth: fidl::encoding::Depth,
34166        ) -> fidl::Result<()> {
34167            decoder.debug_check_bounds::<Self>(offset);
34168            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34169            // Verify that padding bytes are zero.
34170            // Copy from the buffer into the object.
34171            unsafe {
34172                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
34173            }
34174            Ok(())
34175        }
34176    }
34177
34178    impl fidl::encoding::ValueTypeMarker for Uint32Struct {
34179        type Borrowed<'a> = &'a Self;
34180        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34181            value
34182        }
34183    }
34184
34185    unsafe impl fidl::encoding::TypeMarker for Uint32Struct {
34186        type Owned = Self;
34187
34188        #[inline(always)]
34189        fn inline_align(_context: fidl::encoding::Context) -> usize {
34190            4
34191        }
34192
34193        #[inline(always)]
34194        fn inline_size(_context: fidl::encoding::Context) -> usize {
34195            4
34196        }
34197        #[inline(always)]
34198        fn encode_is_copy() -> bool {
34199            true
34200        }
34201
34202        #[inline(always)]
34203        fn decode_is_copy() -> bool {
34204            true
34205        }
34206    }
34207
34208    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint32Struct, D>
34209        for &Uint32Struct
34210    {
34211        #[inline]
34212        unsafe fn encode(
34213            self,
34214            encoder: &mut fidl::encoding::Encoder<'_, D>,
34215            offset: usize,
34216            _depth: fidl::encoding::Depth,
34217        ) -> fidl::Result<()> {
34218            encoder.debug_check_bounds::<Uint32Struct>(offset);
34219            unsafe {
34220                // Copy the object into the buffer.
34221                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34222                (buf_ptr as *mut Uint32Struct)
34223                    .write_unaligned((self as *const Uint32Struct).read());
34224                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34225                // done second because the memcpy will write garbage to these bytes.
34226            }
34227            Ok(())
34228        }
34229    }
34230    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
34231        fidl::encoding::Encode<Uint32Struct, D> for (T0,)
34232    {
34233        #[inline]
34234        unsafe fn encode(
34235            self,
34236            encoder: &mut fidl::encoding::Encoder<'_, D>,
34237            offset: usize,
34238            depth: fidl::encoding::Depth,
34239        ) -> fidl::Result<()> {
34240            encoder.debug_check_bounds::<Uint32Struct>(offset);
34241            // Zero out padding regions. There's no need to apply masks
34242            // because the unmasked parts will be overwritten by fields.
34243            // Write the fields.
34244            self.0.encode(encoder, offset + 0, depth)?;
34245            Ok(())
34246        }
34247    }
34248
34249    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint32Struct {
34250        #[inline(always)]
34251        fn new_empty() -> Self {
34252            Self { val: fidl::new_empty!(u32, D) }
34253        }
34254
34255        #[inline]
34256        unsafe fn decode(
34257            &mut self,
34258            decoder: &mut fidl::encoding::Decoder<'_, D>,
34259            offset: usize,
34260            _depth: fidl::encoding::Depth,
34261        ) -> fidl::Result<()> {
34262            decoder.debug_check_bounds::<Self>(offset);
34263            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34264            // Verify that padding bytes are zero.
34265            // Copy from the buffer into the object.
34266            unsafe {
34267                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
34268            }
34269            Ok(())
34270        }
34271    }
34272
34273    impl fidl::encoding::ValueTypeMarker for Uint64Struct {
34274        type Borrowed<'a> = &'a Self;
34275        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34276            value
34277        }
34278    }
34279
34280    unsafe impl fidl::encoding::TypeMarker for Uint64Struct {
34281        type Owned = Self;
34282
34283        #[inline(always)]
34284        fn inline_align(_context: fidl::encoding::Context) -> usize {
34285            8
34286        }
34287
34288        #[inline(always)]
34289        fn inline_size(_context: fidl::encoding::Context) -> usize {
34290            8
34291        }
34292        #[inline(always)]
34293        fn encode_is_copy() -> bool {
34294            true
34295        }
34296
34297        #[inline(always)]
34298        fn decode_is_copy() -> bool {
34299            true
34300        }
34301    }
34302
34303    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint64Struct, D>
34304        for &Uint64Struct
34305    {
34306        #[inline]
34307        unsafe fn encode(
34308            self,
34309            encoder: &mut fidl::encoding::Encoder<'_, D>,
34310            offset: usize,
34311            _depth: fidl::encoding::Depth,
34312        ) -> fidl::Result<()> {
34313            encoder.debug_check_bounds::<Uint64Struct>(offset);
34314            unsafe {
34315                // Copy the object into the buffer.
34316                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34317                (buf_ptr as *mut Uint64Struct)
34318                    .write_unaligned((self as *const Uint64Struct).read());
34319                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34320                // done second because the memcpy will write garbage to these bytes.
34321            }
34322            Ok(())
34323        }
34324    }
34325    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
34326        fidl::encoding::Encode<Uint64Struct, D> for (T0,)
34327    {
34328        #[inline]
34329        unsafe fn encode(
34330            self,
34331            encoder: &mut fidl::encoding::Encoder<'_, D>,
34332            offset: usize,
34333            depth: fidl::encoding::Depth,
34334        ) -> fidl::Result<()> {
34335            encoder.debug_check_bounds::<Uint64Struct>(offset);
34336            // Zero out padding regions. There's no need to apply masks
34337            // because the unmasked parts will be overwritten by fields.
34338            // Write the fields.
34339            self.0.encode(encoder, offset + 0, depth)?;
34340            Ok(())
34341        }
34342    }
34343
34344    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint64Struct {
34345        #[inline(always)]
34346        fn new_empty() -> Self {
34347            Self { val: fidl::new_empty!(u64, D) }
34348        }
34349
34350        #[inline]
34351        unsafe fn decode(
34352            &mut self,
34353            decoder: &mut fidl::encoding::Decoder<'_, D>,
34354            offset: usize,
34355            _depth: fidl::encoding::Depth,
34356        ) -> fidl::Result<()> {
34357            decoder.debug_check_bounds::<Self>(offset);
34358            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34359            // Verify that padding bytes are zero.
34360            // Copy from the buffer into the object.
34361            unsafe {
34362                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
34363            }
34364            Ok(())
34365        }
34366    }
34367
34368    impl fidl::encoding::ValueTypeMarker for Uint64Uint32Uint16Uint8 {
34369        type Borrowed<'a> = &'a Self;
34370        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34371            value
34372        }
34373    }
34374
34375    unsafe impl fidl::encoding::TypeMarker for Uint64Uint32Uint16Uint8 {
34376        type Owned = Self;
34377
34378        #[inline(always)]
34379        fn inline_align(_context: fidl::encoding::Context) -> usize {
34380            8
34381        }
34382
34383        #[inline(always)]
34384        fn inline_size(_context: fidl::encoding::Context) -> usize {
34385            16
34386        }
34387    }
34388
34389    unsafe impl<D: fidl::encoding::ResourceDialect>
34390        fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for &Uint64Uint32Uint16Uint8
34391    {
34392        #[inline]
34393        unsafe fn encode(
34394            self,
34395            encoder: &mut fidl::encoding::Encoder<'_, D>,
34396            offset: usize,
34397            _depth: fidl::encoding::Depth,
34398        ) -> fidl::Result<()> {
34399            encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
34400            unsafe {
34401                // Copy the object into the buffer.
34402                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34403                (buf_ptr as *mut Uint64Uint32Uint16Uint8)
34404                    .write_unaligned((self as *const Uint64Uint32Uint16Uint8).read());
34405                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34406                // done second because the memcpy will write garbage to these bytes.
34407                let padding_ptr = buf_ptr.offset(8) as *mut u64;
34408                let padding_mask = 0xff00000000000000u64;
34409                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
34410            }
34411            Ok(())
34412        }
34413    }
34414    unsafe impl<
34415        D: fidl::encoding::ResourceDialect,
34416        T0: fidl::encoding::Encode<u64, D>,
34417        T1: fidl::encoding::Encode<u32, D>,
34418        T2: fidl::encoding::Encode<u16, D>,
34419        T3: fidl::encoding::Encode<u8, D>,
34420    > fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for (T0, T1, T2, T3)
34421    {
34422        #[inline]
34423        unsafe fn encode(
34424            self,
34425            encoder: &mut fidl::encoding::Encoder<'_, D>,
34426            offset: usize,
34427            depth: fidl::encoding::Depth,
34428        ) -> fidl::Result<()> {
34429            encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
34430            // Zero out padding regions. There's no need to apply masks
34431            // because the unmasked parts will be overwritten by fields.
34432            unsafe {
34433                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
34434                (ptr as *mut u64).write_unaligned(0);
34435            }
34436            // Write the fields.
34437            self.0.encode(encoder, offset + 0, depth)?;
34438            self.1.encode(encoder, offset + 8, depth)?;
34439            self.2.encode(encoder, offset + 12, depth)?;
34440            self.3.encode(encoder, offset + 14, depth)?;
34441            Ok(())
34442        }
34443    }
34444
34445    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34446        for Uint64Uint32Uint16Uint8
34447    {
34448        #[inline(always)]
34449        fn new_empty() -> Self {
34450            Self {
34451                f1: fidl::new_empty!(u64, D),
34452                f2: fidl::new_empty!(u32, D),
34453                f3: fidl::new_empty!(u16, D),
34454                f4: fidl::new_empty!(u8, D),
34455            }
34456        }
34457
34458        #[inline]
34459        unsafe fn decode(
34460            &mut self,
34461            decoder: &mut fidl::encoding::Decoder<'_, D>,
34462            offset: usize,
34463            _depth: fidl::encoding::Depth,
34464        ) -> fidl::Result<()> {
34465            decoder.debug_check_bounds::<Self>(offset);
34466            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34467            // Verify that padding bytes are zero.
34468            let ptr = unsafe { buf_ptr.offset(8) };
34469            let padval = unsafe { (ptr as *const u64).read_unaligned() };
34470            let mask = 0xff00000000000000u64;
34471            let maskedval = padval & mask;
34472            if maskedval != 0 {
34473                return Err(fidl::Error::NonZeroPadding {
34474                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
34475                });
34476            }
34477            // Copy from the buffer into the object.
34478            unsafe {
34479                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
34480            }
34481            Ok(())
34482        }
34483    }
34484
34485    impl fidl::encoding::ValueTypeMarker for Uint8Struct {
34486        type Borrowed<'a> = &'a Self;
34487        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34488            value
34489        }
34490    }
34491
34492    unsafe impl fidl::encoding::TypeMarker for Uint8Struct {
34493        type Owned = Self;
34494
34495        #[inline(always)]
34496        fn inline_align(_context: fidl::encoding::Context) -> usize {
34497            1
34498        }
34499
34500        #[inline(always)]
34501        fn inline_size(_context: fidl::encoding::Context) -> usize {
34502            1
34503        }
34504        #[inline(always)]
34505        fn encode_is_copy() -> bool {
34506            true
34507        }
34508
34509        #[inline(always)]
34510        fn decode_is_copy() -> bool {
34511            true
34512        }
34513    }
34514
34515    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Struct, D>
34516        for &Uint8Struct
34517    {
34518        #[inline]
34519        unsafe fn encode(
34520            self,
34521            encoder: &mut fidl::encoding::Encoder<'_, D>,
34522            offset: usize,
34523            _depth: fidl::encoding::Depth,
34524        ) -> fidl::Result<()> {
34525            encoder.debug_check_bounds::<Uint8Struct>(offset);
34526            unsafe {
34527                // Copy the object into the buffer.
34528                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34529                (buf_ptr as *mut Uint8Struct).write_unaligned((self as *const Uint8Struct).read());
34530                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34531                // done second because the memcpy will write garbage to these bytes.
34532            }
34533            Ok(())
34534        }
34535    }
34536    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
34537        fidl::encoding::Encode<Uint8Struct, D> for (T0,)
34538    {
34539        #[inline]
34540        unsafe fn encode(
34541            self,
34542            encoder: &mut fidl::encoding::Encoder<'_, D>,
34543            offset: usize,
34544            depth: fidl::encoding::Depth,
34545        ) -> fidl::Result<()> {
34546            encoder.debug_check_bounds::<Uint8Struct>(offset);
34547            // Zero out padding regions. There's no need to apply masks
34548            // because the unmasked parts will be overwritten by fields.
34549            // Write the fields.
34550            self.0.encode(encoder, offset + 0, depth)?;
34551            Ok(())
34552        }
34553    }
34554
34555    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Struct {
34556        #[inline(always)]
34557        fn new_empty() -> Self {
34558            Self { val: fidl::new_empty!(u8, D) }
34559        }
34560
34561        #[inline]
34562        unsafe fn decode(
34563            &mut self,
34564            decoder: &mut fidl::encoding::Decoder<'_, D>,
34565            offset: usize,
34566            _depth: fidl::encoding::Depth,
34567        ) -> fidl::Result<()> {
34568            decoder.debug_check_bounds::<Self>(offset);
34569            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34570            // Verify that padding bytes are zero.
34571            // Copy from the buffer into the object.
34572            unsafe {
34573                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
34574            }
34575            Ok(())
34576        }
34577    }
34578
34579    impl fidl::encoding::ValueTypeMarker for Uint8Uint16Uint32Uint64 {
34580        type Borrowed<'a> = &'a Self;
34581        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34582            value
34583        }
34584    }
34585
34586    unsafe impl fidl::encoding::TypeMarker for Uint8Uint16Uint32Uint64 {
34587        type Owned = Self;
34588
34589        #[inline(always)]
34590        fn inline_align(_context: fidl::encoding::Context) -> usize {
34591            8
34592        }
34593
34594        #[inline(always)]
34595        fn inline_size(_context: fidl::encoding::Context) -> usize {
34596            16
34597        }
34598    }
34599
34600    unsafe impl<D: fidl::encoding::ResourceDialect>
34601        fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for &Uint8Uint16Uint32Uint64
34602    {
34603        #[inline]
34604        unsafe fn encode(
34605            self,
34606            encoder: &mut fidl::encoding::Encoder<'_, D>,
34607            offset: usize,
34608            _depth: fidl::encoding::Depth,
34609        ) -> fidl::Result<()> {
34610            encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34611            unsafe {
34612                // Copy the object into the buffer.
34613                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34614                (buf_ptr as *mut Uint8Uint16Uint32Uint64)
34615                    .write_unaligned((self as *const Uint8Uint16Uint32Uint64).read());
34616                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
34617                // done second because the memcpy will write garbage to these bytes.
34618                let padding_ptr = buf_ptr.offset(0) as *mut u64;
34619                let padding_mask = 0xff00u64;
34620                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
34621            }
34622            Ok(())
34623        }
34624    }
34625    unsafe impl<
34626        D: fidl::encoding::ResourceDialect,
34627        T0: fidl::encoding::Encode<u8, D>,
34628        T1: fidl::encoding::Encode<u16, D>,
34629        T2: fidl::encoding::Encode<u32, D>,
34630        T3: fidl::encoding::Encode<u64, D>,
34631    > fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for (T0, T1, T2, T3)
34632    {
34633        #[inline]
34634        unsafe fn encode(
34635            self,
34636            encoder: &mut fidl::encoding::Encoder<'_, D>,
34637            offset: usize,
34638            depth: fidl::encoding::Depth,
34639        ) -> fidl::Result<()> {
34640            encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34641            // Zero out padding regions. There's no need to apply masks
34642            // because the unmasked parts will be overwritten by fields.
34643            unsafe {
34644                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
34645                (ptr as *mut u64).write_unaligned(0);
34646            }
34647            // Write the fields.
34648            self.0.encode(encoder, offset + 0, depth)?;
34649            self.1.encode(encoder, offset + 2, depth)?;
34650            self.2.encode(encoder, offset + 4, depth)?;
34651            self.3.encode(encoder, offset + 8, depth)?;
34652            Ok(())
34653        }
34654    }
34655
34656    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34657        for Uint8Uint16Uint32Uint64
34658    {
34659        #[inline(always)]
34660        fn new_empty() -> Self {
34661            Self {
34662                f1: fidl::new_empty!(u8, D),
34663                f2: fidl::new_empty!(u16, D),
34664                f3: fidl::new_empty!(u32, D),
34665                f4: fidl::new_empty!(u64, D),
34666            }
34667        }
34668
34669        #[inline]
34670        unsafe fn decode(
34671            &mut self,
34672            decoder: &mut fidl::encoding::Decoder<'_, D>,
34673            offset: usize,
34674            _depth: fidl::encoding::Depth,
34675        ) -> fidl::Result<()> {
34676            decoder.debug_check_bounds::<Self>(offset);
34677            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34678            // Verify that padding bytes are zero.
34679            let ptr = unsafe { buf_ptr.offset(0) };
34680            let padval = unsafe { (ptr as *const u64).read_unaligned() };
34681            let mask = 0xff00u64;
34682            let maskedval = padval & mask;
34683            if maskedval != 0 {
34684                return Err(fidl::Error::NonZeroPadding {
34685                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
34686                });
34687            }
34688            // Copy from the buffer into the object.
34689            unsafe {
34690                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
34691            }
34692            Ok(())
34693        }
34694    }
34695
34696    impl fidl::encoding::ValueTypeMarker for Uint8UnionStruct {
34697        type Borrowed<'a> = &'a Self;
34698        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34699            value
34700        }
34701    }
34702
34703    unsafe impl fidl::encoding::TypeMarker for Uint8UnionStruct {
34704        type Owned = Self;
34705
34706        #[inline(always)]
34707        fn inline_align(_context: fidl::encoding::Context) -> usize {
34708            8
34709        }
34710
34711        #[inline(always)]
34712        fn inline_size(_context: fidl::encoding::Context) -> usize {
34713            16
34714        }
34715    }
34716
34717    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8UnionStruct, D>
34718        for &Uint8UnionStruct
34719    {
34720        #[inline]
34721        unsafe fn encode(
34722            self,
34723            encoder: &mut fidl::encoding::Encoder<'_, D>,
34724            offset: usize,
34725            _depth: fidl::encoding::Depth,
34726        ) -> fidl::Result<()> {
34727            encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34728            // Delegate to tuple encoding.
34729            fidl::encoding::Encode::<Uint8UnionStruct, D>::encode(
34730                (<Uint8Union as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
34731                encoder,
34732                offset,
34733                _depth,
34734            )
34735        }
34736    }
34737    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Uint8Union, D>>
34738        fidl::encoding::Encode<Uint8UnionStruct, D> for (T0,)
34739    {
34740        #[inline]
34741        unsafe fn encode(
34742            self,
34743            encoder: &mut fidl::encoding::Encoder<'_, D>,
34744            offset: usize,
34745            depth: fidl::encoding::Depth,
34746        ) -> fidl::Result<()> {
34747            encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34748            // Zero out padding regions. There's no need to apply masks
34749            // because the unmasked parts will be overwritten by fields.
34750            // Write the fields.
34751            self.0.encode(encoder, offset + 0, depth)?;
34752            Ok(())
34753        }
34754    }
34755
34756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8UnionStruct {
34757        #[inline(always)]
34758        fn new_empty() -> Self {
34759            Self { u: fidl::new_empty!(Uint8Union, D) }
34760        }
34761
34762        #[inline]
34763        unsafe fn decode(
34764            &mut self,
34765            decoder: &mut fidl::encoding::Decoder<'_, D>,
34766            offset: usize,
34767            _depth: fidl::encoding::Depth,
34768        ) -> fidl::Result<()> {
34769            decoder.debug_check_bounds::<Self>(offset);
34770            // Verify that padding bytes are zero.
34771            fidl::decode!(Uint8Union, D, &mut self.u, decoder, offset + 0, _depth)?;
34772            Ok(())
34773        }
34774    }
34775
34776    impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableString {
34777        type Borrowed<'a> = &'a Self;
34778        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34779            value
34780        }
34781    }
34782
34783    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableString {
34784        type Owned = Self;
34785
34786        #[inline(always)]
34787        fn inline_align(_context: fidl::encoding::Context) -> usize {
34788            8
34789        }
34790
34791        #[inline(always)]
34792        fn inline_size(_context: fidl::encoding::Context) -> usize {
34793            16
34794        }
34795    }
34796
34797    unsafe impl<D: fidl::encoding::ResourceDialect>
34798        fidl::encoding::Encode<UnboundedNonnullableString, D> for &UnboundedNonnullableString
34799    {
34800        #[inline]
34801        unsafe fn encode(
34802            self,
34803            encoder: &mut fidl::encoding::Encoder<'_, D>,
34804            offset: usize,
34805            _depth: fidl::encoding::Depth,
34806        ) -> fidl::Result<()> {
34807            encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34808            // Delegate to tuple encoding.
34809            fidl::encoding::Encode::<UnboundedNonnullableString, D>::encode(
34810                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
34811                    &self.s0,
34812                ),),
34813                encoder,
34814                offset,
34815                _depth,
34816            )
34817        }
34818    }
34819    unsafe impl<
34820        D: fidl::encoding::ResourceDialect,
34821        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
34822    > fidl::encoding::Encode<UnboundedNonnullableString, D> for (T0,)
34823    {
34824        #[inline]
34825        unsafe fn encode(
34826            self,
34827            encoder: &mut fidl::encoding::Encoder<'_, D>,
34828            offset: usize,
34829            depth: fidl::encoding::Depth,
34830        ) -> fidl::Result<()> {
34831            encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34832            // Zero out padding regions. There's no need to apply masks
34833            // because the unmasked parts will be overwritten by fields.
34834            // Write the fields.
34835            self.0.encode(encoder, offset + 0, depth)?;
34836            Ok(())
34837        }
34838    }
34839
34840    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34841        for UnboundedNonnullableString
34842    {
34843        #[inline(always)]
34844        fn new_empty() -> Self {
34845            Self { s0: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
34846        }
34847
34848        #[inline]
34849        unsafe fn decode(
34850            &mut self,
34851            decoder: &mut fidl::encoding::Decoder<'_, D>,
34852            offset: usize,
34853            _depth: fidl::encoding::Depth,
34854        ) -> fidl::Result<()> {
34855            decoder.debug_check_bounds::<Self>(offset);
34856            // Verify that padding bytes are zero.
34857            fidl::decode!(
34858                fidl::encoding::UnboundedString,
34859                D,
34860                &mut self.s0,
34861                decoder,
34862                offset + 0,
34863                _depth
34864            )?;
34865            Ok(())
34866        }
34867    }
34868
34869    impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableVectorOfUint32s {
34870        type Borrowed<'a> = &'a Self;
34871        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34872            value
34873        }
34874    }
34875
34876    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfUint32s {
34877        type Owned = Self;
34878
34879        #[inline(always)]
34880        fn inline_align(_context: fidl::encoding::Context) -> usize {
34881            8
34882        }
34883
34884        #[inline(always)]
34885        fn inline_size(_context: fidl::encoding::Context) -> usize {
34886            16
34887        }
34888    }
34889
34890    unsafe impl<D: fidl::encoding::ResourceDialect>
34891        fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D>
34892        for &UnboundedNonnullableVectorOfUint32s
34893    {
34894        #[inline]
34895        unsafe fn encode(
34896            self,
34897            encoder: &mut fidl::encoding::Encoder<'_, D>,
34898            offset: usize,
34899            _depth: fidl::encoding::Depth,
34900        ) -> fidl::Result<()> {
34901            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34902            // Delegate to tuple encoding.
34903            fidl::encoding::Encode::<UnboundedNonnullableVectorOfUint32s, D>::encode(
34904                (
34905                    <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
34906                ),
34907                encoder, offset, _depth
34908            )
34909        }
34910    }
34911    unsafe impl<
34912        D: fidl::encoding::ResourceDialect,
34913        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
34914    > fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D> for (T0,)
34915    {
34916        #[inline]
34917        unsafe fn encode(
34918            self,
34919            encoder: &mut fidl::encoding::Encoder<'_, D>,
34920            offset: usize,
34921            depth: fidl::encoding::Depth,
34922        ) -> fidl::Result<()> {
34923            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34924            // Zero out padding regions. There's no need to apply masks
34925            // because the unmasked parts will be overwritten by fields.
34926            // Write the fields.
34927            self.0.encode(encoder, offset + 0, depth)?;
34928            Ok(())
34929        }
34930    }
34931
34932    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34933        for UnboundedNonnullableVectorOfUint32s
34934    {
34935        #[inline(always)]
34936        fn new_empty() -> Self {
34937            Self { vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D) }
34938        }
34939
34940        #[inline]
34941        unsafe fn decode(
34942            &mut self,
34943            decoder: &mut fidl::encoding::Decoder<'_, D>,
34944            offset: usize,
34945            _depth: fidl::encoding::Depth,
34946        ) -> fidl::Result<()> {
34947            decoder.debug_check_bounds::<Self>(offset);
34948            // Verify that padding bytes are zero.
34949            fidl::decode!(
34950                fidl::encoding::UnboundedVector<u32>,
34951                D,
34952                &mut self.vu0,
34953                decoder,
34954                offset + 0,
34955                _depth
34956            )?;
34957            Ok(())
34958        }
34959    }
34960
34961    impl fidl::encoding::ValueTypeMarker for UnboundedNullableString {
34962        type Borrowed<'a> = &'a Self;
34963        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34964            value
34965        }
34966    }
34967
34968    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableString {
34969        type Owned = Self;
34970
34971        #[inline(always)]
34972        fn inline_align(_context: fidl::encoding::Context) -> usize {
34973            8
34974        }
34975
34976        #[inline(always)]
34977        fn inline_size(_context: fidl::encoding::Context) -> usize {
34978            16
34979        }
34980    }
34981
34982    unsafe impl<D: fidl::encoding::ResourceDialect>
34983        fidl::encoding::Encode<UnboundedNullableString, D> for &UnboundedNullableString
34984    {
34985        #[inline]
34986        unsafe fn encode(
34987            self,
34988            encoder: &mut fidl::encoding::Encoder<'_, D>,
34989            offset: usize,
34990            _depth: fidl::encoding::Depth,
34991        ) -> fidl::Result<()> {
34992            encoder.debug_check_bounds::<UnboundedNullableString>(offset);
34993            // Delegate to tuple encoding.
34994            fidl::encoding::Encode::<UnboundedNullableString, D>::encode(
34995                (
34996                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
34997                ),
34998                encoder, offset, _depth
34999            )
35000        }
35001    }
35002    unsafe impl<
35003        D: fidl::encoding::ResourceDialect,
35004        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
35005    > fidl::encoding::Encode<UnboundedNullableString, D> for (T0,)
35006    {
35007        #[inline]
35008        unsafe fn encode(
35009            self,
35010            encoder: &mut fidl::encoding::Encoder<'_, D>,
35011            offset: usize,
35012            depth: fidl::encoding::Depth,
35013        ) -> fidl::Result<()> {
35014            encoder.debug_check_bounds::<UnboundedNullableString>(offset);
35015            // Zero out padding regions. There's no need to apply masks
35016            // because the unmasked parts will be overwritten by fields.
35017            // Write the fields.
35018            self.0.encode(encoder, offset + 0, depth)?;
35019            Ok(())
35020        }
35021    }
35022
35023    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35024        for UnboundedNullableString
35025    {
35026        #[inline(always)]
35027        fn new_empty() -> Self {
35028            Self {
35029                s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
35030            }
35031        }
35032
35033        #[inline]
35034        unsafe fn decode(
35035            &mut self,
35036            decoder: &mut fidl::encoding::Decoder<'_, D>,
35037            offset: usize,
35038            _depth: fidl::encoding::Depth,
35039        ) -> fidl::Result<()> {
35040            decoder.debug_check_bounds::<Self>(offset);
35041            // Verify that padding bytes are zero.
35042            fidl::decode!(
35043                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
35044                D,
35045                &mut self.s0,
35046                decoder,
35047                offset + 0,
35048                _depth
35049            )?;
35050            Ok(())
35051        }
35052    }
35053
35054    impl fidl::encoding::ValueTypeMarker for UnboundedNullableVectorOfUint32s {
35055        type Borrowed<'a> = &'a Self;
35056        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35057            value
35058        }
35059    }
35060
35061    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfUint32s {
35062        type Owned = Self;
35063
35064        #[inline(always)]
35065        fn inline_align(_context: fidl::encoding::Context) -> usize {
35066            8
35067        }
35068
35069        #[inline(always)]
35070        fn inline_size(_context: fidl::encoding::Context) -> usize {
35071            16
35072        }
35073    }
35074
35075    unsafe impl<D: fidl::encoding::ResourceDialect>
35076        fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D>
35077        for &UnboundedNullableVectorOfUint32s
35078    {
35079        #[inline]
35080        unsafe fn encode(
35081            self,
35082            encoder: &mut fidl::encoding::Encoder<'_, D>,
35083            offset: usize,
35084            _depth: fidl::encoding::Depth,
35085        ) -> fidl::Result<()> {
35086            encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
35087            // Delegate to tuple encoding.
35088            fidl::encoding::Encode::<UnboundedNullableVectorOfUint32s, D>::encode(
35089                (
35090                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
35091                ),
35092                encoder, offset, _depth
35093            )
35094        }
35095    }
35096    unsafe impl<
35097        D: fidl::encoding::ResourceDialect,
35098        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>, D>,
35099    > fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D> for (T0,)
35100    {
35101        #[inline]
35102        unsafe fn encode(
35103            self,
35104            encoder: &mut fidl::encoding::Encoder<'_, D>,
35105            offset: usize,
35106            depth: fidl::encoding::Depth,
35107        ) -> fidl::Result<()> {
35108            encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
35109            // Zero out padding regions. There's no need to apply masks
35110            // because the unmasked parts will be overwritten by fields.
35111            // Write the fields.
35112            self.0.encode(encoder, offset + 0, depth)?;
35113            Ok(())
35114        }
35115    }
35116
35117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35118        for UnboundedNullableVectorOfUint32s
35119    {
35120        #[inline(always)]
35121        fn new_empty() -> Self {
35122            Self {
35123                vu0: fidl::new_empty!(
35124                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
35125                    D
35126                ),
35127            }
35128        }
35129
35130        #[inline]
35131        unsafe fn decode(
35132            &mut self,
35133            decoder: &mut fidl::encoding::Decoder<'_, D>,
35134            offset: usize,
35135            _depth: fidl::encoding::Depth,
35136        ) -> fidl::Result<()> {
35137            decoder.debug_check_bounds::<Self>(offset);
35138            // Verify that padding bytes are zero.
35139            fidl::decode!(
35140                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
35141                D,
35142                &mut self.vu0,
35143                decoder,
35144                offset + 0,
35145                _depth
35146            )?;
35147            Ok(())
35148        }
35149    }
35150
35151    impl fidl::encoding::ValueTypeMarker for UnionInlinePaddingStruct {
35152        type Borrowed<'a> = &'a Self;
35153        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35154            value
35155        }
35156    }
35157
35158    unsafe impl fidl::encoding::TypeMarker for UnionInlinePaddingStruct {
35159        type Owned = Self;
35160
35161        #[inline(always)]
35162        fn inline_align(_context: fidl::encoding::Context) -> usize {
35163            8
35164        }
35165
35166        #[inline(always)]
35167        fn inline_size(_context: fidl::encoding::Context) -> usize {
35168            16
35169        }
35170    }
35171
35172    unsafe impl<D: fidl::encoding::ResourceDialect>
35173        fidl::encoding::Encode<UnionInlinePaddingStruct, D> for &UnionInlinePaddingStruct
35174    {
35175        #[inline]
35176        unsafe fn encode(
35177            self,
35178            encoder: &mut fidl::encoding::Encoder<'_, D>,
35179            offset: usize,
35180            _depth: fidl::encoding::Depth,
35181        ) -> fidl::Result<()> {
35182            encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
35183            // Delegate to tuple encoding.
35184            fidl::encoding::Encode::<UnionInlinePaddingStruct, D>::encode(
35185                (<UnionInlinePadding as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
35186                encoder,
35187                offset,
35188                _depth,
35189            )
35190        }
35191    }
35192    unsafe impl<
35193        D: fidl::encoding::ResourceDialect,
35194        T0: fidl::encoding::Encode<UnionInlinePadding, D>,
35195    > fidl::encoding::Encode<UnionInlinePaddingStruct, D> for (T0,)
35196    {
35197        #[inline]
35198        unsafe fn encode(
35199            self,
35200            encoder: &mut fidl::encoding::Encoder<'_, D>,
35201            offset: usize,
35202            depth: fidl::encoding::Depth,
35203        ) -> fidl::Result<()> {
35204            encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
35205            // Zero out padding regions. There's no need to apply masks
35206            // because the unmasked parts will be overwritten by fields.
35207            // Write the fields.
35208            self.0.encode(encoder, offset + 0, depth)?;
35209            Ok(())
35210        }
35211    }
35212
35213    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35214        for UnionInlinePaddingStruct
35215    {
35216        #[inline(always)]
35217        fn new_empty() -> Self {
35218            Self { u: fidl::new_empty!(UnionInlinePadding, D) }
35219        }
35220
35221        #[inline]
35222        unsafe fn decode(
35223            &mut self,
35224            decoder: &mut fidl::encoding::Decoder<'_, D>,
35225            offset: usize,
35226            _depth: fidl::encoding::Depth,
35227        ) -> fidl::Result<()> {
35228            decoder.debug_check_bounds::<Self>(offset);
35229            // Verify that padding bytes are zero.
35230            fidl::decode!(UnionInlinePadding, D, &mut self.u, decoder, offset + 0, _depth)?;
35231            Ok(())
35232        }
35233    }
35234
35235    impl fidl::encoding::ValueTypeMarker for UnionWithBoundStringStruct {
35236        type Borrowed<'a> = &'a Self;
35237        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35238            value
35239        }
35240    }
35241
35242    unsafe impl fidl::encoding::TypeMarker for UnionWithBoundStringStruct {
35243        type Owned = Self;
35244
35245        #[inline(always)]
35246        fn inline_align(_context: fidl::encoding::Context) -> usize {
35247            8
35248        }
35249
35250        #[inline(always)]
35251        fn inline_size(_context: fidl::encoding::Context) -> usize {
35252            16
35253        }
35254    }
35255
35256    unsafe impl<D: fidl::encoding::ResourceDialect>
35257        fidl::encoding::Encode<UnionWithBoundStringStruct, D> for &UnionWithBoundStringStruct
35258    {
35259        #[inline]
35260        unsafe fn encode(
35261            self,
35262            encoder: &mut fidl::encoding::Encoder<'_, D>,
35263            offset: usize,
35264            _depth: fidl::encoding::Depth,
35265        ) -> fidl::Result<()> {
35266            encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
35267            // Delegate to tuple encoding.
35268            fidl::encoding::Encode::<UnionWithBoundStringStruct, D>::encode(
35269                (<UnionWithBoundString as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
35270                encoder,
35271                offset,
35272                _depth,
35273            )
35274        }
35275    }
35276    unsafe impl<
35277        D: fidl::encoding::ResourceDialect,
35278        T0: fidl::encoding::Encode<UnionWithBoundString, D>,
35279    > fidl::encoding::Encode<UnionWithBoundStringStruct, D> for (T0,)
35280    {
35281        #[inline]
35282        unsafe fn encode(
35283            self,
35284            encoder: &mut fidl::encoding::Encoder<'_, D>,
35285            offset: usize,
35286            depth: fidl::encoding::Depth,
35287        ) -> fidl::Result<()> {
35288            encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
35289            // Zero out padding regions. There's no need to apply masks
35290            // because the unmasked parts will be overwritten by fields.
35291            // Write the fields.
35292            self.0.encode(encoder, offset + 0, depth)?;
35293            Ok(())
35294        }
35295    }
35296
35297    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35298        for UnionWithBoundStringStruct
35299    {
35300        #[inline(always)]
35301        fn new_empty() -> Self {
35302            Self { v: fidl::new_empty!(UnionWithBoundString, D) }
35303        }
35304
35305        #[inline]
35306        unsafe fn decode(
35307            &mut self,
35308            decoder: &mut fidl::encoding::Decoder<'_, D>,
35309            offset: usize,
35310            _depth: fidl::encoding::Depth,
35311        ) -> fidl::Result<()> {
35312            decoder.debug_check_bounds::<Self>(offset);
35313            // Verify that padding bytes are zero.
35314            fidl::decode!(UnionWithBoundString, D, &mut self.v, decoder, offset + 0, _depth)?;
35315            Ok(())
35316        }
35317    }
35318
35319    impl fidl::encoding::ValueTypeMarker for UpdatePolicy {
35320        type Borrowed<'a> = &'a Self;
35321        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35322            value
35323        }
35324    }
35325
35326    unsafe impl fidl::encoding::TypeMarker for UpdatePolicy {
35327        type Owned = Self;
35328
35329        #[inline(always)]
35330        fn inline_align(_context: fidl::encoding::Context) -> usize {
35331            1
35332        }
35333
35334        #[inline(always)]
35335        fn inline_size(_context: fidl::encoding::Context) -> usize {
35336            2
35337        }
35338    }
35339
35340    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UpdatePolicy, D>
35341        for &UpdatePolicy
35342    {
35343        #[inline]
35344        unsafe fn encode(
35345            self,
35346            encoder: &mut fidl::encoding::Encoder<'_, D>,
35347            offset: usize,
35348            _depth: fidl::encoding::Depth,
35349        ) -> fidl::Result<()> {
35350            encoder.debug_check_bounds::<UpdatePolicy>(offset);
35351            // Delegate to tuple encoding.
35352            fidl::encoding::Encode::<UpdatePolicy, D>::encode(
35353                (
35354                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.fetch_if_absent),
35355                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_old_versions),
35356                ),
35357                encoder,
35358                offset,
35359                _depth,
35360            )
35361        }
35362    }
35363    unsafe impl<
35364        D: fidl::encoding::ResourceDialect,
35365        T0: fidl::encoding::Encode<bool, D>,
35366        T1: fidl::encoding::Encode<bool, D>,
35367    > fidl::encoding::Encode<UpdatePolicy, D> for (T0, T1)
35368    {
35369        #[inline]
35370        unsafe fn encode(
35371            self,
35372            encoder: &mut fidl::encoding::Encoder<'_, D>,
35373            offset: usize,
35374            depth: fidl::encoding::Depth,
35375        ) -> fidl::Result<()> {
35376            encoder.debug_check_bounds::<UpdatePolicy>(offset);
35377            // Zero out padding regions. There's no need to apply masks
35378            // because the unmasked parts will be overwritten by fields.
35379            // Write the fields.
35380            self.0.encode(encoder, offset + 0, depth)?;
35381            self.1.encode(encoder, offset + 1, depth)?;
35382            Ok(())
35383        }
35384    }
35385
35386    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UpdatePolicy {
35387        #[inline(always)]
35388        fn new_empty() -> Self {
35389            Self {
35390                fetch_if_absent: fidl::new_empty!(bool, D),
35391                allow_old_versions: fidl::new_empty!(bool, D),
35392            }
35393        }
35394
35395        #[inline]
35396        unsafe fn decode(
35397            &mut self,
35398            decoder: &mut fidl::encoding::Decoder<'_, D>,
35399            offset: usize,
35400            _depth: fidl::encoding::Depth,
35401        ) -> fidl::Result<()> {
35402            decoder.debug_check_bounds::<Self>(offset);
35403            // Verify that padding bytes are zero.
35404            fidl::decode!(bool, D, &mut self.fetch_if_absent, decoder, offset + 0, _depth)?;
35405            fidl::decode!(bool, D, &mut self.allow_old_versions, decoder, offset + 1, _depth)?;
35406            Ok(())
35407        }
35408    }
35409
35410    impl fidl::encoding::ValueTypeMarker for VectorOfByteVector {
35411        type Borrowed<'a> = &'a Self;
35412        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35413            value
35414        }
35415    }
35416
35417    unsafe impl fidl::encoding::TypeMarker for VectorOfByteVector {
35418        type Owned = Self;
35419
35420        #[inline(always)]
35421        fn inline_align(_context: fidl::encoding::Context) -> usize {
35422            8
35423        }
35424
35425        #[inline(always)]
35426        fn inline_size(_context: fidl::encoding::Context) -> usize {
35427            16
35428        }
35429    }
35430
35431    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfByteVector, D>
35432        for &VectorOfByteVector
35433    {
35434        #[inline]
35435        unsafe fn encode(
35436            self,
35437            encoder: &mut fidl::encoding::Encoder<'_, D>,
35438            offset: usize,
35439            _depth: fidl::encoding::Depth,
35440        ) -> fidl::Result<()> {
35441            encoder.debug_check_bounds::<VectorOfByteVector>(offset);
35442            // Delegate to tuple encoding.
35443            fidl::encoding::Encode::<VectorOfByteVector, D>::encode(
35444                (
35445                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35446                ),
35447                encoder, offset, _depth
35448            )
35449        }
35450    }
35451    unsafe impl<
35452        D: fidl::encoding::ResourceDialect,
35453        T0: fidl::encoding::Encode<
35454                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
35455                D,
35456            >,
35457    > fidl::encoding::Encode<VectorOfByteVector, D> for (T0,)
35458    {
35459        #[inline]
35460        unsafe fn encode(
35461            self,
35462            encoder: &mut fidl::encoding::Encoder<'_, D>,
35463            offset: usize,
35464            depth: fidl::encoding::Depth,
35465        ) -> fidl::Result<()> {
35466            encoder.debug_check_bounds::<VectorOfByteVector>(offset);
35467            // Zero out padding regions. There's no need to apply masks
35468            // because the unmasked parts will be overwritten by fields.
35469            // Write the fields.
35470            self.0.encode(encoder, offset + 0, depth)?;
35471            Ok(())
35472        }
35473    }
35474
35475    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfByteVector {
35476        #[inline(always)]
35477        fn new_empty() -> Self {
35478            Self {
35479                v: fidl::new_empty!(
35480                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
35481                    D
35482                ),
35483            }
35484        }
35485
35486        #[inline]
35487        unsafe fn decode(
35488            &mut self,
35489            decoder: &mut fidl::encoding::Decoder<'_, D>,
35490            offset: usize,
35491            _depth: fidl::encoding::Depth,
35492        ) -> fidl::Result<()> {
35493            decoder.debug_check_bounds::<Self>(offset);
35494            // Verify that padding bytes are zero.
35495            fidl::decode!(
35496                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
35497                D,
35498                &mut self.v,
35499                decoder,
35500                offset + 0,
35501                _depth
35502            )?;
35503            Ok(())
35504        }
35505    }
35506
35507    impl fidl::encoding::ValueTypeMarker for VectorOfEnumStruct {
35508        type Borrowed<'a> = &'a Self;
35509        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35510            value
35511        }
35512    }
35513
35514    unsafe impl fidl::encoding::TypeMarker for VectorOfEnumStruct {
35515        type Owned = Self;
35516
35517        #[inline(always)]
35518        fn inline_align(_context: fidl::encoding::Context) -> usize {
35519            8
35520        }
35521
35522        #[inline(always)]
35523        fn inline_size(_context: fidl::encoding::Context) -> usize {
35524            16
35525        }
35526    }
35527
35528    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfEnumStruct, D>
35529        for &VectorOfEnumStruct
35530    {
35531        #[inline]
35532        unsafe fn encode(
35533            self,
35534            encoder: &mut fidl::encoding::Encoder<'_, D>,
35535            offset: usize,
35536            _depth: fidl::encoding::Depth,
35537        ) -> fidl::Result<()> {
35538            encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
35539            // Delegate to tuple encoding.
35540            fidl::encoding::Encode::<VectorOfEnumStruct, D>::encode(
35541                (
35542                    <fidl::encoding::UnboundedVector<StrictEnumInt16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35543                ),
35544                encoder, offset, _depth
35545            )
35546        }
35547    }
35548    unsafe impl<
35549        D: fidl::encoding::ResourceDialect,
35550        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StrictEnumInt16>, D>,
35551    > fidl::encoding::Encode<VectorOfEnumStruct, D> for (T0,)
35552    {
35553        #[inline]
35554        unsafe fn encode(
35555            self,
35556            encoder: &mut fidl::encoding::Encoder<'_, D>,
35557            offset: usize,
35558            depth: fidl::encoding::Depth,
35559        ) -> fidl::Result<()> {
35560            encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
35561            // Zero out padding regions. There's no need to apply masks
35562            // because the unmasked parts will be overwritten by fields.
35563            // Write the fields.
35564            self.0.encode(encoder, offset + 0, depth)?;
35565            Ok(())
35566        }
35567    }
35568
35569    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfEnumStruct {
35570        #[inline(always)]
35571        fn new_empty() -> Self {
35572            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<StrictEnumInt16>, D) }
35573        }
35574
35575        #[inline]
35576        unsafe fn decode(
35577            &mut self,
35578            decoder: &mut fidl::encoding::Decoder<'_, D>,
35579            offset: usize,
35580            _depth: fidl::encoding::Depth,
35581        ) -> fidl::Result<()> {
35582            decoder.debug_check_bounds::<Self>(offset);
35583            // Verify that padding bytes are zero.
35584            fidl::decode!(
35585                fidl::encoding::UnboundedVector<StrictEnumInt16>,
35586                D,
35587                &mut self.v,
35588                decoder,
35589                offset + 0,
35590                _depth
35591            )?;
35592            Ok(())
35593        }
35594    }
35595
35596    impl fidl::encoding::ValueTypeMarker for VectorOfStrings {
35597        type Borrowed<'a> = &'a Self;
35598        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35599            value
35600        }
35601    }
35602
35603    unsafe impl fidl::encoding::TypeMarker for VectorOfStrings {
35604        type Owned = Self;
35605
35606        #[inline(always)]
35607        fn inline_align(_context: fidl::encoding::Context) -> usize {
35608            8
35609        }
35610
35611        #[inline(always)]
35612        fn inline_size(_context: fidl::encoding::Context) -> usize {
35613            16
35614        }
35615    }
35616
35617    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfStrings, D>
35618        for &VectorOfStrings
35619    {
35620        #[inline]
35621        unsafe fn encode(
35622            self,
35623            encoder: &mut fidl::encoding::Encoder<'_, D>,
35624            offset: usize,
35625            _depth: fidl::encoding::Depth,
35626        ) -> fidl::Result<()> {
35627            encoder.debug_check_bounds::<VectorOfStrings>(offset);
35628            // Delegate to tuple encoding.
35629            fidl::encoding::Encode::<VectorOfStrings, D>::encode(
35630                (
35631                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35632                ),
35633                encoder, offset, _depth
35634            )
35635        }
35636    }
35637    unsafe impl<
35638        D: fidl::encoding::ResourceDialect,
35639        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
35640    > fidl::encoding::Encode<VectorOfStrings, D> for (T0,)
35641    {
35642        #[inline]
35643        unsafe fn encode(
35644            self,
35645            encoder: &mut fidl::encoding::Encoder<'_, D>,
35646            offset: usize,
35647            depth: fidl::encoding::Depth,
35648        ) -> fidl::Result<()> {
35649            encoder.debug_check_bounds::<VectorOfStrings>(offset);
35650            // Zero out padding regions. There's no need to apply masks
35651            // because the unmasked parts will be overwritten by fields.
35652            // Write the fields.
35653            self.0.encode(encoder, offset + 0, depth)?;
35654            Ok(())
35655        }
35656    }
35657
35658    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfStrings {
35659        #[inline(always)]
35660        fn new_empty() -> Self {
35661            Self {
35662                v: fidl::new_empty!(
35663                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35664                    D
35665                ),
35666            }
35667        }
35668
35669        #[inline]
35670        unsafe fn decode(
35671            &mut self,
35672            decoder: &mut fidl::encoding::Decoder<'_, D>,
35673            offset: usize,
35674            _depth: fidl::encoding::Depth,
35675        ) -> fidl::Result<()> {
35676            decoder.debug_check_bounds::<Self>(offset);
35677            // Verify that padding bytes are zero.
35678            fidl::decode!(
35679                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35680                D,
35681                &mut self.v,
35682                decoder,
35683                offset + 0,
35684                _depth
35685            )?;
35686            Ok(())
35687        }
35688    }
35689
35690    impl fidl::encoding::ValueTypeMarker for VectorOfUint64 {
35691        type Borrowed<'a> = &'a Self;
35692        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35693            value
35694        }
35695    }
35696
35697    unsafe impl fidl::encoding::TypeMarker for VectorOfUint64 {
35698        type Owned = Self;
35699
35700        #[inline(always)]
35701        fn inline_align(_context: fidl::encoding::Context) -> usize {
35702            8
35703        }
35704
35705        #[inline(always)]
35706        fn inline_size(_context: fidl::encoding::Context) -> usize {
35707            16
35708        }
35709    }
35710
35711    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfUint64, D>
35712        for &VectorOfUint64
35713    {
35714        #[inline]
35715        unsafe fn encode(
35716            self,
35717            encoder: &mut fidl::encoding::Encoder<'_, D>,
35718            offset: usize,
35719            _depth: fidl::encoding::Depth,
35720        ) -> fidl::Result<()> {
35721            encoder.debug_check_bounds::<VectorOfUint64>(offset);
35722            // Delegate to tuple encoding.
35723            fidl::encoding::Encode::<VectorOfUint64, D>::encode(
35724                (
35725                    <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35726                ),
35727                encoder, offset, _depth
35728            )
35729        }
35730    }
35731    unsafe impl<
35732        D: fidl::encoding::ResourceDialect,
35733        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
35734    > fidl::encoding::Encode<VectorOfUint64, D> for (T0,)
35735    {
35736        #[inline]
35737        unsafe fn encode(
35738            self,
35739            encoder: &mut fidl::encoding::Encoder<'_, D>,
35740            offset: usize,
35741            depth: fidl::encoding::Depth,
35742        ) -> fidl::Result<()> {
35743            encoder.debug_check_bounds::<VectorOfUint64>(offset);
35744            // Zero out padding regions. There's no need to apply masks
35745            // because the unmasked parts will be overwritten by fields.
35746            // Write the fields.
35747            self.0.encode(encoder, offset + 0, depth)?;
35748            Ok(())
35749        }
35750    }
35751
35752    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfUint64 {
35753        #[inline(always)]
35754        fn new_empty() -> Self {
35755            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D) }
35756        }
35757
35758        #[inline]
35759        unsafe fn decode(
35760            &mut self,
35761            decoder: &mut fidl::encoding::Decoder<'_, D>,
35762            offset: usize,
35763            _depth: fidl::encoding::Depth,
35764        ) -> fidl::Result<()> {
35765            decoder.debug_check_bounds::<Self>(offset);
35766            // Verify that padding bytes are zero.
35767            fidl::decode!(
35768                fidl::encoding::UnboundedVector<u64>,
35769                D,
35770                &mut self.v,
35771                decoder,
35772                offset + 0,
35773                _depth
35774            )?;
35775            Ok(())
35776        }
35777    }
35778
35779    impl fidl::encoding::ValueTypeMarker for VectorWithLimit {
35780        type Borrowed<'a> = &'a Self;
35781        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35782            value
35783        }
35784    }
35785
35786    unsafe impl fidl::encoding::TypeMarker for VectorWithLimit {
35787        type Owned = Self;
35788
35789        #[inline(always)]
35790        fn inline_align(_context: fidl::encoding::Context) -> usize {
35791            8
35792        }
35793
35794        #[inline(always)]
35795        fn inline_size(_context: fidl::encoding::Context) -> usize {
35796            16
35797        }
35798    }
35799
35800    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWithLimit, D>
35801        for &VectorWithLimit
35802    {
35803        #[inline]
35804        unsafe fn encode(
35805            self,
35806            encoder: &mut fidl::encoding::Encoder<'_, D>,
35807            offset: usize,
35808            _depth: fidl::encoding::Depth,
35809        ) -> fidl::Result<()> {
35810            encoder.debug_check_bounds::<VectorWithLimit>(offset);
35811            // Delegate to tuple encoding.
35812            fidl::encoding::Encode::<VectorWithLimit, D>::encode(
35813                (<fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow(
35814                    &self.v,
35815                ),),
35816                encoder,
35817                offset,
35818                _depth,
35819            )
35820        }
35821    }
35822    unsafe impl<
35823        D: fidl::encoding::ResourceDialect,
35824        T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 2>, D>,
35825    > fidl::encoding::Encode<VectorWithLimit, D> for (T0,)
35826    {
35827        #[inline]
35828        unsafe fn encode(
35829            self,
35830            encoder: &mut fidl::encoding::Encoder<'_, D>,
35831            offset: usize,
35832            depth: fidl::encoding::Depth,
35833        ) -> fidl::Result<()> {
35834            encoder.debug_check_bounds::<VectorWithLimit>(offset);
35835            // Zero out padding regions. There's no need to apply masks
35836            // because the unmasked parts will be overwritten by fields.
35837            // Write the fields.
35838            self.0.encode(encoder, offset + 0, depth)?;
35839            Ok(())
35840        }
35841    }
35842
35843    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWithLimit {
35844        #[inline(always)]
35845        fn new_empty() -> Self {
35846            Self { v: fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D) }
35847        }
35848
35849        #[inline]
35850        unsafe fn decode(
35851            &mut self,
35852            decoder: &mut fidl::encoding::Decoder<'_, D>,
35853            offset: usize,
35854            _depth: fidl::encoding::Depth,
35855        ) -> fidl::Result<()> {
35856            decoder.debug_check_bounds::<Self>(offset);
35857            // Verify that padding bytes are zero.
35858            fidl::decode!(fidl::encoding::Vector<u8, 2>, D, &mut self.v, decoder, offset + 0, _depth)?;
35859            Ok(())
35860        }
35861    }
35862
35863    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInArray {
35864        type Borrowed<'a> = &'a Self;
35865        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35866            value
35867        }
35868    }
35869
35870    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInArray {
35871        type Owned = Self;
35872
35873        #[inline(always)]
35874        fn inline_align(_context: fidl::encoding::Context) -> usize {
35875            8
35876        }
35877
35878        #[inline(always)]
35879        fn inline_size(_context: fidl::encoding::Context) -> usize {
35880            32
35881        }
35882    }
35883
35884    unsafe impl<D: fidl::encoding::ResourceDialect>
35885        fidl::encoding::Encode<VectorWithLimitInArray, D> for &VectorWithLimitInArray
35886    {
35887        #[inline]
35888        unsafe fn encode(
35889            self,
35890            encoder: &mut fidl::encoding::Encoder<'_, D>,
35891            offset: usize,
35892            _depth: fidl::encoding::Depth,
35893        ) -> fidl::Result<()> {
35894            encoder.debug_check_bounds::<VectorWithLimitInArray>(offset);
35895            // Delegate to tuple encoding.
35896            fidl::encoding::Encode::<VectorWithLimitInArray, D>::encode(
35897                (
35898                    <fidl::encoding::Array<
35899                        fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>,
35900                        2,
35901                    > as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
35902                ),
35903                encoder,
35904                offset,
35905                _depth,
35906            )
35907        }
35908    }
35909    unsafe impl<
35910        D: fidl::encoding::ResourceDialect,
35911        T0: fidl::encoding::Encode<
35912                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>, 2>,
35913                D,
35914            >,
35915    > fidl::encoding::Encode<VectorWithLimitInArray, D> for (T0,)
35916    {
35917        #[inline]
35918        unsafe fn encode(
35919            self,
35920            encoder: &mut fidl::encoding::Encoder<'_, D>,
35921            offset: usize,
35922            depth: fidl::encoding::Depth,
35923        ) -> fidl::Result<()> {
35924            encoder.debug_check_bounds::<VectorWithLimitInArray>(offset);
35925            // Zero out padding regions. There's no need to apply masks
35926            // because the unmasked parts will be overwritten by fields.
35927            // Write the fields.
35928            self.0.encode(encoder, offset + 0, depth)?;
35929            Ok(())
35930        }
35931    }
35932
35933    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35934        for VectorWithLimitInArray
35935    {
35936        #[inline(always)]
35937        fn new_empty() -> Self {
35938            Self {
35939                a: fidl::new_empty!(
35940                    fidl::encoding::Array<
35941                        fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>,
35942                        2,
35943                    >,
35944                    D
35945                ),
35946            }
35947        }
35948
35949        #[inline]
35950        unsafe fn decode(
35951            &mut self,
35952            decoder: &mut fidl::encoding::Decoder<'_, D>,
35953            offset: usize,
35954            _depth: fidl::encoding::Depth,
35955        ) -> fidl::Result<()> {
35956            decoder.debug_check_bounds::<Self>(offset);
35957            // Verify that padding bytes are zero.
35958            fidl::decode!(
35959                fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::Vector<u8, 2>>, 2>,
35960                D,
35961                &mut self.a,
35962                decoder,
35963                offset + 0,
35964                _depth
35965            )?;
35966            Ok(())
35967        }
35968    }
35969
35970    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInTable {
35971        type Borrowed<'a> = &'a Self;
35972        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35973            value
35974        }
35975    }
35976
35977    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInTable {
35978        type Owned = Self;
35979
35980        #[inline(always)]
35981        fn inline_align(_context: fidl::encoding::Context) -> usize {
35982            8
35983        }
35984
35985        #[inline(always)]
35986        fn inline_size(_context: fidl::encoding::Context) -> usize {
35987            16
35988        }
35989    }
35990
35991    unsafe impl<D: fidl::encoding::ResourceDialect>
35992        fidl::encoding::Encode<VectorWithLimitInTable, D> for &VectorWithLimitInTable
35993    {
35994        #[inline]
35995        unsafe fn encode(
35996            self,
35997            encoder: &mut fidl::encoding::Encoder<'_, D>,
35998            offset: usize,
35999            _depth: fidl::encoding::Depth,
36000        ) -> fidl::Result<()> {
36001            encoder.debug_check_bounds::<VectorWithLimitInTable>(offset);
36002            // Delegate to tuple encoding.
36003            fidl::encoding::Encode::<VectorWithLimitInTable, D>::encode(
36004                (<TableWithVectorWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
36005                encoder,
36006                offset,
36007                _depth,
36008            )
36009        }
36010    }
36011    unsafe impl<
36012        D: fidl::encoding::ResourceDialect,
36013        T0: fidl::encoding::Encode<TableWithVectorWithLimit, D>,
36014    > fidl::encoding::Encode<VectorWithLimitInTable, D> for (T0,)
36015    {
36016        #[inline]
36017        unsafe fn encode(
36018            self,
36019            encoder: &mut fidl::encoding::Encoder<'_, D>,
36020            offset: usize,
36021            depth: fidl::encoding::Depth,
36022        ) -> fidl::Result<()> {
36023            encoder.debug_check_bounds::<VectorWithLimitInTable>(offset);
36024            // Zero out padding regions. There's no need to apply masks
36025            // because the unmasked parts will be overwritten by fields.
36026            // Write the fields.
36027            self.0.encode(encoder, offset + 0, depth)?;
36028            Ok(())
36029        }
36030    }
36031
36032    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36033        for VectorWithLimitInTable
36034    {
36035        #[inline(always)]
36036        fn new_empty() -> Self {
36037            Self { t: fidl::new_empty!(TableWithVectorWithLimit, D) }
36038        }
36039
36040        #[inline]
36041        unsafe fn decode(
36042            &mut self,
36043            decoder: &mut fidl::encoding::Decoder<'_, D>,
36044            offset: usize,
36045            _depth: fidl::encoding::Depth,
36046        ) -> fidl::Result<()> {
36047            decoder.debug_check_bounds::<Self>(offset);
36048            // Verify that padding bytes are zero.
36049            fidl::decode!(TableWithVectorWithLimit, D, &mut self.t, decoder, offset + 0, _depth)?;
36050            Ok(())
36051        }
36052    }
36053
36054    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInUnion {
36055        type Borrowed<'a> = &'a Self;
36056        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36057            value
36058        }
36059    }
36060
36061    unsafe impl fidl::encoding::TypeMarker for VectorWithLimitInUnion {
36062        type Owned = Self;
36063
36064        #[inline(always)]
36065        fn inline_align(_context: fidl::encoding::Context) -> usize {
36066            8
36067        }
36068
36069        #[inline(always)]
36070        fn inline_size(_context: fidl::encoding::Context) -> usize {
36071            16
36072        }
36073    }
36074
36075    unsafe impl<D: fidl::encoding::ResourceDialect>
36076        fidl::encoding::Encode<VectorWithLimitInUnion, D> for &VectorWithLimitInUnion
36077    {
36078        #[inline]
36079        unsafe fn encode(
36080            self,
36081            encoder: &mut fidl::encoding::Encoder<'_, D>,
36082            offset: usize,
36083            _depth: fidl::encoding::Depth,
36084        ) -> fidl::Result<()> {
36085            encoder.debug_check_bounds::<VectorWithLimitInUnion>(offset);
36086            // Delegate to tuple encoding.
36087            fidl::encoding::Encode::<VectorWithLimitInUnion, D>::encode(
36088                (<UnionWithVectorWithLimit as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
36089                encoder,
36090                offset,
36091                _depth,
36092            )
36093        }
36094    }
36095    unsafe impl<
36096        D: fidl::encoding::ResourceDialect,
36097        T0: fidl::encoding::Encode<UnionWithVectorWithLimit, D>,
36098    > fidl::encoding::Encode<VectorWithLimitInUnion, D> for (T0,)
36099    {
36100        #[inline]
36101        unsafe fn encode(
36102            self,
36103            encoder: &mut fidl::encoding::Encoder<'_, D>,
36104            offset: usize,
36105            depth: fidl::encoding::Depth,
36106        ) -> fidl::Result<()> {
36107            encoder.debug_check_bounds::<VectorWithLimitInUnion>(offset);
36108            // Zero out padding regions. There's no need to apply masks
36109            // because the unmasked parts will be overwritten by fields.
36110            // Write the fields.
36111            self.0.encode(encoder, offset + 0, depth)?;
36112            Ok(())
36113        }
36114    }
36115
36116    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36117        for VectorWithLimitInUnion
36118    {
36119        #[inline(always)]
36120        fn new_empty() -> Self {
36121            Self { u: fidl::new_empty!(UnionWithVectorWithLimit, D) }
36122        }
36123
36124        #[inline]
36125        unsafe fn decode(
36126            &mut self,
36127            decoder: &mut fidl::encoding::Decoder<'_, D>,
36128            offset: usize,
36129            _depth: fidl::encoding::Depth,
36130        ) -> fidl::Result<()> {
36131            decoder.debug_check_bounds::<Self>(offset);
36132            // Verify that padding bytes are zero.
36133            fidl::decode!(UnionWithVectorWithLimit, D, &mut self.u, decoder, offset + 0, _depth)?;
36134            Ok(())
36135        }
36136    }
36137
36138    impl fidl::encoding::ValueTypeMarker for VectorWithLimitInVector {
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 VectorWithLimitInVector {
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>
36160        fidl::encoding::Encode<VectorWithLimitInVector, D> for &VectorWithLimitInVector
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::<VectorWithLimitInVector>(offset);
36170            // Delegate to tuple encoding.
36171            fidl::encoding::Encode::<VectorWithLimitInVector, D>::encode(
36172                (
36173                    <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
36174                ),
36175                encoder, offset, _depth
36176            )
36177        }
36178    }
36179    unsafe impl<
36180        D: fidl::encoding::ResourceDialect,
36181        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>, D>,
36182    > fidl::encoding::Encode<VectorWithLimitInVector, D> for (T0,)
36183    {
36184        #[inline]
36185        unsafe fn encode(
36186            self,
36187            encoder: &mut fidl::encoding::Encoder<'_, D>,
36188            offset: usize,
36189            depth: fidl::encoding::Depth,
36190        ) -> fidl::Result<()> {
36191            encoder.debug_check_bounds::<VectorWithLimitInVector>(offset);
36192            // Zero out padding regions. There's no need to apply masks
36193            // because the unmasked parts will be overwritten by fields.
36194            // Write the fields.
36195            self.0.encode(encoder, offset + 0, depth)?;
36196            Ok(())
36197        }
36198    }
36199
36200    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36201        for VectorWithLimitInVector
36202    {
36203        #[inline(always)]
36204        fn new_empty() -> Self {
36205            Self {
36206                v: fidl::new_empty!(
36207                    fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
36208                    D
36209                ),
36210            }
36211        }
36212
36213        #[inline]
36214        unsafe fn decode(
36215            &mut self,
36216            decoder: &mut fidl::encoding::Decoder<'_, D>,
36217            offset: usize,
36218            _depth: fidl::encoding::Depth,
36219        ) -> fidl::Result<()> {
36220            decoder.debug_check_bounds::<Self>(offset);
36221            // Verify that padding bytes are zero.
36222            fidl::decode!(
36223                fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 2>>,
36224                D,
36225                &mut self.v,
36226                decoder,
36227                offset + 0,
36228                _depth
36229            )?;
36230            Ok(())
36231        }
36232    }
36233
36234    impl fidl::encoding::ValueTypeMarker for VectorWrapper {
36235        type Borrowed<'a> = &'a Self;
36236        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36237            value
36238        }
36239    }
36240
36241    unsafe impl fidl::encoding::TypeMarker for VectorWrapper {
36242        type Owned = Self;
36243
36244        #[inline(always)]
36245        fn inline_align(_context: fidl::encoding::Context) -> usize {
36246            8
36247        }
36248
36249        #[inline(always)]
36250        fn inline_size(_context: fidl::encoding::Context) -> usize {
36251            16
36252        }
36253    }
36254
36255    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWrapper, D>
36256        for &VectorWrapper
36257    {
36258        #[inline]
36259        unsafe fn encode(
36260            self,
36261            encoder: &mut fidl::encoding::Encoder<'_, D>,
36262            offset: usize,
36263            _depth: fidl::encoding::Depth,
36264        ) -> fidl::Result<()> {
36265            encoder.debug_check_bounds::<VectorWrapper>(offset);
36266            // Delegate to tuple encoding.
36267            fidl::encoding::Encode::<VectorWrapper, D>::encode(
36268                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
36269                    &self.v,
36270                ),),
36271                encoder,
36272                offset,
36273                _depth,
36274            )
36275        }
36276    }
36277    unsafe impl<
36278        D: fidl::encoding::ResourceDialect,
36279        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
36280    > fidl::encoding::Encode<VectorWrapper, D> for (T0,)
36281    {
36282        #[inline]
36283        unsafe fn encode(
36284            self,
36285            encoder: &mut fidl::encoding::Encoder<'_, D>,
36286            offset: usize,
36287            depth: fidl::encoding::Depth,
36288        ) -> fidl::Result<()> {
36289            encoder.debug_check_bounds::<VectorWrapper>(offset);
36290            // Zero out padding regions. There's no need to apply masks
36291            // because the unmasked parts will be overwritten by fields.
36292            // Write the fields.
36293            self.0.encode(encoder, offset + 0, depth)?;
36294            Ok(())
36295        }
36296    }
36297
36298    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWrapper {
36299        #[inline(always)]
36300        fn new_empty() -> Self {
36301            Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
36302        }
36303
36304        #[inline]
36305        unsafe fn decode(
36306            &mut self,
36307            decoder: &mut fidl::encoding::Decoder<'_, D>,
36308            offset: usize,
36309            _depth: fidl::encoding::Depth,
36310        ) -> fidl::Result<()> {
36311            decoder.debug_check_bounds::<Self>(offset);
36312            // Verify that padding bytes are zero.
36313            fidl::decode!(
36314                fidl::encoding::UnboundedVector<u8>,
36315                D,
36316                &mut self.v,
36317                decoder,
36318                offset + 0,
36319                _depth
36320            )?;
36321            Ok(())
36322        }
36323    }
36324
36325    impl fidl::encoding::ValueTypeMarker for XUnionWithStructStruct {
36326        type Borrowed<'a> = &'a Self;
36327        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36328            value
36329        }
36330    }
36331
36332    unsafe impl fidl::encoding::TypeMarker for XUnionWithStructStruct {
36333        type Owned = Self;
36334
36335        #[inline(always)]
36336        fn inline_align(_context: fidl::encoding::Context) -> usize {
36337            8
36338        }
36339
36340        #[inline(always)]
36341        fn inline_size(_context: fidl::encoding::Context) -> usize {
36342            16
36343        }
36344    }
36345
36346    unsafe impl<D: fidl::encoding::ResourceDialect>
36347        fidl::encoding::Encode<XUnionWithStructStruct, D> for &XUnionWithStructStruct
36348    {
36349        #[inline]
36350        unsafe fn encode(
36351            self,
36352            encoder: &mut fidl::encoding::Encoder<'_, D>,
36353            offset: usize,
36354            _depth: fidl::encoding::Depth,
36355        ) -> fidl::Result<()> {
36356            encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
36357            // Delegate to tuple encoding.
36358            fidl::encoding::Encode::<XUnionWithStructStruct, D>::encode(
36359                (<XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
36360                encoder,
36361                offset,
36362                _depth,
36363            )
36364        }
36365    }
36366    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithStruct, D>>
36367        fidl::encoding::Encode<XUnionWithStructStruct, D> for (T0,)
36368    {
36369        #[inline]
36370        unsafe fn encode(
36371            self,
36372            encoder: &mut fidl::encoding::Encoder<'_, D>,
36373            offset: usize,
36374            depth: fidl::encoding::Depth,
36375        ) -> fidl::Result<()> {
36376            encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
36377            // Zero out padding regions. There's no need to apply masks
36378            // because the unmasked parts will be overwritten by fields.
36379            // Write the fields.
36380            self.0.encode(encoder, offset + 0, depth)?;
36381            Ok(())
36382        }
36383    }
36384
36385    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36386        for XUnionWithStructStruct
36387    {
36388        #[inline(always)]
36389        fn new_empty() -> Self {
36390            Self { xu: fidl::new_empty!(XUnionWithStruct, D) }
36391        }
36392
36393        #[inline]
36394        unsafe fn decode(
36395            &mut self,
36396            decoder: &mut fidl::encoding::Decoder<'_, D>,
36397            offset: usize,
36398            _depth: fidl::encoding::Depth,
36399        ) -> fidl::Result<()> {
36400            decoder.debug_check_bounds::<Self>(offset);
36401            // Verify that padding bytes are zero.
36402            fidl::decode!(XUnionWithStruct, D, &mut self.xu, decoder, offset + 0, _depth)?;
36403            Ok(())
36404        }
36405    }
36406
36407    impl fidl::encoding::ValueTypeMarker for XUnionWithXUnionStruct {
36408        type Borrowed<'a> = &'a Self;
36409        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36410            value
36411        }
36412    }
36413
36414    unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnionStruct {
36415        type Owned = Self;
36416
36417        #[inline(always)]
36418        fn inline_align(_context: fidl::encoding::Context) -> usize {
36419            8
36420        }
36421
36422        #[inline(always)]
36423        fn inline_size(_context: fidl::encoding::Context) -> usize {
36424            16
36425        }
36426    }
36427
36428    unsafe impl<D: fidl::encoding::ResourceDialect>
36429        fidl::encoding::Encode<XUnionWithXUnionStruct, D> for &XUnionWithXUnionStruct
36430    {
36431        #[inline]
36432        unsafe fn encode(
36433            self,
36434            encoder: &mut fidl::encoding::Encoder<'_, D>,
36435            offset: usize,
36436            _depth: fidl::encoding::Depth,
36437        ) -> fidl::Result<()> {
36438            encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
36439            // Delegate to tuple encoding.
36440            fidl::encoding::Encode::<XUnionWithXUnionStruct, D>::encode(
36441                (<XUnionWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
36442                encoder,
36443                offset,
36444                _depth,
36445            )
36446        }
36447    }
36448    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithXUnion, D>>
36449        fidl::encoding::Encode<XUnionWithXUnionStruct, D> for (T0,)
36450    {
36451        #[inline]
36452        unsafe fn encode(
36453            self,
36454            encoder: &mut fidl::encoding::Encoder<'_, D>,
36455            offset: usize,
36456            depth: fidl::encoding::Depth,
36457        ) -> fidl::Result<()> {
36458            encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
36459            // Zero out padding regions. There's no need to apply masks
36460            // because the unmasked parts will be overwritten by fields.
36461            // Write the fields.
36462            self.0.encode(encoder, offset + 0, depth)?;
36463            Ok(())
36464        }
36465    }
36466
36467    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36468        for XUnionWithXUnionStruct
36469    {
36470        #[inline(always)]
36471        fn new_empty() -> Self {
36472            Self { xu: fidl::new_empty!(XUnionWithXUnion, D) }
36473        }
36474
36475        #[inline]
36476        unsafe fn decode(
36477            &mut self,
36478            decoder: &mut fidl::encoding::Decoder<'_, D>,
36479            offset: usize,
36480            _depth: fidl::encoding::Depth,
36481        ) -> fidl::Result<()> {
36482            decoder.debug_check_bounds::<Self>(offset);
36483            // Verify that padding bytes are zero.
36484            fidl::decode!(XUnionWithXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
36485            Ok(())
36486        }
36487    }
36488
36489    impl CompatTableString {
36490        #[inline(always)]
36491        fn max_ordinal_present(&self) -> u64 {
36492            if let Some(_) = self.s {
36493                return 1;
36494            }
36495            0
36496        }
36497    }
36498
36499    impl fidl::encoding::ValueTypeMarker for CompatTableString {
36500        type Borrowed<'a> = &'a Self;
36501        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36502            value
36503        }
36504    }
36505
36506    unsafe impl fidl::encoding::TypeMarker for CompatTableString {
36507        type Owned = Self;
36508
36509        #[inline(always)]
36510        fn inline_align(_context: fidl::encoding::Context) -> usize {
36511            8
36512        }
36513
36514        #[inline(always)]
36515        fn inline_size(_context: fidl::encoding::Context) -> usize {
36516            16
36517        }
36518    }
36519
36520    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableString, D>
36521        for &CompatTableString
36522    {
36523        unsafe fn encode(
36524            self,
36525            encoder: &mut fidl::encoding::Encoder<'_, D>,
36526            offset: usize,
36527            mut depth: fidl::encoding::Depth,
36528        ) -> fidl::Result<()> {
36529            encoder.debug_check_bounds::<CompatTableString>(offset);
36530            // Vector header
36531            let max_ordinal: u64 = self.max_ordinal_present();
36532            encoder.write_num(max_ordinal, offset);
36533            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36534            // Calling encoder.out_of_line_offset(0) is not allowed.
36535            if max_ordinal == 0 {
36536                return Ok(());
36537            }
36538            depth.increment()?;
36539            let envelope_size = 8;
36540            let bytes_len = max_ordinal as usize * envelope_size;
36541            #[allow(unused_variables)]
36542            let offset = encoder.out_of_line_offset(bytes_len);
36543            let mut _prev_end_offset: usize = 0;
36544            if 1 > max_ordinal {
36545                return Ok(());
36546            }
36547
36548            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36549            // are envelope_size bytes.
36550            let cur_offset: usize = (1 - 1) * envelope_size;
36551
36552            // Zero reserved fields.
36553            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36554
36555            // Safety:
36556            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36557            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36558            //   envelope_size bytes, there is always sufficient room.
36559            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
36560                self.s.as_ref().map(
36561                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
36562                ),
36563                encoder,
36564                offset + cur_offset,
36565                depth,
36566            )?;
36567
36568            _prev_end_offset = cur_offset + envelope_size;
36569
36570            Ok(())
36571        }
36572    }
36573
36574    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableString {
36575        #[inline(always)]
36576        fn new_empty() -> Self {
36577            Self::default()
36578        }
36579
36580        unsafe fn decode(
36581            &mut self,
36582            decoder: &mut fidl::encoding::Decoder<'_, D>,
36583            offset: usize,
36584            mut depth: fidl::encoding::Depth,
36585        ) -> fidl::Result<()> {
36586            decoder.debug_check_bounds::<Self>(offset);
36587            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36588                None => return Err(fidl::Error::NotNullable),
36589                Some(len) => len,
36590            };
36591            // Calling decoder.out_of_line_offset(0) is not allowed.
36592            if len == 0 {
36593                return Ok(());
36594            };
36595            depth.increment()?;
36596            let envelope_size = 8;
36597            let bytes_len = len * envelope_size;
36598            let offset = decoder.out_of_line_offset(bytes_len)?;
36599            // Decode the envelope for each type.
36600            let mut _next_ordinal_to_read = 0;
36601            let mut next_offset = offset;
36602            let end_offset = offset + bytes_len;
36603            _next_ordinal_to_read += 1;
36604            if next_offset >= end_offset {
36605                return Ok(());
36606            }
36607
36608            // Decode unknown envelopes for gaps in ordinals.
36609            while _next_ordinal_to_read < 1 {
36610                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36611                _next_ordinal_to_read += 1;
36612                next_offset += envelope_size;
36613            }
36614
36615            let next_out_of_line = decoder.next_out_of_line();
36616            let handles_before = decoder.remaining_handles();
36617            if let Some((inlined, num_bytes, num_handles)) =
36618                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36619            {
36620                let member_inline_size =
36621                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
36622                        decoder.context,
36623                    );
36624                if inlined != (member_inline_size <= 4) {
36625                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36626                }
36627                let inner_offset;
36628                let mut inner_depth = depth.clone();
36629                if inlined {
36630                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36631                    inner_offset = next_offset;
36632                } else {
36633                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36634                    inner_depth.increment()?;
36635                }
36636                let val_ref = self
36637                    .s
36638                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
36639                fidl::decode!(
36640                    fidl::encoding::UnboundedString,
36641                    D,
36642                    val_ref,
36643                    decoder,
36644                    inner_offset,
36645                    inner_depth
36646                )?;
36647                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36648                {
36649                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36650                }
36651                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36652                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36653                }
36654            }
36655
36656            next_offset += envelope_size;
36657
36658            // Decode the remaining unknown envelopes.
36659            while next_offset < end_offset {
36660                _next_ordinal_to_read += 1;
36661                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36662                next_offset += envelope_size;
36663            }
36664
36665            Ok(())
36666        }
36667    }
36668
36669    impl CompatTableValue {
36670        #[inline(always)]
36671        fn max_ordinal_present(&self) -> u64 {
36672            if let Some(_) = self.xunion_member {
36673                return 4;
36674            }
36675            if let Some(_) = self.table_member {
36676                return 3;
36677            }
36678            if let Some(_) = self.array_member {
36679                return 2;
36680            }
36681            if let Some(_) = self.union_member {
36682                return 1;
36683            }
36684            0
36685        }
36686    }
36687
36688    impl fidl::encoding::ValueTypeMarker for CompatTableValue {
36689        type Borrowed<'a> = &'a Self;
36690        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36691            value
36692        }
36693    }
36694
36695    unsafe impl fidl::encoding::TypeMarker for CompatTableValue {
36696        type Owned = Self;
36697
36698        #[inline(always)]
36699        fn inline_align(_context: fidl::encoding::Context) -> usize {
36700            8
36701        }
36702
36703        #[inline(always)]
36704        fn inline_size(_context: fidl::encoding::Context) -> usize {
36705            16
36706        }
36707    }
36708
36709    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableValue, D>
36710        for &CompatTableValue
36711    {
36712        unsafe fn encode(
36713            self,
36714            encoder: &mut fidl::encoding::Encoder<'_, D>,
36715            offset: usize,
36716            mut depth: fidl::encoding::Depth,
36717        ) -> fidl::Result<()> {
36718            encoder.debug_check_bounds::<CompatTableValue>(offset);
36719            // Vector header
36720            let max_ordinal: u64 = self.max_ordinal_present();
36721            encoder.write_num(max_ordinal, offset);
36722            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36723            // Calling encoder.out_of_line_offset(0) is not allowed.
36724            if max_ordinal == 0 {
36725                return Ok(());
36726            }
36727            depth.increment()?;
36728            let envelope_size = 8;
36729            let bytes_len = max_ordinal as usize * envelope_size;
36730            #[allow(unused_variables)]
36731            let offset = encoder.out_of_line_offset(bytes_len);
36732            let mut _prev_end_offset: usize = 0;
36733            if 1 > max_ordinal {
36734                return Ok(());
36735            }
36736
36737            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36738            // are envelope_size bytes.
36739            let cur_offset: usize = (1 - 1) * envelope_size;
36740
36741            // Zero reserved fields.
36742            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36743
36744            // Safety:
36745            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36746            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36747            //   envelope_size bytes, there is always sufficient room.
36748            fidl::encoding::encode_in_envelope_optional::<CompatUnion, D>(
36749                self.union_member
36750                    .as_ref()
36751                    .map(<CompatUnion as fidl::encoding::ValueTypeMarker>::borrow),
36752                encoder,
36753                offset + cur_offset,
36754                depth,
36755            )?;
36756
36757            _prev_end_offset = cur_offset + envelope_size;
36758            if 2 > max_ordinal {
36759                return Ok(());
36760            }
36761
36762            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36763            // are envelope_size bytes.
36764            let cur_offset: usize = (2 - 1) * envelope_size;
36765
36766            // Zero reserved fields.
36767            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36768
36769            // Safety:
36770            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36771            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36772            //   envelope_size bytes, there is always sufficient room.
36773            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u32, 3>, D>(
36774                self.array_member.as_ref().map(
36775                    <fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow,
36776                ),
36777                encoder,
36778                offset + cur_offset,
36779                depth,
36780            )?;
36781
36782            _prev_end_offset = cur_offset + envelope_size;
36783            if 3 > max_ordinal {
36784                return Ok(());
36785            }
36786
36787            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36788            // are envelope_size bytes.
36789            let cur_offset: usize = (3 - 1) * envelope_size;
36790
36791            // Zero reserved fields.
36792            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36793
36794            // Safety:
36795            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36796            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36797            //   envelope_size bytes, there is always sufficient room.
36798            fidl::encoding::encode_in_envelope_optional::<CompatTableString, D>(
36799                self.table_member
36800                    .as_ref()
36801                    .map(<CompatTableString as fidl::encoding::ValueTypeMarker>::borrow),
36802                encoder,
36803                offset + cur_offset,
36804                depth,
36805            )?;
36806
36807            _prev_end_offset = cur_offset + envelope_size;
36808            if 4 > max_ordinal {
36809                return Ok(());
36810            }
36811
36812            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
36813            // are envelope_size bytes.
36814            let cur_offset: usize = (4 - 1) * envelope_size;
36815
36816            // Zero reserved fields.
36817            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36818
36819            // Safety:
36820            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
36821            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
36822            //   envelope_size bytes, there is always sufficient room.
36823            fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
36824                self.xunion_member
36825                    .as_ref()
36826                    .map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
36827                encoder,
36828                offset + cur_offset,
36829                depth,
36830            )?;
36831
36832            _prev_end_offset = cur_offset + envelope_size;
36833
36834            Ok(())
36835        }
36836    }
36837
36838    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableValue {
36839        #[inline(always)]
36840        fn new_empty() -> Self {
36841            Self::default()
36842        }
36843
36844        unsafe fn decode(
36845            &mut self,
36846            decoder: &mut fidl::encoding::Decoder<'_, D>,
36847            offset: usize,
36848            mut depth: fidl::encoding::Depth,
36849        ) -> fidl::Result<()> {
36850            decoder.debug_check_bounds::<Self>(offset);
36851            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36852                None => return Err(fidl::Error::NotNullable),
36853                Some(len) => len,
36854            };
36855            // Calling decoder.out_of_line_offset(0) is not allowed.
36856            if len == 0 {
36857                return Ok(());
36858            };
36859            depth.increment()?;
36860            let envelope_size = 8;
36861            let bytes_len = len * envelope_size;
36862            let offset = decoder.out_of_line_offset(bytes_len)?;
36863            // Decode the envelope for each type.
36864            let mut _next_ordinal_to_read = 0;
36865            let mut next_offset = offset;
36866            let end_offset = offset + bytes_len;
36867            _next_ordinal_to_read += 1;
36868            if next_offset >= end_offset {
36869                return Ok(());
36870            }
36871
36872            // Decode unknown envelopes for gaps in ordinals.
36873            while _next_ordinal_to_read < 1 {
36874                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36875                _next_ordinal_to_read += 1;
36876                next_offset += envelope_size;
36877            }
36878
36879            let next_out_of_line = decoder.next_out_of_line();
36880            let handles_before = decoder.remaining_handles();
36881            if let Some((inlined, num_bytes, num_handles)) =
36882                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36883            {
36884                let member_inline_size =
36885                    <CompatUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36886                if inlined != (member_inline_size <= 4) {
36887                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36888                }
36889                let inner_offset;
36890                let mut inner_depth = depth.clone();
36891                if inlined {
36892                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36893                    inner_offset = next_offset;
36894                } else {
36895                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36896                    inner_depth.increment()?;
36897                }
36898                let val_ref =
36899                    self.union_member.get_or_insert_with(|| fidl::new_empty!(CompatUnion, D));
36900                fidl::decode!(CompatUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
36901                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36902                {
36903                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36904                }
36905                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36906                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36907                }
36908            }
36909
36910            next_offset += envelope_size;
36911            _next_ordinal_to_read += 1;
36912            if next_offset >= end_offset {
36913                return Ok(());
36914            }
36915
36916            // Decode unknown envelopes for gaps in ordinals.
36917            while _next_ordinal_to_read < 2 {
36918                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36919                _next_ordinal_to_read += 1;
36920                next_offset += envelope_size;
36921            }
36922
36923            let next_out_of_line = decoder.next_out_of_line();
36924            let handles_before = decoder.remaining_handles();
36925            if let Some((inlined, num_bytes, num_handles)) =
36926                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36927            {
36928                let member_inline_size =
36929                    <fidl::encoding::Array<u32, 3> as fidl::encoding::TypeMarker>::inline_size(
36930                        decoder.context,
36931                    );
36932                if inlined != (member_inline_size <= 4) {
36933                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36934                }
36935                let inner_offset;
36936                let mut inner_depth = depth.clone();
36937                if inlined {
36938                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36939                    inner_offset = next_offset;
36940                } else {
36941                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36942                    inner_depth.increment()?;
36943                }
36944                let val_ref = self
36945                    .array_member
36946                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u32, 3>, D));
36947                fidl::decode!(fidl::encoding::Array<u32, 3>, D, val_ref, decoder, inner_offset, inner_depth)?;
36948                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36949                {
36950                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36951                }
36952                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36953                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36954                }
36955            }
36956
36957            next_offset += envelope_size;
36958            _next_ordinal_to_read += 1;
36959            if next_offset >= end_offset {
36960                return Ok(());
36961            }
36962
36963            // Decode unknown envelopes for gaps in ordinals.
36964            while _next_ordinal_to_read < 3 {
36965                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36966                _next_ordinal_to_read += 1;
36967                next_offset += envelope_size;
36968            }
36969
36970            let next_out_of_line = decoder.next_out_of_line();
36971            let handles_before = decoder.remaining_handles();
36972            if let Some((inlined, num_bytes, num_handles)) =
36973                fidl::encoding::decode_envelope_header(decoder, next_offset)?
36974            {
36975                let member_inline_size =
36976                    <CompatTableString as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36977                if inlined != (member_inline_size <= 4) {
36978                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
36979                }
36980                let inner_offset;
36981                let mut inner_depth = depth.clone();
36982                if inlined {
36983                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36984                    inner_offset = next_offset;
36985                } else {
36986                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36987                    inner_depth.increment()?;
36988                }
36989                let val_ref =
36990                    self.table_member.get_or_insert_with(|| fidl::new_empty!(CompatTableString, D));
36991                fidl::decode!(CompatTableString, D, val_ref, decoder, inner_offset, inner_depth)?;
36992                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36993                {
36994                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
36995                }
36996                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36997                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36998                }
36999            }
37000
37001            next_offset += envelope_size;
37002            _next_ordinal_to_read += 1;
37003            if next_offset >= end_offset {
37004                return Ok(());
37005            }
37006
37007            // Decode unknown envelopes for gaps in ordinals.
37008            while _next_ordinal_to_read < 4 {
37009                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37010                _next_ordinal_to_read += 1;
37011                next_offset += envelope_size;
37012            }
37013
37014            let next_out_of_line = decoder.next_out_of_line();
37015            let handles_before = decoder.remaining_handles();
37016            if let Some((inlined, num_bytes, num_handles)) =
37017                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37018            {
37019                let member_inline_size =
37020                    <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37021                if inlined != (member_inline_size <= 4) {
37022                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37023                }
37024                let inner_offset;
37025                let mut inner_depth = depth.clone();
37026                if inlined {
37027                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37028                    inner_offset = next_offset;
37029                } else {
37030                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37031                    inner_depth.increment()?;
37032                }
37033                let val_ref =
37034                    self.xunion_member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
37035                fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
37036                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37037                {
37038                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37039                }
37040                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37041                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37042                }
37043            }
37044
37045            next_offset += envelope_size;
37046
37047            // Decode the remaining unknown envelopes.
37048            while next_offset < end_offset {
37049                _next_ordinal_to_read += 1;
37050                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37051                next_offset += envelope_size;
37052            }
37053
37054            Ok(())
37055        }
37056    }
37057
37058    impl EmptyTable {
37059        #[inline(always)]
37060        fn max_ordinal_present(&self) -> u64 {
37061            0
37062        }
37063    }
37064
37065    impl fidl::encoding::ValueTypeMarker for EmptyTable {
37066        type Borrowed<'a> = &'a Self;
37067        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37068            value
37069        }
37070    }
37071
37072    unsafe impl fidl::encoding::TypeMarker for EmptyTable {
37073        type Owned = Self;
37074
37075        #[inline(always)]
37076        fn inline_align(_context: fidl::encoding::Context) -> usize {
37077            8
37078        }
37079
37080        #[inline(always)]
37081        fn inline_size(_context: fidl::encoding::Context) -> usize {
37082            16
37083        }
37084    }
37085
37086    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyTable, D>
37087        for &EmptyTable
37088    {
37089        unsafe fn encode(
37090            self,
37091            encoder: &mut fidl::encoding::Encoder<'_, D>,
37092            offset: usize,
37093            mut depth: fidl::encoding::Depth,
37094        ) -> fidl::Result<()> {
37095            encoder.debug_check_bounds::<EmptyTable>(offset);
37096            // Vector header
37097            let max_ordinal: u64 = self.max_ordinal_present();
37098            encoder.write_num(max_ordinal, offset);
37099            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37100            // Calling encoder.out_of_line_offset(0) is not allowed.
37101            if max_ordinal == 0 {
37102                return Ok(());
37103            }
37104            depth.increment()?;
37105            let envelope_size = 8;
37106            let bytes_len = max_ordinal as usize * envelope_size;
37107            #[allow(unused_variables)]
37108            let offset = encoder.out_of_line_offset(bytes_len);
37109            let mut _prev_end_offset: usize = 0;
37110
37111            Ok(())
37112        }
37113    }
37114
37115    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyTable {
37116        #[inline(always)]
37117        fn new_empty() -> Self {
37118            Self::default()
37119        }
37120
37121        unsafe fn decode(
37122            &mut self,
37123            decoder: &mut fidl::encoding::Decoder<'_, D>,
37124            offset: usize,
37125            mut depth: fidl::encoding::Depth,
37126        ) -> fidl::Result<()> {
37127            decoder.debug_check_bounds::<Self>(offset);
37128            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37129                None => return Err(fidl::Error::NotNullable),
37130                Some(len) => len,
37131            };
37132            // Calling decoder.out_of_line_offset(0) is not allowed.
37133            if len == 0 {
37134                return Ok(());
37135            };
37136            depth.increment()?;
37137            let envelope_size = 8;
37138            let bytes_len = len * envelope_size;
37139            let offset = decoder.out_of_line_offset(bytes_len)?;
37140            // Decode the envelope for each type.
37141            let mut _next_ordinal_to_read = 0;
37142            let mut next_offset = offset;
37143            let end_offset = offset + bytes_len;
37144
37145            // Decode the remaining unknown envelopes.
37146            while next_offset < end_offset {
37147                _next_ordinal_to_read += 1;
37148                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37149                next_offset += envelope_size;
37150            }
37151
37152            Ok(())
37153        }
37154    }
37155
37156    impl FidlvizTable {
37157        #[inline(always)]
37158        fn max_ordinal_present(&self) -> u64 {
37159            if let Some(_) = self.f3 {
37160                return 3;
37161            }
37162            if let Some(_) = self.f1 {
37163                return 1;
37164            }
37165            0
37166        }
37167    }
37168
37169    impl fidl::encoding::ValueTypeMarker for FidlvizTable {
37170        type Borrowed<'a> = &'a Self;
37171        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37172            value
37173        }
37174    }
37175
37176    unsafe impl fidl::encoding::TypeMarker for FidlvizTable {
37177        type Owned = Self;
37178
37179        #[inline(always)]
37180        fn inline_align(_context: fidl::encoding::Context) -> usize {
37181            8
37182        }
37183
37184        #[inline(always)]
37185        fn inline_size(_context: fidl::encoding::Context) -> usize {
37186            16
37187        }
37188    }
37189
37190    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizTable, D>
37191        for &FidlvizTable
37192    {
37193        unsafe fn encode(
37194            self,
37195            encoder: &mut fidl::encoding::Encoder<'_, D>,
37196            offset: usize,
37197            mut depth: fidl::encoding::Depth,
37198        ) -> fidl::Result<()> {
37199            encoder.debug_check_bounds::<FidlvizTable>(offset);
37200            // Vector header
37201            let max_ordinal: u64 = self.max_ordinal_present();
37202            encoder.write_num(max_ordinal, offset);
37203            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37204            // Calling encoder.out_of_line_offset(0) is not allowed.
37205            if max_ordinal == 0 {
37206                return Ok(());
37207            }
37208            depth.increment()?;
37209            let envelope_size = 8;
37210            let bytes_len = max_ordinal as usize * envelope_size;
37211            #[allow(unused_variables)]
37212            let offset = encoder.out_of_line_offset(bytes_len);
37213            let mut _prev_end_offset: usize = 0;
37214            if 1 > max_ordinal {
37215                return Ok(());
37216            }
37217
37218            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37219            // are envelope_size bytes.
37220            let cur_offset: usize = (1 - 1) * envelope_size;
37221
37222            // Zero reserved fields.
37223            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37224
37225            // Safety:
37226            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37227            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37228            //   envelope_size bytes, there is always sufficient room.
37229            fidl::encoding::encode_in_envelope_optional::<bool, D>(
37230                self.f1.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
37231                encoder,
37232                offset + cur_offset,
37233                depth,
37234            )?;
37235
37236            _prev_end_offset = cur_offset + envelope_size;
37237            if 3 > max_ordinal {
37238                return Ok(());
37239            }
37240
37241            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37242            // are envelope_size bytes.
37243            let cur_offset: usize = (3 - 1) * envelope_size;
37244
37245            // Zero reserved fields.
37246            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37247
37248            // Safety:
37249            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37250            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37251            //   envelope_size bytes, there is always sufficient room.
37252            fidl::encoding::encode_in_envelope_optional::<bool, D>(
37253                self.f3.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
37254                encoder,
37255                offset + cur_offset,
37256                depth,
37257            )?;
37258
37259            _prev_end_offset = cur_offset + envelope_size;
37260
37261            Ok(())
37262        }
37263    }
37264
37265    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizTable {
37266        #[inline(always)]
37267        fn new_empty() -> Self {
37268            Self::default()
37269        }
37270
37271        unsafe fn decode(
37272            &mut self,
37273            decoder: &mut fidl::encoding::Decoder<'_, D>,
37274            offset: usize,
37275            mut depth: fidl::encoding::Depth,
37276        ) -> fidl::Result<()> {
37277            decoder.debug_check_bounds::<Self>(offset);
37278            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37279                None => return Err(fidl::Error::NotNullable),
37280                Some(len) => len,
37281            };
37282            // Calling decoder.out_of_line_offset(0) is not allowed.
37283            if len == 0 {
37284                return Ok(());
37285            };
37286            depth.increment()?;
37287            let envelope_size = 8;
37288            let bytes_len = len * envelope_size;
37289            let offset = decoder.out_of_line_offset(bytes_len)?;
37290            // Decode the envelope for each type.
37291            let mut _next_ordinal_to_read = 0;
37292            let mut next_offset = offset;
37293            let end_offset = offset + bytes_len;
37294            _next_ordinal_to_read += 1;
37295            if next_offset >= end_offset {
37296                return Ok(());
37297            }
37298
37299            // Decode unknown envelopes for gaps in ordinals.
37300            while _next_ordinal_to_read < 1 {
37301                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37302                _next_ordinal_to_read += 1;
37303                next_offset += envelope_size;
37304            }
37305
37306            let next_out_of_line = decoder.next_out_of_line();
37307            let handles_before = decoder.remaining_handles();
37308            if let Some((inlined, num_bytes, num_handles)) =
37309                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37310            {
37311                let member_inline_size =
37312                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37313                if inlined != (member_inline_size <= 4) {
37314                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37315                }
37316                let inner_offset;
37317                let mut inner_depth = depth.clone();
37318                if inlined {
37319                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37320                    inner_offset = next_offset;
37321                } else {
37322                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37323                    inner_depth.increment()?;
37324                }
37325                let val_ref = self.f1.get_or_insert_with(|| fidl::new_empty!(bool, D));
37326                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
37327                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37328                {
37329                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37330                }
37331                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37332                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37333                }
37334            }
37335
37336            next_offset += envelope_size;
37337            _next_ordinal_to_read += 1;
37338            if next_offset >= end_offset {
37339                return Ok(());
37340            }
37341
37342            // Decode unknown envelopes for gaps in ordinals.
37343            while _next_ordinal_to_read < 3 {
37344                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37345                _next_ordinal_to_read += 1;
37346                next_offset += envelope_size;
37347            }
37348
37349            let next_out_of_line = decoder.next_out_of_line();
37350            let handles_before = decoder.remaining_handles();
37351            if let Some((inlined, num_bytes, num_handles)) =
37352                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37353            {
37354                let member_inline_size =
37355                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37356                if inlined != (member_inline_size <= 4) {
37357                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37358                }
37359                let inner_offset;
37360                let mut inner_depth = depth.clone();
37361                if inlined {
37362                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37363                    inner_offset = next_offset;
37364                } else {
37365                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37366                    inner_depth.increment()?;
37367                }
37368                let val_ref = self.f3.get_or_insert_with(|| fidl::new_empty!(bool, D));
37369                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
37370                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37371                {
37372                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37373                }
37374                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37375                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37376                }
37377            }
37378
37379            next_offset += envelope_size;
37380
37381            // Decode the remaining unknown envelopes.
37382            while next_offset < end_offset {
37383                _next_ordinal_to_read += 1;
37384                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37385                next_offset += envelope_size;
37386            }
37387
37388            Ok(())
37389        }
37390    }
37391
37392    impl GoldenTable {
37393        #[inline(always)]
37394        fn max_ordinal_present(&self) -> u64 {
37395            if let Some(_) = self.v {
37396                return 1;
37397            }
37398            0
37399        }
37400    }
37401
37402    impl fidl::encoding::ValueTypeMarker for GoldenTable {
37403        type Borrowed<'a> = &'a Self;
37404        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37405            value
37406        }
37407    }
37408
37409    unsafe impl fidl::encoding::TypeMarker for GoldenTable {
37410        type Owned = Self;
37411
37412        #[inline(always)]
37413        fn inline_align(_context: fidl::encoding::Context) -> usize {
37414            8
37415        }
37416
37417        #[inline(always)]
37418        fn inline_size(_context: fidl::encoding::Context) -> usize {
37419            16
37420        }
37421    }
37422
37423    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTable, D>
37424        for &GoldenTable
37425    {
37426        unsafe fn encode(
37427            self,
37428            encoder: &mut fidl::encoding::Encoder<'_, D>,
37429            offset: usize,
37430            mut depth: fidl::encoding::Depth,
37431        ) -> fidl::Result<()> {
37432            encoder.debug_check_bounds::<GoldenTable>(offset);
37433            // Vector header
37434            let max_ordinal: u64 = self.max_ordinal_present();
37435            encoder.write_num(max_ordinal, offset);
37436            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37437            // Calling encoder.out_of_line_offset(0) is not allowed.
37438            if max_ordinal == 0 {
37439                return Ok(());
37440            }
37441            depth.increment()?;
37442            let envelope_size = 8;
37443            let bytes_len = max_ordinal as usize * envelope_size;
37444            #[allow(unused_variables)]
37445            let offset = encoder.out_of_line_offset(bytes_len);
37446            let mut _prev_end_offset: usize = 0;
37447            if 1 > max_ordinal {
37448                return Ok(());
37449            }
37450
37451            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37452            // are envelope_size bytes.
37453            let cur_offset: usize = (1 - 1) * envelope_size;
37454
37455            // Zero reserved fields.
37456            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37457
37458            // Safety:
37459            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37460            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37461            //   envelope_size bytes, there is always sufficient room.
37462            fidl::encoding::encode_in_envelope_optional::<i16, D>(
37463                self.v.as_ref().map(<i16 as fidl::encoding::ValueTypeMarker>::borrow),
37464                encoder,
37465                offset + cur_offset,
37466                depth,
37467            )?;
37468
37469            _prev_end_offset = cur_offset + envelope_size;
37470
37471            Ok(())
37472        }
37473    }
37474
37475    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTable {
37476        #[inline(always)]
37477        fn new_empty() -> Self {
37478            Self::default()
37479        }
37480
37481        unsafe fn decode(
37482            &mut self,
37483            decoder: &mut fidl::encoding::Decoder<'_, D>,
37484            offset: usize,
37485            mut depth: fidl::encoding::Depth,
37486        ) -> fidl::Result<()> {
37487            decoder.debug_check_bounds::<Self>(offset);
37488            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37489                None => return Err(fidl::Error::NotNullable),
37490                Some(len) => len,
37491            };
37492            // Calling decoder.out_of_line_offset(0) is not allowed.
37493            if len == 0 {
37494                return Ok(());
37495            };
37496            depth.increment()?;
37497            let envelope_size = 8;
37498            let bytes_len = len * envelope_size;
37499            let offset = decoder.out_of_line_offset(bytes_len)?;
37500            // Decode the envelope for each type.
37501            let mut _next_ordinal_to_read = 0;
37502            let mut next_offset = offset;
37503            let end_offset = offset + bytes_len;
37504            _next_ordinal_to_read += 1;
37505            if next_offset >= end_offset {
37506                return Ok(());
37507            }
37508
37509            // Decode unknown envelopes for gaps in ordinals.
37510            while _next_ordinal_to_read < 1 {
37511                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37512                _next_ordinal_to_read += 1;
37513                next_offset += envelope_size;
37514            }
37515
37516            let next_out_of_line = decoder.next_out_of_line();
37517            let handles_before = decoder.remaining_handles();
37518            if let Some((inlined, num_bytes, num_handles)) =
37519                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37520            {
37521                let member_inline_size =
37522                    <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37523                if inlined != (member_inline_size <= 4) {
37524                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37525                }
37526                let inner_offset;
37527                let mut inner_depth = depth.clone();
37528                if inlined {
37529                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37530                    inner_offset = next_offset;
37531                } else {
37532                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37533                    inner_depth.increment()?;
37534                }
37535                let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i16, D));
37536                fidl::decode!(i16, D, val_ref, decoder, inner_offset, inner_depth)?;
37537                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37538                {
37539                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37540                }
37541                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37542                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37543                }
37544            }
37545
37546            next_offset += envelope_size;
37547
37548            // Decode the remaining unknown envelopes.
37549            while next_offset < end_offset {
37550                _next_ordinal_to_read += 1;
37551                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37552                next_offset += envelope_size;
37553            }
37554
37555            Ok(())
37556        }
37557    }
37558
37559    impl PaddedTable {
37560        #[inline(always)]
37561        fn max_ordinal_present(&self) -> u64 {
37562            if let Some(_) = self.field {
37563                return 1;
37564            }
37565            0
37566        }
37567    }
37568
37569    impl fidl::encoding::ValueTypeMarker for PaddedTable {
37570        type Borrowed<'a> = &'a Self;
37571        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37572            value
37573        }
37574    }
37575
37576    unsafe impl fidl::encoding::TypeMarker for PaddedTable {
37577        type Owned = Self;
37578
37579        #[inline(always)]
37580        fn inline_align(_context: fidl::encoding::Context) -> usize {
37581            8
37582        }
37583
37584        #[inline(always)]
37585        fn inline_size(_context: fidl::encoding::Context) -> usize {
37586            16
37587        }
37588    }
37589
37590    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTable, D>
37591        for &PaddedTable
37592    {
37593        unsafe fn encode(
37594            self,
37595            encoder: &mut fidl::encoding::Encoder<'_, D>,
37596            offset: usize,
37597            mut depth: fidl::encoding::Depth,
37598        ) -> fidl::Result<()> {
37599            encoder.debug_check_bounds::<PaddedTable>(offset);
37600            // Vector header
37601            let max_ordinal: u64 = self.max_ordinal_present();
37602            encoder.write_num(max_ordinal, offset);
37603            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37604            // Calling encoder.out_of_line_offset(0) is not allowed.
37605            if max_ordinal == 0 {
37606                return Ok(());
37607            }
37608            depth.increment()?;
37609            let envelope_size = 8;
37610            let bytes_len = max_ordinal as usize * envelope_size;
37611            #[allow(unused_variables)]
37612            let offset = encoder.out_of_line_offset(bytes_len);
37613            let mut _prev_end_offset: usize = 0;
37614            if 1 > max_ordinal {
37615                return Ok(());
37616            }
37617
37618            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37619            // are envelope_size bytes.
37620            let cur_offset: usize = (1 - 1) * envelope_size;
37621
37622            // Zero reserved fields.
37623            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37624
37625            // Safety:
37626            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37627            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37628            //   envelope_size bytes, there is always sufficient room.
37629            fidl::encoding::encode_in_envelope_optional::<i8, D>(
37630                self.field.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
37631                encoder,
37632                offset + cur_offset,
37633                depth,
37634            )?;
37635
37636            _prev_end_offset = cur_offset + envelope_size;
37637
37638            Ok(())
37639        }
37640    }
37641
37642    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTable {
37643        #[inline(always)]
37644        fn new_empty() -> Self {
37645            Self::default()
37646        }
37647
37648        unsafe fn decode(
37649            &mut self,
37650            decoder: &mut fidl::encoding::Decoder<'_, D>,
37651            offset: usize,
37652            mut depth: fidl::encoding::Depth,
37653        ) -> fidl::Result<()> {
37654            decoder.debug_check_bounds::<Self>(offset);
37655            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37656                None => return Err(fidl::Error::NotNullable),
37657                Some(len) => len,
37658            };
37659            // Calling decoder.out_of_line_offset(0) is not allowed.
37660            if len == 0 {
37661                return Ok(());
37662            };
37663            depth.increment()?;
37664            let envelope_size = 8;
37665            let bytes_len = len * envelope_size;
37666            let offset = decoder.out_of_line_offset(bytes_len)?;
37667            // Decode the envelope for each type.
37668            let mut _next_ordinal_to_read = 0;
37669            let mut next_offset = offset;
37670            let end_offset = offset + bytes_len;
37671            _next_ordinal_to_read += 1;
37672            if next_offset >= end_offset {
37673                return Ok(());
37674            }
37675
37676            // Decode unknown envelopes for gaps in ordinals.
37677            while _next_ordinal_to_read < 1 {
37678                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37679                _next_ordinal_to_read += 1;
37680                next_offset += envelope_size;
37681            }
37682
37683            let next_out_of_line = decoder.next_out_of_line();
37684            let handles_before = decoder.remaining_handles();
37685            if let Some((inlined, num_bytes, num_handles)) =
37686                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37687            {
37688                let member_inline_size =
37689                    <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37690                if inlined != (member_inline_size <= 4) {
37691                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37692                }
37693                let inner_offset;
37694                let mut inner_depth = depth.clone();
37695                if inlined {
37696                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37697                    inner_offset = next_offset;
37698                } else {
37699                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37700                    inner_depth.increment()?;
37701                }
37702                let val_ref = self.field.get_or_insert_with(|| fidl::new_empty!(i8, D));
37703                fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
37704                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37705                {
37706                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37707                }
37708                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37709                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37710                }
37711            }
37712
37713            next_offset += envelope_size;
37714
37715            // Decode the remaining unknown envelopes.
37716            while next_offset < end_offset {
37717                _next_ordinal_to_read += 1;
37718                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37719                next_offset += envelope_size;
37720            }
37721
37722            Ok(())
37723        }
37724    }
37725
37726    impl RecursiveOptionalAndTable {
37727        #[inline(always)]
37728        fn max_ordinal_present(&self) -> u64 {
37729            if let Some(_) = self.recursive_optional {
37730                return 1;
37731            }
37732            0
37733        }
37734    }
37735
37736    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTable {
37737        type Borrowed<'a> = &'a Self;
37738        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37739            value
37740        }
37741    }
37742
37743    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTable {
37744        type Owned = Self;
37745
37746        #[inline(always)]
37747        fn inline_align(_context: fidl::encoding::Context) -> usize {
37748            8
37749        }
37750
37751        #[inline(always)]
37752        fn inline_size(_context: fidl::encoding::Context) -> usize {
37753            16
37754        }
37755    }
37756
37757    unsafe impl<D: fidl::encoding::ResourceDialect>
37758        fidl::encoding::Encode<RecursiveOptionalAndTable, D> for &RecursiveOptionalAndTable
37759    {
37760        unsafe fn encode(
37761            self,
37762            encoder: &mut fidl::encoding::Encoder<'_, D>,
37763            offset: usize,
37764            mut depth: fidl::encoding::Depth,
37765        ) -> fidl::Result<()> {
37766            encoder.debug_check_bounds::<RecursiveOptionalAndTable>(offset);
37767            // Vector header
37768            let max_ordinal: u64 = self.max_ordinal_present();
37769            encoder.write_num(max_ordinal, offset);
37770            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37771            // Calling encoder.out_of_line_offset(0) is not allowed.
37772            if max_ordinal == 0 {
37773                return Ok(());
37774            }
37775            depth.increment()?;
37776            let envelope_size = 8;
37777            let bytes_len = max_ordinal as usize * envelope_size;
37778            #[allow(unused_variables)]
37779            let offset = encoder.out_of_line_offset(bytes_len);
37780            let mut _prev_end_offset: usize = 0;
37781            if 1 > max_ordinal {
37782                return Ok(());
37783            }
37784
37785            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37786            // are envelope_size bytes.
37787            let cur_offset: usize = (1 - 1) * envelope_size;
37788
37789            // Zero reserved fields.
37790            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37791
37792            // Safety:
37793            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37794            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37795            //   envelope_size bytes, there is always sufficient room.
37796            fidl::encoding::encode_in_envelope_optional::<RecursiveOptionalStruct, D>(
37797                self.recursive_optional
37798                    .as_ref()
37799                    .map(<RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow),
37800                encoder,
37801                offset + cur_offset,
37802                depth,
37803            )?;
37804
37805            _prev_end_offset = cur_offset + envelope_size;
37806
37807            Ok(())
37808        }
37809    }
37810
37811    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
37812        for RecursiveOptionalAndTable
37813    {
37814        #[inline(always)]
37815        fn new_empty() -> Self {
37816            Self::default()
37817        }
37818
37819        unsafe fn decode(
37820            &mut self,
37821            decoder: &mut fidl::encoding::Decoder<'_, D>,
37822            offset: usize,
37823            mut depth: fidl::encoding::Depth,
37824        ) -> fidl::Result<()> {
37825            decoder.debug_check_bounds::<Self>(offset);
37826            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37827                None => return Err(fidl::Error::NotNullable),
37828                Some(len) => len,
37829            };
37830            // Calling decoder.out_of_line_offset(0) is not allowed.
37831            if len == 0 {
37832                return Ok(());
37833            };
37834            depth.increment()?;
37835            let envelope_size = 8;
37836            let bytes_len = len * envelope_size;
37837            let offset = decoder.out_of_line_offset(bytes_len)?;
37838            // Decode the envelope for each type.
37839            let mut _next_ordinal_to_read = 0;
37840            let mut next_offset = offset;
37841            let end_offset = offset + bytes_len;
37842            _next_ordinal_to_read += 1;
37843            if next_offset >= end_offset {
37844                return Ok(());
37845            }
37846
37847            // Decode unknown envelopes for gaps in ordinals.
37848            while _next_ordinal_to_read < 1 {
37849                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37850                _next_ordinal_to_read += 1;
37851                next_offset += envelope_size;
37852            }
37853
37854            let next_out_of_line = decoder.next_out_of_line();
37855            let handles_before = decoder.remaining_handles();
37856            if let Some((inlined, num_bytes, num_handles)) =
37857                fidl::encoding::decode_envelope_header(decoder, next_offset)?
37858            {
37859                let member_inline_size =
37860                    <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
37861                        decoder.context,
37862                    );
37863                if inlined != (member_inline_size <= 4) {
37864                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
37865                }
37866                let inner_offset;
37867                let mut inner_depth = depth.clone();
37868                if inlined {
37869                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37870                    inner_offset = next_offset;
37871                } else {
37872                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37873                    inner_depth.increment()?;
37874                }
37875                let val_ref = self
37876                    .recursive_optional
37877                    .get_or_insert_with(|| fidl::new_empty!(RecursiveOptionalStruct, D));
37878                fidl::decode!(
37879                    RecursiveOptionalStruct,
37880                    D,
37881                    val_ref,
37882                    decoder,
37883                    inner_offset,
37884                    inner_depth
37885                )?;
37886                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37887                {
37888                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
37889                }
37890                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37891                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37892                }
37893            }
37894
37895            next_offset += envelope_size;
37896
37897            // Decode the remaining unknown envelopes.
37898            while next_offset < end_offset {
37899                _next_ordinal_to_read += 1;
37900                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37901                next_offset += envelope_size;
37902            }
37903
37904            Ok(())
37905        }
37906    }
37907
37908    impl RecursiveTable {
37909        #[inline(always)]
37910        fn max_ordinal_present(&self) -> u64 {
37911            if let Some(_) = self.s {
37912                return 1;
37913            }
37914            0
37915        }
37916    }
37917
37918    impl fidl::encoding::ValueTypeMarker for RecursiveTable {
37919        type Borrowed<'a> = &'a Self;
37920        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37921            value
37922        }
37923    }
37924
37925    unsafe impl fidl::encoding::TypeMarker for RecursiveTable {
37926        type Owned = Self;
37927
37928        #[inline(always)]
37929        fn inline_align(_context: fidl::encoding::Context) -> usize {
37930            8
37931        }
37932
37933        #[inline(always)]
37934        fn inline_size(_context: fidl::encoding::Context) -> usize {
37935            16
37936        }
37937    }
37938
37939    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTable, D>
37940        for &RecursiveTable
37941    {
37942        unsafe fn encode(
37943            self,
37944            encoder: &mut fidl::encoding::Encoder<'_, D>,
37945            offset: usize,
37946            mut depth: fidl::encoding::Depth,
37947        ) -> fidl::Result<()> {
37948            encoder.debug_check_bounds::<RecursiveTable>(offset);
37949            // Vector header
37950            let max_ordinal: u64 = self.max_ordinal_present();
37951            encoder.write_num(max_ordinal, offset);
37952            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37953            // Calling encoder.out_of_line_offset(0) is not allowed.
37954            if max_ordinal == 0 {
37955                return Ok(());
37956            }
37957            depth.increment()?;
37958            let envelope_size = 8;
37959            let bytes_len = max_ordinal as usize * envelope_size;
37960            #[allow(unused_variables)]
37961            let offset = encoder.out_of_line_offset(bytes_len);
37962            let mut _prev_end_offset: usize = 0;
37963            if 1 > max_ordinal {
37964                return Ok(());
37965            }
37966
37967            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
37968            // are envelope_size bytes.
37969            let cur_offset: usize = (1 - 1) * envelope_size;
37970
37971            // Zero reserved fields.
37972            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37973
37974            // Safety:
37975            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
37976            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
37977            //   envelope_size bytes, there is always sufficient room.
37978            fidl::encoding::encode_in_envelope_optional::<RecursiveTableOptionalHolder, D>(
37979                self.s
37980                    .as_ref()
37981                    .map(<RecursiveTableOptionalHolder as fidl::encoding::ValueTypeMarker>::borrow),
37982                encoder,
37983                offset + cur_offset,
37984                depth,
37985            )?;
37986
37987            _prev_end_offset = cur_offset + envelope_size;
37988
37989            Ok(())
37990        }
37991    }
37992
37993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTable {
37994        #[inline(always)]
37995        fn new_empty() -> Self {
37996            Self::default()
37997        }
37998
37999        unsafe fn decode(
38000            &mut self,
38001            decoder: &mut fidl::encoding::Decoder<'_, D>,
38002            offset: usize,
38003            mut depth: fidl::encoding::Depth,
38004        ) -> fidl::Result<()> {
38005            decoder.debug_check_bounds::<Self>(offset);
38006            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38007                None => return Err(fidl::Error::NotNullable),
38008                Some(len) => len,
38009            };
38010            // Calling decoder.out_of_line_offset(0) is not allowed.
38011            if len == 0 {
38012                return Ok(());
38013            };
38014            depth.increment()?;
38015            let envelope_size = 8;
38016            let bytes_len = len * envelope_size;
38017            let offset = decoder.out_of_line_offset(bytes_len)?;
38018            // Decode the envelope for each type.
38019            let mut _next_ordinal_to_read = 0;
38020            let mut next_offset = offset;
38021            let end_offset = offset + bytes_len;
38022            _next_ordinal_to_read += 1;
38023            if next_offset >= end_offset {
38024                return Ok(());
38025            }
38026
38027            // Decode unknown envelopes for gaps in ordinals.
38028            while _next_ordinal_to_read < 1 {
38029                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38030                _next_ordinal_to_read += 1;
38031                next_offset += envelope_size;
38032            }
38033
38034            let next_out_of_line = decoder.next_out_of_line();
38035            let handles_before = decoder.remaining_handles();
38036            if let Some((inlined, num_bytes, num_handles)) =
38037                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38038            {
38039                let member_inline_size =
38040                    <RecursiveTableOptionalHolder as fidl::encoding::TypeMarker>::inline_size(
38041                        decoder.context,
38042                    );
38043                if inlined != (member_inline_size <= 4) {
38044                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38045                }
38046                let inner_offset;
38047                let mut inner_depth = depth.clone();
38048                if inlined {
38049                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38050                    inner_offset = next_offset;
38051                } else {
38052                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38053                    inner_depth.increment()?;
38054                }
38055                let val_ref =
38056                    self.s.get_or_insert_with(|| fidl::new_empty!(RecursiveTableOptionalHolder, D));
38057                fidl::decode!(
38058                    RecursiveTableOptionalHolder,
38059                    D,
38060                    val_ref,
38061                    decoder,
38062                    inner_offset,
38063                    inner_depth
38064                )?;
38065                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38066                {
38067                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38068                }
38069                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38070                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38071                }
38072            }
38073
38074            next_offset += envelope_size;
38075
38076            // Decode the remaining unknown envelopes.
38077            while next_offset < end_offset {
38078                _next_ordinal_to_read += 1;
38079                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38080                next_offset += envelope_size;
38081            }
38082
38083            Ok(())
38084        }
38085    }
38086
38087    impl Regression10TableV1 {
38088        #[inline(always)]
38089        fn max_ordinal_present(&self) -> u64 {
38090            if let Some(_) = self.member1 {
38091                return 1;
38092            }
38093            0
38094        }
38095    }
38096
38097    impl fidl::encoding::ValueTypeMarker for Regression10TableV1 {
38098        type Borrowed<'a> = &'a Self;
38099        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38100            value
38101        }
38102    }
38103
38104    unsafe impl fidl::encoding::TypeMarker for Regression10TableV1 {
38105        type Owned = Self;
38106
38107        #[inline(always)]
38108        fn inline_align(_context: fidl::encoding::Context) -> usize {
38109            8
38110        }
38111
38112        #[inline(always)]
38113        fn inline_size(_context: fidl::encoding::Context) -> usize {
38114            16
38115        }
38116    }
38117
38118    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV1, D>
38119        for &Regression10TableV1
38120    {
38121        unsafe fn encode(
38122            self,
38123            encoder: &mut fidl::encoding::Encoder<'_, D>,
38124            offset: usize,
38125            mut depth: fidl::encoding::Depth,
38126        ) -> fidl::Result<()> {
38127            encoder.debug_check_bounds::<Regression10TableV1>(offset);
38128            // Vector header
38129            let max_ordinal: u64 = self.max_ordinal_present();
38130            encoder.write_num(max_ordinal, offset);
38131            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38132            // Calling encoder.out_of_line_offset(0) is not allowed.
38133            if max_ordinal == 0 {
38134                return Ok(());
38135            }
38136            depth.increment()?;
38137            let envelope_size = 8;
38138            let bytes_len = max_ordinal as usize * envelope_size;
38139            #[allow(unused_variables)]
38140            let offset = encoder.out_of_line_offset(bytes_len);
38141            let mut _prev_end_offset: usize = 0;
38142            if 1 > max_ordinal {
38143                return Ok(());
38144            }
38145
38146            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38147            // are envelope_size bytes.
38148            let cur_offset: usize = (1 - 1) * envelope_size;
38149
38150            // Zero reserved fields.
38151            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38152
38153            // Safety:
38154            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38155            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38156            //   envelope_size bytes, there is always sufficient room.
38157            fidl::encoding::encode_in_envelope_optional::<u64, D>(
38158                self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
38159                encoder,
38160                offset + cur_offset,
38161                depth,
38162            )?;
38163
38164            _prev_end_offset = cur_offset + envelope_size;
38165
38166            Ok(())
38167        }
38168    }
38169
38170    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV1 {
38171        #[inline(always)]
38172        fn new_empty() -> Self {
38173            Self::default()
38174        }
38175
38176        unsafe fn decode(
38177            &mut self,
38178            decoder: &mut fidl::encoding::Decoder<'_, D>,
38179            offset: usize,
38180            mut depth: fidl::encoding::Depth,
38181        ) -> fidl::Result<()> {
38182            decoder.debug_check_bounds::<Self>(offset);
38183            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38184                None => return Err(fidl::Error::NotNullable),
38185                Some(len) => len,
38186            };
38187            // Calling decoder.out_of_line_offset(0) is not allowed.
38188            if len == 0 {
38189                return Ok(());
38190            };
38191            depth.increment()?;
38192            let envelope_size = 8;
38193            let bytes_len = len * envelope_size;
38194            let offset = decoder.out_of_line_offset(bytes_len)?;
38195            // Decode the envelope for each type.
38196            let mut _next_ordinal_to_read = 0;
38197            let mut next_offset = offset;
38198            let end_offset = offset + bytes_len;
38199            _next_ordinal_to_read += 1;
38200            if next_offset >= end_offset {
38201                return Ok(());
38202            }
38203
38204            // Decode unknown envelopes for gaps in ordinals.
38205            while _next_ordinal_to_read < 1 {
38206                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38207                _next_ordinal_to_read += 1;
38208                next_offset += envelope_size;
38209            }
38210
38211            let next_out_of_line = decoder.next_out_of_line();
38212            let handles_before = decoder.remaining_handles();
38213            if let Some((inlined, num_bytes, num_handles)) =
38214                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38215            {
38216                let member_inline_size =
38217                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38218                if inlined != (member_inline_size <= 4) {
38219                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38220                }
38221                let inner_offset;
38222                let mut inner_depth = depth.clone();
38223                if inlined {
38224                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38225                    inner_offset = next_offset;
38226                } else {
38227                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38228                    inner_depth.increment()?;
38229                }
38230                let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
38231                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
38232                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38233                {
38234                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38235                }
38236                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38237                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38238                }
38239            }
38240
38241            next_offset += envelope_size;
38242
38243            // Decode the remaining unknown envelopes.
38244            while next_offset < end_offset {
38245                _next_ordinal_to_read += 1;
38246                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38247                next_offset += envelope_size;
38248            }
38249
38250            Ok(())
38251        }
38252    }
38253
38254    impl Regression10TableV2 {
38255        #[inline(always)]
38256        fn max_ordinal_present(&self) -> u64 {
38257            if let Some(_) = self.member2 {
38258                return 5;
38259            }
38260            if let Some(_) = self.member1 {
38261                return 1;
38262            }
38263            0
38264        }
38265    }
38266
38267    impl fidl::encoding::ValueTypeMarker for Regression10TableV2 {
38268        type Borrowed<'a> = &'a Self;
38269        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38270            value
38271        }
38272    }
38273
38274    unsafe impl fidl::encoding::TypeMarker for Regression10TableV2 {
38275        type Owned = Self;
38276
38277        #[inline(always)]
38278        fn inline_align(_context: fidl::encoding::Context) -> usize {
38279            8
38280        }
38281
38282        #[inline(always)]
38283        fn inline_size(_context: fidl::encoding::Context) -> usize {
38284            16
38285        }
38286    }
38287
38288    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV2, D>
38289        for &Regression10TableV2
38290    {
38291        unsafe fn encode(
38292            self,
38293            encoder: &mut fidl::encoding::Encoder<'_, D>,
38294            offset: usize,
38295            mut depth: fidl::encoding::Depth,
38296        ) -> fidl::Result<()> {
38297            encoder.debug_check_bounds::<Regression10TableV2>(offset);
38298            // Vector header
38299            let max_ordinal: u64 = self.max_ordinal_present();
38300            encoder.write_num(max_ordinal, offset);
38301            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38302            // Calling encoder.out_of_line_offset(0) is not allowed.
38303            if max_ordinal == 0 {
38304                return Ok(());
38305            }
38306            depth.increment()?;
38307            let envelope_size = 8;
38308            let bytes_len = max_ordinal as usize * envelope_size;
38309            #[allow(unused_variables)]
38310            let offset = encoder.out_of_line_offset(bytes_len);
38311            let mut _prev_end_offset: usize = 0;
38312            if 1 > max_ordinal {
38313                return Ok(());
38314            }
38315
38316            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38317            // are envelope_size bytes.
38318            let cur_offset: usize = (1 - 1) * envelope_size;
38319
38320            // Zero reserved fields.
38321            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38322
38323            // Safety:
38324            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38325            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38326            //   envelope_size bytes, there is always sufficient room.
38327            fidl::encoding::encode_in_envelope_optional::<u64, D>(
38328                self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
38329                encoder,
38330                offset + cur_offset,
38331                depth,
38332            )?;
38333
38334            _prev_end_offset = cur_offset + envelope_size;
38335            if 5 > max_ordinal {
38336                return Ok(());
38337            }
38338
38339            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38340            // are envelope_size bytes.
38341            let cur_offset: usize = (5 - 1) * envelope_size;
38342
38343            // Zero reserved fields.
38344            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38345
38346            // Safety:
38347            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38348            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38349            //   envelope_size bytes, there is always sufficient room.
38350            fidl::encoding::encode_in_envelope_optional::<u64, D>(
38351                self.member2.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
38352                encoder,
38353                offset + cur_offset,
38354                depth,
38355            )?;
38356
38357            _prev_end_offset = cur_offset + envelope_size;
38358
38359            Ok(())
38360        }
38361    }
38362
38363    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV2 {
38364        #[inline(always)]
38365        fn new_empty() -> Self {
38366            Self::default()
38367        }
38368
38369        unsafe fn decode(
38370            &mut self,
38371            decoder: &mut fidl::encoding::Decoder<'_, D>,
38372            offset: usize,
38373            mut depth: fidl::encoding::Depth,
38374        ) -> fidl::Result<()> {
38375            decoder.debug_check_bounds::<Self>(offset);
38376            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38377                None => return Err(fidl::Error::NotNullable),
38378                Some(len) => len,
38379            };
38380            // Calling decoder.out_of_line_offset(0) is not allowed.
38381            if len == 0 {
38382                return Ok(());
38383            };
38384            depth.increment()?;
38385            let envelope_size = 8;
38386            let bytes_len = len * envelope_size;
38387            let offset = decoder.out_of_line_offset(bytes_len)?;
38388            // Decode the envelope for each type.
38389            let mut _next_ordinal_to_read = 0;
38390            let mut next_offset = offset;
38391            let end_offset = offset + bytes_len;
38392            _next_ordinal_to_read += 1;
38393            if next_offset >= end_offset {
38394                return Ok(());
38395            }
38396
38397            // Decode unknown envelopes for gaps in ordinals.
38398            while _next_ordinal_to_read < 1 {
38399                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38400                _next_ordinal_to_read += 1;
38401                next_offset += envelope_size;
38402            }
38403
38404            let next_out_of_line = decoder.next_out_of_line();
38405            let handles_before = decoder.remaining_handles();
38406            if let Some((inlined, num_bytes, num_handles)) =
38407                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38408            {
38409                let member_inline_size =
38410                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38411                if inlined != (member_inline_size <= 4) {
38412                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38413                }
38414                let inner_offset;
38415                let mut inner_depth = depth.clone();
38416                if inlined {
38417                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38418                    inner_offset = next_offset;
38419                } else {
38420                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38421                    inner_depth.increment()?;
38422                }
38423                let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
38424                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
38425                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38426                {
38427                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38428                }
38429                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38430                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38431                }
38432            }
38433
38434            next_offset += envelope_size;
38435            _next_ordinal_to_read += 1;
38436            if next_offset >= end_offset {
38437                return Ok(());
38438            }
38439
38440            // Decode unknown envelopes for gaps in ordinals.
38441            while _next_ordinal_to_read < 5 {
38442                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38443                _next_ordinal_to_read += 1;
38444                next_offset += envelope_size;
38445            }
38446
38447            let next_out_of_line = decoder.next_out_of_line();
38448            let handles_before = decoder.remaining_handles();
38449            if let Some((inlined, num_bytes, num_handles)) =
38450                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38451            {
38452                let member_inline_size =
38453                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38454                if inlined != (member_inline_size <= 4) {
38455                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38456                }
38457                let inner_offset;
38458                let mut inner_depth = depth.clone();
38459                if inlined {
38460                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38461                    inner_offset = next_offset;
38462                } else {
38463                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38464                    inner_depth.increment()?;
38465                }
38466                let val_ref = self.member2.get_or_insert_with(|| fidl::new_empty!(u64, D));
38467                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
38468                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38469                {
38470                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38471                }
38472                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38473                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38474                }
38475            }
38476
38477            next_offset += envelope_size;
38478
38479            // Decode the remaining unknown envelopes.
38480            while next_offset < end_offset {
38481                _next_ordinal_to_read += 1;
38482                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38483                next_offset += envelope_size;
38484            }
38485
38486            Ok(())
38487        }
38488    }
38489
38490    impl Regression10TableV3 {
38491        #[inline(always)]
38492        fn max_ordinal_present(&self) -> u64 {
38493            if let Some(_) = self.z {
38494                return 6;
38495            }
38496            if let Some(_) = self.y {
38497                return 5;
38498            }
38499            if let Some(_) = self.x {
38500                return 1;
38501            }
38502            0
38503        }
38504    }
38505
38506    impl fidl::encoding::ValueTypeMarker for Regression10TableV3 {
38507        type Borrowed<'a> = &'a Self;
38508        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38509            value
38510        }
38511    }
38512
38513    unsafe impl fidl::encoding::TypeMarker for Regression10TableV3 {
38514        type Owned = Self;
38515
38516        #[inline(always)]
38517        fn inline_align(_context: fidl::encoding::Context) -> usize {
38518            8
38519        }
38520
38521        #[inline(always)]
38522        fn inline_size(_context: fidl::encoding::Context) -> usize {
38523            16
38524        }
38525    }
38526
38527    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV3, D>
38528        for &Regression10TableV3
38529    {
38530        unsafe fn encode(
38531            self,
38532            encoder: &mut fidl::encoding::Encoder<'_, D>,
38533            offset: usize,
38534            mut depth: fidl::encoding::Depth,
38535        ) -> fidl::Result<()> {
38536            encoder.debug_check_bounds::<Regression10TableV3>(offset);
38537            // Vector header
38538            let max_ordinal: u64 = self.max_ordinal_present();
38539            encoder.write_num(max_ordinal, offset);
38540            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38541            // Calling encoder.out_of_line_offset(0) is not allowed.
38542            if max_ordinal == 0 {
38543                return Ok(());
38544            }
38545            depth.increment()?;
38546            let envelope_size = 8;
38547            let bytes_len = max_ordinal as usize * envelope_size;
38548            #[allow(unused_variables)]
38549            let offset = encoder.out_of_line_offset(bytes_len);
38550            let mut _prev_end_offset: usize = 0;
38551            if 1 > max_ordinal {
38552                return Ok(());
38553            }
38554
38555            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38556            // are envelope_size bytes.
38557            let cur_offset: usize = (1 - 1) * envelope_size;
38558
38559            // Zero reserved fields.
38560            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38561
38562            // Safety:
38563            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38564            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38565            //   envelope_size bytes, there is always sufficient room.
38566            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38567                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38568                encoder,
38569                offset + cur_offset,
38570                depth,
38571            )?;
38572
38573            _prev_end_offset = cur_offset + envelope_size;
38574            if 5 > max_ordinal {
38575                return Ok(());
38576            }
38577
38578            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38579            // are envelope_size bytes.
38580            let cur_offset: usize = (5 - 1) * envelope_size;
38581
38582            // Zero reserved fields.
38583            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38584
38585            // Safety:
38586            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38587            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38588            //   envelope_size bytes, there is always sufficient room.
38589            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38590                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38591                encoder,
38592                offset + cur_offset,
38593                depth,
38594            )?;
38595
38596            _prev_end_offset = cur_offset + envelope_size;
38597            if 6 > max_ordinal {
38598                return Ok(());
38599            }
38600
38601            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38602            // are envelope_size bytes.
38603            let cur_offset: usize = (6 - 1) * envelope_size;
38604
38605            // Zero reserved fields.
38606            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38607
38608            // Safety:
38609            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38610            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38611            //   envelope_size bytes, there is always sufficient room.
38612            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38613                self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38614                encoder,
38615                offset + cur_offset,
38616                depth,
38617            )?;
38618
38619            _prev_end_offset = cur_offset + envelope_size;
38620
38621            Ok(())
38622        }
38623    }
38624
38625    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV3 {
38626        #[inline(always)]
38627        fn new_empty() -> Self {
38628            Self::default()
38629        }
38630
38631        unsafe fn decode(
38632            &mut self,
38633            decoder: &mut fidl::encoding::Decoder<'_, D>,
38634            offset: usize,
38635            mut depth: fidl::encoding::Depth,
38636        ) -> fidl::Result<()> {
38637            decoder.debug_check_bounds::<Self>(offset);
38638            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38639                None => return Err(fidl::Error::NotNullable),
38640                Some(len) => len,
38641            };
38642            // Calling decoder.out_of_line_offset(0) is not allowed.
38643            if len == 0 {
38644                return Ok(());
38645            };
38646            depth.increment()?;
38647            let envelope_size = 8;
38648            let bytes_len = len * envelope_size;
38649            let offset = decoder.out_of_line_offset(bytes_len)?;
38650            // Decode the envelope for each type.
38651            let mut _next_ordinal_to_read = 0;
38652            let mut next_offset = offset;
38653            let end_offset = offset + bytes_len;
38654            _next_ordinal_to_read += 1;
38655            if next_offset >= end_offset {
38656                return Ok(());
38657            }
38658
38659            // Decode unknown envelopes for gaps in ordinals.
38660            while _next_ordinal_to_read < 1 {
38661                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38662                _next_ordinal_to_read += 1;
38663                next_offset += envelope_size;
38664            }
38665
38666            let next_out_of_line = decoder.next_out_of_line();
38667            let handles_before = decoder.remaining_handles();
38668            if let Some((inlined, num_bytes, num_handles)) =
38669                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38670            {
38671                let member_inline_size =
38672                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38673                if inlined != (member_inline_size <= 4) {
38674                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38675                }
38676                let inner_offset;
38677                let mut inner_depth = depth.clone();
38678                if inlined {
38679                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38680                    inner_offset = next_offset;
38681                } else {
38682                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38683                    inner_depth.increment()?;
38684                }
38685                let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38686                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38687                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38688                {
38689                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38690                }
38691                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38692                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38693                }
38694            }
38695
38696            next_offset += envelope_size;
38697            _next_ordinal_to_read += 1;
38698            if next_offset >= end_offset {
38699                return Ok(());
38700            }
38701
38702            // Decode unknown envelopes for gaps in ordinals.
38703            while _next_ordinal_to_read < 5 {
38704                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38705                _next_ordinal_to_read += 1;
38706                next_offset += envelope_size;
38707            }
38708
38709            let next_out_of_line = decoder.next_out_of_line();
38710            let handles_before = decoder.remaining_handles();
38711            if let Some((inlined, num_bytes, num_handles)) =
38712                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38713            {
38714                let member_inline_size =
38715                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38716                if inlined != (member_inline_size <= 4) {
38717                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38718                }
38719                let inner_offset;
38720                let mut inner_depth = depth.clone();
38721                if inlined {
38722                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38723                    inner_offset = next_offset;
38724                } else {
38725                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38726                    inner_depth.increment()?;
38727                }
38728                let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38729                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38730                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38731                {
38732                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38733                }
38734                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38735                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38736                }
38737            }
38738
38739            next_offset += envelope_size;
38740            _next_ordinal_to_read += 1;
38741            if next_offset >= end_offset {
38742                return Ok(());
38743            }
38744
38745            // Decode unknown envelopes for gaps in ordinals.
38746            while _next_ordinal_to_read < 6 {
38747                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38748                _next_ordinal_to_read += 1;
38749                next_offset += envelope_size;
38750            }
38751
38752            let next_out_of_line = decoder.next_out_of_line();
38753            let handles_before = decoder.remaining_handles();
38754            if let Some((inlined, num_bytes, num_handles)) =
38755                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38756            {
38757                let member_inline_size =
38758                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38759                if inlined != (member_inline_size <= 4) {
38760                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38761                }
38762                let inner_offset;
38763                let mut inner_depth = depth.clone();
38764                if inlined {
38765                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38766                    inner_offset = next_offset;
38767                } else {
38768                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38769                    inner_depth.increment()?;
38770                }
38771                let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
38772                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38773                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38774                {
38775                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38776                }
38777                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38778                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38779                }
38780            }
38781
38782            next_offset += envelope_size;
38783
38784            // Decode the remaining unknown envelopes.
38785            while next_offset < end_offset {
38786                _next_ordinal_to_read += 1;
38787                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38788                next_offset += envelope_size;
38789            }
38790
38791            Ok(())
38792        }
38793    }
38794
38795    impl ReverseOrdinalTable {
38796        #[inline(always)]
38797        fn max_ordinal_present(&self) -> u64 {
38798            if let Some(_) = self.x {
38799                return 4;
38800            }
38801            if let Some(_) = self.y {
38802                return 2;
38803            }
38804            if let Some(_) = self.z {
38805                return 1;
38806            }
38807            0
38808        }
38809    }
38810
38811    impl fidl::encoding::ValueTypeMarker for ReverseOrdinalTable {
38812        type Borrowed<'a> = &'a Self;
38813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38814            value
38815        }
38816    }
38817
38818    unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalTable {
38819        type Owned = Self;
38820
38821        #[inline(always)]
38822        fn inline_align(_context: fidl::encoding::Context) -> usize {
38823            8
38824        }
38825
38826        #[inline(always)]
38827        fn inline_size(_context: fidl::encoding::Context) -> usize {
38828            16
38829        }
38830    }
38831
38832    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalTable, D>
38833        for &ReverseOrdinalTable
38834    {
38835        unsafe fn encode(
38836            self,
38837            encoder: &mut fidl::encoding::Encoder<'_, D>,
38838            offset: usize,
38839            mut depth: fidl::encoding::Depth,
38840        ) -> fidl::Result<()> {
38841            encoder.debug_check_bounds::<ReverseOrdinalTable>(offset);
38842            // Vector header
38843            let max_ordinal: u64 = self.max_ordinal_present();
38844            encoder.write_num(max_ordinal, offset);
38845            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38846            // Calling encoder.out_of_line_offset(0) is not allowed.
38847            if max_ordinal == 0 {
38848                return Ok(());
38849            }
38850            depth.increment()?;
38851            let envelope_size = 8;
38852            let bytes_len = max_ordinal as usize * envelope_size;
38853            #[allow(unused_variables)]
38854            let offset = encoder.out_of_line_offset(bytes_len);
38855            let mut _prev_end_offset: usize = 0;
38856            if 1 > max_ordinal {
38857                return Ok(());
38858            }
38859
38860            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38861            // are envelope_size bytes.
38862            let cur_offset: usize = (1 - 1) * envelope_size;
38863
38864            // Zero reserved fields.
38865            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38866
38867            // Safety:
38868            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38869            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38870            //   envelope_size bytes, there is always sufficient room.
38871            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38872                self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38873                encoder,
38874                offset + cur_offset,
38875                depth,
38876            )?;
38877
38878            _prev_end_offset = cur_offset + envelope_size;
38879            if 2 > max_ordinal {
38880                return Ok(());
38881            }
38882
38883            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38884            // are envelope_size bytes.
38885            let cur_offset: usize = (2 - 1) * envelope_size;
38886
38887            // Zero reserved fields.
38888            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38889
38890            // Safety:
38891            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38892            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38893            //   envelope_size bytes, there is always sufficient room.
38894            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38895                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38896                encoder,
38897                offset + cur_offset,
38898                depth,
38899            )?;
38900
38901            _prev_end_offset = cur_offset + envelope_size;
38902            if 4 > max_ordinal {
38903                return Ok(());
38904            }
38905
38906            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
38907            // are envelope_size bytes.
38908            let cur_offset: usize = (4 - 1) * envelope_size;
38909
38910            // Zero reserved fields.
38911            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38912
38913            // Safety:
38914            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
38915            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
38916            //   envelope_size bytes, there is always sufficient room.
38917            fidl::encoding::encode_in_envelope_optional::<i64, D>(
38918                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38919                encoder,
38920                offset + cur_offset,
38921                depth,
38922            )?;
38923
38924            _prev_end_offset = cur_offset + envelope_size;
38925
38926            Ok(())
38927        }
38928    }
38929
38930    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalTable {
38931        #[inline(always)]
38932        fn new_empty() -> Self {
38933            Self::default()
38934        }
38935
38936        unsafe fn decode(
38937            &mut self,
38938            decoder: &mut fidl::encoding::Decoder<'_, D>,
38939            offset: usize,
38940            mut depth: fidl::encoding::Depth,
38941        ) -> fidl::Result<()> {
38942            decoder.debug_check_bounds::<Self>(offset);
38943            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38944                None => return Err(fidl::Error::NotNullable),
38945                Some(len) => len,
38946            };
38947            // Calling decoder.out_of_line_offset(0) is not allowed.
38948            if len == 0 {
38949                return Ok(());
38950            };
38951            depth.increment()?;
38952            let envelope_size = 8;
38953            let bytes_len = len * envelope_size;
38954            let offset = decoder.out_of_line_offset(bytes_len)?;
38955            // Decode the envelope for each type.
38956            let mut _next_ordinal_to_read = 0;
38957            let mut next_offset = offset;
38958            let end_offset = offset + bytes_len;
38959            _next_ordinal_to_read += 1;
38960            if next_offset >= end_offset {
38961                return Ok(());
38962            }
38963
38964            // Decode unknown envelopes for gaps in ordinals.
38965            while _next_ordinal_to_read < 1 {
38966                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38967                _next_ordinal_to_read += 1;
38968                next_offset += envelope_size;
38969            }
38970
38971            let next_out_of_line = decoder.next_out_of_line();
38972            let handles_before = decoder.remaining_handles();
38973            if let Some((inlined, num_bytes, num_handles)) =
38974                fidl::encoding::decode_envelope_header(decoder, next_offset)?
38975            {
38976                let member_inline_size =
38977                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38978                if inlined != (member_inline_size <= 4) {
38979                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
38980                }
38981                let inner_offset;
38982                let mut inner_depth = depth.clone();
38983                if inlined {
38984                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38985                    inner_offset = next_offset;
38986                } else {
38987                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38988                    inner_depth.increment()?;
38989                }
38990                let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
38991                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38992                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38993                {
38994                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
38995                }
38996                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38997                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38998                }
38999            }
39000
39001            next_offset += envelope_size;
39002            _next_ordinal_to_read += 1;
39003            if next_offset >= end_offset {
39004                return Ok(());
39005            }
39006
39007            // Decode unknown envelopes for gaps in ordinals.
39008            while _next_ordinal_to_read < 2 {
39009                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39010                _next_ordinal_to_read += 1;
39011                next_offset += envelope_size;
39012            }
39013
39014            let next_out_of_line = decoder.next_out_of_line();
39015            let handles_before = decoder.remaining_handles();
39016            if let Some((inlined, num_bytes, num_handles)) =
39017                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39018            {
39019                let member_inline_size =
39020                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39021                if inlined != (member_inline_size <= 4) {
39022                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39023                }
39024                let inner_offset;
39025                let mut inner_depth = depth.clone();
39026                if inlined {
39027                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39028                    inner_offset = next_offset;
39029                } else {
39030                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39031                    inner_depth.increment()?;
39032                }
39033                let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
39034                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39035                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39036                {
39037                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39038                }
39039                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39040                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39041                }
39042            }
39043
39044            next_offset += envelope_size;
39045            _next_ordinal_to_read += 1;
39046            if next_offset >= end_offset {
39047                return Ok(());
39048            }
39049
39050            // Decode unknown envelopes for gaps in ordinals.
39051            while _next_ordinal_to_read < 4 {
39052                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39053                _next_ordinal_to_read += 1;
39054                next_offset += envelope_size;
39055            }
39056
39057            let next_out_of_line = decoder.next_out_of_line();
39058            let handles_before = decoder.remaining_handles();
39059            if let Some((inlined, num_bytes, num_handles)) =
39060                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39061            {
39062                let member_inline_size =
39063                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39064                if inlined != (member_inline_size <= 4) {
39065                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39066                }
39067                let inner_offset;
39068                let mut inner_depth = depth.clone();
39069                if inlined {
39070                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39071                    inner_offset = next_offset;
39072                } else {
39073                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39074                    inner_depth.increment()?;
39075                }
39076                let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
39077                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39078                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39079                {
39080                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39081                }
39082                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39083                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39084                }
39085            }
39086
39087            next_offset += envelope_size;
39088
39089            // Decode the remaining unknown envelopes.
39090            while next_offset < end_offset {
39091                _next_ordinal_to_read += 1;
39092                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39093                next_offset += envelope_size;
39094            }
39095
39096            Ok(())
39097        }
39098    }
39099
39100    impl SimpleTable {
39101        #[inline(always)]
39102        fn max_ordinal_present(&self) -> u64 {
39103            if let Some(_) = self.y {
39104                return 5;
39105            }
39106            if let Some(_) = self.x {
39107                return 1;
39108            }
39109            0
39110        }
39111    }
39112
39113    impl fidl::encoding::ValueTypeMarker for SimpleTable {
39114        type Borrowed<'a> = &'a Self;
39115        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39116            value
39117        }
39118    }
39119
39120    unsafe impl fidl::encoding::TypeMarker for SimpleTable {
39121        type Owned = Self;
39122
39123        #[inline(always)]
39124        fn inline_align(_context: fidl::encoding::Context) -> usize {
39125            8
39126        }
39127
39128        #[inline(always)]
39129        fn inline_size(_context: fidl::encoding::Context) -> usize {
39130            16
39131        }
39132    }
39133
39134    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTable, D>
39135        for &SimpleTable
39136    {
39137        unsafe fn encode(
39138            self,
39139            encoder: &mut fidl::encoding::Encoder<'_, D>,
39140            offset: usize,
39141            mut depth: fidl::encoding::Depth,
39142        ) -> fidl::Result<()> {
39143            encoder.debug_check_bounds::<SimpleTable>(offset);
39144            // Vector header
39145            let max_ordinal: u64 = self.max_ordinal_present();
39146            encoder.write_num(max_ordinal, offset);
39147            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39148            // Calling encoder.out_of_line_offset(0) is not allowed.
39149            if max_ordinal == 0 {
39150                return Ok(());
39151            }
39152            depth.increment()?;
39153            let envelope_size = 8;
39154            let bytes_len = max_ordinal as usize * envelope_size;
39155            #[allow(unused_variables)]
39156            let offset = encoder.out_of_line_offset(bytes_len);
39157            let mut _prev_end_offset: usize = 0;
39158            if 1 > max_ordinal {
39159                return Ok(());
39160            }
39161
39162            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39163            // are envelope_size bytes.
39164            let cur_offset: usize = (1 - 1) * envelope_size;
39165
39166            // Zero reserved fields.
39167            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39168
39169            // Safety:
39170            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39171            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39172            //   envelope_size bytes, there is always sufficient room.
39173            fidl::encoding::encode_in_envelope_optional::<i64, D>(
39174                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
39175                encoder,
39176                offset + cur_offset,
39177                depth,
39178            )?;
39179
39180            _prev_end_offset = cur_offset + envelope_size;
39181            if 5 > max_ordinal {
39182                return Ok(());
39183            }
39184
39185            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39186            // are envelope_size bytes.
39187            let cur_offset: usize = (5 - 1) * envelope_size;
39188
39189            // Zero reserved fields.
39190            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39191
39192            // Safety:
39193            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39194            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39195            //   envelope_size bytes, there is always sufficient room.
39196            fidl::encoding::encode_in_envelope_optional::<i64, D>(
39197                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
39198                encoder,
39199                offset + cur_offset,
39200                depth,
39201            )?;
39202
39203            _prev_end_offset = cur_offset + envelope_size;
39204
39205            Ok(())
39206        }
39207    }
39208
39209    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTable {
39210        #[inline(always)]
39211        fn new_empty() -> Self {
39212            Self::default()
39213        }
39214
39215        unsafe fn decode(
39216            &mut self,
39217            decoder: &mut fidl::encoding::Decoder<'_, D>,
39218            offset: usize,
39219            mut depth: fidl::encoding::Depth,
39220        ) -> fidl::Result<()> {
39221            decoder.debug_check_bounds::<Self>(offset);
39222            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39223                None => return Err(fidl::Error::NotNullable),
39224                Some(len) => len,
39225            };
39226            // Calling decoder.out_of_line_offset(0) is not allowed.
39227            if len == 0 {
39228                return Ok(());
39229            };
39230            depth.increment()?;
39231            let envelope_size = 8;
39232            let bytes_len = len * envelope_size;
39233            let offset = decoder.out_of_line_offset(bytes_len)?;
39234            // Decode the envelope for each type.
39235            let mut _next_ordinal_to_read = 0;
39236            let mut next_offset = offset;
39237            let end_offset = offset + bytes_len;
39238            _next_ordinal_to_read += 1;
39239            if next_offset >= end_offset {
39240                return Ok(());
39241            }
39242
39243            // Decode unknown envelopes for gaps in ordinals.
39244            while _next_ordinal_to_read < 1 {
39245                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39246                _next_ordinal_to_read += 1;
39247                next_offset += envelope_size;
39248            }
39249
39250            let next_out_of_line = decoder.next_out_of_line();
39251            let handles_before = decoder.remaining_handles();
39252            if let Some((inlined, num_bytes, num_handles)) =
39253                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39254            {
39255                let member_inline_size =
39256                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39257                if inlined != (member_inline_size <= 4) {
39258                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39259                }
39260                let inner_offset;
39261                let mut inner_depth = depth.clone();
39262                if inlined {
39263                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39264                    inner_offset = next_offset;
39265                } else {
39266                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39267                    inner_depth.increment()?;
39268                }
39269                let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
39270                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39271                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39272                {
39273                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39274                }
39275                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39276                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39277                }
39278            }
39279
39280            next_offset += envelope_size;
39281            _next_ordinal_to_read += 1;
39282            if next_offset >= end_offset {
39283                return Ok(());
39284            }
39285
39286            // Decode unknown envelopes for gaps in ordinals.
39287            while _next_ordinal_to_read < 5 {
39288                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39289                _next_ordinal_to_read += 1;
39290                next_offset += envelope_size;
39291            }
39292
39293            let next_out_of_line = decoder.next_out_of_line();
39294            let handles_before = decoder.remaining_handles();
39295            if let Some((inlined, num_bytes, num_handles)) =
39296                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39297            {
39298                let member_inline_size =
39299                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39300                if inlined != (member_inline_size <= 4) {
39301                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39302                }
39303                let inner_offset;
39304                let mut inner_depth = depth.clone();
39305                if inlined {
39306                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39307                    inner_offset = next_offset;
39308                } else {
39309                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39310                    inner_depth.increment()?;
39311                }
39312                let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
39313                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39314                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39315                {
39316                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39317                }
39318                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39319                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39320                }
39321            }
39322
39323            next_offset += envelope_size;
39324
39325            // Decode the remaining unknown envelopes.
39326            while next_offset < end_offset {
39327                _next_ordinal_to_read += 1;
39328                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39329                next_offset += envelope_size;
39330            }
39331
39332            Ok(())
39333        }
39334    }
39335
39336    impl TableFieldInlined {
39337        #[inline(always)]
39338        fn max_ordinal_present(&self) -> u64 {
39339            if let Some(_) = self.f {
39340                return 1;
39341            }
39342            0
39343        }
39344    }
39345
39346    impl fidl::encoding::ValueTypeMarker for TableFieldInlined {
39347        type Borrowed<'a> = &'a Self;
39348        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39349            value
39350        }
39351    }
39352
39353    unsafe impl fidl::encoding::TypeMarker for TableFieldInlined {
39354        type Owned = Self;
39355
39356        #[inline(always)]
39357        fn inline_align(_context: fidl::encoding::Context) -> usize {
39358            8
39359        }
39360
39361        #[inline(always)]
39362        fn inline_size(_context: fidl::encoding::Context) -> usize {
39363            16
39364        }
39365    }
39366
39367    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldInlined, D>
39368        for &TableFieldInlined
39369    {
39370        unsafe fn encode(
39371            self,
39372            encoder: &mut fidl::encoding::Encoder<'_, D>,
39373            offset: usize,
39374            mut depth: fidl::encoding::Depth,
39375        ) -> fidl::Result<()> {
39376            encoder.debug_check_bounds::<TableFieldInlined>(offset);
39377            // Vector header
39378            let max_ordinal: u64 = self.max_ordinal_present();
39379            encoder.write_num(max_ordinal, offset);
39380            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39381            // Calling encoder.out_of_line_offset(0) is not allowed.
39382            if max_ordinal == 0 {
39383                return Ok(());
39384            }
39385            depth.increment()?;
39386            let envelope_size = 8;
39387            let bytes_len = max_ordinal as usize * envelope_size;
39388            #[allow(unused_variables)]
39389            let offset = encoder.out_of_line_offset(bytes_len);
39390            let mut _prev_end_offset: usize = 0;
39391            if 1 > max_ordinal {
39392                return Ok(());
39393            }
39394
39395            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39396            // are envelope_size bytes.
39397            let cur_offset: usize = (1 - 1) * envelope_size;
39398
39399            // Zero reserved fields.
39400            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39401
39402            // Safety:
39403            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39404            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39405            //   envelope_size bytes, there is always sufficient room.
39406            fidl::encoding::encode_in_envelope_optional::<i32, D>(
39407                self.f.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
39408                encoder,
39409                offset + cur_offset,
39410                depth,
39411            )?;
39412
39413            _prev_end_offset = cur_offset + envelope_size;
39414
39415            Ok(())
39416        }
39417    }
39418
39419    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldInlined {
39420        #[inline(always)]
39421        fn new_empty() -> Self {
39422            Self::default()
39423        }
39424
39425        unsafe fn decode(
39426            &mut self,
39427            decoder: &mut fidl::encoding::Decoder<'_, D>,
39428            offset: usize,
39429            mut depth: fidl::encoding::Depth,
39430        ) -> fidl::Result<()> {
39431            decoder.debug_check_bounds::<Self>(offset);
39432            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39433                None => return Err(fidl::Error::NotNullable),
39434                Some(len) => len,
39435            };
39436            // Calling decoder.out_of_line_offset(0) is not allowed.
39437            if len == 0 {
39438                return Ok(());
39439            };
39440            depth.increment()?;
39441            let envelope_size = 8;
39442            let bytes_len = len * envelope_size;
39443            let offset = decoder.out_of_line_offset(bytes_len)?;
39444            // Decode the envelope for each type.
39445            let mut _next_ordinal_to_read = 0;
39446            let mut next_offset = offset;
39447            let end_offset = offset + bytes_len;
39448            _next_ordinal_to_read += 1;
39449            if next_offset >= end_offset {
39450                return Ok(());
39451            }
39452
39453            // Decode unknown envelopes for gaps in ordinals.
39454            while _next_ordinal_to_read < 1 {
39455                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39456                _next_ordinal_to_read += 1;
39457                next_offset += envelope_size;
39458            }
39459
39460            let next_out_of_line = decoder.next_out_of_line();
39461            let handles_before = decoder.remaining_handles();
39462            if let Some((inlined, num_bytes, num_handles)) =
39463                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39464            {
39465                let member_inline_size =
39466                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39467                if inlined != (member_inline_size <= 4) {
39468                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39469                }
39470                let inner_offset;
39471                let mut inner_depth = depth.clone();
39472                if inlined {
39473                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39474                    inner_offset = next_offset;
39475                } else {
39476                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39477                    inner_depth.increment()?;
39478                }
39479                let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i32, D));
39480                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
39481                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39482                {
39483                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39484                }
39485                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39486                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39487                }
39488            }
39489
39490            next_offset += envelope_size;
39491
39492            // Decode the remaining unknown envelopes.
39493            while next_offset < end_offset {
39494                _next_ordinal_to_read += 1;
39495                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39496                next_offset += envelope_size;
39497            }
39498
39499            Ok(())
39500        }
39501    }
39502
39503    impl TableFieldOutOfLine {
39504        #[inline(always)]
39505        fn max_ordinal_present(&self) -> u64 {
39506            if let Some(_) = self.f {
39507                return 1;
39508            }
39509            0
39510        }
39511    }
39512
39513    impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLine {
39514        type Borrowed<'a> = &'a Self;
39515        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39516            value
39517        }
39518    }
39519
39520    unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLine {
39521        type Owned = Self;
39522
39523        #[inline(always)]
39524        fn inline_align(_context: fidl::encoding::Context) -> usize {
39525            8
39526        }
39527
39528        #[inline(always)]
39529        fn inline_size(_context: fidl::encoding::Context) -> usize {
39530            16
39531        }
39532    }
39533
39534    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldOutOfLine, D>
39535        for &TableFieldOutOfLine
39536    {
39537        unsafe fn encode(
39538            self,
39539            encoder: &mut fidl::encoding::Encoder<'_, D>,
39540            offset: usize,
39541            mut depth: fidl::encoding::Depth,
39542        ) -> fidl::Result<()> {
39543            encoder.debug_check_bounds::<TableFieldOutOfLine>(offset);
39544            // Vector header
39545            let max_ordinal: u64 = self.max_ordinal_present();
39546            encoder.write_num(max_ordinal, offset);
39547            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39548            // Calling encoder.out_of_line_offset(0) is not allowed.
39549            if max_ordinal == 0 {
39550                return Ok(());
39551            }
39552            depth.increment()?;
39553            let envelope_size = 8;
39554            let bytes_len = max_ordinal as usize * envelope_size;
39555            #[allow(unused_variables)]
39556            let offset = encoder.out_of_line_offset(bytes_len);
39557            let mut _prev_end_offset: usize = 0;
39558            if 1 > max_ordinal {
39559                return Ok(());
39560            }
39561
39562            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39563            // are envelope_size bytes.
39564            let cur_offset: usize = (1 - 1) * envelope_size;
39565
39566            // Zero reserved fields.
39567            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39568
39569            // Safety:
39570            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39571            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39572            //   envelope_size bytes, there is always sufficient room.
39573            fidl::encoding::encode_in_envelope_optional::<i64, D>(
39574                self.f.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
39575                encoder,
39576                offset + cur_offset,
39577                depth,
39578            )?;
39579
39580            _prev_end_offset = cur_offset + envelope_size;
39581
39582            Ok(())
39583        }
39584    }
39585
39586    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldOutOfLine {
39587        #[inline(always)]
39588        fn new_empty() -> Self {
39589            Self::default()
39590        }
39591
39592        unsafe fn decode(
39593            &mut self,
39594            decoder: &mut fidl::encoding::Decoder<'_, D>,
39595            offset: usize,
39596            mut depth: fidl::encoding::Depth,
39597        ) -> fidl::Result<()> {
39598            decoder.debug_check_bounds::<Self>(offset);
39599            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39600                None => return Err(fidl::Error::NotNullable),
39601                Some(len) => len,
39602            };
39603            // Calling decoder.out_of_line_offset(0) is not allowed.
39604            if len == 0 {
39605                return Ok(());
39606            };
39607            depth.increment()?;
39608            let envelope_size = 8;
39609            let bytes_len = len * envelope_size;
39610            let offset = decoder.out_of_line_offset(bytes_len)?;
39611            // Decode the envelope for each type.
39612            let mut _next_ordinal_to_read = 0;
39613            let mut next_offset = offset;
39614            let end_offset = offset + bytes_len;
39615            _next_ordinal_to_read += 1;
39616            if next_offset >= end_offset {
39617                return Ok(());
39618            }
39619
39620            // Decode unknown envelopes for gaps in ordinals.
39621            while _next_ordinal_to_read < 1 {
39622                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39623                _next_ordinal_to_read += 1;
39624                next_offset += envelope_size;
39625            }
39626
39627            let next_out_of_line = decoder.next_out_of_line();
39628            let handles_before = decoder.remaining_handles();
39629            if let Some((inlined, num_bytes, num_handles)) =
39630                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39631            {
39632                let member_inline_size =
39633                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39634                if inlined != (member_inline_size <= 4) {
39635                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39636                }
39637                let inner_offset;
39638                let mut inner_depth = depth.clone();
39639                if inlined {
39640                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39641                    inner_offset = next_offset;
39642                } else {
39643                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39644                    inner_depth.increment()?;
39645                }
39646                let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i64, D));
39647                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
39648                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39649                {
39650                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39651                }
39652                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39653                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39654                }
39655            }
39656
39657            next_offset += envelope_size;
39658
39659            // Decode the remaining unknown envelopes.
39660            while next_offset < end_offset {
39661                _next_ordinal_to_read += 1;
39662                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39663                next_offset += envelope_size;
39664            }
39665
39666            Ok(())
39667        }
39668    }
39669
39670    impl TableFieldUnknown {
39671        #[inline(always)]
39672        fn max_ordinal_present(&self) -> u64 {
39673            0
39674        }
39675    }
39676
39677    impl fidl::encoding::ValueTypeMarker for TableFieldUnknown {
39678        type Borrowed<'a> = &'a Self;
39679        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39680            value
39681        }
39682    }
39683
39684    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknown {
39685        type Owned = Self;
39686
39687        #[inline(always)]
39688        fn inline_align(_context: fidl::encoding::Context) -> usize {
39689            8
39690        }
39691
39692        #[inline(always)]
39693        fn inline_size(_context: fidl::encoding::Context) -> usize {
39694            16
39695        }
39696    }
39697
39698    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldUnknown, D>
39699        for &TableFieldUnknown
39700    {
39701        unsafe fn encode(
39702            self,
39703            encoder: &mut fidl::encoding::Encoder<'_, D>,
39704            offset: usize,
39705            mut depth: fidl::encoding::Depth,
39706        ) -> fidl::Result<()> {
39707            encoder.debug_check_bounds::<TableFieldUnknown>(offset);
39708            // Vector header
39709            let max_ordinal: u64 = self.max_ordinal_present();
39710            encoder.write_num(max_ordinal, offset);
39711            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39712            // Calling encoder.out_of_line_offset(0) is not allowed.
39713            if max_ordinal == 0 {
39714                return Ok(());
39715            }
39716            depth.increment()?;
39717            let envelope_size = 8;
39718            let bytes_len = max_ordinal as usize * envelope_size;
39719            #[allow(unused_variables)]
39720            let offset = encoder.out_of_line_offset(bytes_len);
39721            let mut _prev_end_offset: usize = 0;
39722
39723            Ok(())
39724        }
39725    }
39726
39727    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldUnknown {
39728        #[inline(always)]
39729        fn new_empty() -> Self {
39730            Self::default()
39731        }
39732
39733        unsafe fn decode(
39734            &mut self,
39735            decoder: &mut fidl::encoding::Decoder<'_, D>,
39736            offset: usize,
39737            mut depth: fidl::encoding::Depth,
39738        ) -> fidl::Result<()> {
39739            decoder.debug_check_bounds::<Self>(offset);
39740            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39741                None => return Err(fidl::Error::NotNullable),
39742                Some(len) => len,
39743            };
39744            // Calling decoder.out_of_line_offset(0) is not allowed.
39745            if len == 0 {
39746                return Ok(());
39747            };
39748            depth.increment()?;
39749            let envelope_size = 8;
39750            let bytes_len = len * envelope_size;
39751            let offset = decoder.out_of_line_offset(bytes_len)?;
39752            // Decode the envelope for each type.
39753            let mut _next_ordinal_to_read = 0;
39754            let mut next_offset = offset;
39755            let end_offset = offset + bytes_len;
39756
39757            // Decode the remaining unknown envelopes.
39758            while next_offset < end_offset {
39759                _next_ordinal_to_read += 1;
39760                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39761                next_offset += envelope_size;
39762            }
39763
39764            Ok(())
39765        }
39766    }
39767
39768    impl TableFieldUnsetFlexibleEnumInlined {
39769        #[inline(always)]
39770        fn max_ordinal_present(&self) -> u64 {
39771            if let Some(_) = self.always_set {
39772                return 3;
39773            }
39774            if let Some(_) = self.unsigned_enum {
39775                return 2;
39776            }
39777            if let Some(_) = self.signed_enum {
39778                return 1;
39779            }
39780            0
39781        }
39782    }
39783
39784    impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlined {
39785        type Borrowed<'a> = &'a Self;
39786        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39787            value
39788        }
39789    }
39790
39791    unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlined {
39792        type Owned = Self;
39793
39794        #[inline(always)]
39795        fn inline_align(_context: fidl::encoding::Context) -> usize {
39796            8
39797        }
39798
39799        #[inline(always)]
39800        fn inline_size(_context: fidl::encoding::Context) -> usize {
39801            16
39802        }
39803    }
39804
39805    unsafe impl<D: fidl::encoding::ResourceDialect>
39806        fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>
39807        for &TableFieldUnsetFlexibleEnumInlined
39808    {
39809        unsafe fn encode(
39810            self,
39811            encoder: &mut fidl::encoding::Encoder<'_, D>,
39812            offset: usize,
39813            mut depth: fidl::encoding::Depth,
39814        ) -> fidl::Result<()> {
39815            encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlined>(offset);
39816            // Vector header
39817            let max_ordinal: u64 = self.max_ordinal_present();
39818            encoder.write_num(max_ordinal, offset);
39819            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39820            // Calling encoder.out_of_line_offset(0) is not allowed.
39821            if max_ordinal == 0 {
39822                return Ok(());
39823            }
39824            depth.increment()?;
39825            let envelope_size = 8;
39826            let bytes_len = max_ordinal as usize * envelope_size;
39827            #[allow(unused_variables)]
39828            let offset = encoder.out_of_line_offset(bytes_len);
39829            let mut _prev_end_offset: usize = 0;
39830            if 1 > max_ordinal {
39831                return Ok(());
39832            }
39833
39834            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39835            // are envelope_size bytes.
39836            let cur_offset: usize = (1 - 1) * envelope_size;
39837
39838            // Zero reserved fields.
39839            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39840
39841            // Safety:
39842            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39843            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39844            //   envelope_size bytes, there is always sufficient room.
39845            fidl::encoding::encode_in_envelope_optional::<SignedEnum, D>(
39846                self.signed_enum
39847                    .as_ref()
39848                    .map(<SignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
39849                encoder,
39850                offset + cur_offset,
39851                depth,
39852            )?;
39853
39854            _prev_end_offset = cur_offset + envelope_size;
39855            if 2 > max_ordinal {
39856                return Ok(());
39857            }
39858
39859            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39860            // are envelope_size bytes.
39861            let cur_offset: usize = (2 - 1) * envelope_size;
39862
39863            // Zero reserved fields.
39864            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39865
39866            // Safety:
39867            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39868            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39869            //   envelope_size bytes, there is always sufficient room.
39870            fidl::encoding::encode_in_envelope_optional::<UnsignedEnum, D>(
39871                self.unsigned_enum
39872                    .as_ref()
39873                    .map(<UnsignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
39874                encoder,
39875                offset + cur_offset,
39876                depth,
39877            )?;
39878
39879            _prev_end_offset = cur_offset + envelope_size;
39880            if 3 > max_ordinal {
39881                return Ok(());
39882            }
39883
39884            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
39885            // are envelope_size bytes.
39886            let cur_offset: usize = (3 - 1) * envelope_size;
39887
39888            // Zero reserved fields.
39889            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39890
39891            // Safety:
39892            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
39893            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
39894            //   envelope_size bytes, there is always sufficient room.
39895            fidl::encoding::encode_in_envelope_optional::<bool, D>(
39896                self.always_set.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
39897                encoder,
39898                offset + cur_offset,
39899                depth,
39900            )?;
39901
39902            _prev_end_offset = cur_offset + envelope_size;
39903
39904            Ok(())
39905        }
39906    }
39907
39908    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39909        for TableFieldUnsetFlexibleEnumInlined
39910    {
39911        #[inline(always)]
39912        fn new_empty() -> Self {
39913            Self::default()
39914        }
39915
39916        unsafe fn decode(
39917            &mut self,
39918            decoder: &mut fidl::encoding::Decoder<'_, D>,
39919            offset: usize,
39920            mut depth: fidl::encoding::Depth,
39921        ) -> fidl::Result<()> {
39922            decoder.debug_check_bounds::<Self>(offset);
39923            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39924                None => return Err(fidl::Error::NotNullable),
39925                Some(len) => len,
39926            };
39927            // Calling decoder.out_of_line_offset(0) is not allowed.
39928            if len == 0 {
39929                return Ok(());
39930            };
39931            depth.increment()?;
39932            let envelope_size = 8;
39933            let bytes_len = len * envelope_size;
39934            let offset = decoder.out_of_line_offset(bytes_len)?;
39935            // Decode the envelope for each type.
39936            let mut _next_ordinal_to_read = 0;
39937            let mut next_offset = offset;
39938            let end_offset = offset + bytes_len;
39939            _next_ordinal_to_read += 1;
39940            if next_offset >= end_offset {
39941                return Ok(());
39942            }
39943
39944            // Decode unknown envelopes for gaps in ordinals.
39945            while _next_ordinal_to_read < 1 {
39946                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39947                _next_ordinal_to_read += 1;
39948                next_offset += envelope_size;
39949            }
39950
39951            let next_out_of_line = decoder.next_out_of_line();
39952            let handles_before = decoder.remaining_handles();
39953            if let Some((inlined, num_bytes, num_handles)) =
39954                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39955            {
39956                let member_inline_size =
39957                    <SignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39958                if inlined != (member_inline_size <= 4) {
39959                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
39960                }
39961                let inner_offset;
39962                let mut inner_depth = depth.clone();
39963                if inlined {
39964                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39965                    inner_offset = next_offset;
39966                } else {
39967                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39968                    inner_depth.increment()?;
39969                }
39970                let val_ref =
39971                    self.signed_enum.get_or_insert_with(|| fidl::new_empty!(SignedEnum, D));
39972                fidl::decode!(SignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
39973                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39974                {
39975                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
39976                }
39977                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39978                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39979                }
39980            }
39981
39982            next_offset += envelope_size;
39983            _next_ordinal_to_read += 1;
39984            if next_offset >= end_offset {
39985                return Ok(());
39986            }
39987
39988            // Decode unknown envelopes for gaps in ordinals.
39989            while _next_ordinal_to_read < 2 {
39990                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39991                _next_ordinal_to_read += 1;
39992                next_offset += envelope_size;
39993            }
39994
39995            let next_out_of_line = decoder.next_out_of_line();
39996            let handles_before = decoder.remaining_handles();
39997            if let Some((inlined, num_bytes, num_handles)) =
39998                fidl::encoding::decode_envelope_header(decoder, next_offset)?
39999            {
40000                let member_inline_size =
40001                    <UnsignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40002                if inlined != (member_inline_size <= 4) {
40003                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40004                }
40005                let inner_offset;
40006                let mut inner_depth = depth.clone();
40007                if inlined {
40008                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40009                    inner_offset = next_offset;
40010                } else {
40011                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40012                    inner_depth.increment()?;
40013                }
40014                let val_ref =
40015                    self.unsigned_enum.get_or_insert_with(|| fidl::new_empty!(UnsignedEnum, D));
40016                fidl::decode!(UnsignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
40017                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40018                {
40019                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40020                }
40021                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40022                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40023                }
40024            }
40025
40026            next_offset += envelope_size;
40027            _next_ordinal_to_read += 1;
40028            if next_offset >= end_offset {
40029                return Ok(());
40030            }
40031
40032            // Decode unknown envelopes for gaps in ordinals.
40033            while _next_ordinal_to_read < 3 {
40034                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40035                _next_ordinal_to_read += 1;
40036                next_offset += envelope_size;
40037            }
40038
40039            let next_out_of_line = decoder.next_out_of_line();
40040            let handles_before = decoder.remaining_handles();
40041            if let Some((inlined, num_bytes, num_handles)) =
40042                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40043            {
40044                let member_inline_size =
40045                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40046                if inlined != (member_inline_size <= 4) {
40047                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40048                }
40049                let inner_offset;
40050                let mut inner_depth = depth.clone();
40051                if inlined {
40052                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40053                    inner_offset = next_offset;
40054                } else {
40055                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40056                    inner_depth.increment()?;
40057                }
40058                let val_ref = self.always_set.get_or_insert_with(|| fidl::new_empty!(bool, D));
40059                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
40060                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40061                {
40062                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40063                }
40064                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40065                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40066                }
40067            }
40068
40069            next_offset += envelope_size;
40070
40071            // Decode the remaining unknown envelopes.
40072            while next_offset < end_offset {
40073                _next_ordinal_to_read += 1;
40074                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40075                next_offset += envelope_size;
40076            }
40077
40078            Ok(())
40079        }
40080    }
40081
40082    impl TableNoFields {
40083        #[inline(always)]
40084        fn max_ordinal_present(&self) -> u64 {
40085            0
40086        }
40087    }
40088
40089    impl fidl::encoding::ValueTypeMarker for TableNoFields {
40090        type Borrowed<'a> = &'a Self;
40091        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40092            value
40093        }
40094    }
40095
40096    unsafe impl fidl::encoding::TypeMarker for TableNoFields {
40097        type Owned = Self;
40098
40099        #[inline(always)]
40100        fn inline_align(_context: fidl::encoding::Context) -> usize {
40101            8
40102        }
40103
40104        #[inline(always)]
40105        fn inline_size(_context: fidl::encoding::Context) -> usize {
40106            16
40107        }
40108    }
40109
40110    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableNoFields, D>
40111        for &TableNoFields
40112    {
40113        unsafe fn encode(
40114            self,
40115            encoder: &mut fidl::encoding::Encoder<'_, D>,
40116            offset: usize,
40117            mut depth: fidl::encoding::Depth,
40118        ) -> fidl::Result<()> {
40119            encoder.debug_check_bounds::<TableNoFields>(offset);
40120            // Vector header
40121            let max_ordinal: u64 = self.max_ordinal_present();
40122            encoder.write_num(max_ordinal, offset);
40123            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40124            // Calling encoder.out_of_line_offset(0) is not allowed.
40125            if max_ordinal == 0 {
40126                return Ok(());
40127            }
40128            depth.increment()?;
40129            let envelope_size = 8;
40130            let bytes_len = max_ordinal as usize * envelope_size;
40131            #[allow(unused_variables)]
40132            let offset = encoder.out_of_line_offset(bytes_len);
40133            let mut _prev_end_offset: usize = 0;
40134
40135            Ok(())
40136        }
40137    }
40138
40139    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableNoFields {
40140        #[inline(always)]
40141        fn new_empty() -> Self {
40142            Self::default()
40143        }
40144
40145        unsafe fn decode(
40146            &mut self,
40147            decoder: &mut fidl::encoding::Decoder<'_, D>,
40148            offset: usize,
40149            mut depth: fidl::encoding::Depth,
40150        ) -> fidl::Result<()> {
40151            decoder.debug_check_bounds::<Self>(offset);
40152            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40153                None => return Err(fidl::Error::NotNullable),
40154                Some(len) => len,
40155            };
40156            // Calling decoder.out_of_line_offset(0) is not allowed.
40157            if len == 0 {
40158                return Ok(());
40159            };
40160            depth.increment()?;
40161            let envelope_size = 8;
40162            let bytes_len = len * envelope_size;
40163            let offset = decoder.out_of_line_offset(bytes_len)?;
40164            // Decode the envelope for each type.
40165            let mut _next_ordinal_to_read = 0;
40166            let mut next_offset = offset;
40167            let end_offset = offset + bytes_len;
40168
40169            // Decode the remaining unknown envelopes.
40170            while next_offset < end_offset {
40171                _next_ordinal_to_read += 1;
40172                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40173                next_offset += envelope_size;
40174            }
40175
40176            Ok(())
40177        }
40178    }
40179
40180    impl TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
40181        #[inline(always)]
40182        fn max_ordinal_present(&self) -> u64 {
40183            if let Some(_) = self.member {
40184                return 3;
40185            }
40186            0
40187        }
40188    }
40189
40190    impl fidl::encoding::ValueTypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
40191        type Borrowed<'a> = &'a Self;
40192        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40193            value
40194        }
40195    }
40196
40197    unsafe impl fidl::encoding::TypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
40198        type Owned = Self;
40199
40200        #[inline(always)]
40201        fn inline_align(_context: fidl::encoding::Context) -> usize {
40202            8
40203        }
40204
40205        #[inline(always)]
40206        fn inline_size(_context: fidl::encoding::Context) -> usize {
40207            16
40208        }
40209    }
40210
40211    unsafe impl<D: fidl::encoding::ResourceDialect>
40212        fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>
40213        for &TableOfUnionThenXUnionThenTableThenXUnionThenUnion
40214    {
40215        unsafe fn encode(
40216            self,
40217            encoder: &mut fidl::encoding::Encoder<'_, D>,
40218            offset: usize,
40219            mut depth: fidl::encoding::Depth,
40220        ) -> fidl::Result<()> {
40221            encoder
40222                .debug_check_bounds::<TableOfUnionThenXUnionThenTableThenXUnionThenUnion>(offset);
40223            // Vector header
40224            let max_ordinal: u64 = self.max_ordinal_present();
40225            encoder.write_num(max_ordinal, offset);
40226            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40227            // Calling encoder.out_of_line_offset(0) is not allowed.
40228            if max_ordinal == 0 {
40229                return Ok(());
40230            }
40231            depth.increment()?;
40232            let envelope_size = 8;
40233            let bytes_len = max_ordinal as usize * envelope_size;
40234            #[allow(unused_variables)]
40235            let offset = encoder.out_of_line_offset(bytes_len);
40236            let mut _prev_end_offset: usize = 0;
40237            if 3 > max_ordinal {
40238                return Ok(());
40239            }
40240
40241            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40242            // are envelope_size bytes.
40243            let cur_offset: usize = (3 - 1) * envelope_size;
40244
40245            // Zero reserved fields.
40246            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40247
40248            // Safety:
40249            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40250            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40251            //   envelope_size bytes, there is always sufficient room.
40252            fidl::encoding::encode_in_envelope_optional::<UnionOfXUnionThenTableThenXUnionThenUnion, D>(
40253            self.member.as_ref().map(<UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow),
40254            encoder, offset + cur_offset, depth
40255        )?;
40256
40257            _prev_end_offset = cur_offset + envelope_size;
40258
40259            Ok(())
40260        }
40261    }
40262
40263    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40264        for TableOfUnionThenXUnionThenTableThenXUnionThenUnion
40265    {
40266        #[inline(always)]
40267        fn new_empty() -> Self {
40268            Self::default()
40269        }
40270
40271        unsafe fn decode(
40272            &mut self,
40273            decoder: &mut fidl::encoding::Decoder<'_, D>,
40274            offset: usize,
40275            mut depth: fidl::encoding::Depth,
40276        ) -> fidl::Result<()> {
40277            decoder.debug_check_bounds::<Self>(offset);
40278            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40279                None => return Err(fidl::Error::NotNullable),
40280                Some(len) => len,
40281            };
40282            // Calling decoder.out_of_line_offset(0) is not allowed.
40283            if len == 0 {
40284                return Ok(());
40285            };
40286            depth.increment()?;
40287            let envelope_size = 8;
40288            let bytes_len = len * envelope_size;
40289            let offset = decoder.out_of_line_offset(bytes_len)?;
40290            // Decode the envelope for each type.
40291            let mut _next_ordinal_to_read = 0;
40292            let mut next_offset = offset;
40293            let end_offset = offset + bytes_len;
40294            _next_ordinal_to_read += 1;
40295            if next_offset >= end_offset {
40296                return Ok(());
40297            }
40298
40299            // Decode unknown envelopes for gaps in ordinals.
40300            while _next_ordinal_to_read < 3 {
40301                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40302                _next_ordinal_to_read += 1;
40303                next_offset += envelope_size;
40304            }
40305
40306            let next_out_of_line = decoder.next_out_of_line();
40307            let handles_before = decoder.remaining_handles();
40308            if let Some((inlined, num_bytes, num_handles)) =
40309                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40310            {
40311                let member_inline_size = <UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40312                if inlined != (member_inline_size <= 4) {
40313                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40314                }
40315                let inner_offset;
40316                let mut inner_depth = depth.clone();
40317                if inlined {
40318                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40319                    inner_offset = next_offset;
40320                } else {
40321                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40322                    inner_depth.increment()?;
40323                }
40324                let val_ref = self.member.get_or_insert_with(|| {
40325                    fidl::new_empty!(UnionOfXUnionThenTableThenXUnionThenUnion, D)
40326                });
40327                fidl::decode!(
40328                    UnionOfXUnionThenTableThenXUnionThenUnion,
40329                    D,
40330                    val_ref,
40331                    decoder,
40332                    inner_offset,
40333                    inner_depth
40334                )?;
40335                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40336                {
40337                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40338                }
40339                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40340                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40341                }
40342            }
40343
40344            next_offset += envelope_size;
40345
40346            // Decode the remaining unknown envelopes.
40347            while next_offset < end_offset {
40348                _next_ordinal_to_read += 1;
40349                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40350                next_offset += envelope_size;
40351            }
40352
40353            Ok(())
40354        }
40355    }
40356
40357    impl TableOfXUnionThenUnion {
40358        #[inline(always)]
40359        fn max_ordinal_present(&self) -> u64 {
40360            if let Some(_) = self.member {
40361                return 2;
40362            }
40363            0
40364        }
40365    }
40366
40367    impl fidl::encoding::ValueTypeMarker for TableOfXUnionThenUnion {
40368        type Borrowed<'a> = &'a Self;
40369        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40370            value
40371        }
40372    }
40373
40374    unsafe impl fidl::encoding::TypeMarker for TableOfXUnionThenUnion {
40375        type Owned = Self;
40376
40377        #[inline(always)]
40378        fn inline_align(_context: fidl::encoding::Context) -> usize {
40379            8
40380        }
40381
40382        #[inline(always)]
40383        fn inline_size(_context: fidl::encoding::Context) -> usize {
40384            16
40385        }
40386    }
40387
40388    unsafe impl<D: fidl::encoding::ResourceDialect>
40389        fidl::encoding::Encode<TableOfXUnionThenUnion, D> for &TableOfXUnionThenUnion
40390    {
40391        unsafe fn encode(
40392            self,
40393            encoder: &mut fidl::encoding::Encoder<'_, D>,
40394            offset: usize,
40395            mut depth: fidl::encoding::Depth,
40396        ) -> fidl::Result<()> {
40397            encoder.debug_check_bounds::<TableOfXUnionThenUnion>(offset);
40398            // Vector header
40399            let max_ordinal: u64 = self.max_ordinal_present();
40400            encoder.write_num(max_ordinal, offset);
40401            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40402            // Calling encoder.out_of_line_offset(0) is not allowed.
40403            if max_ordinal == 0 {
40404                return Ok(());
40405            }
40406            depth.increment()?;
40407            let envelope_size = 8;
40408            let bytes_len = max_ordinal as usize * envelope_size;
40409            #[allow(unused_variables)]
40410            let offset = encoder.out_of_line_offset(bytes_len);
40411            let mut _prev_end_offset: usize = 0;
40412            if 2 > max_ordinal {
40413                return Ok(());
40414            }
40415
40416            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40417            // are envelope_size bytes.
40418            let cur_offset: usize = (2 - 1) * envelope_size;
40419
40420            // Zero reserved fields.
40421            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40422
40423            // Safety:
40424            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40425            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40426            //   envelope_size bytes, there is always sufficient room.
40427            fidl::encoding::encode_in_envelope_optional::<XUnionOfUnion, D>(
40428                self.member
40429                    .as_ref()
40430                    .map(<XUnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow),
40431                encoder,
40432                offset + cur_offset,
40433                depth,
40434            )?;
40435
40436            _prev_end_offset = cur_offset + envelope_size;
40437
40438            Ok(())
40439        }
40440    }
40441
40442    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40443        for TableOfXUnionThenUnion
40444    {
40445        #[inline(always)]
40446        fn new_empty() -> Self {
40447            Self::default()
40448        }
40449
40450        unsafe fn decode(
40451            &mut self,
40452            decoder: &mut fidl::encoding::Decoder<'_, D>,
40453            offset: usize,
40454            mut depth: fidl::encoding::Depth,
40455        ) -> fidl::Result<()> {
40456            decoder.debug_check_bounds::<Self>(offset);
40457            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40458                None => return Err(fidl::Error::NotNullable),
40459                Some(len) => len,
40460            };
40461            // Calling decoder.out_of_line_offset(0) is not allowed.
40462            if len == 0 {
40463                return Ok(());
40464            };
40465            depth.increment()?;
40466            let envelope_size = 8;
40467            let bytes_len = len * envelope_size;
40468            let offset = decoder.out_of_line_offset(bytes_len)?;
40469            // Decode the envelope for each type.
40470            let mut _next_ordinal_to_read = 0;
40471            let mut next_offset = offset;
40472            let end_offset = offset + bytes_len;
40473            _next_ordinal_to_read += 1;
40474            if next_offset >= end_offset {
40475                return Ok(());
40476            }
40477
40478            // Decode unknown envelopes for gaps in ordinals.
40479            while _next_ordinal_to_read < 2 {
40480                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40481                _next_ordinal_to_read += 1;
40482                next_offset += envelope_size;
40483            }
40484
40485            let next_out_of_line = decoder.next_out_of_line();
40486            let handles_before = decoder.remaining_handles();
40487            if let Some((inlined, num_bytes, num_handles)) =
40488                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40489            {
40490                let member_inline_size =
40491                    <XUnionOfUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40492                if inlined != (member_inline_size <= 4) {
40493                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40494                }
40495                let inner_offset;
40496                let mut inner_depth = depth.clone();
40497                if inlined {
40498                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40499                    inner_offset = next_offset;
40500                } else {
40501                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40502                    inner_depth.increment()?;
40503                }
40504                let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(XUnionOfUnion, D));
40505                fidl::decode!(XUnionOfUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
40506                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40507                {
40508                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40509                }
40510                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40511                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40512                }
40513            }
40514
40515            next_offset += envelope_size;
40516
40517            // Decode the remaining unknown envelopes.
40518            while next_offset < end_offset {
40519                _next_ordinal_to_read += 1;
40520                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40521                next_offset += envelope_size;
40522            }
40523
40524            Ok(())
40525        }
40526    }
40527
40528    impl TableStructWithReservedSandwich {
40529        #[inline(always)]
40530        fn max_ordinal_present(&self) -> u64 {
40531            if let Some(_) = self.s2 {
40532                return 3;
40533            }
40534            if let Some(_) = self.s1 {
40535                return 2;
40536            }
40537            0
40538        }
40539    }
40540
40541    impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwich {
40542        type Borrowed<'a> = &'a Self;
40543        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40544            value
40545        }
40546    }
40547
40548    unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwich {
40549        type Owned = Self;
40550
40551        #[inline(always)]
40552        fn inline_align(_context: fidl::encoding::Context) -> usize {
40553            8
40554        }
40555
40556        #[inline(always)]
40557        fn inline_size(_context: fidl::encoding::Context) -> usize {
40558            16
40559        }
40560    }
40561
40562    unsafe impl<D: fidl::encoding::ResourceDialect>
40563        fidl::encoding::Encode<TableStructWithReservedSandwich, D>
40564        for &TableStructWithReservedSandwich
40565    {
40566        unsafe fn encode(
40567            self,
40568            encoder: &mut fidl::encoding::Encoder<'_, D>,
40569            offset: usize,
40570            mut depth: fidl::encoding::Depth,
40571        ) -> fidl::Result<()> {
40572            encoder.debug_check_bounds::<TableStructWithReservedSandwich>(offset);
40573            // Vector header
40574            let max_ordinal: u64 = self.max_ordinal_present();
40575            encoder.write_num(max_ordinal, offset);
40576            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40577            // Calling encoder.out_of_line_offset(0) is not allowed.
40578            if max_ordinal == 0 {
40579                return Ok(());
40580            }
40581            depth.increment()?;
40582            let envelope_size = 8;
40583            let bytes_len = max_ordinal as usize * envelope_size;
40584            #[allow(unused_variables)]
40585            let offset = encoder.out_of_line_offset(bytes_len);
40586            let mut _prev_end_offset: usize = 0;
40587            if 2 > max_ordinal {
40588                return Ok(());
40589            }
40590
40591            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40592            // are envelope_size bytes.
40593            let cur_offset: usize = (2 - 1) * envelope_size;
40594
40595            // Zero reserved fields.
40596            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40597
40598            // Safety:
40599            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40600            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40601            //   envelope_size bytes, there is always sufficient room.
40602            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40603                self.s1
40604                    .as_ref()
40605                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40606                encoder,
40607                offset + cur_offset,
40608                depth,
40609            )?;
40610
40611            _prev_end_offset = cur_offset + envelope_size;
40612            if 3 > max_ordinal {
40613                return Ok(());
40614            }
40615
40616            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40617            // are envelope_size bytes.
40618            let cur_offset: usize = (3 - 1) * envelope_size;
40619
40620            // Zero reserved fields.
40621            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40622
40623            // Safety:
40624            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40625            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40626            //   envelope_size bytes, there is always sufficient room.
40627            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40628                self.s2
40629                    .as_ref()
40630                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40631                encoder,
40632                offset + cur_offset,
40633                depth,
40634            )?;
40635
40636            _prev_end_offset = cur_offset + envelope_size;
40637
40638            Ok(())
40639        }
40640    }
40641
40642    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40643        for TableStructWithReservedSandwich
40644    {
40645        #[inline(always)]
40646        fn new_empty() -> Self {
40647            Self::default()
40648        }
40649
40650        unsafe fn decode(
40651            &mut self,
40652            decoder: &mut fidl::encoding::Decoder<'_, D>,
40653            offset: usize,
40654            mut depth: fidl::encoding::Depth,
40655        ) -> fidl::Result<()> {
40656            decoder.debug_check_bounds::<Self>(offset);
40657            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40658                None => return Err(fidl::Error::NotNullable),
40659                Some(len) => len,
40660            };
40661            // Calling decoder.out_of_line_offset(0) is not allowed.
40662            if len == 0 {
40663                return Ok(());
40664            };
40665            depth.increment()?;
40666            let envelope_size = 8;
40667            let bytes_len = len * envelope_size;
40668            let offset = decoder.out_of_line_offset(bytes_len)?;
40669            // Decode the envelope for each type.
40670            let mut _next_ordinal_to_read = 0;
40671            let mut next_offset = offset;
40672            let end_offset = offset + bytes_len;
40673            _next_ordinal_to_read += 1;
40674            if next_offset >= end_offset {
40675                return Ok(());
40676            }
40677
40678            // Decode unknown envelopes for gaps in ordinals.
40679            while _next_ordinal_to_read < 2 {
40680                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40681                _next_ordinal_to_read += 1;
40682                next_offset += envelope_size;
40683            }
40684
40685            let next_out_of_line = decoder.next_out_of_line();
40686            let handles_before = decoder.remaining_handles();
40687            if let Some((inlined, num_bytes, num_handles)) =
40688                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40689            {
40690                let member_inline_size =
40691                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40692                if inlined != (member_inline_size <= 4) {
40693                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40694                }
40695                let inner_offset;
40696                let mut inner_depth = depth.clone();
40697                if inlined {
40698                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40699                    inner_offset = next_offset;
40700                } else {
40701                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40702                    inner_depth.increment()?;
40703                }
40704                let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40705                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40706                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40707                {
40708                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40709                }
40710                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40711                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40712                }
40713            }
40714
40715            next_offset += envelope_size;
40716            _next_ordinal_to_read += 1;
40717            if next_offset >= end_offset {
40718                return Ok(());
40719            }
40720
40721            // Decode unknown envelopes for gaps in ordinals.
40722            while _next_ordinal_to_read < 3 {
40723                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40724                _next_ordinal_to_read += 1;
40725                next_offset += envelope_size;
40726            }
40727
40728            let next_out_of_line = decoder.next_out_of_line();
40729            let handles_before = decoder.remaining_handles();
40730            if let Some((inlined, num_bytes, num_handles)) =
40731                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40732            {
40733                let member_inline_size =
40734                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40735                if inlined != (member_inline_size <= 4) {
40736                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40737                }
40738                let inner_offset;
40739                let mut inner_depth = depth.clone();
40740                if inlined {
40741                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40742                    inner_offset = next_offset;
40743                } else {
40744                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40745                    inner_depth.increment()?;
40746                }
40747                let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40748                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40749                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40750                {
40751                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
40752                }
40753                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40754                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40755                }
40756            }
40757
40758            next_offset += envelope_size;
40759
40760            // Decode the remaining unknown envelopes.
40761            while next_offset < end_offset {
40762                _next_ordinal_to_read += 1;
40763                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40764                next_offset += envelope_size;
40765            }
40766
40767            Ok(())
40768        }
40769    }
40770
40771    impl TableStructWithUint32Sandwich {
40772        #[inline(always)]
40773        fn max_ordinal_present(&self) -> u64 {
40774            if let Some(_) = self.i2 {
40775                return 4;
40776            }
40777            if let Some(_) = self.s2 {
40778                return 3;
40779            }
40780            if let Some(_) = self.s1 {
40781                return 2;
40782            }
40783            if let Some(_) = self.i {
40784                return 1;
40785            }
40786            0
40787        }
40788    }
40789
40790    impl fidl::encoding::ValueTypeMarker for TableStructWithUint32Sandwich {
40791        type Borrowed<'a> = &'a Self;
40792        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40793            value
40794        }
40795    }
40796
40797    unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32Sandwich {
40798        type Owned = Self;
40799
40800        #[inline(always)]
40801        fn inline_align(_context: fidl::encoding::Context) -> usize {
40802            8
40803        }
40804
40805        #[inline(always)]
40806        fn inline_size(_context: fidl::encoding::Context) -> usize {
40807            16
40808        }
40809    }
40810
40811    unsafe impl<D: fidl::encoding::ResourceDialect>
40812        fidl::encoding::Encode<TableStructWithUint32Sandwich, D>
40813        for &TableStructWithUint32Sandwich
40814    {
40815        unsafe fn encode(
40816            self,
40817            encoder: &mut fidl::encoding::Encoder<'_, D>,
40818            offset: usize,
40819            mut depth: fidl::encoding::Depth,
40820        ) -> fidl::Result<()> {
40821            encoder.debug_check_bounds::<TableStructWithUint32Sandwich>(offset);
40822            // Vector header
40823            let max_ordinal: u64 = self.max_ordinal_present();
40824            encoder.write_num(max_ordinal, offset);
40825            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40826            // Calling encoder.out_of_line_offset(0) is not allowed.
40827            if max_ordinal == 0 {
40828                return Ok(());
40829            }
40830            depth.increment()?;
40831            let envelope_size = 8;
40832            let bytes_len = max_ordinal as usize * envelope_size;
40833            #[allow(unused_variables)]
40834            let offset = encoder.out_of_line_offset(bytes_len);
40835            let mut _prev_end_offset: usize = 0;
40836            if 1 > max_ordinal {
40837                return Ok(());
40838            }
40839
40840            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40841            // are envelope_size bytes.
40842            let cur_offset: usize = (1 - 1) * envelope_size;
40843
40844            // Zero reserved fields.
40845            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40846
40847            // Safety:
40848            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40849            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40850            //   envelope_size bytes, there is always sufficient room.
40851            fidl::encoding::encode_in_envelope_optional::<u32, D>(
40852                self.i.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
40853                encoder,
40854                offset + cur_offset,
40855                depth,
40856            )?;
40857
40858            _prev_end_offset = cur_offset + envelope_size;
40859            if 2 > max_ordinal {
40860                return Ok(());
40861            }
40862
40863            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40864            // are envelope_size bytes.
40865            let cur_offset: usize = (2 - 1) * envelope_size;
40866
40867            // Zero reserved fields.
40868            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40869
40870            // Safety:
40871            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40872            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40873            //   envelope_size bytes, there is always sufficient room.
40874            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40875                self.s1
40876                    .as_ref()
40877                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40878                encoder,
40879                offset + cur_offset,
40880                depth,
40881            )?;
40882
40883            _prev_end_offset = cur_offset + envelope_size;
40884            if 3 > max_ordinal {
40885                return Ok(());
40886            }
40887
40888            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40889            // are envelope_size bytes.
40890            let cur_offset: usize = (3 - 1) * envelope_size;
40891
40892            // Zero reserved fields.
40893            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40894
40895            // Safety:
40896            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40897            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40898            //   envelope_size bytes, there is always sufficient room.
40899            fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
40900                self.s2
40901                    .as_ref()
40902                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
40903                encoder,
40904                offset + cur_offset,
40905                depth,
40906            )?;
40907
40908            _prev_end_offset = cur_offset + envelope_size;
40909            if 4 > max_ordinal {
40910                return Ok(());
40911            }
40912
40913            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
40914            // are envelope_size bytes.
40915            let cur_offset: usize = (4 - 1) * envelope_size;
40916
40917            // Zero reserved fields.
40918            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40919
40920            // Safety:
40921            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
40922            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
40923            //   envelope_size bytes, there is always sufficient room.
40924            fidl::encoding::encode_in_envelope_optional::<u32, D>(
40925                self.i2.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
40926                encoder,
40927                offset + cur_offset,
40928                depth,
40929            )?;
40930
40931            _prev_end_offset = cur_offset + envelope_size;
40932
40933            Ok(())
40934        }
40935    }
40936
40937    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40938        for TableStructWithUint32Sandwich
40939    {
40940        #[inline(always)]
40941        fn new_empty() -> Self {
40942            Self::default()
40943        }
40944
40945        unsafe fn decode(
40946            &mut self,
40947            decoder: &mut fidl::encoding::Decoder<'_, D>,
40948            offset: usize,
40949            mut depth: fidl::encoding::Depth,
40950        ) -> fidl::Result<()> {
40951            decoder.debug_check_bounds::<Self>(offset);
40952            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40953                None => return Err(fidl::Error::NotNullable),
40954                Some(len) => len,
40955            };
40956            // Calling decoder.out_of_line_offset(0) is not allowed.
40957            if len == 0 {
40958                return Ok(());
40959            };
40960            depth.increment()?;
40961            let envelope_size = 8;
40962            let bytes_len = len * envelope_size;
40963            let offset = decoder.out_of_line_offset(bytes_len)?;
40964            // Decode the envelope for each type.
40965            let mut _next_ordinal_to_read = 0;
40966            let mut next_offset = offset;
40967            let end_offset = offset + bytes_len;
40968            _next_ordinal_to_read += 1;
40969            if next_offset >= end_offset {
40970                return Ok(());
40971            }
40972
40973            // Decode unknown envelopes for gaps in ordinals.
40974            while _next_ordinal_to_read < 1 {
40975                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40976                _next_ordinal_to_read += 1;
40977                next_offset += envelope_size;
40978            }
40979
40980            let next_out_of_line = decoder.next_out_of_line();
40981            let handles_before = decoder.remaining_handles();
40982            if let Some((inlined, num_bytes, num_handles)) =
40983                fidl::encoding::decode_envelope_header(decoder, next_offset)?
40984            {
40985                let member_inline_size =
40986                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40987                if inlined != (member_inline_size <= 4) {
40988                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
40989                }
40990                let inner_offset;
40991                let mut inner_depth = depth.clone();
40992                if inlined {
40993                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40994                    inner_offset = next_offset;
40995                } else {
40996                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40997                    inner_depth.increment()?;
40998                }
40999                let val_ref = self.i.get_or_insert_with(|| fidl::new_empty!(u32, D));
41000                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
41001                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41002                {
41003                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41004                }
41005                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41006                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41007                }
41008            }
41009
41010            next_offset += envelope_size;
41011            _next_ordinal_to_read += 1;
41012            if next_offset >= end_offset {
41013                return Ok(());
41014            }
41015
41016            // Decode unknown envelopes for gaps in ordinals.
41017            while _next_ordinal_to_read < 2 {
41018                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41019                _next_ordinal_to_read += 1;
41020                next_offset += envelope_size;
41021            }
41022
41023            let next_out_of_line = decoder.next_out_of_line();
41024            let handles_before = decoder.remaining_handles();
41025            if let Some((inlined, num_bytes, num_handles)) =
41026                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41027            {
41028                let member_inline_size =
41029                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41030                if inlined != (member_inline_size <= 4) {
41031                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41032                }
41033                let inner_offset;
41034                let mut inner_depth = depth.clone();
41035                if inlined {
41036                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41037                    inner_offset = next_offset;
41038                } else {
41039                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41040                    inner_depth.increment()?;
41041                }
41042                let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
41043                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
41044                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41045                {
41046                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41047                }
41048                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41049                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41050                }
41051            }
41052
41053            next_offset += envelope_size;
41054            _next_ordinal_to_read += 1;
41055            if next_offset >= end_offset {
41056                return Ok(());
41057            }
41058
41059            // Decode unknown envelopes for gaps in ordinals.
41060            while _next_ordinal_to_read < 3 {
41061                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41062                _next_ordinal_to_read += 1;
41063                next_offset += envelope_size;
41064            }
41065
41066            let next_out_of_line = decoder.next_out_of_line();
41067            let handles_before = decoder.remaining_handles();
41068            if let Some((inlined, num_bytes, num_handles)) =
41069                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41070            {
41071                let member_inline_size =
41072                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41073                if inlined != (member_inline_size <= 4) {
41074                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41075                }
41076                let inner_offset;
41077                let mut inner_depth = depth.clone();
41078                if inlined {
41079                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41080                    inner_offset = next_offset;
41081                } else {
41082                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41083                    inner_depth.increment()?;
41084                }
41085                let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
41086                fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
41087                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41088                {
41089                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41090                }
41091                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41092                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41093                }
41094            }
41095
41096            next_offset += envelope_size;
41097            _next_ordinal_to_read += 1;
41098            if next_offset >= end_offset {
41099                return Ok(());
41100            }
41101
41102            // Decode unknown envelopes for gaps in ordinals.
41103            while _next_ordinal_to_read < 4 {
41104                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41105                _next_ordinal_to_read += 1;
41106                next_offset += envelope_size;
41107            }
41108
41109            let next_out_of_line = decoder.next_out_of_line();
41110            let handles_before = decoder.remaining_handles();
41111            if let Some((inlined, num_bytes, num_handles)) =
41112                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41113            {
41114                let member_inline_size =
41115                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41116                if inlined != (member_inline_size <= 4) {
41117                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41118                }
41119                let inner_offset;
41120                let mut inner_depth = depth.clone();
41121                if inlined {
41122                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41123                    inner_offset = next_offset;
41124                } else {
41125                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41126                    inner_depth.increment()?;
41127                }
41128                let val_ref = self.i2.get_or_insert_with(|| fidl::new_empty!(u32, D));
41129                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
41130                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41131                {
41132                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41133                }
41134                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41135                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41136                }
41137            }
41138
41139            next_offset += envelope_size;
41140
41141            // Decode the remaining unknown envelopes.
41142            while next_offset < end_offset {
41143                _next_ordinal_to_read += 1;
41144                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41145                next_offset += envelope_size;
41146            }
41147
41148            Ok(())
41149        }
41150    }
41151
41152    impl TableWithEmptyStruct {
41153        #[inline(always)]
41154        fn max_ordinal_present(&self) -> u64 {
41155            if let Some(_) = self.s {
41156                return 1;
41157            }
41158            0
41159        }
41160    }
41161
41162    impl fidl::encoding::ValueTypeMarker for TableWithEmptyStruct {
41163        type Borrowed<'a> = &'a Self;
41164        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41165            value
41166        }
41167    }
41168
41169    unsafe impl fidl::encoding::TypeMarker for TableWithEmptyStruct {
41170        type Owned = Self;
41171
41172        #[inline(always)]
41173        fn inline_align(_context: fidl::encoding::Context) -> usize {
41174            8
41175        }
41176
41177        #[inline(always)]
41178        fn inline_size(_context: fidl::encoding::Context) -> usize {
41179            16
41180        }
41181    }
41182
41183    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithEmptyStruct, D>
41184        for &TableWithEmptyStruct
41185    {
41186        unsafe fn encode(
41187            self,
41188            encoder: &mut fidl::encoding::Encoder<'_, D>,
41189            offset: usize,
41190            mut depth: fidl::encoding::Depth,
41191        ) -> fidl::Result<()> {
41192            encoder.debug_check_bounds::<TableWithEmptyStruct>(offset);
41193            // Vector header
41194            let max_ordinal: u64 = self.max_ordinal_present();
41195            encoder.write_num(max_ordinal, offset);
41196            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41197            // Calling encoder.out_of_line_offset(0) is not allowed.
41198            if max_ordinal == 0 {
41199                return Ok(());
41200            }
41201            depth.increment()?;
41202            let envelope_size = 8;
41203            let bytes_len = max_ordinal as usize * envelope_size;
41204            #[allow(unused_variables)]
41205            let offset = encoder.out_of_line_offset(bytes_len);
41206            let mut _prev_end_offset: usize = 0;
41207            if 1 > max_ordinal {
41208                return Ok(());
41209            }
41210
41211            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41212            // are envelope_size bytes.
41213            let cur_offset: usize = (1 - 1) * envelope_size;
41214
41215            // Zero reserved fields.
41216            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41217
41218            // Safety:
41219            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41220            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41221            //   envelope_size bytes, there is always sufficient room.
41222            fidl::encoding::encode_in_envelope_optional::<EmptyStruct, D>(
41223                self.s.as_ref().map(<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow),
41224                encoder,
41225                offset + cur_offset,
41226                depth,
41227            )?;
41228
41229            _prev_end_offset = cur_offset + envelope_size;
41230
41231            Ok(())
41232        }
41233    }
41234
41235    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithEmptyStruct {
41236        #[inline(always)]
41237        fn new_empty() -> Self {
41238            Self::default()
41239        }
41240
41241        unsafe fn decode(
41242            &mut self,
41243            decoder: &mut fidl::encoding::Decoder<'_, D>,
41244            offset: usize,
41245            mut depth: fidl::encoding::Depth,
41246        ) -> fidl::Result<()> {
41247            decoder.debug_check_bounds::<Self>(offset);
41248            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41249                None => return Err(fidl::Error::NotNullable),
41250                Some(len) => len,
41251            };
41252            // Calling decoder.out_of_line_offset(0) is not allowed.
41253            if len == 0 {
41254                return Ok(());
41255            };
41256            depth.increment()?;
41257            let envelope_size = 8;
41258            let bytes_len = len * envelope_size;
41259            let offset = decoder.out_of_line_offset(bytes_len)?;
41260            // Decode the envelope for each type.
41261            let mut _next_ordinal_to_read = 0;
41262            let mut next_offset = offset;
41263            let end_offset = offset + bytes_len;
41264            _next_ordinal_to_read += 1;
41265            if next_offset >= end_offset {
41266                return Ok(());
41267            }
41268
41269            // Decode unknown envelopes for gaps in ordinals.
41270            while _next_ordinal_to_read < 1 {
41271                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41272                _next_ordinal_to_read += 1;
41273                next_offset += envelope_size;
41274            }
41275
41276            let next_out_of_line = decoder.next_out_of_line();
41277            let handles_before = decoder.remaining_handles();
41278            if let Some((inlined, num_bytes, num_handles)) =
41279                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41280            {
41281                let member_inline_size =
41282                    <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41283                if inlined != (member_inline_size <= 4) {
41284                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41285                }
41286                let inner_offset;
41287                let mut inner_depth = depth.clone();
41288                if inlined {
41289                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41290                    inner_offset = next_offset;
41291                } else {
41292                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41293                    inner_depth.increment()?;
41294                }
41295                let val_ref = self.s.get_or_insert_with(|| fidl::new_empty!(EmptyStruct, D));
41296                fidl::decode!(EmptyStruct, D, val_ref, decoder, inner_offset, inner_depth)?;
41297                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41298                {
41299                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41300                }
41301                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41302                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41303                }
41304            }
41305
41306            next_offset += envelope_size;
41307
41308            // Decode the remaining unknown envelopes.
41309            while next_offset < end_offset {
41310                _next_ordinal_to_read += 1;
41311                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41312                next_offset += envelope_size;
41313            }
41314
41315            Ok(())
41316        }
41317    }
41318
41319    impl TableWithGaps {
41320        #[inline(always)]
41321        fn max_ordinal_present(&self) -> u64 {
41322            if let Some(_) = self.fourth {
41323                return 4;
41324            }
41325            if let Some(_) = self.second {
41326                return 2;
41327            }
41328            0
41329        }
41330    }
41331
41332    impl fidl::encoding::ValueTypeMarker for TableWithGaps {
41333        type Borrowed<'a> = &'a Self;
41334        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41335            value
41336        }
41337    }
41338
41339    unsafe impl fidl::encoding::TypeMarker for TableWithGaps {
41340        type Owned = Self;
41341
41342        #[inline(always)]
41343        fn inline_align(_context: fidl::encoding::Context) -> usize {
41344            8
41345        }
41346
41347        #[inline(always)]
41348        fn inline_size(_context: fidl::encoding::Context) -> usize {
41349            16
41350        }
41351    }
41352
41353    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithGaps, D>
41354        for &TableWithGaps
41355    {
41356        unsafe fn encode(
41357            self,
41358            encoder: &mut fidl::encoding::Encoder<'_, D>,
41359            offset: usize,
41360            mut depth: fidl::encoding::Depth,
41361        ) -> fidl::Result<()> {
41362            encoder.debug_check_bounds::<TableWithGaps>(offset);
41363            // Vector header
41364            let max_ordinal: u64 = self.max_ordinal_present();
41365            encoder.write_num(max_ordinal, offset);
41366            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41367            // Calling encoder.out_of_line_offset(0) is not allowed.
41368            if max_ordinal == 0 {
41369                return Ok(());
41370            }
41371            depth.increment()?;
41372            let envelope_size = 8;
41373            let bytes_len = max_ordinal as usize * envelope_size;
41374            #[allow(unused_variables)]
41375            let offset = encoder.out_of_line_offset(bytes_len);
41376            let mut _prev_end_offset: usize = 0;
41377            if 2 > max_ordinal {
41378                return Ok(());
41379            }
41380
41381            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41382            // are envelope_size bytes.
41383            let cur_offset: usize = (2 - 1) * envelope_size;
41384
41385            // Zero reserved fields.
41386            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41387
41388            // Safety:
41389            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41390            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41391            //   envelope_size bytes, there is always sufficient room.
41392            fidl::encoding::encode_in_envelope_optional::<i32, D>(
41393                self.second.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
41394                encoder,
41395                offset + cur_offset,
41396                depth,
41397            )?;
41398
41399            _prev_end_offset = cur_offset + envelope_size;
41400            if 4 > max_ordinal {
41401                return Ok(());
41402            }
41403
41404            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41405            // are envelope_size bytes.
41406            let cur_offset: usize = (4 - 1) * envelope_size;
41407
41408            // Zero reserved fields.
41409            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41410
41411            // Safety:
41412            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41413            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41414            //   envelope_size bytes, there is always sufficient room.
41415            fidl::encoding::encode_in_envelope_optional::<i32, D>(
41416                self.fourth.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
41417                encoder,
41418                offset + cur_offset,
41419                depth,
41420            )?;
41421
41422            _prev_end_offset = cur_offset + envelope_size;
41423
41424            Ok(())
41425        }
41426    }
41427
41428    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithGaps {
41429        #[inline(always)]
41430        fn new_empty() -> Self {
41431            Self::default()
41432        }
41433
41434        unsafe fn decode(
41435            &mut self,
41436            decoder: &mut fidl::encoding::Decoder<'_, D>,
41437            offset: usize,
41438            mut depth: fidl::encoding::Depth,
41439        ) -> fidl::Result<()> {
41440            decoder.debug_check_bounds::<Self>(offset);
41441            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41442                None => return Err(fidl::Error::NotNullable),
41443                Some(len) => len,
41444            };
41445            // Calling decoder.out_of_line_offset(0) is not allowed.
41446            if len == 0 {
41447                return Ok(());
41448            };
41449            depth.increment()?;
41450            let envelope_size = 8;
41451            let bytes_len = len * envelope_size;
41452            let offset = decoder.out_of_line_offset(bytes_len)?;
41453            // Decode the envelope for each type.
41454            let mut _next_ordinal_to_read = 0;
41455            let mut next_offset = offset;
41456            let end_offset = offset + bytes_len;
41457            _next_ordinal_to_read += 1;
41458            if next_offset >= end_offset {
41459                return Ok(());
41460            }
41461
41462            // Decode unknown envelopes for gaps in ordinals.
41463            while _next_ordinal_to_read < 2 {
41464                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41465                _next_ordinal_to_read += 1;
41466                next_offset += envelope_size;
41467            }
41468
41469            let next_out_of_line = decoder.next_out_of_line();
41470            let handles_before = decoder.remaining_handles();
41471            if let Some((inlined, num_bytes, num_handles)) =
41472                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41473            {
41474                let member_inline_size =
41475                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41476                if inlined != (member_inline_size <= 4) {
41477                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41478                }
41479                let inner_offset;
41480                let mut inner_depth = depth.clone();
41481                if inlined {
41482                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41483                    inner_offset = next_offset;
41484                } else {
41485                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41486                    inner_depth.increment()?;
41487                }
41488                let val_ref = self.second.get_or_insert_with(|| fidl::new_empty!(i32, D));
41489                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
41490                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41491                {
41492                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41493                }
41494                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41495                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41496                }
41497            }
41498
41499            next_offset += envelope_size;
41500            _next_ordinal_to_read += 1;
41501            if next_offset >= end_offset {
41502                return Ok(());
41503            }
41504
41505            // Decode unknown envelopes for gaps in ordinals.
41506            while _next_ordinal_to_read < 4 {
41507                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41508                _next_ordinal_to_read += 1;
41509                next_offset += envelope_size;
41510            }
41511
41512            let next_out_of_line = decoder.next_out_of_line();
41513            let handles_before = decoder.remaining_handles();
41514            if let Some((inlined, num_bytes, num_handles)) =
41515                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41516            {
41517                let member_inline_size =
41518                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41519                if inlined != (member_inline_size <= 4) {
41520                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41521                }
41522                let inner_offset;
41523                let mut inner_depth = depth.clone();
41524                if inlined {
41525                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41526                    inner_offset = next_offset;
41527                } else {
41528                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41529                    inner_depth.increment()?;
41530                }
41531                let val_ref = self.fourth.get_or_insert_with(|| fidl::new_empty!(i32, D));
41532                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
41533                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41534                {
41535                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41536                }
41537                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41538                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41539                }
41540            }
41541
41542            next_offset += envelope_size;
41543
41544            // Decode the remaining unknown envelopes.
41545            while next_offset < end_offset {
41546                _next_ordinal_to_read += 1;
41547                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41548                next_offset += envelope_size;
41549            }
41550
41551            Ok(())
41552        }
41553    }
41554
41555    impl TableWithReservedFieldThenUnion {
41556        #[inline(always)]
41557        fn max_ordinal_present(&self) -> u64 {
41558            if let Some(_) = self.uv {
41559                return 2;
41560            }
41561            0
41562        }
41563    }
41564
41565    impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnion {
41566        type Borrowed<'a> = &'a Self;
41567        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41568            value
41569        }
41570    }
41571
41572    unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnion {
41573        type Owned = Self;
41574
41575        #[inline(always)]
41576        fn inline_align(_context: fidl::encoding::Context) -> usize {
41577            8
41578        }
41579
41580        #[inline(always)]
41581        fn inline_size(_context: fidl::encoding::Context) -> usize {
41582            16
41583        }
41584    }
41585
41586    unsafe impl<D: fidl::encoding::ResourceDialect>
41587        fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>
41588        for &TableWithReservedFieldThenUnion
41589    {
41590        unsafe fn encode(
41591            self,
41592            encoder: &mut fidl::encoding::Encoder<'_, D>,
41593            offset: usize,
41594            mut depth: fidl::encoding::Depth,
41595        ) -> fidl::Result<()> {
41596            encoder.debug_check_bounds::<TableWithReservedFieldThenUnion>(offset);
41597            // Vector header
41598            let max_ordinal: u64 = self.max_ordinal_present();
41599            encoder.write_num(max_ordinal, offset);
41600            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41601            // Calling encoder.out_of_line_offset(0) is not allowed.
41602            if max_ordinal == 0 {
41603                return Ok(());
41604            }
41605            depth.increment()?;
41606            let envelope_size = 8;
41607            let bytes_len = max_ordinal as usize * envelope_size;
41608            #[allow(unused_variables)]
41609            let offset = encoder.out_of_line_offset(bytes_len);
41610            let mut _prev_end_offset: usize = 0;
41611            if 2 > max_ordinal {
41612                return Ok(());
41613            }
41614
41615            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41616            // are envelope_size bytes.
41617            let cur_offset: usize = (2 - 1) * envelope_size;
41618
41619            // Zero reserved fields.
41620            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41621
41622            // Safety:
41623            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41624            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41625            //   envelope_size bytes, there is always sufficient room.
41626            fidl::encoding::encode_in_envelope_optional::<UnionSize8Align4, D>(
41627                self.uv.as_ref().map(<UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow),
41628                encoder,
41629                offset + cur_offset,
41630                depth,
41631            )?;
41632
41633            _prev_end_offset = cur_offset + envelope_size;
41634
41635            Ok(())
41636        }
41637    }
41638
41639    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41640        for TableWithReservedFieldThenUnion
41641    {
41642        #[inline(always)]
41643        fn new_empty() -> Self {
41644            Self::default()
41645        }
41646
41647        unsafe fn decode(
41648            &mut self,
41649            decoder: &mut fidl::encoding::Decoder<'_, D>,
41650            offset: usize,
41651            mut depth: fidl::encoding::Depth,
41652        ) -> fidl::Result<()> {
41653            decoder.debug_check_bounds::<Self>(offset);
41654            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41655                None => return Err(fidl::Error::NotNullable),
41656                Some(len) => len,
41657            };
41658            // Calling decoder.out_of_line_offset(0) is not allowed.
41659            if len == 0 {
41660                return Ok(());
41661            };
41662            depth.increment()?;
41663            let envelope_size = 8;
41664            let bytes_len = len * envelope_size;
41665            let offset = decoder.out_of_line_offset(bytes_len)?;
41666            // Decode the envelope for each type.
41667            let mut _next_ordinal_to_read = 0;
41668            let mut next_offset = offset;
41669            let end_offset = offset + bytes_len;
41670            _next_ordinal_to_read += 1;
41671            if next_offset >= end_offset {
41672                return Ok(());
41673            }
41674
41675            // Decode unknown envelopes for gaps in ordinals.
41676            while _next_ordinal_to_read < 2 {
41677                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41678                _next_ordinal_to_read += 1;
41679                next_offset += envelope_size;
41680            }
41681
41682            let next_out_of_line = decoder.next_out_of_line();
41683            let handles_before = decoder.remaining_handles();
41684            if let Some((inlined, num_bytes, num_handles)) =
41685                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41686            {
41687                let member_inline_size =
41688                    <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41689                if inlined != (member_inline_size <= 4) {
41690                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41691                }
41692                let inner_offset;
41693                let mut inner_depth = depth.clone();
41694                if inlined {
41695                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41696                    inner_offset = next_offset;
41697                } else {
41698                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41699                    inner_depth.increment()?;
41700                }
41701                let val_ref = self.uv.get_or_insert_with(|| fidl::new_empty!(UnionSize8Align4, D));
41702                fidl::decode!(UnionSize8Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
41703                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41704                {
41705                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41706                }
41707                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41708                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41709                }
41710            }
41711
41712            next_offset += envelope_size;
41713
41714            // Decode the remaining unknown envelopes.
41715            while next_offset < end_offset {
41716                _next_ordinal_to_read += 1;
41717                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41718                next_offset += envelope_size;
41719            }
41720
41721            Ok(())
41722        }
41723    }
41724
41725    impl TableWithStringAndVector {
41726        #[inline(always)]
41727        fn max_ordinal_present(&self) -> u64 {
41728            if let Some(_) = self.baz {
41729                return 3;
41730            }
41731            if let Some(_) = self.bar {
41732                return 2;
41733            }
41734            if let Some(_) = self.foo {
41735                return 1;
41736            }
41737            0
41738        }
41739    }
41740
41741    impl fidl::encoding::ValueTypeMarker for TableWithStringAndVector {
41742        type Borrowed<'a> = &'a Self;
41743        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41744            value
41745        }
41746    }
41747
41748    unsafe impl fidl::encoding::TypeMarker for TableWithStringAndVector {
41749        type Owned = Self;
41750
41751        #[inline(always)]
41752        fn inline_align(_context: fidl::encoding::Context) -> usize {
41753            8
41754        }
41755
41756        #[inline(always)]
41757        fn inline_size(_context: fidl::encoding::Context) -> usize {
41758            16
41759        }
41760    }
41761
41762    unsafe impl<D: fidl::encoding::ResourceDialect>
41763        fidl::encoding::Encode<TableWithStringAndVector, D> for &TableWithStringAndVector
41764    {
41765        unsafe fn encode(
41766            self,
41767            encoder: &mut fidl::encoding::Encoder<'_, D>,
41768            offset: usize,
41769            mut depth: fidl::encoding::Depth,
41770        ) -> fidl::Result<()> {
41771            encoder.debug_check_bounds::<TableWithStringAndVector>(offset);
41772            // Vector header
41773            let max_ordinal: u64 = self.max_ordinal_present();
41774            encoder.write_num(max_ordinal, offset);
41775            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41776            // Calling encoder.out_of_line_offset(0) is not allowed.
41777            if max_ordinal == 0 {
41778                return Ok(());
41779            }
41780            depth.increment()?;
41781            let envelope_size = 8;
41782            let bytes_len = max_ordinal as usize * envelope_size;
41783            #[allow(unused_variables)]
41784            let offset = encoder.out_of_line_offset(bytes_len);
41785            let mut _prev_end_offset: usize = 0;
41786            if 1 > max_ordinal {
41787                return Ok(());
41788            }
41789
41790            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41791            // are envelope_size bytes.
41792            let cur_offset: usize = (1 - 1) * envelope_size;
41793
41794            // Zero reserved fields.
41795            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41796
41797            // Safety:
41798            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41799            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41800            //   envelope_size bytes, there is always sufficient room.
41801            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
41802                self.foo.as_ref().map(
41803                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
41804                ),
41805                encoder,
41806                offset + cur_offset,
41807                depth,
41808            )?;
41809
41810            _prev_end_offset = cur_offset + envelope_size;
41811            if 2 > max_ordinal {
41812                return Ok(());
41813            }
41814
41815            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41816            // are envelope_size bytes.
41817            let cur_offset: usize = (2 - 1) * envelope_size;
41818
41819            // Zero reserved fields.
41820            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41821
41822            // Safety:
41823            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41824            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41825            //   envelope_size bytes, there is always sufficient room.
41826            fidl::encoding::encode_in_envelope_optional::<i32, D>(
41827                self.bar.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
41828                encoder,
41829                offset + cur_offset,
41830                depth,
41831            )?;
41832
41833            _prev_end_offset = cur_offset + envelope_size;
41834            if 3 > max_ordinal {
41835                return Ok(());
41836            }
41837
41838            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
41839            // are envelope_size bytes.
41840            let cur_offset: usize = (3 - 1) * envelope_size;
41841
41842            // Zero reserved fields.
41843            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41844
41845            // Safety:
41846            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
41847            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
41848            //   envelope_size bytes, there is always sufficient room.
41849            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
41850            self.baz.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
41851            encoder, offset + cur_offset, depth
41852        )?;
41853
41854            _prev_end_offset = cur_offset + envelope_size;
41855
41856            Ok(())
41857        }
41858    }
41859
41860    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41861        for TableWithStringAndVector
41862    {
41863        #[inline(always)]
41864        fn new_empty() -> Self {
41865            Self::default()
41866        }
41867
41868        unsafe fn decode(
41869            &mut self,
41870            decoder: &mut fidl::encoding::Decoder<'_, D>,
41871            offset: usize,
41872            mut depth: fidl::encoding::Depth,
41873        ) -> fidl::Result<()> {
41874            decoder.debug_check_bounds::<Self>(offset);
41875            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41876                None => return Err(fidl::Error::NotNullable),
41877                Some(len) => len,
41878            };
41879            // Calling decoder.out_of_line_offset(0) is not allowed.
41880            if len == 0 {
41881                return Ok(());
41882            };
41883            depth.increment()?;
41884            let envelope_size = 8;
41885            let bytes_len = len * envelope_size;
41886            let offset = decoder.out_of_line_offset(bytes_len)?;
41887            // Decode the envelope for each type.
41888            let mut _next_ordinal_to_read = 0;
41889            let mut next_offset = offset;
41890            let end_offset = offset + bytes_len;
41891            _next_ordinal_to_read += 1;
41892            if next_offset >= end_offset {
41893                return Ok(());
41894            }
41895
41896            // Decode unknown envelopes for gaps in ordinals.
41897            while _next_ordinal_to_read < 1 {
41898                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41899                _next_ordinal_to_read += 1;
41900                next_offset += envelope_size;
41901            }
41902
41903            let next_out_of_line = decoder.next_out_of_line();
41904            let handles_before = decoder.remaining_handles();
41905            if let Some((inlined, num_bytes, num_handles)) =
41906                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41907            {
41908                let member_inline_size =
41909                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
41910                        decoder.context,
41911                    );
41912                if inlined != (member_inline_size <= 4) {
41913                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41914                }
41915                let inner_offset;
41916                let mut inner_depth = depth.clone();
41917                if inlined {
41918                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41919                    inner_offset = next_offset;
41920                } else {
41921                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41922                    inner_depth.increment()?;
41923                }
41924                let val_ref = self
41925                    .foo
41926                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
41927                fidl::decode!(
41928                    fidl::encoding::UnboundedString,
41929                    D,
41930                    val_ref,
41931                    decoder,
41932                    inner_offset,
41933                    inner_depth
41934                )?;
41935                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41936                {
41937                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41938                }
41939                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41940                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41941                }
41942            }
41943
41944            next_offset += envelope_size;
41945            _next_ordinal_to_read += 1;
41946            if next_offset >= end_offset {
41947                return Ok(());
41948            }
41949
41950            // Decode unknown envelopes for gaps in ordinals.
41951            while _next_ordinal_to_read < 2 {
41952                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41953                _next_ordinal_to_read += 1;
41954                next_offset += envelope_size;
41955            }
41956
41957            let next_out_of_line = decoder.next_out_of_line();
41958            let handles_before = decoder.remaining_handles();
41959            if let Some((inlined, num_bytes, num_handles)) =
41960                fidl::encoding::decode_envelope_header(decoder, next_offset)?
41961            {
41962                let member_inline_size =
41963                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41964                if inlined != (member_inline_size <= 4) {
41965                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
41966                }
41967                let inner_offset;
41968                let mut inner_depth = depth.clone();
41969                if inlined {
41970                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41971                    inner_offset = next_offset;
41972                } else {
41973                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41974                    inner_depth.increment()?;
41975                }
41976                let val_ref = self.bar.get_or_insert_with(|| fidl::new_empty!(i32, D));
41977                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
41978                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41979                {
41980                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
41981                }
41982                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41983                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41984                }
41985            }
41986
41987            next_offset += envelope_size;
41988            _next_ordinal_to_read += 1;
41989            if next_offset >= end_offset {
41990                return Ok(());
41991            }
41992
41993            // Decode unknown envelopes for gaps in ordinals.
41994            while _next_ordinal_to_read < 3 {
41995                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41996                _next_ordinal_to_read += 1;
41997                next_offset += envelope_size;
41998            }
41999
42000            let next_out_of_line = decoder.next_out_of_line();
42001            let handles_before = decoder.remaining_handles();
42002            if let Some((inlined, num_bytes, num_handles)) =
42003                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42004            {
42005                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42006                if inlined != (member_inline_size <= 4) {
42007                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42008                }
42009                let inner_offset;
42010                let mut inner_depth = depth.clone();
42011                if inlined {
42012                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42013                    inner_offset = next_offset;
42014                } else {
42015                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42016                    inner_depth.increment()?;
42017                }
42018                let val_ref = self.baz.get_or_insert_with(|| {
42019                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
42020                });
42021                fidl::decode!(
42022                    fidl::encoding::UnboundedVector<u8>,
42023                    D,
42024                    val_ref,
42025                    decoder,
42026                    inner_offset,
42027                    inner_depth
42028                )?;
42029                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42030                {
42031                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42032                }
42033                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42034                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42035                }
42036            }
42037
42038            next_offset += envelope_size;
42039
42040            // Decode the remaining unknown envelopes.
42041            while next_offset < end_offset {
42042                _next_ordinal_to_read += 1;
42043                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42044                next_offset += envelope_size;
42045            }
42046
42047            Ok(())
42048        }
42049    }
42050
42051    impl TableWithStringWithLimit {
42052        #[inline(always)]
42053        fn max_ordinal_present(&self) -> u64 {
42054            if let Some(_) = self.s {
42055                return 1;
42056            }
42057            0
42058        }
42059    }
42060
42061    impl fidl::encoding::ValueTypeMarker for TableWithStringWithLimit {
42062        type Borrowed<'a> = &'a Self;
42063        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42064            value
42065        }
42066    }
42067
42068    unsafe impl fidl::encoding::TypeMarker for TableWithStringWithLimit {
42069        type Owned = Self;
42070
42071        #[inline(always)]
42072        fn inline_align(_context: fidl::encoding::Context) -> usize {
42073            8
42074        }
42075
42076        #[inline(always)]
42077        fn inline_size(_context: fidl::encoding::Context) -> usize {
42078            16
42079        }
42080    }
42081
42082    unsafe impl<D: fidl::encoding::ResourceDialect>
42083        fidl::encoding::Encode<TableWithStringWithLimit, D> for &TableWithStringWithLimit
42084    {
42085        unsafe fn encode(
42086            self,
42087            encoder: &mut fidl::encoding::Encoder<'_, D>,
42088            offset: usize,
42089            mut depth: fidl::encoding::Depth,
42090        ) -> fidl::Result<()> {
42091            encoder.debug_check_bounds::<TableWithStringWithLimit>(offset);
42092            // Vector header
42093            let max_ordinal: u64 = self.max_ordinal_present();
42094            encoder.write_num(max_ordinal, offset);
42095            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42096            // Calling encoder.out_of_line_offset(0) is not allowed.
42097            if max_ordinal == 0 {
42098                return Ok(());
42099            }
42100            depth.increment()?;
42101            let envelope_size = 8;
42102            let bytes_len = max_ordinal as usize * envelope_size;
42103            #[allow(unused_variables)]
42104            let offset = encoder.out_of_line_offset(bytes_len);
42105            let mut _prev_end_offset: usize = 0;
42106            if 1 > max_ordinal {
42107                return Ok(());
42108            }
42109
42110            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42111            // are envelope_size bytes.
42112            let cur_offset: usize = (1 - 1) * envelope_size;
42113
42114            // Zero reserved fields.
42115            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42116
42117            // Safety:
42118            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42119            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42120            //   envelope_size bytes, there is always sufficient room.
42121            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2>, D>(
42122                self.s.as_ref().map(
42123                    <fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow,
42124                ),
42125                encoder,
42126                offset + cur_offset,
42127                depth,
42128            )?;
42129
42130            _prev_end_offset = cur_offset + envelope_size;
42131
42132            Ok(())
42133        }
42134    }
42135
42136    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42137        for TableWithStringWithLimit
42138    {
42139        #[inline(always)]
42140        fn new_empty() -> Self {
42141            Self::default()
42142        }
42143
42144        unsafe fn decode(
42145            &mut self,
42146            decoder: &mut fidl::encoding::Decoder<'_, D>,
42147            offset: usize,
42148            mut depth: fidl::encoding::Depth,
42149        ) -> fidl::Result<()> {
42150            decoder.debug_check_bounds::<Self>(offset);
42151            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42152                None => return Err(fidl::Error::NotNullable),
42153                Some(len) => len,
42154            };
42155            // Calling decoder.out_of_line_offset(0) is not allowed.
42156            if len == 0 {
42157                return Ok(());
42158            };
42159            depth.increment()?;
42160            let envelope_size = 8;
42161            let bytes_len = len * envelope_size;
42162            let offset = decoder.out_of_line_offset(bytes_len)?;
42163            // Decode the envelope for each type.
42164            let mut _next_ordinal_to_read = 0;
42165            let mut next_offset = offset;
42166            let end_offset = offset + bytes_len;
42167            _next_ordinal_to_read += 1;
42168            if next_offset >= end_offset {
42169                return Ok(());
42170            }
42171
42172            // Decode unknown envelopes for gaps in ordinals.
42173            while _next_ordinal_to_read < 1 {
42174                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42175                _next_ordinal_to_read += 1;
42176                next_offset += envelope_size;
42177            }
42178
42179            let next_out_of_line = decoder.next_out_of_line();
42180            let handles_before = decoder.remaining_handles();
42181            if let Some((inlined, num_bytes, num_handles)) =
42182                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42183            {
42184                let member_inline_size =
42185                    <fidl::encoding::BoundedString<2> as fidl::encoding::TypeMarker>::inline_size(
42186                        decoder.context,
42187                    );
42188                if inlined != (member_inline_size <= 4) {
42189                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42190                }
42191                let inner_offset;
42192                let mut inner_depth = depth.clone();
42193                if inlined {
42194                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42195                    inner_offset = next_offset;
42196                } else {
42197                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42198                    inner_depth.increment()?;
42199                }
42200                let val_ref = self
42201                    .s
42202                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<2>, D));
42203                fidl::decode!(
42204                    fidl::encoding::BoundedString<2>,
42205                    D,
42206                    val_ref,
42207                    decoder,
42208                    inner_offset,
42209                    inner_depth
42210                )?;
42211                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42212                {
42213                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42214                }
42215                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42216                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42217                }
42218            }
42219
42220            next_offset += envelope_size;
42221
42222            // Decode the remaining unknown envelopes.
42223            while next_offset < end_offset {
42224                _next_ordinal_to_read += 1;
42225                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42226                next_offset += envelope_size;
42227            }
42228
42229            Ok(())
42230        }
42231    }
42232
42233    impl TableWithUnionSize12Align4 {
42234        #[inline(always)]
42235        fn max_ordinal_present(&self) -> u64 {
42236            if let Some(_) = self.after {
42237                return 5;
42238            }
42239            if let Some(_) = self.member {
42240                return 3;
42241            }
42242            if let Some(_) = self.before {
42243                return 1;
42244            }
42245            0
42246        }
42247    }
42248
42249    impl fidl::encoding::ValueTypeMarker for TableWithUnionSize12Align4 {
42250        type Borrowed<'a> = &'a Self;
42251        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42252            value
42253        }
42254    }
42255
42256    unsafe impl fidl::encoding::TypeMarker for TableWithUnionSize12Align4 {
42257        type Owned = Self;
42258
42259        #[inline(always)]
42260        fn inline_align(_context: fidl::encoding::Context) -> usize {
42261            8
42262        }
42263
42264        #[inline(always)]
42265        fn inline_size(_context: fidl::encoding::Context) -> usize {
42266            16
42267        }
42268    }
42269
42270    unsafe impl<D: fidl::encoding::ResourceDialect>
42271        fidl::encoding::Encode<TableWithUnionSize12Align4, D> for &TableWithUnionSize12Align4
42272    {
42273        unsafe fn encode(
42274            self,
42275            encoder: &mut fidl::encoding::Encoder<'_, D>,
42276            offset: usize,
42277            mut depth: fidl::encoding::Depth,
42278        ) -> fidl::Result<()> {
42279            encoder.debug_check_bounds::<TableWithUnionSize12Align4>(offset);
42280            // Vector header
42281            let max_ordinal: u64 = self.max_ordinal_present();
42282            encoder.write_num(max_ordinal, offset);
42283            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42284            // Calling encoder.out_of_line_offset(0) is not allowed.
42285            if max_ordinal == 0 {
42286                return Ok(());
42287            }
42288            depth.increment()?;
42289            let envelope_size = 8;
42290            let bytes_len = max_ordinal as usize * envelope_size;
42291            #[allow(unused_variables)]
42292            let offset = encoder.out_of_line_offset(bytes_len);
42293            let mut _prev_end_offset: usize = 0;
42294            if 1 > max_ordinal {
42295                return Ok(());
42296            }
42297
42298            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42299            // are envelope_size bytes.
42300            let cur_offset: usize = (1 - 1) * envelope_size;
42301
42302            // Zero reserved fields.
42303            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42304
42305            // Safety:
42306            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42307            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42308            //   envelope_size bytes, there is always sufficient room.
42309            fidl::encoding::encode_in_envelope_optional::<u8, D>(
42310                self.before.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
42311                encoder,
42312                offset + cur_offset,
42313                depth,
42314            )?;
42315
42316            _prev_end_offset = cur_offset + envelope_size;
42317            if 3 > max_ordinal {
42318                return Ok(());
42319            }
42320
42321            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42322            // are envelope_size bytes.
42323            let cur_offset: usize = (3 - 1) * envelope_size;
42324
42325            // Zero reserved fields.
42326            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42327
42328            // Safety:
42329            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42330            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42331            //   envelope_size bytes, there is always sufficient room.
42332            fidl::encoding::encode_in_envelope_optional::<UnionSize12Align4, D>(
42333                self.member
42334                    .as_ref()
42335                    .map(<UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow),
42336                encoder,
42337                offset + cur_offset,
42338                depth,
42339            )?;
42340
42341            _prev_end_offset = cur_offset + envelope_size;
42342            if 5 > max_ordinal {
42343                return Ok(());
42344            }
42345
42346            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42347            // are envelope_size bytes.
42348            let cur_offset: usize = (5 - 1) * envelope_size;
42349
42350            // Zero reserved fields.
42351            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42352
42353            // Safety:
42354            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42355            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42356            //   envelope_size bytes, there is always sufficient room.
42357            fidl::encoding::encode_in_envelope_optional::<u8, D>(
42358                self.after.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
42359                encoder,
42360                offset + cur_offset,
42361                depth,
42362            )?;
42363
42364            _prev_end_offset = cur_offset + envelope_size;
42365
42366            Ok(())
42367        }
42368    }
42369
42370    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42371        for TableWithUnionSize12Align4
42372    {
42373        #[inline(always)]
42374        fn new_empty() -> Self {
42375            Self::default()
42376        }
42377
42378        unsafe fn decode(
42379            &mut self,
42380            decoder: &mut fidl::encoding::Decoder<'_, D>,
42381            offset: usize,
42382            mut depth: fidl::encoding::Depth,
42383        ) -> fidl::Result<()> {
42384            decoder.debug_check_bounds::<Self>(offset);
42385            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42386                None => return Err(fidl::Error::NotNullable),
42387                Some(len) => len,
42388            };
42389            // Calling decoder.out_of_line_offset(0) is not allowed.
42390            if len == 0 {
42391                return Ok(());
42392            };
42393            depth.increment()?;
42394            let envelope_size = 8;
42395            let bytes_len = len * envelope_size;
42396            let offset = decoder.out_of_line_offset(bytes_len)?;
42397            // Decode the envelope for each type.
42398            let mut _next_ordinal_to_read = 0;
42399            let mut next_offset = offset;
42400            let end_offset = offset + bytes_len;
42401            _next_ordinal_to_read += 1;
42402            if next_offset >= end_offset {
42403                return Ok(());
42404            }
42405
42406            // Decode unknown envelopes for gaps in ordinals.
42407            while _next_ordinal_to_read < 1 {
42408                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42409                _next_ordinal_to_read += 1;
42410                next_offset += envelope_size;
42411            }
42412
42413            let next_out_of_line = decoder.next_out_of_line();
42414            let handles_before = decoder.remaining_handles();
42415            if let Some((inlined, num_bytes, num_handles)) =
42416                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42417            {
42418                let member_inline_size =
42419                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42420                if inlined != (member_inline_size <= 4) {
42421                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42422                }
42423                let inner_offset;
42424                let mut inner_depth = depth.clone();
42425                if inlined {
42426                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42427                    inner_offset = next_offset;
42428                } else {
42429                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42430                    inner_depth.increment()?;
42431                }
42432                let val_ref = self.before.get_or_insert_with(|| fidl::new_empty!(u8, D));
42433                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
42434                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42435                {
42436                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42437                }
42438                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42439                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42440                }
42441            }
42442
42443            next_offset += envelope_size;
42444            _next_ordinal_to_read += 1;
42445            if next_offset >= end_offset {
42446                return Ok(());
42447            }
42448
42449            // Decode unknown envelopes for gaps in ordinals.
42450            while _next_ordinal_to_read < 3 {
42451                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42452                _next_ordinal_to_read += 1;
42453                next_offset += envelope_size;
42454            }
42455
42456            let next_out_of_line = decoder.next_out_of_line();
42457            let handles_before = decoder.remaining_handles();
42458            if let Some((inlined, num_bytes, num_handles)) =
42459                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42460            {
42461                let member_inline_size =
42462                    <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42463                if inlined != (member_inline_size <= 4) {
42464                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42465                }
42466                let inner_offset;
42467                let mut inner_depth = depth.clone();
42468                if inlined {
42469                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42470                    inner_offset = next_offset;
42471                } else {
42472                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42473                    inner_depth.increment()?;
42474                }
42475                let val_ref =
42476                    self.member.get_or_insert_with(|| fidl::new_empty!(UnionSize12Align4, D));
42477                fidl::decode!(UnionSize12Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
42478                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42479                {
42480                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42481                }
42482                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42483                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42484                }
42485            }
42486
42487            next_offset += envelope_size;
42488            _next_ordinal_to_read += 1;
42489            if next_offset >= end_offset {
42490                return Ok(());
42491            }
42492
42493            // Decode unknown envelopes for gaps in ordinals.
42494            while _next_ordinal_to_read < 5 {
42495                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42496                _next_ordinal_to_read += 1;
42497                next_offset += envelope_size;
42498            }
42499
42500            let next_out_of_line = decoder.next_out_of_line();
42501            let handles_before = decoder.remaining_handles();
42502            if let Some((inlined, num_bytes, num_handles)) =
42503                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42504            {
42505                let member_inline_size =
42506                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42507                if inlined != (member_inline_size <= 4) {
42508                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42509                }
42510                let inner_offset;
42511                let mut inner_depth = depth.clone();
42512                if inlined {
42513                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42514                    inner_offset = next_offset;
42515                } else {
42516                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42517                    inner_depth.increment()?;
42518                }
42519                let val_ref = self.after.get_or_insert_with(|| fidl::new_empty!(u8, D));
42520                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
42521                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42522                {
42523                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42524                }
42525                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42526                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42527                }
42528            }
42529
42530            next_offset += envelope_size;
42531
42532            // Decode the remaining unknown envelopes.
42533            while next_offset < end_offset {
42534                _next_ordinal_to_read += 1;
42535                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42536                next_offset += envelope_size;
42537            }
42538
42539            Ok(())
42540        }
42541    }
42542
42543    impl TableWithVectorWithLimit {
42544        #[inline(always)]
42545        fn max_ordinal_present(&self) -> u64 {
42546            if let Some(_) = self.v {
42547                return 1;
42548            }
42549            0
42550        }
42551    }
42552
42553    impl fidl::encoding::ValueTypeMarker for TableWithVectorWithLimit {
42554        type Borrowed<'a> = &'a Self;
42555        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42556            value
42557        }
42558    }
42559
42560    unsafe impl fidl::encoding::TypeMarker for TableWithVectorWithLimit {
42561        type Owned = Self;
42562
42563        #[inline(always)]
42564        fn inline_align(_context: fidl::encoding::Context) -> usize {
42565            8
42566        }
42567
42568        #[inline(always)]
42569        fn inline_size(_context: fidl::encoding::Context) -> usize {
42570            16
42571        }
42572    }
42573
42574    unsafe impl<D: fidl::encoding::ResourceDialect>
42575        fidl::encoding::Encode<TableWithVectorWithLimit, D> for &TableWithVectorWithLimit
42576    {
42577        unsafe fn encode(
42578            self,
42579            encoder: &mut fidl::encoding::Encoder<'_, D>,
42580            offset: usize,
42581            mut depth: fidl::encoding::Depth,
42582        ) -> fidl::Result<()> {
42583            encoder.debug_check_bounds::<TableWithVectorWithLimit>(offset);
42584            // Vector header
42585            let max_ordinal: u64 = self.max_ordinal_present();
42586            encoder.write_num(max_ordinal, offset);
42587            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42588            // Calling encoder.out_of_line_offset(0) is not allowed.
42589            if max_ordinal == 0 {
42590                return Ok(());
42591            }
42592            depth.increment()?;
42593            let envelope_size = 8;
42594            let bytes_len = max_ordinal as usize * envelope_size;
42595            #[allow(unused_variables)]
42596            let offset = encoder.out_of_line_offset(bytes_len);
42597            let mut _prev_end_offset: usize = 0;
42598            if 1 > max_ordinal {
42599                return Ok(());
42600            }
42601
42602            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42603            // are envelope_size bytes.
42604            let cur_offset: usize = (1 - 1) * envelope_size;
42605
42606            // Zero reserved fields.
42607            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42608
42609            // Safety:
42610            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42611            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42612            //   envelope_size bytes, there is always sufficient room.
42613            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 2>, D>(
42614                self.v.as_ref().map(
42615                    <fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow,
42616                ),
42617                encoder,
42618                offset + cur_offset,
42619                depth,
42620            )?;
42621
42622            _prev_end_offset = cur_offset + envelope_size;
42623
42624            Ok(())
42625        }
42626    }
42627
42628    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42629        for TableWithVectorWithLimit
42630    {
42631        #[inline(always)]
42632        fn new_empty() -> Self {
42633            Self::default()
42634        }
42635
42636        unsafe fn decode(
42637            &mut self,
42638            decoder: &mut fidl::encoding::Decoder<'_, D>,
42639            offset: usize,
42640            mut depth: fidl::encoding::Depth,
42641        ) -> fidl::Result<()> {
42642            decoder.debug_check_bounds::<Self>(offset);
42643            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42644                None => return Err(fidl::Error::NotNullable),
42645                Some(len) => len,
42646            };
42647            // Calling decoder.out_of_line_offset(0) is not allowed.
42648            if len == 0 {
42649                return Ok(());
42650            };
42651            depth.increment()?;
42652            let envelope_size = 8;
42653            let bytes_len = len * envelope_size;
42654            let offset = decoder.out_of_line_offset(bytes_len)?;
42655            // Decode the envelope for each type.
42656            let mut _next_ordinal_to_read = 0;
42657            let mut next_offset = offset;
42658            let end_offset = offset + bytes_len;
42659            _next_ordinal_to_read += 1;
42660            if next_offset >= end_offset {
42661                return Ok(());
42662            }
42663
42664            // Decode unknown envelopes for gaps in ordinals.
42665            while _next_ordinal_to_read < 1 {
42666                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42667                _next_ordinal_to_read += 1;
42668                next_offset += envelope_size;
42669            }
42670
42671            let next_out_of_line = decoder.next_out_of_line();
42672            let handles_before = decoder.remaining_handles();
42673            if let Some((inlined, num_bytes, num_handles)) =
42674                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42675            {
42676                let member_inline_size =
42677                    <fidl::encoding::Vector<u8, 2> as fidl::encoding::TypeMarker>::inline_size(
42678                        decoder.context,
42679                    );
42680                if inlined != (member_inline_size <= 4) {
42681                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42682                }
42683                let inner_offset;
42684                let mut inner_depth = depth.clone();
42685                if inlined {
42686                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42687                    inner_offset = next_offset;
42688                } else {
42689                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42690                    inner_depth.increment()?;
42691                }
42692                let val_ref = self
42693                    .v
42694                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D));
42695                fidl::decode!(fidl::encoding::Vector<u8, 2>, D, val_ref, decoder, inner_offset, inner_depth)?;
42696                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42697                {
42698                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42699                }
42700                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42701                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42702                }
42703            }
42704
42705            next_offset += envelope_size;
42706
42707            // Decode the remaining unknown envelopes.
42708            while next_offset < end_offset {
42709                _next_ordinal_to_read += 1;
42710                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42711                next_offset += envelope_size;
42712            }
42713
42714            Ok(())
42715        }
42716    }
42717
42718    impl TableWithXUnion {
42719        #[inline(always)]
42720        fn max_ordinal_present(&self) -> u64 {
42721            if let Some(_) = self.member {
42722                return 1;
42723            }
42724            0
42725        }
42726    }
42727
42728    impl fidl::encoding::ValueTypeMarker for TableWithXUnion {
42729        type Borrowed<'a> = &'a Self;
42730        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42731            value
42732        }
42733    }
42734
42735    unsafe impl fidl::encoding::TypeMarker for TableWithXUnion {
42736        type Owned = Self;
42737
42738        #[inline(always)]
42739        fn inline_align(_context: fidl::encoding::Context) -> usize {
42740            8
42741        }
42742
42743        #[inline(always)]
42744        fn inline_size(_context: fidl::encoding::Context) -> usize {
42745            16
42746        }
42747    }
42748
42749    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithXUnion, D>
42750        for &TableWithXUnion
42751    {
42752        unsafe fn encode(
42753            self,
42754            encoder: &mut fidl::encoding::Encoder<'_, D>,
42755            offset: usize,
42756            mut depth: fidl::encoding::Depth,
42757        ) -> fidl::Result<()> {
42758            encoder.debug_check_bounds::<TableWithXUnion>(offset);
42759            // Vector header
42760            let max_ordinal: u64 = self.max_ordinal_present();
42761            encoder.write_num(max_ordinal, offset);
42762            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42763            // Calling encoder.out_of_line_offset(0) is not allowed.
42764            if max_ordinal == 0 {
42765                return Ok(());
42766            }
42767            depth.increment()?;
42768            let envelope_size = 8;
42769            let bytes_len = max_ordinal as usize * envelope_size;
42770            #[allow(unused_variables)]
42771            let offset = encoder.out_of_line_offset(bytes_len);
42772            let mut _prev_end_offset: usize = 0;
42773            if 1 > max_ordinal {
42774                return Ok(());
42775            }
42776
42777            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42778            // are envelope_size bytes.
42779            let cur_offset: usize = (1 - 1) * envelope_size;
42780
42781            // Zero reserved fields.
42782            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42783
42784            // Safety:
42785            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42786            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42787            //   envelope_size bytes, there is always sufficient room.
42788            fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
42789                self.member.as_ref().map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
42790                encoder,
42791                offset + cur_offset,
42792                depth,
42793            )?;
42794
42795            _prev_end_offset = cur_offset + envelope_size;
42796
42797            Ok(())
42798        }
42799    }
42800
42801    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithXUnion {
42802        #[inline(always)]
42803        fn new_empty() -> Self {
42804            Self::default()
42805        }
42806
42807        unsafe fn decode(
42808            &mut self,
42809            decoder: &mut fidl::encoding::Decoder<'_, D>,
42810            offset: usize,
42811            mut depth: fidl::encoding::Depth,
42812        ) -> fidl::Result<()> {
42813            decoder.debug_check_bounds::<Self>(offset);
42814            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42815                None => return Err(fidl::Error::NotNullable),
42816                Some(len) => len,
42817            };
42818            // Calling decoder.out_of_line_offset(0) is not allowed.
42819            if len == 0 {
42820                return Ok(());
42821            };
42822            depth.increment()?;
42823            let envelope_size = 8;
42824            let bytes_len = len * envelope_size;
42825            let offset = decoder.out_of_line_offset(bytes_len)?;
42826            // Decode the envelope for each type.
42827            let mut _next_ordinal_to_read = 0;
42828            let mut next_offset = offset;
42829            let end_offset = offset + bytes_len;
42830            _next_ordinal_to_read += 1;
42831            if next_offset >= end_offset {
42832                return Ok(());
42833            }
42834
42835            // Decode unknown envelopes for gaps in ordinals.
42836            while _next_ordinal_to_read < 1 {
42837                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42838                _next_ordinal_to_read += 1;
42839                next_offset += envelope_size;
42840            }
42841
42842            let next_out_of_line = decoder.next_out_of_line();
42843            let handles_before = decoder.remaining_handles();
42844            if let Some((inlined, num_bytes, num_handles)) =
42845                fidl::encoding::decode_envelope_header(decoder, next_offset)?
42846            {
42847                let member_inline_size =
42848                    <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
42849                if inlined != (member_inline_size <= 4) {
42850                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
42851                }
42852                let inner_offset;
42853                let mut inner_depth = depth.clone();
42854                if inlined {
42855                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
42856                    inner_offset = next_offset;
42857                } else {
42858                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42859                    inner_depth.increment()?;
42860                }
42861                let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
42862                fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
42863                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
42864                {
42865                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
42866                }
42867                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42868                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42869                }
42870            }
42871
42872            next_offset += envelope_size;
42873
42874            // Decode the remaining unknown envelopes.
42875            while next_offset < end_offset {
42876                _next_ordinal_to_read += 1;
42877                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
42878                next_offset += envelope_size;
42879            }
42880
42881            Ok(())
42882        }
42883    }
42884
42885    impl TransformerSimpleTable {
42886        #[inline(always)]
42887        fn max_ordinal_present(&self) -> u64 {
42888            if let Some(_) = self.value {
42889                return 1;
42890            }
42891            0
42892        }
42893    }
42894
42895    impl fidl::encoding::ValueTypeMarker for TransformerSimpleTable {
42896        type Borrowed<'a> = &'a Self;
42897        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42898            value
42899        }
42900    }
42901
42902    unsafe impl fidl::encoding::TypeMarker for TransformerSimpleTable {
42903        type Owned = Self;
42904
42905        #[inline(always)]
42906        fn inline_align(_context: fidl::encoding::Context) -> usize {
42907            8
42908        }
42909
42910        #[inline(always)]
42911        fn inline_size(_context: fidl::encoding::Context) -> usize {
42912            16
42913        }
42914    }
42915
42916    unsafe impl<D: fidl::encoding::ResourceDialect>
42917        fidl::encoding::Encode<TransformerSimpleTable, D> for &TransformerSimpleTable
42918    {
42919        unsafe fn encode(
42920            self,
42921            encoder: &mut fidl::encoding::Encoder<'_, D>,
42922            offset: usize,
42923            mut depth: fidl::encoding::Depth,
42924        ) -> fidl::Result<()> {
42925            encoder.debug_check_bounds::<TransformerSimpleTable>(offset);
42926            // Vector header
42927            let max_ordinal: u64 = self.max_ordinal_present();
42928            encoder.write_num(max_ordinal, offset);
42929            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
42930            // Calling encoder.out_of_line_offset(0) is not allowed.
42931            if max_ordinal == 0 {
42932                return Ok(());
42933            }
42934            depth.increment()?;
42935            let envelope_size = 8;
42936            let bytes_len = max_ordinal as usize * envelope_size;
42937            #[allow(unused_variables)]
42938            let offset = encoder.out_of_line_offset(bytes_len);
42939            let mut _prev_end_offset: usize = 0;
42940            if 1 > max_ordinal {
42941                return Ok(());
42942            }
42943
42944            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
42945            // are envelope_size bytes.
42946            let cur_offset: usize = (1 - 1) * envelope_size;
42947
42948            // Zero reserved fields.
42949            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
42950
42951            // Safety:
42952            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
42953            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
42954            //   envelope_size bytes, there is always sufficient room.
42955            fidl::encoding::encode_in_envelope_optional::<u32, D>(
42956                self.value.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
42957                encoder,
42958                offset + cur_offset,
42959                depth,
42960            )?;
42961
42962            _prev_end_offset = cur_offset + envelope_size;
42963
42964            Ok(())
42965        }
42966    }
42967
42968    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
42969        for TransformerSimpleTable
42970    {
42971        #[inline(always)]
42972        fn new_empty() -> Self {
42973            Self::default()
42974        }
42975
42976        unsafe fn decode(
42977            &mut self,
42978            decoder: &mut fidl::encoding::Decoder<'_, D>,
42979            offset: usize,
42980            mut depth: fidl::encoding::Depth,
42981        ) -> fidl::Result<()> {
42982            decoder.debug_check_bounds::<Self>(offset);
42983            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
42984                None => return Err(fidl::Error::NotNullable),
42985                Some(len) => len,
42986            };
42987            // Calling decoder.out_of_line_offset(0) is not allowed.
42988            if len == 0 {
42989                return Ok(());
42990            };
42991            depth.increment()?;
42992            let envelope_size = 8;
42993            let bytes_len = len * envelope_size;
42994            let offset = decoder.out_of_line_offset(bytes_len)?;
42995            // Decode the envelope for each type.
42996            let mut _next_ordinal_to_read = 0;
42997            let mut next_offset = offset;
42998            let end_offset = offset + bytes_len;
42999            _next_ordinal_to_read += 1;
43000            if next_offset >= end_offset {
43001                return Ok(());
43002            }
43003
43004            // Decode unknown envelopes for gaps in ordinals.
43005            while _next_ordinal_to_read < 1 {
43006                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43007                _next_ordinal_to_read += 1;
43008                next_offset += envelope_size;
43009            }
43010
43011            let next_out_of_line = decoder.next_out_of_line();
43012            let handles_before = decoder.remaining_handles();
43013            if let Some((inlined, num_bytes, num_handles)) =
43014                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43015            {
43016                let member_inline_size =
43017                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
43018                if inlined != (member_inline_size <= 4) {
43019                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43020                }
43021                let inner_offset;
43022                let mut inner_depth = depth.clone();
43023                if inlined {
43024                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43025                    inner_offset = next_offset;
43026                } else {
43027                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43028                    inner_depth.increment()?;
43029                }
43030                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u32, D));
43031                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
43032                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43033                {
43034                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43035                }
43036                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43037                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43038                }
43039            }
43040
43041            next_offset += envelope_size;
43042
43043            // Decode the remaining unknown envelopes.
43044            while next_offset < end_offset {
43045                _next_ordinal_to_read += 1;
43046                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43047                next_offset += envelope_size;
43048            }
43049
43050            Ok(())
43051        }
43052    }
43053
43054    impl XUnionInTable {
43055        #[inline(always)]
43056        fn max_ordinal_present(&self) -> u64 {
43057            if let Some(_) = self.after {
43058                return 3;
43059            }
43060            if let Some(_) = self.xu {
43061                return 2;
43062            }
43063            if let Some(_) = self.before {
43064                return 1;
43065            }
43066            0
43067        }
43068    }
43069
43070    impl fidl::encoding::ValueTypeMarker for XUnionInTable {
43071        type Borrowed<'a> = &'a Self;
43072        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43073            value
43074        }
43075    }
43076
43077    unsafe impl fidl::encoding::TypeMarker for XUnionInTable {
43078        type Owned = Self;
43079
43080        #[inline(always)]
43081        fn inline_align(_context: fidl::encoding::Context) -> usize {
43082            8
43083        }
43084
43085        #[inline(always)]
43086        fn inline_size(_context: fidl::encoding::Context) -> usize {
43087            16
43088        }
43089    }
43090
43091    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionInTable, D>
43092        for &XUnionInTable
43093    {
43094        unsafe fn encode(
43095            self,
43096            encoder: &mut fidl::encoding::Encoder<'_, D>,
43097            offset: usize,
43098            mut depth: fidl::encoding::Depth,
43099        ) -> fidl::Result<()> {
43100            encoder.debug_check_bounds::<XUnionInTable>(offset);
43101            // Vector header
43102            let max_ordinal: u64 = self.max_ordinal_present();
43103            encoder.write_num(max_ordinal, offset);
43104            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
43105            // Calling encoder.out_of_line_offset(0) is not allowed.
43106            if max_ordinal == 0 {
43107                return Ok(());
43108            }
43109            depth.increment()?;
43110            let envelope_size = 8;
43111            let bytes_len = max_ordinal as usize * envelope_size;
43112            #[allow(unused_variables)]
43113            let offset = encoder.out_of_line_offset(bytes_len);
43114            let mut _prev_end_offset: usize = 0;
43115            if 1 > max_ordinal {
43116                return Ok(());
43117            }
43118
43119            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
43120            // are envelope_size bytes.
43121            let cur_offset: usize = (1 - 1) * envelope_size;
43122
43123            // Zero reserved fields.
43124            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
43125
43126            // Safety:
43127            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
43128            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
43129            //   envelope_size bytes, there is always sufficient room.
43130            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
43131                self.before.as_ref().map(
43132                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
43133                ),
43134                encoder,
43135                offset + cur_offset,
43136                depth,
43137            )?;
43138
43139            _prev_end_offset = cur_offset + envelope_size;
43140            if 2 > max_ordinal {
43141                return Ok(());
43142            }
43143
43144            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
43145            // are envelope_size bytes.
43146            let cur_offset: usize = (2 - 1) * envelope_size;
43147
43148            // Zero reserved fields.
43149            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
43150
43151            // Safety:
43152            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
43153            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
43154            //   envelope_size bytes, there is always sufficient room.
43155            fidl::encoding::encode_in_envelope_optional::<SampleXUnion, D>(
43156                self.xu.as_ref().map(<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow),
43157                encoder,
43158                offset + cur_offset,
43159                depth,
43160            )?;
43161
43162            _prev_end_offset = cur_offset + envelope_size;
43163            if 3 > max_ordinal {
43164                return Ok(());
43165            }
43166
43167            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
43168            // are envelope_size bytes.
43169            let cur_offset: usize = (3 - 1) * envelope_size;
43170
43171            // Zero reserved fields.
43172            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
43173
43174            // Safety:
43175            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
43176            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
43177            //   envelope_size bytes, there is always sufficient room.
43178            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
43179                self.after.as_ref().map(
43180                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
43181                ),
43182                encoder,
43183                offset + cur_offset,
43184                depth,
43185            )?;
43186
43187            _prev_end_offset = cur_offset + envelope_size;
43188
43189            Ok(())
43190        }
43191    }
43192
43193    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionInTable {
43194        #[inline(always)]
43195        fn new_empty() -> Self {
43196            Self::default()
43197        }
43198
43199        unsafe fn decode(
43200            &mut self,
43201            decoder: &mut fidl::encoding::Decoder<'_, D>,
43202            offset: usize,
43203            mut depth: fidl::encoding::Depth,
43204        ) -> fidl::Result<()> {
43205            decoder.debug_check_bounds::<Self>(offset);
43206            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
43207                None => return Err(fidl::Error::NotNullable),
43208                Some(len) => len,
43209            };
43210            // Calling decoder.out_of_line_offset(0) is not allowed.
43211            if len == 0 {
43212                return Ok(());
43213            };
43214            depth.increment()?;
43215            let envelope_size = 8;
43216            let bytes_len = len * envelope_size;
43217            let offset = decoder.out_of_line_offset(bytes_len)?;
43218            // Decode the envelope for each type.
43219            let mut _next_ordinal_to_read = 0;
43220            let mut next_offset = offset;
43221            let end_offset = offset + bytes_len;
43222            _next_ordinal_to_read += 1;
43223            if next_offset >= end_offset {
43224                return Ok(());
43225            }
43226
43227            // Decode unknown envelopes for gaps in ordinals.
43228            while _next_ordinal_to_read < 1 {
43229                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43230                _next_ordinal_to_read += 1;
43231                next_offset += envelope_size;
43232            }
43233
43234            let next_out_of_line = decoder.next_out_of_line();
43235            let handles_before = decoder.remaining_handles();
43236            if let Some((inlined, num_bytes, num_handles)) =
43237                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43238            {
43239                let member_inline_size =
43240                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43241                        decoder.context,
43242                    );
43243                if inlined != (member_inline_size <= 4) {
43244                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43245                }
43246                let inner_offset;
43247                let mut inner_depth = depth.clone();
43248                if inlined {
43249                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43250                    inner_offset = next_offset;
43251                } else {
43252                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43253                    inner_depth.increment()?;
43254                }
43255                let val_ref = self
43256                    .before
43257                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
43258                fidl::decode!(
43259                    fidl::encoding::UnboundedString,
43260                    D,
43261                    val_ref,
43262                    decoder,
43263                    inner_offset,
43264                    inner_depth
43265                )?;
43266                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43267                {
43268                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43269                }
43270                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43271                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43272                }
43273            }
43274
43275            next_offset += envelope_size;
43276            _next_ordinal_to_read += 1;
43277            if next_offset >= end_offset {
43278                return Ok(());
43279            }
43280
43281            // Decode unknown envelopes for gaps in ordinals.
43282            while _next_ordinal_to_read < 2 {
43283                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43284                _next_ordinal_to_read += 1;
43285                next_offset += envelope_size;
43286            }
43287
43288            let next_out_of_line = decoder.next_out_of_line();
43289            let handles_before = decoder.remaining_handles();
43290            if let Some((inlined, num_bytes, num_handles)) =
43291                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43292            {
43293                let member_inline_size =
43294                    <SampleXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
43295                if inlined != (member_inline_size <= 4) {
43296                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43297                }
43298                let inner_offset;
43299                let mut inner_depth = depth.clone();
43300                if inlined {
43301                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43302                    inner_offset = next_offset;
43303                } else {
43304                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43305                    inner_depth.increment()?;
43306                }
43307                let val_ref = self.xu.get_or_insert_with(|| fidl::new_empty!(SampleXUnion, D));
43308                fidl::decode!(SampleXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
43309                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43310                {
43311                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43312                }
43313                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43314                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43315                }
43316            }
43317
43318            next_offset += envelope_size;
43319            _next_ordinal_to_read += 1;
43320            if next_offset >= end_offset {
43321                return Ok(());
43322            }
43323
43324            // Decode unknown envelopes for gaps in ordinals.
43325            while _next_ordinal_to_read < 3 {
43326                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43327                _next_ordinal_to_read += 1;
43328                next_offset += envelope_size;
43329            }
43330
43331            let next_out_of_line = decoder.next_out_of_line();
43332            let handles_before = decoder.remaining_handles();
43333            if let Some((inlined, num_bytes, num_handles)) =
43334                fidl::encoding::decode_envelope_header(decoder, next_offset)?
43335            {
43336                let member_inline_size =
43337                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43338                        decoder.context,
43339                    );
43340                if inlined != (member_inline_size <= 4) {
43341                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
43342                }
43343                let inner_offset;
43344                let mut inner_depth = depth.clone();
43345                if inlined {
43346                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
43347                    inner_offset = next_offset;
43348                } else {
43349                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43350                    inner_depth.increment()?;
43351                }
43352                let val_ref = self
43353                    .after
43354                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
43355                fidl::decode!(
43356                    fidl::encoding::UnboundedString,
43357                    D,
43358                    val_ref,
43359                    decoder,
43360                    inner_offset,
43361                    inner_depth
43362                )?;
43363                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
43364                {
43365                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
43366                }
43367                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43368                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43369                }
43370            }
43371
43372            next_offset += envelope_size;
43373
43374            // Decode the remaining unknown envelopes.
43375            while next_offset < end_offset {
43376                _next_ordinal_to_read += 1;
43377                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
43378                next_offset += envelope_size;
43379            }
43380
43381            Ok(())
43382        }
43383    }
43384
43385    impl fidl::encoding::ValueTypeMarker for CompatUnion {
43386        type Borrowed<'a> = &'a Self;
43387        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43388            value
43389        }
43390    }
43391
43392    unsafe impl fidl::encoding::TypeMarker for CompatUnion {
43393        type Owned = Self;
43394
43395        #[inline(always)]
43396        fn inline_align(_context: fidl::encoding::Context) -> usize {
43397            8
43398        }
43399
43400        #[inline(always)]
43401        fn inline_size(_context: fidl::encoding::Context) -> usize {
43402            16
43403        }
43404    }
43405
43406    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatUnion, D>
43407        for &CompatUnion
43408    {
43409        #[inline]
43410        unsafe fn encode(
43411            self,
43412            encoder: &mut fidl::encoding::Encoder<'_, D>,
43413            offset: usize,
43414            _depth: fidl::encoding::Depth,
43415        ) -> fidl::Result<()> {
43416            encoder.debug_check_bounds::<CompatUnion>(offset);
43417            encoder.write_num::<u64>(self.ordinal(), offset);
43418            match self {
43419                CompatUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
43420                    fidl::encoding::UnboundedString,
43421                    D,
43422                >(
43423                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
43424                        val,
43425                    ),
43426                    encoder,
43427                    offset + 8,
43428                    _depth,
43429                ),
43430                CompatUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
43431                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
43432                    encoder,
43433                    offset + 8,
43434                    _depth,
43435                ),
43436            }
43437        }
43438    }
43439
43440    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatUnion {
43441        #[inline(always)]
43442        fn new_empty() -> Self {
43443            Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
43444        }
43445
43446        #[inline]
43447        unsafe fn decode(
43448            &mut self,
43449            decoder: &mut fidl::encoding::Decoder<'_, D>,
43450            offset: usize,
43451            mut depth: fidl::encoding::Depth,
43452        ) -> fidl::Result<()> {
43453            decoder.debug_check_bounds::<Self>(offset);
43454            #[allow(unused_variables)]
43455            let next_out_of_line = decoder.next_out_of_line();
43456            let handles_before = decoder.remaining_handles();
43457            let (ordinal, inlined, num_bytes, num_handles) =
43458                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43459
43460            let member_inline_size = match ordinal {
43461                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43462                    decoder.context,
43463                ),
43464                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43465                _ => return Err(fidl::Error::UnknownUnionTag),
43466            };
43467
43468            if inlined != (member_inline_size <= 4) {
43469                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43470            }
43471            let _inner_offset;
43472            if inlined {
43473                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43474                _inner_offset = offset + 8;
43475            } else {
43476                depth.increment()?;
43477                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43478            }
43479            match ordinal {
43480                1 => {
43481                    #[allow(irrefutable_let_patterns)]
43482                    if let CompatUnion::S(_) = self {
43483                        // Do nothing, read the value into the object
43484                    } else {
43485                        // Initialize `self` to the right variant
43486                        *self =
43487                            CompatUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
43488                    }
43489                    #[allow(irrefutable_let_patterns)]
43490                    if let CompatUnion::S(ref mut val) = self {
43491                        fidl::decode!(
43492                            fidl::encoding::UnboundedString,
43493                            D,
43494                            val,
43495                            decoder,
43496                            _inner_offset,
43497                            depth
43498                        )?;
43499                    } else {
43500                        unreachable!()
43501                    }
43502                }
43503                2 => {
43504                    #[allow(irrefutable_let_patterns)]
43505                    if let CompatUnion::B(_) = self {
43506                        // Do nothing, read the value into the object
43507                    } else {
43508                        // Initialize `self` to the right variant
43509                        *self = CompatUnion::B(fidl::new_empty!(bool, D));
43510                    }
43511                    #[allow(irrefutable_let_patterns)]
43512                    if let CompatUnion::B(ref mut val) = self {
43513                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
43514                    } else {
43515                        unreachable!()
43516                    }
43517                }
43518                ordinal => panic!("unexpected ordinal {:?}", ordinal),
43519            }
43520            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43521                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43522            }
43523            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43524                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43525            }
43526            Ok(())
43527        }
43528    }
43529
43530    impl fidl::encoding::ValueTypeMarker for CompatXUnion {
43531        type Borrowed<'a> = &'a Self;
43532        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43533            value
43534        }
43535    }
43536
43537    unsafe impl fidl::encoding::TypeMarker for CompatXUnion {
43538        type Owned = Self;
43539
43540        #[inline(always)]
43541        fn inline_align(_context: fidl::encoding::Context) -> usize {
43542            8
43543        }
43544
43545        #[inline(always)]
43546        fn inline_size(_context: fidl::encoding::Context) -> usize {
43547            16
43548        }
43549    }
43550
43551    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatXUnion, D>
43552        for &CompatXUnion
43553    {
43554        #[inline]
43555        unsafe fn encode(
43556            self,
43557            encoder: &mut fidl::encoding::Encoder<'_, D>,
43558            offset: usize,
43559            _depth: fidl::encoding::Depth,
43560        ) -> fidl::Result<()> {
43561            encoder.debug_check_bounds::<CompatXUnion>(offset);
43562            encoder.write_num::<u64>(self.ordinal(), offset);
43563            match self {
43564                CompatXUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
43565                    fidl::encoding::UnboundedString,
43566                    D,
43567                >(
43568                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
43569                        val,
43570                    ),
43571                    encoder,
43572                    offset + 8,
43573                    _depth,
43574                ),
43575                CompatXUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
43576                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
43577                    encoder,
43578                    offset + 8,
43579                    _depth,
43580                ),
43581                CompatXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
43582            }
43583        }
43584    }
43585
43586    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatXUnion {
43587        #[inline(always)]
43588        fn new_empty() -> Self {
43589            Self::__SourceBreaking { unknown_ordinal: 0 }
43590        }
43591
43592        #[inline]
43593        unsafe fn decode(
43594            &mut self,
43595            decoder: &mut fidl::encoding::Decoder<'_, D>,
43596            offset: usize,
43597            mut depth: fidl::encoding::Depth,
43598        ) -> fidl::Result<()> {
43599            decoder.debug_check_bounds::<Self>(offset);
43600            #[allow(unused_variables)]
43601            let next_out_of_line = decoder.next_out_of_line();
43602            let handles_before = decoder.remaining_handles();
43603            let (ordinal, inlined, num_bytes, num_handles) =
43604                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43605
43606            let member_inline_size = match ordinal {
43607                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43608                    decoder.context,
43609                ),
43610                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43611                0 => return Err(fidl::Error::UnknownUnionTag),
43612                _ => num_bytes as usize,
43613            };
43614
43615            if inlined != (member_inline_size <= 4) {
43616                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43617            }
43618            let _inner_offset;
43619            if inlined {
43620                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43621                _inner_offset = offset + 8;
43622            } else {
43623                depth.increment()?;
43624                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43625            }
43626            match ordinal {
43627                1 => {
43628                    #[allow(irrefutable_let_patterns)]
43629                    if let CompatXUnion::S(_) = self {
43630                        // Do nothing, read the value into the object
43631                    } else {
43632                        // Initialize `self` to the right variant
43633                        *self =
43634                            CompatXUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
43635                    }
43636                    #[allow(irrefutable_let_patterns)]
43637                    if let CompatXUnion::S(ref mut val) = self {
43638                        fidl::decode!(
43639                            fidl::encoding::UnboundedString,
43640                            D,
43641                            val,
43642                            decoder,
43643                            _inner_offset,
43644                            depth
43645                        )?;
43646                    } else {
43647                        unreachable!()
43648                    }
43649                }
43650                2 => {
43651                    #[allow(irrefutable_let_patterns)]
43652                    if let CompatXUnion::B(_) = self {
43653                        // Do nothing, read the value into the object
43654                    } else {
43655                        // Initialize `self` to the right variant
43656                        *self = CompatXUnion::B(fidl::new_empty!(bool, D));
43657                    }
43658                    #[allow(irrefutable_let_patterns)]
43659                    if let CompatXUnion::B(ref mut val) = self {
43660                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
43661                    } else {
43662                        unreachable!()
43663                    }
43664                }
43665                #[allow(deprecated)]
43666                ordinal => {
43667                    for _ in 0..num_handles {
43668                        decoder.drop_next_handle()?;
43669                    }
43670                    *self = CompatXUnion::__SourceBreaking { unknown_ordinal: ordinal };
43671                }
43672            }
43673            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43674                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43675            }
43676            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43677                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43678            }
43679            Ok(())
43680        }
43681    }
43682
43683    impl fidl::encoding::ValueTypeMarker for EmptyFlexibleUnion {
43684        type Borrowed<'a> = &'a Self;
43685        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43686            value
43687        }
43688    }
43689
43690    unsafe impl fidl::encoding::TypeMarker for EmptyFlexibleUnion {
43691        type Owned = Self;
43692
43693        #[inline(always)]
43694        fn inline_align(_context: fidl::encoding::Context) -> usize {
43695            8
43696        }
43697
43698        #[inline(always)]
43699        fn inline_size(_context: fidl::encoding::Context) -> usize {
43700            16
43701        }
43702    }
43703
43704    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyFlexibleUnion, D>
43705        for &EmptyFlexibleUnion
43706    {
43707        #[inline]
43708        unsafe fn encode(
43709            self,
43710            encoder: &mut fidl::encoding::Encoder<'_, D>,
43711            offset: usize,
43712            _depth: fidl::encoding::Depth,
43713        ) -> fidl::Result<()> {
43714            encoder.debug_check_bounds::<EmptyFlexibleUnion>(offset);
43715            encoder.write_num::<u64>(self.ordinal(), offset);
43716            match self {
43717                EmptyFlexibleUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
43718            }
43719        }
43720    }
43721
43722    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyFlexibleUnion {
43723        #[inline(always)]
43724        fn new_empty() -> Self {
43725            Self::__SourceBreaking { unknown_ordinal: 0 }
43726        }
43727
43728        #[inline]
43729        unsafe fn decode(
43730            &mut self,
43731            decoder: &mut fidl::encoding::Decoder<'_, D>,
43732            offset: usize,
43733            mut depth: fidl::encoding::Depth,
43734        ) -> fidl::Result<()> {
43735            decoder.debug_check_bounds::<Self>(offset);
43736            #[allow(unused_variables)]
43737            let next_out_of_line = decoder.next_out_of_line();
43738            let handles_before = decoder.remaining_handles();
43739            let (ordinal, inlined, num_bytes, num_handles) =
43740                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43741
43742            let member_inline_size = match ordinal {
43743                0 => return Err(fidl::Error::UnknownUnionTag),
43744                _ => num_bytes as usize,
43745            };
43746
43747            if inlined != (member_inline_size <= 4) {
43748                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43749            }
43750            let _inner_offset;
43751            if inlined {
43752                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43753                _inner_offset = offset + 8;
43754            } else {
43755                depth.increment()?;
43756                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43757            }
43758            match ordinal {
43759                #[allow(deprecated)]
43760                ordinal => {
43761                    for _ in 0..num_handles {
43762                        decoder.drop_next_handle()?;
43763                    }
43764                    *self = EmptyFlexibleUnion::__SourceBreaking { unknown_ordinal: ordinal };
43765                }
43766            }
43767            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43768                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43769            }
43770            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43771                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43772            }
43773            Ok(())
43774        }
43775    }
43776
43777    impl fidl::encoding::ValueTypeMarker for EmptyStructUnion {
43778        type Borrowed<'a> = &'a Self;
43779        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43780            value
43781        }
43782    }
43783
43784    unsafe impl fidl::encoding::TypeMarker for EmptyStructUnion {
43785        type Owned = Self;
43786
43787        #[inline(always)]
43788        fn inline_align(_context: fidl::encoding::Context) -> usize {
43789            8
43790        }
43791
43792        #[inline(always)]
43793        fn inline_size(_context: fidl::encoding::Context) -> usize {
43794            16
43795        }
43796    }
43797
43798    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructUnion, D>
43799        for &EmptyStructUnion
43800    {
43801        #[inline]
43802        unsafe fn encode(
43803            self,
43804            encoder: &mut fidl::encoding::Encoder<'_, D>,
43805            offset: usize,
43806            _depth: fidl::encoding::Depth,
43807        ) -> fidl::Result<()> {
43808            encoder.debug_check_bounds::<EmptyStructUnion>(offset);
43809            encoder.write_num::<u64>(self.ordinal(), offset);
43810            match self {
43811                EmptyStructUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
43812                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
43813                    encoder,
43814                    offset + 8,
43815                    _depth,
43816                ),
43817                EmptyStructUnion::Es(ref val) => {
43818                    fidl::encoding::encode_in_envelope::<TransformerEmptyStruct, D>(
43819                        <TransformerEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
43820                        encoder,
43821                        offset + 8,
43822                        _depth,
43823                    )
43824                }
43825            }
43826        }
43827    }
43828
43829    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructUnion {
43830        #[inline(always)]
43831        fn new_empty() -> Self {
43832            Self::Unused(fidl::new_empty!(u8, D))
43833        }
43834
43835        #[inline]
43836        unsafe fn decode(
43837            &mut self,
43838            decoder: &mut fidl::encoding::Decoder<'_, D>,
43839            offset: usize,
43840            mut depth: fidl::encoding::Depth,
43841        ) -> fidl::Result<()> {
43842            decoder.debug_check_bounds::<Self>(offset);
43843            #[allow(unused_variables)]
43844            let next_out_of_line = decoder.next_out_of_line();
43845            let handles_before = decoder.remaining_handles();
43846            let (ordinal, inlined, num_bytes, num_handles) =
43847                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43848
43849            let member_inline_size = match ordinal {
43850                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43851                2 => <TransformerEmptyStruct as fidl::encoding::TypeMarker>::inline_size(
43852                    decoder.context,
43853                ),
43854                _ => return Err(fidl::Error::UnknownUnionTag),
43855            };
43856
43857            if inlined != (member_inline_size <= 4) {
43858                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43859            }
43860            let _inner_offset;
43861            if inlined {
43862                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43863                _inner_offset = offset + 8;
43864            } else {
43865                depth.increment()?;
43866                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43867            }
43868            match ordinal {
43869                1 => {
43870                    #[allow(irrefutable_let_patterns)]
43871                    if let EmptyStructUnion::Unused(_) = self {
43872                        // Do nothing, read the value into the object
43873                    } else {
43874                        // Initialize `self` to the right variant
43875                        *self = EmptyStructUnion::Unused(fidl::new_empty!(u8, D));
43876                    }
43877                    #[allow(irrefutable_let_patterns)]
43878                    if let EmptyStructUnion::Unused(ref mut val) = self {
43879                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
43880                    } else {
43881                        unreachable!()
43882                    }
43883                }
43884                2 => {
43885                    #[allow(irrefutable_let_patterns)]
43886                    if let EmptyStructUnion::Es(_) = self {
43887                        // Do nothing, read the value into the object
43888                    } else {
43889                        // Initialize `self` to the right variant
43890                        *self = EmptyStructUnion::Es(fidl::new_empty!(TransformerEmptyStruct, D));
43891                    }
43892                    #[allow(irrefutable_let_patterns)]
43893                    if let EmptyStructUnion::Es(ref mut val) = self {
43894                        fidl::decode!(
43895                            TransformerEmptyStruct,
43896                            D,
43897                            val,
43898                            decoder,
43899                            _inner_offset,
43900                            depth
43901                        )?;
43902                    } else {
43903                        unreachable!()
43904                    }
43905                }
43906                ordinal => panic!("unexpected ordinal {:?}", ordinal),
43907            }
43908            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43909                return Err(fidl::Error::InvalidNumBytesInEnvelope);
43910            }
43911            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43912                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43913            }
43914            Ok(())
43915        }
43916    }
43917
43918    impl fidl::encoding::ValueTypeMarker for FidlvizUnion {
43919        type Borrowed<'a> = &'a Self;
43920        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43921            value
43922        }
43923    }
43924
43925    unsafe impl fidl::encoding::TypeMarker for FidlvizUnion {
43926        type Owned = Self;
43927
43928        #[inline(always)]
43929        fn inline_align(_context: fidl::encoding::Context) -> usize {
43930            8
43931        }
43932
43933        #[inline(always)]
43934        fn inline_size(_context: fidl::encoding::Context) -> usize {
43935            16
43936        }
43937    }
43938
43939    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizUnion, D>
43940        for &FidlvizUnion
43941    {
43942        #[inline]
43943        unsafe fn encode(
43944            self,
43945            encoder: &mut fidl::encoding::Encoder<'_, D>,
43946            offset: usize,
43947            _depth: fidl::encoding::Depth,
43948        ) -> fidl::Result<()> {
43949            encoder.debug_check_bounds::<FidlvizUnion>(offset);
43950            encoder.write_num::<u64>(self.ordinal(), offset);
43951            match self {
43952                FidlvizUnion::F7(ref val) => fidl::encoding::encode_in_envelope::<
43953                    fidl::encoding::UnboundedString,
43954                    D,
43955                >(
43956                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
43957                        val,
43958                    ),
43959                    encoder,
43960                    offset + 8,
43961                    _depth,
43962                ),
43963            }
43964        }
43965    }
43966
43967    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizUnion {
43968        #[inline(always)]
43969        fn new_empty() -> Self {
43970            Self::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D))
43971        }
43972
43973        #[inline]
43974        unsafe fn decode(
43975            &mut self,
43976            decoder: &mut fidl::encoding::Decoder<'_, D>,
43977            offset: usize,
43978            mut depth: fidl::encoding::Depth,
43979        ) -> fidl::Result<()> {
43980            decoder.debug_check_bounds::<Self>(offset);
43981            #[allow(unused_variables)]
43982            let next_out_of_line = decoder.next_out_of_line();
43983            let handles_before = decoder.remaining_handles();
43984            let (ordinal, inlined, num_bytes, num_handles) =
43985                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43986
43987            let member_inline_size = match ordinal {
43988                7 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
43989                    decoder.context,
43990                ),
43991                _ => return Err(fidl::Error::UnknownUnionTag),
43992            };
43993
43994            if inlined != (member_inline_size <= 4) {
43995                return Err(fidl::Error::InvalidInlineBitInEnvelope);
43996            }
43997            let _inner_offset;
43998            if inlined {
43999                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44000                _inner_offset = offset + 8;
44001            } else {
44002                depth.increment()?;
44003                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44004            }
44005            match ordinal {
44006                7 => {
44007                    #[allow(irrefutable_let_patterns)]
44008                    if let FidlvizUnion::F7(_) = self {
44009                        // Do nothing, read the value into the object
44010                    } else {
44011                        // Initialize `self` to the right variant
44012                        *self =
44013                            FidlvizUnion::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D));
44014                    }
44015                    #[allow(irrefutable_let_patterns)]
44016                    if let FidlvizUnion::F7(ref mut val) = self {
44017                        fidl::decode!(
44018                            fidl::encoding::UnboundedString,
44019                            D,
44020                            val,
44021                            decoder,
44022                            _inner_offset,
44023                            depth
44024                        )?;
44025                    } else {
44026                        unreachable!()
44027                    }
44028                }
44029                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44030            }
44031            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44032                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44033            }
44034            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44035                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44036            }
44037            Ok(())
44038        }
44039    }
44040
44041    impl fidl::encoding::ValueTypeMarker for GoldenUnion {
44042        type Borrowed<'a> = &'a Self;
44043        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44044            value
44045        }
44046    }
44047
44048    unsafe impl fidl::encoding::TypeMarker for GoldenUnion {
44049        type Owned = Self;
44050
44051        #[inline(always)]
44052        fn inline_align(_context: fidl::encoding::Context) -> usize {
44053            8
44054        }
44055
44056        #[inline(always)]
44057        fn inline_size(_context: fidl::encoding::Context) -> usize {
44058            16
44059        }
44060    }
44061
44062    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnion, D>
44063        for &GoldenUnion
44064    {
44065        #[inline]
44066        unsafe fn encode(
44067            self,
44068            encoder: &mut fidl::encoding::Encoder<'_, D>,
44069            offset: usize,
44070            _depth: fidl::encoding::Depth,
44071        ) -> fidl::Result<()> {
44072            encoder.debug_check_bounds::<GoldenUnion>(offset);
44073            encoder.write_num::<u64>(self.ordinal(), offset);
44074            match self {
44075                GoldenUnion::V(ref val) => fidl::encoding::encode_in_envelope::<i16, D>(
44076                    <i16 as fidl::encoding::ValueTypeMarker>::borrow(val),
44077                    encoder,
44078                    offset + 8,
44079                    _depth,
44080                ),
44081            }
44082        }
44083    }
44084
44085    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnion {
44086        #[inline(always)]
44087        fn new_empty() -> Self {
44088            Self::V(fidl::new_empty!(i16, D))
44089        }
44090
44091        #[inline]
44092        unsafe fn decode(
44093            &mut self,
44094            decoder: &mut fidl::encoding::Decoder<'_, D>,
44095            offset: usize,
44096            mut depth: fidl::encoding::Depth,
44097        ) -> fidl::Result<()> {
44098            decoder.debug_check_bounds::<Self>(offset);
44099            #[allow(unused_variables)]
44100            let next_out_of_line = decoder.next_out_of_line();
44101            let handles_before = decoder.remaining_handles();
44102            let (ordinal, inlined, num_bytes, num_handles) =
44103                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44104
44105            let member_inline_size = match ordinal {
44106                1 => <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44107                _ => return Err(fidl::Error::UnknownUnionTag),
44108            };
44109
44110            if inlined != (member_inline_size <= 4) {
44111                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44112            }
44113            let _inner_offset;
44114            if inlined {
44115                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44116                _inner_offset = offset + 8;
44117            } else {
44118                depth.increment()?;
44119                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44120            }
44121            match ordinal {
44122                1 => {
44123                    #[allow(irrefutable_let_patterns)]
44124                    if let GoldenUnion::V(_) = self {
44125                        // Do nothing, read the value into the object
44126                    } else {
44127                        // Initialize `self` to the right variant
44128                        *self = GoldenUnion::V(fidl::new_empty!(i16, D));
44129                    }
44130                    #[allow(irrefutable_let_patterns)]
44131                    if let GoldenUnion::V(ref mut val) = self {
44132                        fidl::decode!(i16, D, val, decoder, _inner_offset, depth)?;
44133                    } else {
44134                        unreachable!()
44135                    }
44136                }
44137                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44138            }
44139            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44140                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44141            }
44142            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44143                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44144            }
44145            Ok(())
44146        }
44147    }
44148
44149    impl fidl::encoding::ValueTypeMarker for IpAddressConfig {
44150        type Borrowed<'a> = &'a Self;
44151        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44152            value
44153        }
44154    }
44155
44156    unsafe impl fidl::encoding::TypeMarker for IpAddressConfig {
44157        type Owned = Self;
44158
44159        #[inline(always)]
44160        fn inline_align(_context: fidl::encoding::Context) -> usize {
44161            8
44162        }
44163
44164        #[inline(always)]
44165        fn inline_size(_context: fidl::encoding::Context) -> usize {
44166            16
44167        }
44168    }
44169
44170    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpAddressConfig, D>
44171        for &IpAddressConfig
44172    {
44173        #[inline]
44174        unsafe fn encode(
44175            self,
44176            encoder: &mut fidl::encoding::Encoder<'_, D>,
44177            offset: usize,
44178            _depth: fidl::encoding::Depth,
44179        ) -> fidl::Result<()> {
44180            encoder.debug_check_bounds::<IpAddressConfig>(offset);
44181            encoder.write_num::<u64>(self.ordinal(), offset);
44182            match self {
44183                IpAddressConfig::PaddingSize24Align4(ref val) => {
44184                    fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u32, 6>, D>(
44185                        <fidl::encoding::Array<u32, 6> as fidl::encoding::ValueTypeMarker>::borrow(
44186                            val,
44187                        ),
44188                        encoder,
44189                        offset + 8,
44190                        _depth,
44191                    )
44192                }
44193                IpAddressConfig::Dhcp(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
44194                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
44195                    encoder,
44196                    offset + 8,
44197                    _depth,
44198                ),
44199            }
44200        }
44201    }
44202
44203    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpAddressConfig {
44204        #[inline(always)]
44205        fn new_empty() -> Self {
44206            Self::PaddingSize24Align4(fidl::new_empty!(fidl::encoding::Array<u32, 6>, D))
44207        }
44208
44209        #[inline]
44210        unsafe fn decode(
44211            &mut self,
44212            decoder: &mut fidl::encoding::Decoder<'_, D>,
44213            offset: usize,
44214            mut depth: fidl::encoding::Depth,
44215        ) -> fidl::Result<()> {
44216            decoder.debug_check_bounds::<Self>(offset);
44217            #[allow(unused_variables)]
44218            let next_out_of_line = decoder.next_out_of_line();
44219            let handles_before = decoder.remaining_handles();
44220            let (ordinal, inlined, num_bytes, num_handles) =
44221                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44222
44223            let member_inline_size = match ordinal {
44224                1 => <fidl::encoding::Array<u32, 6> as fidl::encoding::TypeMarker>::inline_size(
44225                    decoder.context,
44226                ),
44227                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44228                _ => return Err(fidl::Error::UnknownUnionTag),
44229            };
44230
44231            if inlined != (member_inline_size <= 4) {
44232                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44233            }
44234            let _inner_offset;
44235            if inlined {
44236                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44237                _inner_offset = offset + 8;
44238            } else {
44239                depth.increment()?;
44240                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44241            }
44242            match ordinal {
44243                1 => {
44244                    #[allow(irrefutable_let_patterns)]
44245                    if let IpAddressConfig::PaddingSize24Align4(_) = self {
44246                        // Do nothing, read the value into the object
44247                    } else {
44248                        // Initialize `self` to the right variant
44249                        *self = IpAddressConfig::PaddingSize24Align4(
44250                            fidl::new_empty!(fidl::encoding::Array<u32, 6>, D),
44251                        );
44252                    }
44253                    #[allow(irrefutable_let_patterns)]
44254                    if let IpAddressConfig::PaddingSize24Align4(ref mut val) = self {
44255                        fidl::decode!(fidl::encoding::Array<u32, 6>, D, val, decoder, _inner_offset, depth)?;
44256                    } else {
44257                        unreachable!()
44258                    }
44259                }
44260                2 => {
44261                    #[allow(irrefutable_let_patterns)]
44262                    if let IpAddressConfig::Dhcp(_) = self {
44263                        // Do nothing, read the value into the object
44264                    } else {
44265                        // Initialize `self` to the right variant
44266                        *self = IpAddressConfig::Dhcp(fidl::new_empty!(bool, D));
44267                    }
44268                    #[allow(irrefutable_let_patterns)]
44269                    if let IpAddressConfig::Dhcp(ref mut val) = self {
44270                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
44271                    } else {
44272                        unreachable!()
44273                    }
44274                }
44275                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44276            }
44277            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44278                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44279            }
44280            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44281                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44282            }
44283            Ok(())
44284        }
44285    }
44286
44287    impl fidl::encoding::ValueTypeMarker for MutualRecursionUnion {
44288        type Borrowed<'a> = &'a Self;
44289        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44290            value
44291        }
44292    }
44293
44294    unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnion {
44295        type Owned = Self;
44296
44297        #[inline(always)]
44298        fn inline_align(_context: fidl::encoding::Context) -> usize {
44299            8
44300        }
44301
44302        #[inline(always)]
44303        fn inline_size(_context: fidl::encoding::Context) -> usize {
44304            16
44305        }
44306    }
44307
44308    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MutualRecursionUnion, D>
44309        for &MutualRecursionUnion
44310    {
44311        #[inline]
44312        unsafe fn encode(
44313            self,
44314            encoder: &mut fidl::encoding::Encoder<'_, D>,
44315            offset: usize,
44316            _depth: fidl::encoding::Depth,
44317        ) -> fidl::Result<()> {
44318            encoder.debug_check_bounds::<MutualRecursionUnion>(offset);
44319            encoder.write_num::<u64>(self.ordinal(), offset);
44320            match self {
44321                MutualRecursionUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
44322                    MutualRecursionUnionStruct,
44323                    D,
44324                >(
44325                    <MutualRecursionUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44326                    encoder,
44327                    offset + 8,
44328                    _depth,
44329                ),
44330            }
44331        }
44332    }
44333
44334    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MutualRecursionUnion {
44335        #[inline(always)]
44336        fn new_empty() -> Self {
44337            Self::S(fidl::new_empty!(MutualRecursionUnionStruct, D))
44338        }
44339
44340        #[inline]
44341        unsafe fn decode(
44342            &mut self,
44343            decoder: &mut fidl::encoding::Decoder<'_, D>,
44344            offset: usize,
44345            mut depth: fidl::encoding::Depth,
44346        ) -> fidl::Result<()> {
44347            decoder.debug_check_bounds::<Self>(offset);
44348            #[allow(unused_variables)]
44349            let next_out_of_line = decoder.next_out_of_line();
44350            let handles_before = decoder.remaining_handles();
44351            let (ordinal, inlined, num_bytes, num_handles) =
44352                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44353
44354            let member_inline_size = match ordinal {
44355                1 => <MutualRecursionUnionStruct as fidl::encoding::TypeMarker>::inline_size(
44356                    decoder.context,
44357                ),
44358                _ => return Err(fidl::Error::UnknownUnionTag),
44359            };
44360
44361            if inlined != (member_inline_size <= 4) {
44362                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44363            }
44364            let _inner_offset;
44365            if inlined {
44366                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44367                _inner_offset = offset + 8;
44368            } else {
44369                depth.increment()?;
44370                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44371            }
44372            match ordinal {
44373                1 => {
44374                    #[allow(irrefutable_let_patterns)]
44375                    if let MutualRecursionUnion::S(_) = self {
44376                        // Do nothing, read the value into the object
44377                    } else {
44378                        // Initialize `self` to the right variant
44379                        *self = MutualRecursionUnion::S(fidl::new_empty!(
44380                            MutualRecursionUnionStruct,
44381                            D
44382                        ));
44383                    }
44384                    #[allow(irrefutable_let_patterns)]
44385                    if let MutualRecursionUnion::S(ref mut val) = self {
44386                        fidl::decode!(
44387                            MutualRecursionUnionStruct,
44388                            D,
44389                            val,
44390                            decoder,
44391                            _inner_offset,
44392                            depth
44393                        )?;
44394                    } else {
44395                        unreachable!()
44396                    }
44397                }
44398                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44399            }
44400            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44401                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44402            }
44403            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44404                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44405            }
44406            Ok(())
44407        }
44408    }
44409
44410    impl fidl::encoding::ValueTypeMarker for PaddedUnion {
44411        type Borrowed<'a> = &'a Self;
44412        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44413            value
44414        }
44415    }
44416
44417    unsafe impl fidl::encoding::TypeMarker for PaddedUnion {
44418        type Owned = Self;
44419
44420        #[inline(always)]
44421        fn inline_align(_context: fidl::encoding::Context) -> usize {
44422            8
44423        }
44424
44425        #[inline(always)]
44426        fn inline_size(_context: fidl::encoding::Context) -> usize {
44427            16
44428        }
44429    }
44430
44431    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnion, D>
44432        for &PaddedUnion
44433    {
44434        #[inline]
44435        unsafe fn encode(
44436            self,
44437            encoder: &mut fidl::encoding::Encoder<'_, D>,
44438            offset: usize,
44439            _depth: fidl::encoding::Depth,
44440        ) -> fidl::Result<()> {
44441            encoder.debug_check_bounds::<PaddedUnion>(offset);
44442            encoder.write_num::<u64>(self.ordinal(), offset);
44443            match self {
44444                PaddedUnion::Field(ref val) => fidl::encoding::encode_in_envelope::<i8, D>(
44445                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44446                    encoder,
44447                    offset + 8,
44448                    _depth,
44449                ),
44450            }
44451        }
44452    }
44453
44454    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnion {
44455        #[inline(always)]
44456        fn new_empty() -> Self {
44457            Self::Field(fidl::new_empty!(i8, D))
44458        }
44459
44460        #[inline]
44461        unsafe fn decode(
44462            &mut self,
44463            decoder: &mut fidl::encoding::Decoder<'_, D>,
44464            offset: usize,
44465            mut depth: fidl::encoding::Depth,
44466        ) -> fidl::Result<()> {
44467            decoder.debug_check_bounds::<Self>(offset);
44468            #[allow(unused_variables)]
44469            let next_out_of_line = decoder.next_out_of_line();
44470            let handles_before = decoder.remaining_handles();
44471            let (ordinal, inlined, num_bytes, num_handles) =
44472                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44473
44474            let member_inline_size = match ordinal {
44475                1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44476                _ => return Err(fidl::Error::UnknownUnionTag),
44477            };
44478
44479            if inlined != (member_inline_size <= 4) {
44480                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44481            }
44482            let _inner_offset;
44483            if inlined {
44484                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44485                _inner_offset = offset + 8;
44486            } else {
44487                depth.increment()?;
44488                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44489            }
44490            match ordinal {
44491                1 => {
44492                    #[allow(irrefutable_let_patterns)]
44493                    if let PaddedUnion::Field(_) = self {
44494                        // Do nothing, read the value into the object
44495                    } else {
44496                        // Initialize `self` to the right variant
44497                        *self = PaddedUnion::Field(fidl::new_empty!(i8, D));
44498                    }
44499                    #[allow(irrefutable_let_patterns)]
44500                    if let PaddedUnion::Field(ref mut val) = self {
44501                        fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
44502                    } else {
44503                        unreachable!()
44504                    }
44505                }
44506                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44507            }
44508            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44509                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44510            }
44511            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44512                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44513            }
44514            Ok(())
44515        }
44516    }
44517
44518    impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnion {
44519        type Borrowed<'a> = &'a Self;
44520        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44521            value
44522        }
44523    }
44524
44525    unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnion {
44526        type Owned = Self;
44527
44528        #[inline(always)]
44529        fn inline_align(_context: fidl::encoding::Context) -> usize {
44530            8
44531        }
44532
44533        #[inline(always)]
44534        fn inline_size(_context: fidl::encoding::Context) -> usize {
44535            16
44536        }
44537    }
44538
44539    unsafe impl<D: fidl::encoding::ResourceDialect>
44540        fidl::encoding::Encode<RecursiveOptionalAndUnion, D> for &RecursiveOptionalAndUnion
44541    {
44542        #[inline]
44543        unsafe fn encode(
44544            self,
44545            encoder: &mut fidl::encoding::Encoder<'_, D>,
44546            offset: usize,
44547            _depth: fidl::encoding::Depth,
44548        ) -> fidl::Result<()> {
44549            encoder.debug_check_bounds::<RecursiveOptionalAndUnion>(offset);
44550            encoder.write_num::<u64>(self.ordinal(), offset);
44551            match self {
44552                RecursiveOptionalAndUnion::RecursiveOptional(ref val) => {
44553                    fidl::encoding::encode_in_envelope::<RecursiveOptionalStruct, D>(
44554                        <RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44555                        encoder,
44556                        offset + 8,
44557                        _depth,
44558                    )
44559                }
44560            }
44561        }
44562    }
44563
44564    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
44565        for RecursiveOptionalAndUnion
44566    {
44567        #[inline(always)]
44568        fn new_empty() -> Self {
44569            Self::RecursiveOptional(fidl::new_empty!(RecursiveOptionalStruct, D))
44570        }
44571
44572        #[inline]
44573        unsafe fn decode(
44574            &mut self,
44575            decoder: &mut fidl::encoding::Decoder<'_, D>,
44576            offset: usize,
44577            mut depth: fidl::encoding::Depth,
44578        ) -> fidl::Result<()> {
44579            decoder.debug_check_bounds::<Self>(offset);
44580            #[allow(unused_variables)]
44581            let next_out_of_line = decoder.next_out_of_line();
44582            let handles_before = decoder.remaining_handles();
44583            let (ordinal, inlined, num_bytes, num_handles) =
44584                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44585
44586            let member_inline_size = match ordinal {
44587                1 => <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
44588                    decoder.context,
44589                ),
44590                _ => return Err(fidl::Error::UnknownUnionTag),
44591            };
44592
44593            if inlined != (member_inline_size <= 4) {
44594                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44595            }
44596            let _inner_offset;
44597            if inlined {
44598                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44599                _inner_offset = offset + 8;
44600            } else {
44601                depth.increment()?;
44602                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44603            }
44604            match ordinal {
44605                1 => {
44606                    #[allow(irrefutable_let_patterns)]
44607                    if let RecursiveOptionalAndUnion::RecursiveOptional(_) = self {
44608                        // Do nothing, read the value into the object
44609                    } else {
44610                        // Initialize `self` to the right variant
44611                        *self = RecursiveOptionalAndUnion::RecursiveOptional(fidl::new_empty!(
44612                            RecursiveOptionalStruct,
44613                            D
44614                        ));
44615                    }
44616                    #[allow(irrefutable_let_patterns)]
44617                    if let RecursiveOptionalAndUnion::RecursiveOptional(ref mut val) = self {
44618                        fidl::decode!(
44619                            RecursiveOptionalStruct,
44620                            D,
44621                            val,
44622                            decoder,
44623                            _inner_offset,
44624                            depth
44625                        )?;
44626                    } else {
44627                        unreachable!()
44628                    }
44629                }
44630                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44631            }
44632            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44633                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44634            }
44635            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44636                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44637            }
44638            Ok(())
44639        }
44640    }
44641
44642    impl fidl::encoding::ValueTypeMarker for RecursiveUnion {
44643        type Borrowed<'a> = &'a Self;
44644        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44645            value
44646        }
44647    }
44648
44649    unsafe impl fidl::encoding::TypeMarker for RecursiveUnion {
44650        type Owned = Self;
44651
44652        #[inline(always)]
44653        fn inline_align(_context: fidl::encoding::Context) -> usize {
44654            8
44655        }
44656
44657        #[inline(always)]
44658        fn inline_size(_context: fidl::encoding::Context) -> usize {
44659            16
44660        }
44661    }
44662
44663    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnion, D>
44664        for &RecursiveUnion
44665    {
44666        #[inline]
44667        unsafe fn encode(
44668            self,
44669            encoder: &mut fidl::encoding::Encoder<'_, D>,
44670            offset: usize,
44671            _depth: fidl::encoding::Depth,
44672        ) -> fidl::Result<()> {
44673            encoder.debug_check_bounds::<RecursiveUnion>(offset);
44674            encoder.write_num::<u64>(self.ordinal(), offset);
44675            match self {
44676                RecursiveUnion::S(ref val) => {
44677                    fidl::encoding::encode_in_envelope::<RecursiveUnionStruct, D>(
44678                        <RecursiveUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44679                        encoder,
44680                        offset + 8,
44681                        _depth,
44682                    )
44683                }
44684                RecursiveUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
44685            }
44686        }
44687    }
44688
44689    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnion {
44690        #[inline(always)]
44691        fn new_empty() -> Self {
44692            Self::__SourceBreaking { unknown_ordinal: 0 }
44693        }
44694
44695        #[inline]
44696        unsafe fn decode(
44697            &mut self,
44698            decoder: &mut fidl::encoding::Decoder<'_, D>,
44699            offset: usize,
44700            mut depth: fidl::encoding::Depth,
44701        ) -> fidl::Result<()> {
44702            decoder.debug_check_bounds::<Self>(offset);
44703            #[allow(unused_variables)]
44704            let next_out_of_line = decoder.next_out_of_line();
44705            let handles_before = decoder.remaining_handles();
44706            let (ordinal, inlined, num_bytes, num_handles) =
44707                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44708
44709            let member_inline_size = match ordinal {
44710                1 => <RecursiveUnionStruct as fidl::encoding::TypeMarker>::inline_size(
44711                    decoder.context,
44712                ),
44713                0 => return Err(fidl::Error::UnknownUnionTag),
44714                _ => num_bytes as usize,
44715            };
44716
44717            if inlined != (member_inline_size <= 4) {
44718                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44719            }
44720            let _inner_offset;
44721            if inlined {
44722                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44723                _inner_offset = offset + 8;
44724            } else {
44725                depth.increment()?;
44726                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44727            }
44728            match ordinal {
44729                1 => {
44730                    #[allow(irrefutable_let_patterns)]
44731                    if let RecursiveUnion::S(_) = self {
44732                        // Do nothing, read the value into the object
44733                    } else {
44734                        // Initialize `self` to the right variant
44735                        *self = RecursiveUnion::S(fidl::new_empty!(RecursiveUnionStruct, D));
44736                    }
44737                    #[allow(irrefutable_let_patterns)]
44738                    if let RecursiveUnion::S(ref mut val) = self {
44739                        fidl::decode!(RecursiveUnionStruct, D, val, decoder, _inner_offset, depth)?;
44740                    } else {
44741                        unreachable!()
44742                    }
44743                }
44744                #[allow(deprecated)]
44745                ordinal => {
44746                    for _ in 0..num_handles {
44747                        decoder.drop_next_handle()?;
44748                    }
44749                    *self = RecursiveUnion::__SourceBreaking { unknown_ordinal: ordinal };
44750                }
44751            }
44752            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44753                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44754            }
44755            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44756                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44757            }
44758            Ok(())
44759        }
44760    }
44761
44762    impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnion {
44763        type Borrowed<'a> = &'a Self;
44764        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44765            value
44766        }
44767    }
44768
44769    unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnion {
44770        type Owned = Self;
44771
44772        #[inline(always)]
44773        fn inline_align(_context: fidl::encoding::Context) -> usize {
44774            8
44775        }
44776
44777        #[inline(always)]
44778        fn inline_size(_context: fidl::encoding::Context) -> usize {
44779            16
44780        }
44781    }
44782
44783    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorUnion, D>
44784        for &RecursiveVectorUnion
44785    {
44786        #[inline]
44787        unsafe fn encode(
44788            self,
44789            encoder: &mut fidl::encoding::Encoder<'_, D>,
44790            offset: usize,
44791            _depth: fidl::encoding::Depth,
44792        ) -> fidl::Result<()> {
44793            encoder.debug_check_bounds::<RecursiveVectorUnion>(offset);
44794            encoder.write_num::<u64>(self.ordinal(), offset);
44795            match self {
44796                RecursiveVectorUnion::Vec(ref val) => fidl::encoding::encode_in_envelope::<
44797                    fidl::encoding::UnboundedVector<
44798                        fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44799                    >,
44800                    D,
44801                >(
44802                    <fidl::encoding::UnboundedVector<
44803                        fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44804                    > as fidl::encoding::ValueTypeMarker>::borrow(val),
44805                    encoder,
44806                    offset + 8,
44807                    _depth,
44808                ),
44809            }
44810        }
44811    }
44812
44813    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorUnion {
44814        #[inline(always)]
44815        fn new_empty() -> Self {
44816            Self::Vec(fidl::new_empty!(
44817                fidl::encoding::UnboundedVector<
44818                    fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44819                >,
44820                D
44821            ))
44822        }
44823
44824        #[inline]
44825        unsafe fn decode(
44826            &mut self,
44827            decoder: &mut fidl::encoding::Decoder<'_, D>,
44828            offset: usize,
44829            mut depth: fidl::encoding::Depth,
44830        ) -> fidl::Result<()> {
44831            decoder.debug_check_bounds::<Self>(offset);
44832            #[allow(unused_variables)]
44833            let next_out_of_line = decoder.next_out_of_line();
44834            let handles_before = decoder.remaining_handles();
44835            let (ordinal, inlined, num_bytes, num_handles) =
44836                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44837
44838            let member_inline_size = match ordinal {
44839                1 => <fidl::encoding::UnboundedVector<
44840                    fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44841                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44842                _ => return Err(fidl::Error::UnknownUnionTag),
44843            };
44844
44845            if inlined != (member_inline_size <= 4) {
44846                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44847            }
44848            let _inner_offset;
44849            if inlined {
44850                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44851                _inner_offset = offset + 8;
44852            } else {
44853                depth.increment()?;
44854                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44855            }
44856            match ordinal {
44857                1 => {
44858                    #[allow(irrefutable_let_patterns)]
44859                    if let RecursiveVectorUnion::Vec(_) = self {
44860                        // Do nothing, read the value into the object
44861                    } else {
44862                        // Initialize `self` to the right variant
44863                        *self = RecursiveVectorUnion::Vec(fidl::new_empty!(
44864                            fidl::encoding::UnboundedVector<
44865                                fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44866                            >,
44867                            D
44868                        ));
44869                    }
44870                    #[allow(irrefutable_let_patterns)]
44871                    if let RecursiveVectorUnion::Vec(ref mut val) = self {
44872                        fidl::decode!(
44873                            fidl::encoding::UnboundedVector<
44874                                fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
44875                            >,
44876                            D,
44877                            val,
44878                            decoder,
44879                            _inner_offset,
44880                            depth
44881                        )?;
44882                    } else {
44883                        unreachable!()
44884                    }
44885                }
44886                ordinal => panic!("unexpected ordinal {:?}", ordinal),
44887            }
44888            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44889                return Err(fidl::Error::InvalidNumBytesInEnvelope);
44890            }
44891            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44892                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44893            }
44894            Ok(())
44895        }
44896    }
44897
44898    impl fidl::encoding::ValueTypeMarker for Regression9Result {
44899        type Borrowed<'a> = &'a Self;
44900        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44901            value
44902        }
44903    }
44904
44905    unsafe impl fidl::encoding::TypeMarker for Regression9Result {
44906        type Owned = Self;
44907
44908        #[inline(always)]
44909        fn inline_align(_context: fidl::encoding::Context) -> usize {
44910            8
44911        }
44912
44913        #[inline(always)]
44914        fn inline_size(_context: fidl::encoding::Context) -> usize {
44915            16
44916        }
44917    }
44918
44919    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Result, D>
44920        for &Regression9Result
44921    {
44922        #[inline]
44923        unsafe fn encode(
44924            self,
44925            encoder: &mut fidl::encoding::Encoder<'_, D>,
44926            offset: usize,
44927            _depth: fidl::encoding::Depth,
44928        ) -> fidl::Result<()> {
44929            encoder.debug_check_bounds::<Regression9Result>(offset);
44930            encoder.write_num::<u64>(self.ordinal(), offset);
44931            match self {
44932                Regression9Result::Ok(ref val) => {
44933                    fidl::encoding::encode_in_envelope::<Regression9Value, D>(
44934                        <Regression9Value as fidl::encoding::ValueTypeMarker>::borrow(val),
44935                        encoder,
44936                        offset + 8,
44937                        _depth,
44938                    )
44939                }
44940                Regression9Result::Error(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
44941                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44942                    encoder,
44943                    offset + 8,
44944                    _depth,
44945                ),
44946            }
44947        }
44948    }
44949
44950    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Result {
44951        #[inline(always)]
44952        fn new_empty() -> Self {
44953            Self::Ok(fidl::new_empty!(Regression9Value, D))
44954        }
44955
44956        #[inline]
44957        unsafe fn decode(
44958            &mut self,
44959            decoder: &mut fidl::encoding::Decoder<'_, D>,
44960            offset: usize,
44961            mut depth: fidl::encoding::Depth,
44962        ) -> fidl::Result<()> {
44963            decoder.debug_check_bounds::<Self>(offset);
44964            #[allow(unused_variables)]
44965            let next_out_of_line = decoder.next_out_of_line();
44966            let handles_before = decoder.remaining_handles();
44967            let (ordinal, inlined, num_bytes, num_handles) =
44968                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44969
44970            let member_inline_size = match ordinal {
44971                1 => <Regression9Value as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44972                2 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44973                _ => return Err(fidl::Error::UnknownUnionTag),
44974            };
44975
44976            if inlined != (member_inline_size <= 4) {
44977                return Err(fidl::Error::InvalidInlineBitInEnvelope);
44978            }
44979            let _inner_offset;
44980            if inlined {
44981                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44982                _inner_offset = offset + 8;
44983            } else {
44984                depth.increment()?;
44985                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44986            }
44987            match ordinal {
44988                1 => {
44989                    #[allow(irrefutable_let_patterns)]
44990                    if let Regression9Result::Ok(_) = self {
44991                        // Do nothing, read the value into the object
44992                    } else {
44993                        // Initialize `self` to the right variant
44994                        *self = Regression9Result::Ok(fidl::new_empty!(Regression9Value, D));
44995                    }
44996                    #[allow(irrefutable_let_patterns)]
44997                    if let Regression9Result::Ok(ref mut val) = self {
44998                        fidl::decode!(Regression9Value, D, val, decoder, _inner_offset, depth)?;
44999                    } else {
45000                        unreachable!()
45001                    }
45002                }
45003                2 => {
45004                    #[allow(irrefutable_let_patterns)]
45005                    if let Regression9Result::Error(_) = self {
45006                        // Do nothing, read the value into the object
45007                    } else {
45008                        // Initialize `self` to the right variant
45009                        *self = Regression9Result::Error(fidl::new_empty!(u32, D));
45010                    }
45011                    #[allow(irrefutable_let_patterns)]
45012                    if let Regression9Result::Error(ref mut val) = self {
45013                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45014                    } else {
45015                        unreachable!()
45016                    }
45017                }
45018                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45019            }
45020            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45021                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45022            }
45023            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45024                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45025            }
45026            Ok(())
45027        }
45028    }
45029
45030    impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnion {
45031        type Borrowed<'a> = &'a Self;
45032        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45033            value
45034        }
45035    }
45036
45037    unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnion {
45038        type Owned = Self;
45039
45040        #[inline(always)]
45041        fn inline_align(_context: fidl::encoding::Context) -> usize {
45042            8
45043        }
45044
45045        #[inline(always)]
45046        fn inline_size(_context: fidl::encoding::Context) -> usize {
45047            16
45048        }
45049    }
45050
45051    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalUnion, D>
45052        for &ReverseOrdinalUnion
45053    {
45054        #[inline]
45055        unsafe fn encode(
45056            self,
45057            encoder: &mut fidl::encoding::Encoder<'_, D>,
45058            offset: usize,
45059            _depth: fidl::encoding::Depth,
45060        ) -> fidl::Result<()> {
45061            encoder.debug_check_bounds::<ReverseOrdinalUnion>(offset);
45062            encoder.write_num::<u64>(self.ordinal(), offset);
45063            match self {
45064                ReverseOrdinalUnion::Z(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45065                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45066                    encoder,
45067                    offset + 8,
45068                    _depth,
45069                ),
45070                ReverseOrdinalUnion::Y(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
45071                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
45072                    encoder,
45073                    offset + 8,
45074                    _depth,
45075                ),
45076                ReverseOrdinalUnion::X(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
45077                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
45078                    encoder,
45079                    offset + 8,
45080                    _depth,
45081                ),
45082            }
45083        }
45084    }
45085
45086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalUnion {
45087        #[inline(always)]
45088        fn new_empty() -> Self {
45089            Self::Z(fidl::new_empty!(u32, D))
45090        }
45091
45092        #[inline]
45093        unsafe fn decode(
45094            &mut self,
45095            decoder: &mut fidl::encoding::Decoder<'_, D>,
45096            offset: usize,
45097            mut depth: fidl::encoding::Depth,
45098        ) -> fidl::Result<()> {
45099            decoder.debug_check_bounds::<Self>(offset);
45100            #[allow(unused_variables)]
45101            let next_out_of_line = decoder.next_out_of_line();
45102            let handles_before = decoder.remaining_handles();
45103            let (ordinal, inlined, num_bytes, num_handles) =
45104                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45105
45106            let member_inline_size = match ordinal {
45107                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45108                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45109                4 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45110                _ => return Err(fidl::Error::UnknownUnionTag),
45111            };
45112
45113            if inlined != (member_inline_size <= 4) {
45114                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45115            }
45116            let _inner_offset;
45117            if inlined {
45118                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45119                _inner_offset = offset + 8;
45120            } else {
45121                depth.increment()?;
45122                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45123            }
45124            match ordinal {
45125                1 => {
45126                    #[allow(irrefutable_let_patterns)]
45127                    if let ReverseOrdinalUnion::Z(_) = self {
45128                        // Do nothing, read the value into the object
45129                    } else {
45130                        // Initialize `self` to the right variant
45131                        *self = ReverseOrdinalUnion::Z(fidl::new_empty!(u32, D));
45132                    }
45133                    #[allow(irrefutable_let_patterns)]
45134                    if let ReverseOrdinalUnion::Z(ref mut val) = self {
45135                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45136                    } else {
45137                        unreachable!()
45138                    }
45139                }
45140                2 => {
45141                    #[allow(irrefutable_let_patterns)]
45142                    if let ReverseOrdinalUnion::Y(_) = self {
45143                        // Do nothing, read the value into the object
45144                    } else {
45145                        // Initialize `self` to the right variant
45146                        *self = ReverseOrdinalUnion::Y(fidl::new_empty!(bool, D));
45147                    }
45148                    #[allow(irrefutable_let_patterns)]
45149                    if let ReverseOrdinalUnion::Y(ref mut val) = self {
45150                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
45151                    } else {
45152                        unreachable!()
45153                    }
45154                }
45155                4 => {
45156                    #[allow(irrefutable_let_patterns)]
45157                    if let ReverseOrdinalUnion::X(_) = self {
45158                        // Do nothing, read the value into the object
45159                    } else {
45160                        // Initialize `self` to the right variant
45161                        *self = ReverseOrdinalUnion::X(fidl::new_empty!(i64, D));
45162                    }
45163                    #[allow(irrefutable_let_patterns)]
45164                    if let ReverseOrdinalUnion::X(ref mut val) = self {
45165                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
45166                    } else {
45167                        unreachable!()
45168                    }
45169                }
45170                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45171            }
45172            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45173                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45174            }
45175            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45176                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45177            }
45178            Ok(())
45179        }
45180    }
45181
45182    impl fidl::encoding::ValueTypeMarker for SampleStrictXUnion {
45183        type Borrowed<'a> = &'a Self;
45184        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45185            value
45186        }
45187    }
45188
45189    unsafe impl fidl::encoding::TypeMarker for SampleStrictXUnion {
45190        type Owned = Self;
45191
45192        #[inline(always)]
45193        fn inline_align(_context: fidl::encoding::Context) -> usize {
45194            8
45195        }
45196
45197        #[inline(always)]
45198        fn inline_size(_context: fidl::encoding::Context) -> usize {
45199            16
45200        }
45201    }
45202
45203    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleStrictXUnion, D>
45204        for &SampleStrictXUnion
45205    {
45206        #[inline]
45207        unsafe fn encode(
45208            self,
45209            encoder: &mut fidl::encoding::Encoder<'_, D>,
45210            offset: usize,
45211            _depth: fidl::encoding::Depth,
45212        ) -> fidl::Result<()> {
45213            encoder.debug_check_bounds::<SampleStrictXUnion>(offset);
45214            encoder.write_num::<u64>(self.ordinal(), offset);
45215            match self {
45216                SampleStrictXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45217                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45218                    encoder,
45219                    offset + 8,
45220                    _depth,
45221                ),
45222                SampleStrictXUnion::Su(ref val) => {
45223                    fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
45224                        <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
45225                        encoder,
45226                        offset + 8,
45227                        _depth,
45228                    )
45229                }
45230                SampleStrictXUnion::St(ref val) => {
45231                    fidl::encoding::encode_in_envelope::<SimpleTable, D>(
45232                        <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
45233                        encoder,
45234                        offset + 8,
45235                        _depth,
45236                    )
45237                }
45238            }
45239        }
45240    }
45241
45242    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleStrictXUnion {
45243        #[inline(always)]
45244        fn new_empty() -> Self {
45245            Self::U(fidl::new_empty!(u32, D))
45246        }
45247
45248        #[inline]
45249        unsafe fn decode(
45250            &mut self,
45251            decoder: &mut fidl::encoding::Decoder<'_, D>,
45252            offset: usize,
45253            mut depth: fidl::encoding::Depth,
45254        ) -> fidl::Result<()> {
45255            decoder.debug_check_bounds::<Self>(offset);
45256            #[allow(unused_variables)]
45257            let next_out_of_line = decoder.next_out_of_line();
45258            let handles_before = decoder.remaining_handles();
45259            let (ordinal, inlined, num_bytes, num_handles) =
45260                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45261
45262            let member_inline_size = match ordinal {
45263                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45264                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45265                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45266                _ => return Err(fidl::Error::UnknownUnionTag),
45267            };
45268
45269            if inlined != (member_inline_size <= 4) {
45270                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45271            }
45272            let _inner_offset;
45273            if inlined {
45274                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45275                _inner_offset = offset + 8;
45276            } else {
45277                depth.increment()?;
45278                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45279            }
45280            match ordinal {
45281                1 => {
45282                    #[allow(irrefutable_let_patterns)]
45283                    if let SampleStrictXUnion::U(_) = self {
45284                        // Do nothing, read the value into the object
45285                    } else {
45286                        // Initialize `self` to the right variant
45287                        *self = SampleStrictXUnion::U(fidl::new_empty!(u32, D));
45288                    }
45289                    #[allow(irrefutable_let_patterns)]
45290                    if let SampleStrictXUnion::U(ref mut val) = self {
45291                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45292                    } else {
45293                        unreachable!()
45294                    }
45295                }
45296                2 => {
45297                    #[allow(irrefutable_let_patterns)]
45298                    if let SampleStrictXUnion::Su(_) = self {
45299                        // Do nothing, read the value into the object
45300                    } else {
45301                        // Initialize `self` to the right variant
45302                        *self = SampleStrictXUnion::Su(fidl::new_empty!(SimpleUnion, D));
45303                    }
45304                    #[allow(irrefutable_let_patterns)]
45305                    if let SampleStrictXUnion::Su(ref mut val) = self {
45306                        fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
45307                    } else {
45308                        unreachable!()
45309                    }
45310                }
45311                3 => {
45312                    #[allow(irrefutable_let_patterns)]
45313                    if let SampleStrictXUnion::St(_) = self {
45314                        // Do nothing, read the value into the object
45315                    } else {
45316                        // Initialize `self` to the right variant
45317                        *self = SampleStrictXUnion::St(fidl::new_empty!(SimpleTable, D));
45318                    }
45319                    #[allow(irrefutable_let_patterns)]
45320                    if let SampleStrictXUnion::St(ref mut val) = self {
45321                        fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
45322                    } else {
45323                        unreachable!()
45324                    }
45325                }
45326                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45327            }
45328            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45329                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45330            }
45331            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45332                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45333            }
45334            Ok(())
45335        }
45336    }
45337
45338    impl fidl::encoding::ValueTypeMarker for SampleXUnion {
45339        type Borrowed<'a> = &'a Self;
45340        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45341            value
45342        }
45343    }
45344
45345    unsafe impl fidl::encoding::TypeMarker for SampleXUnion {
45346        type Owned = Self;
45347
45348        #[inline(always)]
45349        fn inline_align(_context: fidl::encoding::Context) -> usize {
45350            8
45351        }
45352
45353        #[inline(always)]
45354        fn inline_size(_context: fidl::encoding::Context) -> usize {
45355            16
45356        }
45357    }
45358
45359    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleXUnion, D>
45360        for &SampleXUnion
45361    {
45362        #[inline]
45363        unsafe fn encode(
45364            self,
45365            encoder: &mut fidl::encoding::Encoder<'_, D>,
45366            offset: usize,
45367            _depth: fidl::encoding::Depth,
45368        ) -> fidl::Result<()> {
45369            encoder.debug_check_bounds::<SampleXUnion>(offset);
45370            encoder.write_num::<u64>(self.ordinal(), offset);
45371            match self {
45372                SampleXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45373                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45374                    encoder,
45375                    offset + 8,
45376                    _depth,
45377                ),
45378                SampleXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
45379                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
45380                    encoder,
45381                    offset + 8,
45382                    _depth,
45383                ),
45384                SampleXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
45385                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
45386                    encoder,
45387                    offset + 8,
45388                    _depth,
45389                ),
45390                SampleXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
45391            }
45392        }
45393    }
45394
45395    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleXUnion {
45396        #[inline(always)]
45397        fn new_empty() -> Self {
45398            Self::__SourceBreaking { unknown_ordinal: 0 }
45399        }
45400
45401        #[inline]
45402        unsafe fn decode(
45403            &mut self,
45404            decoder: &mut fidl::encoding::Decoder<'_, D>,
45405            offset: usize,
45406            mut depth: fidl::encoding::Depth,
45407        ) -> fidl::Result<()> {
45408            decoder.debug_check_bounds::<Self>(offset);
45409            #[allow(unused_variables)]
45410            let next_out_of_line = decoder.next_out_of_line();
45411            let handles_before = decoder.remaining_handles();
45412            let (ordinal, inlined, num_bytes, num_handles) =
45413                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45414
45415            let member_inline_size = match ordinal {
45416                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45417                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45418                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45419                0 => return Err(fidl::Error::UnknownUnionTag),
45420                _ => num_bytes as usize,
45421            };
45422
45423            if inlined != (member_inline_size <= 4) {
45424                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45425            }
45426            let _inner_offset;
45427            if inlined {
45428                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45429                _inner_offset = offset + 8;
45430            } else {
45431                depth.increment()?;
45432                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45433            }
45434            match ordinal {
45435                1 => {
45436                    #[allow(irrefutable_let_patterns)]
45437                    if let SampleXUnion::U(_) = self {
45438                        // Do nothing, read the value into the object
45439                    } else {
45440                        // Initialize `self` to the right variant
45441                        *self = SampleXUnion::U(fidl::new_empty!(u32, D));
45442                    }
45443                    #[allow(irrefutable_let_patterns)]
45444                    if let SampleXUnion::U(ref mut val) = self {
45445                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45446                    } else {
45447                        unreachable!()
45448                    }
45449                }
45450                2 => {
45451                    #[allow(irrefutable_let_patterns)]
45452                    if let SampleXUnion::Su(_) = self {
45453                        // Do nothing, read the value into the object
45454                    } else {
45455                        // Initialize `self` to the right variant
45456                        *self = SampleXUnion::Su(fidl::new_empty!(SimpleUnion, D));
45457                    }
45458                    #[allow(irrefutable_let_patterns)]
45459                    if let SampleXUnion::Su(ref mut val) = self {
45460                        fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
45461                    } else {
45462                        unreachable!()
45463                    }
45464                }
45465                3 => {
45466                    #[allow(irrefutable_let_patterns)]
45467                    if let SampleXUnion::St(_) = self {
45468                        // Do nothing, read the value into the object
45469                    } else {
45470                        // Initialize `self` to the right variant
45471                        *self = SampleXUnion::St(fidl::new_empty!(SimpleTable, D));
45472                    }
45473                    #[allow(irrefutable_let_patterns)]
45474                    if let SampleXUnion::St(ref mut val) = self {
45475                        fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
45476                    } else {
45477                        unreachable!()
45478                    }
45479                }
45480                #[allow(deprecated)]
45481                ordinal => {
45482                    for _ in 0..num_handles {
45483                        decoder.drop_next_handle()?;
45484                    }
45485                    *self = SampleXUnion::__SourceBreaking { unknown_ordinal: ordinal };
45486                }
45487            }
45488            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45489                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45490            }
45491            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45492                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45493            }
45494            Ok(())
45495        }
45496    }
45497
45498    impl fidl::encoding::ValueTypeMarker for SimpleUnion {
45499        type Borrowed<'a> = &'a Self;
45500        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45501            value
45502        }
45503    }
45504
45505    unsafe impl fidl::encoding::TypeMarker for SimpleUnion {
45506        type Owned = Self;
45507
45508        #[inline(always)]
45509        fn inline_align(_context: fidl::encoding::Context) -> usize {
45510            8
45511        }
45512
45513        #[inline(always)]
45514        fn inline_size(_context: fidl::encoding::Context) -> usize {
45515            16
45516        }
45517    }
45518
45519    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleUnion, D>
45520        for &SimpleUnion
45521    {
45522        #[inline]
45523        unsafe fn encode(
45524            self,
45525            encoder: &mut fidl::encoding::Encoder<'_, D>,
45526            offset: usize,
45527            _depth: fidl::encoding::Depth,
45528        ) -> fidl::Result<()> {
45529            encoder.debug_check_bounds::<SimpleUnion>(offset);
45530            encoder.write_num::<u64>(self.ordinal(), offset);
45531            match self {
45532                SimpleUnion::I32(ref val) => fidl::encoding::encode_in_envelope::<i32, D>(
45533                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45534                    encoder,
45535                    offset + 8,
45536                    _depth,
45537                ),
45538                SimpleUnion::I64(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
45539                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
45540                    encoder,
45541                    offset + 8,
45542                    _depth,
45543                ),
45544                SimpleUnion::S(ref val) => fidl::encoding::encode_in_envelope::<Int64Struct, D>(
45545                    <Int64Struct as fidl::encoding::ValueTypeMarker>::borrow(val),
45546                    encoder,
45547                    offset + 8,
45548                    _depth,
45549                ),
45550                SimpleUnion::Str(ref val) => fidl::encoding::encode_in_envelope::<
45551                    fidl::encoding::UnboundedString,
45552                    D,
45553                >(
45554                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
45555                        val,
45556                    ),
45557                    encoder,
45558                    offset + 8,
45559                    _depth,
45560                ),
45561            }
45562        }
45563    }
45564
45565    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleUnion {
45566        #[inline(always)]
45567        fn new_empty() -> Self {
45568            Self::I32(fidl::new_empty!(i32, D))
45569        }
45570
45571        #[inline]
45572        unsafe fn decode(
45573            &mut self,
45574            decoder: &mut fidl::encoding::Decoder<'_, D>,
45575            offset: usize,
45576            mut depth: fidl::encoding::Depth,
45577        ) -> fidl::Result<()> {
45578            decoder.debug_check_bounds::<Self>(offset);
45579            #[allow(unused_variables)]
45580            let next_out_of_line = decoder.next_out_of_line();
45581            let handles_before = decoder.remaining_handles();
45582            let (ordinal, inlined, num_bytes, num_handles) =
45583                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45584
45585            let member_inline_size = match ordinal {
45586                1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45587                2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45588                3 => <Int64Struct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45589                4 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
45590                    decoder.context,
45591                ),
45592                _ => return Err(fidl::Error::UnknownUnionTag),
45593            };
45594
45595            if inlined != (member_inline_size <= 4) {
45596                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45597            }
45598            let _inner_offset;
45599            if inlined {
45600                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45601                _inner_offset = offset + 8;
45602            } else {
45603                depth.increment()?;
45604                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45605            }
45606            match ordinal {
45607                1 => {
45608                    #[allow(irrefutable_let_patterns)]
45609                    if let SimpleUnion::I32(_) = self {
45610                        // Do nothing, read the value into the object
45611                    } else {
45612                        // Initialize `self` to the right variant
45613                        *self = SimpleUnion::I32(fidl::new_empty!(i32, D));
45614                    }
45615                    #[allow(irrefutable_let_patterns)]
45616                    if let SimpleUnion::I32(ref mut val) = self {
45617                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
45618                    } else {
45619                        unreachable!()
45620                    }
45621                }
45622                2 => {
45623                    #[allow(irrefutable_let_patterns)]
45624                    if let SimpleUnion::I64(_) = self {
45625                        // Do nothing, read the value into the object
45626                    } else {
45627                        // Initialize `self` to the right variant
45628                        *self = SimpleUnion::I64(fidl::new_empty!(i64, D));
45629                    }
45630                    #[allow(irrefutable_let_patterns)]
45631                    if let SimpleUnion::I64(ref mut val) = self {
45632                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
45633                    } else {
45634                        unreachable!()
45635                    }
45636                }
45637                3 => {
45638                    #[allow(irrefutable_let_patterns)]
45639                    if let SimpleUnion::S(_) = self {
45640                        // Do nothing, read the value into the object
45641                    } else {
45642                        // Initialize `self` to the right variant
45643                        *self = SimpleUnion::S(fidl::new_empty!(Int64Struct, D));
45644                    }
45645                    #[allow(irrefutable_let_patterns)]
45646                    if let SimpleUnion::S(ref mut val) = self {
45647                        fidl::decode!(Int64Struct, D, val, decoder, _inner_offset, depth)?;
45648                    } else {
45649                        unreachable!()
45650                    }
45651                }
45652                4 => {
45653                    #[allow(irrefutable_let_patterns)]
45654                    if let SimpleUnion::Str(_) = self {
45655                        // Do nothing, read the value into the object
45656                    } else {
45657                        // Initialize `self` to the right variant
45658                        *self =
45659                            SimpleUnion::Str(fidl::new_empty!(fidl::encoding::UnboundedString, D));
45660                    }
45661                    #[allow(irrefutable_let_patterns)]
45662                    if let SimpleUnion::Str(ref mut val) = self {
45663                        fidl::decode!(
45664                            fidl::encoding::UnboundedString,
45665                            D,
45666                            val,
45667                            decoder,
45668                            _inner_offset,
45669                            depth
45670                        )?;
45671                    } else {
45672                        unreachable!()
45673                    }
45674                }
45675                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45676            }
45677            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45678                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45679            }
45680            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45681                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45682            }
45683            Ok(())
45684        }
45685    }
45686
45687    impl fidl::encoding::ValueTypeMarker for SingleVariantUnion {
45688        type Borrowed<'a> = &'a Self;
45689        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45690            value
45691        }
45692    }
45693
45694    unsafe impl fidl::encoding::TypeMarker for SingleVariantUnion {
45695        type Owned = Self;
45696
45697        #[inline(always)]
45698        fn inline_align(_context: fidl::encoding::Context) -> usize {
45699            8
45700        }
45701
45702        #[inline(always)]
45703        fn inline_size(_context: fidl::encoding::Context) -> usize {
45704            16
45705        }
45706    }
45707
45708    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SingleVariantUnion, D>
45709        for &SingleVariantUnion
45710    {
45711        #[inline]
45712        unsafe fn encode(
45713            self,
45714            encoder: &mut fidl::encoding::Encoder<'_, D>,
45715            offset: usize,
45716            _depth: fidl::encoding::Depth,
45717        ) -> fidl::Result<()> {
45718            encoder.debug_check_bounds::<SingleVariantUnion>(offset);
45719            encoder.write_num::<u64>(self.ordinal(), offset);
45720            match self {
45721                SingleVariantUnion::X(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
45722                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
45723                    encoder,
45724                    offset + 8,
45725                    _depth,
45726                ),
45727            }
45728        }
45729    }
45730
45731    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SingleVariantUnion {
45732        #[inline(always)]
45733        fn new_empty() -> Self {
45734            Self::X(fidl::new_empty!(u32, D))
45735        }
45736
45737        #[inline]
45738        unsafe fn decode(
45739            &mut self,
45740            decoder: &mut fidl::encoding::Decoder<'_, D>,
45741            offset: usize,
45742            mut depth: fidl::encoding::Depth,
45743        ) -> fidl::Result<()> {
45744            decoder.debug_check_bounds::<Self>(offset);
45745            #[allow(unused_variables)]
45746            let next_out_of_line = decoder.next_out_of_line();
45747            let handles_before = decoder.remaining_handles();
45748            let (ordinal, inlined, num_bytes, num_handles) =
45749                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45750
45751            let member_inline_size = match ordinal {
45752                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45753                _ => return Err(fidl::Error::UnknownUnionTag),
45754            };
45755
45756            if inlined != (member_inline_size <= 4) {
45757                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45758            }
45759            let _inner_offset;
45760            if inlined {
45761                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45762                _inner_offset = offset + 8;
45763            } else {
45764                depth.increment()?;
45765                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45766            }
45767            match ordinal {
45768                1 => {
45769                    #[allow(irrefutable_let_patterns)]
45770                    if let SingleVariantUnion::X(_) = self {
45771                        // Do nothing, read the value into the object
45772                    } else {
45773                        // Initialize `self` to the right variant
45774                        *self = SingleVariantUnion::X(fidl::new_empty!(u32, D));
45775                    }
45776                    #[allow(irrefutable_let_patterns)]
45777                    if let SingleVariantUnion::X(ref mut val) = self {
45778                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
45779                    } else {
45780                        unreachable!()
45781                    }
45782                }
45783                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45784            }
45785            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45786                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45787            }
45788            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45789                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45790            }
45791            Ok(())
45792        }
45793    }
45794
45795    impl fidl::encoding::ValueTypeMarker for StringBoolUnion {
45796        type Borrowed<'a> = &'a Self;
45797        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45798            value
45799        }
45800    }
45801
45802    unsafe impl fidl::encoding::TypeMarker for StringBoolUnion {
45803        type Owned = Self;
45804
45805        #[inline(always)]
45806        fn inline_align(_context: fidl::encoding::Context) -> usize {
45807            8
45808        }
45809
45810        #[inline(always)]
45811        fn inline_size(_context: fidl::encoding::Context) -> usize {
45812            16
45813        }
45814    }
45815
45816    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringBoolUnion, D>
45817        for &StringBoolUnion
45818    {
45819        #[inline]
45820        unsafe fn encode(
45821            self,
45822            encoder: &mut fidl::encoding::Encoder<'_, D>,
45823            offset: usize,
45824            _depth: fidl::encoding::Depth,
45825        ) -> fidl::Result<()> {
45826            encoder.debug_check_bounds::<StringBoolUnion>(offset);
45827            encoder.write_num::<u64>(self.ordinal(), offset);
45828            match self {
45829                StringBoolUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
45830                    fidl::encoding::UnboundedString,
45831                    D,
45832                >(
45833                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
45834                        val,
45835                    ),
45836                    encoder,
45837                    offset + 8,
45838                    _depth,
45839                ),
45840                StringBoolUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
45841                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
45842                    encoder,
45843                    offset + 8,
45844                    _depth,
45845                ),
45846            }
45847        }
45848    }
45849
45850    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringBoolUnion {
45851        #[inline(always)]
45852        fn new_empty() -> Self {
45853            Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
45854        }
45855
45856        #[inline]
45857        unsafe fn decode(
45858            &mut self,
45859            decoder: &mut fidl::encoding::Decoder<'_, D>,
45860            offset: usize,
45861            mut depth: fidl::encoding::Depth,
45862        ) -> fidl::Result<()> {
45863            decoder.debug_check_bounds::<Self>(offset);
45864            #[allow(unused_variables)]
45865            let next_out_of_line = decoder.next_out_of_line();
45866            let handles_before = decoder.remaining_handles();
45867            let (ordinal, inlined, num_bytes, num_handles) =
45868                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45869
45870            let member_inline_size = match ordinal {
45871                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
45872                    decoder.context,
45873                ),
45874                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45875                _ => return Err(fidl::Error::UnknownUnionTag),
45876            };
45877
45878            if inlined != (member_inline_size <= 4) {
45879                return Err(fidl::Error::InvalidInlineBitInEnvelope);
45880            }
45881            let _inner_offset;
45882            if inlined {
45883                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45884                _inner_offset = offset + 8;
45885            } else {
45886                depth.increment()?;
45887                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45888            }
45889            match ordinal {
45890                1 => {
45891                    #[allow(irrefutable_let_patterns)]
45892                    if let StringBoolUnion::S(_) = self {
45893                        // Do nothing, read the value into the object
45894                    } else {
45895                        // Initialize `self` to the right variant
45896                        *self = StringBoolUnion::S(fidl::new_empty!(
45897                            fidl::encoding::UnboundedString,
45898                            D
45899                        ));
45900                    }
45901                    #[allow(irrefutable_let_patterns)]
45902                    if let StringBoolUnion::S(ref mut val) = self {
45903                        fidl::decode!(
45904                            fidl::encoding::UnboundedString,
45905                            D,
45906                            val,
45907                            decoder,
45908                            _inner_offset,
45909                            depth
45910                        )?;
45911                    } else {
45912                        unreachable!()
45913                    }
45914                }
45915                2 => {
45916                    #[allow(irrefutable_let_patterns)]
45917                    if let StringBoolUnion::B(_) = self {
45918                        // Do nothing, read the value into the object
45919                    } else {
45920                        // Initialize `self` to the right variant
45921                        *self = StringBoolUnion::B(fidl::new_empty!(bool, D));
45922                    }
45923                    #[allow(irrefutable_let_patterns)]
45924                    if let StringBoolUnion::B(ref mut val) = self {
45925                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
45926                    } else {
45927                        unreachable!()
45928                    }
45929                }
45930                ordinal => panic!("unexpected ordinal {:?}", ordinal),
45931            }
45932            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45933                return Err(fidl::Error::InvalidNumBytesInEnvelope);
45934            }
45935            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45936                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45937            }
45938            Ok(())
45939        }
45940    }
45941
45942    impl fidl::encoding::ValueTypeMarker for StringUnion {
45943        type Borrowed<'a> = &'a Self;
45944        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45945            value
45946        }
45947    }
45948
45949    unsafe impl fidl::encoding::TypeMarker for StringUnion {
45950        type Owned = Self;
45951
45952        #[inline(always)]
45953        fn inline_align(_context: fidl::encoding::Context) -> usize {
45954            8
45955        }
45956
45957        #[inline(always)]
45958        fn inline_size(_context: fidl::encoding::Context) -> usize {
45959            16
45960        }
45961    }
45962
45963    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnion, D>
45964        for &StringUnion
45965    {
45966        #[inline]
45967        unsafe fn encode(
45968            self,
45969            encoder: &mut fidl::encoding::Encoder<'_, D>,
45970            offset: usize,
45971            _depth: fidl::encoding::Depth,
45972        ) -> fidl::Result<()> {
45973            encoder.debug_check_bounds::<StringUnion>(offset);
45974            encoder.write_num::<u64>(self.ordinal(), offset);
45975            match self {
45976                StringUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45977                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45978                    encoder,
45979                    offset + 8,
45980                    _depth,
45981                ),
45982                StringUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
45983                    fidl::encoding::UnboundedString,
45984                    D,
45985                >(
45986                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
45987                        val,
45988                    ),
45989                    encoder,
45990                    offset + 8,
45991                    _depth,
45992                ),
45993                StringUnion::U8(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45994                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45995                    encoder,
45996                    offset + 8,
45997                    _depth,
45998                ),
45999            }
46000        }
46001    }
46002
46003    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnion {
46004        #[inline(always)]
46005        fn new_empty() -> Self {
46006            Self::Unused(fidl::new_empty!(u8, D))
46007        }
46008
46009        #[inline]
46010        unsafe fn decode(
46011            &mut self,
46012            decoder: &mut fidl::encoding::Decoder<'_, D>,
46013            offset: usize,
46014            mut depth: fidl::encoding::Depth,
46015        ) -> fidl::Result<()> {
46016            decoder.debug_check_bounds::<Self>(offset);
46017            #[allow(unused_variables)]
46018            let next_out_of_line = decoder.next_out_of_line();
46019            let handles_before = decoder.remaining_handles();
46020            let (ordinal, inlined, num_bytes, num_handles) =
46021                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46022
46023            let member_inline_size = match ordinal {
46024                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46025                2 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
46026                    decoder.context,
46027                ),
46028                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46029                _ => return Err(fidl::Error::UnknownUnionTag),
46030            };
46031
46032            if inlined != (member_inline_size <= 4) {
46033                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46034            }
46035            let _inner_offset;
46036            if inlined {
46037                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46038                _inner_offset = offset + 8;
46039            } else {
46040                depth.increment()?;
46041                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46042            }
46043            match ordinal {
46044                1 => {
46045                    #[allow(irrefutable_let_patterns)]
46046                    if let StringUnion::Unused(_) = self {
46047                        // Do nothing, read the value into the object
46048                    } else {
46049                        // Initialize `self` to the right variant
46050                        *self = StringUnion::Unused(fidl::new_empty!(u8, D));
46051                    }
46052                    #[allow(irrefutable_let_patterns)]
46053                    if let StringUnion::Unused(ref mut val) = self {
46054                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46055                    } else {
46056                        unreachable!()
46057                    }
46058                }
46059                2 => {
46060                    #[allow(irrefutable_let_patterns)]
46061                    if let StringUnion::S(_) = self {
46062                        // Do nothing, read the value into the object
46063                    } else {
46064                        // Initialize `self` to the right variant
46065                        *self =
46066                            StringUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
46067                    }
46068                    #[allow(irrefutable_let_patterns)]
46069                    if let StringUnion::S(ref mut val) = self {
46070                        fidl::decode!(
46071                            fidl::encoding::UnboundedString,
46072                            D,
46073                            val,
46074                            decoder,
46075                            _inner_offset,
46076                            depth
46077                        )?;
46078                    } else {
46079                        unreachable!()
46080                    }
46081                }
46082                3 => {
46083                    #[allow(irrefutable_let_patterns)]
46084                    if let StringUnion::U8(_) = self {
46085                        // Do nothing, read the value into the object
46086                    } else {
46087                        // Initialize `self` to the right variant
46088                        *self = StringUnion::U8(fidl::new_empty!(u8, D));
46089                    }
46090                    #[allow(irrefutable_let_patterns)]
46091                    if let StringUnion::U8(ref mut val) = self {
46092                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46093                    } else {
46094                        unreachable!()
46095                    }
46096                }
46097                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46098            }
46099            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46100                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46101            }
46102            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46103                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46104            }
46105            Ok(())
46106        }
46107    }
46108
46109    impl fidl::encoding::ValueTypeMarker for Uint8Union {
46110        type Borrowed<'a> = &'a Self;
46111        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46112            value
46113        }
46114    }
46115
46116    unsafe impl fidl::encoding::TypeMarker for Uint8Union {
46117        type Owned = Self;
46118
46119        #[inline(always)]
46120        fn inline_align(_context: fidl::encoding::Context) -> usize {
46121            8
46122        }
46123
46124        #[inline(always)]
46125        fn inline_size(_context: fidl::encoding::Context) -> usize {
46126            16
46127        }
46128    }
46129
46130    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Union, D>
46131        for &Uint8Union
46132    {
46133        #[inline]
46134        unsafe fn encode(
46135            self,
46136            encoder: &mut fidl::encoding::Encoder<'_, D>,
46137            offset: usize,
46138            _depth: fidl::encoding::Depth,
46139        ) -> fidl::Result<()> {
46140            encoder.debug_check_bounds::<Uint8Union>(offset);
46141            encoder.write_num::<u64>(self.ordinal(), offset);
46142            match self {
46143                Uint8Union::Uint8Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46144                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46145                    encoder,
46146                    offset + 8,
46147                    _depth,
46148                ),
46149                Uint8Union::EmptyStruct(ref val) => {
46150                    fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
46151                        <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
46152                        encoder,
46153                        offset + 8,
46154                        _depth,
46155                    )
46156                }
46157            }
46158        }
46159    }
46160
46161    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Union {
46162        #[inline(always)]
46163        fn new_empty() -> Self {
46164            Self::Uint8Value(fidl::new_empty!(u8, D))
46165        }
46166
46167        #[inline]
46168        unsafe fn decode(
46169            &mut self,
46170            decoder: &mut fidl::encoding::Decoder<'_, D>,
46171            offset: usize,
46172            mut depth: fidl::encoding::Depth,
46173        ) -> fidl::Result<()> {
46174            decoder.debug_check_bounds::<Self>(offset);
46175            #[allow(unused_variables)]
46176            let next_out_of_line = decoder.next_out_of_line();
46177            let handles_before = decoder.remaining_handles();
46178            let (ordinal, inlined, num_bytes, num_handles) =
46179                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46180
46181            let member_inline_size = match ordinal {
46182                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46183                2 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46184                _ => return Err(fidl::Error::UnknownUnionTag),
46185            };
46186
46187            if inlined != (member_inline_size <= 4) {
46188                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46189            }
46190            let _inner_offset;
46191            if inlined {
46192                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46193                _inner_offset = offset + 8;
46194            } else {
46195                depth.increment()?;
46196                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46197            }
46198            match ordinal {
46199                1 => {
46200                    #[allow(irrefutable_let_patterns)]
46201                    if let Uint8Union::Uint8Value(_) = self {
46202                        // Do nothing, read the value into the object
46203                    } else {
46204                        // Initialize `self` to the right variant
46205                        *self = Uint8Union::Uint8Value(fidl::new_empty!(u8, D));
46206                    }
46207                    #[allow(irrefutable_let_patterns)]
46208                    if let Uint8Union::Uint8Value(ref mut val) = self {
46209                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46210                    } else {
46211                        unreachable!()
46212                    }
46213                }
46214                2 => {
46215                    #[allow(irrefutable_let_patterns)]
46216                    if let Uint8Union::EmptyStruct(_) = self {
46217                        // Do nothing, read the value into the object
46218                    } else {
46219                        // Initialize `self` to the right variant
46220                        *self = Uint8Union::EmptyStruct(fidl::new_empty!(EmptyStruct, D));
46221                    }
46222                    #[allow(irrefutable_let_patterns)]
46223                    if let Uint8Union::EmptyStruct(ref mut val) = self {
46224                        fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
46225                    } else {
46226                        unreachable!()
46227                    }
46228                }
46229                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46230            }
46231            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46232                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46233            }
46234            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46235                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46236            }
46237            Ok(())
46238        }
46239    }
46240
46241    impl fidl::encoding::ValueTypeMarker for UnionAtTheBottom {
46242        type Borrowed<'a> = &'a Self;
46243        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46244            value
46245        }
46246    }
46247
46248    unsafe impl fidl::encoding::TypeMarker for UnionAtTheBottom {
46249        type Owned = Self;
46250
46251        #[inline(always)]
46252        fn inline_align(_context: fidl::encoding::Context) -> usize {
46253            8
46254        }
46255
46256        #[inline(always)]
46257        fn inline_size(_context: fidl::encoding::Context) -> usize {
46258            16
46259        }
46260    }
46261
46262    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionAtTheBottom, D>
46263        for &UnionAtTheBottom
46264    {
46265        #[inline]
46266        unsafe fn encode(
46267            self,
46268            encoder: &mut fidl::encoding::Encoder<'_, D>,
46269            offset: usize,
46270            _depth: fidl::encoding::Depth,
46271        ) -> fidl::Result<()> {
46272            encoder.debug_check_bounds::<UnionAtTheBottom>(offset);
46273            encoder.write_num::<u64>(self.ordinal(), offset);
46274            match self {
46275                UnionAtTheBottom::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46276                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46277                    encoder,
46278                    offset + 8,
46279                    _depth,
46280                ),
46281                UnionAtTheBottom::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46282                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46283                    encoder,
46284                    offset + 8,
46285                    _depth,
46286                ),
46287                UnionAtTheBottom::Tiny(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46288                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46289                    encoder,
46290                    offset + 8,
46291                    _depth,
46292                ),
46293            }
46294        }
46295    }
46296
46297    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionAtTheBottom {
46298        #[inline(always)]
46299        fn new_empty() -> Self {
46300            Self::Unused1(fidl::new_empty!(u8, D))
46301        }
46302
46303        #[inline]
46304        unsafe fn decode(
46305            &mut self,
46306            decoder: &mut fidl::encoding::Decoder<'_, D>,
46307            offset: usize,
46308            mut depth: fidl::encoding::Depth,
46309        ) -> fidl::Result<()> {
46310            decoder.debug_check_bounds::<Self>(offset);
46311            #[allow(unused_variables)]
46312            let next_out_of_line = decoder.next_out_of_line();
46313            let handles_before = decoder.remaining_handles();
46314            let (ordinal, inlined, num_bytes, num_handles) =
46315                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46316
46317            let member_inline_size = match ordinal {
46318                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46319                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46320                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46321                _ => return Err(fidl::Error::UnknownUnionTag),
46322            };
46323
46324            if inlined != (member_inline_size <= 4) {
46325                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46326            }
46327            let _inner_offset;
46328            if inlined {
46329                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46330                _inner_offset = offset + 8;
46331            } else {
46332                depth.increment()?;
46333                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46334            }
46335            match ordinal {
46336                1 => {
46337                    #[allow(irrefutable_let_patterns)]
46338                    if let UnionAtTheBottom::Unused1(_) = self {
46339                        // Do nothing, read the value into the object
46340                    } else {
46341                        // Initialize `self` to the right variant
46342                        *self = UnionAtTheBottom::Unused1(fidl::new_empty!(u8, D));
46343                    }
46344                    #[allow(irrefutable_let_patterns)]
46345                    if let UnionAtTheBottom::Unused1(ref mut val) = self {
46346                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46347                    } else {
46348                        unreachable!()
46349                    }
46350                }
46351                2 => {
46352                    #[allow(irrefutable_let_patterns)]
46353                    if let UnionAtTheBottom::Unused2(_) = self {
46354                        // Do nothing, read the value into the object
46355                    } else {
46356                        // Initialize `self` to the right variant
46357                        *self = UnionAtTheBottom::Unused2(fidl::new_empty!(u8, D));
46358                    }
46359                    #[allow(irrefutable_let_patterns)]
46360                    if let UnionAtTheBottom::Unused2(ref mut val) = self {
46361                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46362                    } else {
46363                        unreachable!()
46364                    }
46365                }
46366                3 => {
46367                    #[allow(irrefutable_let_patterns)]
46368                    if let UnionAtTheBottom::Tiny(_) = self {
46369                        // Do nothing, read the value into the object
46370                    } else {
46371                        // Initialize `self` to the right variant
46372                        *self = UnionAtTheBottom::Tiny(fidl::new_empty!(u8, D));
46373                    }
46374                    #[allow(irrefutable_let_patterns)]
46375                    if let UnionAtTheBottom::Tiny(ref mut val) = self {
46376                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46377                    } else {
46378                        unreachable!()
46379                    }
46380                }
46381                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46382            }
46383            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46384                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46385            }
46386            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46387                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46388            }
46389            Ok(())
46390        }
46391    }
46392
46393    impl fidl::encoding::ValueTypeMarker for UnionInlinePadding {
46394        type Borrowed<'a> = &'a Self;
46395        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46396            value
46397        }
46398    }
46399
46400    unsafe impl fidl::encoding::TypeMarker for UnionInlinePadding {
46401        type Owned = Self;
46402
46403        #[inline(always)]
46404        fn inline_align(_context: fidl::encoding::Context) -> usize {
46405            8
46406        }
46407
46408        #[inline(always)]
46409        fn inline_size(_context: fidl::encoding::Context) -> usize {
46410            16
46411        }
46412    }
46413
46414    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionInlinePadding, D>
46415        for &UnionInlinePadding
46416    {
46417        #[inline]
46418        unsafe fn encode(
46419            self,
46420            encoder: &mut fidl::encoding::Encoder<'_, D>,
46421            offset: usize,
46422            _depth: fidl::encoding::Depth,
46423        ) -> fidl::Result<()> {
46424            encoder.debug_check_bounds::<UnionInlinePadding>(offset);
46425            encoder.write_num::<u64>(self.ordinal(), offset);
46426            match self {
46427                UnionInlinePadding::ThreePaddingBytes(ref val) => {
46428                    fidl::encoding::encode_in_envelope::<u8, D>(
46429                        <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46430                        encoder,
46431                        offset + 8,
46432                        _depth,
46433                    )
46434                }
46435                UnionInlinePadding::TwoPaddingBytes(ref val) => {
46436                    fidl::encoding::encode_in_envelope::<u16, D>(
46437                        <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
46438                        encoder,
46439                        offset + 8,
46440                        _depth,
46441                    )
46442                }
46443                UnionInlinePadding::OnePaddingByte(ref val) => {
46444                    fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u8, 3>, D>(
46445                        <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(
46446                            val,
46447                        ),
46448                        encoder,
46449                        offset + 8,
46450                        _depth,
46451                    )
46452                }
46453            }
46454        }
46455    }
46456
46457    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionInlinePadding {
46458        #[inline(always)]
46459        fn new_empty() -> Self {
46460            Self::ThreePaddingBytes(fidl::new_empty!(u8, D))
46461        }
46462
46463        #[inline]
46464        unsafe fn decode(
46465            &mut self,
46466            decoder: &mut fidl::encoding::Decoder<'_, D>,
46467            offset: usize,
46468            mut depth: fidl::encoding::Depth,
46469        ) -> fidl::Result<()> {
46470            decoder.debug_check_bounds::<Self>(offset);
46471            #[allow(unused_variables)]
46472            let next_out_of_line = decoder.next_out_of_line();
46473            let handles_before = decoder.remaining_handles();
46474            let (ordinal, inlined, num_bytes, num_handles) =
46475                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46476
46477            let member_inline_size = match ordinal {
46478                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46479                2 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46480                3 => <fidl::encoding::Array<u8, 3> as fidl::encoding::TypeMarker>::inline_size(
46481                    decoder.context,
46482                ),
46483                _ => return Err(fidl::Error::UnknownUnionTag),
46484            };
46485
46486            if inlined != (member_inline_size <= 4) {
46487                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46488            }
46489            let _inner_offset;
46490            if inlined {
46491                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46492                _inner_offset = offset + 8;
46493            } else {
46494                depth.increment()?;
46495                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46496            }
46497            match ordinal {
46498                1 => {
46499                    #[allow(irrefutable_let_patterns)]
46500                    if let UnionInlinePadding::ThreePaddingBytes(_) = self {
46501                        // Do nothing, read the value into the object
46502                    } else {
46503                        // Initialize `self` to the right variant
46504                        *self = UnionInlinePadding::ThreePaddingBytes(fidl::new_empty!(u8, D));
46505                    }
46506                    #[allow(irrefutable_let_patterns)]
46507                    if let UnionInlinePadding::ThreePaddingBytes(ref mut val) = self {
46508                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46509                    } else {
46510                        unreachable!()
46511                    }
46512                }
46513                2 => {
46514                    #[allow(irrefutable_let_patterns)]
46515                    if let UnionInlinePadding::TwoPaddingBytes(_) = self {
46516                        // Do nothing, read the value into the object
46517                    } else {
46518                        // Initialize `self` to the right variant
46519                        *self = UnionInlinePadding::TwoPaddingBytes(fidl::new_empty!(u16, D));
46520                    }
46521                    #[allow(irrefutable_let_patterns)]
46522                    if let UnionInlinePadding::TwoPaddingBytes(ref mut val) = self {
46523                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
46524                    } else {
46525                        unreachable!()
46526                    }
46527                }
46528                3 => {
46529                    #[allow(irrefutable_let_patterns)]
46530                    if let UnionInlinePadding::OnePaddingByte(_) = self {
46531                        // Do nothing, read the value into the object
46532                    } else {
46533                        // Initialize `self` to the right variant
46534                        *self = UnionInlinePadding::OnePaddingByte(
46535                            fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
46536                        );
46537                    }
46538                    #[allow(irrefutable_let_patterns)]
46539                    if let UnionInlinePadding::OnePaddingByte(ref mut val) = self {
46540                        fidl::decode!(fidl::encoding::Array<u8, 3>, D, val, decoder, _inner_offset, depth)?;
46541                    } else {
46542                        unreachable!()
46543                    }
46544                }
46545                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46546            }
46547            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46548                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46549            }
46550            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46551                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46552            }
46553            Ok(())
46554        }
46555    }
46556
46557    impl fidl::encoding::ValueTypeMarker for UnionOfTable {
46558        type Borrowed<'a> = &'a Self;
46559        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46560            value
46561        }
46562    }
46563
46564    unsafe impl fidl::encoding::TypeMarker for UnionOfTable {
46565        type Owned = Self;
46566
46567        #[inline(always)]
46568        fn inline_align(_context: fidl::encoding::Context) -> usize {
46569            8
46570        }
46571
46572        #[inline(always)]
46573        fn inline_size(_context: fidl::encoding::Context) -> usize {
46574            16
46575        }
46576    }
46577
46578    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfTable, D>
46579        for &UnionOfTable
46580    {
46581        #[inline]
46582        unsafe fn encode(
46583            self,
46584            encoder: &mut fidl::encoding::Encoder<'_, D>,
46585            offset: usize,
46586            _depth: fidl::encoding::Depth,
46587        ) -> fidl::Result<()> {
46588            encoder.debug_check_bounds::<UnionOfTable>(offset);
46589            encoder.write_num::<u64>(self.ordinal(), offset);
46590            match self {
46591                UnionOfTable::T(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
46592                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
46593                    encoder,
46594                    offset + 8,
46595                    _depth,
46596                ),
46597            }
46598        }
46599    }
46600
46601    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfTable {
46602        #[inline(always)]
46603        fn new_empty() -> Self {
46604            Self::T(fidl::new_empty!(SimpleTable, D))
46605        }
46606
46607        #[inline]
46608        unsafe fn decode(
46609            &mut self,
46610            decoder: &mut fidl::encoding::Decoder<'_, D>,
46611            offset: usize,
46612            mut depth: fidl::encoding::Depth,
46613        ) -> fidl::Result<()> {
46614            decoder.debug_check_bounds::<Self>(offset);
46615            #[allow(unused_variables)]
46616            let next_out_of_line = decoder.next_out_of_line();
46617            let handles_before = decoder.remaining_handles();
46618            let (ordinal, inlined, num_bytes, num_handles) =
46619                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46620
46621            let member_inline_size = match ordinal {
46622                1 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46623                _ => return Err(fidl::Error::UnknownUnionTag),
46624            };
46625
46626            if inlined != (member_inline_size <= 4) {
46627                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46628            }
46629            let _inner_offset;
46630            if inlined {
46631                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46632                _inner_offset = offset + 8;
46633            } else {
46634                depth.increment()?;
46635                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46636            }
46637            match ordinal {
46638                1 => {
46639                    #[allow(irrefutable_let_patterns)]
46640                    if let UnionOfTable::T(_) = self {
46641                        // Do nothing, read the value into the object
46642                    } else {
46643                        // Initialize `self` to the right variant
46644                        *self = UnionOfTable::T(fidl::new_empty!(SimpleTable, D));
46645                    }
46646                    #[allow(irrefutable_let_patterns)]
46647                    if let UnionOfTable::T(ref mut val) = self {
46648                        fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
46649                    } else {
46650                        unreachable!()
46651                    }
46652                }
46653                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46654            }
46655            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46656                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46657            }
46658            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46659                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46660            }
46661            Ok(())
46662        }
46663    }
46664
46665    impl fidl::encoding::ValueTypeMarker for UnionOfUnion {
46666        type Borrowed<'a> = &'a Self;
46667        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46668            value
46669        }
46670    }
46671
46672    unsafe impl fidl::encoding::TypeMarker for UnionOfUnion {
46673        type Owned = Self;
46674
46675        #[inline(always)]
46676        fn inline_align(_context: fidl::encoding::Context) -> usize {
46677            8
46678        }
46679
46680        #[inline(always)]
46681        fn inline_size(_context: fidl::encoding::Context) -> usize {
46682            16
46683        }
46684    }
46685
46686    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfUnion, D>
46687        for &UnionOfUnion
46688    {
46689        #[inline]
46690        unsafe fn encode(
46691            self,
46692            encoder: &mut fidl::encoding::Encoder<'_, D>,
46693            offset: usize,
46694            _depth: fidl::encoding::Depth,
46695        ) -> fidl::Result<()> {
46696            encoder.debug_check_bounds::<UnionOfUnion>(offset);
46697            encoder.write_num::<u64>(self.ordinal(), offset);
46698            match self {
46699                UnionOfUnion::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46700                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46701                    encoder,
46702                    offset + 8,
46703                    _depth,
46704                ),
46705                UnionOfUnion::Size8align4(ref val) => {
46706                    fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
46707                        <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
46708                        encoder,
46709                        offset + 8,
46710                        _depth,
46711                    )
46712                }
46713                UnionOfUnion::Size12align4(ref val) => {
46714                    fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
46715                        <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
46716                        encoder,
46717                        offset + 8,
46718                        _depth,
46719                    )
46720                }
46721                UnionOfUnion::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46722                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46723                    encoder,
46724                    offset + 8,
46725                    _depth,
46726                ),
46727                UnionOfUnion::Size24align8(ref val) => {
46728                    fidl::encoding::encode_in_envelope::<UnionSize24Align8, D>(
46729                        <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46730                        encoder,
46731                        offset + 8,
46732                        _depth,
46733                    )
46734                }
46735            }
46736        }
46737    }
46738
46739    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfUnion {
46740        #[inline(always)]
46741        fn new_empty() -> Self {
46742            Self::Unused1(fidl::new_empty!(u8, D))
46743        }
46744
46745        #[inline]
46746        unsafe fn decode(
46747            &mut self,
46748            decoder: &mut fidl::encoding::Decoder<'_, D>,
46749            offset: usize,
46750            mut depth: fidl::encoding::Depth,
46751        ) -> fidl::Result<()> {
46752            decoder.debug_check_bounds::<Self>(offset);
46753            #[allow(unused_variables)]
46754            let next_out_of_line = decoder.next_out_of_line();
46755            let handles_before = decoder.remaining_handles();
46756            let (ordinal, inlined, num_bytes, num_handles) =
46757                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46758
46759            let member_inline_size = match ordinal {
46760                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46761                2 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46762                3 => {
46763                    <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
46764                }
46765                4 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46766                5 => {
46767                    <UnionSize24Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
46768                }
46769                _ => return Err(fidl::Error::UnknownUnionTag),
46770            };
46771
46772            if inlined != (member_inline_size <= 4) {
46773                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46774            }
46775            let _inner_offset;
46776            if inlined {
46777                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46778                _inner_offset = offset + 8;
46779            } else {
46780                depth.increment()?;
46781                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46782            }
46783            match ordinal {
46784                1 => {
46785                    #[allow(irrefutable_let_patterns)]
46786                    if let UnionOfUnion::Unused1(_) = self {
46787                        // Do nothing, read the value into the object
46788                    } else {
46789                        // Initialize `self` to the right variant
46790                        *self = UnionOfUnion::Unused1(fidl::new_empty!(u8, D));
46791                    }
46792                    #[allow(irrefutable_let_patterns)]
46793                    if let UnionOfUnion::Unused1(ref mut val) = self {
46794                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46795                    } else {
46796                        unreachable!()
46797                    }
46798                }
46799                2 => {
46800                    #[allow(irrefutable_let_patterns)]
46801                    if let UnionOfUnion::Size8align4(_) = self {
46802                        // Do nothing, read the value into the object
46803                    } else {
46804                        // Initialize `self` to the right variant
46805                        *self = UnionOfUnion::Size8align4(fidl::new_empty!(UnionSize8Align4, D));
46806                    }
46807                    #[allow(irrefutable_let_patterns)]
46808                    if let UnionOfUnion::Size8align4(ref mut val) = self {
46809                        fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
46810                    } else {
46811                        unreachable!()
46812                    }
46813                }
46814                3 => {
46815                    #[allow(irrefutable_let_patterns)]
46816                    if let UnionOfUnion::Size12align4(_) = self {
46817                        // Do nothing, read the value into the object
46818                    } else {
46819                        // Initialize `self` to the right variant
46820                        *self = UnionOfUnion::Size12align4(fidl::new_empty!(UnionSize12Align4, D));
46821                    }
46822                    #[allow(irrefutable_let_patterns)]
46823                    if let UnionOfUnion::Size12align4(ref mut val) = self {
46824                        fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
46825                    } else {
46826                        unreachable!()
46827                    }
46828                }
46829                4 => {
46830                    #[allow(irrefutable_let_patterns)]
46831                    if let UnionOfUnion::Unused2(_) = self {
46832                        // Do nothing, read the value into the object
46833                    } else {
46834                        // Initialize `self` to the right variant
46835                        *self = UnionOfUnion::Unused2(fidl::new_empty!(u8, D));
46836                    }
46837                    #[allow(irrefutable_let_patterns)]
46838                    if let UnionOfUnion::Unused2(ref mut val) = self {
46839                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46840                    } else {
46841                        unreachable!()
46842                    }
46843                }
46844                5 => {
46845                    #[allow(irrefutable_let_patterns)]
46846                    if let UnionOfUnion::Size24align8(_) = self {
46847                        // Do nothing, read the value into the object
46848                    } else {
46849                        // Initialize `self` to the right variant
46850                        *self = UnionOfUnion::Size24align8(fidl::new_empty!(UnionSize24Align8, D));
46851                    }
46852                    #[allow(irrefutable_let_patterns)]
46853                    if let UnionOfUnion::Size24align8(ref mut val) = self {
46854                        fidl::decode!(UnionSize24Align8, D, val, decoder, _inner_offset, depth)?;
46855                    } else {
46856                        unreachable!()
46857                    }
46858                }
46859                ordinal => panic!("unexpected ordinal {:?}", ordinal),
46860            }
46861            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46862                return Err(fidl::Error::InvalidNumBytesInEnvelope);
46863            }
46864            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46865                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46866            }
46867            Ok(())
46868        }
46869    }
46870
46871    impl fidl::encoding::ValueTypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
46872        type Borrowed<'a> = &'a Self;
46873        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46874            value
46875        }
46876    }
46877
46878    unsafe impl fidl::encoding::TypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
46879        type Owned = Self;
46880
46881        #[inline(always)]
46882        fn inline_align(_context: fidl::encoding::Context) -> usize {
46883            8
46884        }
46885
46886        #[inline(always)]
46887        fn inline_size(_context: fidl::encoding::Context) -> usize {
46888            16
46889        }
46890    }
46891
46892    unsafe impl<D: fidl::encoding::ResourceDialect>
46893        fidl::encoding::Encode<UnionOfXUnionThenTableThenXUnionThenUnion, D>
46894        for &UnionOfXUnionThenTableThenXUnionThenUnion
46895    {
46896        #[inline]
46897        unsafe fn encode(
46898            self,
46899            encoder: &mut fidl::encoding::Encoder<'_, D>,
46900            offset: usize,
46901            _depth: fidl::encoding::Depth,
46902        ) -> fidl::Result<()> {
46903            encoder.debug_check_bounds::<UnionOfXUnionThenTableThenXUnionThenUnion>(offset);
46904            encoder.write_num::<u64>(self.ordinal(), offset);
46905            match self {
46906            UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref val) => {
46907                fidl::encoding::encode_in_envelope::<u8, D>(
46908                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46909                    encoder, offset + 8, _depth
46910                )
46911            }
46912            UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref val) => {
46913                fidl::encoding::encode_in_envelope::<XUnionOfTableThenXUnionThenUnion, D>(
46914                    <XUnionOfTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
46915                    encoder, offset + 8, _depth
46916                )
46917            }
46918        }
46919        }
46920    }
46921
46922    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46923        for UnionOfXUnionThenTableThenXUnionThenUnion
46924    {
46925        #[inline(always)]
46926        fn new_empty() -> Self {
46927            Self::Unused1(fidl::new_empty!(u8, D))
46928        }
46929
46930        #[inline]
46931        unsafe fn decode(
46932            &mut self,
46933            decoder: &mut fidl::encoding::Decoder<'_, D>,
46934            offset: usize,
46935            mut depth: fidl::encoding::Depth,
46936        ) -> fidl::Result<()> {
46937            decoder.debug_check_bounds::<Self>(offset);
46938            #[allow(unused_variables)]
46939            let next_out_of_line = decoder.next_out_of_line();
46940            let handles_before = decoder.remaining_handles();
46941            let (ordinal, inlined, num_bytes, num_handles) =
46942                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46943
46944            let member_inline_size = match ordinal {
46945                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46946                3 => <XUnionOfTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
46947                    decoder.context,
46948                ),
46949                _ => return Err(fidl::Error::UnknownUnionTag),
46950            };
46951
46952            if inlined != (member_inline_size <= 4) {
46953                return Err(fidl::Error::InvalidInlineBitInEnvelope);
46954            }
46955            let _inner_offset;
46956            if inlined {
46957                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46958                _inner_offset = offset + 8;
46959            } else {
46960                depth.increment()?;
46961                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46962            }
46963            match ordinal {
46964                1 => {
46965                    #[allow(irrefutable_let_patterns)]
46966                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(_) = self {
46967                        // Do nothing, read the value into the object
46968                    } else {
46969                        // Initialize `self` to the right variant
46970                        *self = UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(
46971                            fidl::new_empty!(u8, D),
46972                        );
46973                    }
46974                    #[allow(irrefutable_let_patterns)]
46975                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref mut val) = self {
46976                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46977                    } else {
46978                        unreachable!()
46979                    }
46980                }
46981                3 => {
46982                    #[allow(irrefutable_let_patterns)]
46983                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(_) = self {
46984                        // Do nothing, read the value into the object
46985                    } else {
46986                        // Initialize `self` to the right variant
46987                        *self = UnionOfXUnionThenTableThenXUnionThenUnion::Variant(
46988                            fidl::new_empty!(XUnionOfTableThenXUnionThenUnion, D),
46989                        );
46990                    }
46991                    #[allow(irrefutable_let_patterns)]
46992                    if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref mut val) = self {
46993                        fidl::decode!(
46994                            XUnionOfTableThenXUnionThenUnion,
46995                            D,
46996                            val,
46997                            decoder,
46998                            _inner_offset,
46999                            depth
47000                        )?;
47001                    } else {
47002                        unreachable!()
47003                    }
47004                }
47005                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47006            }
47007            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47008                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47009            }
47010            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47011                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47012            }
47013            Ok(())
47014        }
47015    }
47016
47017    impl fidl::encoding::ValueTypeMarker for UnionSize12Align4 {
47018        type Borrowed<'a> = &'a Self;
47019        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47020            value
47021        }
47022    }
47023
47024    unsafe impl fidl::encoding::TypeMarker for UnionSize12Align4 {
47025        type Owned = Self;
47026
47027        #[inline(always)]
47028        fn inline_align(_context: fidl::encoding::Context) -> usize {
47029            8
47030        }
47031
47032        #[inline(always)]
47033        fn inline_size(_context: fidl::encoding::Context) -> usize {
47034            16
47035        }
47036    }
47037
47038    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize12Align4, D>
47039        for &UnionSize12Align4
47040    {
47041        #[inline]
47042        unsafe fn encode(
47043            self,
47044            encoder: &mut fidl::encoding::Encoder<'_, D>,
47045            offset: usize,
47046            _depth: fidl::encoding::Depth,
47047        ) -> fidl::Result<()> {
47048            encoder.debug_check_bounds::<UnionSize12Align4>(offset);
47049            encoder.write_num::<u64>(self.ordinal(), offset);
47050            match self {
47051                UnionSize12Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47052                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47053                    encoder,
47054                    offset + 8,
47055                    _depth,
47056                ),
47057                UnionSize12Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47058                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47059                    encoder,
47060                    offset + 8,
47061                    _depth,
47062                ),
47063                UnionSize12Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47064                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47065                    encoder,
47066                    offset + 8,
47067                    _depth,
47068                ),
47069                UnionSize12Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
47070                    fidl::encoding::Array<u8, 6>,
47071                    D,
47072                >(
47073                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
47074                    encoder,
47075                    offset + 8,
47076                    _depth,
47077                ),
47078            }
47079        }
47080    }
47081
47082    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize12Align4 {
47083        #[inline(always)]
47084        fn new_empty() -> Self {
47085            Self::Unused1(fidl::new_empty!(u8, D))
47086        }
47087
47088        #[inline]
47089        unsafe fn decode(
47090            &mut self,
47091            decoder: &mut fidl::encoding::Decoder<'_, D>,
47092            offset: usize,
47093            mut depth: fidl::encoding::Depth,
47094        ) -> fidl::Result<()> {
47095            decoder.debug_check_bounds::<Self>(offset);
47096            #[allow(unused_variables)]
47097            let next_out_of_line = decoder.next_out_of_line();
47098            let handles_before = decoder.remaining_handles();
47099            let (ordinal, inlined, num_bytes, num_handles) =
47100                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47101
47102            let member_inline_size = match ordinal {
47103                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47104                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47105                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47106                4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
47107                    decoder.context,
47108                ),
47109                _ => return Err(fidl::Error::UnknownUnionTag),
47110            };
47111
47112            if inlined != (member_inline_size <= 4) {
47113                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47114            }
47115            let _inner_offset;
47116            if inlined {
47117                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47118                _inner_offset = offset + 8;
47119            } else {
47120                depth.increment()?;
47121                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47122            }
47123            match ordinal {
47124                1 => {
47125                    #[allow(irrefutable_let_patterns)]
47126                    if let UnionSize12Align4::Unused1(_) = self {
47127                        // Do nothing, read the value into the object
47128                    } else {
47129                        // Initialize `self` to the right variant
47130                        *self = UnionSize12Align4::Unused1(fidl::new_empty!(u8, D));
47131                    }
47132                    #[allow(irrefutable_let_patterns)]
47133                    if let UnionSize12Align4::Unused1(ref mut val) = self {
47134                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47135                    } else {
47136                        unreachable!()
47137                    }
47138                }
47139                2 => {
47140                    #[allow(irrefutable_let_patterns)]
47141                    if let UnionSize12Align4::Unused2(_) = self {
47142                        // Do nothing, read the value into the object
47143                    } else {
47144                        // Initialize `self` to the right variant
47145                        *self = UnionSize12Align4::Unused2(fidl::new_empty!(u8, D));
47146                    }
47147                    #[allow(irrefutable_let_patterns)]
47148                    if let UnionSize12Align4::Unused2(ref mut val) = self {
47149                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47150                    } else {
47151                        unreachable!()
47152                    }
47153                }
47154                3 => {
47155                    #[allow(irrefutable_let_patterns)]
47156                    if let UnionSize12Align4::Unused3(_) = self {
47157                        // Do nothing, read the value into the object
47158                    } else {
47159                        // Initialize `self` to the right variant
47160                        *self = UnionSize12Align4::Unused3(fidl::new_empty!(u8, D));
47161                    }
47162                    #[allow(irrefutable_let_patterns)]
47163                    if let UnionSize12Align4::Unused3(ref mut val) = self {
47164                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47165                    } else {
47166                        unreachable!()
47167                    }
47168                }
47169                4 => {
47170                    #[allow(irrefutable_let_patterns)]
47171                    if let UnionSize12Align4::Variant(_) = self {
47172                        // Do nothing, read the value into the object
47173                    } else {
47174                        // Initialize `self` to the right variant
47175                        *self = UnionSize12Align4::Variant(
47176                            fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
47177                        );
47178                    }
47179                    #[allow(irrefutable_let_patterns)]
47180                    if let UnionSize12Align4::Variant(ref mut val) = self {
47181                        fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
47182                    } else {
47183                        unreachable!()
47184                    }
47185                }
47186                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47187            }
47188            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47189                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47190            }
47191            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47192                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47193            }
47194            Ok(())
47195        }
47196    }
47197
47198    impl fidl::encoding::ValueTypeMarker for UnionSize24Align8 {
47199        type Borrowed<'a> = &'a Self;
47200        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47201            value
47202        }
47203    }
47204
47205    unsafe impl fidl::encoding::TypeMarker for UnionSize24Align8 {
47206        type Owned = Self;
47207
47208        #[inline(always)]
47209        fn inline_align(_context: fidl::encoding::Context) -> usize {
47210            8
47211        }
47212
47213        #[inline(always)]
47214        fn inline_size(_context: fidl::encoding::Context) -> usize {
47215            16
47216        }
47217    }
47218
47219    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize24Align8, D>
47220        for &UnionSize24Align8
47221    {
47222        #[inline]
47223        unsafe fn encode(
47224            self,
47225            encoder: &mut fidl::encoding::Encoder<'_, D>,
47226            offset: usize,
47227            _depth: fidl::encoding::Depth,
47228        ) -> fidl::Result<()> {
47229            encoder.debug_check_bounds::<UnionSize24Align8>(offset);
47230            encoder.write_num::<u64>(self.ordinal(), offset);
47231            match self {
47232                UnionSize24Align8::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47233                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47234                    encoder,
47235                    offset + 8,
47236                    _depth,
47237                ),
47238                UnionSize24Align8::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47239                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47240                    encoder,
47241                    offset + 8,
47242                    _depth,
47243                ),
47244                UnionSize24Align8::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47245                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47246                    encoder,
47247                    offset + 8,
47248                    _depth,
47249                ),
47250                UnionSize24Align8::Variant(ref val) => {
47251                    fidl::encoding::encode_in_envelope::<StructSize16Align8, D>(
47252                        <StructSize16Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47253                        encoder,
47254                        offset + 8,
47255                        _depth,
47256                    )
47257                }
47258            }
47259        }
47260    }
47261
47262    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize24Align8 {
47263        #[inline(always)]
47264        fn new_empty() -> Self {
47265            Self::Unused1(fidl::new_empty!(u8, D))
47266        }
47267
47268        #[inline]
47269        unsafe fn decode(
47270            &mut self,
47271            decoder: &mut fidl::encoding::Decoder<'_, D>,
47272            offset: usize,
47273            mut depth: fidl::encoding::Depth,
47274        ) -> fidl::Result<()> {
47275            decoder.debug_check_bounds::<Self>(offset);
47276            #[allow(unused_variables)]
47277            let next_out_of_line = decoder.next_out_of_line();
47278            let handles_before = decoder.remaining_handles();
47279            let (ordinal, inlined, num_bytes, num_handles) =
47280                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47281
47282            let member_inline_size = match ordinal {
47283                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47284                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47285                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47286                4 => {
47287                    <StructSize16Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
47288                }
47289                _ => return Err(fidl::Error::UnknownUnionTag),
47290            };
47291
47292            if inlined != (member_inline_size <= 4) {
47293                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47294            }
47295            let _inner_offset;
47296            if inlined {
47297                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47298                _inner_offset = offset + 8;
47299            } else {
47300                depth.increment()?;
47301                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47302            }
47303            match ordinal {
47304                1 => {
47305                    #[allow(irrefutable_let_patterns)]
47306                    if let UnionSize24Align8::Unused1(_) = self {
47307                        // Do nothing, read the value into the object
47308                    } else {
47309                        // Initialize `self` to the right variant
47310                        *self = UnionSize24Align8::Unused1(fidl::new_empty!(u8, D));
47311                    }
47312                    #[allow(irrefutable_let_patterns)]
47313                    if let UnionSize24Align8::Unused1(ref mut val) = self {
47314                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47315                    } else {
47316                        unreachable!()
47317                    }
47318                }
47319                2 => {
47320                    #[allow(irrefutable_let_patterns)]
47321                    if let UnionSize24Align8::Unused2(_) = self {
47322                        // Do nothing, read the value into the object
47323                    } else {
47324                        // Initialize `self` to the right variant
47325                        *self = UnionSize24Align8::Unused2(fidl::new_empty!(u8, D));
47326                    }
47327                    #[allow(irrefutable_let_patterns)]
47328                    if let UnionSize24Align8::Unused2(ref mut val) = self {
47329                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47330                    } else {
47331                        unreachable!()
47332                    }
47333                }
47334                3 => {
47335                    #[allow(irrefutable_let_patterns)]
47336                    if let UnionSize24Align8::Unused3(_) = self {
47337                        // Do nothing, read the value into the object
47338                    } else {
47339                        // Initialize `self` to the right variant
47340                        *self = UnionSize24Align8::Unused3(fidl::new_empty!(u8, D));
47341                    }
47342                    #[allow(irrefutable_let_patterns)]
47343                    if let UnionSize24Align8::Unused3(ref mut val) = self {
47344                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47345                    } else {
47346                        unreachable!()
47347                    }
47348                }
47349                4 => {
47350                    #[allow(irrefutable_let_patterns)]
47351                    if let UnionSize24Align8::Variant(_) = self {
47352                        // Do nothing, read the value into the object
47353                    } else {
47354                        // Initialize `self` to the right variant
47355                        *self = UnionSize24Align8::Variant(fidl::new_empty!(StructSize16Align8, D));
47356                    }
47357                    #[allow(irrefutable_let_patterns)]
47358                    if let UnionSize24Align8::Variant(ref mut val) = self {
47359                        fidl::decode!(StructSize16Align8, D, val, decoder, _inner_offset, depth)?;
47360                    } else {
47361                        unreachable!()
47362                    }
47363                }
47364                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47365            }
47366            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47367                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47368            }
47369            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47370                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47371            }
47372            Ok(())
47373        }
47374    }
47375
47376    impl fidl::encoding::ValueTypeMarker for UnionSize36Align4 {
47377        type Borrowed<'a> = &'a Self;
47378        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47379            value
47380        }
47381    }
47382
47383    unsafe impl fidl::encoding::TypeMarker for UnionSize36Align4 {
47384        type Owned = Self;
47385
47386        #[inline(always)]
47387        fn inline_align(_context: fidl::encoding::Context) -> usize {
47388            8
47389        }
47390
47391        #[inline(always)]
47392        fn inline_size(_context: fidl::encoding::Context) -> usize {
47393            16
47394        }
47395    }
47396
47397    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize36Align4, D>
47398        for &UnionSize36Align4
47399    {
47400        #[inline]
47401        unsafe fn encode(
47402            self,
47403            encoder: &mut fidl::encoding::Encoder<'_, D>,
47404            offset: usize,
47405            _depth: fidl::encoding::Depth,
47406        ) -> fidl::Result<()> {
47407            encoder.debug_check_bounds::<UnionSize36Align4>(offset);
47408            encoder.write_num::<u64>(self.ordinal(), offset);
47409            match self {
47410                UnionSize36Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47411                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47412                    encoder,
47413                    offset + 8,
47414                    _depth,
47415                ),
47416                UnionSize36Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47417                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47418                    encoder,
47419                    offset + 8,
47420                    _depth,
47421                ),
47422                UnionSize36Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47423                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47424                    encoder,
47425                    offset + 8,
47426                    _depth,
47427                ),
47428                UnionSize36Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
47429                    fidl::encoding::Array<u8, 32>,
47430                    D,
47431                >(
47432                    <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(val),
47433                    encoder,
47434                    offset + 8,
47435                    _depth,
47436                ),
47437            }
47438        }
47439    }
47440
47441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize36Align4 {
47442        #[inline(always)]
47443        fn new_empty() -> Self {
47444            Self::Unused1(fidl::new_empty!(u8, D))
47445        }
47446
47447        #[inline]
47448        unsafe fn decode(
47449            &mut self,
47450            decoder: &mut fidl::encoding::Decoder<'_, D>,
47451            offset: usize,
47452            mut depth: fidl::encoding::Depth,
47453        ) -> fidl::Result<()> {
47454            decoder.debug_check_bounds::<Self>(offset);
47455            #[allow(unused_variables)]
47456            let next_out_of_line = decoder.next_out_of_line();
47457            let handles_before = decoder.remaining_handles();
47458            let (ordinal, inlined, num_bytes, num_handles) =
47459                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47460
47461            let member_inline_size = match ordinal {
47462                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47463                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47464                3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47465                4 => <fidl::encoding::Array<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
47466                    decoder.context,
47467                ),
47468                _ => return Err(fidl::Error::UnknownUnionTag),
47469            };
47470
47471            if inlined != (member_inline_size <= 4) {
47472                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47473            }
47474            let _inner_offset;
47475            if inlined {
47476                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47477                _inner_offset = offset + 8;
47478            } else {
47479                depth.increment()?;
47480                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47481            }
47482            match ordinal {
47483                1 => {
47484                    #[allow(irrefutable_let_patterns)]
47485                    if let UnionSize36Align4::Unused1(_) = self {
47486                        // Do nothing, read the value into the object
47487                    } else {
47488                        // Initialize `self` to the right variant
47489                        *self = UnionSize36Align4::Unused1(fidl::new_empty!(u8, D));
47490                    }
47491                    #[allow(irrefutable_let_patterns)]
47492                    if let UnionSize36Align4::Unused1(ref mut val) = self {
47493                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47494                    } else {
47495                        unreachable!()
47496                    }
47497                }
47498                2 => {
47499                    #[allow(irrefutable_let_patterns)]
47500                    if let UnionSize36Align4::Unused2(_) = self {
47501                        // Do nothing, read the value into the object
47502                    } else {
47503                        // Initialize `self` to the right variant
47504                        *self = UnionSize36Align4::Unused2(fidl::new_empty!(u8, D));
47505                    }
47506                    #[allow(irrefutable_let_patterns)]
47507                    if let UnionSize36Align4::Unused2(ref mut val) = self {
47508                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47509                    } else {
47510                        unreachable!()
47511                    }
47512                }
47513                3 => {
47514                    #[allow(irrefutable_let_patterns)]
47515                    if let UnionSize36Align4::Unused3(_) = self {
47516                        // Do nothing, read the value into the object
47517                    } else {
47518                        // Initialize `self` to the right variant
47519                        *self = UnionSize36Align4::Unused3(fidl::new_empty!(u8, D));
47520                    }
47521                    #[allow(irrefutable_let_patterns)]
47522                    if let UnionSize36Align4::Unused3(ref mut val) = self {
47523                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47524                    } else {
47525                        unreachable!()
47526                    }
47527                }
47528                4 => {
47529                    #[allow(irrefutable_let_patterns)]
47530                    if let UnionSize36Align4::Variant(_) = self {
47531                        // Do nothing, read the value into the object
47532                    } else {
47533                        // Initialize `self` to the right variant
47534                        *self = UnionSize36Align4::Variant(
47535                            fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
47536                        );
47537                    }
47538                    #[allow(irrefutable_let_patterns)]
47539                    if let UnionSize36Align4::Variant(ref mut val) = self {
47540                        fidl::decode!(fidl::encoding::Array<u8, 32>, D, val, decoder, _inner_offset, depth)?;
47541                    } else {
47542                        unreachable!()
47543                    }
47544                }
47545                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47546            }
47547            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47548                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47549            }
47550            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47551                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47552            }
47553            Ok(())
47554        }
47555    }
47556
47557    impl fidl::encoding::ValueTypeMarker for UnionSize8Align4 {
47558        type Borrowed<'a> = &'a Self;
47559        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47560            value
47561        }
47562    }
47563
47564    unsafe impl fidl::encoding::TypeMarker for UnionSize8Align4 {
47565        type Owned = Self;
47566
47567        #[inline(always)]
47568        fn inline_align(_context: fidl::encoding::Context) -> usize {
47569            8
47570        }
47571
47572        #[inline(always)]
47573        fn inline_size(_context: fidl::encoding::Context) -> usize {
47574            16
47575        }
47576    }
47577
47578    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize8Align4, D>
47579        for &UnionSize8Align4
47580    {
47581        #[inline]
47582        unsafe fn encode(
47583            self,
47584            encoder: &mut fidl::encoding::Encoder<'_, D>,
47585            offset: usize,
47586            _depth: fidl::encoding::Depth,
47587        ) -> fidl::Result<()> {
47588            encoder.debug_check_bounds::<UnionSize8Align4>(offset);
47589            encoder.write_num::<u64>(self.ordinal(), offset);
47590            match self {
47591                UnionSize8Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47592                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47593                    encoder,
47594                    offset + 8,
47595                    _depth,
47596                ),
47597                UnionSize8Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
47598                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
47599                    encoder,
47600                    offset + 8,
47601                    _depth,
47602                ),
47603                UnionSize8Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
47604                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
47605                    encoder,
47606                    offset + 8,
47607                    _depth,
47608                ),
47609            }
47610        }
47611    }
47612
47613    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize8Align4 {
47614        #[inline(always)]
47615        fn new_empty() -> Self {
47616            Self::Unused1(fidl::new_empty!(u8, D))
47617        }
47618
47619        #[inline]
47620        unsafe fn decode(
47621            &mut self,
47622            decoder: &mut fidl::encoding::Decoder<'_, D>,
47623            offset: usize,
47624            mut depth: fidl::encoding::Depth,
47625        ) -> fidl::Result<()> {
47626            decoder.debug_check_bounds::<Self>(offset);
47627            #[allow(unused_variables)]
47628            let next_out_of_line = decoder.next_out_of_line();
47629            let handles_before = decoder.remaining_handles();
47630            let (ordinal, inlined, num_bytes, num_handles) =
47631                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47632
47633            let member_inline_size = match ordinal {
47634                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47635                2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47636                3 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47637                _ => return Err(fidl::Error::UnknownUnionTag),
47638            };
47639
47640            if inlined != (member_inline_size <= 4) {
47641                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47642            }
47643            let _inner_offset;
47644            if inlined {
47645                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47646                _inner_offset = offset + 8;
47647            } else {
47648                depth.increment()?;
47649                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47650            }
47651            match ordinal {
47652                1 => {
47653                    #[allow(irrefutable_let_patterns)]
47654                    if let UnionSize8Align4::Unused1(_) = self {
47655                        // Do nothing, read the value into the object
47656                    } else {
47657                        // Initialize `self` to the right variant
47658                        *self = UnionSize8Align4::Unused1(fidl::new_empty!(u8, D));
47659                    }
47660                    #[allow(irrefutable_let_patterns)]
47661                    if let UnionSize8Align4::Unused1(ref mut val) = self {
47662                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47663                    } else {
47664                        unreachable!()
47665                    }
47666                }
47667                2 => {
47668                    #[allow(irrefutable_let_patterns)]
47669                    if let UnionSize8Align4::Unused2(_) = self {
47670                        // Do nothing, read the value into the object
47671                    } else {
47672                        // Initialize `self` to the right variant
47673                        *self = UnionSize8Align4::Unused2(fidl::new_empty!(u8, D));
47674                    }
47675                    #[allow(irrefutable_let_patterns)]
47676                    if let UnionSize8Align4::Unused2(ref mut val) = self {
47677                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
47678                    } else {
47679                        unreachable!()
47680                    }
47681                }
47682                3 => {
47683                    #[allow(irrefutable_let_patterns)]
47684                    if let UnionSize8Align4::Variant(_) = self {
47685                        // Do nothing, read the value into the object
47686                    } else {
47687                        // Initialize `self` to the right variant
47688                        *self = UnionSize8Align4::Variant(fidl::new_empty!(u32, D));
47689                    }
47690                    #[allow(irrefutable_let_patterns)]
47691                    if let UnionSize8Align4::Variant(ref mut val) = self {
47692                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
47693                    } else {
47694                        unreachable!()
47695                    }
47696                }
47697                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47698            }
47699            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47700                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47701            }
47702            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47703                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47704            }
47705            Ok(())
47706        }
47707    }
47708
47709    impl fidl::encoding::ValueTypeMarker for UnionWithBoundString {
47710        type Borrowed<'a> = &'a Self;
47711        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47712            value
47713        }
47714    }
47715
47716    unsafe impl fidl::encoding::TypeMarker for UnionWithBoundString {
47717        type Owned = Self;
47718
47719        #[inline(always)]
47720        fn inline_align(_context: fidl::encoding::Context) -> usize {
47721            8
47722        }
47723
47724        #[inline(always)]
47725        fn inline_size(_context: fidl::encoding::Context) -> usize {
47726            16
47727        }
47728    }
47729
47730    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithBoundString, D>
47731        for &UnionWithBoundString
47732    {
47733        #[inline]
47734        unsafe fn encode(
47735            self,
47736            encoder: &mut fidl::encoding::Encoder<'_, D>,
47737            offset: usize,
47738            _depth: fidl::encoding::Depth,
47739        ) -> fidl::Result<()> {
47740            encoder.debug_check_bounds::<UnionWithBoundString>(offset);
47741            encoder.write_num::<u64>(self.ordinal(), offset);
47742            match self {
47743                UnionWithBoundString::BoundFiveStr(ref val) => fidl::encoding::encode_in_envelope::<
47744                    fidl::encoding::BoundedString<5>,
47745                    D,
47746                >(
47747                    <fidl::encoding::BoundedString<5> as fidl::encoding::ValueTypeMarker>::borrow(
47748                        val,
47749                    ),
47750                    encoder,
47751                    offset + 8,
47752                    _depth,
47753                ),
47754            }
47755        }
47756    }
47757
47758    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithBoundString {
47759        #[inline(always)]
47760        fn new_empty() -> Self {
47761            Self::BoundFiveStr(fidl::new_empty!(fidl::encoding::BoundedString<5>, D))
47762        }
47763
47764        #[inline]
47765        unsafe fn decode(
47766            &mut self,
47767            decoder: &mut fidl::encoding::Decoder<'_, D>,
47768            offset: usize,
47769            mut depth: fidl::encoding::Depth,
47770        ) -> fidl::Result<()> {
47771            decoder.debug_check_bounds::<Self>(offset);
47772            #[allow(unused_variables)]
47773            let next_out_of_line = decoder.next_out_of_line();
47774            let handles_before = decoder.remaining_handles();
47775            let (ordinal, inlined, num_bytes, num_handles) =
47776                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47777
47778            let member_inline_size = match ordinal {
47779                1 => <fidl::encoding::BoundedString<5> as fidl::encoding::TypeMarker>::inline_size(
47780                    decoder.context,
47781                ),
47782                _ => return Err(fidl::Error::UnknownUnionTag),
47783            };
47784
47785            if inlined != (member_inline_size <= 4) {
47786                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47787            }
47788            let _inner_offset;
47789            if inlined {
47790                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47791                _inner_offset = offset + 8;
47792            } else {
47793                depth.increment()?;
47794                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47795            }
47796            match ordinal {
47797                1 => {
47798                    #[allow(irrefutable_let_patterns)]
47799                    if let UnionWithBoundString::BoundFiveStr(_) = self {
47800                        // Do nothing, read the value into the object
47801                    } else {
47802                        // Initialize `self` to the right variant
47803                        *self = UnionWithBoundString::BoundFiveStr(fidl::new_empty!(
47804                            fidl::encoding::BoundedString<5>,
47805                            D
47806                        ));
47807                    }
47808                    #[allow(irrefutable_let_patterns)]
47809                    if let UnionWithBoundString::BoundFiveStr(ref mut val) = self {
47810                        fidl::decode!(
47811                            fidl::encoding::BoundedString<5>,
47812                            D,
47813                            val,
47814                            decoder,
47815                            _inner_offset,
47816                            depth
47817                        )?;
47818                    } else {
47819                        unreachable!()
47820                    }
47821                }
47822                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47823            }
47824            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47825                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47826            }
47827            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47828                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47829            }
47830            Ok(())
47831        }
47832    }
47833
47834    impl fidl::encoding::ValueTypeMarker for UnionWithEmptyStruct {
47835        type Borrowed<'a> = &'a Self;
47836        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47837            value
47838        }
47839    }
47840
47841    unsafe impl fidl::encoding::TypeMarker for UnionWithEmptyStruct {
47842        type Owned = Self;
47843
47844        #[inline(always)]
47845        fn inline_align(_context: fidl::encoding::Context) -> usize {
47846            8
47847        }
47848
47849        #[inline(always)]
47850        fn inline_size(_context: fidl::encoding::Context) -> usize {
47851            16
47852        }
47853    }
47854
47855    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithEmptyStruct, D>
47856        for &UnionWithEmptyStruct
47857    {
47858        #[inline]
47859        unsafe fn encode(
47860            self,
47861            encoder: &mut fidl::encoding::Encoder<'_, D>,
47862            offset: usize,
47863            _depth: fidl::encoding::Depth,
47864        ) -> fidl::Result<()> {
47865            encoder.debug_check_bounds::<UnionWithEmptyStruct>(offset);
47866            encoder.write_num::<u64>(self.ordinal(), offset);
47867            match self {
47868                UnionWithEmptyStruct::S(ref val) => {
47869                    fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
47870                        <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
47871                        encoder,
47872                        offset + 8,
47873                        _depth,
47874                    )
47875                }
47876                UnionWithEmptyStruct::ForceAlignmentOf8(ref val) => {
47877                    fidl::encoding::encode_in_envelope::<u64, D>(
47878                        <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
47879                        encoder,
47880                        offset + 8,
47881                        _depth,
47882                    )
47883                }
47884            }
47885        }
47886    }
47887
47888    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithEmptyStruct {
47889        #[inline(always)]
47890        fn new_empty() -> Self {
47891            Self::S(fidl::new_empty!(EmptyStruct, D))
47892        }
47893
47894        #[inline]
47895        unsafe fn decode(
47896            &mut self,
47897            decoder: &mut fidl::encoding::Decoder<'_, D>,
47898            offset: usize,
47899            mut depth: fidl::encoding::Depth,
47900        ) -> fidl::Result<()> {
47901            decoder.debug_check_bounds::<Self>(offset);
47902            #[allow(unused_variables)]
47903            let next_out_of_line = decoder.next_out_of_line();
47904            let handles_before = decoder.remaining_handles();
47905            let (ordinal, inlined, num_bytes, num_handles) =
47906                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47907
47908            let member_inline_size = match ordinal {
47909                1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47910                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47911                _ => return Err(fidl::Error::UnknownUnionTag),
47912            };
47913
47914            if inlined != (member_inline_size <= 4) {
47915                return Err(fidl::Error::InvalidInlineBitInEnvelope);
47916            }
47917            let _inner_offset;
47918            if inlined {
47919                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47920                _inner_offset = offset + 8;
47921            } else {
47922                depth.increment()?;
47923                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47924            }
47925            match ordinal {
47926                1 => {
47927                    #[allow(irrefutable_let_patterns)]
47928                    if let UnionWithEmptyStruct::S(_) = self {
47929                        // Do nothing, read the value into the object
47930                    } else {
47931                        // Initialize `self` to the right variant
47932                        *self = UnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
47933                    }
47934                    #[allow(irrefutable_let_patterns)]
47935                    if let UnionWithEmptyStruct::S(ref mut val) = self {
47936                        fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
47937                    } else {
47938                        unreachable!()
47939                    }
47940                }
47941                2 => {
47942                    #[allow(irrefutable_let_patterns)]
47943                    if let UnionWithEmptyStruct::ForceAlignmentOf8(_) = self {
47944                        // Do nothing, read the value into the object
47945                    } else {
47946                        // Initialize `self` to the right variant
47947                        *self = UnionWithEmptyStruct::ForceAlignmentOf8(fidl::new_empty!(u64, D));
47948                    }
47949                    #[allow(irrefutable_let_patterns)]
47950                    if let UnionWithEmptyStruct::ForceAlignmentOf8(ref mut val) = self {
47951                        fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
47952                    } else {
47953                        unreachable!()
47954                    }
47955                }
47956                ordinal => panic!("unexpected ordinal {:?}", ordinal),
47957            }
47958            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47959                return Err(fidl::Error::InvalidNumBytesInEnvelope);
47960            }
47961            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47962                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47963            }
47964            Ok(())
47965        }
47966    }
47967
47968    impl fidl::encoding::ValueTypeMarker for UnionWithRegression10Table {
47969        type Borrowed<'a> = &'a Self;
47970        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47971            value
47972        }
47973    }
47974
47975    unsafe impl fidl::encoding::TypeMarker for UnionWithRegression10Table {
47976        type Owned = Self;
47977
47978        #[inline(always)]
47979        fn inline_align(_context: fidl::encoding::Context) -> usize {
47980            8
47981        }
47982
47983        #[inline(always)]
47984        fn inline_size(_context: fidl::encoding::Context) -> usize {
47985            16
47986        }
47987    }
47988
47989    unsafe impl<D: fidl::encoding::ResourceDialect>
47990        fidl::encoding::Encode<UnionWithRegression10Table, D> for &UnionWithRegression10Table
47991    {
47992        #[inline]
47993        unsafe fn encode(
47994            self,
47995            encoder: &mut fidl::encoding::Encoder<'_, D>,
47996            offset: usize,
47997            _depth: fidl::encoding::Depth,
47998        ) -> fidl::Result<()> {
47999            encoder.debug_check_bounds::<UnionWithRegression10Table>(offset);
48000            encoder.write_num::<u64>(self.ordinal(), offset);
48001            match self {
48002                UnionWithRegression10Table::Unused(ref val) => {
48003                    fidl::encoding::encode_in_envelope::<u8, D>(
48004                        <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
48005                        encoder,
48006                        offset + 8,
48007                        _depth,
48008                    )
48009                }
48010                UnionWithRegression10Table::AtV2(ref val) => {
48011                    fidl::encoding::encode_in_envelope::<Regression10TableV2, D>(
48012                        <Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(val),
48013                        encoder,
48014                        offset + 8,
48015                        _depth,
48016                    )
48017                }
48018            }
48019        }
48020    }
48021
48022    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48023        for UnionWithRegression10Table
48024    {
48025        #[inline(always)]
48026        fn new_empty() -> Self {
48027            Self::Unused(fidl::new_empty!(u8, D))
48028        }
48029
48030        #[inline]
48031        unsafe fn decode(
48032            &mut self,
48033            decoder: &mut fidl::encoding::Decoder<'_, D>,
48034            offset: usize,
48035            mut depth: fidl::encoding::Depth,
48036        ) -> fidl::Result<()> {
48037            decoder.debug_check_bounds::<Self>(offset);
48038            #[allow(unused_variables)]
48039            let next_out_of_line = decoder.next_out_of_line();
48040            let handles_before = decoder.remaining_handles();
48041            let (ordinal, inlined, num_bytes, num_handles) =
48042                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48043
48044            let member_inline_size = match ordinal {
48045                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48046                3 => <Regression10TableV2 as fidl::encoding::TypeMarker>::inline_size(
48047                    decoder.context,
48048                ),
48049                _ => return Err(fidl::Error::UnknownUnionTag),
48050            };
48051
48052            if inlined != (member_inline_size <= 4) {
48053                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48054            }
48055            let _inner_offset;
48056            if inlined {
48057                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48058                _inner_offset = offset + 8;
48059            } else {
48060                depth.increment()?;
48061                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48062            }
48063            match ordinal {
48064                1 => {
48065                    #[allow(irrefutable_let_patterns)]
48066                    if let UnionWithRegression10Table::Unused(_) = self {
48067                        // Do nothing, read the value into the object
48068                    } else {
48069                        // Initialize `self` to the right variant
48070                        *self = UnionWithRegression10Table::Unused(fidl::new_empty!(u8, D));
48071                    }
48072                    #[allow(irrefutable_let_patterns)]
48073                    if let UnionWithRegression10Table::Unused(ref mut val) = self {
48074                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
48075                    } else {
48076                        unreachable!()
48077                    }
48078                }
48079                3 => {
48080                    #[allow(irrefutable_let_patterns)]
48081                    if let UnionWithRegression10Table::AtV2(_) = self {
48082                        // Do nothing, read the value into the object
48083                    } else {
48084                        // Initialize `self` to the right variant
48085                        *self = UnionWithRegression10Table::AtV2(fidl::new_empty!(
48086                            Regression10TableV2,
48087                            D
48088                        ));
48089                    }
48090                    #[allow(irrefutable_let_patterns)]
48091                    if let UnionWithRegression10Table::AtV2(ref mut val) = self {
48092                        fidl::decode!(Regression10TableV2, D, val, decoder, _inner_offset, depth)?;
48093                    } else {
48094                        unreachable!()
48095                    }
48096                }
48097                ordinal => panic!("unexpected ordinal {:?}", ordinal),
48098            }
48099            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48100                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48101            }
48102            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48103                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48104            }
48105            Ok(())
48106        }
48107    }
48108
48109    impl fidl::encoding::ValueTypeMarker for UnionWithStringWithLimit {
48110        type Borrowed<'a> = &'a Self;
48111        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48112            value
48113        }
48114    }
48115
48116    unsafe impl fidl::encoding::TypeMarker for UnionWithStringWithLimit {
48117        type Owned = Self;
48118
48119        #[inline(always)]
48120        fn inline_align(_context: fidl::encoding::Context) -> usize {
48121            8
48122        }
48123
48124        #[inline(always)]
48125        fn inline_size(_context: fidl::encoding::Context) -> usize {
48126            16
48127        }
48128    }
48129
48130    unsafe impl<D: fidl::encoding::ResourceDialect>
48131        fidl::encoding::Encode<UnionWithStringWithLimit, D> for &UnionWithStringWithLimit
48132    {
48133        #[inline]
48134        unsafe fn encode(
48135            self,
48136            encoder: &mut fidl::encoding::Encoder<'_, D>,
48137            offset: usize,
48138            _depth: fidl::encoding::Depth,
48139        ) -> fidl::Result<()> {
48140            encoder.debug_check_bounds::<UnionWithStringWithLimit>(offset);
48141            encoder.write_num::<u64>(self.ordinal(), offset);
48142            match self {
48143                UnionWithStringWithLimit::S(ref val) => fidl::encoding::encode_in_envelope::<
48144                    fidl::encoding::BoundedString<2>,
48145                    D,
48146                >(
48147                    <fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
48148                        val,
48149                    ),
48150                    encoder,
48151                    offset + 8,
48152                    _depth,
48153                ),
48154                UnionWithStringWithLimit::__SourceBreaking { .. } => {
48155                    Err(fidl::Error::UnknownUnionTag)
48156                }
48157            }
48158        }
48159    }
48160
48161    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48162        for UnionWithStringWithLimit
48163    {
48164        #[inline(always)]
48165        fn new_empty() -> Self {
48166            Self::__SourceBreaking { unknown_ordinal: 0 }
48167        }
48168
48169        #[inline]
48170        unsafe fn decode(
48171            &mut self,
48172            decoder: &mut fidl::encoding::Decoder<'_, D>,
48173            offset: usize,
48174            mut depth: fidl::encoding::Depth,
48175        ) -> fidl::Result<()> {
48176            decoder.debug_check_bounds::<Self>(offset);
48177            #[allow(unused_variables)]
48178            let next_out_of_line = decoder.next_out_of_line();
48179            let handles_before = decoder.remaining_handles();
48180            let (ordinal, inlined, num_bytes, num_handles) =
48181                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48182
48183            let member_inline_size = match ordinal {
48184                1 => <fidl::encoding::BoundedString<2> as fidl::encoding::TypeMarker>::inline_size(
48185                    decoder.context,
48186                ),
48187                0 => return Err(fidl::Error::UnknownUnionTag),
48188                _ => num_bytes as usize,
48189            };
48190
48191            if inlined != (member_inline_size <= 4) {
48192                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48193            }
48194            let _inner_offset;
48195            if inlined {
48196                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48197                _inner_offset = offset + 8;
48198            } else {
48199                depth.increment()?;
48200                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48201            }
48202            match ordinal {
48203                1 => {
48204                    #[allow(irrefutable_let_patterns)]
48205                    if let UnionWithStringWithLimit::S(_) = self {
48206                        // Do nothing, read the value into the object
48207                    } else {
48208                        // Initialize `self` to the right variant
48209                        *self = UnionWithStringWithLimit::S(fidl::new_empty!(
48210                            fidl::encoding::BoundedString<2>,
48211                            D
48212                        ));
48213                    }
48214                    #[allow(irrefutable_let_patterns)]
48215                    if let UnionWithStringWithLimit::S(ref mut val) = self {
48216                        fidl::decode!(
48217                            fidl::encoding::BoundedString<2>,
48218                            D,
48219                            val,
48220                            decoder,
48221                            _inner_offset,
48222                            depth
48223                        )?;
48224                    } else {
48225                        unreachable!()
48226                    }
48227                }
48228                #[allow(deprecated)]
48229                ordinal => {
48230                    for _ in 0..num_handles {
48231                        decoder.drop_next_handle()?;
48232                    }
48233                    *self = UnionWithStringWithLimit::__SourceBreaking { unknown_ordinal: ordinal };
48234                }
48235            }
48236            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48237                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48238            }
48239            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48240                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48241            }
48242            Ok(())
48243        }
48244    }
48245
48246    impl fidl::encoding::ValueTypeMarker for UnionWithVectorOfVectors {
48247        type Borrowed<'a> = &'a Self;
48248        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48249            value
48250        }
48251    }
48252
48253    unsafe impl fidl::encoding::TypeMarker for UnionWithVectorOfVectors {
48254        type Owned = Self;
48255
48256        #[inline(always)]
48257        fn inline_align(_context: fidl::encoding::Context) -> usize {
48258            8
48259        }
48260
48261        #[inline(always)]
48262        fn inline_size(_context: fidl::encoding::Context) -> usize {
48263            16
48264        }
48265    }
48266
48267    unsafe impl<D: fidl::encoding::ResourceDialect>
48268        fidl::encoding::Encode<UnionWithVectorOfVectors, D> for &UnionWithVectorOfVectors
48269    {
48270        #[inline]
48271        unsafe fn encode(
48272            self,
48273            encoder: &mut fidl::encoding::Encoder<'_, D>,
48274            offset: usize,
48275            _depth: fidl::encoding::Depth,
48276        ) -> fidl::Result<()> {
48277            encoder.debug_check_bounds::<UnionWithVectorOfVectors>(offset);
48278            encoder.write_num::<u64>(self.ordinal(), offset);
48279            match self {
48280                UnionWithVectorOfVectors::V(ref val) => fidl::encoding::encode_in_envelope::<
48281                    fidl::encoding::UnboundedVector<
48282                        fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48283                    >,
48284                    D,
48285                >(
48286                    <fidl::encoding::UnboundedVector<
48287                        fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48288                    > as fidl::encoding::ValueTypeMarker>::borrow(val),
48289                    encoder,
48290                    offset + 8,
48291                    _depth,
48292                ),
48293            }
48294        }
48295    }
48296
48297    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48298        for UnionWithVectorOfVectors
48299    {
48300        #[inline(always)]
48301        fn new_empty() -> Self {
48302            Self::V(fidl::new_empty!(
48303                fidl::encoding::UnboundedVector<
48304                    fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48305                >,
48306                D
48307            ))
48308        }
48309
48310        #[inline]
48311        unsafe fn decode(
48312            &mut self,
48313            decoder: &mut fidl::encoding::Decoder<'_, D>,
48314            offset: usize,
48315            mut depth: fidl::encoding::Depth,
48316        ) -> fidl::Result<()> {
48317            decoder.debug_check_bounds::<Self>(offset);
48318            #[allow(unused_variables)]
48319            let next_out_of_line = decoder.next_out_of_line();
48320            let handles_before = decoder.remaining_handles();
48321            let (ordinal, inlined, num_bytes, num_handles) =
48322                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48323
48324            let member_inline_size = match ordinal {
48325                1 => <fidl::encoding::UnboundedVector<
48326                    fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
48327                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48328                _ => return Err(fidl::Error::UnknownUnionTag),
48329            };
48330
48331            if inlined != (member_inline_size <= 4) {
48332                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48333            }
48334            let _inner_offset;
48335            if inlined {
48336                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48337                _inner_offset = offset + 8;
48338            } else {
48339                depth.increment()?;
48340                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48341            }
48342            match ordinal {
48343                1 => {
48344                    #[allow(irrefutable_let_patterns)]
48345                    if let UnionWithVectorOfVectors::V(_) = self {
48346                        // Do nothing, read the value into the object
48347                    } else {
48348                        // Initialize `self` to the right variant
48349                        *self = UnionWithVectorOfVectors::V(fidl::new_empty!(
48350                            fidl::encoding::UnboundedVector<
48351                                fidl::encoding::UnboundedVector<
48352                                    fidl::encoding::Boxed<StructSize3Align1>,
48353                                >,
48354                            >,
48355                            D
48356                        ));
48357                    }
48358                    #[allow(irrefutable_let_patterns)]
48359                    if let UnionWithVectorOfVectors::V(ref mut val) = self {
48360                        fidl::decode!(
48361                            fidl::encoding::UnboundedVector<
48362                                fidl::encoding::UnboundedVector<
48363                                    fidl::encoding::Boxed<StructSize3Align1>,
48364                                >,
48365                            >,
48366                            D,
48367                            val,
48368                            decoder,
48369                            _inner_offset,
48370                            depth
48371                        )?;
48372                    } else {
48373                        unreachable!()
48374                    }
48375                }
48376                ordinal => panic!("unexpected ordinal {:?}", ordinal),
48377            }
48378            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48379                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48380            }
48381            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48382                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48383            }
48384            Ok(())
48385        }
48386    }
48387
48388    impl fidl::encoding::ValueTypeMarker for UnionWithVectorWithLimit {
48389        type Borrowed<'a> = &'a Self;
48390        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48391            value
48392        }
48393    }
48394
48395    unsafe impl fidl::encoding::TypeMarker for UnionWithVectorWithLimit {
48396        type Owned = Self;
48397
48398        #[inline(always)]
48399        fn inline_align(_context: fidl::encoding::Context) -> usize {
48400            8
48401        }
48402
48403        #[inline(always)]
48404        fn inline_size(_context: fidl::encoding::Context) -> usize {
48405            16
48406        }
48407    }
48408
48409    unsafe impl<D: fidl::encoding::ResourceDialect>
48410        fidl::encoding::Encode<UnionWithVectorWithLimit, D> for &UnionWithVectorWithLimit
48411    {
48412        #[inline]
48413        unsafe fn encode(
48414            self,
48415            encoder: &mut fidl::encoding::Encoder<'_, D>,
48416            offset: usize,
48417            _depth: fidl::encoding::Depth,
48418        ) -> fidl::Result<()> {
48419            encoder.debug_check_bounds::<UnionWithVectorWithLimit>(offset);
48420            encoder.write_num::<u64>(self.ordinal(), offset);
48421            match self {
48422                UnionWithVectorWithLimit::V(ref val) => fidl::encoding::encode_in_envelope::<
48423                    fidl::encoding::Vector<u8, 2>,
48424                    D,
48425                >(
48426                    <fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
48427                    encoder,
48428                    offset + 8,
48429                    _depth,
48430                ),
48431                UnionWithVectorWithLimit::__SourceBreaking { .. } => {
48432                    Err(fidl::Error::UnknownUnionTag)
48433                }
48434            }
48435        }
48436    }
48437
48438    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48439        for UnionWithVectorWithLimit
48440    {
48441        #[inline(always)]
48442        fn new_empty() -> Self {
48443            Self::__SourceBreaking { unknown_ordinal: 0 }
48444        }
48445
48446        #[inline]
48447        unsafe fn decode(
48448            &mut self,
48449            decoder: &mut fidl::encoding::Decoder<'_, D>,
48450            offset: usize,
48451            mut depth: fidl::encoding::Depth,
48452        ) -> fidl::Result<()> {
48453            decoder.debug_check_bounds::<Self>(offset);
48454            #[allow(unused_variables)]
48455            let next_out_of_line = decoder.next_out_of_line();
48456            let handles_before = decoder.remaining_handles();
48457            let (ordinal, inlined, num_bytes, num_handles) =
48458                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48459
48460            let member_inline_size = match ordinal {
48461                1 => <fidl::encoding::Vector<u8, 2> as fidl::encoding::TypeMarker>::inline_size(
48462                    decoder.context,
48463                ),
48464                0 => return Err(fidl::Error::UnknownUnionTag),
48465                _ => num_bytes as usize,
48466            };
48467
48468            if inlined != (member_inline_size <= 4) {
48469                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48470            }
48471            let _inner_offset;
48472            if inlined {
48473                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48474                _inner_offset = offset + 8;
48475            } else {
48476                depth.increment()?;
48477                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48478            }
48479            match ordinal {
48480                1 => {
48481                    #[allow(irrefutable_let_patterns)]
48482                    if let UnionWithVectorWithLimit::V(_) = self {
48483                        // Do nothing, read the value into the object
48484                    } else {
48485                        // Initialize `self` to the right variant
48486                        *self = UnionWithVectorWithLimit::V(
48487                            fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D),
48488                        );
48489                    }
48490                    #[allow(irrefutable_let_patterns)]
48491                    if let UnionWithVectorWithLimit::V(ref mut val) = self {
48492                        fidl::decode!(fidl::encoding::Vector<u8, 2>, D, val, decoder, _inner_offset, depth)?;
48493                    } else {
48494                        unreachable!()
48495                    }
48496                }
48497                #[allow(deprecated)]
48498                ordinal => {
48499                    for _ in 0..num_handles {
48500                        decoder.drop_next_handle()?;
48501                    }
48502                    *self = UnionWithVectorWithLimit::__SourceBreaking { unknown_ordinal: ordinal };
48503                }
48504            }
48505            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48506                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48507            }
48508            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48509                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48510            }
48511            Ok(())
48512        }
48513    }
48514
48515    impl fidl::encoding::ValueTypeMarker for XUnionOfTableThenXUnionThenUnion {
48516        type Borrowed<'a> = &'a Self;
48517        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48518            value
48519        }
48520    }
48521
48522    unsafe impl fidl::encoding::TypeMarker for XUnionOfTableThenXUnionThenUnion {
48523        type Owned = Self;
48524
48525        #[inline(always)]
48526        fn inline_align(_context: fidl::encoding::Context) -> usize {
48527            8
48528        }
48529
48530        #[inline(always)]
48531        fn inline_size(_context: fidl::encoding::Context) -> usize {
48532            16
48533        }
48534    }
48535
48536    unsafe impl<D: fidl::encoding::ResourceDialect>
48537        fidl::encoding::Encode<XUnionOfTableThenXUnionThenUnion, D>
48538        for &XUnionOfTableThenXUnionThenUnion
48539    {
48540        #[inline]
48541        unsafe fn encode(
48542            self,
48543            encoder: &mut fidl::encoding::Encoder<'_, D>,
48544            offset: usize,
48545            _depth: fidl::encoding::Depth,
48546        ) -> fidl::Result<()> {
48547            encoder.debug_check_bounds::<XUnionOfTableThenXUnionThenUnion>(offset);
48548            encoder.write_num::<u64>(self.ordinal(), offset);
48549            match self {
48550                XUnionOfTableThenXUnionThenUnion::Variant(ref val) => {
48551                    fidl::encoding::encode_in_envelope::<TableOfXUnionThenUnion, D>(
48552                        <TableOfXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
48553                        encoder,
48554                        offset + 8,
48555                        _depth,
48556                    )
48557                }
48558                XUnionOfTableThenXUnionThenUnion::__SourceBreaking { .. } => {
48559                    Err(fidl::Error::UnknownUnionTag)
48560                }
48561            }
48562        }
48563    }
48564
48565    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
48566        for XUnionOfTableThenXUnionThenUnion
48567    {
48568        #[inline(always)]
48569        fn new_empty() -> Self {
48570            Self::__SourceBreaking { unknown_ordinal: 0 }
48571        }
48572
48573        #[inline]
48574        unsafe fn decode(
48575            &mut self,
48576            decoder: &mut fidl::encoding::Decoder<'_, D>,
48577            offset: usize,
48578            mut depth: fidl::encoding::Depth,
48579        ) -> fidl::Result<()> {
48580            decoder.debug_check_bounds::<Self>(offset);
48581            #[allow(unused_variables)]
48582            let next_out_of_line = decoder.next_out_of_line();
48583            let handles_before = decoder.remaining_handles();
48584            let (ordinal, inlined, num_bytes, num_handles) =
48585                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48586
48587            let member_inline_size = match ordinal {
48588                1 => <TableOfXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
48589                    decoder.context,
48590                ),
48591                0 => return Err(fidl::Error::UnknownUnionTag),
48592                _ => num_bytes as usize,
48593            };
48594
48595            if inlined != (member_inline_size <= 4) {
48596                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48597            }
48598            let _inner_offset;
48599            if inlined {
48600                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48601                _inner_offset = offset + 8;
48602            } else {
48603                depth.increment()?;
48604                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48605            }
48606            match ordinal {
48607                1 => {
48608                    #[allow(irrefutable_let_patterns)]
48609                    if let XUnionOfTableThenXUnionThenUnion::Variant(_) = self {
48610                        // Do nothing, read the value into the object
48611                    } else {
48612                        // Initialize `self` to the right variant
48613                        *self = XUnionOfTableThenXUnionThenUnion::Variant(fidl::new_empty!(
48614                            TableOfXUnionThenUnion,
48615                            D
48616                        ));
48617                    }
48618                    #[allow(irrefutable_let_patterns)]
48619                    if let XUnionOfTableThenXUnionThenUnion::Variant(ref mut val) = self {
48620                        fidl::decode!(
48621                            TableOfXUnionThenUnion,
48622                            D,
48623                            val,
48624                            decoder,
48625                            _inner_offset,
48626                            depth
48627                        )?;
48628                    } else {
48629                        unreachable!()
48630                    }
48631                }
48632                #[allow(deprecated)]
48633                ordinal => {
48634                    for _ in 0..num_handles {
48635                        decoder.drop_next_handle()?;
48636                    }
48637                    *self = XUnionOfTableThenXUnionThenUnion::__SourceBreaking {
48638                        unknown_ordinal: ordinal,
48639                    };
48640                }
48641            }
48642            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48643                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48644            }
48645            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48646                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48647            }
48648            Ok(())
48649        }
48650    }
48651
48652    impl fidl::encoding::ValueTypeMarker for XUnionOfUnion {
48653        type Borrowed<'a> = &'a Self;
48654        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48655            value
48656        }
48657    }
48658
48659    unsafe impl fidl::encoding::TypeMarker for XUnionOfUnion {
48660        type Owned = Self;
48661
48662        #[inline(always)]
48663        fn inline_align(_context: fidl::encoding::Context) -> usize {
48664            8
48665        }
48666
48667        #[inline(always)]
48668        fn inline_size(_context: fidl::encoding::Context) -> usize {
48669            16
48670        }
48671    }
48672
48673    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionOfUnion, D>
48674        for &XUnionOfUnion
48675    {
48676        #[inline]
48677        unsafe fn encode(
48678            self,
48679            encoder: &mut fidl::encoding::Encoder<'_, D>,
48680            offset: usize,
48681            _depth: fidl::encoding::Depth,
48682        ) -> fidl::Result<()> {
48683            encoder.debug_check_bounds::<XUnionOfUnion>(offset);
48684            encoder.write_num::<u64>(self.ordinal(), offset);
48685            match self {
48686                XUnionOfUnion::Variant(ref val) => {
48687                    fidl::encoding::encode_in_envelope::<UnionAtTheBottom, D>(
48688                        <UnionAtTheBottom as fidl::encoding::ValueTypeMarker>::borrow(val),
48689                        encoder,
48690                        offset + 8,
48691                        _depth,
48692                    )
48693                }
48694                XUnionOfUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48695            }
48696        }
48697    }
48698
48699    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionOfUnion {
48700        #[inline(always)]
48701        fn new_empty() -> Self {
48702            Self::__SourceBreaking { unknown_ordinal: 0 }
48703        }
48704
48705        #[inline]
48706        unsafe fn decode(
48707            &mut self,
48708            decoder: &mut fidl::encoding::Decoder<'_, D>,
48709            offset: usize,
48710            mut depth: fidl::encoding::Depth,
48711        ) -> fidl::Result<()> {
48712            decoder.debug_check_bounds::<Self>(offset);
48713            #[allow(unused_variables)]
48714            let next_out_of_line = decoder.next_out_of_line();
48715            let handles_before = decoder.remaining_handles();
48716            let (ordinal, inlined, num_bytes, num_handles) =
48717                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48718
48719            let member_inline_size = match ordinal {
48720                1 => <UnionAtTheBottom as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48721                0 => return Err(fidl::Error::UnknownUnionTag),
48722                _ => num_bytes as usize,
48723            };
48724
48725            if inlined != (member_inline_size <= 4) {
48726                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48727            }
48728            let _inner_offset;
48729            if inlined {
48730                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48731                _inner_offset = offset + 8;
48732            } else {
48733                depth.increment()?;
48734                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48735            }
48736            match ordinal {
48737                1 => {
48738                    #[allow(irrefutable_let_patterns)]
48739                    if let XUnionOfUnion::Variant(_) = self {
48740                        // Do nothing, read the value into the object
48741                    } else {
48742                        // Initialize `self` to the right variant
48743                        *self = XUnionOfUnion::Variant(fidl::new_empty!(UnionAtTheBottom, D));
48744                    }
48745                    #[allow(irrefutable_let_patterns)]
48746                    if let XUnionOfUnion::Variant(ref mut val) = self {
48747                        fidl::decode!(UnionAtTheBottom, D, val, decoder, _inner_offset, depth)?;
48748                    } else {
48749                        unreachable!()
48750                    }
48751                }
48752                #[allow(deprecated)]
48753                ordinal => {
48754                    for _ in 0..num_handles {
48755                        decoder.drop_next_handle()?;
48756                    }
48757                    *self = XUnionOfUnion::__SourceBreaking { unknown_ordinal: ordinal };
48758                }
48759            }
48760            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48761                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48762            }
48763            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48764                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48765            }
48766            Ok(())
48767        }
48768    }
48769
48770    impl fidl::encoding::ValueTypeMarker for XUnionWithEmptyStruct {
48771        type Borrowed<'a> = &'a Self;
48772        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48773            value
48774        }
48775    }
48776
48777    unsafe impl fidl::encoding::TypeMarker for XUnionWithEmptyStruct {
48778        type Owned = Self;
48779
48780        #[inline(always)]
48781        fn inline_align(_context: fidl::encoding::Context) -> usize {
48782            8
48783        }
48784
48785        #[inline(always)]
48786        fn inline_size(_context: fidl::encoding::Context) -> usize {
48787            16
48788        }
48789    }
48790
48791    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithEmptyStruct, D>
48792        for &XUnionWithEmptyStruct
48793    {
48794        #[inline]
48795        unsafe fn encode(
48796            self,
48797            encoder: &mut fidl::encoding::Encoder<'_, D>,
48798            offset: usize,
48799            _depth: fidl::encoding::Depth,
48800        ) -> fidl::Result<()> {
48801            encoder.debug_check_bounds::<XUnionWithEmptyStruct>(offset);
48802            encoder.write_num::<u64>(self.ordinal(), offset);
48803            match self {
48804                XUnionWithEmptyStruct::S(ref val) => {
48805                    fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
48806                        <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
48807                        encoder,
48808                        offset + 8,
48809                        _depth,
48810                    )
48811                }
48812                XUnionWithEmptyStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48813            }
48814        }
48815    }
48816
48817    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithEmptyStruct {
48818        #[inline(always)]
48819        fn new_empty() -> Self {
48820            Self::__SourceBreaking { unknown_ordinal: 0 }
48821        }
48822
48823        #[inline]
48824        unsafe fn decode(
48825            &mut self,
48826            decoder: &mut fidl::encoding::Decoder<'_, D>,
48827            offset: usize,
48828            mut depth: fidl::encoding::Depth,
48829        ) -> fidl::Result<()> {
48830            decoder.debug_check_bounds::<Self>(offset);
48831            #[allow(unused_variables)]
48832            let next_out_of_line = decoder.next_out_of_line();
48833            let handles_before = decoder.remaining_handles();
48834            let (ordinal, inlined, num_bytes, num_handles) =
48835                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48836
48837            let member_inline_size = match ordinal {
48838                1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
48839                0 => return Err(fidl::Error::UnknownUnionTag),
48840                _ => num_bytes as usize,
48841            };
48842
48843            if inlined != (member_inline_size <= 4) {
48844                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48845            }
48846            let _inner_offset;
48847            if inlined {
48848                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48849                _inner_offset = offset + 8;
48850            } else {
48851                depth.increment()?;
48852                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48853            }
48854            match ordinal {
48855                1 => {
48856                    #[allow(irrefutable_let_patterns)]
48857                    if let XUnionWithEmptyStruct::S(_) = self {
48858                        // Do nothing, read the value into the object
48859                    } else {
48860                        // Initialize `self` to the right variant
48861                        *self = XUnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
48862                    }
48863                    #[allow(irrefutable_let_patterns)]
48864                    if let XUnionWithEmptyStruct::S(ref mut val) = self {
48865                        fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
48866                    } else {
48867                        unreachable!()
48868                    }
48869                }
48870                #[allow(deprecated)]
48871                ordinal => {
48872                    for _ in 0..num_handles {
48873                        decoder.drop_next_handle()?;
48874                    }
48875                    *self = XUnionWithEmptyStruct::__SourceBreaking { unknown_ordinal: ordinal };
48876                }
48877            }
48878            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48879                return Err(fidl::Error::InvalidNumBytesInEnvelope);
48880            }
48881            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
48882                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
48883            }
48884            Ok(())
48885        }
48886    }
48887
48888    impl fidl::encoding::ValueTypeMarker for XUnionWithStruct {
48889        type Borrowed<'a> = &'a Self;
48890        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48891            value
48892        }
48893    }
48894
48895    unsafe impl fidl::encoding::TypeMarker for XUnionWithStruct {
48896        type Owned = Self;
48897
48898        #[inline(always)]
48899        fn inline_align(_context: fidl::encoding::Context) -> usize {
48900            8
48901        }
48902
48903        #[inline(always)]
48904        fn inline_size(_context: fidl::encoding::Context) -> usize {
48905            16
48906        }
48907    }
48908
48909    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithStruct, D>
48910        for &XUnionWithStruct
48911    {
48912        #[inline]
48913        unsafe fn encode(
48914            self,
48915            encoder: &mut fidl::encoding::Encoder<'_, D>,
48916            offset: usize,
48917            _depth: fidl::encoding::Depth,
48918        ) -> fidl::Result<()> {
48919            encoder.debug_check_bounds::<XUnionWithStruct>(offset);
48920            encoder.write_num::<u64>(self.ordinal(), offset);
48921            match self {
48922                XUnionWithStruct::S(ref val) => {
48923                    fidl::encoding::encode_in_envelope::<StructSize3Align1, D>(
48924                        <StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow(val),
48925                        encoder,
48926                        offset + 8,
48927                        _depth,
48928                    )
48929                }
48930                XUnionWithStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
48931            }
48932        }
48933    }
48934
48935    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithStruct {
48936        #[inline(always)]
48937        fn new_empty() -> Self {
48938            Self::__SourceBreaking { unknown_ordinal: 0 }
48939        }
48940
48941        #[inline]
48942        unsafe fn decode(
48943            &mut self,
48944            decoder: &mut fidl::encoding::Decoder<'_, D>,
48945            offset: usize,
48946            mut depth: fidl::encoding::Depth,
48947        ) -> fidl::Result<()> {
48948            decoder.debug_check_bounds::<Self>(offset);
48949            #[allow(unused_variables)]
48950            let next_out_of_line = decoder.next_out_of_line();
48951            let handles_before = decoder.remaining_handles();
48952            let (ordinal, inlined, num_bytes, num_handles) =
48953                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
48954
48955            let member_inline_size = match ordinal {
48956                1 => {
48957                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
48958                }
48959                0 => return Err(fidl::Error::UnknownUnionTag),
48960                _ => num_bytes as usize,
48961            };
48962
48963            if inlined != (member_inline_size <= 4) {
48964                return Err(fidl::Error::InvalidInlineBitInEnvelope);
48965            }
48966            let _inner_offset;
48967            if inlined {
48968                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
48969                _inner_offset = offset + 8;
48970            } else {
48971                depth.increment()?;
48972                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
48973            }
48974            match ordinal {
48975                1 => {
48976                    #[allow(irrefutable_let_patterns)]
48977                    if let XUnionWithStruct::S(_) = self {
48978                        // Do nothing, read the value into the object
48979                    } else {
48980                        // Initialize `self` to the right variant
48981                        *self = XUnionWithStruct::S(fidl::new_empty!(StructSize3Align1, D));
48982                    }
48983                    #[allow(irrefutable_let_patterns)]
48984                    if let XUnionWithStruct::S(ref mut val) = self {
48985                        fidl::decode!(StructSize3Align1, D, val, decoder, _inner_offset, depth)?;
48986                    } else {
48987                        unreachable!()
48988                    }
48989                }
48990                #[allow(deprecated)]
48991                ordinal => {
48992                    for _ in 0..num_handles {
48993                        decoder.drop_next_handle()?;
48994                    }
48995                    *self = XUnionWithStruct::__SourceBreaking { unknown_ordinal: ordinal };
48996                }
48997            }
48998            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
48999                return Err(fidl::Error::InvalidNumBytesInEnvelope);
49000            }
49001            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
49002                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
49003            }
49004            Ok(())
49005        }
49006    }
49007
49008    impl fidl::encoding::ValueTypeMarker for XUnionWithUnions {
49009        type Borrowed<'a> = &'a Self;
49010        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
49011            value
49012        }
49013    }
49014
49015    unsafe impl fidl::encoding::TypeMarker for XUnionWithUnions {
49016        type Owned = Self;
49017
49018        #[inline(always)]
49019        fn inline_align(_context: fidl::encoding::Context) -> usize {
49020            8
49021        }
49022
49023        #[inline(always)]
49024        fn inline_size(_context: fidl::encoding::Context) -> usize {
49025            16
49026        }
49027    }
49028
49029    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithUnions, D>
49030        for &XUnionWithUnions
49031    {
49032        #[inline]
49033        unsafe fn encode(
49034            self,
49035            encoder: &mut fidl::encoding::Encoder<'_, D>,
49036            offset: usize,
49037            _depth: fidl::encoding::Depth,
49038        ) -> fidl::Result<()> {
49039            encoder.debug_check_bounds::<XUnionWithUnions>(offset);
49040            encoder.write_num::<u64>(self.ordinal(), offset);
49041            match self {
49042                XUnionWithUnions::U1(ref val) => {
49043                    fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
49044                        <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
49045                        encoder,
49046                        offset + 8,
49047                        _depth,
49048                    )
49049                }
49050                XUnionWithUnions::U2(ref val) => {
49051                    fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
49052                        <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
49053                        encoder,
49054                        offset + 8,
49055                        _depth,
49056                    )
49057                }
49058                XUnionWithUnions::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
49059            }
49060        }
49061    }
49062
49063    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithUnions {
49064        #[inline(always)]
49065        fn new_empty() -> Self {
49066            Self::__SourceBreaking { unknown_ordinal: 0 }
49067        }
49068
49069        #[inline]
49070        unsafe fn decode(
49071            &mut self,
49072            decoder: &mut fidl::encoding::Decoder<'_, D>,
49073            offset: usize,
49074            mut depth: fidl::encoding::Depth,
49075        ) -> fidl::Result<()> {
49076            decoder.debug_check_bounds::<Self>(offset);
49077            #[allow(unused_variables)]
49078            let next_out_of_line = decoder.next_out_of_line();
49079            let handles_before = decoder.remaining_handles();
49080            let (ordinal, inlined, num_bytes, num_handles) =
49081                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
49082
49083            let member_inline_size = match ordinal {
49084                1 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
49085                2 => {
49086                    <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
49087                }
49088                0 => return Err(fidl::Error::UnknownUnionTag),
49089                _ => num_bytes as usize,
49090            };
49091
49092            if inlined != (member_inline_size <= 4) {
49093                return Err(fidl::Error::InvalidInlineBitInEnvelope);
49094            }
49095            let _inner_offset;
49096            if inlined {
49097                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
49098                _inner_offset = offset + 8;
49099            } else {
49100                depth.increment()?;
49101                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
49102            }
49103            match ordinal {
49104                1 => {
49105                    #[allow(irrefutable_let_patterns)]
49106                    if let XUnionWithUnions::U1(_) = self {
49107                        // Do nothing, read the value into the object
49108                    } else {
49109                        // Initialize `self` to the right variant
49110                        *self = XUnionWithUnions::U1(fidl::new_empty!(UnionSize8Align4, D));
49111                    }
49112                    #[allow(irrefutable_let_patterns)]
49113                    if let XUnionWithUnions::U1(ref mut val) = self {
49114                        fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
49115                    } else {
49116                        unreachable!()
49117                    }
49118                }
49119                2 => {
49120                    #[allow(irrefutable_let_patterns)]
49121                    if let XUnionWithUnions::U2(_) = self {
49122                        // Do nothing, read the value into the object
49123                    } else {
49124                        // Initialize `self` to the right variant
49125                        *self = XUnionWithUnions::U2(fidl::new_empty!(UnionSize12Align4, D));
49126                    }
49127                    #[allow(irrefutable_let_patterns)]
49128                    if let XUnionWithUnions::U2(ref mut val) = self {
49129                        fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
49130                    } else {
49131                        unreachable!()
49132                    }
49133                }
49134                #[allow(deprecated)]
49135                ordinal => {
49136                    for _ in 0..num_handles {
49137                        decoder.drop_next_handle()?;
49138                    }
49139                    *self = XUnionWithUnions::__SourceBreaking { unknown_ordinal: ordinal };
49140                }
49141            }
49142            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
49143                return Err(fidl::Error::InvalidNumBytesInEnvelope);
49144            }
49145            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
49146                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
49147            }
49148            Ok(())
49149        }
49150    }
49151
49152    impl fidl::encoding::ValueTypeMarker for XUnionWithXUnion {
49153        type Borrowed<'a> = &'a Self;
49154        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
49155            value
49156        }
49157    }
49158
49159    unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnion {
49160        type Owned = Self;
49161
49162        #[inline(always)]
49163        fn inline_align(_context: fidl::encoding::Context) -> usize {
49164            8
49165        }
49166
49167        #[inline(always)]
49168        fn inline_size(_context: fidl::encoding::Context) -> usize {
49169            16
49170        }
49171    }
49172
49173    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithXUnion, D>
49174        for &XUnionWithXUnion
49175    {
49176        #[inline]
49177        unsafe fn encode(
49178            self,
49179            encoder: &mut fidl::encoding::Encoder<'_, D>,
49180            offset: usize,
49181            _depth: fidl::encoding::Depth,
49182        ) -> fidl::Result<()> {
49183            encoder.debug_check_bounds::<XUnionWithXUnion>(offset);
49184            encoder.write_num::<u64>(self.ordinal(), offset);
49185            match self {
49186                XUnionWithXUnion::Xu(ref val) => {
49187                    fidl::encoding::encode_in_envelope::<XUnionWithStruct, D>(
49188                        <XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
49189                        encoder,
49190                        offset + 8,
49191                        _depth,
49192                    )
49193                }
49194                XUnionWithXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
49195            }
49196        }
49197    }
49198
49199    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithXUnion {
49200        #[inline(always)]
49201        fn new_empty() -> Self {
49202            Self::__SourceBreaking { unknown_ordinal: 0 }
49203        }
49204
49205        #[inline]
49206        unsafe fn decode(
49207            &mut self,
49208            decoder: &mut fidl::encoding::Decoder<'_, D>,
49209            offset: usize,
49210            mut depth: fidl::encoding::Depth,
49211        ) -> fidl::Result<()> {
49212            decoder.debug_check_bounds::<Self>(offset);
49213            #[allow(unused_variables)]
49214            let next_out_of_line = decoder.next_out_of_line();
49215            let handles_before = decoder.remaining_handles();
49216            let (ordinal, inlined, num_bytes, num_handles) =
49217                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
49218
49219            let member_inline_size = match ordinal {
49220                1 => <XUnionWithStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
49221                0 => return Err(fidl::Error::UnknownUnionTag),
49222                _ => num_bytes as usize,
49223            };
49224
49225            if inlined != (member_inline_size <= 4) {
49226                return Err(fidl::Error::InvalidInlineBitInEnvelope);
49227            }
49228            let _inner_offset;
49229            if inlined {
49230                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
49231                _inner_offset = offset + 8;
49232            } else {
49233                depth.increment()?;
49234                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
49235            }
49236            match ordinal {
49237                1 => {
49238                    #[allow(irrefutable_let_patterns)]
49239                    if let XUnionWithXUnion::Xu(_) = self {
49240                        // Do nothing, read the value into the object
49241                    } else {
49242                        // Initialize `self` to the right variant
49243                        *self = XUnionWithXUnion::Xu(fidl::new_empty!(XUnionWithStruct, D));
49244                    }
49245                    #[allow(irrefutable_let_patterns)]
49246                    if let XUnionWithXUnion::Xu(ref mut val) = self {
49247                        fidl::decode!(XUnionWithStruct, D, val, decoder, _inner_offset, depth)?;
49248                    } else {
49249                        unreachable!()
49250                    }
49251                }
49252                #[allow(deprecated)]
49253                ordinal => {
49254                    for _ in 0..num_handles {
49255                        decoder.drop_next_handle()?;
49256                    }
49257                    *self = XUnionWithXUnion::__SourceBreaking { unknown_ordinal: ordinal };
49258                }
49259            }
49260            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
49261                return Err(fidl::Error::InvalidNumBytesInEnvelope);
49262            }
49263            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
49264                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
49265            }
49266            Ok(())
49267        }
49268    }
49269}