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>
2829        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
2830    {
2831        #[inline]
2832        unsafe fn encode(
2833            self,
2834            encoder: &mut fidl::encoding::Encoder<'_, D>,
2835            offset: usize,
2836            depth: fidl::encoding::Depth,
2837        ) -> fidl::Result<()> {
2838            encoder.debug_check_bounds::<PrimitiveTypes>(offset);
2839            // Zero out padding regions. There's no need to apply masks
2840            // because the unmasked parts will be overwritten by fields.
2841            unsafe {
2842                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
2843                (ptr as *mut u64).write_unaligned(0);
2844            }
2845            unsafe {
2846                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
2847                (ptr as *mut u64).write_unaligned(0);
2848            }
2849            // Write the fields.
2850            self.0.encode(encoder, offset + 0, depth)?;
2851            self.1.encode(encoder, offset + 1, depth)?;
2852            self.2.encode(encoder, offset + 2, depth)?;
2853            self.3.encode(encoder, offset + 4, depth)?;
2854            self.4.encode(encoder, offset + 8, depth)?;
2855            self.5.encode(encoder, offset + 16, depth)?;
2856            self.6.encode(encoder, offset + 18, depth)?;
2857            self.7.encode(encoder, offset + 20, depth)?;
2858            self.8.encode(encoder, offset + 24, depth)?;
2859            self.9.encode(encoder, offset + 32, depth)?;
2860            self.10.encode(encoder, offset + 40, depth)?;
2861            Ok(())
2862        }
2863    }
2864
2865    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PrimitiveTypes {
2866        #[inline(always)]
2867        fn new_empty() -> Self {
2868            Self {
2869                b: fidl::new_empty!(bool, D),
2870                i8: fidl::new_empty!(i8, D),
2871                i16: fidl::new_empty!(i16, D),
2872                i32: fidl::new_empty!(i32, D),
2873                i64: fidl::new_empty!(i64, D),
2874                u8: fidl::new_empty!(u8, D),
2875                u16: fidl::new_empty!(u16, D),
2876                u32: fidl::new_empty!(u32, D),
2877                u64: fidl::new_empty!(u64, D),
2878                f32: fidl::new_empty!(f32, D),
2879                f64: fidl::new_empty!(f64, D),
2880            }
2881        }
2882
2883        #[inline]
2884        unsafe fn decode(
2885            &mut self,
2886            decoder: &mut fidl::encoding::Decoder<'_, D>,
2887            offset: usize,
2888            _depth: fidl::encoding::Depth,
2889        ) -> fidl::Result<()> {
2890            decoder.debug_check_bounds::<Self>(offset);
2891            // Verify that padding bytes are zero.
2892            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
2893            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2894            let mask = 0xff00u64;
2895            let maskedval = padval & mask;
2896            if maskedval != 0 {
2897                return Err(fidl::Error::NonZeroPadding {
2898                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
2899                });
2900            }
2901            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
2902            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2903            let mask = 0xffffffff00000000u64;
2904            let maskedval = padval & mask;
2905            if maskedval != 0 {
2906                return Err(fidl::Error::NonZeroPadding {
2907                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
2908                });
2909            }
2910            fidl::decode!(bool, D, &mut self.b, decoder, offset + 0, _depth)?;
2911            fidl::decode!(i8, D, &mut self.i8, decoder, offset + 1, _depth)?;
2912            fidl::decode!(i16, D, &mut self.i16, decoder, offset + 2, _depth)?;
2913            fidl::decode!(i32, D, &mut self.i32, decoder, offset + 4, _depth)?;
2914            fidl::decode!(i64, D, &mut self.i64, decoder, offset + 8, _depth)?;
2915            fidl::decode!(u8, D, &mut self.u8, decoder, offset + 16, _depth)?;
2916            fidl::decode!(u16, D, &mut self.u16, decoder, offset + 18, _depth)?;
2917            fidl::decode!(u32, D, &mut self.u32, decoder, offset + 20, _depth)?;
2918            fidl::decode!(u64, D, &mut self.u64, decoder, offset + 24, _depth)?;
2919            fidl::decode!(f32, D, &mut self.f32, decoder, offset + 32, _depth)?;
2920            fidl::decode!(f64, D, &mut self.f64, decoder, offset + 40, _depth)?;
2921            Ok(())
2922        }
2923    }
2924
2925    impl fidl::encoding::ValueTypeMarker for Strings {
2926        type Borrowed<'a> = &'a Self;
2927        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2928            value
2929        }
2930    }
2931
2932    unsafe impl fidl::encoding::TypeMarker for Strings {
2933        type Owned = Self;
2934
2935        #[inline(always)]
2936        fn inline_align(_context: fidl::encoding::Context) -> usize {
2937            8
2938        }
2939
2940        #[inline(always)]
2941        fn inline_size(_context: fidl::encoding::Context) -> usize {
2942            96
2943        }
2944    }
2945
2946    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Strings, D> for &Strings {
2947        #[inline]
2948        unsafe fn encode(
2949            self,
2950            encoder: &mut fidl::encoding::Encoder<'_, D>,
2951            offset: usize,
2952            _depth: fidl::encoding::Depth,
2953        ) -> fidl::Result<()> {
2954            encoder.debug_check_bounds::<Strings>(offset);
2955            // Delegate to tuple encoding.
2956            fidl::encoding::Encode::<Strings, D>::encode(
2957                (
2958                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
2959                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_s),
2960                    <fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(&self.size_0_s),
2961                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(&self.size_1_s),
2962                    <fidl::encoding::Optional<fidl::encoding::BoundedString<2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_size_0_s),
2963                    <fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_size_1_s),
2964                ),
2965                encoder, offset, _depth
2966            )
2967        }
2968    }
2969    unsafe impl<
2970            D: fidl::encoding::ResourceDialect,
2971            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2972            T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
2973            T2: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
2974            T3: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
2975            T4: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<2>>, D>,
2976            T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
2977        > fidl::encoding::Encode<Strings, D> for (T0, T1, T2, T3, T4, T5)
2978    {
2979        #[inline]
2980        unsafe fn encode(
2981            self,
2982            encoder: &mut fidl::encoding::Encoder<'_, D>,
2983            offset: usize,
2984            depth: fidl::encoding::Depth,
2985        ) -> fidl::Result<()> {
2986            encoder.debug_check_bounds::<Strings>(offset);
2987            // Zero out padding regions. There's no need to apply masks
2988            // because the unmasked parts will be overwritten by fields.
2989            // Write the fields.
2990            self.0.encode(encoder, offset + 0, depth)?;
2991            self.1.encode(encoder, offset + 16, depth)?;
2992            self.2.encode(encoder, offset + 32, depth)?;
2993            self.3.encode(encoder, offset + 48, depth)?;
2994            self.4.encode(encoder, offset + 64, depth)?;
2995            self.5.encode(encoder, offset + 80, depth)?;
2996            Ok(())
2997        }
2998    }
2999
3000    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Strings {
3001        #[inline(always)]
3002        fn new_empty() -> Self {
3003            Self {
3004                s: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3005                nullable_s: fidl::new_empty!(
3006                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3007                    D
3008                ),
3009                size_0_s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D),
3010                size_1_s: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
3011                nullable_size_0_s: fidl::new_empty!(
3012                    fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
3013                    D
3014                ),
3015                nullable_size_1_s: fidl::new_empty!(
3016                    fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
3017                    D
3018                ),
3019            }
3020        }
3021
3022        #[inline]
3023        unsafe fn decode(
3024            &mut self,
3025            decoder: &mut fidl::encoding::Decoder<'_, D>,
3026            offset: usize,
3027            _depth: fidl::encoding::Depth,
3028        ) -> fidl::Result<()> {
3029            decoder.debug_check_bounds::<Self>(offset);
3030            // Verify that padding bytes are zero.
3031            fidl::decode!(
3032                fidl::encoding::UnboundedString,
3033                D,
3034                &mut self.s,
3035                decoder,
3036                offset + 0,
3037                _depth
3038            )?;
3039            fidl::decode!(
3040                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
3041                D,
3042                &mut self.nullable_s,
3043                decoder,
3044                offset + 16,
3045                _depth
3046            )?;
3047            fidl::decode!(
3048                fidl::encoding::BoundedString<2>,
3049                D,
3050                &mut self.size_0_s,
3051                decoder,
3052                offset + 32,
3053                _depth
3054            )?;
3055            fidl::decode!(
3056                fidl::encoding::BoundedString<32>,
3057                D,
3058                &mut self.size_1_s,
3059                decoder,
3060                offset + 48,
3061                _depth
3062            )?;
3063            fidl::decode!(
3064                fidl::encoding::Optional<fidl::encoding::BoundedString<2>>,
3065                D,
3066                &mut self.nullable_size_0_s,
3067                decoder,
3068                offset + 64,
3069                _depth
3070            )?;
3071            fidl::decode!(
3072                fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
3073                D,
3074                &mut self.nullable_size_1_s,
3075                decoder,
3076                offset + 80,
3077                _depth
3078            )?;
3079            Ok(())
3080        }
3081    }
3082
3083    impl fidl::encoding::ValueTypeMarker for Structs {
3084        type Borrowed<'a> = &'a Self;
3085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3086            value
3087        }
3088    }
3089
3090    unsafe impl fidl::encoding::TypeMarker for Structs {
3091        type Owned = Self;
3092
3093        #[inline(always)]
3094        fn inline_align(_context: fidl::encoding::Context) -> usize {
3095            8
3096        }
3097
3098        #[inline(always)]
3099        fn inline_size(_context: fidl::encoding::Context) -> usize {
3100            32
3101        }
3102    }
3103
3104    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Structs, D> for &Structs {
3105        #[inline]
3106        unsafe fn encode(
3107            self,
3108            encoder: &mut fidl::encoding::Encoder<'_, D>,
3109            offset: usize,
3110            _depth: fidl::encoding::Depth,
3111        ) -> fidl::Result<()> {
3112            encoder.debug_check_bounds::<Structs>(offset);
3113            // Delegate to tuple encoding.
3114            fidl::encoding::Encode::<Structs, D>::encode(
3115                (
3116                    <ThisIsAStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
3117                    <fidl::encoding::Boxed<ThisIsAStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_s),
3118                    <ThisIsAnEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
3119                ),
3120                encoder, offset, _depth
3121            )
3122        }
3123    }
3124    unsafe impl<
3125            D: fidl::encoding::ResourceDialect,
3126            T0: fidl::encoding::Encode<ThisIsAStruct, D>,
3127            T1: fidl::encoding::Encode<fidl::encoding::Boxed<ThisIsAStruct>, D>,
3128            T2: fidl::encoding::Encode<ThisIsAnEmptyStruct, D>,
3129        > fidl::encoding::Encode<Structs, D> for (T0, T1, T2)
3130    {
3131        #[inline]
3132        unsafe fn encode(
3133            self,
3134            encoder: &mut fidl::encoding::Encoder<'_, D>,
3135            offset: usize,
3136            depth: fidl::encoding::Depth,
3137        ) -> fidl::Result<()> {
3138            encoder.debug_check_bounds::<Structs>(offset);
3139            // Zero out padding regions. There's no need to apply masks
3140            // because the unmasked parts will be overwritten by fields.
3141            unsafe {
3142                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
3143                (ptr as *mut u64).write_unaligned(0);
3144            }
3145            // Write the fields.
3146            self.0.encode(encoder, offset + 0, depth)?;
3147            self.1.encode(encoder, offset + 16, depth)?;
3148            self.2.encode(encoder, offset + 24, depth)?;
3149            Ok(())
3150        }
3151    }
3152
3153    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Structs {
3154        #[inline(always)]
3155        fn new_empty() -> Self {
3156            Self {
3157                s: fidl::new_empty!(ThisIsAStruct, D),
3158                nullable_s: fidl::new_empty!(fidl::encoding::Boxed<ThisIsAStruct>, D),
3159                es: fidl::new_empty!(ThisIsAnEmptyStruct, D),
3160            }
3161        }
3162
3163        #[inline]
3164        unsafe fn decode(
3165            &mut self,
3166            decoder: &mut fidl::encoding::Decoder<'_, D>,
3167            offset: usize,
3168            _depth: fidl::encoding::Depth,
3169        ) -> fidl::Result<()> {
3170            decoder.debug_check_bounds::<Self>(offset);
3171            // Verify that padding bytes are zero.
3172            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
3173            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3174            let mask = 0xffffffffffffff00u64;
3175            let maskedval = padval & mask;
3176            if maskedval != 0 {
3177                return Err(fidl::Error::NonZeroPadding {
3178                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
3179                });
3180            }
3181            fidl::decode!(ThisIsAStruct, D, &mut self.s, decoder, offset + 0, _depth)?;
3182            fidl::decode!(
3183                fidl::encoding::Boxed<ThisIsAStruct>,
3184                D,
3185                &mut self.nullable_s,
3186                decoder,
3187                offset + 16,
3188                _depth
3189            )?;
3190            fidl::decode!(ThisIsAnEmptyStruct, D, &mut self.es, decoder, offset + 24, _depth)?;
3191            Ok(())
3192        }
3193    }
3194
3195    impl fidl::encoding::ValueTypeMarker for ThisIsAStruct {
3196        type Borrowed<'a> = &'a Self;
3197        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3198            value
3199        }
3200    }
3201
3202    unsafe impl fidl::encoding::TypeMarker for ThisIsAStruct {
3203        type Owned = Self;
3204
3205        #[inline(always)]
3206        fn inline_align(_context: fidl::encoding::Context) -> usize {
3207            8
3208        }
3209
3210        #[inline(always)]
3211        fn inline_size(_context: fidl::encoding::Context) -> usize {
3212            16
3213        }
3214    }
3215
3216    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAStruct, D>
3217        for &ThisIsAStruct
3218    {
3219        #[inline]
3220        unsafe fn encode(
3221            self,
3222            encoder: &mut fidl::encoding::Encoder<'_, D>,
3223            offset: usize,
3224            _depth: fidl::encoding::Depth,
3225        ) -> fidl::Result<()> {
3226            encoder.debug_check_bounds::<ThisIsAStruct>(offset);
3227            // Delegate to tuple encoding.
3228            fidl::encoding::Encode::<ThisIsAStruct, D>::encode(
3229                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3230                    &self.s,
3231                ),),
3232                encoder,
3233                offset,
3234                _depth,
3235            )
3236        }
3237    }
3238    unsafe impl<
3239            D: fidl::encoding::ResourceDialect,
3240            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3241        > fidl::encoding::Encode<ThisIsAStruct, D> for (T0,)
3242    {
3243        #[inline]
3244        unsafe fn encode(
3245            self,
3246            encoder: &mut fidl::encoding::Encoder<'_, D>,
3247            offset: usize,
3248            depth: fidl::encoding::Depth,
3249        ) -> fidl::Result<()> {
3250            encoder.debug_check_bounds::<ThisIsAStruct>(offset);
3251            // Zero out padding regions. There's no need to apply masks
3252            // because the unmasked parts will be overwritten by fields.
3253            // Write the fields.
3254            self.0.encode(encoder, offset + 0, depth)?;
3255            Ok(())
3256        }
3257    }
3258
3259    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAStruct {
3260        #[inline(always)]
3261        fn new_empty() -> Self {
3262            Self { s: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
3263        }
3264
3265        #[inline]
3266        unsafe fn decode(
3267            &mut self,
3268            decoder: &mut fidl::encoding::Decoder<'_, D>,
3269            offset: usize,
3270            _depth: fidl::encoding::Depth,
3271        ) -> fidl::Result<()> {
3272            decoder.debug_check_bounds::<Self>(offset);
3273            // Verify that padding bytes are zero.
3274            fidl::decode!(
3275                fidl::encoding::UnboundedString,
3276                D,
3277                &mut self.s,
3278                decoder,
3279                offset + 0,
3280                _depth
3281            )?;
3282            Ok(())
3283        }
3284    }
3285
3286    impl fidl::encoding::ValueTypeMarker for ThisIsAnEmptyStruct {
3287        type Borrowed<'a> = &'a Self;
3288        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3289            value
3290        }
3291    }
3292
3293    unsafe impl fidl::encoding::TypeMarker for ThisIsAnEmptyStruct {
3294        type Owned = Self;
3295
3296        #[inline(always)]
3297        fn inline_align(_context: fidl::encoding::Context) -> usize {
3298            1
3299        }
3300
3301        #[inline(always)]
3302        fn inline_size(_context: fidl::encoding::Context) -> usize {
3303            1
3304        }
3305    }
3306
3307    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAnEmptyStruct, D>
3308        for &ThisIsAnEmptyStruct
3309    {
3310        #[inline]
3311        unsafe fn encode(
3312            self,
3313            encoder: &mut fidl::encoding::Encoder<'_, D>,
3314            offset: usize,
3315            _depth: fidl::encoding::Depth,
3316        ) -> fidl::Result<()> {
3317            encoder.debug_check_bounds::<ThisIsAnEmptyStruct>(offset);
3318            encoder.write_num(0u8, offset);
3319            Ok(())
3320        }
3321    }
3322
3323    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAnEmptyStruct {
3324        #[inline(always)]
3325        fn new_empty() -> Self {
3326            Self
3327        }
3328
3329        #[inline]
3330        unsafe fn decode(
3331            &mut self,
3332            decoder: &mut fidl::encoding::Decoder<'_, D>,
3333            offset: usize,
3334            _depth: fidl::encoding::Depth,
3335        ) -> fidl::Result<()> {
3336            decoder.debug_check_bounds::<Self>(offset);
3337            match decoder.read_num::<u8>(offset) {
3338                0 => Ok(()),
3339                _ => Err(fidl::Error::Invalid),
3340            }
3341        }
3342    }
3343
3344    impl fidl::encoding::ValueTypeMarker for Unions {
3345        type Borrowed<'a> = &'a Self;
3346        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3347            value
3348        }
3349    }
3350
3351    unsafe impl fidl::encoding::TypeMarker for Unions {
3352        type Owned = Self;
3353
3354        #[inline(always)]
3355        fn inline_align(_context: fidl::encoding::Context) -> usize {
3356            8
3357        }
3358
3359        #[inline(always)]
3360        fn inline_size(_context: fidl::encoding::Context) -> usize {
3361            32
3362        }
3363    }
3364
3365    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Unions, D> for &Unions {
3366        #[inline]
3367        unsafe fn encode(
3368            self,
3369            encoder: &mut fidl::encoding::Encoder<'_, D>,
3370            offset: usize,
3371            _depth: fidl::encoding::Depth,
3372        ) -> fidl::Result<()> {
3373            encoder.debug_check_bounds::<Unions>(offset);
3374            // Delegate to tuple encoding.
3375            fidl::encoding::Encode::<Unions, D>::encode(
3376                (
3377                    <ThisIsAUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
3378                    <fidl::encoding::OptionalUnion<ThisIsAUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
3379                ),
3380                encoder, offset, _depth
3381            )
3382        }
3383    }
3384    unsafe impl<
3385            D: fidl::encoding::ResourceDialect,
3386            T0: fidl::encoding::Encode<ThisIsAUnion, D>,
3387            T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<ThisIsAUnion>, D>,
3388        > fidl::encoding::Encode<Unions, D> for (T0, T1)
3389    {
3390        #[inline]
3391        unsafe fn encode(
3392            self,
3393            encoder: &mut fidl::encoding::Encoder<'_, D>,
3394            offset: usize,
3395            depth: fidl::encoding::Depth,
3396        ) -> fidl::Result<()> {
3397            encoder.debug_check_bounds::<Unions>(offset);
3398            // Zero out padding regions. There's no need to apply masks
3399            // because the unmasked parts will be overwritten by fields.
3400            // Write the fields.
3401            self.0.encode(encoder, offset + 0, depth)?;
3402            self.1.encode(encoder, offset + 16, depth)?;
3403            Ok(())
3404        }
3405    }
3406
3407    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Unions {
3408        #[inline(always)]
3409        fn new_empty() -> Self {
3410            Self {
3411                u: fidl::new_empty!(ThisIsAUnion, D),
3412                nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<ThisIsAUnion>, D),
3413            }
3414        }
3415
3416        #[inline]
3417        unsafe fn decode(
3418            &mut self,
3419            decoder: &mut fidl::encoding::Decoder<'_, D>,
3420            offset: usize,
3421            _depth: fidl::encoding::Depth,
3422        ) -> fidl::Result<()> {
3423            decoder.debug_check_bounds::<Self>(offset);
3424            // Verify that padding bytes are zero.
3425            fidl::decode!(ThisIsAUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
3426            fidl::decode!(
3427                fidl::encoding::OptionalUnion<ThisIsAUnion>,
3428                D,
3429                &mut self.nullable_u,
3430                decoder,
3431                offset + 16,
3432                _depth
3433            )?;
3434            Ok(())
3435        }
3436    }
3437
3438    impl EchoEchoTablePayloadWithErrorRequest {
3439        #[inline(always)]
3440        fn max_ordinal_present(&self) -> u64 {
3441            if let Some(_) = self.result_variant {
3442                return 4;
3443            }
3444            if let Some(_) = self.result_err {
3445                return 3;
3446            }
3447            if let Some(_) = self.forward_to_server {
3448                return 2;
3449            }
3450            if let Some(_) = self.value {
3451                return 1;
3452            }
3453            0
3454        }
3455    }
3456
3457    impl fidl::encoding::ValueTypeMarker for EchoEchoTablePayloadWithErrorRequest {
3458        type Borrowed<'a> = &'a Self;
3459        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3460            value
3461        }
3462    }
3463
3464    unsafe impl fidl::encoding::TypeMarker for EchoEchoTablePayloadWithErrorRequest {
3465        type Owned = Self;
3466
3467        #[inline(always)]
3468        fn inline_align(_context: fidl::encoding::Context) -> usize {
3469            8
3470        }
3471
3472        #[inline(always)]
3473        fn inline_size(_context: fidl::encoding::Context) -> usize {
3474            16
3475        }
3476    }
3477
3478    unsafe impl<D: fidl::encoding::ResourceDialect>
3479        fidl::encoding::Encode<EchoEchoTablePayloadWithErrorRequest, D>
3480        for &EchoEchoTablePayloadWithErrorRequest
3481    {
3482        unsafe fn encode(
3483            self,
3484            encoder: &mut fidl::encoding::Encoder<'_, D>,
3485            offset: usize,
3486            mut depth: fidl::encoding::Depth,
3487        ) -> fidl::Result<()> {
3488            encoder.debug_check_bounds::<EchoEchoTablePayloadWithErrorRequest>(offset);
3489            // Vector header
3490            let max_ordinal: u64 = self.max_ordinal_present();
3491            encoder.write_num(max_ordinal, offset);
3492            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3493            // Calling encoder.out_of_line_offset(0) is not allowed.
3494            if max_ordinal == 0 {
3495                return Ok(());
3496            }
3497            depth.increment()?;
3498            let envelope_size = 8;
3499            let bytes_len = max_ordinal as usize * envelope_size;
3500            #[allow(unused_variables)]
3501            let offset = encoder.out_of_line_offset(bytes_len);
3502            let mut _prev_end_offset: usize = 0;
3503            if 1 > max_ordinal {
3504                return Ok(());
3505            }
3506
3507            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3508            // are envelope_size bytes.
3509            let cur_offset: usize = (1 - 1) * envelope_size;
3510
3511            // Zero reserved fields.
3512            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3513
3514            // Safety:
3515            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3516            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3517            //   envelope_size bytes, there is always sufficient room.
3518            fidl::encoding::encode_in_envelope_optional::<u64, D>(
3519                self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
3520                encoder,
3521                offset + cur_offset,
3522                depth,
3523            )?;
3524
3525            _prev_end_offset = cur_offset + envelope_size;
3526            if 2 > max_ordinal {
3527                return Ok(());
3528            }
3529
3530            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3531            // are envelope_size bytes.
3532            let cur_offset: usize = (2 - 1) * envelope_size;
3533
3534            // Zero reserved fields.
3535            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3536
3537            // Safety:
3538            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3539            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3540            //   envelope_size bytes, there is always sufficient room.
3541            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
3542                self.forward_to_server.as_ref().map(
3543                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
3544                ),
3545                encoder,
3546                offset + cur_offset,
3547                depth,
3548            )?;
3549
3550            _prev_end_offset = cur_offset + envelope_size;
3551            if 3 > max_ordinal {
3552                return Ok(());
3553            }
3554
3555            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3556            // are envelope_size bytes.
3557            let cur_offset: usize = (3 - 1) * envelope_size;
3558
3559            // Zero reserved fields.
3560            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3561
3562            // Safety:
3563            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3564            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3565            //   envelope_size bytes, there is always sufficient room.
3566            fidl::encoding::encode_in_envelope_optional::<DefaultEnum, D>(
3567                self.result_err
3568                    .as_ref()
3569                    .map(<DefaultEnum as fidl::encoding::ValueTypeMarker>::borrow),
3570                encoder,
3571                offset + cur_offset,
3572                depth,
3573            )?;
3574
3575            _prev_end_offset = cur_offset + envelope_size;
3576            if 4 > max_ordinal {
3577                return Ok(());
3578            }
3579
3580            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3581            // are envelope_size bytes.
3582            let cur_offset: usize = (4 - 1) * envelope_size;
3583
3584            // Zero reserved fields.
3585            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3586
3587            // Safety:
3588            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3589            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3590            //   envelope_size bytes, there is always sufficient room.
3591            fidl::encoding::encode_in_envelope_optional::<RespondWith, D>(
3592                self.result_variant
3593                    .as_ref()
3594                    .map(<RespondWith as fidl::encoding::ValueTypeMarker>::borrow),
3595                encoder,
3596                offset + cur_offset,
3597                depth,
3598            )?;
3599
3600            _prev_end_offset = cur_offset + envelope_size;
3601
3602            Ok(())
3603        }
3604    }
3605
3606    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3607        for EchoEchoTablePayloadWithErrorRequest
3608    {
3609        #[inline(always)]
3610        fn new_empty() -> Self {
3611            Self::default()
3612        }
3613
3614        unsafe fn decode(
3615            &mut self,
3616            decoder: &mut fidl::encoding::Decoder<'_, D>,
3617            offset: usize,
3618            mut depth: fidl::encoding::Depth,
3619        ) -> fidl::Result<()> {
3620            decoder.debug_check_bounds::<Self>(offset);
3621            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3622                None => return Err(fidl::Error::NotNullable),
3623                Some(len) => len,
3624            };
3625            // Calling decoder.out_of_line_offset(0) is not allowed.
3626            if len == 0 {
3627                return Ok(());
3628            };
3629            depth.increment()?;
3630            let envelope_size = 8;
3631            let bytes_len = len * envelope_size;
3632            let offset = decoder.out_of_line_offset(bytes_len)?;
3633            // Decode the envelope for each type.
3634            let mut _next_ordinal_to_read = 0;
3635            let mut next_offset = offset;
3636            let end_offset = offset + bytes_len;
3637            _next_ordinal_to_read += 1;
3638            if next_offset >= end_offset {
3639                return Ok(());
3640            }
3641
3642            // Decode unknown envelopes for gaps in ordinals.
3643            while _next_ordinal_to_read < 1 {
3644                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3645                _next_ordinal_to_read += 1;
3646                next_offset += envelope_size;
3647            }
3648
3649            let next_out_of_line = decoder.next_out_of_line();
3650            let handles_before = decoder.remaining_handles();
3651            if let Some((inlined, num_bytes, num_handles)) =
3652                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3653            {
3654                let member_inline_size =
3655                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3656                if inlined != (member_inline_size <= 4) {
3657                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3658                }
3659                let inner_offset;
3660                let mut inner_depth = depth.clone();
3661                if inlined {
3662                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3663                    inner_offset = next_offset;
3664                } else {
3665                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3666                    inner_depth.increment()?;
3667                }
3668                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64, D));
3669                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
3670                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3671                {
3672                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3673                }
3674                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3675                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3676                }
3677            }
3678
3679            next_offset += envelope_size;
3680            _next_ordinal_to_read += 1;
3681            if next_offset >= end_offset {
3682                return Ok(());
3683            }
3684
3685            // Decode unknown envelopes for gaps in ordinals.
3686            while _next_ordinal_to_read < 2 {
3687                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3688                _next_ordinal_to_read += 1;
3689                next_offset += envelope_size;
3690            }
3691
3692            let next_out_of_line = decoder.next_out_of_line();
3693            let handles_before = decoder.remaining_handles();
3694            if let Some((inlined, num_bytes, num_handles)) =
3695                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3696            {
3697                let member_inline_size =
3698                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
3699                        decoder.context,
3700                    );
3701                if inlined != (member_inline_size <= 4) {
3702                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3703                }
3704                let inner_offset;
3705                let mut inner_depth = depth.clone();
3706                if inlined {
3707                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3708                    inner_offset = next_offset;
3709                } else {
3710                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3711                    inner_depth.increment()?;
3712                }
3713                let val_ref = self
3714                    .forward_to_server
3715                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
3716                fidl::decode!(
3717                    fidl::encoding::UnboundedString,
3718                    D,
3719                    val_ref,
3720                    decoder,
3721                    inner_offset,
3722                    inner_depth
3723                )?;
3724                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3725                {
3726                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3727                }
3728                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3729                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3730                }
3731            }
3732
3733            next_offset += envelope_size;
3734            _next_ordinal_to_read += 1;
3735            if next_offset >= end_offset {
3736                return Ok(());
3737            }
3738
3739            // Decode unknown envelopes for gaps in ordinals.
3740            while _next_ordinal_to_read < 3 {
3741                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3742                _next_ordinal_to_read += 1;
3743                next_offset += envelope_size;
3744            }
3745
3746            let next_out_of_line = decoder.next_out_of_line();
3747            let handles_before = decoder.remaining_handles();
3748            if let Some((inlined, num_bytes, num_handles)) =
3749                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3750            {
3751                let member_inline_size =
3752                    <DefaultEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3753                if inlined != (member_inline_size <= 4) {
3754                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3755                }
3756                let inner_offset;
3757                let mut inner_depth = depth.clone();
3758                if inlined {
3759                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3760                    inner_offset = next_offset;
3761                } else {
3762                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3763                    inner_depth.increment()?;
3764                }
3765                let val_ref =
3766                    self.result_err.get_or_insert_with(|| fidl::new_empty!(DefaultEnum, D));
3767                fidl::decode!(DefaultEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
3768                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3769                {
3770                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3771                }
3772                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3773                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3774                }
3775            }
3776
3777            next_offset += envelope_size;
3778            _next_ordinal_to_read += 1;
3779            if next_offset >= end_offset {
3780                return Ok(());
3781            }
3782
3783            // Decode unknown envelopes for gaps in ordinals.
3784            while _next_ordinal_to_read < 4 {
3785                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3786                _next_ordinal_to_read += 1;
3787                next_offset += envelope_size;
3788            }
3789
3790            let next_out_of_line = decoder.next_out_of_line();
3791            let handles_before = decoder.remaining_handles();
3792            if let Some((inlined, num_bytes, num_handles)) =
3793                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3794            {
3795                let member_inline_size =
3796                    <RespondWith as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3797                if inlined != (member_inline_size <= 4) {
3798                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3799                }
3800                let inner_offset;
3801                let mut inner_depth = depth.clone();
3802                if inlined {
3803                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3804                    inner_offset = next_offset;
3805                } else {
3806                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3807                    inner_depth.increment()?;
3808                }
3809                let val_ref =
3810                    self.result_variant.get_or_insert_with(|| fidl::new_empty!(RespondWith, D));
3811                fidl::decode!(RespondWith, D, val_ref, decoder, inner_offset, inner_depth)?;
3812                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3813                {
3814                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3815                }
3816                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3817                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3818                }
3819            }
3820
3821            next_offset += envelope_size;
3822
3823            // Decode the remaining unknown envelopes.
3824            while next_offset < end_offset {
3825                _next_ordinal_to_read += 1;
3826                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3827                next_offset += envelope_size;
3828            }
3829
3830            Ok(())
3831        }
3832    }
3833
3834    impl RequestTable {
3835        #[inline(always)]
3836        fn max_ordinal_present(&self) -> u64 {
3837            if let Some(_) = self.forward_to_server {
3838                return 2;
3839            }
3840            if let Some(_) = self.value {
3841                return 1;
3842            }
3843            0
3844        }
3845    }
3846
3847    impl fidl::encoding::ValueTypeMarker for RequestTable {
3848        type Borrowed<'a> = &'a Self;
3849        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3850            value
3851        }
3852    }
3853
3854    unsafe impl fidl::encoding::TypeMarker for RequestTable {
3855        type Owned = Self;
3856
3857        #[inline(always)]
3858        fn inline_align(_context: fidl::encoding::Context) -> usize {
3859            8
3860        }
3861
3862        #[inline(always)]
3863        fn inline_size(_context: fidl::encoding::Context) -> usize {
3864            16
3865        }
3866    }
3867
3868    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RequestTable, D>
3869        for &RequestTable
3870    {
3871        unsafe fn encode(
3872            self,
3873            encoder: &mut fidl::encoding::Encoder<'_, D>,
3874            offset: usize,
3875            mut depth: fidl::encoding::Depth,
3876        ) -> fidl::Result<()> {
3877            encoder.debug_check_bounds::<RequestTable>(offset);
3878            // Vector header
3879            let max_ordinal: u64 = self.max_ordinal_present();
3880            encoder.write_num(max_ordinal, offset);
3881            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3882            // Calling encoder.out_of_line_offset(0) is not allowed.
3883            if max_ordinal == 0 {
3884                return Ok(());
3885            }
3886            depth.increment()?;
3887            let envelope_size = 8;
3888            let bytes_len = max_ordinal as usize * envelope_size;
3889            #[allow(unused_variables)]
3890            let offset = encoder.out_of_line_offset(bytes_len);
3891            let mut _prev_end_offset: usize = 0;
3892            if 1 > max_ordinal {
3893                return Ok(());
3894            }
3895
3896            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3897            // are envelope_size bytes.
3898            let cur_offset: usize = (1 - 1) * envelope_size;
3899
3900            // Zero reserved fields.
3901            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3902
3903            // Safety:
3904            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3905            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3906            //   envelope_size bytes, there is always sufficient room.
3907            fidl::encoding::encode_in_envelope_optional::<u64, D>(
3908                self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
3909                encoder,
3910                offset + cur_offset,
3911                depth,
3912            )?;
3913
3914            _prev_end_offset = cur_offset + envelope_size;
3915            if 2 > max_ordinal {
3916                return Ok(());
3917            }
3918
3919            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3920            // are envelope_size bytes.
3921            let cur_offset: usize = (2 - 1) * envelope_size;
3922
3923            // Zero reserved fields.
3924            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3925
3926            // Safety:
3927            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3928            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3929            //   envelope_size bytes, there is always sufficient room.
3930            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
3931                self.forward_to_server.as_ref().map(
3932                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
3933                ),
3934                encoder,
3935                offset + cur_offset,
3936                depth,
3937            )?;
3938
3939            _prev_end_offset = cur_offset + envelope_size;
3940
3941            Ok(())
3942        }
3943    }
3944
3945    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RequestTable {
3946        #[inline(always)]
3947        fn new_empty() -> Self {
3948            Self::default()
3949        }
3950
3951        unsafe fn decode(
3952            &mut self,
3953            decoder: &mut fidl::encoding::Decoder<'_, D>,
3954            offset: usize,
3955            mut depth: fidl::encoding::Depth,
3956        ) -> fidl::Result<()> {
3957            decoder.debug_check_bounds::<Self>(offset);
3958            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3959                None => return Err(fidl::Error::NotNullable),
3960                Some(len) => len,
3961            };
3962            // Calling decoder.out_of_line_offset(0) is not allowed.
3963            if len == 0 {
3964                return Ok(());
3965            };
3966            depth.increment()?;
3967            let envelope_size = 8;
3968            let bytes_len = len * envelope_size;
3969            let offset = decoder.out_of_line_offset(bytes_len)?;
3970            // Decode the envelope for each type.
3971            let mut _next_ordinal_to_read = 0;
3972            let mut next_offset = offset;
3973            let end_offset = offset + bytes_len;
3974            _next_ordinal_to_read += 1;
3975            if next_offset >= end_offset {
3976                return Ok(());
3977            }
3978
3979            // Decode unknown envelopes for gaps in ordinals.
3980            while _next_ordinal_to_read < 1 {
3981                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3982                _next_ordinal_to_read += 1;
3983                next_offset += envelope_size;
3984            }
3985
3986            let next_out_of_line = decoder.next_out_of_line();
3987            let handles_before = decoder.remaining_handles();
3988            if let Some((inlined, num_bytes, num_handles)) =
3989                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3990            {
3991                let member_inline_size =
3992                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3993                if inlined != (member_inline_size <= 4) {
3994                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3995                }
3996                let inner_offset;
3997                let mut inner_depth = depth.clone();
3998                if inlined {
3999                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4000                    inner_offset = next_offset;
4001                } else {
4002                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4003                    inner_depth.increment()?;
4004                }
4005                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64, D));
4006                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
4007                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4008                {
4009                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4010                }
4011                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4012                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4013                }
4014            }
4015
4016            next_offset += envelope_size;
4017            _next_ordinal_to_read += 1;
4018            if next_offset >= end_offset {
4019                return Ok(());
4020            }
4021
4022            // Decode unknown envelopes for gaps in ordinals.
4023            while _next_ordinal_to_read < 2 {
4024                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4025                _next_ordinal_to_read += 1;
4026                next_offset += envelope_size;
4027            }
4028
4029            let next_out_of_line = decoder.next_out_of_line();
4030            let handles_before = decoder.remaining_handles();
4031            if let Some((inlined, num_bytes, num_handles)) =
4032                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4033            {
4034                let member_inline_size =
4035                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4036                        decoder.context,
4037                    );
4038                if inlined != (member_inline_size <= 4) {
4039                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4040                }
4041                let inner_offset;
4042                let mut inner_depth = depth.clone();
4043                if inlined {
4044                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4045                    inner_offset = next_offset;
4046                } else {
4047                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4048                    inner_depth.increment()?;
4049                }
4050                let val_ref = self
4051                    .forward_to_server
4052                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4053                fidl::decode!(
4054                    fidl::encoding::UnboundedString,
4055                    D,
4056                    val_ref,
4057                    decoder,
4058                    inner_offset,
4059                    inner_depth
4060                )?;
4061                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4062                {
4063                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4064                }
4065                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4066                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4067                }
4068            }
4069
4070            next_offset += envelope_size;
4071
4072            // Decode the remaining unknown envelopes.
4073            while next_offset < end_offset {
4074                _next_ordinal_to_read += 1;
4075                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4076                next_offset += envelope_size;
4077            }
4078
4079            Ok(())
4080        }
4081    }
4082
4083    impl ResponseTable {
4084        #[inline(always)]
4085        fn max_ordinal_present(&self) -> u64 {
4086            if let Some(_) = self.value {
4087                return 1;
4088            }
4089            0
4090        }
4091    }
4092
4093    impl fidl::encoding::ValueTypeMarker for ResponseTable {
4094        type Borrowed<'a> = &'a Self;
4095        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4096            value
4097        }
4098    }
4099
4100    unsafe impl fidl::encoding::TypeMarker for ResponseTable {
4101        type Owned = Self;
4102
4103        #[inline(always)]
4104        fn inline_align(_context: fidl::encoding::Context) -> usize {
4105            8
4106        }
4107
4108        #[inline(always)]
4109        fn inline_size(_context: fidl::encoding::Context) -> usize {
4110            16
4111        }
4112    }
4113
4114    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResponseTable, D>
4115        for &ResponseTable
4116    {
4117        unsafe fn encode(
4118            self,
4119            encoder: &mut fidl::encoding::Encoder<'_, D>,
4120            offset: usize,
4121            mut depth: fidl::encoding::Depth,
4122        ) -> fidl::Result<()> {
4123            encoder.debug_check_bounds::<ResponseTable>(offset);
4124            // Vector header
4125            let max_ordinal: u64 = self.max_ordinal_present();
4126            encoder.write_num(max_ordinal, offset);
4127            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4128            // Calling encoder.out_of_line_offset(0) is not allowed.
4129            if max_ordinal == 0 {
4130                return Ok(());
4131            }
4132            depth.increment()?;
4133            let envelope_size = 8;
4134            let bytes_len = max_ordinal as usize * envelope_size;
4135            #[allow(unused_variables)]
4136            let offset = encoder.out_of_line_offset(bytes_len);
4137            let mut _prev_end_offset: usize = 0;
4138            if 1 > max_ordinal {
4139                return Ok(());
4140            }
4141
4142            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4143            // are envelope_size bytes.
4144            let cur_offset: usize = (1 - 1) * envelope_size;
4145
4146            // Zero reserved fields.
4147            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4148
4149            // Safety:
4150            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4151            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4152            //   envelope_size bytes, there is always sufficient room.
4153            fidl::encoding::encode_in_envelope_optional::<u64, D>(
4154                self.value.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
4155                encoder,
4156                offset + cur_offset,
4157                depth,
4158            )?;
4159
4160            _prev_end_offset = cur_offset + envelope_size;
4161
4162            Ok(())
4163        }
4164    }
4165
4166    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResponseTable {
4167        #[inline(always)]
4168        fn new_empty() -> Self {
4169            Self::default()
4170        }
4171
4172        unsafe fn decode(
4173            &mut self,
4174            decoder: &mut fidl::encoding::Decoder<'_, D>,
4175            offset: usize,
4176            mut depth: fidl::encoding::Depth,
4177        ) -> fidl::Result<()> {
4178            decoder.debug_check_bounds::<Self>(offset);
4179            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4180                None => return Err(fidl::Error::NotNullable),
4181                Some(len) => len,
4182            };
4183            // Calling decoder.out_of_line_offset(0) is not allowed.
4184            if len == 0 {
4185                return Ok(());
4186            };
4187            depth.increment()?;
4188            let envelope_size = 8;
4189            let bytes_len = len * envelope_size;
4190            let offset = decoder.out_of_line_offset(bytes_len)?;
4191            // Decode the envelope for each type.
4192            let mut _next_ordinal_to_read = 0;
4193            let mut next_offset = offset;
4194            let end_offset = offset + bytes_len;
4195            _next_ordinal_to_read += 1;
4196            if next_offset >= end_offset {
4197                return Ok(());
4198            }
4199
4200            // Decode unknown envelopes for gaps in ordinals.
4201            while _next_ordinal_to_read < 1 {
4202                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4203                _next_ordinal_to_read += 1;
4204                next_offset += envelope_size;
4205            }
4206
4207            let next_out_of_line = decoder.next_out_of_line();
4208            let handles_before = decoder.remaining_handles();
4209            if let Some((inlined, num_bytes, num_handles)) =
4210                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4211            {
4212                let member_inline_size =
4213                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4214                if inlined != (member_inline_size <= 4) {
4215                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4216                }
4217                let inner_offset;
4218                let mut inner_depth = depth.clone();
4219                if inlined {
4220                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4221                    inner_offset = next_offset;
4222                } else {
4223                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4224                    inner_depth.increment()?;
4225                }
4226                let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u64, D));
4227                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
4228                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4229                {
4230                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4231                }
4232                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4233                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4234                }
4235            }
4236
4237            next_offset += envelope_size;
4238
4239            // Decode the remaining unknown envelopes.
4240            while next_offset < end_offset {
4241                _next_ordinal_to_read += 1;
4242                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4243                next_offset += envelope_size;
4244            }
4245
4246            Ok(())
4247        }
4248    }
4249
4250    impl ThisIsATable {
4251        #[inline(always)]
4252        fn max_ordinal_present(&self) -> u64 {
4253            if let Some(_) = self.s {
4254                return 1;
4255            }
4256            0
4257        }
4258    }
4259
4260    impl fidl::encoding::ValueTypeMarker for ThisIsATable {
4261        type Borrowed<'a> = &'a Self;
4262        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4263            value
4264        }
4265    }
4266
4267    unsafe impl fidl::encoding::TypeMarker for ThisIsATable {
4268        type Owned = Self;
4269
4270        #[inline(always)]
4271        fn inline_align(_context: fidl::encoding::Context) -> usize {
4272            8
4273        }
4274
4275        #[inline(always)]
4276        fn inline_size(_context: fidl::encoding::Context) -> usize {
4277            16
4278        }
4279    }
4280
4281    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsATable, D>
4282        for &ThisIsATable
4283    {
4284        unsafe fn encode(
4285            self,
4286            encoder: &mut fidl::encoding::Encoder<'_, D>,
4287            offset: usize,
4288            mut depth: fidl::encoding::Depth,
4289        ) -> fidl::Result<()> {
4290            encoder.debug_check_bounds::<ThisIsATable>(offset);
4291            // Vector header
4292            let max_ordinal: u64 = self.max_ordinal_present();
4293            encoder.write_num(max_ordinal, offset);
4294            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4295            // Calling encoder.out_of_line_offset(0) is not allowed.
4296            if max_ordinal == 0 {
4297                return Ok(());
4298            }
4299            depth.increment()?;
4300            let envelope_size = 8;
4301            let bytes_len = max_ordinal as usize * envelope_size;
4302            #[allow(unused_variables)]
4303            let offset = encoder.out_of_line_offset(bytes_len);
4304            let mut _prev_end_offset: usize = 0;
4305            if 1 > max_ordinal {
4306                return Ok(());
4307            }
4308
4309            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4310            // are envelope_size bytes.
4311            let cur_offset: usize = (1 - 1) * envelope_size;
4312
4313            // Zero reserved fields.
4314            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4315
4316            // Safety:
4317            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4318            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4319            //   envelope_size bytes, there is always sufficient room.
4320            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
4321                self.s.as_ref().map(
4322                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
4323                ),
4324                encoder,
4325                offset + cur_offset,
4326                depth,
4327            )?;
4328
4329            _prev_end_offset = cur_offset + envelope_size;
4330
4331            Ok(())
4332        }
4333    }
4334
4335    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsATable {
4336        #[inline(always)]
4337        fn new_empty() -> Self {
4338            Self::default()
4339        }
4340
4341        unsafe fn decode(
4342            &mut self,
4343            decoder: &mut fidl::encoding::Decoder<'_, D>,
4344            offset: usize,
4345            mut depth: fidl::encoding::Depth,
4346        ) -> fidl::Result<()> {
4347            decoder.debug_check_bounds::<Self>(offset);
4348            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4349                None => return Err(fidl::Error::NotNullable),
4350                Some(len) => len,
4351            };
4352            // Calling decoder.out_of_line_offset(0) is not allowed.
4353            if len == 0 {
4354                return Ok(());
4355            };
4356            depth.increment()?;
4357            let envelope_size = 8;
4358            let bytes_len = len * envelope_size;
4359            let offset = decoder.out_of_line_offset(bytes_len)?;
4360            // Decode the envelope for each type.
4361            let mut _next_ordinal_to_read = 0;
4362            let mut next_offset = offset;
4363            let end_offset = offset + bytes_len;
4364            _next_ordinal_to_read += 1;
4365            if next_offset >= end_offset {
4366                return Ok(());
4367            }
4368
4369            // Decode unknown envelopes for gaps in ordinals.
4370            while _next_ordinal_to_read < 1 {
4371                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4372                _next_ordinal_to_read += 1;
4373                next_offset += envelope_size;
4374            }
4375
4376            let next_out_of_line = decoder.next_out_of_line();
4377            let handles_before = decoder.remaining_handles();
4378            if let Some((inlined, num_bytes, num_handles)) =
4379                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4380            {
4381                let member_inline_size =
4382                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4383                        decoder.context,
4384                    );
4385                if inlined != (member_inline_size <= 4) {
4386                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4387                }
4388                let inner_offset;
4389                let mut inner_depth = depth.clone();
4390                if inlined {
4391                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4392                    inner_offset = next_offset;
4393                } else {
4394                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4395                    inner_depth.increment()?;
4396                }
4397                let val_ref = self
4398                    .s
4399                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4400                fidl::decode!(
4401                    fidl::encoding::UnboundedString,
4402                    D,
4403                    val_ref,
4404                    decoder,
4405                    inner_offset,
4406                    inner_depth
4407                )?;
4408                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4409                {
4410                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4411                }
4412                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4413                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4414                }
4415            }
4416
4417            next_offset += envelope_size;
4418
4419            // Decode the remaining unknown envelopes.
4420            while next_offset < end_offset {
4421                _next_ordinal_to_read += 1;
4422                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4423                next_offset += envelope_size;
4424            }
4425
4426            Ok(())
4427        }
4428    }
4429
4430    impl fidl::encoding::ValueTypeMarker for EchoEchoUnionPayloadWithErrorRequest {
4431        type Borrowed<'a> = &'a Self;
4432        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4433            value
4434        }
4435    }
4436
4437    unsafe impl fidl::encoding::TypeMarker for EchoEchoUnionPayloadWithErrorRequest {
4438        type Owned = Self;
4439
4440        #[inline(always)]
4441        fn inline_align(_context: fidl::encoding::Context) -> usize {
4442            8
4443        }
4444
4445        #[inline(always)]
4446        fn inline_size(_context: fidl::encoding::Context) -> usize {
4447            16
4448        }
4449    }
4450
4451    unsafe impl<D: fidl::encoding::ResourceDialect>
4452        fidl::encoding::Encode<EchoEchoUnionPayloadWithErrorRequest, D>
4453        for &EchoEchoUnionPayloadWithErrorRequest
4454    {
4455        #[inline]
4456        unsafe fn encode(
4457            self,
4458            encoder: &mut fidl::encoding::Encoder<'_, D>,
4459            offset: usize,
4460            _depth: fidl::encoding::Depth,
4461        ) -> fidl::Result<()> {
4462            encoder.debug_check_bounds::<EchoEchoUnionPayloadWithErrorRequest>(offset);
4463            encoder.write_num::<u64>(self.ordinal(), offset);
4464            match self {
4465                EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref val) => {
4466                    fidl::encoding::encode_in_envelope::<UnsignedErrorable, D>(
4467                        <UnsignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
4468                        encoder,
4469                        offset + 8,
4470                        _depth,
4471                    )
4472                }
4473                EchoEchoUnionPayloadWithErrorRequest::Signed(ref val) => {
4474                    fidl::encoding::encode_in_envelope::<SignedErrorable, D>(
4475                        <SignedErrorable as fidl::encoding::ValueTypeMarker>::borrow(val),
4476                        encoder,
4477                        offset + 8,
4478                        _depth,
4479                    )
4480                }
4481                EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking { .. } => {
4482                    Err(fidl::Error::UnknownUnionTag)
4483                }
4484            }
4485        }
4486    }
4487
4488    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4489        for EchoEchoUnionPayloadWithErrorRequest
4490    {
4491        #[inline(always)]
4492        fn new_empty() -> Self {
4493            Self::__SourceBreaking { unknown_ordinal: 0 }
4494        }
4495
4496        #[inline]
4497        unsafe fn decode(
4498            &mut self,
4499            decoder: &mut fidl::encoding::Decoder<'_, D>,
4500            offset: usize,
4501            mut depth: fidl::encoding::Depth,
4502        ) -> fidl::Result<()> {
4503            decoder.debug_check_bounds::<Self>(offset);
4504            #[allow(unused_variables)]
4505            let next_out_of_line = decoder.next_out_of_line();
4506            let handles_before = decoder.remaining_handles();
4507            let (ordinal, inlined, num_bytes, num_handles) =
4508                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4509
4510            let member_inline_size = match ordinal {
4511                1 => {
4512                    <UnsignedErrorable as fidl::encoding::TypeMarker>::inline_size(decoder.context)
4513                }
4514                2 => <SignedErrorable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4515                0 => return Err(fidl::Error::UnknownUnionTag),
4516                _ => num_bytes as usize,
4517            };
4518
4519            if inlined != (member_inline_size <= 4) {
4520                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4521            }
4522            let _inner_offset;
4523            if inlined {
4524                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4525                _inner_offset = offset + 8;
4526            } else {
4527                depth.increment()?;
4528                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4529            }
4530            match ordinal {
4531                1 => {
4532                    #[allow(irrefutable_let_patterns)]
4533                    if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(_) = self {
4534                        // Do nothing, read the value into the object
4535                    } else {
4536                        // Initialize `self` to the right variant
4537                        *self = EchoEchoUnionPayloadWithErrorRequest::Unsigned(fidl::new_empty!(
4538                            UnsignedErrorable,
4539                            D
4540                        ));
4541                    }
4542                    #[allow(irrefutable_let_patterns)]
4543                    if let EchoEchoUnionPayloadWithErrorRequest::Unsigned(ref mut val) = self {
4544                        fidl::decode!(UnsignedErrorable, D, val, decoder, _inner_offset, depth)?;
4545                    } else {
4546                        unreachable!()
4547                    }
4548                }
4549                2 => {
4550                    #[allow(irrefutable_let_patterns)]
4551                    if let EchoEchoUnionPayloadWithErrorRequest::Signed(_) = self {
4552                        // Do nothing, read the value into the object
4553                    } else {
4554                        // Initialize `self` to the right variant
4555                        *self = EchoEchoUnionPayloadWithErrorRequest::Signed(fidl::new_empty!(
4556                            SignedErrorable,
4557                            D
4558                        ));
4559                    }
4560                    #[allow(irrefutable_let_patterns)]
4561                    if let EchoEchoUnionPayloadWithErrorRequest::Signed(ref mut val) = self {
4562                        fidl::decode!(SignedErrorable, D, val, decoder, _inner_offset, depth)?;
4563                    } else {
4564                        unreachable!()
4565                    }
4566                }
4567                #[allow(deprecated)]
4568                ordinal => {
4569                    for _ in 0..num_handles {
4570                        decoder.drop_next_handle()?;
4571                    }
4572                    *self = EchoEchoUnionPayloadWithErrorRequest::__SourceBreaking {
4573                        unknown_ordinal: ordinal,
4574                    };
4575                }
4576            }
4577            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4578                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4579            }
4580            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4581                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4582            }
4583            Ok(())
4584        }
4585    }
4586
4587    impl fidl::encoding::ValueTypeMarker for RequestUnion {
4588        type Borrowed<'a> = &'a Self;
4589        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4590            value
4591        }
4592    }
4593
4594    unsafe impl fidl::encoding::TypeMarker for RequestUnion {
4595        type Owned = Self;
4596
4597        #[inline(always)]
4598        fn inline_align(_context: fidl::encoding::Context) -> usize {
4599            8
4600        }
4601
4602        #[inline(always)]
4603        fn inline_size(_context: fidl::encoding::Context) -> usize {
4604            16
4605        }
4606    }
4607
4608    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RequestUnion, D>
4609        for &RequestUnion
4610    {
4611        #[inline]
4612        unsafe fn encode(
4613            self,
4614            encoder: &mut fidl::encoding::Encoder<'_, D>,
4615            offset: usize,
4616            _depth: fidl::encoding::Depth,
4617        ) -> fidl::Result<()> {
4618            encoder.debug_check_bounds::<RequestUnion>(offset);
4619            encoder.write_num::<u64>(self.ordinal(), offset);
4620            match self {
4621                RequestUnion::Unsigned(ref val) => {
4622                    fidl::encoding::encode_in_envelope::<Unsigned, D>(
4623                        <Unsigned as fidl::encoding::ValueTypeMarker>::borrow(val),
4624                        encoder,
4625                        offset + 8,
4626                        _depth,
4627                    )
4628                }
4629                RequestUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<Signed, D>(
4630                    <Signed as fidl::encoding::ValueTypeMarker>::borrow(val),
4631                    encoder,
4632                    offset + 8,
4633                    _depth,
4634                ),
4635                RequestUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4636            }
4637        }
4638    }
4639
4640    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RequestUnion {
4641        #[inline(always)]
4642        fn new_empty() -> Self {
4643            Self::__SourceBreaking { unknown_ordinal: 0 }
4644        }
4645
4646        #[inline]
4647        unsafe fn decode(
4648            &mut self,
4649            decoder: &mut fidl::encoding::Decoder<'_, D>,
4650            offset: usize,
4651            mut depth: fidl::encoding::Depth,
4652        ) -> fidl::Result<()> {
4653            decoder.debug_check_bounds::<Self>(offset);
4654            #[allow(unused_variables)]
4655            let next_out_of_line = decoder.next_out_of_line();
4656            let handles_before = decoder.remaining_handles();
4657            let (ordinal, inlined, num_bytes, num_handles) =
4658                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4659
4660            let member_inline_size = match ordinal {
4661                1 => <Unsigned as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4662                2 => <Signed as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4663                0 => return Err(fidl::Error::UnknownUnionTag),
4664                _ => num_bytes as usize,
4665            };
4666
4667            if inlined != (member_inline_size <= 4) {
4668                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4669            }
4670            let _inner_offset;
4671            if inlined {
4672                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4673                _inner_offset = offset + 8;
4674            } else {
4675                depth.increment()?;
4676                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4677            }
4678            match ordinal {
4679                1 => {
4680                    #[allow(irrefutable_let_patterns)]
4681                    if let RequestUnion::Unsigned(_) = self {
4682                        // Do nothing, read the value into the object
4683                    } else {
4684                        // Initialize `self` to the right variant
4685                        *self = RequestUnion::Unsigned(fidl::new_empty!(Unsigned, D));
4686                    }
4687                    #[allow(irrefutable_let_patterns)]
4688                    if let RequestUnion::Unsigned(ref mut val) = self {
4689                        fidl::decode!(Unsigned, D, val, decoder, _inner_offset, depth)?;
4690                    } else {
4691                        unreachable!()
4692                    }
4693                }
4694                2 => {
4695                    #[allow(irrefutable_let_patterns)]
4696                    if let RequestUnion::Signed(_) = self {
4697                        // Do nothing, read the value into the object
4698                    } else {
4699                        // Initialize `self` to the right variant
4700                        *self = RequestUnion::Signed(fidl::new_empty!(Signed, D));
4701                    }
4702                    #[allow(irrefutable_let_patterns)]
4703                    if let RequestUnion::Signed(ref mut val) = self {
4704                        fidl::decode!(Signed, D, val, decoder, _inner_offset, depth)?;
4705                    } else {
4706                        unreachable!()
4707                    }
4708                }
4709                #[allow(deprecated)]
4710                ordinal => {
4711                    for _ in 0..num_handles {
4712                        decoder.drop_next_handle()?;
4713                    }
4714                    *self = RequestUnion::__SourceBreaking { unknown_ordinal: ordinal };
4715                }
4716            }
4717            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4718                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4719            }
4720            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4721                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4722            }
4723            Ok(())
4724        }
4725    }
4726
4727    impl fidl::encoding::ValueTypeMarker for ResponseUnion {
4728        type Borrowed<'a> = &'a Self;
4729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4730            value
4731        }
4732    }
4733
4734    unsafe impl fidl::encoding::TypeMarker for ResponseUnion {
4735        type Owned = Self;
4736
4737        #[inline(always)]
4738        fn inline_align(_context: fidl::encoding::Context) -> usize {
4739            8
4740        }
4741
4742        #[inline(always)]
4743        fn inline_size(_context: fidl::encoding::Context) -> usize {
4744            16
4745        }
4746    }
4747
4748    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResponseUnion, D>
4749        for &ResponseUnion
4750    {
4751        #[inline]
4752        unsafe fn encode(
4753            self,
4754            encoder: &mut fidl::encoding::Encoder<'_, D>,
4755            offset: usize,
4756            _depth: fidl::encoding::Depth,
4757        ) -> fidl::Result<()> {
4758            encoder.debug_check_bounds::<ResponseUnion>(offset);
4759            encoder.write_num::<u64>(self.ordinal(), offset);
4760            match self {
4761                ResponseUnion::Unsigned(ref val) => fidl::encoding::encode_in_envelope::<u64, D>(
4762                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
4763                    encoder,
4764                    offset + 8,
4765                    _depth,
4766                ),
4767                ResponseUnion::Signed(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
4768                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
4769                    encoder,
4770                    offset + 8,
4771                    _depth,
4772                ),
4773            }
4774        }
4775    }
4776
4777    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResponseUnion {
4778        #[inline(always)]
4779        fn new_empty() -> Self {
4780            Self::Unsigned(fidl::new_empty!(u64, D))
4781        }
4782
4783        #[inline]
4784        unsafe fn decode(
4785            &mut self,
4786            decoder: &mut fidl::encoding::Decoder<'_, D>,
4787            offset: usize,
4788            mut depth: fidl::encoding::Depth,
4789        ) -> fidl::Result<()> {
4790            decoder.debug_check_bounds::<Self>(offset);
4791            #[allow(unused_variables)]
4792            let next_out_of_line = decoder.next_out_of_line();
4793            let handles_before = decoder.remaining_handles();
4794            let (ordinal, inlined, num_bytes, num_handles) =
4795                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4796
4797            let member_inline_size = match ordinal {
4798                1 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4799                2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4800                _ => return Err(fidl::Error::UnknownUnionTag),
4801            };
4802
4803            if inlined != (member_inline_size <= 4) {
4804                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4805            }
4806            let _inner_offset;
4807            if inlined {
4808                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4809                _inner_offset = offset + 8;
4810            } else {
4811                depth.increment()?;
4812                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4813            }
4814            match ordinal {
4815                1 => {
4816                    #[allow(irrefutable_let_patterns)]
4817                    if let ResponseUnion::Unsigned(_) = self {
4818                        // Do nothing, read the value into the object
4819                    } else {
4820                        // Initialize `self` to the right variant
4821                        *self = ResponseUnion::Unsigned(fidl::new_empty!(u64, D));
4822                    }
4823                    #[allow(irrefutable_let_patterns)]
4824                    if let ResponseUnion::Unsigned(ref mut val) = self {
4825                        fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
4826                    } else {
4827                        unreachable!()
4828                    }
4829                }
4830                2 => {
4831                    #[allow(irrefutable_let_patterns)]
4832                    if let ResponseUnion::Signed(_) = self {
4833                        // Do nothing, read the value into the object
4834                    } else {
4835                        // Initialize `self` to the right variant
4836                        *self = ResponseUnion::Signed(fidl::new_empty!(i64, D));
4837                    }
4838                    #[allow(irrefutable_let_patterns)]
4839                    if let ResponseUnion::Signed(ref mut val) = self {
4840                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
4841                    } else {
4842                        unreachable!()
4843                    }
4844                }
4845                ordinal => panic!("unexpected ordinal {:?}", ordinal),
4846            }
4847            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4848                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4849            }
4850            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4851                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4852            }
4853            Ok(())
4854        }
4855    }
4856
4857    impl fidl::encoding::ValueTypeMarker for ThisIsAUnion {
4858        type Borrowed<'a> = &'a Self;
4859        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4860            value
4861        }
4862    }
4863
4864    unsafe impl fidl::encoding::TypeMarker for ThisIsAUnion {
4865        type Owned = Self;
4866
4867        #[inline(always)]
4868        fn inline_align(_context: fidl::encoding::Context) -> usize {
4869            8
4870        }
4871
4872        #[inline(always)]
4873        fn inline_size(_context: fidl::encoding::Context) -> usize {
4874            16
4875        }
4876    }
4877
4878    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAUnion, D>
4879        for &ThisIsAUnion
4880    {
4881        #[inline]
4882        unsafe fn encode(
4883            self,
4884            encoder: &mut fidl::encoding::Encoder<'_, D>,
4885            offset: usize,
4886            _depth: fidl::encoding::Depth,
4887        ) -> fidl::Result<()> {
4888            encoder.debug_check_bounds::<ThisIsAUnion>(offset);
4889            encoder.write_num::<u64>(self.ordinal(), offset);
4890            match self {
4891                ThisIsAUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
4892                    fidl::encoding::UnboundedString,
4893                    D,
4894                >(
4895                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
4896                        val,
4897                    ),
4898                    encoder,
4899                    offset + 8,
4900                    _depth,
4901                ),
4902                ThisIsAUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
4903                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
4904                    encoder,
4905                    offset + 8,
4906                    _depth,
4907                ),
4908            }
4909        }
4910    }
4911
4912    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAUnion {
4913        #[inline(always)]
4914        fn new_empty() -> Self {
4915            Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
4916        }
4917
4918        #[inline]
4919        unsafe fn decode(
4920            &mut self,
4921            decoder: &mut fidl::encoding::Decoder<'_, D>,
4922            offset: usize,
4923            mut depth: fidl::encoding::Depth,
4924        ) -> fidl::Result<()> {
4925            decoder.debug_check_bounds::<Self>(offset);
4926            #[allow(unused_variables)]
4927            let next_out_of_line = decoder.next_out_of_line();
4928            let handles_before = decoder.remaining_handles();
4929            let (ordinal, inlined, num_bytes, num_handles) =
4930                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4931
4932            let member_inline_size = match ordinal {
4933                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4934                    decoder.context,
4935                ),
4936                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4937                _ => return Err(fidl::Error::UnknownUnionTag),
4938            };
4939
4940            if inlined != (member_inline_size <= 4) {
4941                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4942            }
4943            let _inner_offset;
4944            if inlined {
4945                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4946                _inner_offset = offset + 8;
4947            } else {
4948                depth.increment()?;
4949                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4950            }
4951            match ordinal {
4952                1 => {
4953                    #[allow(irrefutable_let_patterns)]
4954                    if let ThisIsAUnion::S(_) = self {
4955                        // Do nothing, read the value into the object
4956                    } else {
4957                        // Initialize `self` to the right variant
4958                        *self =
4959                            ThisIsAUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
4960                    }
4961                    #[allow(irrefutable_let_patterns)]
4962                    if let ThisIsAUnion::S(ref mut val) = self {
4963                        fidl::decode!(
4964                            fidl::encoding::UnboundedString,
4965                            D,
4966                            val,
4967                            decoder,
4968                            _inner_offset,
4969                            depth
4970                        )?;
4971                    } else {
4972                        unreachable!()
4973                    }
4974                }
4975                2 => {
4976                    #[allow(irrefutable_let_patterns)]
4977                    if let ThisIsAUnion::B(_) = self {
4978                        // Do nothing, read the value into the object
4979                    } else {
4980                        // Initialize `self` to the right variant
4981                        *self = ThisIsAUnion::B(fidl::new_empty!(bool, D));
4982                    }
4983                    #[allow(irrefutable_let_patterns)]
4984                    if let ThisIsAUnion::B(ref mut val) = self {
4985                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4986                    } else {
4987                        unreachable!()
4988                    }
4989                }
4990                ordinal => panic!("unexpected ordinal {:?}", ordinal),
4991            }
4992            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4993                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4994            }
4995            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4996                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4997            }
4998            Ok(())
4999        }
5000    }
5001
5002    impl fidl::encoding::ValueTypeMarker for ThisIsAXunion {
5003        type Borrowed<'a> = &'a Self;
5004        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5005            value
5006        }
5007    }
5008
5009    unsafe impl fidl::encoding::TypeMarker for ThisIsAXunion {
5010        type Owned = Self;
5011
5012        #[inline(always)]
5013        fn inline_align(_context: fidl::encoding::Context) -> usize {
5014            8
5015        }
5016
5017        #[inline(always)]
5018        fn inline_size(_context: fidl::encoding::Context) -> usize {
5019            16
5020        }
5021    }
5022
5023    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThisIsAXunion, D>
5024        for &ThisIsAXunion
5025    {
5026        #[inline]
5027        unsafe fn encode(
5028            self,
5029            encoder: &mut fidl::encoding::Encoder<'_, D>,
5030            offset: usize,
5031            _depth: fidl::encoding::Depth,
5032        ) -> fidl::Result<()> {
5033            encoder.debug_check_bounds::<ThisIsAXunion>(offset);
5034            encoder.write_num::<u64>(self.ordinal(), offset);
5035            match self {
5036                ThisIsAXunion::S(ref val) => fidl::encoding::encode_in_envelope::<
5037                    fidl::encoding::UnboundedString,
5038                    D,
5039                >(
5040                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
5041                        val,
5042                    ),
5043                    encoder,
5044                    offset + 8,
5045                    _depth,
5046                ),
5047                ThisIsAXunion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
5048                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
5049                    encoder,
5050                    offset + 8,
5051                    _depth,
5052                ),
5053                ThisIsAXunion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
5054            }
5055        }
5056    }
5057
5058    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThisIsAXunion {
5059        #[inline(always)]
5060        fn new_empty() -> Self {
5061            Self::__SourceBreaking { unknown_ordinal: 0 }
5062        }
5063
5064        #[inline]
5065        unsafe fn decode(
5066            &mut self,
5067            decoder: &mut fidl::encoding::Decoder<'_, D>,
5068            offset: usize,
5069            mut depth: fidl::encoding::Depth,
5070        ) -> fidl::Result<()> {
5071            decoder.debug_check_bounds::<Self>(offset);
5072            #[allow(unused_variables)]
5073            let next_out_of_line = decoder.next_out_of_line();
5074            let handles_before = decoder.remaining_handles();
5075            let (ordinal, inlined, num_bytes, num_handles) =
5076                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5077
5078            let member_inline_size = match ordinal {
5079                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5080                    decoder.context,
5081                ),
5082                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5083                0 => return Err(fidl::Error::UnknownUnionTag),
5084                _ => num_bytes as usize,
5085            };
5086
5087            if inlined != (member_inline_size <= 4) {
5088                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5089            }
5090            let _inner_offset;
5091            if inlined {
5092                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5093                _inner_offset = offset + 8;
5094            } else {
5095                depth.increment()?;
5096                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5097            }
5098            match ordinal {
5099                1 => {
5100                    #[allow(irrefutable_let_patterns)]
5101                    if let ThisIsAXunion::S(_) = self {
5102                        // Do nothing, read the value into the object
5103                    } else {
5104                        // Initialize `self` to the right variant
5105                        *self =
5106                            ThisIsAXunion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
5107                    }
5108                    #[allow(irrefutable_let_patterns)]
5109                    if let ThisIsAXunion::S(ref mut val) = self {
5110                        fidl::decode!(
5111                            fidl::encoding::UnboundedString,
5112                            D,
5113                            val,
5114                            decoder,
5115                            _inner_offset,
5116                            depth
5117                        )?;
5118                    } else {
5119                        unreachable!()
5120                    }
5121                }
5122                2 => {
5123                    #[allow(irrefutable_let_patterns)]
5124                    if let ThisIsAXunion::B(_) = self {
5125                        // Do nothing, read the value into the object
5126                    } else {
5127                        // Initialize `self` to the right variant
5128                        *self = ThisIsAXunion::B(fidl::new_empty!(bool, D));
5129                    }
5130                    #[allow(irrefutable_let_patterns)]
5131                    if let ThisIsAXunion::B(ref mut val) = self {
5132                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
5133                    } else {
5134                        unreachable!()
5135                    }
5136                }
5137                #[allow(deprecated)]
5138                ordinal => {
5139                    for _ in 0..num_handles {
5140                        decoder.drop_next_handle()?;
5141                    }
5142                    *self = ThisIsAXunion::__SourceBreaking { unknown_ordinal: ordinal };
5143                }
5144            }
5145            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5146                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5147            }
5148            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5149                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5150            }
5151            Ok(())
5152        }
5153    }
5154}