fidl_fidl_test_compatibility__common/
fidl_fidl_test_compatibility__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 const ARRAYS_SIZE: u32 = 3;
12
13pub const STRINGS_SIZE: u32 = 32;
14
15pub const VECTORS_SIZE: u32 = 3;
16
17bitflags! {
18    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
19    pub struct DefaultBits: u32 {
20        const ONE = 1;
21        const TWO = 2;
22    }
23}
24
25impl DefaultBits {}
26
27bitflags! {
28    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
29    pub struct U16Bits: u16 {
30        const ONE = 1;
31        const TWO = 2;
32        const THREE = 4;
33        const FOUR = 8;
34        const FIVE = 16;
35        const SIX = 32;
36    }
37}
38
39impl U16Bits {}
40
41bitflags! {
42    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
43    pub struct U32Bits: u32 {
44        const ONE = 1;
45        const TWO = 2;
46        const THREE = 4;
47        const FOUR = 8;
48        const FIVE = 16;
49        const SIX = 32;
50        const SEVEN = 64;
51    }
52}
53
54impl U32Bits {}
55
56bitflags! {
57    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
58    pub struct U64Bits: u64 {
59        const ONE = 1;
60        const TWO = 2;
61        const THREE = 4;
62        const FOUR = 8;
63        const FIVE = 16;
64        const SIX = 32;
65        const SEVEN = 64;
66        const EIGHT = 128;
67    }
68}
69
70impl U64Bits {}
71
72bitflags! {
73    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
74    pub struct U8Bits: u8 {
75        const ONE = 1;
76        const TWO = 2;
77        const THREE = 4;
78        const FOUR = 8;
79        const FIVE = 16;
80    }
81}
82
83impl U8Bits {}
84
85#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
86#[repr(u32)]
87pub enum RespondWith {
88    Success = 1,
89    Err = 2,
90}
91
92impl RespondWith {
93    #[inline]
94    pub fn from_primitive(prim: u32) -> Option<Self> {
95        match prim {
96            1 => Some(Self::Success),
97            2 => Some(Self::Err),
98            _ => None,
99        }
100    }
101
102    #[inline]
103    pub const fn into_primitive(self) -> u32 {
104        self as u32
105    }
106}
107
108#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
109#[repr(u32)]
110pub enum DefaultEnum {
111    KZero = 0,
112    KOne = 1,
113}
114
115impl DefaultEnum {
116    #[inline]
117    pub fn from_primitive(prim: u32) -> Option<Self> {
118        match prim {
119            0 => Some(Self::KZero),
120            1 => Some(Self::KOne),
121            _ => None,
122        }
123    }
124
125    #[inline]
126    pub const fn into_primitive(self) -> u32 {
127        self as u32
128    }
129}
130
131#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
132#[repr(i16)]
133pub enum I16Enum {
134    KNegativeOne = -1,
135    KOne = 1,
136    KTwo = 2,
137}
138
139impl I16Enum {
140    #[inline]
141    pub fn from_primitive(prim: i16) -> Option<Self> {
142        match prim {
143            -1 => Some(Self::KNegativeOne),
144            1 => Some(Self::KOne),
145            2 => Some(Self::KTwo),
146            _ => None,
147        }
148    }
149
150    #[inline]
151    pub const fn into_primitive(self) -> i16 {
152        self as i16
153    }
154}
155
156#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
157#[repr(i32)]
158pub enum I32Enum {
159    KNegativeOne = -1,
160    KOne = 1,
161    KTwo = 2,
162    KThree = 3,
163}
164
165impl I32Enum {
166    #[inline]
167    pub fn from_primitive(prim: i32) -> Option<Self> {
168        match prim {
169            -1 => Some(Self::KNegativeOne),
170            1 => Some(Self::KOne),
171            2 => Some(Self::KTwo),
172            3 => Some(Self::KThree),
173            _ => None,
174        }
175    }
176
177    #[inline]
178    pub const fn into_primitive(self) -> i32 {
179        self as i32
180    }
181}
182
183#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
184#[repr(i64)]
185pub enum I64Enum {
186    KNegativeOne = -1,
187    KOne = 1,
188    KTwo = 2,
189    KThree = 3,
190    KFour = 4,
191}
192
193impl I64Enum {
194    #[inline]
195    pub fn from_primitive(prim: i64) -> Option<Self> {
196        match prim {
197            -1 => Some(Self::KNegativeOne),
198            1 => Some(Self::KOne),
199            2 => Some(Self::KTwo),
200            3 => Some(Self::KThree),
201            4 => Some(Self::KFour),
202            _ => None,
203        }
204    }
205
206    #[inline]
207    pub const fn into_primitive(self) -> i64 {
208        self as i64
209    }
210}
211
212#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
213#[repr(i8)]
214pub enum I8Enum {
215    KNegativeOne = -1,
216    KOne = 1,
217}
218
219impl I8Enum {
220    #[inline]
221    pub fn from_primitive(prim: i8) -> Option<Self> {
222        match prim {
223            -1 => Some(Self::KNegativeOne),
224            1 => Some(Self::KOne),
225            _ => None,
226        }
227    }
228
229    #[inline]
230    pub const fn into_primitive(self) -> i8 {
231        self as i8
232    }
233}
234
235#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
236#[repr(u16)]
237pub enum U16Enum {
238    KOne = 1,
239    KTwo = 2,
240    KThree = 3,
241    KFour = 4,
242    KFive = 5,
243    KSix = 6,
244}
245
246impl U16Enum {
247    #[inline]
248    pub fn from_primitive(prim: u16) -> Option<Self> {
249        match prim {
250            1 => Some(Self::KOne),
251            2 => Some(Self::KTwo),
252            3 => Some(Self::KThree),
253            4 => Some(Self::KFour),
254            5 => Some(Self::KFive),
255            6 => Some(Self::KSix),
256            _ => None,
257        }
258    }
259
260    #[inline]
261    pub const fn into_primitive(self) -> u16 {
262        self as u16
263    }
264}
265
266#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
267#[repr(u32)]
268pub enum U32Enum {
269    KOne = 1,
270    KTwo = 2,
271    KThree = 3,
272    KFour = 4,
273    KFive = 5,
274    KSix = 6,
275    KSeven = 7,
276}
277
278impl U32Enum {
279    #[inline]
280    pub fn from_primitive(prim: u32) -> Option<Self> {
281        match prim {
282            1 => Some(Self::KOne),
283            2 => Some(Self::KTwo),
284            3 => Some(Self::KThree),
285            4 => Some(Self::KFour),
286            5 => Some(Self::KFive),
287            6 => Some(Self::KSix),
288            7 => Some(Self::KSeven),
289            _ => None,
290        }
291    }
292
293    #[inline]
294    pub const fn into_primitive(self) -> u32 {
295        self as u32
296    }
297}
298
299#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
300#[repr(u64)]
301pub enum U64Enum {
302    KOne = 1,
303    KTwo = 2,
304    KThree = 3,
305    KFour = 4,
306    KFive = 5,
307    KSix = 6,
308    KSeven = 7,
309    KEight = 8,
310}
311
312impl U64Enum {
313    #[inline]
314    pub fn from_primitive(prim: u64) -> Option<Self> {
315        match prim {
316            1 => Some(Self::KOne),
317            2 => Some(Self::KTwo),
318            3 => Some(Self::KThree),
319            4 => Some(Self::KFour),
320            5 => Some(Self::KFive),
321            6 => Some(Self::KSix),
322            7 => Some(Self::KSeven),
323            8 => Some(Self::KEight),
324            _ => None,
325        }
326    }
327
328    #[inline]
329    pub const fn into_primitive(self) -> u64 {
330        self as u64
331    }
332}
333
334#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
335#[repr(u8)]
336pub enum U8Enum {
337    KOne = 1,
338    KTwo = 2,
339    KThree = 3,
340    KFour = 4,
341    KFive = 5,
342}
343
344impl U8Enum {
345    #[inline]
346    pub fn from_primitive(prim: u8) -> Option<Self> {
347        match prim {
348            1 => Some(Self::KOne),
349            2 => Some(Self::KTwo),
350            3 => Some(Self::KThree),
351            4 => Some(Self::KFour),
352            5 => Some(Self::KFive),
353            _ => None,
354        }
355    }
356
357    #[inline]
358    pub const fn into_primitive(self) -> u8 {
359        self as u8
360    }
361}
362
363#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
364pub struct ConfigGetImplsResponse {
365    pub impls: Vec<String>,
366}
367
368impl fidl::Persistable for ConfigGetImplsResponse {}
369
370#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
371pub struct EchoEchoMinimalNoRetValRequest {
372    pub forward_to_server: String,
373}
374
375impl fidl::Persistable for EchoEchoMinimalNoRetValRequest {}
376
377#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
378pub struct EchoEchoMinimalRequest {
379    pub forward_to_server: String,
380}
381
382impl fidl::Persistable for EchoEchoMinimalRequest {}
383
384#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
385pub struct EchoEchoMinimalWithErrorRequest {
386    pub forward_to_server: String,
387    pub result_variant: RespondWith,
388}
389
390impl fidl::Persistable for EchoEchoMinimalWithErrorRequest {}
391
392#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
393pub struct Signed {
394    pub value: i64,
395    pub forward_to_server: String,
396}
397
398impl fidl::Persistable for Signed {}
399
400#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
401pub struct SignedErrorable {
402    pub value: i64,
403    pub forward_to_server: String,
404    pub result_err: DefaultEnum,
405    pub result_variant: RespondWith,
406}
407
408impl fidl::Persistable for SignedErrorable {}
409
410#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
411pub struct Unsigned {
412    pub value: u64,
413    pub forward_to_server: String,
414}
415
416impl fidl::Persistable for Unsigned {}
417
418#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
419pub struct UnsignedErrorable {
420    pub value: u64,
421    pub forward_to_server: String,
422    pub result_err: DefaultEnum,
423    pub result_variant: RespondWith,
424}
425
426impl fidl::Persistable for UnsignedErrorable {}
427
428#[derive(Clone, Debug, PartialEq, PartialOrd)]
429pub struct DefaultValues {
430    pub b1: bool,
431    pub b2: bool,
432    pub i8: i8,
433    pub i16: i16,
434    pub i32: i32,
435    pub i64: i64,
436    pub u8: u8,
437    pub u16: u16,
438    pub u32: u32,
439    pub u64: u64,
440    pub f32: f32,
441    pub f64: f64,
442    pub s: String,
443}
444
445impl fidl::Persistable for DefaultValues {}
446
447#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
448pub struct PrimitiveTypes {
449    pub b: bool,
450    pub i8: i8,
451    pub i16: i16,
452    pub i32: i32,
453    pub i64: i64,
454    pub u8: u8,
455    pub u16: u16,
456    pub u32: u32,
457    pub u64: u64,
458    pub f32: f32,
459    pub f64: f64,
460}
461
462impl fidl::Persistable for PrimitiveTypes {}
463
464#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
465pub struct Strings {
466    pub s: String,
467    pub nullable_s: Option<String>,
468    pub size_0_s: String,
469    pub size_1_s: String,
470    pub nullable_size_0_s: Option<String>,
471    pub nullable_size_1_s: Option<String>,
472}
473
474impl fidl::Persistable for Strings {}
475
476#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
477pub struct Structs {
478    pub s: ThisIsAStruct,
479    pub nullable_s: Option<Box<ThisIsAStruct>>,
480    pub es: ThisIsAnEmptyStruct,
481}
482
483impl fidl::Persistable for Structs {}
484
485#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
486pub struct ThisIsAStruct {
487    pub s: String,
488}
489
490impl fidl::Persistable for ThisIsAStruct {}
491
492#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
493pub struct ThisIsAnEmptyStruct;
494
495impl fidl::Persistable for ThisIsAnEmptyStruct {}
496
497#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
498pub struct Unions {
499    pub u: ThisIsAUnion,
500    pub nullable_u: Option<Box<ThisIsAUnion>>,
501}
502
503impl fidl::Persistable for Unions {}
504
505#[derive(Clone, Debug, Default, PartialEq)]
506pub struct EchoEchoTablePayloadWithErrorRequest {
507    pub value: Option<u64>,
508    pub forward_to_server: Option<String>,
509    pub result_err: Option<DefaultEnum>,
510    pub result_variant: Option<RespondWith>,
511    #[doc(hidden)]
512    pub __source_breaking: fidl::marker::SourceBreaking,
513}
514
515impl fidl::Persistable for EchoEchoTablePayloadWithErrorRequest {}
516
517#[derive(Clone, Debug, Default, PartialEq)]
518pub struct RequestTable {
519    pub value: Option<u64>,
520    pub forward_to_server: Option<String>,
521    #[doc(hidden)]
522    pub __source_breaking: fidl::marker::SourceBreaking,
523}
524
525impl fidl::Persistable for RequestTable {}
526
527#[derive(Clone, Debug, Default, PartialEq)]
528pub struct ResponseTable {
529    pub value: Option<u64>,
530    #[doc(hidden)]
531    pub __source_breaking: fidl::marker::SourceBreaking,
532}
533
534impl fidl::Persistable for ResponseTable {}
535
536#[derive(Clone, Debug, Default, PartialEq)]
537pub struct ThisIsATable {
538    pub s: Option<String>,
539    #[doc(hidden)]
540    pub __source_breaking: fidl::marker::SourceBreaking,
541}
542
543impl fidl::Persistable for ThisIsATable {}
544
545#[derive(Clone, Debug)]
546pub enum EchoEchoUnionPayloadWithErrorRequest {
547    Unsigned(UnsignedErrorable),
548    Signed(SignedErrorable),
549    #[doc(hidden)]
550    __SourceBreaking {
551        unknown_ordinal: u64,
552    },
553}
554
555/// Pattern that matches an unknown `EchoEchoUnionPayloadWithErrorRequest` member.
556#[macro_export]
557macro_rules! EchoEchoUnionPayloadWithErrorRequestUnknown {
558    () => {
559        _
560    };
561}
562
563// Custom PartialEq so that unknown variants are not equal to themselves.
564impl PartialEq for EchoEchoUnionPayloadWithErrorRequest {
565    fn eq(&self, other: &Self) -> bool {
566        match (self, other) {
567            (Self::Unsigned(x), Self::Unsigned(y)) => *x == *y,
568            (Self::Signed(x), Self::Signed(y)) => *x == *y,
569            _ => false,
570        }
571    }
572}
573
574impl EchoEchoUnionPayloadWithErrorRequest {
575    #[inline]
576    pub fn ordinal(&self) -> u64 {
577        match *self {
578            Self::Unsigned(_) => 1,
579            Self::Signed(_) => 2,
580            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
581        }
582    }
583
584    #[inline]
585    pub fn unknown_variant_for_testing() -> Self {
586        Self::__SourceBreaking { unknown_ordinal: 0 }
587    }
588
589    #[inline]
590    pub fn is_unknown(&self) -> bool {
591        match self {
592            Self::__SourceBreaking { .. } => true,
593            _ => false,
594        }
595    }
596}
597
598impl fidl::Persistable for EchoEchoUnionPayloadWithErrorRequest {}
599
600#[derive(Clone, Debug)]
601pub enum RequestUnion {
602    Unsigned(Unsigned),
603    Signed(Signed),
604    #[doc(hidden)]
605    __SourceBreaking {
606        unknown_ordinal: u64,
607    },
608}
609
610/// Pattern that matches an unknown `RequestUnion` member.
611#[macro_export]
612macro_rules! RequestUnionUnknown {
613    () => {
614        _
615    };
616}
617
618// Custom PartialEq so that unknown variants are not equal to themselves.
619impl PartialEq for RequestUnion {
620    fn eq(&self, other: &Self) -> bool {
621        match (self, other) {
622            (Self::Unsigned(x), Self::Unsigned(y)) => *x == *y,
623            (Self::Signed(x), Self::Signed(y)) => *x == *y,
624            _ => false,
625        }
626    }
627}
628
629impl RequestUnion {
630    #[inline]
631    pub fn ordinal(&self) -> u64 {
632        match *self {
633            Self::Unsigned(_) => 1,
634            Self::Signed(_) => 2,
635            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
636        }
637    }
638
639    #[inline]
640    pub fn unknown_variant_for_testing() -> Self {
641        Self::__SourceBreaking { unknown_ordinal: 0 }
642    }
643
644    #[inline]
645    pub fn is_unknown(&self) -> bool {
646        match self {
647            Self::__SourceBreaking { .. } => true,
648            _ => false,
649        }
650    }
651}
652
653impl fidl::Persistable for RequestUnion {}
654
655#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
656pub enum ResponseUnion {
657    Unsigned(u64),
658    Signed(i64),
659}
660
661impl ResponseUnion {
662    #[inline]
663    pub fn ordinal(&self) -> u64 {
664        match *self {
665            Self::Unsigned(_) => 1,
666            Self::Signed(_) => 2,
667        }
668    }
669}
670
671impl fidl::Persistable for ResponseUnion {}
672
673#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
674pub enum ThisIsAUnion {
675    S(String),
676    B(bool),
677}
678
679impl ThisIsAUnion {
680    #[inline]
681    pub fn ordinal(&self) -> u64 {
682        match *self {
683            Self::S(_) => 1,
684            Self::B(_) => 2,
685        }
686    }
687}
688
689impl fidl::Persistable for ThisIsAUnion {}
690
691#[derive(Clone, Debug)]
692pub enum ThisIsAXunion {
693    S(String),
694    B(bool),
695    #[doc(hidden)]
696    __SourceBreaking {
697        unknown_ordinal: u64,
698    },
699}
700
701/// Pattern that matches an unknown `ThisIsAXunion` member.
702#[macro_export]
703macro_rules! ThisIsAXunionUnknown {
704    () => {
705        _
706    };
707}
708
709// Custom PartialEq so that unknown variants are not equal to themselves.
710impl PartialEq for ThisIsAXunion {
711    fn eq(&self, other: &Self) -> bool {
712        match (self, other) {
713            (Self::S(x), Self::S(y)) => *x == *y,
714            (Self::B(x), Self::B(y)) => *x == *y,
715            _ => false,
716        }
717    }
718}
719
720impl ThisIsAXunion {
721    #[inline]
722    pub fn ordinal(&self) -> u64 {
723        match *self {
724            Self::S(_) => 1,
725            Self::B(_) => 2,
726            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
727        }
728    }
729
730    #[inline]
731    pub fn unknown_variant_for_testing() -> Self {
732        Self::__SourceBreaking { unknown_ordinal: 0 }
733    }
734
735    #[inline]
736    pub fn is_unknown(&self) -> bool {
737        match self {
738            Self::__SourceBreaking { .. } => true,
739            _ => false,
740        }
741    }
742}
743
744impl fidl::Persistable for ThisIsAXunion {}
745
746pub mod config_ordinals {
747    pub const GET_IMPLS: u64 = 0x3b360c86a6dbdfe0;
748}
749
750pub mod echo_ordinals {
751    pub const ECHO_TABLE_REQUEST_COMPOSED: u64 = 0x1d545c738c7a8ee;
752    pub const ECHO_UNION_RESPONSE_WITH_ERROR_COMPOSED: u64 = 0x38a67e88d6106443;
753    pub const ECHO_MINIMAL: u64 = 0x39edd68c837482ec;
754    pub const ECHO_MINIMAL_WITH_ERROR: u64 = 0x36f4695996e35acc;
755    pub const ECHO_MINIMAL_NO_RET_VAL: u64 = 0x42693c143e2c3694;
756    pub const ECHO_MINIMAL_EVENT: u64 = 0x273b2029f1a0aee2;
757    pub const ECHO_STRUCT: u64 = 0x4c2f85818cc53f37;
758    pub const ECHO_STRUCT_WITH_ERROR: u64 = 0x46cb32652c4c0899;
759    pub const ECHO_STRUCT_NO_RET_VAL: u64 = 0x1f763e602cf5892a;
760    pub const ECHO_EVENT: u64 = 0x1219e12e0450024;
761    pub const ECHO_ARRAYS: u64 = 0x1b6019d5611f2470;
762    pub const ECHO_ARRAYS_WITH_ERROR: u64 = 0x6dbf26e67e253afa;
763    pub const ECHO_VECTORS: u64 = 0x1582623f0d9f6e5e;
764    pub const ECHO_VECTORS_WITH_ERROR: u64 = 0x730f163401e2b3e5;
765    pub const ECHO_TABLE: u64 = 0x4f1fb0a512f47c4b;
766    pub const ECHO_TABLE_WITH_ERROR: u64 = 0x44e835cb1eb9a931;
767    pub const ECHO_XUNIONS: u64 = 0x3dc181909041a583;
768    pub const ECHO_XUNIONS_WITH_ERROR: u64 = 0x75184102667fa766;
769    pub const ECHO_NAMED_STRUCT: u64 = 0xf2d4aa9e65f7111;
770    pub const ECHO_NAMED_STRUCT_WITH_ERROR: u64 = 0x5766fee9e74442e8;
771    pub const ECHO_NAMED_STRUCT_NO_RET_VAL: u64 = 0x3a50bbf7d2113ad7;
772    pub const ON_ECHO_NAMED_EVENT: u64 = 0x749ebde83348a374;
773    pub const ECHO_TABLE_PAYLOAD: u64 = 0x641d98087378c003;
774    pub const ECHO_TABLE_PAYLOAD_WITH_ERROR: u64 = 0x636ed243761ab66d;
775    pub const ECHO_TABLE_PAYLOAD_NO_RET_VAL: u64 = 0x32961f7d718569f8;
776    pub const ON_ECHO_TABLE_PAYLOAD_EVENT: u64 = 0x708dddea1cb98430;
777    pub const ECHO_UNION_PAYLOAD: u64 = 0x66def9e793f10c55;
778    pub const ECHO_UNION_PAYLOAD_WITH_ERROR: u64 = 0x1be890d6e68ef063;
779    pub const ECHO_UNION_PAYLOAD_NO_RET_VAL: u64 = 0x11518bf346430040;
780    pub const ON_ECHO_UNION_PAYLOAD_EVENT: u64 = 0x642f4c265a05f4c0;
781}
782
783mod internal {
784    use super::*;
785    unsafe impl fidl::encoding::TypeMarker for DefaultBits {
786        type Owned = Self;
787
788        #[inline(always)]
789        fn inline_align(_context: fidl::encoding::Context) -> usize {
790            4
791        }
792
793        #[inline(always)]
794        fn inline_size(_context: fidl::encoding::Context) -> usize {
795            4
796        }
797    }
798
799    impl fidl::encoding::ValueTypeMarker for DefaultBits {
800        type Borrowed<'a> = Self;
801        #[inline(always)]
802        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
803            *value
804        }
805    }
806
807    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DefaultBits {
808        #[inline]
809        unsafe fn encode(
810            self,
811            encoder: &mut fidl::encoding::Encoder<'_, D>,
812            offset: usize,
813            _depth: fidl::encoding::Depth,
814        ) -> fidl::Result<()> {
815            encoder.debug_check_bounds::<Self>(offset);
816            if self.bits() & Self::all().bits() != self.bits() {
817                return Err(fidl::Error::InvalidBitsValue);
818            }
819            encoder.write_num(self.bits(), offset);
820            Ok(())
821        }
822    }
823
824    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DefaultBits {
825        #[inline(always)]
826        fn new_empty() -> Self {
827            Self::empty()
828        }
829
830        #[inline]
831        unsafe fn decode(
832            &mut self,
833            decoder: &mut fidl::encoding::Decoder<'_, D>,
834            offset: usize,
835            _depth: fidl::encoding::Depth,
836        ) -> fidl::Result<()> {
837            decoder.debug_check_bounds::<Self>(offset);
838            let prim = decoder.read_num::<u32>(offset);
839            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
840            Ok(())
841        }
842    }
843    unsafe impl fidl::encoding::TypeMarker for U16Bits {
844        type Owned = Self;
845
846        #[inline(always)]
847        fn inline_align(_context: fidl::encoding::Context) -> usize {
848            2
849        }
850
851        #[inline(always)]
852        fn inline_size(_context: fidl::encoding::Context) -> usize {
853            2
854        }
855    }
856
857    impl fidl::encoding::ValueTypeMarker for U16Bits {
858        type Borrowed<'a> = Self;
859        #[inline(always)]
860        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
861            *value
862        }
863    }
864
865    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U16Bits {
866        #[inline]
867        unsafe fn encode(
868            self,
869            encoder: &mut fidl::encoding::Encoder<'_, D>,
870            offset: usize,
871            _depth: fidl::encoding::Depth,
872        ) -> fidl::Result<()> {
873            encoder.debug_check_bounds::<Self>(offset);
874            if self.bits() & Self::all().bits() != self.bits() {
875                return Err(fidl::Error::InvalidBitsValue);
876            }
877            encoder.write_num(self.bits(), offset);
878            Ok(())
879        }
880    }
881
882    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U16Bits {
883        #[inline(always)]
884        fn new_empty() -> Self {
885            Self::empty()
886        }
887
888        #[inline]
889        unsafe fn decode(
890            &mut self,
891            decoder: &mut fidl::encoding::Decoder<'_, D>,
892            offset: usize,
893            _depth: fidl::encoding::Depth,
894        ) -> fidl::Result<()> {
895            decoder.debug_check_bounds::<Self>(offset);
896            let prim = decoder.read_num::<u16>(offset);
897            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
898            Ok(())
899        }
900    }
901    unsafe impl fidl::encoding::TypeMarker for U32Bits {
902        type Owned = Self;
903
904        #[inline(always)]
905        fn inline_align(_context: fidl::encoding::Context) -> usize {
906            4
907        }
908
909        #[inline(always)]
910        fn inline_size(_context: fidl::encoding::Context) -> usize {
911            4
912        }
913    }
914
915    impl fidl::encoding::ValueTypeMarker for U32Bits {
916        type Borrowed<'a> = Self;
917        #[inline(always)]
918        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
919            *value
920        }
921    }
922
923    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U32Bits {
924        #[inline]
925        unsafe fn encode(
926            self,
927            encoder: &mut fidl::encoding::Encoder<'_, D>,
928            offset: usize,
929            _depth: fidl::encoding::Depth,
930        ) -> fidl::Result<()> {
931            encoder.debug_check_bounds::<Self>(offset);
932            if self.bits() & Self::all().bits() != self.bits() {
933                return Err(fidl::Error::InvalidBitsValue);
934            }
935            encoder.write_num(self.bits(), offset);
936            Ok(())
937        }
938    }
939
940    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U32Bits {
941        #[inline(always)]
942        fn new_empty() -> Self {
943            Self::empty()
944        }
945
946        #[inline]
947        unsafe fn decode(
948            &mut self,
949            decoder: &mut fidl::encoding::Decoder<'_, D>,
950            offset: usize,
951            _depth: fidl::encoding::Depth,
952        ) -> fidl::Result<()> {
953            decoder.debug_check_bounds::<Self>(offset);
954            let prim = decoder.read_num::<u32>(offset);
955            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
956            Ok(())
957        }
958    }
959    unsafe impl fidl::encoding::TypeMarker for U64Bits {
960        type Owned = Self;
961
962        #[inline(always)]
963        fn inline_align(_context: fidl::encoding::Context) -> usize {
964            8
965        }
966
967        #[inline(always)]
968        fn inline_size(_context: fidl::encoding::Context) -> usize {
969            8
970        }
971    }
972
973    impl fidl::encoding::ValueTypeMarker for U64Bits {
974        type Borrowed<'a> = Self;
975        #[inline(always)]
976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
977            *value
978        }
979    }
980
981    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U64Bits {
982        #[inline]
983        unsafe fn encode(
984            self,
985            encoder: &mut fidl::encoding::Encoder<'_, D>,
986            offset: usize,
987            _depth: fidl::encoding::Depth,
988        ) -> fidl::Result<()> {
989            encoder.debug_check_bounds::<Self>(offset);
990            if self.bits() & Self::all().bits() != self.bits() {
991                return Err(fidl::Error::InvalidBitsValue);
992            }
993            encoder.write_num(self.bits(), offset);
994            Ok(())
995        }
996    }
997
998    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U64Bits {
999        #[inline(always)]
1000        fn new_empty() -> Self {
1001            Self::empty()
1002        }
1003
1004        #[inline]
1005        unsafe fn decode(
1006            &mut self,
1007            decoder: &mut fidl::encoding::Decoder<'_, D>,
1008            offset: usize,
1009            _depth: fidl::encoding::Depth,
1010        ) -> fidl::Result<()> {
1011            decoder.debug_check_bounds::<Self>(offset);
1012            let prim = decoder.read_num::<u64>(offset);
1013            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
1014            Ok(())
1015        }
1016    }
1017    unsafe impl fidl::encoding::TypeMarker for U8Bits {
1018        type Owned = Self;
1019
1020        #[inline(always)]
1021        fn inline_align(_context: fidl::encoding::Context) -> usize {
1022            1
1023        }
1024
1025        #[inline(always)]
1026        fn inline_size(_context: fidl::encoding::Context) -> usize {
1027            1
1028        }
1029    }
1030
1031    impl fidl::encoding::ValueTypeMarker for U8Bits {
1032        type Borrowed<'a> = Self;
1033        #[inline(always)]
1034        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1035            *value
1036        }
1037    }
1038
1039    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U8Bits {
1040        #[inline]
1041        unsafe fn encode(
1042            self,
1043            encoder: &mut fidl::encoding::Encoder<'_, D>,
1044            offset: usize,
1045            _depth: fidl::encoding::Depth,
1046        ) -> fidl::Result<()> {
1047            encoder.debug_check_bounds::<Self>(offset);
1048            if self.bits() & Self::all().bits() != self.bits() {
1049                return Err(fidl::Error::InvalidBitsValue);
1050            }
1051            encoder.write_num(self.bits(), offset);
1052            Ok(())
1053        }
1054    }
1055
1056    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U8Bits {
1057        #[inline(always)]
1058        fn new_empty() -> Self {
1059            Self::empty()
1060        }
1061
1062        #[inline]
1063        unsafe fn decode(
1064            &mut self,
1065            decoder: &mut fidl::encoding::Decoder<'_, D>,
1066            offset: usize,
1067            _depth: fidl::encoding::Depth,
1068        ) -> fidl::Result<()> {
1069            decoder.debug_check_bounds::<Self>(offset);
1070            let prim = decoder.read_num::<u8>(offset);
1071            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
1072            Ok(())
1073        }
1074    }
1075    unsafe impl fidl::encoding::TypeMarker for RespondWith {
1076        type Owned = Self;
1077
1078        #[inline(always)]
1079        fn inline_align(_context: fidl::encoding::Context) -> usize {
1080            std::mem::align_of::<u32>()
1081        }
1082
1083        #[inline(always)]
1084        fn inline_size(_context: fidl::encoding::Context) -> usize {
1085            std::mem::size_of::<u32>()
1086        }
1087
1088        #[inline(always)]
1089        fn encode_is_copy() -> bool {
1090            true
1091        }
1092
1093        #[inline(always)]
1094        fn decode_is_copy() -> bool {
1095            false
1096        }
1097    }
1098
1099    impl fidl::encoding::ValueTypeMarker for RespondWith {
1100        type Borrowed<'a> = Self;
1101        #[inline(always)]
1102        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1103            *value
1104        }
1105    }
1106
1107    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RespondWith {
1108        #[inline]
1109        unsafe fn encode(
1110            self,
1111            encoder: &mut fidl::encoding::Encoder<'_, D>,
1112            offset: usize,
1113            _depth: fidl::encoding::Depth,
1114        ) -> fidl::Result<()> {
1115            encoder.debug_check_bounds::<Self>(offset);
1116            encoder.write_num(self.into_primitive(), offset);
1117            Ok(())
1118        }
1119    }
1120
1121    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RespondWith {
1122        #[inline(always)]
1123        fn new_empty() -> Self {
1124            Self::Success
1125        }
1126
1127        #[inline]
1128        unsafe fn decode(
1129            &mut self,
1130            decoder: &mut fidl::encoding::Decoder<'_, D>,
1131            offset: usize,
1132            _depth: fidl::encoding::Depth,
1133        ) -> fidl::Result<()> {
1134            decoder.debug_check_bounds::<Self>(offset);
1135            let prim = decoder.read_num::<u32>(offset);
1136
1137            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1138            Ok(())
1139        }
1140    }
1141    unsafe impl fidl::encoding::TypeMarker for DefaultEnum {
1142        type Owned = Self;
1143
1144        #[inline(always)]
1145        fn inline_align(_context: fidl::encoding::Context) -> usize {
1146            std::mem::align_of::<u32>()
1147        }
1148
1149        #[inline(always)]
1150        fn inline_size(_context: fidl::encoding::Context) -> usize {
1151            std::mem::size_of::<u32>()
1152        }
1153
1154        #[inline(always)]
1155        fn encode_is_copy() -> bool {
1156            true
1157        }
1158
1159        #[inline(always)]
1160        fn decode_is_copy() -> bool {
1161            false
1162        }
1163    }
1164
1165    impl fidl::encoding::ValueTypeMarker for DefaultEnum {
1166        type Borrowed<'a> = Self;
1167        #[inline(always)]
1168        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1169            *value
1170        }
1171    }
1172
1173    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DefaultEnum {
1174        #[inline]
1175        unsafe fn encode(
1176            self,
1177            encoder: &mut fidl::encoding::Encoder<'_, D>,
1178            offset: usize,
1179            _depth: fidl::encoding::Depth,
1180        ) -> fidl::Result<()> {
1181            encoder.debug_check_bounds::<Self>(offset);
1182            encoder.write_num(self.into_primitive(), offset);
1183            Ok(())
1184        }
1185    }
1186
1187    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DefaultEnum {
1188        #[inline(always)]
1189        fn new_empty() -> Self {
1190            Self::KZero
1191        }
1192
1193        #[inline]
1194        unsafe fn decode(
1195            &mut self,
1196            decoder: &mut fidl::encoding::Decoder<'_, D>,
1197            offset: usize,
1198            _depth: fidl::encoding::Depth,
1199        ) -> fidl::Result<()> {
1200            decoder.debug_check_bounds::<Self>(offset);
1201            let prim = decoder.read_num::<u32>(offset);
1202
1203            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1204            Ok(())
1205        }
1206    }
1207    unsafe impl fidl::encoding::TypeMarker for I16Enum {
1208        type Owned = Self;
1209
1210        #[inline(always)]
1211        fn inline_align(_context: fidl::encoding::Context) -> usize {
1212            std::mem::align_of::<i16>()
1213        }
1214
1215        #[inline(always)]
1216        fn inline_size(_context: fidl::encoding::Context) -> usize {
1217            std::mem::size_of::<i16>()
1218        }
1219
1220        #[inline(always)]
1221        fn encode_is_copy() -> bool {
1222            true
1223        }
1224
1225        #[inline(always)]
1226        fn decode_is_copy() -> bool {
1227            false
1228        }
1229    }
1230
1231    impl fidl::encoding::ValueTypeMarker for I16Enum {
1232        type Borrowed<'a> = Self;
1233        #[inline(always)]
1234        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1235            *value
1236        }
1237    }
1238
1239    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I16Enum {
1240        #[inline]
1241        unsafe fn encode(
1242            self,
1243            encoder: &mut fidl::encoding::Encoder<'_, D>,
1244            offset: usize,
1245            _depth: fidl::encoding::Depth,
1246        ) -> fidl::Result<()> {
1247            encoder.debug_check_bounds::<Self>(offset);
1248            encoder.write_num(self.into_primitive(), offset);
1249            Ok(())
1250        }
1251    }
1252
1253    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I16Enum {
1254        #[inline(always)]
1255        fn new_empty() -> Self {
1256            Self::KNegativeOne
1257        }
1258
1259        #[inline]
1260        unsafe fn decode(
1261            &mut self,
1262            decoder: &mut fidl::encoding::Decoder<'_, D>,
1263            offset: usize,
1264            _depth: fidl::encoding::Depth,
1265        ) -> fidl::Result<()> {
1266            decoder.debug_check_bounds::<Self>(offset);
1267            let prim = decoder.read_num::<i16>(offset);
1268
1269            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1270            Ok(())
1271        }
1272    }
1273    unsafe impl fidl::encoding::TypeMarker for I32Enum {
1274        type Owned = Self;
1275
1276        #[inline(always)]
1277        fn inline_align(_context: fidl::encoding::Context) -> usize {
1278            std::mem::align_of::<i32>()
1279        }
1280
1281        #[inline(always)]
1282        fn inline_size(_context: fidl::encoding::Context) -> usize {
1283            std::mem::size_of::<i32>()
1284        }
1285
1286        #[inline(always)]
1287        fn encode_is_copy() -> bool {
1288            true
1289        }
1290
1291        #[inline(always)]
1292        fn decode_is_copy() -> bool {
1293            false
1294        }
1295    }
1296
1297    impl fidl::encoding::ValueTypeMarker for I32Enum {
1298        type Borrowed<'a> = Self;
1299        #[inline(always)]
1300        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1301            *value
1302        }
1303    }
1304
1305    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I32Enum {
1306        #[inline]
1307        unsafe fn encode(
1308            self,
1309            encoder: &mut fidl::encoding::Encoder<'_, D>,
1310            offset: usize,
1311            _depth: fidl::encoding::Depth,
1312        ) -> fidl::Result<()> {
1313            encoder.debug_check_bounds::<Self>(offset);
1314            encoder.write_num(self.into_primitive(), offset);
1315            Ok(())
1316        }
1317    }
1318
1319    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I32Enum {
1320        #[inline(always)]
1321        fn new_empty() -> Self {
1322            Self::KNegativeOne
1323        }
1324
1325        #[inline]
1326        unsafe fn decode(
1327            &mut self,
1328            decoder: &mut fidl::encoding::Decoder<'_, D>,
1329            offset: usize,
1330            _depth: fidl::encoding::Depth,
1331        ) -> fidl::Result<()> {
1332            decoder.debug_check_bounds::<Self>(offset);
1333            let prim = decoder.read_num::<i32>(offset);
1334
1335            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1336            Ok(())
1337        }
1338    }
1339    unsafe impl fidl::encoding::TypeMarker for I64Enum {
1340        type Owned = Self;
1341
1342        #[inline(always)]
1343        fn inline_align(_context: fidl::encoding::Context) -> usize {
1344            std::mem::align_of::<i64>()
1345        }
1346
1347        #[inline(always)]
1348        fn inline_size(_context: fidl::encoding::Context) -> usize {
1349            std::mem::size_of::<i64>()
1350        }
1351
1352        #[inline(always)]
1353        fn encode_is_copy() -> bool {
1354            true
1355        }
1356
1357        #[inline(always)]
1358        fn decode_is_copy() -> bool {
1359            false
1360        }
1361    }
1362
1363    impl fidl::encoding::ValueTypeMarker for I64Enum {
1364        type Borrowed<'a> = Self;
1365        #[inline(always)]
1366        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1367            *value
1368        }
1369    }
1370
1371    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I64Enum {
1372        #[inline]
1373        unsafe fn encode(
1374            self,
1375            encoder: &mut fidl::encoding::Encoder<'_, D>,
1376            offset: usize,
1377            _depth: fidl::encoding::Depth,
1378        ) -> fidl::Result<()> {
1379            encoder.debug_check_bounds::<Self>(offset);
1380            encoder.write_num(self.into_primitive(), offset);
1381            Ok(())
1382        }
1383    }
1384
1385    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I64Enum {
1386        #[inline(always)]
1387        fn new_empty() -> Self {
1388            Self::KNegativeOne
1389        }
1390
1391        #[inline]
1392        unsafe fn decode(
1393            &mut self,
1394            decoder: &mut fidl::encoding::Decoder<'_, D>,
1395            offset: usize,
1396            _depth: fidl::encoding::Depth,
1397        ) -> fidl::Result<()> {
1398            decoder.debug_check_bounds::<Self>(offset);
1399            let prim = decoder.read_num::<i64>(offset);
1400
1401            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1402            Ok(())
1403        }
1404    }
1405    unsafe impl fidl::encoding::TypeMarker for I8Enum {
1406        type Owned = Self;
1407
1408        #[inline(always)]
1409        fn inline_align(_context: fidl::encoding::Context) -> usize {
1410            std::mem::align_of::<i8>()
1411        }
1412
1413        #[inline(always)]
1414        fn inline_size(_context: fidl::encoding::Context) -> usize {
1415            std::mem::size_of::<i8>()
1416        }
1417
1418        #[inline(always)]
1419        fn encode_is_copy() -> bool {
1420            true
1421        }
1422
1423        #[inline(always)]
1424        fn decode_is_copy() -> bool {
1425            false
1426        }
1427    }
1428
1429    impl fidl::encoding::ValueTypeMarker for I8Enum {
1430        type Borrowed<'a> = Self;
1431        #[inline(always)]
1432        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1433            *value
1434        }
1435    }
1436
1437    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for I8Enum {
1438        #[inline]
1439        unsafe fn encode(
1440            self,
1441            encoder: &mut fidl::encoding::Encoder<'_, D>,
1442            offset: usize,
1443            _depth: fidl::encoding::Depth,
1444        ) -> fidl::Result<()> {
1445            encoder.debug_check_bounds::<Self>(offset);
1446            encoder.write_num(self.into_primitive(), offset);
1447            Ok(())
1448        }
1449    }
1450
1451    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for I8Enum {
1452        #[inline(always)]
1453        fn new_empty() -> Self {
1454            Self::KNegativeOne
1455        }
1456
1457        #[inline]
1458        unsafe fn decode(
1459            &mut self,
1460            decoder: &mut fidl::encoding::Decoder<'_, D>,
1461            offset: usize,
1462            _depth: fidl::encoding::Depth,
1463        ) -> fidl::Result<()> {
1464            decoder.debug_check_bounds::<Self>(offset);
1465            let prim = decoder.read_num::<i8>(offset);
1466
1467            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1468            Ok(())
1469        }
1470    }
1471    unsafe impl fidl::encoding::TypeMarker for U16Enum {
1472        type Owned = Self;
1473
1474        #[inline(always)]
1475        fn inline_align(_context: fidl::encoding::Context) -> usize {
1476            std::mem::align_of::<u16>()
1477        }
1478
1479        #[inline(always)]
1480        fn inline_size(_context: fidl::encoding::Context) -> usize {
1481            std::mem::size_of::<u16>()
1482        }
1483
1484        #[inline(always)]
1485        fn encode_is_copy() -> bool {
1486            true
1487        }
1488
1489        #[inline(always)]
1490        fn decode_is_copy() -> bool {
1491            false
1492        }
1493    }
1494
1495    impl fidl::encoding::ValueTypeMarker for U16Enum {
1496        type Borrowed<'a> = Self;
1497        #[inline(always)]
1498        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1499            *value
1500        }
1501    }
1502
1503    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U16Enum {
1504        #[inline]
1505        unsafe fn encode(
1506            self,
1507            encoder: &mut fidl::encoding::Encoder<'_, D>,
1508            offset: usize,
1509            _depth: fidl::encoding::Depth,
1510        ) -> fidl::Result<()> {
1511            encoder.debug_check_bounds::<Self>(offset);
1512            encoder.write_num(self.into_primitive(), offset);
1513            Ok(())
1514        }
1515    }
1516
1517    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U16Enum {
1518        #[inline(always)]
1519        fn new_empty() -> Self {
1520            Self::KOne
1521        }
1522
1523        #[inline]
1524        unsafe fn decode(
1525            &mut self,
1526            decoder: &mut fidl::encoding::Decoder<'_, D>,
1527            offset: usize,
1528            _depth: fidl::encoding::Depth,
1529        ) -> fidl::Result<()> {
1530            decoder.debug_check_bounds::<Self>(offset);
1531            let prim = decoder.read_num::<u16>(offset);
1532
1533            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1534            Ok(())
1535        }
1536    }
1537    unsafe impl fidl::encoding::TypeMarker for U32Enum {
1538        type Owned = Self;
1539
1540        #[inline(always)]
1541        fn inline_align(_context: fidl::encoding::Context) -> usize {
1542            std::mem::align_of::<u32>()
1543        }
1544
1545        #[inline(always)]
1546        fn inline_size(_context: fidl::encoding::Context) -> usize {
1547            std::mem::size_of::<u32>()
1548        }
1549
1550        #[inline(always)]
1551        fn encode_is_copy() -> bool {
1552            true
1553        }
1554
1555        #[inline(always)]
1556        fn decode_is_copy() -> bool {
1557            false
1558        }
1559    }
1560
1561    impl fidl::encoding::ValueTypeMarker for U32Enum {
1562        type Borrowed<'a> = Self;
1563        #[inline(always)]
1564        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1565            *value
1566        }
1567    }
1568
1569    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U32Enum {
1570        #[inline]
1571        unsafe fn encode(
1572            self,
1573            encoder: &mut fidl::encoding::Encoder<'_, D>,
1574            offset: usize,
1575            _depth: fidl::encoding::Depth,
1576        ) -> fidl::Result<()> {
1577            encoder.debug_check_bounds::<Self>(offset);
1578            encoder.write_num(self.into_primitive(), offset);
1579            Ok(())
1580        }
1581    }
1582
1583    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U32Enum {
1584        #[inline(always)]
1585        fn new_empty() -> Self {
1586            Self::KOne
1587        }
1588
1589        #[inline]
1590        unsafe fn decode(
1591            &mut self,
1592            decoder: &mut fidl::encoding::Decoder<'_, D>,
1593            offset: usize,
1594            _depth: fidl::encoding::Depth,
1595        ) -> fidl::Result<()> {
1596            decoder.debug_check_bounds::<Self>(offset);
1597            let prim = decoder.read_num::<u32>(offset);
1598
1599            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1600            Ok(())
1601        }
1602    }
1603    unsafe impl fidl::encoding::TypeMarker for U64Enum {
1604        type Owned = Self;
1605
1606        #[inline(always)]
1607        fn inline_align(_context: fidl::encoding::Context) -> usize {
1608            std::mem::align_of::<u64>()
1609        }
1610
1611        #[inline(always)]
1612        fn inline_size(_context: fidl::encoding::Context) -> usize {
1613            std::mem::size_of::<u64>()
1614        }
1615
1616        #[inline(always)]
1617        fn encode_is_copy() -> bool {
1618            true
1619        }
1620
1621        #[inline(always)]
1622        fn decode_is_copy() -> bool {
1623            false
1624        }
1625    }
1626
1627    impl fidl::encoding::ValueTypeMarker for U64Enum {
1628        type Borrowed<'a> = Self;
1629        #[inline(always)]
1630        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1631            *value
1632        }
1633    }
1634
1635    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U64Enum {
1636        #[inline]
1637        unsafe fn encode(
1638            self,
1639            encoder: &mut fidl::encoding::Encoder<'_, D>,
1640            offset: usize,
1641            _depth: fidl::encoding::Depth,
1642        ) -> fidl::Result<()> {
1643            encoder.debug_check_bounds::<Self>(offset);
1644            encoder.write_num(self.into_primitive(), offset);
1645            Ok(())
1646        }
1647    }
1648
1649    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U64Enum {
1650        #[inline(always)]
1651        fn new_empty() -> Self {
1652            Self::KOne
1653        }
1654
1655        #[inline]
1656        unsafe fn decode(
1657            &mut self,
1658            decoder: &mut fidl::encoding::Decoder<'_, D>,
1659            offset: usize,
1660            _depth: fidl::encoding::Depth,
1661        ) -> fidl::Result<()> {
1662            decoder.debug_check_bounds::<Self>(offset);
1663            let prim = decoder.read_num::<u64>(offset);
1664
1665            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1666            Ok(())
1667        }
1668    }
1669    unsafe impl fidl::encoding::TypeMarker for U8Enum {
1670        type Owned = Self;
1671
1672        #[inline(always)]
1673        fn inline_align(_context: fidl::encoding::Context) -> usize {
1674            std::mem::align_of::<u8>()
1675        }
1676
1677        #[inline(always)]
1678        fn inline_size(_context: fidl::encoding::Context) -> usize {
1679            std::mem::size_of::<u8>()
1680        }
1681
1682        #[inline(always)]
1683        fn encode_is_copy() -> bool {
1684            true
1685        }
1686
1687        #[inline(always)]
1688        fn decode_is_copy() -> bool {
1689            false
1690        }
1691    }
1692
1693    impl fidl::encoding::ValueTypeMarker for U8Enum {
1694        type Borrowed<'a> = Self;
1695        #[inline(always)]
1696        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1697            *value
1698        }
1699    }
1700
1701    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for U8Enum {
1702        #[inline]
1703        unsafe fn encode(
1704            self,
1705            encoder: &mut fidl::encoding::Encoder<'_, D>,
1706            offset: usize,
1707            _depth: fidl::encoding::Depth,
1708        ) -> fidl::Result<()> {
1709            encoder.debug_check_bounds::<Self>(offset);
1710            encoder.write_num(self.into_primitive(), offset);
1711            Ok(())
1712        }
1713    }
1714
1715    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for U8Enum {
1716        #[inline(always)]
1717        fn new_empty() -> Self {
1718            Self::KOne
1719        }
1720
1721        #[inline]
1722        unsafe fn decode(
1723            &mut self,
1724            decoder: &mut fidl::encoding::Decoder<'_, D>,
1725            offset: usize,
1726            _depth: fidl::encoding::Depth,
1727        ) -> fidl::Result<()> {
1728            decoder.debug_check_bounds::<Self>(offset);
1729            let prim = decoder.read_num::<u8>(offset);
1730
1731            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1732            Ok(())
1733        }
1734    }
1735
1736    impl fidl::encoding::ValueTypeMarker for ConfigGetImplsResponse {
1737        type Borrowed<'a> = &'a Self;
1738        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1739            value
1740        }
1741    }
1742
1743    unsafe impl fidl::encoding::TypeMarker for ConfigGetImplsResponse {
1744        type Owned = Self;
1745
1746        #[inline(always)]
1747        fn inline_align(_context: fidl::encoding::Context) -> usize {
1748            8
1749        }
1750
1751        #[inline(always)]
1752        fn inline_size(_context: fidl::encoding::Context) -> usize {
1753            16
1754        }
1755    }
1756
1757    unsafe impl<D: fidl::encoding::ResourceDialect>
1758        fidl::encoding::Encode<ConfigGetImplsResponse, D> for &ConfigGetImplsResponse
1759    {
1760        #[inline]
1761        unsafe fn encode(
1762            self,
1763            encoder: &mut fidl::encoding::Encoder<'_, D>,
1764            offset: usize,
1765            _depth: fidl::encoding::Depth,
1766        ) -> fidl::Result<()> {
1767            encoder.debug_check_bounds::<ConfigGetImplsResponse>(offset);
1768            // Delegate to tuple encoding.
1769            fidl::encoding::Encode::<ConfigGetImplsResponse, D>::encode(
1770                (
1771                    <fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.impls),
1772                ),
1773                encoder, offset, _depth
1774            )
1775        }
1776    }
1777    unsafe impl<
1778        D: fidl::encoding::ResourceDialect,
1779        T0: fidl::encoding::Encode<
1780                fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
1781                D,
1782            >,
1783    > fidl::encoding::Encode<ConfigGetImplsResponse, D> for (T0,)
1784    {
1785        #[inline]
1786        unsafe fn encode(
1787            self,
1788            encoder: &mut fidl::encoding::Encoder<'_, D>,
1789            offset: usize,
1790            depth: fidl::encoding::Depth,
1791        ) -> fidl::Result<()> {
1792            encoder.debug_check_bounds::<ConfigGetImplsResponse>(offset);
1793            // Zero out padding regions. There's no need to apply masks
1794            // because the unmasked parts will be overwritten by fields.
1795            // Write the fields.
1796            self.0.encode(encoder, offset + 0, depth)?;
1797            Ok(())
1798        }
1799    }
1800
1801    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1802        for ConfigGetImplsResponse
1803    {
1804        #[inline(always)]
1805        fn new_empty() -> Self {
1806            Self {
1807                impls: fidl::new_empty!(
1808                    fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
1809                    D
1810                ),
1811            }
1812        }
1813
1814        #[inline]
1815        unsafe fn decode(
1816            &mut self,
1817            decoder: &mut fidl::encoding::Decoder<'_, D>,
1818            offset: usize,
1819            _depth: fidl::encoding::Depth,
1820        ) -> fidl::Result<()> {
1821            decoder.debug_check_bounds::<Self>(offset);
1822            // Verify that padding bytes are zero.
1823            fidl::decode!(
1824                fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
1825                D,
1826                &mut self.impls,
1827                decoder,
1828                offset + 0,
1829                _depth
1830            )?;
1831            Ok(())
1832        }
1833    }
1834
1835    impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalNoRetValRequest {
1836        type Borrowed<'a> = &'a Self;
1837        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1838            value
1839        }
1840    }
1841
1842    unsafe impl fidl::encoding::TypeMarker for EchoEchoMinimalNoRetValRequest {
1843        type Owned = Self;
1844
1845        #[inline(always)]
1846        fn inline_align(_context: fidl::encoding::Context) -> usize {
1847            8
1848        }
1849
1850        #[inline(always)]
1851        fn inline_size(_context: fidl::encoding::Context) -> usize {
1852            16
1853        }
1854    }
1855
1856    unsafe impl<D: fidl::encoding::ResourceDialect>
1857        fidl::encoding::Encode<EchoEchoMinimalNoRetValRequest, D>
1858        for &EchoEchoMinimalNoRetValRequest
1859    {
1860        #[inline]
1861        unsafe fn encode(
1862            self,
1863            encoder: &mut fidl::encoding::Encoder<'_, D>,
1864            offset: usize,
1865            _depth: fidl::encoding::Depth,
1866        ) -> fidl::Result<()> {
1867            encoder.debug_check_bounds::<EchoEchoMinimalNoRetValRequest>(offset);
1868            // Delegate to tuple encoding.
1869            fidl::encoding::Encode::<EchoEchoMinimalNoRetValRequest, D>::encode(
1870                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1871                    &self.forward_to_server,
1872                ),),
1873                encoder,
1874                offset,
1875                _depth,
1876            )
1877        }
1878    }
1879    unsafe impl<
1880        D: fidl::encoding::ResourceDialect,
1881        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1882    > fidl::encoding::Encode<EchoEchoMinimalNoRetValRequest, D> for (T0,)
1883    {
1884        #[inline]
1885        unsafe fn encode(
1886            self,
1887            encoder: &mut fidl::encoding::Encoder<'_, D>,
1888            offset: usize,
1889            depth: fidl::encoding::Depth,
1890        ) -> fidl::Result<()> {
1891            encoder.debug_check_bounds::<EchoEchoMinimalNoRetValRequest>(offset);
1892            // Zero out padding regions. There's no need to apply masks
1893            // because the unmasked parts will be overwritten by fields.
1894            // Write the fields.
1895            self.0.encode(encoder, offset + 0, depth)?;
1896            Ok(())
1897        }
1898    }
1899
1900    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1901        for EchoEchoMinimalNoRetValRequest
1902    {
1903        #[inline(always)]
1904        fn new_empty() -> Self {
1905            Self { forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
1906        }
1907
1908        #[inline]
1909        unsafe fn decode(
1910            &mut self,
1911            decoder: &mut fidl::encoding::Decoder<'_, D>,
1912            offset: usize,
1913            _depth: fidl::encoding::Depth,
1914        ) -> fidl::Result<()> {
1915            decoder.debug_check_bounds::<Self>(offset);
1916            // Verify that padding bytes are zero.
1917            fidl::decode!(
1918                fidl::encoding::UnboundedString,
1919                D,
1920                &mut self.forward_to_server,
1921                decoder,
1922                offset + 0,
1923                _depth
1924            )?;
1925            Ok(())
1926        }
1927    }
1928
1929    impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalRequest {
1930        type Borrowed<'a> = &'a Self;
1931        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1932            value
1933        }
1934    }
1935
1936    unsafe impl fidl::encoding::TypeMarker for EchoEchoMinimalRequest {
1937        type Owned = Self;
1938
1939        #[inline(always)]
1940        fn inline_align(_context: fidl::encoding::Context) -> usize {
1941            8
1942        }
1943
1944        #[inline(always)]
1945        fn inline_size(_context: fidl::encoding::Context) -> usize {
1946            16
1947        }
1948    }
1949
1950    unsafe impl<D: fidl::encoding::ResourceDialect>
1951        fidl::encoding::Encode<EchoEchoMinimalRequest, D> for &EchoEchoMinimalRequest
1952    {
1953        #[inline]
1954        unsafe fn encode(
1955            self,
1956            encoder: &mut fidl::encoding::Encoder<'_, D>,
1957            offset: usize,
1958            _depth: fidl::encoding::Depth,
1959        ) -> fidl::Result<()> {
1960            encoder.debug_check_bounds::<EchoEchoMinimalRequest>(offset);
1961            // Delegate to tuple encoding.
1962            fidl::encoding::Encode::<EchoEchoMinimalRequest, D>::encode(
1963                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1964                    &self.forward_to_server,
1965                ),),
1966                encoder,
1967                offset,
1968                _depth,
1969            )
1970        }
1971    }
1972    unsafe impl<
1973        D: fidl::encoding::ResourceDialect,
1974        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1975    > fidl::encoding::Encode<EchoEchoMinimalRequest, D> for (T0,)
1976    {
1977        #[inline]
1978        unsafe fn encode(
1979            self,
1980            encoder: &mut fidl::encoding::Encoder<'_, D>,
1981            offset: usize,
1982            depth: fidl::encoding::Depth,
1983        ) -> fidl::Result<()> {
1984            encoder.debug_check_bounds::<EchoEchoMinimalRequest>(offset);
1985            // Zero out padding regions. There's no need to apply masks
1986            // because the unmasked parts will be overwritten by fields.
1987            // Write the fields.
1988            self.0.encode(encoder, offset + 0, depth)?;
1989            Ok(())
1990        }
1991    }
1992
1993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1994        for EchoEchoMinimalRequest
1995    {
1996        #[inline(always)]
1997        fn new_empty() -> Self {
1998            Self { forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
1999        }
2000
2001        #[inline]
2002        unsafe fn decode(
2003            &mut self,
2004            decoder: &mut fidl::encoding::Decoder<'_, D>,
2005            offset: usize,
2006            _depth: fidl::encoding::Depth,
2007        ) -> fidl::Result<()> {
2008            decoder.debug_check_bounds::<Self>(offset);
2009            // Verify that padding bytes are zero.
2010            fidl::decode!(
2011                fidl::encoding::UnboundedString,
2012                D,
2013                &mut self.forward_to_server,
2014                decoder,
2015                offset + 0,
2016                _depth
2017            )?;
2018            Ok(())
2019        }
2020    }
2021
2022    impl fidl::encoding::ValueTypeMarker for EchoEchoMinimalWithErrorRequest {
2023        type Borrowed<'a> = &'a Self;
2024        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2025            value
2026        }
2027    }
2028
2029    unsafe impl fidl::encoding::TypeMarker for EchoEchoMinimalWithErrorRequest {
2030        type Owned = Self;
2031
2032        #[inline(always)]
2033        fn inline_align(_context: fidl::encoding::Context) -> usize {
2034            8
2035        }
2036
2037        #[inline(always)]
2038        fn inline_size(_context: fidl::encoding::Context) -> usize {
2039            24
2040        }
2041    }
2042
2043    unsafe impl<D: fidl::encoding::ResourceDialect>
2044        fidl::encoding::Encode<EchoEchoMinimalWithErrorRequest, D>
2045        for &EchoEchoMinimalWithErrorRequest
2046    {
2047        #[inline]
2048        unsafe fn encode(
2049            self,
2050            encoder: &mut fidl::encoding::Encoder<'_, D>,
2051            offset: usize,
2052            _depth: fidl::encoding::Depth,
2053        ) -> fidl::Result<()> {
2054            encoder.debug_check_bounds::<EchoEchoMinimalWithErrorRequest>(offset);
2055            // Delegate to tuple encoding.
2056            fidl::encoding::Encode::<EchoEchoMinimalWithErrorRequest, D>::encode(
2057                (
2058                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2059                        &self.forward_to_server,
2060                    ),
2061                    <RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
2062                ),
2063                encoder,
2064                offset,
2065                _depth,
2066            )
2067        }
2068    }
2069    unsafe impl<
2070        D: fidl::encoding::ResourceDialect,
2071        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2072        T1: fidl::encoding::Encode<RespondWith, D>,
2073    > fidl::encoding::Encode<EchoEchoMinimalWithErrorRequest, D> for (T0, T1)
2074    {
2075        #[inline]
2076        unsafe fn encode(
2077            self,
2078            encoder: &mut fidl::encoding::Encoder<'_, D>,
2079            offset: usize,
2080            depth: fidl::encoding::Depth,
2081        ) -> fidl::Result<()> {
2082            encoder.debug_check_bounds::<EchoEchoMinimalWithErrorRequest>(offset);
2083            // Zero out padding regions. There's no need to apply masks
2084            // because the unmasked parts will be overwritten by fields.
2085            unsafe {
2086                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
2087                (ptr as *mut u64).write_unaligned(0);
2088            }
2089            // Write the fields.
2090            self.0.encode(encoder, offset + 0, depth)?;
2091            self.1.encode(encoder, offset + 16, depth)?;
2092            Ok(())
2093        }
2094    }
2095
2096    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2097        for EchoEchoMinimalWithErrorRequest
2098    {
2099        #[inline(always)]
2100        fn new_empty() -> Self {
2101            Self {
2102                forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2103                result_variant: fidl::new_empty!(RespondWith, D),
2104            }
2105        }
2106
2107        #[inline]
2108        unsafe fn decode(
2109            &mut self,
2110            decoder: &mut fidl::encoding::Decoder<'_, D>,
2111            offset: usize,
2112            _depth: fidl::encoding::Depth,
2113        ) -> fidl::Result<()> {
2114            decoder.debug_check_bounds::<Self>(offset);
2115            // Verify that padding bytes are zero.
2116            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
2117            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2118            let mask = 0xffffffff00000000u64;
2119            let maskedval = padval & mask;
2120            if maskedval != 0 {
2121                return Err(fidl::Error::NonZeroPadding {
2122                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
2123                });
2124            }
2125            fidl::decode!(
2126                fidl::encoding::UnboundedString,
2127                D,
2128                &mut self.forward_to_server,
2129                decoder,
2130                offset + 0,
2131                _depth
2132            )?;
2133            fidl::decode!(RespondWith, D, &mut self.result_variant, decoder, offset + 16, _depth)?;
2134            Ok(())
2135        }
2136    }
2137
2138    impl fidl::encoding::ValueTypeMarker for Signed {
2139        type Borrowed<'a> = &'a Self;
2140        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2141            value
2142        }
2143    }
2144
2145    unsafe impl fidl::encoding::TypeMarker for Signed {
2146        type Owned = Self;
2147
2148        #[inline(always)]
2149        fn inline_align(_context: fidl::encoding::Context) -> usize {
2150            8
2151        }
2152
2153        #[inline(always)]
2154        fn inline_size(_context: fidl::encoding::Context) -> usize {
2155            24
2156        }
2157    }
2158
2159    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Signed, D> for &Signed {
2160        #[inline]
2161        unsafe fn encode(
2162            self,
2163            encoder: &mut fidl::encoding::Encoder<'_, D>,
2164            offset: usize,
2165            _depth: fidl::encoding::Depth,
2166        ) -> fidl::Result<()> {
2167            encoder.debug_check_bounds::<Signed>(offset);
2168            // Delegate to tuple encoding.
2169            fidl::encoding::Encode::<Signed, D>::encode(
2170                (
2171                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2172                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2173                        &self.forward_to_server,
2174                    ),
2175                ),
2176                encoder,
2177                offset,
2178                _depth,
2179            )
2180        }
2181    }
2182    unsafe impl<
2183        D: fidl::encoding::ResourceDialect,
2184        T0: fidl::encoding::Encode<i64, D>,
2185        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2186    > fidl::encoding::Encode<Signed, D> for (T0, T1)
2187    {
2188        #[inline]
2189        unsafe fn encode(
2190            self,
2191            encoder: &mut fidl::encoding::Encoder<'_, D>,
2192            offset: usize,
2193            depth: fidl::encoding::Depth,
2194        ) -> fidl::Result<()> {
2195            encoder.debug_check_bounds::<Signed>(offset);
2196            // Zero out padding regions. There's no need to apply masks
2197            // because the unmasked parts will be overwritten by fields.
2198            // Write the fields.
2199            self.0.encode(encoder, offset + 0, depth)?;
2200            self.1.encode(encoder, offset + 8, depth)?;
2201            Ok(())
2202        }
2203    }
2204
2205    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Signed {
2206        #[inline(always)]
2207        fn new_empty() -> Self {
2208            Self {
2209                value: fidl::new_empty!(i64, D),
2210                forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2211            }
2212        }
2213
2214        #[inline]
2215        unsafe fn decode(
2216            &mut self,
2217            decoder: &mut fidl::encoding::Decoder<'_, D>,
2218            offset: usize,
2219            _depth: fidl::encoding::Depth,
2220        ) -> fidl::Result<()> {
2221            decoder.debug_check_bounds::<Self>(offset);
2222            // Verify that padding bytes are zero.
2223            fidl::decode!(i64, D, &mut self.value, decoder, offset + 0, _depth)?;
2224            fidl::decode!(
2225                fidl::encoding::UnboundedString,
2226                D,
2227                &mut self.forward_to_server,
2228                decoder,
2229                offset + 8,
2230                _depth
2231            )?;
2232            Ok(())
2233        }
2234    }
2235
2236    impl fidl::encoding::ValueTypeMarker for SignedErrorable {
2237        type Borrowed<'a> = &'a Self;
2238        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2239            value
2240        }
2241    }
2242
2243    unsafe impl fidl::encoding::TypeMarker for SignedErrorable {
2244        type Owned = Self;
2245
2246        #[inline(always)]
2247        fn inline_align(_context: fidl::encoding::Context) -> usize {
2248            8
2249        }
2250
2251        #[inline(always)]
2252        fn inline_size(_context: fidl::encoding::Context) -> usize {
2253            32
2254        }
2255    }
2256
2257    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SignedErrorable, D>
2258        for &SignedErrorable
2259    {
2260        #[inline]
2261        unsafe fn encode(
2262            self,
2263            encoder: &mut fidl::encoding::Encoder<'_, D>,
2264            offset: usize,
2265            _depth: fidl::encoding::Depth,
2266        ) -> fidl::Result<()> {
2267            encoder.debug_check_bounds::<SignedErrorable>(offset);
2268            // Delegate to tuple encoding.
2269            fidl::encoding::Encode::<SignedErrorable, D>::encode(
2270                (
2271                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2272                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2273                        &self.forward_to_server,
2274                    ),
2275                    <DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
2276                    <RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
2277                ),
2278                encoder,
2279                offset,
2280                _depth,
2281            )
2282        }
2283    }
2284    unsafe impl<
2285        D: fidl::encoding::ResourceDialect,
2286        T0: fidl::encoding::Encode<i64, D>,
2287        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2288        T2: fidl::encoding::Encode<DefaultEnum, D>,
2289        T3: fidl::encoding::Encode<RespondWith, D>,
2290    > fidl::encoding::Encode<SignedErrorable, D> for (T0, T1, T2, T3)
2291    {
2292        #[inline]
2293        unsafe fn encode(
2294            self,
2295            encoder: &mut fidl::encoding::Encoder<'_, D>,
2296            offset: usize,
2297            depth: fidl::encoding::Depth,
2298        ) -> fidl::Result<()> {
2299            encoder.debug_check_bounds::<SignedErrorable>(offset);
2300            // Zero out padding regions. There's no need to apply masks
2301            // because the unmasked parts will be overwritten by fields.
2302            // Write the fields.
2303            self.0.encode(encoder, offset + 0, depth)?;
2304            self.1.encode(encoder, offset + 8, depth)?;
2305            self.2.encode(encoder, offset + 24, depth)?;
2306            self.3.encode(encoder, offset + 28, depth)?;
2307            Ok(())
2308        }
2309    }
2310
2311    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SignedErrorable {
2312        #[inline(always)]
2313        fn new_empty() -> Self {
2314            Self {
2315                value: fidl::new_empty!(i64, D),
2316                forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2317                result_err: fidl::new_empty!(DefaultEnum, D),
2318                result_variant: fidl::new_empty!(RespondWith, D),
2319            }
2320        }
2321
2322        #[inline]
2323        unsafe fn decode(
2324            &mut self,
2325            decoder: &mut fidl::encoding::Decoder<'_, D>,
2326            offset: usize,
2327            _depth: fidl::encoding::Depth,
2328        ) -> fidl::Result<()> {
2329            decoder.debug_check_bounds::<Self>(offset);
2330            // Verify that padding bytes are zero.
2331            fidl::decode!(i64, D, &mut self.value, decoder, offset + 0, _depth)?;
2332            fidl::decode!(
2333                fidl::encoding::UnboundedString,
2334                D,
2335                &mut self.forward_to_server,
2336                decoder,
2337                offset + 8,
2338                _depth
2339            )?;
2340            fidl::decode!(DefaultEnum, D, &mut self.result_err, decoder, offset + 24, _depth)?;
2341            fidl::decode!(RespondWith, D, &mut self.result_variant, decoder, offset + 28, _depth)?;
2342            Ok(())
2343        }
2344    }
2345
2346    impl fidl::encoding::ValueTypeMarker for Unsigned {
2347        type Borrowed<'a> = &'a Self;
2348        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2349            value
2350        }
2351    }
2352
2353    unsafe impl fidl::encoding::TypeMarker for Unsigned {
2354        type Owned = Self;
2355
2356        #[inline(always)]
2357        fn inline_align(_context: fidl::encoding::Context) -> usize {
2358            8
2359        }
2360
2361        #[inline(always)]
2362        fn inline_size(_context: fidl::encoding::Context) -> usize {
2363            24
2364        }
2365    }
2366
2367    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Unsigned, D> for &Unsigned {
2368        #[inline]
2369        unsafe fn encode(
2370            self,
2371            encoder: &mut fidl::encoding::Encoder<'_, D>,
2372            offset: usize,
2373            _depth: fidl::encoding::Depth,
2374        ) -> fidl::Result<()> {
2375            encoder.debug_check_bounds::<Unsigned>(offset);
2376            // Delegate to tuple encoding.
2377            fidl::encoding::Encode::<Unsigned, D>::encode(
2378                (
2379                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2380                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2381                        &self.forward_to_server,
2382                    ),
2383                ),
2384                encoder,
2385                offset,
2386                _depth,
2387            )
2388        }
2389    }
2390    unsafe impl<
2391        D: fidl::encoding::ResourceDialect,
2392        T0: fidl::encoding::Encode<u64, D>,
2393        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2394    > fidl::encoding::Encode<Unsigned, D> for (T0, T1)
2395    {
2396        #[inline]
2397        unsafe fn encode(
2398            self,
2399            encoder: &mut fidl::encoding::Encoder<'_, D>,
2400            offset: usize,
2401            depth: fidl::encoding::Depth,
2402        ) -> fidl::Result<()> {
2403            encoder.debug_check_bounds::<Unsigned>(offset);
2404            // Zero out padding regions. There's no need to apply masks
2405            // because the unmasked parts will be overwritten by fields.
2406            // Write the fields.
2407            self.0.encode(encoder, offset + 0, depth)?;
2408            self.1.encode(encoder, offset + 8, depth)?;
2409            Ok(())
2410        }
2411    }
2412
2413    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Unsigned {
2414        #[inline(always)]
2415        fn new_empty() -> Self {
2416            Self {
2417                value: fidl::new_empty!(u64, D),
2418                forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2419            }
2420        }
2421
2422        #[inline]
2423        unsafe fn decode(
2424            &mut self,
2425            decoder: &mut fidl::encoding::Decoder<'_, D>,
2426            offset: usize,
2427            _depth: fidl::encoding::Depth,
2428        ) -> fidl::Result<()> {
2429            decoder.debug_check_bounds::<Self>(offset);
2430            // Verify that padding bytes are zero.
2431            fidl::decode!(u64, D, &mut self.value, decoder, offset + 0, _depth)?;
2432            fidl::decode!(
2433                fidl::encoding::UnboundedString,
2434                D,
2435                &mut self.forward_to_server,
2436                decoder,
2437                offset + 8,
2438                _depth
2439            )?;
2440            Ok(())
2441        }
2442    }
2443
2444    impl fidl::encoding::ValueTypeMarker for UnsignedErrorable {
2445        type Borrowed<'a> = &'a Self;
2446        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2447            value
2448        }
2449    }
2450
2451    unsafe impl fidl::encoding::TypeMarker for UnsignedErrorable {
2452        type Owned = Self;
2453
2454        #[inline(always)]
2455        fn inline_align(_context: fidl::encoding::Context) -> usize {
2456            8
2457        }
2458
2459        #[inline(always)]
2460        fn inline_size(_context: fidl::encoding::Context) -> usize {
2461            32
2462        }
2463    }
2464
2465    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnsignedErrorable, D>
2466        for &UnsignedErrorable
2467    {
2468        #[inline]
2469        unsafe fn encode(
2470            self,
2471            encoder: &mut fidl::encoding::Encoder<'_, D>,
2472            offset: usize,
2473            _depth: fidl::encoding::Depth,
2474        ) -> fidl::Result<()> {
2475            encoder.debug_check_bounds::<UnsignedErrorable>(offset);
2476            // Delegate to tuple encoding.
2477            fidl::encoding::Encode::<UnsignedErrorable, D>::encode(
2478                (
2479                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2480                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2481                        &self.forward_to_server,
2482                    ),
2483                    <DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.result_err),
2484                    <RespondWith as fidl::encoding::ValueTypeMarker>::borrow(&self.result_variant),
2485                ),
2486                encoder,
2487                offset,
2488                _depth,
2489            )
2490        }
2491    }
2492    unsafe impl<
2493        D: fidl::encoding::ResourceDialect,
2494        T0: fidl::encoding::Encode<u64, D>,
2495        T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2496        T2: fidl::encoding::Encode<DefaultEnum, D>,
2497        T3: fidl::encoding::Encode<RespondWith, D>,
2498    > fidl::encoding::Encode<UnsignedErrorable, D> for (T0, T1, T2, T3)
2499    {
2500        #[inline]
2501        unsafe fn encode(
2502            self,
2503            encoder: &mut fidl::encoding::Encoder<'_, D>,
2504            offset: usize,
2505            depth: fidl::encoding::Depth,
2506        ) -> fidl::Result<()> {
2507            encoder.debug_check_bounds::<UnsignedErrorable>(offset);
2508            // Zero out padding regions. There's no need to apply masks
2509            // because the unmasked parts will be overwritten by fields.
2510            // Write the fields.
2511            self.0.encode(encoder, offset + 0, depth)?;
2512            self.1.encode(encoder, offset + 8, depth)?;
2513            self.2.encode(encoder, offset + 24, depth)?;
2514            self.3.encode(encoder, offset + 28, depth)?;
2515            Ok(())
2516        }
2517    }
2518
2519    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsignedErrorable {
2520        #[inline(always)]
2521        fn new_empty() -> Self {
2522            Self {
2523                value: fidl::new_empty!(u64, D),
2524                forward_to_server: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2525                result_err: fidl::new_empty!(DefaultEnum, D),
2526                result_variant: fidl::new_empty!(RespondWith, D),
2527            }
2528        }
2529
2530        #[inline]
2531        unsafe fn decode(
2532            &mut self,
2533            decoder: &mut fidl::encoding::Decoder<'_, D>,
2534            offset: usize,
2535            _depth: fidl::encoding::Depth,
2536        ) -> fidl::Result<()> {
2537            decoder.debug_check_bounds::<Self>(offset);
2538            // Verify that padding bytes are zero.
2539            fidl::decode!(u64, D, &mut self.value, decoder, offset + 0, _depth)?;
2540            fidl::decode!(
2541                fidl::encoding::UnboundedString,
2542                D,
2543                &mut self.forward_to_server,
2544                decoder,
2545                offset + 8,
2546                _depth
2547            )?;
2548            fidl::decode!(DefaultEnum, D, &mut self.result_err, decoder, offset + 24, _depth)?;
2549            fidl::decode!(RespondWith, D, &mut self.result_variant, decoder, offset + 28, _depth)?;
2550            Ok(())
2551        }
2552    }
2553
2554    impl fidl::encoding::ValueTypeMarker for DefaultValues {
2555        type Borrowed<'a> = &'a Self;
2556        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2557            value
2558        }
2559    }
2560
2561    unsafe impl fidl::encoding::TypeMarker for DefaultValues {
2562        type Owned = Self;
2563
2564        #[inline(always)]
2565        fn inline_align(_context: fidl::encoding::Context) -> usize {
2566            8
2567        }
2568
2569        #[inline(always)]
2570        fn inline_size(_context: fidl::encoding::Context) -> usize {
2571            72
2572        }
2573    }
2574
2575    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DefaultValues, D>
2576        for &DefaultValues
2577    {
2578        #[inline]
2579        unsafe fn encode(
2580            self,
2581            encoder: &mut fidl::encoding::Encoder<'_, D>,
2582            offset: usize,
2583            _depth: fidl::encoding::Depth,
2584        ) -> fidl::Result<()> {
2585            encoder.debug_check_bounds::<DefaultValues>(offset);
2586            // Delegate to tuple encoding.
2587            fidl::encoding::Encode::<DefaultValues, D>::encode(
2588                (
2589                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b1),
2590                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b2),
2591                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.i8),
2592                    <i16 as fidl::encoding::ValueTypeMarker>::borrow(&self.i16),
2593                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.i32),
2594                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.i64),
2595                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.u8),
2596                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.u16),
2597                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.u32),
2598                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.u64),
2599                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f32),
2600                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f64),
2601                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2602                        &self.s,
2603                    ),
2604                ),
2605                encoder,
2606                offset,
2607                _depth,
2608            )
2609        }
2610    }
2611    unsafe impl<
2612        D: fidl::encoding::ResourceDialect,
2613        T0: fidl::encoding::Encode<bool, D>,
2614        T1: fidl::encoding::Encode<bool, D>,
2615        T2: fidl::encoding::Encode<i8, D>,
2616        T3: fidl::encoding::Encode<i16, D>,
2617        T4: fidl::encoding::Encode<i32, D>,
2618        T5: fidl::encoding::Encode<i64, D>,
2619        T6: fidl::encoding::Encode<u8, D>,
2620        T7: fidl::encoding::Encode<u16, D>,
2621        T8: fidl::encoding::Encode<u32, D>,
2622        T9: fidl::encoding::Encode<u64, D>,
2623        T10: fidl::encoding::Encode<f32, D>,
2624        T11: fidl::encoding::Encode<f64, D>,
2625        T12: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2626    > fidl::encoding::Encode<DefaultValues, D>
2627        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
2628    {
2629        #[inline]
2630        unsafe fn encode(
2631            self,
2632            encoder: &mut fidl::encoding::Encoder<'_, D>,
2633            offset: usize,
2634            depth: fidl::encoding::Depth,
2635        ) -> fidl::Result<()> {
2636            encoder.debug_check_bounds::<DefaultValues>(offset);
2637            // Zero out padding regions. There's no need to apply masks
2638            // because the unmasked parts will be overwritten by fields.
2639            unsafe {
2640                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2641                (ptr as *mut u64).write_unaligned(0);
2642            }
2643            unsafe {
2644                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2645                (ptr as *mut u64).write_unaligned(0);
2646            }
2647            unsafe {
2648                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
2649                (ptr as *mut u64).write_unaligned(0);
2650            }
2651            unsafe {
2652                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
2653                (ptr as *mut u64).write_unaligned(0);
2654            }
2655            // Write the fields.
2656            self.0.encode(encoder, offset + 0, depth)?;
2657            self.1.encode(encoder, offset + 1, depth)?;
2658            self.2.encode(encoder, offset + 2, depth)?;
2659            self.3.encode(encoder, offset + 4, depth)?;
2660            self.4.encode(encoder, offset + 8, depth)?;
2661            self.5.encode(encoder, offset + 16, depth)?;
2662            self.6.encode(encoder, offset + 24, depth)?;
2663            self.7.encode(encoder, offset + 26, depth)?;
2664            self.8.encode(encoder, offset + 28, depth)?;
2665            self.9.encode(encoder, offset + 32, depth)?;
2666            self.10.encode(encoder, offset + 40, depth)?;
2667            self.11.encode(encoder, offset + 48, depth)?;
2668            self.12.encode(encoder, offset + 56, depth)?;
2669            Ok(())
2670        }
2671    }
2672
2673    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DefaultValues {
2674        #[inline(always)]
2675        fn new_empty() -> Self {
2676            Self {
2677                b1: fidl::new_empty!(bool, D),
2678                b2: fidl::new_empty!(bool, D),
2679                i8: fidl::new_empty!(i8, D),
2680                i16: fidl::new_empty!(i16, D),
2681                i32: fidl::new_empty!(i32, D),
2682                i64: fidl::new_empty!(i64, D),
2683                u8: fidl::new_empty!(u8, D),
2684                u16: fidl::new_empty!(u16, D),
2685                u32: fidl::new_empty!(u32, D),
2686                u64: fidl::new_empty!(u64, D),
2687                f32: fidl::new_empty!(f32, D),
2688                f64: fidl::new_empty!(f64, D),
2689                s: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2690            }
2691        }
2692
2693        #[inline]
2694        unsafe fn decode(
2695            &mut self,
2696            decoder: &mut fidl::encoding::Decoder<'_, D>,
2697            offset: usize,
2698            _depth: fidl::encoding::Depth,
2699        ) -> fidl::Result<()> {
2700            decoder.debug_check_bounds::<Self>(offset);
2701            // Verify that padding bytes are zero.
2702            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2703            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2704            let mask = 0xffff0000ff000000u64;
2705            let maskedval = padval & mask;
2706            if maskedval != 0 {
2707                return Err(fidl::Error::NonZeroPadding {
2708                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2709                });
2710            }
2711            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2712            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2713            let mask = 0xffffffff00000000u64;
2714            let maskedval = padval & mask;
2715            if maskedval != 0 {
2716                return Err(fidl::Error::NonZeroPadding {
2717                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2718                });
2719            }
2720            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
2721            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2722            let mask = 0xff00u64;
2723            let maskedval = padval & mask;
2724            if maskedval != 0 {
2725                return Err(fidl::Error::NonZeroPadding {
2726                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
2727                });
2728            }
2729            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
2730            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2731            let mask = 0xffffffff00000000u64;
2732            let maskedval = padval & mask;
2733            if maskedval != 0 {
2734                return Err(fidl::Error::NonZeroPadding {
2735                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
2736                });
2737            }
2738            fidl::decode!(bool, D, &mut self.b1, decoder, offset + 0, _depth)?;
2739            fidl::decode!(bool, D, &mut self.b2, decoder, offset + 1, _depth)?;
2740            fidl::decode!(i8, D, &mut self.i8, decoder, offset + 2, _depth)?;
2741            fidl::decode!(i16, D, &mut self.i16, decoder, offset + 4, _depth)?;
2742            fidl::decode!(i32, D, &mut self.i32, decoder, offset + 8, _depth)?;
2743            fidl::decode!(i64, D, &mut self.i64, decoder, offset + 16, _depth)?;
2744            fidl::decode!(u8, D, &mut self.u8, decoder, offset + 24, _depth)?;
2745            fidl::decode!(u16, D, &mut self.u16, decoder, offset + 26, _depth)?;
2746            fidl::decode!(u32, D, &mut self.u32, decoder, offset + 28, _depth)?;
2747            fidl::decode!(u64, D, &mut self.u64, decoder, offset + 32, _depth)?;
2748            fidl::decode!(f32, D, &mut self.f32, decoder, offset + 40, _depth)?;
2749            fidl::decode!(f64, D, &mut self.f64, decoder, offset + 48, _depth)?;
2750            fidl::decode!(
2751                fidl::encoding::UnboundedString,
2752                D,
2753                &mut self.s,
2754                decoder,
2755                offset + 56,
2756                _depth
2757            )?;
2758            Ok(())
2759        }
2760    }
2761
2762    impl fidl::encoding::ValueTypeMarker for PrimitiveTypes {
2763        type Borrowed<'a> = &'a Self;
2764        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2765            value
2766        }
2767    }
2768
2769    unsafe impl fidl::encoding::TypeMarker for PrimitiveTypes {
2770        type Owned = Self;
2771
2772        #[inline(always)]
2773        fn inline_align(_context: fidl::encoding::Context) -> usize {
2774            8
2775        }
2776
2777        #[inline(always)]
2778        fn inline_size(_context: fidl::encoding::Context) -> usize {
2779            48
2780        }
2781    }
2782
2783    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PrimitiveTypes, D>
2784        for &PrimitiveTypes
2785    {
2786        #[inline]
2787        unsafe fn encode(
2788            self,
2789            encoder: &mut fidl::encoding::Encoder<'_, D>,
2790            offset: usize,
2791            _depth: fidl::encoding::Depth,
2792        ) -> fidl::Result<()> {
2793            encoder.debug_check_bounds::<PrimitiveTypes>(offset);
2794            // Delegate to tuple encoding.
2795            fidl::encoding::Encode::<PrimitiveTypes, D>::encode(
2796                (
2797                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
2798                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.i8),
2799                    <i16 as fidl::encoding::ValueTypeMarker>::borrow(&self.i16),
2800                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.i32),
2801                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.i64),
2802                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.u8),
2803                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.u16),
2804                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.u32),
2805                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.u64),
2806                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f32),
2807                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f64),
2808                ),
2809                encoder,
2810                offset,
2811                _depth,
2812            )
2813        }
2814    }
2815    unsafe impl<
2816        D: fidl::encoding::ResourceDialect,
2817        T0: fidl::encoding::Encode<bool, D>,
2818        T1: fidl::encoding::Encode<i8, D>,
2819        T2: fidl::encoding::Encode<i16, D>,
2820        T3: fidl::encoding::Encode<i32, D>,
2821        T4: fidl::encoding::Encode<i64, D>,
2822        T5: fidl::encoding::Encode<u8, D>,
2823        T6: fidl::encoding::Encode<u16, D>,
2824        T7: fidl::encoding::Encode<u32, D>,
2825        T8: fidl::encoding::Encode<u64, D>,
2826        T9: fidl::encoding::Encode<f32, D>,
2827        T10: fidl::encoding::Encode<f64, D>,
2828    > fidl::encoding::Encode<PrimitiveTypes, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
2829    {
2830        #[inline]
2831        unsafe fn encode(
2832            self,
2833            encoder: &mut fidl::encoding::Encoder<'_, D>,
2834            offset: usize,
2835            depth: fidl::encoding::Depth,
2836        ) -> fidl::Result<()> {
2837            encoder.debug_check_bounds::<PrimitiveTypes>(offset);
2838            // Zero out padding regions. There's no need to apply masks
2839            // because the unmasked parts will be overwritten by fields.
2840            unsafe {
2841                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
2842                (ptr as *mut u64).write_unaligned(0);
2843            }
2844            unsafe {
2845                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
2846                (ptr as *mut u64).write_unaligned(0);
2847            }
2848            // Write the fields.
2849            self.0.encode(encoder, offset + 0, depth)?;
2850            self.1.encode(encoder, offset + 1, depth)?;
2851            self.2.encode(encoder, offset + 2, depth)?;
2852            self.3.encode(encoder, offset + 4, depth)?;
2853            self.4.encode(encoder, offset + 8, depth)?;
2854            self.5.encode(encoder, offset + 16, depth)?;
2855            self.6.encode(encoder, offset + 18, depth)?;
2856            self.7.encode(encoder, offset + 20, depth)?;
2857            self.8.encode(encoder, offset + 24, depth)?;
2858            self.9.encode(encoder, offset + 32, depth)?;
2859            self.10.encode(encoder, offset + 40, depth)?;
2860            Ok(())
2861        }
2862    }
2863
2864    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PrimitiveTypes {
2865        #[inline(always)]
2866        fn new_empty() -> Self {
2867            Self {
2868                b: fidl::new_empty!(bool, D),
2869                i8: fidl::new_empty!(i8, D),
2870                i16: fidl::new_empty!(i16, D),
2871                i32: fidl::new_empty!(i32, D),
2872                i64: fidl::new_empty!(i64, D),
2873                u8: fidl::new_empty!(u8, D),
2874                u16: fidl::new_empty!(u16, D),
2875                u32: fidl::new_empty!(u32, D),
2876                u64: fidl::new_empty!(u64, D),
2877                f32: fidl::new_empty!(f32, D),
2878                f64: fidl::new_empty!(f64, D),
2879            }
2880        }
2881
2882        #[inline]
2883        unsafe fn decode(
2884            &mut self,
2885            decoder: &mut fidl::encoding::Decoder<'_, D>,
2886            offset: usize,
2887            _depth: fidl::encoding::Depth,
2888        ) -> fidl::Result<()> {
2889            decoder.debug_check_bounds::<Self>(offset);
2890            // Verify that padding bytes are zero.
2891            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
2892            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2893            let mask = 0xff00u64;
2894            let maskedval = padval & mask;
2895            if maskedval != 0 {
2896                return Err(fidl::Error::NonZeroPadding {
2897                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
2898                });
2899            }
2900            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
2901            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2902            let mask = 0xffffffff00000000u64;
2903            let maskedval = padval & mask;
2904            if maskedval != 0 {
2905                return Err(fidl::Error::NonZeroPadding {
2906                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
2907                });
2908            }
2909            fidl::decode!(bool, D, &mut self.b, decoder, offset + 0, _depth)?;
2910            fidl::decode!(i8, D, &mut self.i8, decoder, offset + 1, _depth)?;
2911            fidl::decode!(i16, D, &mut self.i16, decoder, offset + 2, _depth)?;
2912            fidl::decode!(i32, D, &mut self.i32, decoder, offset + 4, _depth)?;
2913            fidl::decode!(i64, D, &mut self.i64, decoder, offset + 8, _depth)?;
2914            fidl::decode!(u8, D, &mut self.u8, decoder, offset + 16, _depth)?;
2915            fidl::decode!(u16, D, &mut self.u16, decoder, offset + 18, _depth)?;
2916            fidl::decode!(u32, D, &mut self.u32, decoder, offset + 20, _depth)?;
2917            fidl::decode!(u64, D, &mut self.u64, decoder, offset + 24, _depth)?;
2918            fidl::decode!(f32, D, &mut self.f32, decoder, offset + 32, _depth)?;
2919            fidl::decode!(f64, D, &mut self.f64, decoder, offset + 40, _depth)?;
2920            Ok(())
2921        }
2922    }
2923
2924    impl fidl::encoding::ValueTypeMarker for Strings {
2925        type Borrowed<'a> = &'a Self;
2926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2927            value
2928        }
2929    }
2930
2931    unsafe impl fidl::encoding::TypeMarker for Strings {
2932        type Owned = Self;
2933
2934        #[inline(always)]
2935        fn inline_align(_context: fidl::encoding::Context) -> usize {
2936            8
2937        }
2938
2939        #[inline(always)]
2940        fn inline_size(_context: fidl::encoding::Context) -> usize {
2941            96
2942        }
2943    }
2944
2945    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Strings, D> for &Strings {
2946        #[inline]
2947        unsafe fn encode(
2948            self,
2949            encoder: &mut fidl::encoding::Encoder<'_, D>,
2950            offset: usize,
2951            _depth: fidl::encoding::Depth,
2952        ) -> fidl::Result<()> {
2953            encoder.debug_check_bounds::<Strings>(offset);
2954            // Delegate to tuple encoding.
2955            fidl::encoding::Encode::<Strings, D>::encode(
2956                (
2957                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
2958                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_s),
2959                    <fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(&self.size_0_s),
2960                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(&self.size_1_s),
2961                    <fidl::encoding::Optional<fidl::encoding::BoundedString<2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_size_0_s),
2962                    <fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_size_1_s),
2963                ),
2964                encoder, offset, _depth
2965            )
2966        }
2967    }
2968    unsafe impl<
2969        D: fidl::encoding::ResourceDialect,
2970        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2971        T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
2972        T2: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
2973        T3: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
2974        T4: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<2>>, D>,
2975        T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
2976    > fidl::encoding::Encode<Strings, D> for (T0, T1, T2, T3, T4, T5)
2977    {
2978        #[inline]
2979        unsafe fn encode(
2980            self,
2981            encoder: &mut fidl::encoding::Encoder<'_, D>,
2982            offset: usize,
2983            depth: fidl::encoding::Depth,
2984        ) -> fidl::Result<()> {
2985            encoder.debug_check_bounds::<Strings>(offset);
2986            // Zero out padding regions. There's no need to apply masks
2987            // because the unmasked parts will be overwritten by fields.
2988            // Write the fields.
2989            self.0.encode(encoder, offset + 0, depth)?;
2990            self.1.encode(encoder, offset + 16, depth)?;
2991            self.2.encode(encoder, offset + 32, depth)?;
2992            self.3.encode(encoder, offset + 48, depth)?;
2993            self.4.encode(encoder, offset + 64, depth)?;
2994            self.5.encode(encoder, offset + 80, depth)?;
2995            Ok(())
2996        }
2997    }
2998
2999    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Strings {
3000        #[inline(always)]
3001        fn new_empty() -> Self {
3002            Self {
3003                s: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3004                nullable_s: fidl::new_empty!(
3005                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3006                    D
3007                ),
3008                size_0_s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D),
3009                size_1_s: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
3010                nullable_size_0_s: fidl::new_empty!(
3011                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
3012                    D
3013                ),
3014                nullable_size_1_s: fidl::new_empty!(
3015                    fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
3016                    D
3017                ),
3018            }
3019        }
3020
3021        #[inline]
3022        unsafe fn decode(
3023            &mut self,
3024            decoder: &mut fidl::encoding::Decoder<'_, D>,
3025            offset: usize,
3026            _depth: fidl::encoding::Depth,
3027        ) -> fidl::Result<()> {
3028            decoder.debug_check_bounds::<Self>(offset);
3029            // Verify that padding bytes are zero.
3030            fidl::decode!(
3031                fidl::encoding::UnboundedString,
3032                D,
3033                &mut self.s,
3034                decoder,
3035                offset + 0,
3036                _depth
3037            )?;
3038            fidl::decode!(
3039                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3040                D,
3041                &mut self.nullable_s,
3042                decoder,
3043                offset + 16,
3044                _depth
3045            )?;
3046            fidl::decode!(
3047                fidl::encoding::BoundedString<2>,
3048                D,
3049                &mut self.size_0_s,
3050                decoder,
3051                offset + 32,
3052                _depth
3053            )?;
3054            fidl::decode!(
3055                fidl::encoding::BoundedString<32>,
3056                D,
3057                &mut self.size_1_s,
3058                decoder,
3059                offset + 48,
3060                _depth
3061            )?;
3062            fidl::decode!(
3063                fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
3064                D,
3065                &mut self.nullable_size_0_s,
3066                decoder,
3067                offset + 64,
3068                _depth
3069            )?;
3070            fidl::decode!(
3071                fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
3072                D,
3073                &mut self.nullable_size_1_s,
3074                decoder,
3075                offset + 80,
3076                _depth
3077            )?;
3078            Ok(())
3079        }
3080    }
3081
3082    impl fidl::encoding::ValueTypeMarker for Structs {
3083        type Borrowed<'a> = &'a Self;
3084        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3085            value
3086        }
3087    }
3088
3089    unsafe impl fidl::encoding::TypeMarker for Structs {
3090        type Owned = Self;
3091
3092        #[inline(always)]
3093        fn inline_align(_context: fidl::encoding::Context) -> usize {
3094            8
3095        }
3096
3097        #[inline(always)]
3098        fn inline_size(_context: fidl::encoding::Context) -> usize {
3099            32
3100        }
3101    }
3102
3103    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Structs, D> for &Structs {
3104        #[inline]
3105        unsafe fn encode(
3106            self,
3107            encoder: &mut fidl::encoding::Encoder<'_, D>,
3108            offset: usize,
3109            _depth: fidl::encoding::Depth,
3110        ) -> fidl::Result<()> {
3111            encoder.debug_check_bounds::<Structs>(offset);
3112            // Delegate to tuple encoding.
3113            fidl::encoding::Encode::<Structs, D>::encode(
3114                (
3115                    <ThisIsAStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
3116                    <fidl::encoding::Boxed<ThisIsAStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_s),
3117                    <ThisIsAnEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
3118                ),
3119                encoder, offset, _depth
3120            )
3121        }
3122    }
3123    unsafe impl<
3124        D: fidl::encoding::ResourceDialect,
3125        T0: fidl::encoding::Encode<ThisIsAStruct, D>,
3126        T1: fidl::encoding::Encode<fidl::encoding::Boxed<ThisIsAStruct>, D>,
3127        T2: fidl::encoding::Encode<ThisIsAnEmptyStruct, D>,
3128    > fidl::encoding::Encode<Structs, D> for (T0, T1, T2)
3129    {
3130        #[inline]
3131        unsafe fn encode(
3132            self,
3133            encoder: &mut fidl::encoding::Encoder<'_, D>,
3134            offset: usize,
3135            depth: fidl::encoding::Depth,
3136        ) -> fidl::Result<()> {
3137            encoder.debug_check_bounds::<Structs>(offset);
3138            // Zero out padding regions. There's no need to apply masks
3139            // because the unmasked parts will be overwritten by fields.
3140            unsafe {
3141                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
3142                (ptr as *mut u64).write_unaligned(0);
3143            }
3144            // Write the fields.
3145            self.0.encode(encoder, offset + 0, depth)?;
3146            self.1.encode(encoder, offset + 16, depth)?;
3147            self.2.encode(encoder, offset + 24, depth)?;
3148            Ok(())
3149        }
3150    }
3151
3152    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Structs {
3153        #[inline(always)]
3154        fn new_empty() -> Self {
3155            Self {
3156                s: fidl::new_empty!(ThisIsAStruct, D),
3157                nullable_s: fidl::new_empty!(fidl::encoding::Boxed<ThisIsAStruct>, D),
3158                es: fidl::new_empty!(ThisIsAnEmptyStruct, D),
3159            }
3160        }
3161
3162        #[inline]
3163        unsafe fn decode(
3164            &mut self,
3165            decoder: &mut fidl::encoding::Decoder<'_, D>,
3166            offset: usize,
3167            _depth: fidl::encoding::Depth,
3168        ) -> fidl::Result<()> {
3169            decoder.debug_check_bounds::<Self>(offset);
3170            // Verify that padding bytes are zero.
3171            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
3172            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3173            let mask = 0xffffffffffffff00u64;
3174            let maskedval = padval & mask;
3175            if maskedval != 0 {
3176                return Err(fidl::Error::NonZeroPadding {
3177                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
3178                });
3179            }
3180            fidl::decode!(ThisIsAStruct, D, &mut self.s, decoder, offset + 0, _depth)?;
3181            fidl::decode!(
3182                fidl::encoding::Boxed<ThisIsAStruct>,
3183                D,
3184                &mut self.nullable_s,
3185                decoder,
3186                offset + 16,
3187                _depth
3188            )?;
3189            fidl::decode!(ThisIsAnEmptyStruct, D, &mut self.es, decoder, offset + 24, _depth)?;
3190            Ok(())
3191        }
3192    }
3193
3194    impl fidl::encoding::ValueTypeMarker for ThisIsAStruct {
3195        type Borrowed<'a> = &'a Self;
3196        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3197            value
3198        }
3199    }
3200
3201    unsafe impl fidl::encoding::TypeMarker for ThisIsAStruct {
3202        type Owned = Self;
3203
3204        #[inline(always)]
3205        fn inline_align(_context: fidl::encoding::Context) -> usize {
3206            8
3207        }
3208
3209        #[inline(always)]
3210        fn inline_size(_context: fidl::encoding::Context) -> usize {
3211            16
3212        }
3213    }
3214
3215    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAStruct, D>
3216        for &ThisIsAStruct
3217    {
3218        #[inline]
3219        unsafe fn encode(
3220            self,
3221            encoder: &mut fidl::encoding::Encoder<'_, D>,
3222            offset: usize,
3223            _depth: fidl::encoding::Depth,
3224        ) -> fidl::Result<()> {
3225            encoder.debug_check_bounds::<ThisIsAStruct>(offset);
3226            // Delegate to tuple encoding.
3227            fidl::encoding::Encode::<ThisIsAStruct, D>::encode(
3228                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3229                    &self.s,
3230                ),),
3231                encoder,
3232                offset,
3233                _depth,
3234            )
3235        }
3236    }
3237    unsafe impl<
3238        D: fidl::encoding::ResourceDialect,
3239        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3240    > fidl::encoding::Encode<ThisIsAStruct, D> for (T0,)
3241    {
3242        #[inline]
3243        unsafe fn encode(
3244            self,
3245            encoder: &mut fidl::encoding::Encoder<'_, D>,
3246            offset: usize,
3247            depth: fidl::encoding::Depth,
3248        ) -> fidl::Result<()> {
3249            encoder.debug_check_bounds::<ThisIsAStruct>(offset);
3250            // Zero out padding regions. There's no need to apply masks
3251            // because the unmasked parts will be overwritten by fields.
3252            // Write the fields.
3253            self.0.encode(encoder, offset + 0, depth)?;
3254            Ok(())
3255        }
3256    }
3257
3258    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAStruct {
3259        #[inline(always)]
3260        fn new_empty() -> Self {
3261            Self { s: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
3262        }
3263
3264        #[inline]
3265        unsafe fn decode(
3266            &mut self,
3267            decoder: &mut fidl::encoding::Decoder<'_, D>,
3268            offset: usize,
3269            _depth: fidl::encoding::Depth,
3270        ) -> fidl::Result<()> {
3271            decoder.debug_check_bounds::<Self>(offset);
3272            // Verify that padding bytes are zero.
3273            fidl::decode!(
3274                fidl::encoding::UnboundedString,
3275                D,
3276                &mut self.s,
3277                decoder,
3278                offset + 0,
3279                _depth
3280            )?;
3281            Ok(())
3282        }
3283    }
3284
3285    impl fidl::encoding::ValueTypeMarker for ThisIsAnEmptyStruct {
3286        type Borrowed<'a> = &'a Self;
3287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3288            value
3289        }
3290    }
3291
3292    unsafe impl fidl::encoding::TypeMarker for ThisIsAnEmptyStruct {
3293        type Owned = Self;
3294
3295        #[inline(always)]
3296        fn inline_align(_context: fidl::encoding::Context) -> usize {
3297            1
3298        }
3299
3300        #[inline(always)]
3301        fn inline_size(_context: fidl::encoding::Context) -> usize {
3302            1
3303        }
3304    }
3305
3306    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAnEmptyStruct, D>
3307        for &ThisIsAnEmptyStruct
3308    {
3309        #[inline]
3310        unsafe fn encode(
3311            self,
3312            encoder: &mut fidl::encoding::Encoder<'_, D>,
3313            offset: usize,
3314            _depth: fidl::encoding::Depth,
3315        ) -> fidl::Result<()> {
3316            encoder.debug_check_bounds::<ThisIsAnEmptyStruct>(offset);
3317            encoder.write_num(0u8, offset);
3318            Ok(())
3319        }
3320    }
3321
3322    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAnEmptyStruct {
3323        #[inline(always)]
3324        fn new_empty() -> Self {
3325            Self
3326        }
3327
3328        #[inline]
3329        unsafe fn decode(
3330            &mut self,
3331            decoder: &mut fidl::encoding::Decoder<'_, D>,
3332            offset: usize,
3333            _depth: fidl::encoding::Depth,
3334        ) -> fidl::Result<()> {
3335            decoder.debug_check_bounds::<Self>(offset);
3336            match decoder.read_num::<u8>(offset) {
3337                0 => Ok(()),
3338                _ => Err(fidl::Error::Invalid),
3339            }
3340        }
3341    }
3342
3343    impl fidl::encoding::ValueTypeMarker for Unions {
3344        type Borrowed<'a> = &'a Self;
3345        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3346            value
3347        }
3348    }
3349
3350    unsafe impl fidl::encoding::TypeMarker for Unions {
3351        type Owned = Self;
3352
3353        #[inline(always)]
3354        fn inline_align(_context: fidl::encoding::Context) -> usize {
3355            8
3356        }
3357
3358        #[inline(always)]
3359        fn inline_size(_context: fidl::encoding::Context) -> usize {
3360            32
3361        }
3362    }
3363
3364    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Unions, D> for &Unions {
3365        #[inline]
3366        unsafe fn encode(
3367            self,
3368            encoder: &mut fidl::encoding::Encoder<'_, D>,
3369            offset: usize,
3370            _depth: fidl::encoding::Depth,
3371        ) -> fidl::Result<()> {
3372            encoder.debug_check_bounds::<Unions>(offset);
3373            // Delegate to tuple encoding.
3374            fidl::encoding::Encode::<Unions, D>::encode(
3375                (
3376                    <ThisIsAUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
3377                    <fidl::encoding::OptionalUnion<ThisIsAUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
3378                ),
3379                encoder, offset, _depth
3380            )
3381        }
3382    }
3383    unsafe impl<
3384        D: fidl::encoding::ResourceDialect,
3385        T0: fidl::encoding::Encode<ThisIsAUnion, D>,
3386        T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<ThisIsAUnion>, D>,
3387    > fidl::encoding::Encode<Unions, D> for (T0, T1)
3388    {
3389        #[inline]
3390        unsafe fn encode(
3391            self,
3392            encoder: &mut fidl::encoding::Encoder<'_, D>,
3393            offset: usize,
3394            depth: fidl::encoding::Depth,
3395        ) -> fidl::Result<()> {
3396            encoder.debug_check_bounds::<Unions>(offset);
3397            // Zero out padding regions. There's no need to apply masks
3398            // because the unmasked parts will be overwritten by fields.
3399            // Write the fields.
3400            self.0.encode(encoder, offset + 0, depth)?;
3401            self.1.encode(encoder, offset + 16, depth)?;
3402            Ok(())
3403        }
3404    }
3405
3406    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Unions {
3407        #[inline(always)]
3408        fn new_empty() -> Self {
3409            Self {
3410                u: fidl::new_empty!(ThisIsAUnion, D),
3411                nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<ThisIsAUnion>, D),
3412            }
3413        }
3414
3415        #[inline]
3416        unsafe fn decode(
3417            &mut self,
3418            decoder: &mut fidl::encoding::Decoder<'_, D>,
3419            offset: usize,
3420            _depth: fidl::encoding::Depth,
3421        ) -> fidl::Result<()> {
3422            decoder.debug_check_bounds::<Self>(offset);
3423            // Verify that padding bytes are zero.
3424            fidl::decode!(ThisIsAUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
3425            fidl::decode!(
3426                fidl::encoding::OptionalUnion<ThisIsAUnion>,
3427                D,
3428                &mut self.nullable_u,
3429                decoder,
3430                offset + 16,
3431                _depth
3432            )?;
3433            Ok(())
3434        }
3435    }
3436
3437    impl EchoEchoTablePayloadWithErrorRequest {
3438        #[inline(always)]
3439        fn max_ordinal_present(&self) -> u64 {
3440            if let Some(_) = self.result_variant {
3441                return 4;
3442            }
3443            if let Some(_) = self.result_err {
3444                return 3;
3445            }
3446            if let Some(_) = self.forward_to_server {
3447                return 2;
3448            }
3449            if let Some(_) = self.value {
3450                return 1;
3451            }
3452            0
3453        }
3454    }
3455
3456    impl fidl::encoding::ValueTypeMarker for EchoEchoTablePayloadWithErrorRequest {
3457        type Borrowed<'a> = &'a Self;
3458        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3459            value
3460        }
3461    }
3462
3463    unsafe impl fidl::encoding::TypeMarker for EchoEchoTablePayloadWithErrorRequest {
3464        type Owned = Self;
3465
3466        #[inline(always)]
3467        fn inline_align(_context: fidl::encoding::Context) -> usize {
3468            8
3469        }
3470
3471        #[inline(always)]
3472        fn inline_size(_context: fidl::encoding::Context) -> usize {
3473            16
3474        }
3475    }
3476
3477    unsafe impl<D: fidl::encoding::ResourceDialect>
3478        fidl::encoding::Encode<EchoEchoTablePayloadWithErrorRequest, D>
3479        for &EchoEchoTablePayloadWithErrorRequest
3480    {
3481        unsafe fn encode(
3482            self,
3483            encoder: &mut fidl::encoding::Encoder<'_, D>,
3484            offset: usize,
3485            mut depth: fidl::encoding::Depth,
3486        ) -> fidl::Result<()> {
3487            encoder.debug_check_bounds::<EchoEchoTablePayloadWithErrorRequest>(offset);
3488            // Vector header
3489            let max_ordinal: u64 = self.max_ordinal_present();
3490            encoder.write_num(max_ordinal, offset);
3491            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3492            // Calling encoder.out_of_line_offset(0) is not allowed.
3493            if max_ordinal == 0 {
3494                return Ok(());
3495            }
3496            depth.increment()?;
3497            let envelope_size = 8;
3498            let bytes_len = max_ordinal as usize * envelope_size;
3499            #[allow(unused_variables)]
3500            let offset = encoder.out_of_line_offset(bytes_len);
3501            let mut _prev_end_offset: usize = 0;
3502            if 1 > max_ordinal {
3503                return Ok(());
3504            }
3505
3506            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3507            // are envelope_size bytes.
3508            let cur_offset: usize = (1 - 1) * envelope_size;
3509
3510            // Zero reserved fields.
3511            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3512
3513            // Safety:
3514            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3515            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3516            //   envelope_size bytes, there is always sufficient room.
3517            fidl::encoding::encode_in_envelope_optional::<u64, D>(
3518                self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
3519                encoder,
3520                offset + cur_offset,
3521                depth,
3522            )?;
3523
3524            _prev_end_offset = cur_offset + envelope_size;
3525            if 2 > max_ordinal {
3526                return Ok(());
3527            }
3528
3529            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3530            // are envelope_size bytes.
3531            let cur_offset: usize = (2 - 1) * envelope_size;
3532
3533            // Zero reserved fields.
3534            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3535
3536            // Safety:
3537            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3538            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3539            //   envelope_size bytes, there is always sufficient room.
3540            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
3541                self.forward_to_server.as_ref().map(
3542                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
3543                ),
3544                encoder,
3545                offset + cur_offset,
3546                depth,
3547            )?;
3548
3549            _prev_end_offset = cur_offset + envelope_size;
3550            if 3 > max_ordinal {
3551                return Ok(());
3552            }
3553
3554            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3555            // are envelope_size bytes.
3556            let cur_offset: usize = (3 - 1) * envelope_size;
3557
3558            // Zero reserved fields.
3559            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3560
3561            // Safety:
3562            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3563            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3564            //   envelope_size bytes, there is always sufficient room.
3565            fidl::encoding::encode_in_envelope_optional::<DefaultEnum, D>(
3566                self.result_err
3567                    .as_ref()
3568                    .map(<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow),
3569                encoder,
3570                offset + cur_offset,
3571                depth,
3572            )?;
3573
3574            _prev_end_offset = cur_offset + envelope_size;
3575            if 4 > max_ordinal {
3576                return Ok(());
3577            }
3578
3579            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3580            // are envelope_size bytes.
3581            let cur_offset: usize = (4 - 1) * envelope_size;
3582
3583            // Zero reserved fields.
3584            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3585
3586            // Safety:
3587            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3588            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3589            //   envelope_size bytes, there is always sufficient room.
3590            fidl::encoding::encode_in_envelope_optional::<RespondWith, D>(
3591                self.result_variant
3592                    .as_ref()
3593                    .map(<RespondWith as fidl::encoding::ValueTypeMarker>::borrow),
3594                encoder,
3595                offset + cur_offset,
3596                depth,
3597            )?;
3598
3599            _prev_end_offset = cur_offset + envelope_size;
3600
3601            Ok(())
3602        }
3603    }
3604
3605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3606        for EchoEchoTablePayloadWithErrorRequest
3607    {
3608        #[inline(always)]
3609        fn new_empty() -> Self {
3610            Self::default()
3611        }
3612
3613        unsafe fn decode(
3614            &mut self,
3615            decoder: &mut fidl::encoding::Decoder<'_, D>,
3616            offset: usize,
3617            mut depth: fidl::encoding::Depth,
3618        ) -> fidl::Result<()> {
3619            decoder.debug_check_bounds::<Self>(offset);
3620            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3621                None => return Err(fidl::Error::NotNullable),
3622                Some(len) => len,
3623            };
3624            // Calling decoder.out_of_line_offset(0) is not allowed.
3625            if len == 0 {
3626                return Ok(());
3627            };
3628            depth.increment()?;
3629            let envelope_size = 8;
3630            let bytes_len = len * envelope_size;
3631            let offset = decoder.out_of_line_offset(bytes_len)?;
3632            // Decode the envelope for each type.
3633            let mut _next_ordinal_to_read = 0;
3634            let mut next_offset = offset;
3635            let end_offset = offset + bytes_len;
3636            _next_ordinal_to_read += 1;
3637            if next_offset >= end_offset {
3638                return Ok(());
3639            }
3640
3641            // Decode unknown envelopes for gaps in ordinals.
3642            while _next_ordinal_to_read < 1 {
3643                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3644                _next_ordinal_to_read += 1;
3645                next_offset += envelope_size;
3646            }
3647
3648            let next_out_of_line = decoder.next_out_of_line();
3649            let handles_before = decoder.remaining_handles();
3650            if let Some((inlined, num_bytes, num_handles)) =
3651                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3652            {
3653                let member_inline_size =
3654                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3655                if inlined != (member_inline_size <= 4) {
3656                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3657                }
3658                let inner_offset;
3659                let mut inner_depth = depth.clone();
3660                if inlined {
3661                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3662                    inner_offset = next_offset;
3663                } else {
3664                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3665                    inner_depth.increment()?;
3666                }
3667                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64, D));
3668                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
3669                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3670                {
3671                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3672                }
3673                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3674                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3675                }
3676            }
3677
3678            next_offset += envelope_size;
3679            _next_ordinal_to_read += 1;
3680            if next_offset >= end_offset {
3681                return Ok(());
3682            }
3683
3684            // Decode unknown envelopes for gaps in ordinals.
3685            while _next_ordinal_to_read < 2 {
3686                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3687                _next_ordinal_to_read += 1;
3688                next_offset += envelope_size;
3689            }
3690
3691            let next_out_of_line = decoder.next_out_of_line();
3692            let handles_before = decoder.remaining_handles();
3693            if let Some((inlined, num_bytes, num_handles)) =
3694                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3695            {
3696                let member_inline_size =
3697                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
3698                        decoder.context,
3699                    );
3700                if inlined != (member_inline_size <= 4) {
3701                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3702                }
3703                let inner_offset;
3704                let mut inner_depth = depth.clone();
3705                if inlined {
3706                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3707                    inner_offset = next_offset;
3708                } else {
3709                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3710                    inner_depth.increment()?;
3711                }
3712                let val_ref = self
3713                    .forward_to_server
3714                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
3715                fidl::decode!(
3716                    fidl::encoding::UnboundedString,
3717                    D,
3718                    val_ref,
3719                    decoder,
3720                    inner_offset,
3721                    inner_depth
3722                )?;
3723                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3724                {
3725                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3726                }
3727                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3728                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3729                }
3730            }
3731
3732            next_offset += envelope_size;
3733            _next_ordinal_to_read += 1;
3734            if next_offset >= end_offset {
3735                return Ok(());
3736            }
3737
3738            // Decode unknown envelopes for gaps in ordinals.
3739            while _next_ordinal_to_read < 3 {
3740                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3741                _next_ordinal_to_read += 1;
3742                next_offset += envelope_size;
3743            }
3744
3745            let next_out_of_line = decoder.next_out_of_line();
3746            let handles_before = decoder.remaining_handles();
3747            if let Some((inlined, num_bytes, num_handles)) =
3748                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3749            {
3750                let member_inline_size =
3751                    <DefaultEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3752                if inlined != (member_inline_size <= 4) {
3753                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3754                }
3755                let inner_offset;
3756                let mut inner_depth = depth.clone();
3757                if inlined {
3758                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3759                    inner_offset = next_offset;
3760                } else {
3761                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3762                    inner_depth.increment()?;
3763                }
3764                let val_ref =
3765                    self.result_err.get_or_insert_with(|| fidl::new_empty!(DefaultEnum, D));
3766                fidl::decode!(DefaultEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
3767                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3768                {
3769                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3770                }
3771                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3772                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3773                }
3774            }
3775
3776            next_offset += envelope_size;
3777            _next_ordinal_to_read += 1;
3778            if next_offset >= end_offset {
3779                return Ok(());
3780            }
3781
3782            // Decode unknown envelopes for gaps in ordinals.
3783            while _next_ordinal_to_read < 4 {
3784                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3785                _next_ordinal_to_read += 1;
3786                next_offset += envelope_size;
3787            }
3788
3789            let next_out_of_line = decoder.next_out_of_line();
3790            let handles_before = decoder.remaining_handles();
3791            if let Some((inlined, num_bytes, num_handles)) =
3792                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3793            {
3794                let member_inline_size =
3795                    <RespondWith as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3796                if inlined != (member_inline_size <= 4) {
3797                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3798                }
3799                let inner_offset;
3800                let mut inner_depth = depth.clone();
3801                if inlined {
3802                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3803                    inner_offset = next_offset;
3804                } else {
3805                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3806                    inner_depth.increment()?;
3807                }
3808                let val_ref =
3809                    self.result_variant.get_or_insert_with(|| fidl::new_empty!(RespondWith, D));
3810                fidl::decode!(RespondWith, D, val_ref, decoder, inner_offset, inner_depth)?;
3811                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3812                {
3813                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3814                }
3815                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3816                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3817                }
3818            }
3819
3820            next_offset += envelope_size;
3821
3822            // Decode the remaining unknown envelopes.
3823            while next_offset < end_offset {
3824                _next_ordinal_to_read += 1;
3825                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3826                next_offset += envelope_size;
3827            }
3828
3829            Ok(())
3830        }
3831    }
3832
3833    impl RequestTable {
3834        #[inline(always)]
3835        fn max_ordinal_present(&self) -> u64 {
3836            if let Some(_) = self.forward_to_server {
3837                return 2;
3838            }
3839            if let Some(_) = self.value {
3840                return 1;
3841            }
3842            0
3843        }
3844    }
3845
3846    impl fidl::encoding::ValueTypeMarker for RequestTable {
3847        type Borrowed<'a> = &'a Self;
3848        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3849            value
3850        }
3851    }
3852
3853    unsafe impl fidl::encoding::TypeMarker for RequestTable {
3854        type Owned = Self;
3855
3856        #[inline(always)]
3857        fn inline_align(_context: fidl::encoding::Context) -> usize {
3858            8
3859        }
3860
3861        #[inline(always)]
3862        fn inline_size(_context: fidl::encoding::Context) -> usize {
3863            16
3864        }
3865    }
3866
3867    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RequestTable, D>
3868        for &RequestTable
3869    {
3870        unsafe fn encode(
3871            self,
3872            encoder: &mut fidl::encoding::Encoder<'_, D>,
3873            offset: usize,
3874            mut depth: fidl::encoding::Depth,
3875        ) -> fidl::Result<()> {
3876            encoder.debug_check_bounds::<RequestTable>(offset);
3877            // Vector header
3878            let max_ordinal: u64 = self.max_ordinal_present();
3879            encoder.write_num(max_ordinal, offset);
3880            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3881            // Calling encoder.out_of_line_offset(0) is not allowed.
3882            if max_ordinal == 0 {
3883                return Ok(());
3884            }
3885            depth.increment()?;
3886            let envelope_size = 8;
3887            let bytes_len = max_ordinal as usize * envelope_size;
3888            #[allow(unused_variables)]
3889            let offset = encoder.out_of_line_offset(bytes_len);
3890            let mut _prev_end_offset: usize = 0;
3891            if 1 > max_ordinal {
3892                return Ok(());
3893            }
3894
3895            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3896            // are envelope_size bytes.
3897            let cur_offset: usize = (1 - 1) * envelope_size;
3898
3899            // Zero reserved fields.
3900            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3901
3902            // Safety:
3903            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3904            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3905            //   envelope_size bytes, there is always sufficient room.
3906            fidl::encoding::encode_in_envelope_optional::<u64, D>(
3907                self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
3908                encoder,
3909                offset + cur_offset,
3910                depth,
3911            )?;
3912
3913            _prev_end_offset = cur_offset + envelope_size;
3914            if 2 > max_ordinal {
3915                return Ok(());
3916            }
3917
3918            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3919            // are envelope_size bytes.
3920            let cur_offset: usize = (2 - 1) * envelope_size;
3921
3922            // Zero reserved fields.
3923            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3924
3925            // Safety:
3926            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3927            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3928            //   envelope_size bytes, there is always sufficient room.
3929            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
3930                self.forward_to_server.as_ref().map(
3931                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
3932                ),
3933                encoder,
3934                offset + cur_offset,
3935                depth,
3936            )?;
3937
3938            _prev_end_offset = cur_offset + envelope_size;
3939
3940            Ok(())
3941        }
3942    }
3943
3944    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RequestTable {
3945        #[inline(always)]
3946        fn new_empty() -> Self {
3947            Self::default()
3948        }
3949
3950        unsafe fn decode(
3951            &mut self,
3952            decoder: &mut fidl::encoding::Decoder<'_, D>,
3953            offset: usize,
3954            mut depth: fidl::encoding::Depth,
3955        ) -> fidl::Result<()> {
3956            decoder.debug_check_bounds::<Self>(offset);
3957            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3958                None => return Err(fidl::Error::NotNullable),
3959                Some(len) => len,
3960            };
3961            // Calling decoder.out_of_line_offset(0) is not allowed.
3962            if len == 0 {
3963                return Ok(());
3964            };
3965            depth.increment()?;
3966            let envelope_size = 8;
3967            let bytes_len = len * envelope_size;
3968            let offset = decoder.out_of_line_offset(bytes_len)?;
3969            // Decode the envelope for each type.
3970            let mut _next_ordinal_to_read = 0;
3971            let mut next_offset = offset;
3972            let end_offset = offset + bytes_len;
3973            _next_ordinal_to_read += 1;
3974            if next_offset >= end_offset {
3975                return Ok(());
3976            }
3977
3978            // Decode unknown envelopes for gaps in ordinals.
3979            while _next_ordinal_to_read < 1 {
3980                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3981                _next_ordinal_to_read += 1;
3982                next_offset += envelope_size;
3983            }
3984
3985            let next_out_of_line = decoder.next_out_of_line();
3986            let handles_before = decoder.remaining_handles();
3987            if let Some((inlined, num_bytes, num_handles)) =
3988                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3989            {
3990                let member_inline_size =
3991                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3992                if inlined != (member_inline_size <= 4) {
3993                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3994                }
3995                let inner_offset;
3996                let mut inner_depth = depth.clone();
3997                if inlined {
3998                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3999                    inner_offset = next_offset;
4000                } else {
4001                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4002                    inner_depth.increment()?;
4003                }
4004                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64, D));
4005                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
4006                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4007                {
4008                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4009                }
4010                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4011                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4012                }
4013            }
4014
4015            next_offset += envelope_size;
4016            _next_ordinal_to_read += 1;
4017            if next_offset >= end_offset {
4018                return Ok(());
4019            }
4020
4021            // Decode unknown envelopes for gaps in ordinals.
4022            while _next_ordinal_to_read < 2 {
4023                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4024                _next_ordinal_to_read += 1;
4025                next_offset += envelope_size;
4026            }
4027
4028            let next_out_of_line = decoder.next_out_of_line();
4029            let handles_before = decoder.remaining_handles();
4030            if let Some((inlined, num_bytes, num_handles)) =
4031                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4032            {
4033                let member_inline_size =
4034                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4035                        decoder.context,
4036                    );
4037                if inlined != (member_inline_size <= 4) {
4038                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4039                }
4040                let inner_offset;
4041                let mut inner_depth = depth.clone();
4042                if inlined {
4043                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4044                    inner_offset = next_offset;
4045                } else {
4046                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4047                    inner_depth.increment()?;
4048                }
4049                let val_ref = self
4050                    .forward_to_server
4051                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4052                fidl::decode!(
4053                    fidl::encoding::UnboundedString,
4054                    D,
4055                    val_ref,
4056                    decoder,
4057                    inner_offset,
4058                    inner_depth
4059                )?;
4060                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4061                {
4062                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4063                }
4064                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4065                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4066                }
4067            }
4068
4069            next_offset += envelope_size;
4070
4071            // Decode the remaining unknown envelopes.
4072            while next_offset < end_offset {
4073                _next_ordinal_to_read += 1;
4074                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4075                next_offset += envelope_size;
4076            }
4077
4078            Ok(())
4079        }
4080    }
4081
4082    impl ResponseTable {
4083        #[inline(always)]
4084        fn max_ordinal_present(&self) -> u64 {
4085            if let Some(_) = self.value {
4086                return 1;
4087            }
4088            0
4089        }
4090    }
4091
4092    impl fidl::encoding::ValueTypeMarker for ResponseTable {
4093        type Borrowed<'a> = &'a Self;
4094        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4095            value
4096        }
4097    }
4098
4099    unsafe impl fidl::encoding::TypeMarker for ResponseTable {
4100        type Owned = Self;
4101
4102        #[inline(always)]
4103        fn inline_align(_context: fidl::encoding::Context) -> usize {
4104            8
4105        }
4106
4107        #[inline(always)]
4108        fn inline_size(_context: fidl::encoding::Context) -> usize {
4109            16
4110        }
4111    }
4112
4113    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResponseTable, D>
4114        for &ResponseTable
4115    {
4116        unsafe fn encode(
4117            self,
4118            encoder: &mut fidl::encoding::Encoder<'_, D>,
4119            offset: usize,
4120            mut depth: fidl::encoding::Depth,
4121        ) -> fidl::Result<()> {
4122            encoder.debug_check_bounds::<ResponseTable>(offset);
4123            // Vector header
4124            let max_ordinal: u64 = self.max_ordinal_present();
4125            encoder.write_num(max_ordinal, offset);
4126            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4127            // Calling encoder.out_of_line_offset(0) is not allowed.
4128            if max_ordinal == 0 {
4129                return Ok(());
4130            }
4131            depth.increment()?;
4132            let envelope_size = 8;
4133            let bytes_len = max_ordinal as usize * envelope_size;
4134            #[allow(unused_variables)]
4135            let offset = encoder.out_of_line_offset(bytes_len);
4136            let mut _prev_end_offset: usize = 0;
4137            if 1 > max_ordinal {
4138                return Ok(());
4139            }
4140
4141            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4142            // are envelope_size bytes.
4143            let cur_offset: usize = (1 - 1) * envelope_size;
4144
4145            // Zero reserved fields.
4146            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4147
4148            // Safety:
4149            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4150            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4151            //   envelope_size bytes, there is always sufficient room.
4152            fidl::encoding::encode_in_envelope_optional::<u64, D>(
4153                self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
4154                encoder,
4155                offset + cur_offset,
4156                depth,
4157            )?;
4158
4159            _prev_end_offset = cur_offset + envelope_size;
4160
4161            Ok(())
4162        }
4163    }
4164
4165    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResponseTable {
4166        #[inline(always)]
4167        fn new_empty() -> Self {
4168            Self::default()
4169        }
4170
4171        unsafe fn decode(
4172            &mut self,
4173            decoder: &mut fidl::encoding::Decoder<'_, D>,
4174            offset: usize,
4175            mut depth: fidl::encoding::Depth,
4176        ) -> fidl::Result<()> {
4177            decoder.debug_check_bounds::<Self>(offset);
4178            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4179                None => return Err(fidl::Error::NotNullable),
4180                Some(len) => len,
4181            };
4182            // Calling decoder.out_of_line_offset(0) is not allowed.
4183            if len == 0 {
4184                return Ok(());
4185            };
4186            depth.increment()?;
4187            let envelope_size = 8;
4188            let bytes_len = len * envelope_size;
4189            let offset = decoder.out_of_line_offset(bytes_len)?;
4190            // Decode the envelope for each type.
4191            let mut _next_ordinal_to_read = 0;
4192            let mut next_offset = offset;
4193            let end_offset = offset + bytes_len;
4194            _next_ordinal_to_read += 1;
4195            if next_offset >= end_offset {
4196                return Ok(());
4197            }
4198
4199            // Decode unknown envelopes for gaps in ordinals.
4200            while _next_ordinal_to_read < 1 {
4201                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4202                _next_ordinal_to_read += 1;
4203                next_offset += envelope_size;
4204            }
4205
4206            let next_out_of_line = decoder.next_out_of_line();
4207            let handles_before = decoder.remaining_handles();
4208            if let Some((inlined, num_bytes, num_handles)) =
4209                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4210            {
4211                let member_inline_size =
4212                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4213                if inlined != (member_inline_size <= 4) {
4214                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4215                }
4216                let inner_offset;
4217                let mut inner_depth = depth.clone();
4218                if inlined {
4219                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4220                    inner_offset = next_offset;
4221                } else {
4222                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4223                    inner_depth.increment()?;
4224                }
4225                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64, D));
4226                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
4227                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4228                {
4229                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4230                }
4231                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4232                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4233                }
4234            }
4235
4236            next_offset += envelope_size;
4237
4238            // Decode the remaining unknown envelopes.
4239            while next_offset < end_offset {
4240                _next_ordinal_to_read += 1;
4241                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4242                next_offset += envelope_size;
4243            }
4244
4245            Ok(())
4246        }
4247    }
4248
4249    impl ThisIsATable {
4250        #[inline(always)]
4251        fn max_ordinal_present(&self) -> u64 {
4252            if let Some(_) = self.s {
4253                return 1;
4254            }
4255            0
4256        }
4257    }
4258
4259    impl fidl::encoding::ValueTypeMarker for ThisIsATable {
4260        type Borrowed<'a> = &'a Self;
4261        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4262            value
4263        }
4264    }
4265
4266    unsafe impl fidl::encoding::TypeMarker for ThisIsATable {
4267        type Owned = Self;
4268
4269        #[inline(always)]
4270        fn inline_align(_context: fidl::encoding::Context) -> usize {
4271            8
4272        }
4273
4274        #[inline(always)]
4275        fn inline_size(_context: fidl::encoding::Context) -> usize {
4276            16
4277        }
4278    }
4279
4280    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsATable, D>
4281        for &ThisIsATable
4282    {
4283        unsafe fn encode(
4284            self,
4285            encoder: &mut fidl::encoding::Encoder<'_, D>,
4286            offset: usize,
4287            mut depth: fidl::encoding::Depth,
4288        ) -> fidl::Result<()> {
4289            encoder.debug_check_bounds::<ThisIsATable>(offset);
4290            // Vector header
4291            let max_ordinal: u64 = self.max_ordinal_present();
4292            encoder.write_num(max_ordinal, offset);
4293            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4294            // Calling encoder.out_of_line_offset(0) is not allowed.
4295            if max_ordinal == 0 {
4296                return Ok(());
4297            }
4298            depth.increment()?;
4299            let envelope_size = 8;
4300            let bytes_len = max_ordinal as usize * envelope_size;
4301            #[allow(unused_variables)]
4302            let offset = encoder.out_of_line_offset(bytes_len);
4303            let mut _prev_end_offset: usize = 0;
4304            if 1 > max_ordinal {
4305                return Ok(());
4306            }
4307
4308            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4309            // are envelope_size bytes.
4310            let cur_offset: usize = (1 - 1) * envelope_size;
4311
4312            // Zero reserved fields.
4313            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4314
4315            // Safety:
4316            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4317            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4318            //   envelope_size bytes, there is always sufficient room.
4319            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
4320                self.s.as_ref().map(
4321                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
4322                ),
4323                encoder,
4324                offset + cur_offset,
4325                depth,
4326            )?;
4327
4328            _prev_end_offset = cur_offset + envelope_size;
4329
4330            Ok(())
4331        }
4332    }
4333
4334    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsATable {
4335        #[inline(always)]
4336        fn new_empty() -> Self {
4337            Self::default()
4338        }
4339
4340        unsafe fn decode(
4341            &mut self,
4342            decoder: &mut fidl::encoding::Decoder<'_, D>,
4343            offset: usize,
4344            mut depth: fidl::encoding::Depth,
4345        ) -> fidl::Result<()> {
4346            decoder.debug_check_bounds::<Self>(offset);
4347            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4348                None => return Err(fidl::Error::NotNullable),
4349                Some(len) => len,
4350            };
4351            // Calling decoder.out_of_line_offset(0) is not allowed.
4352            if len == 0 {
4353                return Ok(());
4354            };
4355            depth.increment()?;
4356            let envelope_size = 8;
4357            let bytes_len = len * envelope_size;
4358            let offset = decoder.out_of_line_offset(bytes_len)?;
4359            // Decode the envelope for each type.
4360            let mut _next_ordinal_to_read = 0;
4361            let mut next_offset = offset;
4362            let end_offset = offset + bytes_len;
4363            _next_ordinal_to_read += 1;
4364            if next_offset >= end_offset {
4365                return Ok(());
4366            }
4367
4368            // Decode unknown envelopes for gaps in ordinals.
4369            while _next_ordinal_to_read < 1 {
4370                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4371                _next_ordinal_to_read += 1;
4372                next_offset += envelope_size;
4373            }
4374
4375            let next_out_of_line = decoder.next_out_of_line();
4376            let handles_before = decoder.remaining_handles();
4377            if let Some((inlined, num_bytes, num_handles)) =
4378                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4379            {
4380                let member_inline_size =
4381                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4382                        decoder.context,
4383                    );
4384                if inlined != (member_inline_size <= 4) {
4385                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4386                }
4387                let inner_offset;
4388                let mut inner_depth = depth.clone();
4389                if inlined {
4390                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4391                    inner_offset = next_offset;
4392                } else {
4393                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4394                    inner_depth.increment()?;
4395                }
4396                let val_ref = self
4397                    .s
4398                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4399                fidl::decode!(
4400                    fidl::encoding::UnboundedString,
4401                    D,
4402                    val_ref,
4403                    decoder,
4404                    inner_offset,
4405                    inner_depth
4406                )?;
4407                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4408                {
4409                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4410                }
4411                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4412                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4413                }
4414            }
4415
4416            next_offset += envelope_size;
4417
4418            // Decode the remaining unknown envelopes.
4419            while next_offset < end_offset {
4420                _next_ordinal_to_read += 1;
4421                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4422                next_offset += envelope_size;
4423            }
4424
4425            Ok(())
4426        }
4427    }
4428
4429    impl fidl::encoding::ValueTypeMarker for EchoEchoUnionPayloadWithErrorRequest {
4430        type Borrowed<'a> = &'a Self;
4431        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4432            value
4433        }
4434    }
4435
4436    unsafe impl fidl::encoding::TypeMarker for EchoEchoUnionPayloadWithErrorRequest {
4437        type Owned = Self;
4438
4439        #[inline(always)]
4440        fn inline_align(_context: fidl::encoding::Context) -> usize {
4441            8
4442        }
4443
4444        #[inline(always)]
4445        fn inline_size(_context: fidl::encoding::Context) -> usize {
4446            16
4447        }
4448    }
4449
4450    unsafe impl<D: fidl::encoding::ResourceDialect>
4451        fidl::encoding::Encode<EchoEchoUnionPayloadWithErrorRequest, D>
4452        for &EchoEchoUnionPayloadWithErrorRequest
4453    {
4454        #[inline]
4455        unsafe fn encode(
4456            self,
4457            encoder: &mut fidl::encoding::Encoder<'_, D>,
4458            offset: usize,
4459            _depth: fidl::encoding::Depth,
4460        ) -> fidl::Result<()> {
4461            encoder.debug_check_bounds::<EchoEchoUnionPayloadWithErrorRequest>(offset);
4462            encoder.write_num::<u64>(self.ordinal(), offset);
4463            match self {
4464                EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref val) => {
4465                    fidl::encoding::encode_in_envelope::<UnsignedErrorable, D>(
4466                        <UnsignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
4467                        encoder,
4468                        offset + 8,
4469                        _depth,
4470                    )
4471                }
4472                EchoEchoUnionPayloadWithErrorRequest::Signed(ref val) => {
4473                    fidl::encoding::encode_in_envelope::<SignedErrorable, D>(
4474                        <SignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
4475                        encoder,
4476                        offset + 8,
4477                        _depth,
4478                    )
4479                }
4480                EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking { .. } => {
4481                    Err(fidl::Error::UnknownUnionTag)
4482                }
4483            }
4484        }
4485    }
4486
4487    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4488        for EchoEchoUnionPayloadWithErrorRequest
4489    {
4490        #[inline(always)]
4491        fn new_empty() -> Self {
4492            Self::__SourceBreaking { unknown_ordinal: 0 }
4493        }
4494
4495        #[inline]
4496        unsafe fn decode(
4497            &mut self,
4498            decoder: &mut fidl::encoding::Decoder<'_, D>,
4499            offset: usize,
4500            mut depth: fidl::encoding::Depth,
4501        ) -> fidl::Result<()> {
4502            decoder.debug_check_bounds::<Self>(offset);
4503            #[allow(unused_variables)]
4504            let next_out_of_line = decoder.next_out_of_line();
4505            let handles_before = decoder.remaining_handles();
4506            let (ordinal, inlined, num_bytes, num_handles) =
4507                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4508
4509            let member_inline_size = match ordinal {
4510                1 => {
4511                    <UnsignedErrorable as fidl::encoding::TypeMarker>::inline_size(decoder.context)
4512                }
4513                2 => <SignedErrorable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4514                0 => return Err(fidl::Error::UnknownUnionTag),
4515                _ => num_bytes as usize,
4516            };
4517
4518            if inlined != (member_inline_size <= 4) {
4519                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4520            }
4521            let _inner_offset;
4522            if inlined {
4523                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4524                _inner_offset = offset + 8;
4525            } else {
4526                depth.increment()?;
4527                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4528            }
4529            match ordinal {
4530                1 => {
4531                    #[allow(irrefutable_let_patterns)]
4532                    if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(_) = self {
4533                        // Do nothing, read the value into the object
4534                    } else {
4535                        // Initialize `self` to the right variant
4536                        *self = EchoEchoUnionPayloadWithErrorRequest::Unsigned(fidl::new_empty!(
4537                            UnsignedErrorable,
4538                            D
4539                        ));
4540                    }
4541                    #[allow(irrefutable_let_patterns)]
4542                    if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref mut val) = self {
4543                        fidl::decode!(UnsignedErrorable, D, val, decoder, _inner_offset, depth)?;
4544                    } else {
4545                        unreachable!()
4546                    }
4547                }
4548                2 => {
4549                    #[allow(irrefutable_let_patterns)]
4550                    if let EchoEchoUnionPayloadWithErrorRequest::Signed(_) = self {
4551                        // Do nothing, read the value into the object
4552                    } else {
4553                        // Initialize `self` to the right variant
4554                        *self = EchoEchoUnionPayloadWithErrorRequest::Signed(fidl::new_empty!(
4555                            SignedErrorable,
4556                            D
4557                        ));
4558                    }
4559                    #[allow(irrefutable_let_patterns)]
4560                    if let EchoEchoUnionPayloadWithErrorRequest::Signed(ref mut val) = self {
4561                        fidl::decode!(SignedErrorable, D, val, decoder, _inner_offset, depth)?;
4562                    } else {
4563                        unreachable!()
4564                    }
4565                }
4566                #[allow(deprecated)]
4567                ordinal => {
4568                    for _ in 0..num_handles {
4569                        decoder.drop_next_handle()?;
4570                    }
4571                    *self = EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking {
4572                        unknown_ordinal: ordinal,
4573                    };
4574                }
4575            }
4576            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4577                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4578            }
4579            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4580                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4581            }
4582            Ok(())
4583        }
4584    }
4585
4586    impl fidl::encoding::ValueTypeMarker for RequestUnion {
4587        type Borrowed<'a> = &'a Self;
4588        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4589            value
4590        }
4591    }
4592
4593    unsafe impl fidl::encoding::TypeMarker for RequestUnion {
4594        type Owned = Self;
4595
4596        #[inline(always)]
4597        fn inline_align(_context: fidl::encoding::Context) -> usize {
4598            8
4599        }
4600
4601        #[inline(always)]
4602        fn inline_size(_context: fidl::encoding::Context) -> usize {
4603            16
4604        }
4605    }
4606
4607    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RequestUnion, D>
4608        for &RequestUnion
4609    {
4610        #[inline]
4611        unsafe fn encode(
4612            self,
4613            encoder: &mut fidl::encoding::Encoder<'_, D>,
4614            offset: usize,
4615            _depth: fidl::encoding::Depth,
4616        ) -> fidl::Result<()> {
4617            encoder.debug_check_bounds::<RequestUnion>(offset);
4618            encoder.write_num::<u64>(self.ordinal(), offset);
4619            match self {
4620                RequestUnion::Unsigned(ref val) => {
4621                    fidl::encoding::encode_in_envelope::<Unsigned, D>(
4622                        <Unsigned as fidl::encoding::ValueTypeMarker>::borrow(val),
4623                        encoder,
4624                        offset + 8,
4625                        _depth,
4626                    )
4627                }
4628                RequestUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<Signed, D>(
4629                    <Signed as fidl::encoding::ValueTypeMarker>::borrow(val),
4630                    encoder,
4631                    offset + 8,
4632                    _depth,
4633                ),
4634                RequestUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4635            }
4636        }
4637    }
4638
4639    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RequestUnion {
4640        #[inline(always)]
4641        fn new_empty() -> Self {
4642            Self::__SourceBreaking { unknown_ordinal: 0 }
4643        }
4644
4645        #[inline]
4646        unsafe fn decode(
4647            &mut self,
4648            decoder: &mut fidl::encoding::Decoder<'_, D>,
4649            offset: usize,
4650            mut depth: fidl::encoding::Depth,
4651        ) -> fidl::Result<()> {
4652            decoder.debug_check_bounds::<Self>(offset);
4653            #[allow(unused_variables)]
4654            let next_out_of_line = decoder.next_out_of_line();
4655            let handles_before = decoder.remaining_handles();
4656            let (ordinal, inlined, num_bytes, num_handles) =
4657                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4658
4659            let member_inline_size = match ordinal {
4660                1 => <Unsigned as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4661                2 => <Signed as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4662                0 => return Err(fidl::Error::UnknownUnionTag),
4663                _ => num_bytes as usize,
4664            };
4665
4666            if inlined != (member_inline_size <= 4) {
4667                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4668            }
4669            let _inner_offset;
4670            if inlined {
4671                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4672                _inner_offset = offset + 8;
4673            } else {
4674                depth.increment()?;
4675                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4676            }
4677            match ordinal {
4678                1 => {
4679                    #[allow(irrefutable_let_patterns)]
4680                    if let RequestUnion::Unsigned(_) = self {
4681                        // Do nothing, read the value into the object
4682                    } else {
4683                        // Initialize `self` to the right variant
4684                        *self = RequestUnion::Unsigned(fidl::new_empty!(Unsigned, D));
4685                    }
4686                    #[allow(irrefutable_let_patterns)]
4687                    if let RequestUnion::Unsigned(ref mut val) = self {
4688                        fidl::decode!(Unsigned, D, val, decoder, _inner_offset, depth)?;
4689                    } else {
4690                        unreachable!()
4691                    }
4692                }
4693                2 => {
4694                    #[allow(irrefutable_let_patterns)]
4695                    if let RequestUnion::Signed(_) = self {
4696                        // Do nothing, read the value into the object
4697                    } else {
4698                        // Initialize `self` to the right variant
4699                        *self = RequestUnion::Signed(fidl::new_empty!(Signed, D));
4700                    }
4701                    #[allow(irrefutable_let_patterns)]
4702                    if let RequestUnion::Signed(ref mut val) = self {
4703                        fidl::decode!(Signed, D, val, decoder, _inner_offset, depth)?;
4704                    } else {
4705                        unreachable!()
4706                    }
4707                }
4708                #[allow(deprecated)]
4709                ordinal => {
4710                    for _ in 0..num_handles {
4711                        decoder.drop_next_handle()?;
4712                    }
4713                    *self = RequestUnion::__SourceBreaking { unknown_ordinal: ordinal };
4714                }
4715            }
4716            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4717                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4718            }
4719            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4720                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4721            }
4722            Ok(())
4723        }
4724    }
4725
4726    impl fidl::encoding::ValueTypeMarker for ResponseUnion {
4727        type Borrowed<'a> = &'a Self;
4728        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4729            value
4730        }
4731    }
4732
4733    unsafe impl fidl::encoding::TypeMarker for ResponseUnion {
4734        type Owned = Self;
4735
4736        #[inline(always)]
4737        fn inline_align(_context: fidl::encoding::Context) -> usize {
4738            8
4739        }
4740
4741        #[inline(always)]
4742        fn inline_size(_context: fidl::encoding::Context) -> usize {
4743            16
4744        }
4745    }
4746
4747    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResponseUnion, D>
4748        for &ResponseUnion
4749    {
4750        #[inline]
4751        unsafe fn encode(
4752            self,
4753            encoder: &mut fidl::encoding::Encoder<'_, D>,
4754            offset: usize,
4755            _depth: fidl::encoding::Depth,
4756        ) -> fidl::Result<()> {
4757            encoder.debug_check_bounds::<ResponseUnion>(offset);
4758            encoder.write_num::<u64>(self.ordinal(), offset);
4759            match self {
4760                ResponseUnion::Unsigned(ref val) => fidl::encoding::encode_in_envelope::<u64, D>(
4761                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
4762                    encoder,
4763                    offset + 8,
4764                    _depth,
4765                ),
4766                ResponseUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
4767                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
4768                    encoder,
4769                    offset + 8,
4770                    _depth,
4771                ),
4772            }
4773        }
4774    }
4775
4776    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResponseUnion {
4777        #[inline(always)]
4778        fn new_empty() -> Self {
4779            Self::Unsigned(fidl::new_empty!(u64, D))
4780        }
4781
4782        #[inline]
4783        unsafe fn decode(
4784            &mut self,
4785            decoder: &mut fidl::encoding::Decoder<'_, D>,
4786            offset: usize,
4787            mut depth: fidl::encoding::Depth,
4788        ) -> fidl::Result<()> {
4789            decoder.debug_check_bounds::<Self>(offset);
4790            #[allow(unused_variables)]
4791            let next_out_of_line = decoder.next_out_of_line();
4792            let handles_before = decoder.remaining_handles();
4793            let (ordinal, inlined, num_bytes, num_handles) =
4794                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4795
4796            let member_inline_size = match ordinal {
4797                1 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4798                2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4799                _ => return Err(fidl::Error::UnknownUnionTag),
4800            };
4801
4802            if inlined != (member_inline_size <= 4) {
4803                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4804            }
4805            let _inner_offset;
4806            if inlined {
4807                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4808                _inner_offset = offset + 8;
4809            } else {
4810                depth.increment()?;
4811                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4812            }
4813            match ordinal {
4814                1 => {
4815                    #[allow(irrefutable_let_patterns)]
4816                    if let ResponseUnion::Unsigned(_) = self {
4817                        // Do nothing, read the value into the object
4818                    } else {
4819                        // Initialize `self` to the right variant
4820                        *self = ResponseUnion::Unsigned(fidl::new_empty!(u64, D));
4821                    }
4822                    #[allow(irrefutable_let_patterns)]
4823                    if let ResponseUnion::Unsigned(ref mut val) = self {
4824                        fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
4825                    } else {
4826                        unreachable!()
4827                    }
4828                }
4829                2 => {
4830                    #[allow(irrefutable_let_patterns)]
4831                    if let ResponseUnion::Signed(_) = self {
4832                        // Do nothing, read the value into the object
4833                    } else {
4834                        // Initialize `self` to the right variant
4835                        *self = ResponseUnion::Signed(fidl::new_empty!(i64, D));
4836                    }
4837                    #[allow(irrefutable_let_patterns)]
4838                    if let ResponseUnion::Signed(ref mut val) = self {
4839                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
4840                    } else {
4841                        unreachable!()
4842                    }
4843                }
4844                ordinal => panic!("unexpected ordinal {:?}", ordinal),
4845            }
4846            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4847                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4848            }
4849            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4850                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4851            }
4852            Ok(())
4853        }
4854    }
4855
4856    impl fidl::encoding::ValueTypeMarker for ThisIsAUnion {
4857        type Borrowed<'a> = &'a Self;
4858        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4859            value
4860        }
4861    }
4862
4863    unsafe impl fidl::encoding::TypeMarker for ThisIsAUnion {
4864        type Owned = Self;
4865
4866        #[inline(always)]
4867        fn inline_align(_context: fidl::encoding::Context) -> usize {
4868            8
4869        }
4870
4871        #[inline(always)]
4872        fn inline_size(_context: fidl::encoding::Context) -> usize {
4873            16
4874        }
4875    }
4876
4877    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAUnion, D>
4878        for &ThisIsAUnion
4879    {
4880        #[inline]
4881        unsafe fn encode(
4882            self,
4883            encoder: &mut fidl::encoding::Encoder<'_, D>,
4884            offset: usize,
4885            _depth: fidl::encoding::Depth,
4886        ) -> fidl::Result<()> {
4887            encoder.debug_check_bounds::<ThisIsAUnion>(offset);
4888            encoder.write_num::<u64>(self.ordinal(), offset);
4889            match self {
4890                ThisIsAUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
4891                    fidl::encoding::UnboundedString,
4892                    D,
4893                >(
4894                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
4895                        val,
4896                    ),
4897                    encoder,
4898                    offset + 8,
4899                    _depth,
4900                ),
4901                ThisIsAUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
4902                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
4903                    encoder,
4904                    offset + 8,
4905                    _depth,
4906                ),
4907            }
4908        }
4909    }
4910
4911    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAUnion {
4912        #[inline(always)]
4913        fn new_empty() -> Self {
4914            Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
4915        }
4916
4917        #[inline]
4918        unsafe fn decode(
4919            &mut self,
4920            decoder: &mut fidl::encoding::Decoder<'_, D>,
4921            offset: usize,
4922            mut depth: fidl::encoding::Depth,
4923        ) -> fidl::Result<()> {
4924            decoder.debug_check_bounds::<Self>(offset);
4925            #[allow(unused_variables)]
4926            let next_out_of_line = decoder.next_out_of_line();
4927            let handles_before = decoder.remaining_handles();
4928            let (ordinal, inlined, num_bytes, num_handles) =
4929                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4930
4931            let member_inline_size = match ordinal {
4932                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4933                    decoder.context,
4934                ),
4935                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4936                _ => return Err(fidl::Error::UnknownUnionTag),
4937            };
4938
4939            if inlined != (member_inline_size <= 4) {
4940                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4941            }
4942            let _inner_offset;
4943            if inlined {
4944                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4945                _inner_offset = offset + 8;
4946            } else {
4947                depth.increment()?;
4948                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4949            }
4950            match ordinal {
4951                1 => {
4952                    #[allow(irrefutable_let_patterns)]
4953                    if let ThisIsAUnion::S(_) = self {
4954                        // Do nothing, read the value into the object
4955                    } else {
4956                        // Initialize `self` to the right variant
4957                        *self =
4958                            ThisIsAUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
4959                    }
4960                    #[allow(irrefutable_let_patterns)]
4961                    if let ThisIsAUnion::S(ref mut val) = self {
4962                        fidl::decode!(
4963                            fidl::encoding::UnboundedString,
4964                            D,
4965                            val,
4966                            decoder,
4967                            _inner_offset,
4968                            depth
4969                        )?;
4970                    } else {
4971                        unreachable!()
4972                    }
4973                }
4974                2 => {
4975                    #[allow(irrefutable_let_patterns)]
4976                    if let ThisIsAUnion::B(_) = self {
4977                        // Do nothing, read the value into the object
4978                    } else {
4979                        // Initialize `self` to the right variant
4980                        *self = ThisIsAUnion::B(fidl::new_empty!(bool, D));
4981                    }
4982                    #[allow(irrefutable_let_patterns)]
4983                    if let ThisIsAUnion::B(ref mut val) = self {
4984                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4985                    } else {
4986                        unreachable!()
4987                    }
4988                }
4989                ordinal => panic!("unexpected ordinal {:?}", ordinal),
4990            }
4991            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4992                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4993            }
4994            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4995                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4996            }
4997            Ok(())
4998        }
4999    }
5000
5001    impl fidl::encoding::ValueTypeMarker for ThisIsAXunion {
5002        type Borrowed<'a> = &'a Self;
5003        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5004            value
5005        }
5006    }
5007
5008    unsafe impl fidl::encoding::TypeMarker for ThisIsAXunion {
5009        type Owned = Self;
5010
5011        #[inline(always)]
5012        fn inline_align(_context: fidl::encoding::Context) -> usize {
5013            8
5014        }
5015
5016        #[inline(always)]
5017        fn inline_size(_context: fidl::encoding::Context) -> usize {
5018            16
5019        }
5020    }
5021
5022    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAXunion, D>
5023        for &ThisIsAXunion
5024    {
5025        #[inline]
5026        unsafe fn encode(
5027            self,
5028            encoder: &mut fidl::encoding::Encoder<'_, D>,
5029            offset: usize,
5030            _depth: fidl::encoding::Depth,
5031        ) -> fidl::Result<()> {
5032            encoder.debug_check_bounds::<ThisIsAXunion>(offset);
5033            encoder.write_num::<u64>(self.ordinal(), offset);
5034            match self {
5035                ThisIsAXunion::S(ref val) => fidl::encoding::encode_in_envelope::<
5036                    fidl::encoding::UnboundedString,
5037                    D,
5038                >(
5039                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
5040                        val,
5041                    ),
5042                    encoder,
5043                    offset + 8,
5044                    _depth,
5045                ),
5046                ThisIsAXunion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
5047                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
5048                    encoder,
5049                    offset + 8,
5050                    _depth,
5051                ),
5052                ThisIsAXunion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
5053            }
5054        }
5055    }
5056
5057    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAXunion {
5058        #[inline(always)]
5059        fn new_empty() -> Self {
5060            Self::__SourceBreaking { unknown_ordinal: 0 }
5061        }
5062
5063        #[inline]
5064        unsafe fn decode(
5065            &mut self,
5066            decoder: &mut fidl::encoding::Decoder<'_, D>,
5067            offset: usize,
5068            mut depth: fidl::encoding::Depth,
5069        ) -> fidl::Result<()> {
5070            decoder.debug_check_bounds::<Self>(offset);
5071            #[allow(unused_variables)]
5072            let next_out_of_line = decoder.next_out_of_line();
5073            let handles_before = decoder.remaining_handles();
5074            let (ordinal, inlined, num_bytes, num_handles) =
5075                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5076
5077            let member_inline_size = match ordinal {
5078                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5079                    decoder.context,
5080                ),
5081                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5082                0 => return Err(fidl::Error::UnknownUnionTag),
5083                _ => num_bytes as usize,
5084            };
5085
5086            if inlined != (member_inline_size <= 4) {
5087                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5088            }
5089            let _inner_offset;
5090            if inlined {
5091                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5092                _inner_offset = offset + 8;
5093            } else {
5094                depth.increment()?;
5095                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5096            }
5097            match ordinal {
5098                1 => {
5099                    #[allow(irrefutable_let_patterns)]
5100                    if let ThisIsAXunion::S(_) = self {
5101                        // Do nothing, read the value into the object
5102                    } else {
5103                        // Initialize `self` to the right variant
5104                        *self =
5105                            ThisIsAXunion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
5106                    }
5107                    #[allow(irrefutable_let_patterns)]
5108                    if let ThisIsAXunion::S(ref mut val) = self {
5109                        fidl::decode!(
5110                            fidl::encoding::UnboundedString,
5111                            D,
5112                            val,
5113                            decoder,
5114                            _inner_offset,
5115                            depth
5116                        )?;
5117                    } else {
5118                        unreachable!()
5119                    }
5120                }
5121                2 => {
5122                    #[allow(irrefutable_let_patterns)]
5123                    if let ThisIsAXunion::B(_) = self {
5124                        // Do nothing, read the value into the object
5125                    } else {
5126                        // Initialize `self` to the right variant
5127                        *self = ThisIsAXunion::B(fidl::new_empty!(bool, D));
5128                    }
5129                    #[allow(irrefutable_let_patterns)]
5130                    if let ThisIsAXunion::B(ref mut val) = self {
5131                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
5132                    } else {
5133                        unreachable!()
5134                    }
5135                }
5136                #[allow(deprecated)]
5137                ordinal => {
5138                    for _ in 0..num_handles {
5139                        decoder.drop_next_handle()?;
5140                    }
5141                    *self = ThisIsAXunion::__SourceBreaking { unknown_ordinal: ordinal };
5142                }
5143            }
5144            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5145                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5146            }
5147            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5148                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5149            }
5150            Ok(())
5151        }
5152    }
5153}