Skip to main content

fidl_test_conformance/
fidl_test_conformance.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::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_test_conformance_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct AlternatingHandlesAndFailures {
16    pub h1: fidl::NullableHandle,
17    pub failure_trigger1: String,
18    pub h2: fidl::NullableHandle,
19    pub failure_trigger2: String,
20    pub h3: fidl::NullableHandle,
21}
22
23impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
24    for AlternatingHandlesAndFailures
25{
26}
27
28#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29pub struct ArrayOfArrayOfNonnullableHandles {
30    pub handles: [[fidl::NullableHandle; 3]; 4],
31}
32
33impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
34    for ArrayOfArrayOfNonnullableHandles
35{
36}
37
38#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39pub struct ArrayOfHandles {
40    pub a: [fidl::NullableHandle; 3],
41}
42
43impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfHandles {}
44
45#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ArrayOfNonnullableHandles {
47    pub handles: [fidl::NullableHandle; 4],
48}
49
50impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfNonnullableHandles {}
51
52#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
53pub struct ArrayOfNullableHandles {
54    pub handles: [Option<fidl::NullableHandle>; 5],
55}
56
57impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfNullableHandles {}
58
59#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct ArrayOfOptionalHandles {
61    pub a: [Option<fidl::NullableHandle>; 3],
62}
63
64impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfOptionalHandles {}
65
66#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
67pub struct ArrayOfVectorOfEventInStructWithDefaultRights {
68    pub h: [Vec<fidl::Event>; 1],
69}
70
71impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
72    for ArrayOfVectorOfEventInStructWithDefaultRights
73{
74}
75
76#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
77pub struct ArrayOfVectorOfEventInStructWithReducedRights {
78    pub h: [Vec<fidl::Event>; 1],
79}
80
81impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
82    for ArrayOfVectorOfEventInStructWithReducedRights
83{
84}
85
86#[derive(Debug, PartialEq)]
87pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
88    pub t: ArrayOfVectorOfEventInTableWithDefaultRights,
89}
90
91impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
92    for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
93{
94}
95
96#[derive(Debug, PartialEq)]
97pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct {
98    pub t: ArrayOfVectorOfEventInTableWithReducedRights,
99}
100
101impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
102    for ArrayOfVectorOfEventInTableWithReducedRightsStruct
103{
104}
105
106#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
107pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
108    pub u: ArrayOfVectorOfEventInUnionWithDefaultRights,
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
112    for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
113{
114}
115
116#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
117pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
118    pub u: ArrayOfVectorOfEventInUnionWithReducedRights,
119}
120
121impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
122    for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
123{
124}
125
126#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
127pub struct Bounded32NonnullableVectorOfHandles {
128    pub vh0: Vec<fidl::NullableHandle>,
129}
130
131impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
132    for Bounded32NonnullableVectorOfHandles
133{
134}
135
136#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137pub struct Bounded32NullableVectorOfHandles {
138    pub vh0: Option<Vec<fidl::NullableHandle>>,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
142    for Bounded32NullableVectorOfHandles
143{
144}
145
146#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147pub struct BoxOfSingleHandle {
148    pub b: Option<Box<SingleHandle>>,
149}
150
151impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BoxOfSingleHandle {}
152
153#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
154pub struct BoxOfSingleOptionalHandle {
155    pub b: Option<Box<SingleOptionalHandle>>,
156}
157
158impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BoxOfSingleOptionalHandle {}
159
160#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161pub struct CreateComponentRequest {
162    pub launch_info: LaunchInfo,
163    pub controller: Option<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
164}
165
166impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CreateComponentRequest {}
167
168#[derive(Debug, PartialEq)]
169pub struct EmptyResourceTableStruct {
170    pub table: EmptyResourceTable,
171}
172
173impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTableStruct {}
174
175#[derive(Debug, PartialEq)]
176pub struct EnvelopeInliningTestUnionStruct {
177    pub u: EnvelopeInliningTestUnion,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181    for EnvelopeInliningTestUnionStruct
182{
183}
184
185#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
186pub struct EventWithDefaultRights {
187    pub h: fidl::Event,
188}
189
190impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventWithDefaultRights {}
191
192#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
193pub struct EventWithReducedRights {
194    pub h: fidl::Event,
195}
196
197impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventWithReducedRights {}
198
199#[derive(Debug, PartialEq)]
200pub struct FidlvizDemo {
201    pub f1: u8,
202    pub f2: i8,
203    pub f3: u16,
204    pub f4: u32,
205    pub f5: u64,
206    pub f6: u8,
207    pub f7: u8,
208    pub f8: u16,
209    pub f9: f32,
210    pub f10: f64,
211    pub f11: bool,
212    pub f12: bool,
213    pub f13: String,
214    pub f14: Option<String>,
215    pub f15: String,
216    pub f16: Option<fidl::NullableHandle>,
217    pub f17: fidl::NullableHandle,
218    pub f18: [u8; 3],
219    pub f19: Vec<f64>,
220    pub f20: Option<Vec<u8>>,
221    pub f21: Vec<u8>,
222    pub f22: FidlvizBits,
223    pub f23: FidlvizEnum,
224    pub f24: FidlvizStruct1,
225    pub f25: FidlvizStruct2,
226    pub f26: Option<Box<FidlvizStruct1>>,
227    pub f27: Option<Box<FidlvizStruct2>>,
228    pub f28: FidlvizTable,
229    pub f29: FidlvizTable,
230    pub f30: Option<Box<FidlvizUnion>>,
231    pub f31: FidlvizUnion,
232}
233
234impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {}
235
236#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
237pub struct GoldenHandleBasicRightsStruct {
238    pub v: fidl::Event,
239}
240
241impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
242    for GoldenHandleBasicRightsStruct
243{
244}
245
246#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
247pub struct GoldenNullableHandleStruct {
248    pub v: Option<fidl::NullableHandle>,
249}
250
251impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
252    for GoldenNullableHandleStruct
253{
254}
255
256#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
257pub struct LaunchInfo {
258    pub url: String,
259    pub arguments: Option<Vec<String>>,
260    pub out: Option<Box<TransformerEmptyStruct>>,
261    pub err: Option<Box<TransformerEmptyStruct>>,
262    pub directory_request: Option<fidl::Channel>,
263    pub flat_namespace: Option<Box<TransformerEmptyStruct>>,
264    pub additional_services: Option<Box<TransformerEmptyStruct>>,
265}
266
267impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {}
268
269#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
270pub struct MultipleBoundedNonnullableVectorsOfHandles {
271    pub vh0: Vec<fidl::NullableHandle>,
272    pub vh1: Vec<fidl::NullableHandle>,
273}
274
275impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
276    for MultipleBoundedNonnullableVectorsOfHandles
277{
278}
279
280#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
281pub struct MultipleBoundedNullableVectorsOfHandles {
282    pub vh0: Option<Vec<fidl::NullableHandle>>,
283    pub vh1: Option<Vec<fidl::NullableHandle>>,
284}
285
286impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
287    for MultipleBoundedNullableVectorsOfHandles
288{
289}
290
291#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
292pub struct MultipleHandleSubtypes {
293    pub untyped: fidl::NullableHandle,
294    pub event: fidl::Event,
295    pub channel: fidl::Channel,
296}
297
298impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MultipleHandleSubtypes {}
299
300#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
301pub struct MultipleNonnullableHandles {
302    pub data0: u32,
303    pub handle0: fidl::NullableHandle,
304    pub data1: u64,
305    pub handle1: fidl::Channel,
306    pub handle2: fidl::Event,
307    pub data2: u64,
308}
309
310impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
311    for MultipleNonnullableHandles
312{
313}
314
315#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
316pub struct MultipleNullableHandles {
317    pub data0: u32,
318    pub handle0: Option<fidl::NullableHandle>,
319    pub data1: u64,
320    pub handle1: Option<fidl::Channel>,
321    pub handle2: Option<fidl::Event>,
322    pub data2: u64,
323}
324
325impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MultipleNullableHandles {}
326
327#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
328pub struct NonnullableHandle {
329    pub h: fidl::NullableHandle,
330}
331
332impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NonnullableHandle {}
333
334#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
335pub struct NonnullableHandleArray {
336    pub handles: [fidl::NullableHandle; 4],
337}
338
339impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NonnullableHandleArray {}
340
341#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
342pub struct NullableHandle {
343    pub h: Option<fidl::NullableHandle>,
344}
345
346impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NullableHandle {}
347
348#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
349pub struct OutOfLineArrayOfNonnullableHandles {
350    pub handles: Option<Box<NonnullableHandleArray>>,
351}
352
353impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
354    for OutOfLineArrayOfNonnullableHandles
355{
356}
357
358#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
359pub struct Sandwich6 {
360    pub before: u32,
361    pub the_union: UnionWithVector,
362    pub after: u32,
363}
364
365impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {}
366
367#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
368pub struct ShortStringThenHandle {
369    pub s: String,
370    pub h: fidl::NullableHandle,
371}
372
373impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ShortStringThenHandle {}
374
375#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
376pub struct SingleHandle {
377    pub h: fidl::NullableHandle,
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {}
381
382#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
383pub struct SingleOptionalHandle {
384    pub h: Option<fidl::NullableHandle>,
385}
386
387impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SingleOptionalHandle {}
388
389#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
390pub struct StructOfEndpoints {
391    pub client_end: fidl::endpoints::ClientEnd<ProtocolMarker>,
392    pub optional_client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
393    pub server_end: fidl::endpoints::ServerEnd<ProtocolMarker>,
394    pub optional_server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
395}
396
397impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for StructOfEndpoints {}
398
399#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
400pub struct StructOfOptionalUnionOfHandle {
401    pub u: Option<Box<UnionOfHandle>>,
402}
403
404impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
405    for StructOfOptionalUnionOfHandle
406{
407}
408
409#[derive(Debug, PartialEq)]
410pub struct StructOfSimpleResourceTable {
411    pub table: SimpleResourceTable,
412}
413
414impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
415    for StructOfSimpleResourceTable
416{
417}
418
419#[derive(Debug, PartialEq)]
420pub struct TableFieldInlinedHandleStruct {
421    pub t: TableFieldInlinedHandle,
422}
423
424impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
425    for TableFieldInlinedHandleStruct
426{
427}
428
429#[derive(Debug, PartialEq)]
430pub struct TableFieldUnknownResourceStruct {
431    pub t: TableFieldUnknownResource,
432}
433
434impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
435    for TableFieldUnknownResourceStruct
436{
437}
438
439#[derive(Debug, PartialEq)]
440pub struct TableOfEndpoints {
441    pub t: TableOfEndpointsTable,
442}
443
444impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpoints {}
445
446#[derive(Debug, PartialEq)]
447pub struct TableUnionWithVectorReservedSandwichStruct {
448    pub table: TableUnionWithVectorReservedSandwich,
449}
450
451impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
452    for TableUnionWithVectorReservedSandwichStruct
453{
454}
455
456#[derive(Debug, PartialEq)]
457pub struct TableUnionWithVectorStructSandwichStruct {
458    pub table: TableUnionWithVectorStructSandwich,
459}
460
461impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
462    for TableUnionWithVectorStructSandwichStruct
463{
464}
465
466#[derive(Debug, PartialEq)]
467pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
468    pub t: TableWithUnknownEnvelopesAfterKnownEnvelopes,
469}
470
471impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
472    for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
473{
474}
475
476#[derive(Debug, PartialEq)]
477pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
478    pub t: TableWithUnknownEnvelopesBeforeKnownEnvelopes,
479}
480
481impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
482    for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
483{
484}
485
486#[derive(Debug, PartialEq)]
487pub struct TestFlexibleResourceXUnionInStruct {
488    pub xu: SampleResourceXUnion,
489}
490
491impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
492    for TestFlexibleResourceXUnionInStruct
493{
494}
495
496#[derive(Debug, PartialEq)]
497pub struct TestOptionalFlexibleResourceXUnionInStruct {
498    pub xu: Option<Box<SampleResourceXUnion>>,
499}
500
501impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
502    for TestOptionalFlexibleResourceXUnionInStruct
503{
504}
505
506#[derive(Debug, PartialEq)]
507pub struct TestOptionalStrictResourceXUnionInStruct {
508    pub xu: Option<Box<SampleStrictResourceXUnion>>,
509}
510
511impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
512    for TestOptionalStrictResourceXUnionInStruct
513{
514}
515
516#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
517pub struct TestPackageResolverResolveRequest {
518    pub package_url: String,
519    pub selectors: Vec<String>,
520    pub update_policy: UpdatePolicy,
521    pub this_should_be_a_handle: u32,
522}
523
524impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
525    for TestPackageResolverResolveRequest
526{
527}
528
529#[derive(Debug, PartialEq)]
530pub struct TestStrictResourceXUnionInStruct {
531    pub xu: SampleStrictResourceXUnion,
532}
533
534impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
535    for TestStrictResourceXUnionInStruct
536{
537}
538
539#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
540pub struct UnboundedNonnullableVectorOfHandles {
541    pub vh0: Vec<fidl::NullableHandle>,
542}
543
544impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
545    for UnboundedNonnullableVectorOfHandles
546{
547}
548
549#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
550pub struct UnboundedNullableVectorOfHandles {
551    pub vh0: Option<Vec<fidl::NullableHandle>>,
552}
553
554impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
555    for UnboundedNullableVectorOfHandles
556{
557}
558
559#[derive(Debug, PartialEq)]
560pub struct UnionOfEndpoints {
561    pub u: UnionOfEndpointsUnion,
562}
563
564impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpoints {}
565
566#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
567pub struct VectorOfArrayOfEventInStructWithDefaultRights {
568    pub h: Vec<[fidl::Event; 1]>,
569}
570
571impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
572    for VectorOfArrayOfEventInStructWithDefaultRights
573{
574}
575
576#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
577pub struct VectorOfArrayOfEventInStructWithReducedRights {
578    pub h: Vec<[fidl::Event; 1]>,
579}
580
581impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
582    for VectorOfArrayOfEventInStructWithReducedRights
583{
584}
585
586#[derive(Debug, PartialEq)]
587pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
588    pub t: VectorOfArrayOfEventInTableWithReducedRights,
589}
590
591impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
592    for VectorOfArrayOfEventInTableWithReducedRightsStruct
593{
594}
595
596#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
597pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
598    pub u: VectorOfArrayOfEventInUnionWithReducedRights,
599}
600
601impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
602    for VectorOfArrayOfEventInUnionWithReducedRightsStruct
603{
604}
605
606#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
607pub struct VectorOfHandles {
608    pub v: Vec<fidl::NullableHandle>,
609}
610
611impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfHandles {}
612
613#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
614pub struct VectorOfOptionalHandles {
615    pub v: Vec<Option<fidl::NullableHandle>>,
616}
617
618impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfOptionalHandles {}
619
620#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
621pub struct VectorOfUpTo2Handles {
622    pub v: Vec<fidl::NullableHandle>,
623}
624
625impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfUpTo2Handles {}
626
627#[derive(Debug, Default, PartialEq)]
628pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
629    pub h: Option<[Vec<fidl::Event>; 1]>,
630    #[doc(hidden)]
631    pub __source_breaking: fidl::marker::SourceBreaking,
632}
633
634impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
635    for ArrayOfVectorOfEventInTableWithDefaultRights
636{
637}
638
639#[derive(Debug, Default, PartialEq)]
640pub struct ArrayOfVectorOfEventInTableWithReducedRights {
641    pub h: Option<[Vec<fidl::Event>; 1]>,
642    #[doc(hidden)]
643    pub __source_breaking: fidl::marker::SourceBreaking,
644}
645
646impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
647    for ArrayOfVectorOfEventInTableWithReducedRights
648{
649}
650
651#[derive(Debug, Default, PartialEq)]
652pub struct EmptyResourceTable {
653    #[doc(hidden)]
654    pub __source_breaking: fidl::marker::SourceBreaking,
655}
656
657impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTable {}
658
659#[derive(Debug, Default, PartialEq)]
660pub struct SimpleResourceTable {
661    pub x: Option<i64>,
662    pub y: Option<i64>,
663    #[doc(hidden)]
664    pub __source_breaking: fidl::marker::SourceBreaking,
665}
666
667impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SimpleResourceTable {}
668
669#[derive(Debug, Default, PartialEq)]
670pub struct TableFieldInlinedHandle {
671    pub f: Option<fidl::Channel>,
672    #[doc(hidden)]
673    pub __source_breaking: fidl::marker::SourceBreaking,
674}
675
676impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldInlinedHandle {}
677
678#[derive(Debug, Default, PartialEq)]
679pub struct TableFieldUnknownResource {
680    #[doc(hidden)]
681    pub __source_breaking: fidl::marker::SourceBreaking,
682}
683
684impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldUnknownResource {}
685
686#[derive(Debug, Default, PartialEq)]
687pub struct TableOfEndpointsTable {
688    pub client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
689    pub server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
690    #[doc(hidden)]
691    pub __source_breaking: fidl::marker::SourceBreaking,
692}
693
694impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpointsTable {}
695
696#[derive(Debug, Default, PartialEq)]
697pub struct TableUnionWithVectorReservedSandwich {
698    pub uv: Option<UnionWithVector>,
699    #[doc(hidden)]
700    pub __source_breaking: fidl::marker::SourceBreaking,
701}
702
703impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
704    for TableUnionWithVectorReservedSandwich
705{
706}
707
708#[derive(Debug, Default, PartialEq)]
709pub struct TableUnionWithVectorStructSandwich {
710    pub s1: Option<StructSize3Align1>,
711    pub uv: Option<UnionWithVector>,
712    pub s2: Option<StructSize3Align1>,
713    #[doc(hidden)]
714    pub __source_breaking: fidl::marker::SourceBreaking,
715}
716
717impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
718    for TableUnionWithVectorStructSandwich
719{
720}
721
722#[derive(Debug, Default, PartialEq)]
723pub struct TableWithUnknownEnvelopesAfterKnownEnvelopes {
724    pub a: Option<fidl::Event>,
725    #[doc(hidden)]
726    pub __source_breaking: fidl::marker::SourceBreaking,
727}
728
729impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
730    for TableWithUnknownEnvelopesAfterKnownEnvelopes
731{
732}
733
734#[derive(Debug, Default, PartialEq)]
735pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopes {
736    pub b: Option<fidl::Event>,
737    #[doc(hidden)]
738    pub __source_breaking: fidl::marker::SourceBreaking,
739}
740
741impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
742    for TableWithUnknownEnvelopesBeforeKnownEnvelopes
743{
744}
745
746#[derive(Debug, Default, PartialEq)]
747pub struct VectorOfArrayOfEventInTableWithReducedRights {
748    pub h: Option<Vec<[fidl::Event; 1]>>,
749    #[doc(hidden)]
750    pub __source_breaking: fidl::marker::SourceBreaking,
751}
752
753impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
754    for VectorOfArrayOfEventInTableWithReducedRights
755{
756}
757
758#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
759pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
760    H([Vec<fidl::Event>; 1]),
761}
762
763impl ArrayOfVectorOfEventInUnionWithDefaultRights {
764    #[inline]
765    pub fn ordinal(&self) -> u64 {
766        match *self {
767            Self::H(_) => 1,
768        }
769    }
770}
771
772impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
773    for ArrayOfVectorOfEventInUnionWithDefaultRights
774{
775}
776
777#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
778pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
779    H([Vec<fidl::Event>; 1]),
780}
781
782impl ArrayOfVectorOfEventInUnionWithReducedRights {
783    #[inline]
784    pub fn ordinal(&self) -> u64 {
785        match *self {
786            Self::H(_) => 1,
787        }
788    }
789}
790
791impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
792    for ArrayOfVectorOfEventInUnionWithReducedRights
793{
794}
795
796#[derive(Debug)]
797pub enum EnvelopeInliningTestUnion {
798    Small(u32),
799    Large(u64),
800    Handle(fidl::NullableHandle),
801    #[doc(hidden)]
802    __SourceBreaking {
803        unknown_ordinal: u64,
804    },
805}
806
807/// Pattern that matches an unknown `EnvelopeInliningTestUnion` member.
808#[macro_export]
809macro_rules! EnvelopeInliningTestUnionUnknown {
810    () => {
811        _
812    };
813}
814
815// Custom PartialEq so that unknown variants are not equal to themselves.
816impl PartialEq for EnvelopeInliningTestUnion {
817    fn eq(&self, other: &Self) -> bool {
818        match (self, other) {
819            (Self::Small(x), Self::Small(y)) => *x == *y,
820            (Self::Large(x), Self::Large(y)) => *x == *y,
821            (Self::Handle(x), Self::Handle(y)) => *x == *y,
822            _ => false,
823        }
824    }
825}
826
827impl EnvelopeInliningTestUnion {
828    #[inline]
829    pub fn ordinal(&self) -> u64 {
830        match *self {
831            Self::Small(_) => 1,
832            Self::Large(_) => 2,
833            Self::Handle(_) => 3,
834            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
835        }
836    }
837
838    #[inline]
839    pub fn unknown_variant_for_testing() -> Self {
840        Self::__SourceBreaking { unknown_ordinal: 0 }
841    }
842
843    #[inline]
844    pub fn is_unknown(&self) -> bool {
845        match self {
846            Self::__SourceBreaking { .. } => true,
847            _ => false,
848        }
849    }
850}
851
852impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnvelopeInliningTestUnion {}
853
854#[derive(Debug)]
855pub enum SampleResourceXUnion {
856    U(u32),
857    Su(SimpleUnion),
858    St(SimpleTable),
859    #[doc(hidden)]
860    __SourceBreaking {
861        unknown_ordinal: u64,
862    },
863}
864
865/// Pattern that matches an unknown `SampleResourceXUnion` member.
866#[macro_export]
867macro_rules! SampleResourceXUnionUnknown {
868    () => {
869        _
870    };
871}
872
873// Custom PartialEq so that unknown variants are not equal to themselves.
874impl PartialEq for SampleResourceXUnion {
875    fn eq(&self, other: &Self) -> bool {
876        match (self, other) {
877            (Self::U(x), Self::U(y)) => *x == *y,
878            (Self::Su(x), Self::Su(y)) => *x == *y,
879            (Self::St(x), Self::St(y)) => *x == *y,
880            _ => false,
881        }
882    }
883}
884
885impl SampleResourceXUnion {
886    #[inline]
887    pub fn ordinal(&self) -> u64 {
888        match *self {
889            Self::U(_) => 1,
890            Self::Su(_) => 2,
891            Self::St(_) => 3,
892            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
893        }
894    }
895
896    #[inline]
897    pub fn unknown_variant_for_testing() -> Self {
898        Self::__SourceBreaking { unknown_ordinal: 0 }
899    }
900
901    #[inline]
902    pub fn is_unknown(&self) -> bool {
903        match self {
904            Self::__SourceBreaking { .. } => true,
905            _ => false,
906        }
907    }
908}
909
910impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SampleResourceXUnion {}
911
912#[derive(Debug, PartialEq)]
913pub enum SampleStrictResourceXUnion {
914    U(u32),
915    Su(SimpleUnion),
916    St(SimpleTable),
917}
918
919impl SampleStrictResourceXUnion {
920    #[inline]
921    pub fn ordinal(&self) -> u64 {
922        match *self {
923            Self::U(_) => 1,
924            Self::Su(_) => 2,
925            Self::St(_) => 3,
926        }
927    }
928}
929
930impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
931    for SampleStrictResourceXUnion
932{
933}
934
935#[derive(Debug)]
936pub enum UnionOfEndpointsUnion {
937    ClientEnd(fidl::endpoints::ClientEnd<ProtocolMarker>),
938    ServerEnd(fidl::endpoints::ServerEnd<ProtocolMarker>),
939    #[doc(hidden)]
940    __SourceBreaking {
941        unknown_ordinal: u64,
942    },
943}
944
945/// Pattern that matches an unknown `UnionOfEndpointsUnion` member.
946#[macro_export]
947macro_rules! UnionOfEndpointsUnionUnknown {
948    () => {
949        _
950    };
951}
952
953// Custom PartialEq so that unknown variants are not equal to themselves.
954impl PartialEq for UnionOfEndpointsUnion {
955    fn eq(&self, other: &Self) -> bool {
956        match (self, other) {
957            (Self::ClientEnd(x), Self::ClientEnd(y)) => *x == *y,
958            (Self::ServerEnd(x), Self::ServerEnd(y)) => *x == *y,
959            _ => false,
960        }
961    }
962}
963
964impl UnionOfEndpointsUnion {
965    #[inline]
966    pub fn ordinal(&self) -> u64 {
967        match *self {
968            Self::ClientEnd(_) => 1,
969            Self::ServerEnd(_) => 2,
970            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
971        }
972    }
973
974    #[inline]
975    pub fn unknown_variant_for_testing() -> Self {
976        Self::__SourceBreaking { unknown_ordinal: 0 }
977    }
978
979    #[inline]
980    pub fn is_unknown(&self) -> bool {
981        match self {
982            Self::__SourceBreaking { .. } => true,
983            _ => false,
984        }
985    }
986}
987
988impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpointsUnion {}
989
990#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
991pub enum UnionOfHandle {
992    H(fidl::NullableHandle),
993}
994
995impl UnionOfHandle {
996    #[inline]
997    pub fn ordinal(&self) -> u64 {
998        match *self {
999            Self::H(_) => 1,
1000        }
1001    }
1002}
1003
1004impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {}
1005
1006#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1007pub enum UnionWithVector {
1008    Unused(u8),
1009    VectorOfUint8(Vec<u8>),
1010    S(String),
1011    VectorS3A1(Vec<StructSize3Align1>),
1012    VectorS3A2(Vec<StructSize3Align2>),
1013    Handles(Vec<fidl::NullableHandle>),
1014    ArrayS3A1([StructSize3Align1; 2]),
1015    ArrayS3A2([StructSize3Align2; 2]),
1016    VectorUnion(Vec<UnionSize8Align4>),
1017}
1018
1019impl UnionWithVector {
1020    #[inline]
1021    pub fn ordinal(&self) -> u64 {
1022        match *self {
1023            Self::Unused(_) => 1,
1024            Self::VectorOfUint8(_) => 2,
1025            Self::S(_) => 3,
1026            Self::VectorS3A1(_) => 4,
1027            Self::VectorS3A2(_) => 5,
1028            Self::Handles(_) => 6,
1029            Self::ArrayS3A1(_) => 7,
1030            Self::ArrayS3A2(_) => 8,
1031            Self::VectorUnion(_) => 9,
1032        }
1033    }
1034}
1035
1036impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionWithVector {}
1037
1038#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1039pub enum VectorOfArrayOfEventInUnionWithReducedRights {
1040    H(Vec<[fidl::Event; 1]>),
1041}
1042
1043impl VectorOfArrayOfEventInUnionWithReducedRights {
1044    #[inline]
1045    pub fn ordinal(&self) -> u64 {
1046        match *self {
1047            Self::H(_) => 1,
1048        }
1049    }
1050}
1051
1052impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1053    for VectorOfArrayOfEventInUnionWithReducedRights
1054{
1055}
1056
1057#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1058pub struct ComponentControllerMarker;
1059
1060impl fidl::endpoints::ProtocolMarker for ComponentControllerMarker {
1061    type Proxy = ComponentControllerProxy;
1062    type RequestStream = ComponentControllerRequestStream;
1063    #[cfg(target_os = "fuchsia")]
1064    type SynchronousProxy = ComponentControllerSynchronousProxy;
1065
1066    const DEBUG_NAME: &'static str = "(anonymous) ComponentController";
1067}
1068
1069pub trait ComponentControllerProxyInterface: Send + Sync {}
1070#[derive(Debug)]
1071#[cfg(target_os = "fuchsia")]
1072pub struct ComponentControllerSynchronousProxy {
1073    client: fidl::client::sync::Client,
1074}
1075
1076#[cfg(target_os = "fuchsia")]
1077impl fidl::endpoints::SynchronousProxy for ComponentControllerSynchronousProxy {
1078    type Proxy = ComponentControllerProxy;
1079    type Protocol = ComponentControllerMarker;
1080
1081    fn from_channel(inner: fidl::Channel) -> Self {
1082        Self::new(inner)
1083    }
1084
1085    fn into_channel(self) -> fidl::Channel {
1086        self.client.into_channel()
1087    }
1088
1089    fn as_channel(&self) -> &fidl::Channel {
1090        self.client.as_channel()
1091    }
1092}
1093
1094#[cfg(target_os = "fuchsia")]
1095impl ComponentControllerSynchronousProxy {
1096    pub fn new(channel: fidl::Channel) -> Self {
1097        Self { client: fidl::client::sync::Client::new(channel) }
1098    }
1099
1100    pub fn into_channel(self) -> fidl::Channel {
1101        self.client.into_channel()
1102    }
1103
1104    /// Waits until an event arrives and returns it. It is safe for other
1105    /// threads to make concurrent requests while waiting for an event.
1106    pub fn wait_for_event(
1107        &self,
1108        deadline: zx::MonotonicInstant,
1109    ) -> Result<ComponentControllerEvent, fidl::Error> {
1110        ComponentControllerEvent::decode(
1111            self.client.wait_for_event::<ComponentControllerMarker>(deadline)?,
1112        )
1113    }
1114}
1115
1116#[cfg(target_os = "fuchsia")]
1117impl From<ComponentControllerSynchronousProxy> for zx::NullableHandle {
1118    fn from(value: ComponentControllerSynchronousProxy) -> Self {
1119        value.into_channel().into()
1120    }
1121}
1122
1123#[cfg(target_os = "fuchsia")]
1124impl From<fidl::Channel> for ComponentControllerSynchronousProxy {
1125    fn from(value: fidl::Channel) -> Self {
1126        Self::new(value)
1127    }
1128}
1129
1130#[cfg(target_os = "fuchsia")]
1131impl fidl::endpoints::FromClient for ComponentControllerSynchronousProxy {
1132    type Protocol = ComponentControllerMarker;
1133
1134    fn from_client(value: fidl::endpoints::ClientEnd<ComponentControllerMarker>) -> Self {
1135        Self::new(value.into_channel())
1136    }
1137}
1138
1139#[derive(Debug, Clone)]
1140pub struct ComponentControllerProxy {
1141    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1142}
1143
1144impl fidl::endpoints::Proxy for ComponentControllerProxy {
1145    type Protocol = ComponentControllerMarker;
1146
1147    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1148        Self::new(inner)
1149    }
1150
1151    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1152        self.client.into_channel().map_err(|client| Self { client })
1153    }
1154
1155    fn as_channel(&self) -> &::fidl::AsyncChannel {
1156        self.client.as_channel()
1157    }
1158}
1159
1160impl ComponentControllerProxy {
1161    /// Create a new Proxy for test.conformance/ComponentController.
1162    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1163        let protocol_name =
1164            <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1165        Self { client: fidl::client::Client::new(channel, protocol_name) }
1166    }
1167
1168    /// Get a Stream of events from the remote end of the protocol.
1169    ///
1170    /// # Panics
1171    ///
1172    /// Panics if the event stream was already taken.
1173    pub fn take_event_stream(&self) -> ComponentControllerEventStream {
1174        ComponentControllerEventStream { event_receiver: self.client.take_event_receiver() }
1175    }
1176}
1177
1178impl ComponentControllerProxyInterface for ComponentControllerProxy {}
1179
1180pub struct ComponentControllerEventStream {
1181    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1182}
1183
1184impl std::marker::Unpin for ComponentControllerEventStream {}
1185
1186impl futures::stream::FusedStream for ComponentControllerEventStream {
1187    fn is_terminated(&self) -> bool {
1188        self.event_receiver.is_terminated()
1189    }
1190}
1191
1192impl futures::Stream for ComponentControllerEventStream {
1193    type Item = Result<ComponentControllerEvent, fidl::Error>;
1194
1195    fn poll_next(
1196        mut self: std::pin::Pin<&mut Self>,
1197        cx: &mut std::task::Context<'_>,
1198    ) -> std::task::Poll<Option<Self::Item>> {
1199        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1200            &mut self.event_receiver,
1201            cx
1202        )?) {
1203            Some(buf) => std::task::Poll::Ready(Some(ComponentControllerEvent::decode(buf))),
1204            None => std::task::Poll::Ready(None),
1205        }
1206    }
1207}
1208
1209#[derive(Debug)]
1210pub enum ComponentControllerEvent {}
1211
1212impl ComponentControllerEvent {
1213    /// Decodes a message buffer as a [`ComponentControllerEvent`].
1214    fn decode(
1215        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1216    ) -> Result<ComponentControllerEvent, fidl::Error> {
1217        let (bytes, _handles) = buf.split_mut();
1218        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1219        debug_assert_eq!(tx_header.tx_id, 0);
1220        match tx_header.ordinal {
1221            _ => Err(fidl::Error::UnknownOrdinal {
1222                ordinal: tx_header.ordinal,
1223                protocol_name:
1224                    <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1225            }),
1226        }
1227    }
1228}
1229
1230/// A Stream of incoming requests for test.conformance/ComponentController.
1231pub struct ComponentControllerRequestStream {
1232    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1233    is_terminated: bool,
1234}
1235
1236impl std::marker::Unpin for ComponentControllerRequestStream {}
1237
1238impl futures::stream::FusedStream for ComponentControllerRequestStream {
1239    fn is_terminated(&self) -> bool {
1240        self.is_terminated
1241    }
1242}
1243
1244impl fidl::endpoints::RequestStream for ComponentControllerRequestStream {
1245    type Protocol = ComponentControllerMarker;
1246    type ControlHandle = ComponentControllerControlHandle;
1247
1248    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1249        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1250    }
1251
1252    fn control_handle(&self) -> Self::ControlHandle {
1253        ComponentControllerControlHandle { inner: self.inner.clone() }
1254    }
1255
1256    fn into_inner(
1257        self,
1258    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1259    {
1260        (self.inner, self.is_terminated)
1261    }
1262
1263    fn from_inner(
1264        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1265        is_terminated: bool,
1266    ) -> Self {
1267        Self { inner, is_terminated }
1268    }
1269}
1270
1271impl futures::Stream for ComponentControllerRequestStream {
1272    type Item = Result<ComponentControllerRequest, fidl::Error>;
1273
1274    fn poll_next(
1275        mut self: std::pin::Pin<&mut Self>,
1276        cx: &mut std::task::Context<'_>,
1277    ) -> std::task::Poll<Option<Self::Item>> {
1278        let this = &mut *self;
1279        if this.inner.check_shutdown(cx) {
1280            this.is_terminated = true;
1281            return std::task::Poll::Ready(None);
1282        }
1283        if this.is_terminated {
1284            panic!("polled ComponentControllerRequestStream after completion");
1285        }
1286        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1287            |bytes, handles| {
1288                match this.inner.channel().read_etc(cx, bytes, handles) {
1289                    std::task::Poll::Ready(Ok(())) => {}
1290                    std::task::Poll::Pending => return std::task::Poll::Pending,
1291                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1292                        this.is_terminated = true;
1293                        return std::task::Poll::Ready(None);
1294                    }
1295                    std::task::Poll::Ready(Err(e)) => {
1296                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1297                            e.into(),
1298                        ))));
1299                    }
1300                }
1301
1302                // A message has been received from the channel
1303                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1304
1305                std::task::Poll::Ready(Some(match header.ordinal {
1306                _ => Err(fidl::Error::UnknownOrdinal {
1307                    ordinal: header.ordinal,
1308                    protocol_name: <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1309                }),
1310            }))
1311            },
1312        )
1313    }
1314}
1315
1316#[derive(Debug)]
1317pub enum ComponentControllerRequest {}
1318
1319impl ComponentControllerRequest {
1320    /// Name of the method defined in FIDL
1321    pub fn method_name(&self) -> &'static str {
1322        match *self {}
1323    }
1324}
1325
1326#[derive(Debug, Clone)]
1327pub struct ComponentControllerControlHandle {
1328    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1329}
1330
1331impl fidl::endpoints::ControlHandle for ComponentControllerControlHandle {
1332    fn shutdown(&self) {
1333        self.inner.shutdown()
1334    }
1335
1336    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1337        self.inner.shutdown_with_epitaph(status)
1338    }
1339
1340    fn is_closed(&self) -> bool {
1341        self.inner.channel().is_closed()
1342    }
1343    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1344        self.inner.channel().on_closed()
1345    }
1346
1347    #[cfg(target_os = "fuchsia")]
1348    fn signal_peer(
1349        &self,
1350        clear_mask: zx::Signals,
1351        set_mask: zx::Signals,
1352    ) -> Result<(), zx_status::Status> {
1353        use fidl::Peered;
1354        self.inner.channel().signal_peer(clear_mask, set_mask)
1355    }
1356}
1357
1358impl ComponentControllerControlHandle {}
1359
1360#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1361pub struct ProtocolMarker;
1362
1363impl fidl::endpoints::ProtocolMarker for ProtocolMarker {
1364    type Proxy = ProtocolProxy;
1365    type RequestStream = ProtocolRequestStream;
1366    #[cfg(target_os = "fuchsia")]
1367    type SynchronousProxy = ProtocolSynchronousProxy;
1368
1369    const DEBUG_NAME: &'static str = "(anonymous) Protocol";
1370}
1371
1372pub trait ProtocolProxyInterface: Send + Sync {}
1373#[derive(Debug)]
1374#[cfg(target_os = "fuchsia")]
1375pub struct ProtocolSynchronousProxy {
1376    client: fidl::client::sync::Client,
1377}
1378
1379#[cfg(target_os = "fuchsia")]
1380impl fidl::endpoints::SynchronousProxy for ProtocolSynchronousProxy {
1381    type Proxy = ProtocolProxy;
1382    type Protocol = ProtocolMarker;
1383
1384    fn from_channel(inner: fidl::Channel) -> Self {
1385        Self::new(inner)
1386    }
1387
1388    fn into_channel(self) -> fidl::Channel {
1389        self.client.into_channel()
1390    }
1391
1392    fn as_channel(&self) -> &fidl::Channel {
1393        self.client.as_channel()
1394    }
1395}
1396
1397#[cfg(target_os = "fuchsia")]
1398impl ProtocolSynchronousProxy {
1399    pub fn new(channel: fidl::Channel) -> Self {
1400        Self { client: fidl::client::sync::Client::new(channel) }
1401    }
1402
1403    pub fn into_channel(self) -> fidl::Channel {
1404        self.client.into_channel()
1405    }
1406
1407    /// Waits until an event arrives and returns it. It is safe for other
1408    /// threads to make concurrent requests while waiting for an event.
1409    pub fn wait_for_event(
1410        &self,
1411        deadline: zx::MonotonicInstant,
1412    ) -> Result<ProtocolEvent, fidl::Error> {
1413        ProtocolEvent::decode(self.client.wait_for_event::<ProtocolMarker>(deadline)?)
1414    }
1415}
1416
1417#[cfg(target_os = "fuchsia")]
1418impl From<ProtocolSynchronousProxy> for zx::NullableHandle {
1419    fn from(value: ProtocolSynchronousProxy) -> Self {
1420        value.into_channel().into()
1421    }
1422}
1423
1424#[cfg(target_os = "fuchsia")]
1425impl From<fidl::Channel> for ProtocolSynchronousProxy {
1426    fn from(value: fidl::Channel) -> Self {
1427        Self::new(value)
1428    }
1429}
1430
1431#[cfg(target_os = "fuchsia")]
1432impl fidl::endpoints::FromClient for ProtocolSynchronousProxy {
1433    type Protocol = ProtocolMarker;
1434
1435    fn from_client(value: fidl::endpoints::ClientEnd<ProtocolMarker>) -> Self {
1436        Self::new(value.into_channel())
1437    }
1438}
1439
1440#[derive(Debug, Clone)]
1441pub struct ProtocolProxy {
1442    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1443}
1444
1445impl fidl::endpoints::Proxy for ProtocolProxy {
1446    type Protocol = ProtocolMarker;
1447
1448    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1449        Self::new(inner)
1450    }
1451
1452    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1453        self.client.into_channel().map_err(|client| Self { client })
1454    }
1455
1456    fn as_channel(&self) -> &::fidl::AsyncChannel {
1457        self.client.as_channel()
1458    }
1459}
1460
1461impl ProtocolProxy {
1462    /// Create a new Proxy for test.conformance/Protocol.
1463    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1464        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1465        Self { client: fidl::client::Client::new(channel, protocol_name) }
1466    }
1467
1468    /// Get a Stream of events from the remote end of the protocol.
1469    ///
1470    /// # Panics
1471    ///
1472    /// Panics if the event stream was already taken.
1473    pub fn take_event_stream(&self) -> ProtocolEventStream {
1474        ProtocolEventStream { event_receiver: self.client.take_event_receiver() }
1475    }
1476}
1477
1478impl ProtocolProxyInterface for ProtocolProxy {}
1479
1480pub struct ProtocolEventStream {
1481    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1482}
1483
1484impl std::marker::Unpin for ProtocolEventStream {}
1485
1486impl futures::stream::FusedStream for ProtocolEventStream {
1487    fn is_terminated(&self) -> bool {
1488        self.event_receiver.is_terminated()
1489    }
1490}
1491
1492impl futures::Stream for ProtocolEventStream {
1493    type Item = Result<ProtocolEvent, fidl::Error>;
1494
1495    fn poll_next(
1496        mut self: std::pin::Pin<&mut Self>,
1497        cx: &mut std::task::Context<'_>,
1498    ) -> std::task::Poll<Option<Self::Item>> {
1499        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1500            &mut self.event_receiver,
1501            cx
1502        )?) {
1503            Some(buf) => std::task::Poll::Ready(Some(ProtocolEvent::decode(buf))),
1504            None => std::task::Poll::Ready(None),
1505        }
1506    }
1507}
1508
1509#[derive(Debug)]
1510pub enum ProtocolEvent {}
1511
1512impl ProtocolEvent {
1513    /// Decodes a message buffer as a [`ProtocolEvent`].
1514    fn decode(
1515        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1516    ) -> Result<ProtocolEvent, fidl::Error> {
1517        let (bytes, _handles) = buf.split_mut();
1518        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1519        debug_assert_eq!(tx_header.tx_id, 0);
1520        match tx_header.ordinal {
1521            _ => Err(fidl::Error::UnknownOrdinal {
1522                ordinal: tx_header.ordinal,
1523                protocol_name: <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1524            }),
1525        }
1526    }
1527}
1528
1529/// A Stream of incoming requests for test.conformance/Protocol.
1530pub struct ProtocolRequestStream {
1531    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1532    is_terminated: bool,
1533}
1534
1535impl std::marker::Unpin for ProtocolRequestStream {}
1536
1537impl futures::stream::FusedStream for ProtocolRequestStream {
1538    fn is_terminated(&self) -> bool {
1539        self.is_terminated
1540    }
1541}
1542
1543impl fidl::endpoints::RequestStream for ProtocolRequestStream {
1544    type Protocol = ProtocolMarker;
1545    type ControlHandle = ProtocolControlHandle;
1546
1547    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1548        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1549    }
1550
1551    fn control_handle(&self) -> Self::ControlHandle {
1552        ProtocolControlHandle { inner: self.inner.clone() }
1553    }
1554
1555    fn into_inner(
1556        self,
1557    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1558    {
1559        (self.inner, self.is_terminated)
1560    }
1561
1562    fn from_inner(
1563        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1564        is_terminated: bool,
1565    ) -> Self {
1566        Self { inner, is_terminated }
1567    }
1568}
1569
1570impl futures::Stream for ProtocolRequestStream {
1571    type Item = Result<ProtocolRequest, fidl::Error>;
1572
1573    fn poll_next(
1574        mut self: std::pin::Pin<&mut Self>,
1575        cx: &mut std::task::Context<'_>,
1576    ) -> std::task::Poll<Option<Self::Item>> {
1577        let this = &mut *self;
1578        if this.inner.check_shutdown(cx) {
1579            this.is_terminated = true;
1580            return std::task::Poll::Ready(None);
1581        }
1582        if this.is_terminated {
1583            panic!("polled ProtocolRequestStream after completion");
1584        }
1585        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1586            |bytes, handles| {
1587                match this.inner.channel().read_etc(cx, bytes, handles) {
1588                    std::task::Poll::Ready(Ok(())) => {}
1589                    std::task::Poll::Pending => return std::task::Poll::Pending,
1590                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1591                        this.is_terminated = true;
1592                        return std::task::Poll::Ready(None);
1593                    }
1594                    std::task::Poll::Ready(Err(e)) => {
1595                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1596                            e.into(),
1597                        ))));
1598                    }
1599                }
1600
1601                // A message has been received from the channel
1602                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1603
1604                std::task::Poll::Ready(Some(match header.ordinal {
1605                    _ => Err(fidl::Error::UnknownOrdinal {
1606                        ordinal: header.ordinal,
1607                        protocol_name:
1608                            <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1609                    }),
1610                }))
1611            },
1612        )
1613    }
1614}
1615
1616#[derive(Debug)]
1617pub enum ProtocolRequest {}
1618
1619impl ProtocolRequest {
1620    /// Name of the method defined in FIDL
1621    pub fn method_name(&self) -> &'static str {
1622        match *self {}
1623    }
1624}
1625
1626#[derive(Debug, Clone)]
1627pub struct ProtocolControlHandle {
1628    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1629}
1630
1631impl fidl::endpoints::ControlHandle for ProtocolControlHandle {
1632    fn shutdown(&self) {
1633        self.inner.shutdown()
1634    }
1635
1636    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1637        self.inner.shutdown_with_epitaph(status)
1638    }
1639
1640    fn is_closed(&self) -> bool {
1641        self.inner.channel().is_closed()
1642    }
1643    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1644        self.inner.channel().on_closed()
1645    }
1646
1647    #[cfg(target_os = "fuchsia")]
1648    fn signal_peer(
1649        &self,
1650        clear_mask: zx::Signals,
1651        set_mask: zx::Signals,
1652    ) -> Result<(), zx_status::Status> {
1653        use fidl::Peered;
1654        self.inner.channel().signal_peer(clear_mask, set_mask)
1655    }
1656}
1657
1658impl ProtocolControlHandle {}
1659
1660mod internal {
1661    use super::*;
1662
1663    impl fidl::encoding::ResourceTypeMarker for AlternatingHandlesAndFailures {
1664        type Borrowed<'a> = &'a mut Self;
1665        fn take_or_borrow<'a>(
1666            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1667        ) -> Self::Borrowed<'a> {
1668            value
1669        }
1670    }
1671
1672    unsafe impl fidl::encoding::TypeMarker for AlternatingHandlesAndFailures {
1673        type Owned = Self;
1674
1675        #[inline(always)]
1676        fn inline_align(_context: fidl::encoding::Context) -> usize {
1677            8
1678        }
1679
1680        #[inline(always)]
1681        fn inline_size(_context: fidl::encoding::Context) -> usize {
1682            56
1683        }
1684    }
1685
1686    unsafe impl
1687        fidl::encoding::Encode<
1688            AlternatingHandlesAndFailures,
1689            fidl::encoding::DefaultFuchsiaResourceDialect,
1690        > for &mut AlternatingHandlesAndFailures
1691    {
1692        #[inline]
1693        unsafe fn encode(
1694            self,
1695            encoder: &mut fidl::encoding::Encoder<
1696                '_,
1697                fidl::encoding::DefaultFuchsiaResourceDialect,
1698            >,
1699            offset: usize,
1700            _depth: fidl::encoding::Depth,
1701        ) -> fidl::Result<()> {
1702            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1703            // Delegate to tuple encoding.
1704            fidl::encoding::Encode::<
1705                AlternatingHandlesAndFailures,
1706                fidl::encoding::DefaultFuchsiaResourceDialect,
1707            >::encode(
1708                (
1709                    <fidl::encoding::HandleType<
1710                        fidl::NullableHandle,
1711                        { fidl::ObjectType::NONE.into_raw() },
1712                        2147483648,
1713                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1714                        &mut self.h1
1715                    ),
1716                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1717                        &self.failure_trigger1,
1718                    ),
1719                    <fidl::encoding::HandleType<
1720                        fidl::NullableHandle,
1721                        { fidl::ObjectType::NONE.into_raw() },
1722                        2147483648,
1723                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1724                        &mut self.h2
1725                    ),
1726                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1727                        &self.failure_trigger2,
1728                    ),
1729                    <fidl::encoding::HandleType<
1730                        fidl::NullableHandle,
1731                        { fidl::ObjectType::NONE.into_raw() },
1732                        2147483648,
1733                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1734                        &mut self.h3
1735                    ),
1736                ),
1737                encoder,
1738                offset,
1739                _depth,
1740            )
1741        }
1742    }
1743    unsafe impl<
1744        T0: fidl::encoding::Encode<
1745                fidl::encoding::HandleType<
1746                    fidl::NullableHandle,
1747                    { fidl::ObjectType::NONE.into_raw() },
1748                    2147483648,
1749                >,
1750                fidl::encoding::DefaultFuchsiaResourceDialect,
1751            >,
1752        T1: fidl::encoding::Encode<
1753                fidl::encoding::BoundedString<1>,
1754                fidl::encoding::DefaultFuchsiaResourceDialect,
1755            >,
1756        T2: fidl::encoding::Encode<
1757                fidl::encoding::HandleType<
1758                    fidl::NullableHandle,
1759                    { fidl::ObjectType::NONE.into_raw() },
1760                    2147483648,
1761                >,
1762                fidl::encoding::DefaultFuchsiaResourceDialect,
1763            >,
1764        T3: fidl::encoding::Encode<
1765                fidl::encoding::BoundedString<1>,
1766                fidl::encoding::DefaultFuchsiaResourceDialect,
1767            >,
1768        T4: fidl::encoding::Encode<
1769                fidl::encoding::HandleType<
1770                    fidl::NullableHandle,
1771                    { fidl::ObjectType::NONE.into_raw() },
1772                    2147483648,
1773                >,
1774                fidl::encoding::DefaultFuchsiaResourceDialect,
1775            >,
1776    >
1777        fidl::encoding::Encode<
1778            AlternatingHandlesAndFailures,
1779            fidl::encoding::DefaultFuchsiaResourceDialect,
1780        > for (T0, T1, T2, T3, T4)
1781    {
1782        #[inline]
1783        unsafe fn encode(
1784            self,
1785            encoder: &mut fidl::encoding::Encoder<
1786                '_,
1787                fidl::encoding::DefaultFuchsiaResourceDialect,
1788            >,
1789            offset: usize,
1790            depth: fidl::encoding::Depth,
1791        ) -> fidl::Result<()> {
1792            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1793            // Zero out padding regions. There's no need to apply masks
1794            // because the unmasked parts will be overwritten by fields.
1795            unsafe {
1796                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1797                (ptr as *mut u64).write_unaligned(0);
1798            }
1799            unsafe {
1800                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1801                (ptr as *mut u64).write_unaligned(0);
1802            }
1803            unsafe {
1804                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
1805                (ptr as *mut u64).write_unaligned(0);
1806            }
1807            // Write the fields.
1808            self.0.encode(encoder, offset + 0, depth)?;
1809            self.1.encode(encoder, offset + 8, depth)?;
1810            self.2.encode(encoder, offset + 24, depth)?;
1811            self.3.encode(encoder, offset + 32, depth)?;
1812            self.4.encode(encoder, offset + 48, depth)?;
1813            Ok(())
1814        }
1815    }
1816
1817    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1818        for AlternatingHandlesAndFailures
1819    {
1820        #[inline(always)]
1821        fn new_empty() -> Self {
1822            Self {
1823                h1: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1824                failure_trigger1: fidl::new_empty!(
1825                    fidl::encoding::BoundedString<1>,
1826                    fidl::encoding::DefaultFuchsiaResourceDialect
1827                ),
1828                h2: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1829                failure_trigger2: fidl::new_empty!(
1830                    fidl::encoding::BoundedString<1>,
1831                    fidl::encoding::DefaultFuchsiaResourceDialect
1832                ),
1833                h3: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1834            }
1835        }
1836
1837        #[inline]
1838        unsafe fn decode(
1839            &mut self,
1840            decoder: &mut fidl::encoding::Decoder<
1841                '_,
1842                fidl::encoding::DefaultFuchsiaResourceDialect,
1843            >,
1844            offset: usize,
1845            _depth: fidl::encoding::Depth,
1846        ) -> fidl::Result<()> {
1847            decoder.debug_check_bounds::<Self>(offset);
1848            // Verify that padding bytes are zero.
1849            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1850            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1851            let mask = 0xffffffff00000000u64;
1852            let maskedval = padval & mask;
1853            if maskedval != 0 {
1854                return Err(fidl::Error::NonZeroPadding {
1855                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1856                });
1857            }
1858            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1859            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1860            let mask = 0xffffffff00000000u64;
1861            let maskedval = padval & mask;
1862            if maskedval != 0 {
1863                return Err(fidl::Error::NonZeroPadding {
1864                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1865                });
1866            }
1867            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
1868            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1869            let mask = 0xffffffff00000000u64;
1870            let maskedval = padval & mask;
1871            if maskedval != 0 {
1872                return Err(fidl::Error::NonZeroPadding {
1873                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
1874                });
1875            }
1876            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h1, decoder, offset + 0, _depth)?;
1877            fidl::decode!(
1878                fidl::encoding::BoundedString<1>,
1879                fidl::encoding::DefaultFuchsiaResourceDialect,
1880                &mut self.failure_trigger1,
1881                decoder,
1882                offset + 8,
1883                _depth
1884            )?;
1885            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h2, decoder, offset + 24, _depth)?;
1886            fidl::decode!(
1887                fidl::encoding::BoundedString<1>,
1888                fidl::encoding::DefaultFuchsiaResourceDialect,
1889                &mut self.failure_trigger2,
1890                decoder,
1891                offset + 32,
1892                _depth
1893            )?;
1894            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h3, decoder, offset + 48, _depth)?;
1895            Ok(())
1896        }
1897    }
1898
1899    impl fidl::encoding::ResourceTypeMarker for ArrayOfArrayOfNonnullableHandles {
1900        type Borrowed<'a> = &'a mut Self;
1901        fn take_or_borrow<'a>(
1902            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1903        ) -> Self::Borrowed<'a> {
1904            value
1905        }
1906    }
1907
1908    unsafe impl fidl::encoding::TypeMarker for ArrayOfArrayOfNonnullableHandles {
1909        type Owned = Self;
1910
1911        #[inline(always)]
1912        fn inline_align(_context: fidl::encoding::Context) -> usize {
1913            4
1914        }
1915
1916        #[inline(always)]
1917        fn inline_size(_context: fidl::encoding::Context) -> usize {
1918            48
1919        }
1920    }
1921
1922    unsafe impl
1923        fidl::encoding::Encode<
1924            ArrayOfArrayOfNonnullableHandles,
1925            fidl::encoding::DefaultFuchsiaResourceDialect,
1926        > for &mut ArrayOfArrayOfNonnullableHandles
1927    {
1928        #[inline]
1929        unsafe fn encode(
1930            self,
1931            encoder: &mut fidl::encoding::Encoder<
1932                '_,
1933                fidl::encoding::DefaultFuchsiaResourceDialect,
1934            >,
1935            offset: usize,
1936            _depth: fidl::encoding::Depth,
1937        ) -> fidl::Result<()> {
1938            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1939            // Delegate to tuple encoding.
1940            fidl::encoding::Encode::<
1941                ArrayOfArrayOfNonnullableHandles,
1942                fidl::encoding::DefaultFuchsiaResourceDialect,
1943            >::encode(
1944                (<fidl::encoding::Array<
1945                    fidl::encoding::Array<
1946                        fidl::encoding::HandleType<
1947                            fidl::NullableHandle,
1948                            { fidl::ObjectType::NONE.into_raw() },
1949                            2147483648,
1950                        >,
1951                        3,
1952                    >,
1953                    4,
1954                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1955                    &mut self.handles
1956                ),),
1957                encoder,
1958                offset,
1959                _depth,
1960            )
1961        }
1962    }
1963    unsafe impl<
1964        T0: fidl::encoding::Encode<
1965                fidl::encoding::Array<
1966                    fidl::encoding::Array<
1967                        fidl::encoding::HandleType<
1968                            fidl::NullableHandle,
1969                            { fidl::ObjectType::NONE.into_raw() },
1970                            2147483648,
1971                        >,
1972                        3,
1973                    >,
1974                    4,
1975                >,
1976                fidl::encoding::DefaultFuchsiaResourceDialect,
1977            >,
1978    >
1979        fidl::encoding::Encode<
1980            ArrayOfArrayOfNonnullableHandles,
1981            fidl::encoding::DefaultFuchsiaResourceDialect,
1982        > for (T0,)
1983    {
1984        #[inline]
1985        unsafe fn encode(
1986            self,
1987            encoder: &mut fidl::encoding::Encoder<
1988                '_,
1989                fidl::encoding::DefaultFuchsiaResourceDialect,
1990            >,
1991            offset: usize,
1992            depth: fidl::encoding::Depth,
1993        ) -> fidl::Result<()> {
1994            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1995            // Zero out padding regions. There's no need to apply masks
1996            // because the unmasked parts will be overwritten by fields.
1997            // Write the fields.
1998            self.0.encode(encoder, offset + 0, depth)?;
1999            Ok(())
2000        }
2001    }
2002
2003    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2004        for ArrayOfArrayOfNonnullableHandles
2005    {
2006        #[inline(always)]
2007        fn new_empty() -> Self {
2008            Self {
2009                handles: fidl::new_empty!(
2010                    fidl::encoding::Array<
2011                        fidl::encoding::Array<
2012                            fidl::encoding::HandleType<
2013                                fidl::NullableHandle,
2014                                { fidl::ObjectType::NONE.into_raw() },
2015                                2147483648,
2016                            >,
2017                            3,
2018                        >,
2019                        4,
2020                    >,
2021                    fidl::encoding::DefaultFuchsiaResourceDialect
2022                ),
2023            }
2024        }
2025
2026        #[inline]
2027        unsafe fn decode(
2028            &mut self,
2029            decoder: &mut fidl::encoding::Decoder<
2030                '_,
2031                fidl::encoding::DefaultFuchsiaResourceDialect,
2032            >,
2033            offset: usize,
2034            _depth: fidl::encoding::Depth,
2035        ) -> fidl::Result<()> {
2036            decoder.debug_check_bounds::<Self>(offset);
2037            // Verify that padding bytes are zero.
2038            fidl::decode!(
2039                fidl::encoding::Array<
2040                    fidl::encoding::Array<
2041                        fidl::encoding::HandleType<
2042                            fidl::NullableHandle,
2043                            { fidl::ObjectType::NONE.into_raw() },
2044                            2147483648,
2045                        >,
2046                        3,
2047                    >,
2048                    4,
2049                >,
2050                fidl::encoding::DefaultFuchsiaResourceDialect,
2051                &mut self.handles,
2052                decoder,
2053                offset + 0,
2054                _depth
2055            )?;
2056            Ok(())
2057        }
2058    }
2059
2060    impl fidl::encoding::ResourceTypeMarker for ArrayOfHandles {
2061        type Borrowed<'a> = &'a mut Self;
2062        fn take_or_borrow<'a>(
2063            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2064        ) -> Self::Borrowed<'a> {
2065            value
2066        }
2067    }
2068
2069    unsafe impl fidl::encoding::TypeMarker for ArrayOfHandles {
2070        type Owned = Self;
2071
2072        #[inline(always)]
2073        fn inline_align(_context: fidl::encoding::Context) -> usize {
2074            4
2075        }
2076
2077        #[inline(always)]
2078        fn inline_size(_context: fidl::encoding::Context) -> usize {
2079            12
2080        }
2081    }
2082
2083    unsafe impl
2084        fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2085        for &mut ArrayOfHandles
2086    {
2087        #[inline]
2088        unsafe fn encode(
2089            self,
2090            encoder: &mut fidl::encoding::Encoder<
2091                '_,
2092                fidl::encoding::DefaultFuchsiaResourceDialect,
2093            >,
2094            offset: usize,
2095            _depth: fidl::encoding::Depth,
2096        ) -> fidl::Result<()> {
2097            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2098            // Delegate to tuple encoding.
2099            fidl::encoding::Encode::<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2100                (
2101                    <fidl::encoding::Array<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.a),
2102                ),
2103                encoder, offset, _depth
2104            )
2105        }
2106    }
2107    unsafe impl<
2108        T0: fidl::encoding::Encode<
2109                fidl::encoding::Array<
2110                    fidl::encoding::HandleType<
2111                        fidl::NullableHandle,
2112                        { fidl::ObjectType::NONE.into_raw() },
2113                        2147483648,
2114                    >,
2115                    3,
2116                >,
2117                fidl::encoding::DefaultFuchsiaResourceDialect,
2118            >,
2119    > fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2120        for (T0,)
2121    {
2122        #[inline]
2123        unsafe fn encode(
2124            self,
2125            encoder: &mut fidl::encoding::Encoder<
2126                '_,
2127                fidl::encoding::DefaultFuchsiaResourceDialect,
2128            >,
2129            offset: usize,
2130            depth: fidl::encoding::Depth,
2131        ) -> fidl::Result<()> {
2132            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2133            // Zero out padding regions. There's no need to apply masks
2134            // because the unmasked parts will be overwritten by fields.
2135            // Write the fields.
2136            self.0.encode(encoder, offset + 0, depth)?;
2137            Ok(())
2138        }
2139    }
2140
2141    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2142        for ArrayOfHandles
2143    {
2144        #[inline(always)]
2145        fn new_empty() -> Self {
2146            Self {
2147                a: fidl::new_empty!(
2148                    fidl::encoding::Array<
2149                        fidl::encoding::HandleType<
2150                            fidl::NullableHandle,
2151                            { fidl::ObjectType::NONE.into_raw() },
2152                            2147483648,
2153                        >,
2154                        3,
2155                    >,
2156                    fidl::encoding::DefaultFuchsiaResourceDialect
2157                ),
2158            }
2159        }
2160
2161        #[inline]
2162        unsafe fn decode(
2163            &mut self,
2164            decoder: &mut fidl::encoding::Decoder<
2165                '_,
2166                fidl::encoding::DefaultFuchsiaResourceDialect,
2167            >,
2168            offset: usize,
2169            _depth: fidl::encoding::Depth,
2170        ) -> fidl::Result<()> {
2171            decoder.debug_check_bounds::<Self>(offset);
2172            // Verify that padding bytes are zero.
2173            fidl::decode!(
2174                fidl::encoding::Array<
2175                    fidl::encoding::HandleType<
2176                        fidl::NullableHandle,
2177                        { fidl::ObjectType::NONE.into_raw() },
2178                        2147483648,
2179                    >,
2180                    3,
2181                >,
2182                fidl::encoding::DefaultFuchsiaResourceDialect,
2183                &mut self.a,
2184                decoder,
2185                offset + 0,
2186                _depth
2187            )?;
2188            Ok(())
2189        }
2190    }
2191
2192    impl fidl::encoding::ResourceTypeMarker for ArrayOfNonnullableHandles {
2193        type Borrowed<'a> = &'a mut Self;
2194        fn take_or_borrow<'a>(
2195            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2196        ) -> Self::Borrowed<'a> {
2197            value
2198        }
2199    }
2200
2201    unsafe impl fidl::encoding::TypeMarker for ArrayOfNonnullableHandles {
2202        type Owned = Self;
2203
2204        #[inline(always)]
2205        fn inline_align(_context: fidl::encoding::Context) -> usize {
2206            4
2207        }
2208
2209        #[inline(always)]
2210        fn inline_size(_context: fidl::encoding::Context) -> usize {
2211            16
2212        }
2213    }
2214
2215    unsafe impl
2216        fidl::encoding::Encode<
2217            ArrayOfNonnullableHandles,
2218            fidl::encoding::DefaultFuchsiaResourceDialect,
2219        > for &mut ArrayOfNonnullableHandles
2220    {
2221        #[inline]
2222        unsafe fn encode(
2223            self,
2224            encoder: &mut fidl::encoding::Encoder<
2225                '_,
2226                fidl::encoding::DefaultFuchsiaResourceDialect,
2227            >,
2228            offset: usize,
2229            _depth: fidl::encoding::Depth,
2230        ) -> fidl::Result<()> {
2231            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2232            // Delegate to tuple encoding.
2233            fidl::encoding::Encode::<
2234                ArrayOfNonnullableHandles,
2235                fidl::encoding::DefaultFuchsiaResourceDialect,
2236            >::encode(
2237                (<fidl::encoding::Array<
2238                    fidl::encoding::HandleType<
2239                        fidl::NullableHandle,
2240                        { fidl::ObjectType::NONE.into_raw() },
2241                        2147483648,
2242                    >,
2243                    4,
2244                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2245                    &mut self.handles
2246                ),),
2247                encoder,
2248                offset,
2249                _depth,
2250            )
2251        }
2252    }
2253    unsafe impl<
2254        T0: fidl::encoding::Encode<
2255                fidl::encoding::Array<
2256                    fidl::encoding::HandleType<
2257                        fidl::NullableHandle,
2258                        { fidl::ObjectType::NONE.into_raw() },
2259                        2147483648,
2260                    >,
2261                    4,
2262                >,
2263                fidl::encoding::DefaultFuchsiaResourceDialect,
2264            >,
2265    >
2266        fidl::encoding::Encode<
2267            ArrayOfNonnullableHandles,
2268            fidl::encoding::DefaultFuchsiaResourceDialect,
2269        > for (T0,)
2270    {
2271        #[inline]
2272        unsafe fn encode(
2273            self,
2274            encoder: &mut fidl::encoding::Encoder<
2275                '_,
2276                fidl::encoding::DefaultFuchsiaResourceDialect,
2277            >,
2278            offset: usize,
2279            depth: fidl::encoding::Depth,
2280        ) -> fidl::Result<()> {
2281            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2282            // Zero out padding regions. There's no need to apply masks
2283            // because the unmasked parts will be overwritten by fields.
2284            // Write the fields.
2285            self.0.encode(encoder, offset + 0, depth)?;
2286            Ok(())
2287        }
2288    }
2289
2290    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2291        for ArrayOfNonnullableHandles
2292    {
2293        #[inline(always)]
2294        fn new_empty() -> Self {
2295            Self {
2296                handles: fidl::new_empty!(
2297                    fidl::encoding::Array<
2298                        fidl::encoding::HandleType<
2299                            fidl::NullableHandle,
2300                            { fidl::ObjectType::NONE.into_raw() },
2301                            2147483648,
2302                        >,
2303                        4,
2304                    >,
2305                    fidl::encoding::DefaultFuchsiaResourceDialect
2306                ),
2307            }
2308        }
2309
2310        #[inline]
2311        unsafe fn decode(
2312            &mut self,
2313            decoder: &mut fidl::encoding::Decoder<
2314                '_,
2315                fidl::encoding::DefaultFuchsiaResourceDialect,
2316            >,
2317            offset: usize,
2318            _depth: fidl::encoding::Depth,
2319        ) -> fidl::Result<()> {
2320            decoder.debug_check_bounds::<Self>(offset);
2321            // Verify that padding bytes are zero.
2322            fidl::decode!(
2323                fidl::encoding::Array<
2324                    fidl::encoding::HandleType<
2325                        fidl::NullableHandle,
2326                        { fidl::ObjectType::NONE.into_raw() },
2327                        2147483648,
2328                    >,
2329                    4,
2330                >,
2331                fidl::encoding::DefaultFuchsiaResourceDialect,
2332                &mut self.handles,
2333                decoder,
2334                offset + 0,
2335                _depth
2336            )?;
2337            Ok(())
2338        }
2339    }
2340
2341    impl fidl::encoding::ResourceTypeMarker for ArrayOfNullableHandles {
2342        type Borrowed<'a> = &'a mut Self;
2343        fn take_or_borrow<'a>(
2344            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2345        ) -> Self::Borrowed<'a> {
2346            value
2347        }
2348    }
2349
2350    unsafe impl fidl::encoding::TypeMarker for ArrayOfNullableHandles {
2351        type Owned = Self;
2352
2353        #[inline(always)]
2354        fn inline_align(_context: fidl::encoding::Context) -> usize {
2355            4
2356        }
2357
2358        #[inline(always)]
2359        fn inline_size(_context: fidl::encoding::Context) -> usize {
2360            20
2361        }
2362    }
2363
2364    unsafe impl
2365        fidl::encoding::Encode<
2366            ArrayOfNullableHandles,
2367            fidl::encoding::DefaultFuchsiaResourceDialect,
2368        > for &mut ArrayOfNullableHandles
2369    {
2370        #[inline]
2371        unsafe fn encode(
2372            self,
2373            encoder: &mut fidl::encoding::Encoder<
2374                '_,
2375                fidl::encoding::DefaultFuchsiaResourceDialect,
2376            >,
2377            offset: usize,
2378            _depth: fidl::encoding::Depth,
2379        ) -> fidl::Result<()> {
2380            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2381            // Delegate to tuple encoding.
2382            fidl::encoding::Encode::<
2383                ArrayOfNullableHandles,
2384                fidl::encoding::DefaultFuchsiaResourceDialect,
2385            >::encode(
2386                (<fidl::encoding::Array<
2387                    fidl::encoding::Optional<
2388                        fidl::encoding::HandleType<
2389                            fidl::NullableHandle,
2390                            { fidl::ObjectType::NONE.into_raw() },
2391                            2147483648,
2392                        >,
2393                    >,
2394                    5,
2395                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2396                    &mut self.handles
2397                ),),
2398                encoder,
2399                offset,
2400                _depth,
2401            )
2402        }
2403    }
2404    unsafe impl<
2405        T0: fidl::encoding::Encode<
2406                fidl::encoding::Array<
2407                    fidl::encoding::Optional<
2408                        fidl::encoding::HandleType<
2409                            fidl::NullableHandle,
2410                            { fidl::ObjectType::NONE.into_raw() },
2411                            2147483648,
2412                        >,
2413                    >,
2414                    5,
2415                >,
2416                fidl::encoding::DefaultFuchsiaResourceDialect,
2417            >,
2418    >
2419        fidl::encoding::Encode<
2420            ArrayOfNullableHandles,
2421            fidl::encoding::DefaultFuchsiaResourceDialect,
2422        > for (T0,)
2423    {
2424        #[inline]
2425        unsafe fn encode(
2426            self,
2427            encoder: &mut fidl::encoding::Encoder<
2428                '_,
2429                fidl::encoding::DefaultFuchsiaResourceDialect,
2430            >,
2431            offset: usize,
2432            depth: fidl::encoding::Depth,
2433        ) -> fidl::Result<()> {
2434            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2435            // Zero out padding regions. There's no need to apply masks
2436            // because the unmasked parts will be overwritten by fields.
2437            // Write the fields.
2438            self.0.encode(encoder, offset + 0, depth)?;
2439            Ok(())
2440        }
2441    }
2442
2443    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2444        for ArrayOfNullableHandles
2445    {
2446        #[inline(always)]
2447        fn new_empty() -> Self {
2448            Self {
2449                handles: fidl::new_empty!(
2450                    fidl::encoding::Array<
2451                        fidl::encoding::Optional<
2452                            fidl::encoding::HandleType<
2453                                fidl::NullableHandle,
2454                                { fidl::ObjectType::NONE.into_raw() },
2455                                2147483648,
2456                            >,
2457                        >,
2458                        5,
2459                    >,
2460                    fidl::encoding::DefaultFuchsiaResourceDialect
2461                ),
2462            }
2463        }
2464
2465        #[inline]
2466        unsafe fn decode(
2467            &mut self,
2468            decoder: &mut fidl::encoding::Decoder<
2469                '_,
2470                fidl::encoding::DefaultFuchsiaResourceDialect,
2471            >,
2472            offset: usize,
2473            _depth: fidl::encoding::Depth,
2474        ) -> fidl::Result<()> {
2475            decoder.debug_check_bounds::<Self>(offset);
2476            // Verify that padding bytes are zero.
2477            fidl::decode!(
2478                fidl::encoding::Array<
2479                    fidl::encoding::Optional<
2480                        fidl::encoding::HandleType<
2481                            fidl::NullableHandle,
2482                            { fidl::ObjectType::NONE.into_raw() },
2483                            2147483648,
2484                        >,
2485                    >,
2486                    5,
2487                >,
2488                fidl::encoding::DefaultFuchsiaResourceDialect,
2489                &mut self.handles,
2490                decoder,
2491                offset + 0,
2492                _depth
2493            )?;
2494            Ok(())
2495        }
2496    }
2497
2498    impl fidl::encoding::ResourceTypeMarker for ArrayOfOptionalHandles {
2499        type Borrowed<'a> = &'a mut Self;
2500        fn take_or_borrow<'a>(
2501            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2502        ) -> Self::Borrowed<'a> {
2503            value
2504        }
2505    }
2506
2507    unsafe impl fidl::encoding::TypeMarker for ArrayOfOptionalHandles {
2508        type Owned = Self;
2509
2510        #[inline(always)]
2511        fn inline_align(_context: fidl::encoding::Context) -> usize {
2512            4
2513        }
2514
2515        #[inline(always)]
2516        fn inline_size(_context: fidl::encoding::Context) -> usize {
2517            12
2518        }
2519    }
2520
2521    unsafe impl
2522        fidl::encoding::Encode<
2523            ArrayOfOptionalHandles,
2524            fidl::encoding::DefaultFuchsiaResourceDialect,
2525        > for &mut ArrayOfOptionalHandles
2526    {
2527        #[inline]
2528        unsafe fn encode(
2529            self,
2530            encoder: &mut fidl::encoding::Encoder<
2531                '_,
2532                fidl::encoding::DefaultFuchsiaResourceDialect,
2533            >,
2534            offset: usize,
2535            _depth: fidl::encoding::Depth,
2536        ) -> fidl::Result<()> {
2537            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2538            // Delegate to tuple encoding.
2539            fidl::encoding::Encode::<
2540                ArrayOfOptionalHandles,
2541                fidl::encoding::DefaultFuchsiaResourceDialect,
2542            >::encode(
2543                (<fidl::encoding::Array<
2544                    fidl::encoding::Optional<
2545                        fidl::encoding::HandleType<
2546                            fidl::NullableHandle,
2547                            { fidl::ObjectType::NONE.into_raw() },
2548                            2147483648,
2549                        >,
2550                    >,
2551                    3,
2552                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2553                    &mut self.a
2554                ),),
2555                encoder,
2556                offset,
2557                _depth,
2558            )
2559        }
2560    }
2561    unsafe impl<
2562        T0: fidl::encoding::Encode<
2563                fidl::encoding::Array<
2564                    fidl::encoding::Optional<
2565                        fidl::encoding::HandleType<
2566                            fidl::NullableHandle,
2567                            { fidl::ObjectType::NONE.into_raw() },
2568                            2147483648,
2569                        >,
2570                    >,
2571                    3,
2572                >,
2573                fidl::encoding::DefaultFuchsiaResourceDialect,
2574            >,
2575    >
2576        fidl::encoding::Encode<
2577            ArrayOfOptionalHandles,
2578            fidl::encoding::DefaultFuchsiaResourceDialect,
2579        > for (T0,)
2580    {
2581        #[inline]
2582        unsafe fn encode(
2583            self,
2584            encoder: &mut fidl::encoding::Encoder<
2585                '_,
2586                fidl::encoding::DefaultFuchsiaResourceDialect,
2587            >,
2588            offset: usize,
2589            depth: fidl::encoding::Depth,
2590        ) -> fidl::Result<()> {
2591            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2592            // Zero out padding regions. There's no need to apply masks
2593            // because the unmasked parts will be overwritten by fields.
2594            // Write the fields.
2595            self.0.encode(encoder, offset + 0, depth)?;
2596            Ok(())
2597        }
2598    }
2599
2600    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2601        for ArrayOfOptionalHandles
2602    {
2603        #[inline(always)]
2604        fn new_empty() -> Self {
2605            Self {
2606                a: fidl::new_empty!(
2607                    fidl::encoding::Array<
2608                        fidl::encoding::Optional<
2609                            fidl::encoding::HandleType<
2610                                fidl::NullableHandle,
2611                                { fidl::ObjectType::NONE.into_raw() },
2612                                2147483648,
2613                            >,
2614                        >,
2615                        3,
2616                    >,
2617                    fidl::encoding::DefaultFuchsiaResourceDialect
2618                ),
2619            }
2620        }
2621
2622        #[inline]
2623        unsafe fn decode(
2624            &mut self,
2625            decoder: &mut fidl::encoding::Decoder<
2626                '_,
2627                fidl::encoding::DefaultFuchsiaResourceDialect,
2628            >,
2629            offset: usize,
2630            _depth: fidl::encoding::Depth,
2631        ) -> fidl::Result<()> {
2632            decoder.debug_check_bounds::<Self>(offset);
2633            // Verify that padding bytes are zero.
2634            fidl::decode!(
2635                fidl::encoding::Array<
2636                    fidl::encoding::Optional<
2637                        fidl::encoding::HandleType<
2638                            fidl::NullableHandle,
2639                            { fidl::ObjectType::NONE.into_raw() },
2640                            2147483648,
2641                        >,
2642                    >,
2643                    3,
2644                >,
2645                fidl::encoding::DefaultFuchsiaResourceDialect,
2646                &mut self.a,
2647                decoder,
2648                offset + 0,
2649                _depth
2650            )?;
2651            Ok(())
2652        }
2653    }
2654
2655    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2656        type Borrowed<'a> = &'a mut Self;
2657        fn take_or_borrow<'a>(
2658            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2659        ) -> Self::Borrowed<'a> {
2660            value
2661        }
2662    }
2663
2664    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2665        type Owned = Self;
2666
2667        #[inline(always)]
2668        fn inline_align(_context: fidl::encoding::Context) -> usize {
2669            8
2670        }
2671
2672        #[inline(always)]
2673        fn inline_size(_context: fidl::encoding::Context) -> usize {
2674            16
2675        }
2676    }
2677
2678    unsafe impl
2679        fidl::encoding::Encode<
2680            ArrayOfVectorOfEventInStructWithDefaultRights,
2681            fidl::encoding::DefaultFuchsiaResourceDialect,
2682        > for &mut ArrayOfVectorOfEventInStructWithDefaultRights
2683    {
2684        #[inline]
2685        unsafe fn encode(
2686            self,
2687            encoder: &mut fidl::encoding::Encoder<
2688                '_,
2689                fidl::encoding::DefaultFuchsiaResourceDialect,
2690            >,
2691            offset: usize,
2692            _depth: fidl::encoding::Depth,
2693        ) -> fidl::Result<()> {
2694            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2695            // Delegate to tuple encoding.
2696            fidl::encoding::Encode::<
2697                ArrayOfVectorOfEventInStructWithDefaultRights,
2698                fidl::encoding::DefaultFuchsiaResourceDialect,
2699            >::encode(
2700                (<fidl::encoding::Array<
2701                    fidl::encoding::Vector<
2702                        fidl::encoding::HandleType<
2703                            fidl::Event,
2704                            { fidl::ObjectType::EVENT.into_raw() },
2705                            53251,
2706                        >,
2707                        1,
2708                    >,
2709                    1,
2710                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2711                    &mut self.h
2712                ),),
2713                encoder,
2714                offset,
2715                _depth,
2716            )
2717        }
2718    }
2719    unsafe impl<
2720        T0: fidl::encoding::Encode<
2721                fidl::encoding::Array<
2722                    fidl::encoding::Vector<
2723                        fidl::encoding::HandleType<
2724                            fidl::Event,
2725                            { fidl::ObjectType::EVENT.into_raw() },
2726                            53251,
2727                        >,
2728                        1,
2729                    >,
2730                    1,
2731                >,
2732                fidl::encoding::DefaultFuchsiaResourceDialect,
2733            >,
2734    >
2735        fidl::encoding::Encode<
2736            ArrayOfVectorOfEventInStructWithDefaultRights,
2737            fidl::encoding::DefaultFuchsiaResourceDialect,
2738        > for (T0,)
2739    {
2740        #[inline]
2741        unsafe fn encode(
2742            self,
2743            encoder: &mut fidl::encoding::Encoder<
2744                '_,
2745                fidl::encoding::DefaultFuchsiaResourceDialect,
2746            >,
2747            offset: usize,
2748            depth: fidl::encoding::Depth,
2749        ) -> fidl::Result<()> {
2750            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2751            // Zero out padding regions. There's no need to apply masks
2752            // because the unmasked parts will be overwritten by fields.
2753            // Write the fields.
2754            self.0.encode(encoder, offset + 0, depth)?;
2755            Ok(())
2756        }
2757    }
2758
2759    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2760        for ArrayOfVectorOfEventInStructWithDefaultRights
2761    {
2762        #[inline(always)]
2763        fn new_empty() -> Self {
2764            Self {
2765                h: fidl::new_empty!(
2766                    fidl::encoding::Array<
2767                        fidl::encoding::Vector<
2768                            fidl::encoding::HandleType<
2769                                fidl::Event,
2770                                { fidl::ObjectType::EVENT.into_raw() },
2771                                53251,
2772                            >,
2773                            1,
2774                        >,
2775                        1,
2776                    >,
2777                    fidl::encoding::DefaultFuchsiaResourceDialect
2778                ),
2779            }
2780        }
2781
2782        #[inline]
2783        unsafe fn decode(
2784            &mut self,
2785            decoder: &mut fidl::encoding::Decoder<
2786                '_,
2787                fidl::encoding::DefaultFuchsiaResourceDialect,
2788            >,
2789            offset: usize,
2790            _depth: fidl::encoding::Depth,
2791        ) -> fidl::Result<()> {
2792            decoder.debug_check_bounds::<Self>(offset);
2793            // Verify that padding bytes are zero.
2794            fidl::decode!(
2795                fidl::encoding::Array<
2796                    fidl::encoding::Vector<
2797                        fidl::encoding::HandleType<
2798                            fidl::Event,
2799                            { fidl::ObjectType::EVENT.into_raw() },
2800                            53251,
2801                        >,
2802                        1,
2803                    >,
2804                    1,
2805                >,
2806                fidl::encoding::DefaultFuchsiaResourceDialect,
2807                &mut self.h,
2808                decoder,
2809                offset + 0,
2810                _depth
2811            )?;
2812            Ok(())
2813        }
2814    }
2815
2816    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2817        type Borrowed<'a> = &'a mut Self;
2818        fn take_or_borrow<'a>(
2819            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2820        ) -> Self::Borrowed<'a> {
2821            value
2822        }
2823    }
2824
2825    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2826        type Owned = Self;
2827
2828        #[inline(always)]
2829        fn inline_align(_context: fidl::encoding::Context) -> usize {
2830            8
2831        }
2832
2833        #[inline(always)]
2834        fn inline_size(_context: fidl::encoding::Context) -> usize {
2835            16
2836        }
2837    }
2838
2839    unsafe impl
2840        fidl::encoding::Encode<
2841            ArrayOfVectorOfEventInStructWithReducedRights,
2842            fidl::encoding::DefaultFuchsiaResourceDialect,
2843        > for &mut ArrayOfVectorOfEventInStructWithReducedRights
2844    {
2845        #[inline]
2846        unsafe fn encode(
2847            self,
2848            encoder: &mut fidl::encoding::Encoder<
2849                '_,
2850                fidl::encoding::DefaultFuchsiaResourceDialect,
2851            >,
2852            offset: usize,
2853            _depth: fidl::encoding::Depth,
2854        ) -> fidl::Result<()> {
2855            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2856            // Delegate to tuple encoding.
2857            fidl::encoding::Encode::<
2858                ArrayOfVectorOfEventInStructWithReducedRights,
2859                fidl::encoding::DefaultFuchsiaResourceDialect,
2860            >::encode(
2861                (<fidl::encoding::Array<
2862                    fidl::encoding::Vector<
2863                        fidl::encoding::HandleType<
2864                            fidl::Event,
2865                            { fidl::ObjectType::EVENT.into_raw() },
2866                            49155,
2867                        >,
2868                        1,
2869                    >,
2870                    1,
2871                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2872                    &mut self.h
2873                ),),
2874                encoder,
2875                offset,
2876                _depth,
2877            )
2878        }
2879    }
2880    unsafe impl<
2881        T0: fidl::encoding::Encode<
2882                fidl::encoding::Array<
2883                    fidl::encoding::Vector<
2884                        fidl::encoding::HandleType<
2885                            fidl::Event,
2886                            { fidl::ObjectType::EVENT.into_raw() },
2887                            49155,
2888                        >,
2889                        1,
2890                    >,
2891                    1,
2892                >,
2893                fidl::encoding::DefaultFuchsiaResourceDialect,
2894            >,
2895    >
2896        fidl::encoding::Encode<
2897            ArrayOfVectorOfEventInStructWithReducedRights,
2898            fidl::encoding::DefaultFuchsiaResourceDialect,
2899        > for (T0,)
2900    {
2901        #[inline]
2902        unsafe fn encode(
2903            self,
2904            encoder: &mut fidl::encoding::Encoder<
2905                '_,
2906                fidl::encoding::DefaultFuchsiaResourceDialect,
2907            >,
2908            offset: usize,
2909            depth: fidl::encoding::Depth,
2910        ) -> fidl::Result<()> {
2911            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2912            // Zero out padding regions. There's no need to apply masks
2913            // because the unmasked parts will be overwritten by fields.
2914            // Write the fields.
2915            self.0.encode(encoder, offset + 0, depth)?;
2916            Ok(())
2917        }
2918    }
2919
2920    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2921        for ArrayOfVectorOfEventInStructWithReducedRights
2922    {
2923        #[inline(always)]
2924        fn new_empty() -> Self {
2925            Self {
2926                h: fidl::new_empty!(
2927                    fidl::encoding::Array<
2928                        fidl::encoding::Vector<
2929                            fidl::encoding::HandleType<
2930                                fidl::Event,
2931                                { fidl::ObjectType::EVENT.into_raw() },
2932                                49155,
2933                            >,
2934                            1,
2935                        >,
2936                        1,
2937                    >,
2938                    fidl::encoding::DefaultFuchsiaResourceDialect
2939                ),
2940            }
2941        }
2942
2943        #[inline]
2944        unsafe fn decode(
2945            &mut self,
2946            decoder: &mut fidl::encoding::Decoder<
2947                '_,
2948                fidl::encoding::DefaultFuchsiaResourceDialect,
2949            >,
2950            offset: usize,
2951            _depth: fidl::encoding::Depth,
2952        ) -> fidl::Result<()> {
2953            decoder.debug_check_bounds::<Self>(offset);
2954            // Verify that padding bytes are zero.
2955            fidl::decode!(
2956                fidl::encoding::Array<
2957                    fidl::encoding::Vector<
2958                        fidl::encoding::HandleType<
2959                            fidl::Event,
2960                            { fidl::ObjectType::EVENT.into_raw() },
2961                            49155,
2962                        >,
2963                        1,
2964                    >,
2965                    1,
2966                >,
2967                fidl::encoding::DefaultFuchsiaResourceDialect,
2968                &mut self.h,
2969                decoder,
2970                offset + 0,
2971                _depth
2972            )?;
2973            Ok(())
2974        }
2975    }
2976
2977    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2978        type Borrowed<'a> = &'a mut Self;
2979        fn take_or_borrow<'a>(
2980            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2981        ) -> Self::Borrowed<'a> {
2982            value
2983        }
2984    }
2985
2986    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2987        type Owned = Self;
2988
2989        #[inline(always)]
2990        fn inline_align(_context: fidl::encoding::Context) -> usize {
2991            8
2992        }
2993
2994        #[inline(always)]
2995        fn inline_size(_context: fidl::encoding::Context) -> usize {
2996            16
2997        }
2998    }
2999
3000    unsafe impl
3001        fidl::encoding::Encode<
3002            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
3003            fidl::encoding::DefaultFuchsiaResourceDialect,
3004        > for &mut ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3005    {
3006        #[inline]
3007        unsafe fn encode(
3008            self,
3009            encoder: &mut fidl::encoding::Encoder<
3010                '_,
3011                fidl::encoding::DefaultFuchsiaResourceDialect,
3012            >,
3013            offset: usize,
3014            _depth: fidl::encoding::Depth,
3015        ) -> fidl::Result<()> {
3016            encoder
3017                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3018            // Delegate to tuple encoding.
3019            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3020                (
3021                    <ArrayOfVectorOfEventInTableWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3022                ),
3023                encoder, offset, _depth
3024            )
3025        }
3026    }
3027    unsafe impl<
3028        T0: fidl::encoding::Encode<
3029                ArrayOfVectorOfEventInTableWithDefaultRights,
3030                fidl::encoding::DefaultFuchsiaResourceDialect,
3031            >,
3032    >
3033        fidl::encoding::Encode<
3034            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
3035            fidl::encoding::DefaultFuchsiaResourceDialect,
3036        > for (T0,)
3037    {
3038        #[inline]
3039        unsafe fn encode(
3040            self,
3041            encoder: &mut fidl::encoding::Encoder<
3042                '_,
3043                fidl::encoding::DefaultFuchsiaResourceDialect,
3044            >,
3045            offset: usize,
3046            depth: fidl::encoding::Depth,
3047        ) -> fidl::Result<()> {
3048            encoder
3049                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3050            // Zero out padding regions. There's no need to apply masks
3051            // because the unmasked parts will be overwritten by fields.
3052            // Write the fields.
3053            self.0.encode(encoder, offset + 0, depth)?;
3054            Ok(())
3055        }
3056    }
3057
3058    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3059        for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3060    {
3061        #[inline(always)]
3062        fn new_empty() -> Self {
3063            Self {
3064                t: fidl::new_empty!(
3065                    ArrayOfVectorOfEventInTableWithDefaultRights,
3066                    fidl::encoding::DefaultFuchsiaResourceDialect
3067                ),
3068            }
3069        }
3070
3071        #[inline]
3072        unsafe fn decode(
3073            &mut self,
3074            decoder: &mut fidl::encoding::Decoder<
3075                '_,
3076                fidl::encoding::DefaultFuchsiaResourceDialect,
3077            >,
3078            offset: usize,
3079            _depth: fidl::encoding::Depth,
3080        ) -> fidl::Result<()> {
3081            decoder.debug_check_bounds::<Self>(offset);
3082            // Verify that padding bytes are zero.
3083            fidl::decode!(
3084                ArrayOfVectorOfEventInTableWithDefaultRights,
3085                fidl::encoding::DefaultFuchsiaResourceDialect,
3086                &mut self.t,
3087                decoder,
3088                offset + 0,
3089                _depth
3090            )?;
3091            Ok(())
3092        }
3093    }
3094
3095    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3096        type Borrowed<'a> = &'a mut Self;
3097        fn take_or_borrow<'a>(
3098            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3099        ) -> Self::Borrowed<'a> {
3100            value
3101        }
3102    }
3103
3104    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3105        type Owned = Self;
3106
3107        #[inline(always)]
3108        fn inline_align(_context: fidl::encoding::Context) -> usize {
3109            8
3110        }
3111
3112        #[inline(always)]
3113        fn inline_size(_context: fidl::encoding::Context) -> usize {
3114            16
3115        }
3116    }
3117
3118    unsafe impl
3119        fidl::encoding::Encode<
3120            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3121            fidl::encoding::DefaultFuchsiaResourceDialect,
3122        > for &mut ArrayOfVectorOfEventInTableWithReducedRightsStruct
3123    {
3124        #[inline]
3125        unsafe fn encode(
3126            self,
3127            encoder: &mut fidl::encoding::Encoder<
3128                '_,
3129                fidl::encoding::DefaultFuchsiaResourceDialect,
3130            >,
3131            offset: usize,
3132            _depth: fidl::encoding::Depth,
3133        ) -> fidl::Result<()> {
3134            encoder
3135                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3136            // Delegate to tuple encoding.
3137            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3138                (
3139                    <ArrayOfVectorOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3140                ),
3141                encoder, offset, _depth
3142            )
3143        }
3144    }
3145    unsafe impl<
3146        T0: fidl::encoding::Encode<
3147                ArrayOfVectorOfEventInTableWithReducedRights,
3148                fidl::encoding::DefaultFuchsiaResourceDialect,
3149            >,
3150    >
3151        fidl::encoding::Encode<
3152            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3153            fidl::encoding::DefaultFuchsiaResourceDialect,
3154        > for (T0,)
3155    {
3156        #[inline]
3157        unsafe fn encode(
3158            self,
3159            encoder: &mut fidl::encoding::Encoder<
3160                '_,
3161                fidl::encoding::DefaultFuchsiaResourceDialect,
3162            >,
3163            offset: usize,
3164            depth: fidl::encoding::Depth,
3165        ) -> fidl::Result<()> {
3166            encoder
3167                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3168            // Zero out padding regions. There's no need to apply masks
3169            // because the unmasked parts will be overwritten by fields.
3170            // Write the fields.
3171            self.0.encode(encoder, offset + 0, depth)?;
3172            Ok(())
3173        }
3174    }
3175
3176    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3177        for ArrayOfVectorOfEventInTableWithReducedRightsStruct
3178    {
3179        #[inline(always)]
3180        fn new_empty() -> Self {
3181            Self {
3182                t: fidl::new_empty!(
3183                    ArrayOfVectorOfEventInTableWithReducedRights,
3184                    fidl::encoding::DefaultFuchsiaResourceDialect
3185                ),
3186            }
3187        }
3188
3189        #[inline]
3190        unsafe fn decode(
3191            &mut self,
3192            decoder: &mut fidl::encoding::Decoder<
3193                '_,
3194                fidl::encoding::DefaultFuchsiaResourceDialect,
3195            >,
3196            offset: usize,
3197            _depth: fidl::encoding::Depth,
3198        ) -> fidl::Result<()> {
3199            decoder.debug_check_bounds::<Self>(offset);
3200            // Verify that padding bytes are zero.
3201            fidl::decode!(
3202                ArrayOfVectorOfEventInTableWithReducedRights,
3203                fidl::encoding::DefaultFuchsiaResourceDialect,
3204                &mut self.t,
3205                decoder,
3206                offset + 0,
3207                _depth
3208            )?;
3209            Ok(())
3210        }
3211    }
3212
3213    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3214        type Borrowed<'a> = &'a mut Self;
3215        fn take_or_borrow<'a>(
3216            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3217        ) -> Self::Borrowed<'a> {
3218            value
3219        }
3220    }
3221
3222    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3223        type Owned = Self;
3224
3225        #[inline(always)]
3226        fn inline_align(_context: fidl::encoding::Context) -> usize {
3227            8
3228        }
3229
3230        #[inline(always)]
3231        fn inline_size(_context: fidl::encoding::Context) -> usize {
3232            16
3233        }
3234    }
3235
3236    unsafe impl
3237        fidl::encoding::Encode<
3238            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3239            fidl::encoding::DefaultFuchsiaResourceDialect,
3240        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3241    {
3242        #[inline]
3243        unsafe fn encode(
3244            self,
3245            encoder: &mut fidl::encoding::Encoder<
3246                '_,
3247                fidl::encoding::DefaultFuchsiaResourceDialect,
3248            >,
3249            offset: usize,
3250            _depth: fidl::encoding::Depth,
3251        ) -> fidl::Result<()> {
3252            encoder
3253                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3254            // Delegate to tuple encoding.
3255            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3256                (
3257                    <ArrayOfVectorOfEventInUnionWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3258                ),
3259                encoder, offset, _depth
3260            )
3261        }
3262    }
3263    unsafe impl<
3264        T0: fidl::encoding::Encode<
3265                ArrayOfVectorOfEventInUnionWithDefaultRights,
3266                fidl::encoding::DefaultFuchsiaResourceDialect,
3267            >,
3268    >
3269        fidl::encoding::Encode<
3270            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3271            fidl::encoding::DefaultFuchsiaResourceDialect,
3272        > for (T0,)
3273    {
3274        #[inline]
3275        unsafe fn encode(
3276            self,
3277            encoder: &mut fidl::encoding::Encoder<
3278                '_,
3279                fidl::encoding::DefaultFuchsiaResourceDialect,
3280            >,
3281            offset: usize,
3282            depth: fidl::encoding::Depth,
3283        ) -> fidl::Result<()> {
3284            encoder
3285                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3286            // Zero out padding regions. There's no need to apply masks
3287            // because the unmasked parts will be overwritten by fields.
3288            // Write the fields.
3289            self.0.encode(encoder, offset + 0, depth)?;
3290            Ok(())
3291        }
3292    }
3293
3294    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3295        for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3296    {
3297        #[inline(always)]
3298        fn new_empty() -> Self {
3299            Self {
3300                u: fidl::new_empty!(
3301                    ArrayOfVectorOfEventInUnionWithDefaultRights,
3302                    fidl::encoding::DefaultFuchsiaResourceDialect
3303                ),
3304            }
3305        }
3306
3307        #[inline]
3308        unsafe fn decode(
3309            &mut self,
3310            decoder: &mut fidl::encoding::Decoder<
3311                '_,
3312                fidl::encoding::DefaultFuchsiaResourceDialect,
3313            >,
3314            offset: usize,
3315            _depth: fidl::encoding::Depth,
3316        ) -> fidl::Result<()> {
3317            decoder.debug_check_bounds::<Self>(offset);
3318            // Verify that padding bytes are zero.
3319            fidl::decode!(
3320                ArrayOfVectorOfEventInUnionWithDefaultRights,
3321                fidl::encoding::DefaultFuchsiaResourceDialect,
3322                &mut self.u,
3323                decoder,
3324                offset + 0,
3325                _depth
3326            )?;
3327            Ok(())
3328        }
3329    }
3330
3331    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3332        type Borrowed<'a> = &'a mut Self;
3333        fn take_or_borrow<'a>(
3334            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3335        ) -> Self::Borrowed<'a> {
3336            value
3337        }
3338    }
3339
3340    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3341        type Owned = Self;
3342
3343        #[inline(always)]
3344        fn inline_align(_context: fidl::encoding::Context) -> usize {
3345            8
3346        }
3347
3348        #[inline(always)]
3349        fn inline_size(_context: fidl::encoding::Context) -> usize {
3350            16
3351        }
3352    }
3353
3354    unsafe impl
3355        fidl::encoding::Encode<
3356            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3357            fidl::encoding::DefaultFuchsiaResourceDialect,
3358        > for &mut ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3359    {
3360        #[inline]
3361        unsafe fn encode(
3362            self,
3363            encoder: &mut fidl::encoding::Encoder<
3364                '_,
3365                fidl::encoding::DefaultFuchsiaResourceDialect,
3366            >,
3367            offset: usize,
3368            _depth: fidl::encoding::Depth,
3369        ) -> fidl::Result<()> {
3370            encoder
3371                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3372            // Delegate to tuple encoding.
3373            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3374                (
3375                    <ArrayOfVectorOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3376                ),
3377                encoder, offset, _depth
3378            )
3379        }
3380    }
3381    unsafe impl<
3382        T0: fidl::encoding::Encode<
3383                ArrayOfVectorOfEventInUnionWithReducedRights,
3384                fidl::encoding::DefaultFuchsiaResourceDialect,
3385            >,
3386    >
3387        fidl::encoding::Encode<
3388            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3389            fidl::encoding::DefaultFuchsiaResourceDialect,
3390        > for (T0,)
3391    {
3392        #[inline]
3393        unsafe fn encode(
3394            self,
3395            encoder: &mut fidl::encoding::Encoder<
3396                '_,
3397                fidl::encoding::DefaultFuchsiaResourceDialect,
3398            >,
3399            offset: usize,
3400            depth: fidl::encoding::Depth,
3401        ) -> fidl::Result<()> {
3402            encoder
3403                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3404            // Zero out padding regions. There's no need to apply masks
3405            // because the unmasked parts will be overwritten by fields.
3406            // Write the fields.
3407            self.0.encode(encoder, offset + 0, depth)?;
3408            Ok(())
3409        }
3410    }
3411
3412    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3413        for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3414    {
3415        #[inline(always)]
3416        fn new_empty() -> Self {
3417            Self {
3418                u: fidl::new_empty!(
3419                    ArrayOfVectorOfEventInUnionWithReducedRights,
3420                    fidl::encoding::DefaultFuchsiaResourceDialect
3421                ),
3422            }
3423        }
3424
3425        #[inline]
3426        unsafe fn decode(
3427            &mut self,
3428            decoder: &mut fidl::encoding::Decoder<
3429                '_,
3430                fidl::encoding::DefaultFuchsiaResourceDialect,
3431            >,
3432            offset: usize,
3433            _depth: fidl::encoding::Depth,
3434        ) -> fidl::Result<()> {
3435            decoder.debug_check_bounds::<Self>(offset);
3436            // Verify that padding bytes are zero.
3437            fidl::decode!(
3438                ArrayOfVectorOfEventInUnionWithReducedRights,
3439                fidl::encoding::DefaultFuchsiaResourceDialect,
3440                &mut self.u,
3441                decoder,
3442                offset + 0,
3443                _depth
3444            )?;
3445            Ok(())
3446        }
3447    }
3448
3449    impl fidl::encoding::ResourceTypeMarker for Bounded32NonnullableVectorOfHandles {
3450        type Borrowed<'a> = &'a mut Self;
3451        fn take_or_borrow<'a>(
3452            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3453        ) -> Self::Borrowed<'a> {
3454            value
3455        }
3456    }
3457
3458    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfHandles {
3459        type Owned = Self;
3460
3461        #[inline(always)]
3462        fn inline_align(_context: fidl::encoding::Context) -> usize {
3463            8
3464        }
3465
3466        #[inline(always)]
3467        fn inline_size(_context: fidl::encoding::Context) -> usize {
3468            16
3469        }
3470    }
3471
3472    unsafe impl
3473        fidl::encoding::Encode<
3474            Bounded32NonnullableVectorOfHandles,
3475            fidl::encoding::DefaultFuchsiaResourceDialect,
3476        > for &mut Bounded32NonnullableVectorOfHandles
3477    {
3478        #[inline]
3479        unsafe fn encode(
3480            self,
3481            encoder: &mut fidl::encoding::Encoder<
3482                '_,
3483                fidl::encoding::DefaultFuchsiaResourceDialect,
3484            >,
3485            offset: usize,
3486            _depth: fidl::encoding::Depth,
3487        ) -> fidl::Result<()> {
3488            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3489            // Delegate to tuple encoding.
3490            fidl::encoding::Encode::<
3491                Bounded32NonnullableVectorOfHandles,
3492                fidl::encoding::DefaultFuchsiaResourceDialect,
3493            >::encode(
3494                (<fidl::encoding::Vector<
3495                    fidl::encoding::HandleType<
3496                        fidl::NullableHandle,
3497                        { fidl::ObjectType::NONE.into_raw() },
3498                        2147483648,
3499                    >,
3500                    32,
3501                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3502                    &mut self.vh0
3503                ),),
3504                encoder,
3505                offset,
3506                _depth,
3507            )
3508        }
3509    }
3510    unsafe impl<
3511        T0: fidl::encoding::Encode<
3512                fidl::encoding::Vector<
3513                    fidl::encoding::HandleType<
3514                        fidl::NullableHandle,
3515                        { fidl::ObjectType::NONE.into_raw() },
3516                        2147483648,
3517                    >,
3518                    32,
3519                >,
3520                fidl::encoding::DefaultFuchsiaResourceDialect,
3521            >,
3522    >
3523        fidl::encoding::Encode<
3524            Bounded32NonnullableVectorOfHandles,
3525            fidl::encoding::DefaultFuchsiaResourceDialect,
3526        > for (T0,)
3527    {
3528        #[inline]
3529        unsafe fn encode(
3530            self,
3531            encoder: &mut fidl::encoding::Encoder<
3532                '_,
3533                fidl::encoding::DefaultFuchsiaResourceDialect,
3534            >,
3535            offset: usize,
3536            depth: fidl::encoding::Depth,
3537        ) -> fidl::Result<()> {
3538            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3539            // Zero out padding regions. There's no need to apply masks
3540            // because the unmasked parts will be overwritten by fields.
3541            // Write the fields.
3542            self.0.encode(encoder, offset + 0, depth)?;
3543            Ok(())
3544        }
3545    }
3546
3547    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3548        for Bounded32NonnullableVectorOfHandles
3549    {
3550        #[inline(always)]
3551        fn new_empty() -> Self {
3552            Self {
3553                vh0: fidl::new_empty!(
3554                    fidl::encoding::Vector<
3555                        fidl::encoding::HandleType<
3556                            fidl::NullableHandle,
3557                            { fidl::ObjectType::NONE.into_raw() },
3558                            2147483648,
3559                        >,
3560                        32,
3561                    >,
3562                    fidl::encoding::DefaultFuchsiaResourceDialect
3563                ),
3564            }
3565        }
3566
3567        #[inline]
3568        unsafe fn decode(
3569            &mut self,
3570            decoder: &mut fidl::encoding::Decoder<
3571                '_,
3572                fidl::encoding::DefaultFuchsiaResourceDialect,
3573            >,
3574            offset: usize,
3575            _depth: fidl::encoding::Depth,
3576        ) -> fidl::Result<()> {
3577            decoder.debug_check_bounds::<Self>(offset);
3578            // Verify that padding bytes are zero.
3579            fidl::decode!(
3580                fidl::encoding::Vector<
3581                    fidl::encoding::HandleType<
3582                        fidl::NullableHandle,
3583                        { fidl::ObjectType::NONE.into_raw() },
3584                        2147483648,
3585                    >,
3586                    32,
3587                >,
3588                fidl::encoding::DefaultFuchsiaResourceDialect,
3589                &mut self.vh0,
3590                decoder,
3591                offset + 0,
3592                _depth
3593            )?;
3594            Ok(())
3595        }
3596    }
3597
3598    impl fidl::encoding::ResourceTypeMarker for Bounded32NullableVectorOfHandles {
3599        type Borrowed<'a> = &'a mut Self;
3600        fn take_or_borrow<'a>(
3601            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3602        ) -> Self::Borrowed<'a> {
3603            value
3604        }
3605    }
3606
3607    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfHandles {
3608        type Owned = Self;
3609
3610        #[inline(always)]
3611        fn inline_align(_context: fidl::encoding::Context) -> usize {
3612            8
3613        }
3614
3615        #[inline(always)]
3616        fn inline_size(_context: fidl::encoding::Context) -> usize {
3617            16
3618        }
3619    }
3620
3621    unsafe impl
3622        fidl::encoding::Encode<
3623            Bounded32NullableVectorOfHandles,
3624            fidl::encoding::DefaultFuchsiaResourceDialect,
3625        > for &mut Bounded32NullableVectorOfHandles
3626    {
3627        #[inline]
3628        unsafe fn encode(
3629            self,
3630            encoder: &mut fidl::encoding::Encoder<
3631                '_,
3632                fidl::encoding::DefaultFuchsiaResourceDialect,
3633            >,
3634            offset: usize,
3635            _depth: fidl::encoding::Depth,
3636        ) -> fidl::Result<()> {
3637            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3638            // Delegate to tuple encoding.
3639            fidl::encoding::Encode::<
3640                Bounded32NullableVectorOfHandles,
3641                fidl::encoding::DefaultFuchsiaResourceDialect,
3642            >::encode(
3643                (<fidl::encoding::Optional<
3644                    fidl::encoding::Vector<
3645                        fidl::encoding::HandleType<
3646                            fidl::NullableHandle,
3647                            { fidl::ObjectType::NONE.into_raw() },
3648                            2147483648,
3649                        >,
3650                        32,
3651                    >,
3652                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3653                    &mut self.vh0
3654                ),),
3655                encoder,
3656                offset,
3657                _depth,
3658            )
3659        }
3660    }
3661    unsafe impl<
3662        T0: fidl::encoding::Encode<
3663                fidl::encoding::Optional<
3664                    fidl::encoding::Vector<
3665                        fidl::encoding::HandleType<
3666                            fidl::NullableHandle,
3667                            { fidl::ObjectType::NONE.into_raw() },
3668                            2147483648,
3669                        >,
3670                        32,
3671                    >,
3672                >,
3673                fidl::encoding::DefaultFuchsiaResourceDialect,
3674            >,
3675    >
3676        fidl::encoding::Encode<
3677            Bounded32NullableVectorOfHandles,
3678            fidl::encoding::DefaultFuchsiaResourceDialect,
3679        > for (T0,)
3680    {
3681        #[inline]
3682        unsafe fn encode(
3683            self,
3684            encoder: &mut fidl::encoding::Encoder<
3685                '_,
3686                fidl::encoding::DefaultFuchsiaResourceDialect,
3687            >,
3688            offset: usize,
3689            depth: fidl::encoding::Depth,
3690        ) -> fidl::Result<()> {
3691            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3692            // Zero out padding regions. There's no need to apply masks
3693            // because the unmasked parts will be overwritten by fields.
3694            // Write the fields.
3695            self.0.encode(encoder, offset + 0, depth)?;
3696            Ok(())
3697        }
3698    }
3699
3700    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3701        for Bounded32NullableVectorOfHandles
3702    {
3703        #[inline(always)]
3704        fn new_empty() -> Self {
3705            Self {
3706                vh0: fidl::new_empty!(
3707                    fidl::encoding::Optional<
3708                        fidl::encoding::Vector<
3709                            fidl::encoding::HandleType<
3710                                fidl::NullableHandle,
3711                                { fidl::ObjectType::NONE.into_raw() },
3712                                2147483648,
3713                            >,
3714                            32,
3715                        >,
3716                    >,
3717                    fidl::encoding::DefaultFuchsiaResourceDialect
3718                ),
3719            }
3720        }
3721
3722        #[inline]
3723        unsafe fn decode(
3724            &mut self,
3725            decoder: &mut fidl::encoding::Decoder<
3726                '_,
3727                fidl::encoding::DefaultFuchsiaResourceDialect,
3728            >,
3729            offset: usize,
3730            _depth: fidl::encoding::Depth,
3731        ) -> fidl::Result<()> {
3732            decoder.debug_check_bounds::<Self>(offset);
3733            // Verify that padding bytes are zero.
3734            fidl::decode!(
3735                fidl::encoding::Optional<
3736                    fidl::encoding::Vector<
3737                        fidl::encoding::HandleType<
3738                            fidl::NullableHandle,
3739                            { fidl::ObjectType::NONE.into_raw() },
3740                            2147483648,
3741                        >,
3742                        32,
3743                    >,
3744                >,
3745                fidl::encoding::DefaultFuchsiaResourceDialect,
3746                &mut self.vh0,
3747                decoder,
3748                offset + 0,
3749                _depth
3750            )?;
3751            Ok(())
3752        }
3753    }
3754
3755    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleHandle {
3756        type Borrowed<'a> = &'a mut Self;
3757        fn take_or_borrow<'a>(
3758            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3759        ) -> Self::Borrowed<'a> {
3760            value
3761        }
3762    }
3763
3764    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleHandle {
3765        type Owned = Self;
3766
3767        #[inline(always)]
3768        fn inline_align(_context: fidl::encoding::Context) -> usize {
3769            8
3770        }
3771
3772        #[inline(always)]
3773        fn inline_size(_context: fidl::encoding::Context) -> usize {
3774            8
3775        }
3776    }
3777
3778    unsafe impl
3779        fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3780        for &mut BoxOfSingleHandle
3781    {
3782        #[inline]
3783        unsafe fn encode(
3784            self,
3785            encoder: &mut fidl::encoding::Encoder<
3786                '_,
3787                fidl::encoding::DefaultFuchsiaResourceDialect,
3788            >,
3789            offset: usize,
3790            _depth: fidl::encoding::Depth,
3791        ) -> fidl::Result<()> {
3792            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3793            // Delegate to tuple encoding.
3794            fidl::encoding::Encode::<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3795                (
3796                    <fidl::encoding::Boxed<SingleHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3797                ),
3798                encoder, offset, _depth
3799            )
3800        }
3801    }
3802    unsafe impl<
3803        T0: fidl::encoding::Encode<
3804                fidl::encoding::Boxed<SingleHandle>,
3805                fidl::encoding::DefaultFuchsiaResourceDialect,
3806            >,
3807    > fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3808        for (T0,)
3809    {
3810        #[inline]
3811        unsafe fn encode(
3812            self,
3813            encoder: &mut fidl::encoding::Encoder<
3814                '_,
3815                fidl::encoding::DefaultFuchsiaResourceDialect,
3816            >,
3817            offset: usize,
3818            depth: fidl::encoding::Depth,
3819        ) -> fidl::Result<()> {
3820            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3821            // Zero out padding regions. There's no need to apply masks
3822            // because the unmasked parts will be overwritten by fields.
3823            // Write the fields.
3824            self.0.encode(encoder, offset + 0, depth)?;
3825            Ok(())
3826        }
3827    }
3828
3829    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3830        for BoxOfSingleHandle
3831    {
3832        #[inline(always)]
3833        fn new_empty() -> Self {
3834            Self {
3835                b: fidl::new_empty!(
3836                    fidl::encoding::Boxed<SingleHandle>,
3837                    fidl::encoding::DefaultFuchsiaResourceDialect
3838                ),
3839            }
3840        }
3841
3842        #[inline]
3843        unsafe fn decode(
3844            &mut self,
3845            decoder: &mut fidl::encoding::Decoder<
3846                '_,
3847                fidl::encoding::DefaultFuchsiaResourceDialect,
3848            >,
3849            offset: usize,
3850            _depth: fidl::encoding::Depth,
3851        ) -> fidl::Result<()> {
3852            decoder.debug_check_bounds::<Self>(offset);
3853            // Verify that padding bytes are zero.
3854            fidl::decode!(
3855                fidl::encoding::Boxed<SingleHandle>,
3856                fidl::encoding::DefaultFuchsiaResourceDialect,
3857                &mut self.b,
3858                decoder,
3859                offset + 0,
3860                _depth
3861            )?;
3862            Ok(())
3863        }
3864    }
3865
3866    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3867        type Borrowed<'a> = &'a mut Self;
3868        fn take_or_borrow<'a>(
3869            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3870        ) -> Self::Borrowed<'a> {
3871            value
3872        }
3873    }
3874
3875    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3876        type Owned = Self;
3877
3878        #[inline(always)]
3879        fn inline_align(_context: fidl::encoding::Context) -> usize {
3880            8
3881        }
3882
3883        #[inline(always)]
3884        fn inline_size(_context: fidl::encoding::Context) -> usize {
3885            8
3886        }
3887    }
3888
3889    unsafe impl
3890        fidl::encoding::Encode<
3891            BoxOfSingleOptionalHandle,
3892            fidl::encoding::DefaultFuchsiaResourceDialect,
3893        > for &mut BoxOfSingleOptionalHandle
3894    {
3895        #[inline]
3896        unsafe fn encode(
3897            self,
3898            encoder: &mut fidl::encoding::Encoder<
3899                '_,
3900                fidl::encoding::DefaultFuchsiaResourceDialect,
3901            >,
3902            offset: usize,
3903            _depth: fidl::encoding::Depth,
3904        ) -> fidl::Result<()> {
3905            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3906            // Delegate to tuple encoding.
3907            fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3908                (
3909                    <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3910                ),
3911                encoder, offset, _depth
3912            )
3913        }
3914    }
3915    unsafe impl<
3916        T0: fidl::encoding::Encode<
3917                fidl::encoding::Boxed<SingleOptionalHandle>,
3918                fidl::encoding::DefaultFuchsiaResourceDialect,
3919            >,
3920    >
3921        fidl::encoding::Encode<
3922            BoxOfSingleOptionalHandle,
3923            fidl::encoding::DefaultFuchsiaResourceDialect,
3924        > for (T0,)
3925    {
3926        #[inline]
3927        unsafe fn encode(
3928            self,
3929            encoder: &mut fidl::encoding::Encoder<
3930                '_,
3931                fidl::encoding::DefaultFuchsiaResourceDialect,
3932            >,
3933            offset: usize,
3934            depth: fidl::encoding::Depth,
3935        ) -> fidl::Result<()> {
3936            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3937            // Zero out padding regions. There's no need to apply masks
3938            // because the unmasked parts will be overwritten by fields.
3939            // Write the fields.
3940            self.0.encode(encoder, offset + 0, depth)?;
3941            Ok(())
3942        }
3943    }
3944
3945    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3946        for BoxOfSingleOptionalHandle
3947    {
3948        #[inline(always)]
3949        fn new_empty() -> Self {
3950            Self {
3951                b: fidl::new_empty!(
3952                    fidl::encoding::Boxed<SingleOptionalHandle>,
3953                    fidl::encoding::DefaultFuchsiaResourceDialect
3954                ),
3955            }
3956        }
3957
3958        #[inline]
3959        unsafe fn decode(
3960            &mut self,
3961            decoder: &mut fidl::encoding::Decoder<
3962                '_,
3963                fidl::encoding::DefaultFuchsiaResourceDialect,
3964            >,
3965            offset: usize,
3966            _depth: fidl::encoding::Depth,
3967        ) -> fidl::Result<()> {
3968            decoder.debug_check_bounds::<Self>(offset);
3969            // Verify that padding bytes are zero.
3970            fidl::decode!(
3971                fidl::encoding::Boxed<SingleOptionalHandle>,
3972                fidl::encoding::DefaultFuchsiaResourceDialect,
3973                &mut self.b,
3974                decoder,
3975                offset + 0,
3976                _depth
3977            )?;
3978            Ok(())
3979        }
3980    }
3981
3982    impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3983        type Borrowed<'a> = &'a mut Self;
3984        fn take_or_borrow<'a>(
3985            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3986        ) -> Self::Borrowed<'a> {
3987            value
3988        }
3989    }
3990
3991    unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
3992        type Owned = Self;
3993
3994        #[inline(always)]
3995        fn inline_align(_context: fidl::encoding::Context) -> usize {
3996            8
3997        }
3998
3999        #[inline(always)]
4000        fn inline_size(_context: fidl::encoding::Context) -> usize {
4001            80
4002        }
4003    }
4004
4005    unsafe impl
4006        fidl::encoding::Encode<
4007            CreateComponentRequest,
4008            fidl::encoding::DefaultFuchsiaResourceDialect,
4009        > for &mut CreateComponentRequest
4010    {
4011        #[inline]
4012        unsafe fn encode(
4013            self,
4014            encoder: &mut fidl::encoding::Encoder<
4015                '_,
4016                fidl::encoding::DefaultFuchsiaResourceDialect,
4017            >,
4018            offset: usize,
4019            _depth: fidl::encoding::Depth,
4020        ) -> fidl::Result<()> {
4021            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4022            // Delegate to tuple encoding.
4023            fidl::encoding::Encode::<
4024                CreateComponentRequest,
4025                fidl::encoding::DefaultFuchsiaResourceDialect,
4026            >::encode(
4027                (
4028                    <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4029                        &mut self.launch_info,
4030                    ),
4031                    <fidl::encoding::Optional<
4032                        fidl::encoding::Endpoint<
4033                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4034                        >,
4035                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4036                        &mut self.controller
4037                    ),
4038                ),
4039                encoder,
4040                offset,
4041                _depth,
4042            )
4043        }
4044    }
4045    unsafe impl<
4046        T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4047        T1: fidl::encoding::Encode<
4048                fidl::encoding::Optional<
4049                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4050                >,
4051                fidl::encoding::DefaultFuchsiaResourceDialect,
4052            >,
4053    >
4054        fidl::encoding::Encode<
4055            CreateComponentRequest,
4056            fidl::encoding::DefaultFuchsiaResourceDialect,
4057        > for (T0, T1)
4058    {
4059        #[inline]
4060        unsafe fn encode(
4061            self,
4062            encoder: &mut fidl::encoding::Encoder<
4063                '_,
4064                fidl::encoding::DefaultFuchsiaResourceDialect,
4065            >,
4066            offset: usize,
4067            depth: fidl::encoding::Depth,
4068        ) -> fidl::Result<()> {
4069            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4070            // Zero out padding regions. There's no need to apply masks
4071            // because the unmasked parts will be overwritten by fields.
4072            unsafe {
4073                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4074                (ptr as *mut u64).write_unaligned(0);
4075            }
4076            // Write the fields.
4077            self.0.encode(encoder, offset + 0, depth)?;
4078            self.1.encode(encoder, offset + 72, depth)?;
4079            Ok(())
4080        }
4081    }
4082
4083    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4084        for CreateComponentRequest
4085    {
4086        #[inline(always)]
4087        fn new_empty() -> Self {
4088            Self {
4089                launch_info: fidl::new_empty!(
4090                    LaunchInfo,
4091                    fidl::encoding::DefaultFuchsiaResourceDialect
4092                ),
4093                controller: fidl::new_empty!(
4094                    fidl::encoding::Optional<
4095                        fidl::encoding::Endpoint<
4096                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4097                        >,
4098                    >,
4099                    fidl::encoding::DefaultFuchsiaResourceDialect
4100                ),
4101            }
4102        }
4103
4104        #[inline]
4105        unsafe fn decode(
4106            &mut self,
4107            decoder: &mut fidl::encoding::Decoder<
4108                '_,
4109                fidl::encoding::DefaultFuchsiaResourceDialect,
4110            >,
4111            offset: usize,
4112            _depth: fidl::encoding::Depth,
4113        ) -> fidl::Result<()> {
4114            decoder.debug_check_bounds::<Self>(offset);
4115            // Verify that padding bytes are zero.
4116            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4117            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4118            let mask = 0xffffffff00000000u64;
4119            let maskedval = padval & mask;
4120            if maskedval != 0 {
4121                return Err(fidl::Error::NonZeroPadding {
4122                    padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4123                });
4124            }
4125            fidl::decode!(
4126                LaunchInfo,
4127                fidl::encoding::DefaultFuchsiaResourceDialect,
4128                &mut self.launch_info,
4129                decoder,
4130                offset + 0,
4131                _depth
4132            )?;
4133            fidl::decode!(
4134                fidl::encoding::Optional<
4135                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4136                >,
4137                fidl::encoding::DefaultFuchsiaResourceDialect,
4138                &mut self.controller,
4139                decoder,
4140                offset + 72,
4141                _depth
4142            )?;
4143            Ok(())
4144        }
4145    }
4146
4147    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4148        type Borrowed<'a> = &'a mut Self;
4149        fn take_or_borrow<'a>(
4150            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4151        ) -> Self::Borrowed<'a> {
4152            value
4153        }
4154    }
4155
4156    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4157        type Owned = Self;
4158
4159        #[inline(always)]
4160        fn inline_align(_context: fidl::encoding::Context) -> usize {
4161            8
4162        }
4163
4164        #[inline(always)]
4165        fn inline_size(_context: fidl::encoding::Context) -> usize {
4166            16
4167        }
4168    }
4169
4170    unsafe impl
4171        fidl::encoding::Encode<
4172            EmptyResourceTableStruct,
4173            fidl::encoding::DefaultFuchsiaResourceDialect,
4174        > for &mut EmptyResourceTableStruct
4175    {
4176        #[inline]
4177        unsafe fn encode(
4178            self,
4179            encoder: &mut fidl::encoding::Encoder<
4180                '_,
4181                fidl::encoding::DefaultFuchsiaResourceDialect,
4182            >,
4183            offset: usize,
4184            _depth: fidl::encoding::Depth,
4185        ) -> fidl::Result<()> {
4186            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4187            // Delegate to tuple encoding.
4188            fidl::encoding::Encode::<
4189                EmptyResourceTableStruct,
4190                fidl::encoding::DefaultFuchsiaResourceDialect,
4191            >::encode(
4192                (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4193                    &mut self.table,
4194                ),),
4195                encoder,
4196                offset,
4197                _depth,
4198            )
4199        }
4200    }
4201    unsafe impl<
4202        T0: fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4203    >
4204        fidl::encoding::Encode<
4205            EmptyResourceTableStruct,
4206            fidl::encoding::DefaultFuchsiaResourceDialect,
4207        > for (T0,)
4208    {
4209        #[inline]
4210        unsafe fn encode(
4211            self,
4212            encoder: &mut fidl::encoding::Encoder<
4213                '_,
4214                fidl::encoding::DefaultFuchsiaResourceDialect,
4215            >,
4216            offset: usize,
4217            depth: fidl::encoding::Depth,
4218        ) -> fidl::Result<()> {
4219            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4220            // Zero out padding regions. There's no need to apply masks
4221            // because the unmasked parts will be overwritten by fields.
4222            // Write the fields.
4223            self.0.encode(encoder, offset + 0, depth)?;
4224            Ok(())
4225        }
4226    }
4227
4228    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4229        for EmptyResourceTableStruct
4230    {
4231        #[inline(always)]
4232        fn new_empty() -> Self {
4233            Self {
4234                table: fidl::new_empty!(
4235                    EmptyResourceTable,
4236                    fidl::encoding::DefaultFuchsiaResourceDialect
4237                ),
4238            }
4239        }
4240
4241        #[inline]
4242        unsafe fn decode(
4243            &mut self,
4244            decoder: &mut fidl::encoding::Decoder<
4245                '_,
4246                fidl::encoding::DefaultFuchsiaResourceDialect,
4247            >,
4248            offset: usize,
4249            _depth: fidl::encoding::Depth,
4250        ) -> fidl::Result<()> {
4251            decoder.debug_check_bounds::<Self>(offset);
4252            // Verify that padding bytes are zero.
4253            fidl::decode!(
4254                EmptyResourceTable,
4255                fidl::encoding::DefaultFuchsiaResourceDialect,
4256                &mut self.table,
4257                decoder,
4258                offset + 0,
4259                _depth
4260            )?;
4261            Ok(())
4262        }
4263    }
4264
4265    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4266        type Borrowed<'a> = &'a mut Self;
4267        fn take_or_borrow<'a>(
4268            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4269        ) -> Self::Borrowed<'a> {
4270            value
4271        }
4272    }
4273
4274    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4275        type Owned = Self;
4276
4277        #[inline(always)]
4278        fn inline_align(_context: fidl::encoding::Context) -> usize {
4279            8
4280        }
4281
4282        #[inline(always)]
4283        fn inline_size(_context: fidl::encoding::Context) -> usize {
4284            16
4285        }
4286    }
4287
4288    unsafe impl
4289        fidl::encoding::Encode<
4290            EnvelopeInliningTestUnionStruct,
4291            fidl::encoding::DefaultFuchsiaResourceDialect,
4292        > for &mut EnvelopeInliningTestUnionStruct
4293    {
4294        #[inline]
4295        unsafe fn encode(
4296            self,
4297            encoder: &mut fidl::encoding::Encoder<
4298                '_,
4299                fidl::encoding::DefaultFuchsiaResourceDialect,
4300            >,
4301            offset: usize,
4302            _depth: fidl::encoding::Depth,
4303        ) -> fidl::Result<()> {
4304            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4305            // Delegate to tuple encoding.
4306            fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4307                (
4308                    <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4309                ),
4310                encoder, offset, _depth
4311            )
4312        }
4313    }
4314    unsafe impl<
4315        T0: fidl::encoding::Encode<
4316                EnvelopeInliningTestUnion,
4317                fidl::encoding::DefaultFuchsiaResourceDialect,
4318            >,
4319    >
4320        fidl::encoding::Encode<
4321            EnvelopeInliningTestUnionStruct,
4322            fidl::encoding::DefaultFuchsiaResourceDialect,
4323        > for (T0,)
4324    {
4325        #[inline]
4326        unsafe fn encode(
4327            self,
4328            encoder: &mut fidl::encoding::Encoder<
4329                '_,
4330                fidl::encoding::DefaultFuchsiaResourceDialect,
4331            >,
4332            offset: usize,
4333            depth: fidl::encoding::Depth,
4334        ) -> fidl::Result<()> {
4335            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4336            // Zero out padding regions. There's no need to apply masks
4337            // because the unmasked parts will be overwritten by fields.
4338            // Write the fields.
4339            self.0.encode(encoder, offset + 0, depth)?;
4340            Ok(())
4341        }
4342    }
4343
4344    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4345        for EnvelopeInliningTestUnionStruct
4346    {
4347        #[inline(always)]
4348        fn new_empty() -> Self {
4349            Self {
4350                u: fidl::new_empty!(
4351                    EnvelopeInliningTestUnion,
4352                    fidl::encoding::DefaultFuchsiaResourceDialect
4353                ),
4354            }
4355        }
4356
4357        #[inline]
4358        unsafe fn decode(
4359            &mut self,
4360            decoder: &mut fidl::encoding::Decoder<
4361                '_,
4362                fidl::encoding::DefaultFuchsiaResourceDialect,
4363            >,
4364            offset: usize,
4365            _depth: fidl::encoding::Depth,
4366        ) -> fidl::Result<()> {
4367            decoder.debug_check_bounds::<Self>(offset);
4368            // Verify that padding bytes are zero.
4369            fidl::decode!(
4370                EnvelopeInliningTestUnion,
4371                fidl::encoding::DefaultFuchsiaResourceDialect,
4372                &mut self.u,
4373                decoder,
4374                offset + 0,
4375                _depth
4376            )?;
4377            Ok(())
4378        }
4379    }
4380
4381    impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4382        type Borrowed<'a> = &'a mut Self;
4383        fn take_or_borrow<'a>(
4384            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4385        ) -> Self::Borrowed<'a> {
4386            value
4387        }
4388    }
4389
4390    unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4391        type Owned = Self;
4392
4393        #[inline(always)]
4394        fn inline_align(_context: fidl::encoding::Context) -> usize {
4395            4
4396        }
4397
4398        #[inline(always)]
4399        fn inline_size(_context: fidl::encoding::Context) -> usize {
4400            4
4401        }
4402    }
4403
4404    unsafe impl
4405        fidl::encoding::Encode<
4406            EventWithDefaultRights,
4407            fidl::encoding::DefaultFuchsiaResourceDialect,
4408        > for &mut EventWithDefaultRights
4409    {
4410        #[inline]
4411        unsafe fn encode(
4412            self,
4413            encoder: &mut fidl::encoding::Encoder<
4414                '_,
4415                fidl::encoding::DefaultFuchsiaResourceDialect,
4416            >,
4417            offset: usize,
4418            _depth: fidl::encoding::Depth,
4419        ) -> fidl::Result<()> {
4420            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4421            // Delegate to tuple encoding.
4422            fidl::encoding::Encode::<
4423                EventWithDefaultRights,
4424                fidl::encoding::DefaultFuchsiaResourceDialect,
4425            >::encode(
4426                (<fidl::encoding::HandleType<
4427                    fidl::Event,
4428                    { fidl::ObjectType::EVENT.into_raw() },
4429                    53251,
4430                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4431                    &mut self.h
4432                ),),
4433                encoder,
4434                offset,
4435                _depth,
4436            )
4437        }
4438    }
4439    unsafe impl<
4440        T0: fidl::encoding::Encode<
4441                fidl::encoding::HandleType<
4442                    fidl::Event,
4443                    { fidl::ObjectType::EVENT.into_raw() },
4444                    53251,
4445                >,
4446                fidl::encoding::DefaultFuchsiaResourceDialect,
4447            >,
4448    >
4449        fidl::encoding::Encode<
4450            EventWithDefaultRights,
4451            fidl::encoding::DefaultFuchsiaResourceDialect,
4452        > for (T0,)
4453    {
4454        #[inline]
4455        unsafe fn encode(
4456            self,
4457            encoder: &mut fidl::encoding::Encoder<
4458                '_,
4459                fidl::encoding::DefaultFuchsiaResourceDialect,
4460            >,
4461            offset: usize,
4462            depth: fidl::encoding::Depth,
4463        ) -> fidl::Result<()> {
4464            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4465            // Zero out padding regions. There's no need to apply masks
4466            // because the unmasked parts will be overwritten by fields.
4467            // Write the fields.
4468            self.0.encode(encoder, offset + 0, depth)?;
4469            Ok(())
4470        }
4471    }
4472
4473    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4474        for EventWithDefaultRights
4475    {
4476        #[inline(always)]
4477        fn new_empty() -> Self {
4478            Self {
4479                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4480            }
4481        }
4482
4483        #[inline]
4484        unsafe fn decode(
4485            &mut self,
4486            decoder: &mut fidl::encoding::Decoder<
4487                '_,
4488                fidl::encoding::DefaultFuchsiaResourceDialect,
4489            >,
4490            offset: usize,
4491            _depth: fidl::encoding::Depth,
4492        ) -> fidl::Result<()> {
4493            decoder.debug_check_bounds::<Self>(offset);
4494            // Verify that padding bytes are zero.
4495            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4496            Ok(())
4497        }
4498    }
4499
4500    impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4501        type Borrowed<'a> = &'a mut Self;
4502        fn take_or_borrow<'a>(
4503            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4504        ) -> Self::Borrowed<'a> {
4505            value
4506        }
4507    }
4508
4509    unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4510        type Owned = Self;
4511
4512        #[inline(always)]
4513        fn inline_align(_context: fidl::encoding::Context) -> usize {
4514            4
4515        }
4516
4517        #[inline(always)]
4518        fn inline_size(_context: fidl::encoding::Context) -> usize {
4519            4
4520        }
4521    }
4522
4523    unsafe impl
4524        fidl::encoding::Encode<
4525            EventWithReducedRights,
4526            fidl::encoding::DefaultFuchsiaResourceDialect,
4527        > for &mut EventWithReducedRights
4528    {
4529        #[inline]
4530        unsafe fn encode(
4531            self,
4532            encoder: &mut fidl::encoding::Encoder<
4533                '_,
4534                fidl::encoding::DefaultFuchsiaResourceDialect,
4535            >,
4536            offset: usize,
4537            _depth: fidl::encoding::Depth,
4538        ) -> fidl::Result<()> {
4539            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4540            // Delegate to tuple encoding.
4541            fidl::encoding::Encode::<
4542                EventWithReducedRights,
4543                fidl::encoding::DefaultFuchsiaResourceDialect,
4544            >::encode(
4545                (<fidl::encoding::HandleType<
4546                    fidl::Event,
4547                    { fidl::ObjectType::EVENT.into_raw() },
4548                    49155,
4549                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4550                    &mut self.h
4551                ),),
4552                encoder,
4553                offset,
4554                _depth,
4555            )
4556        }
4557    }
4558    unsafe impl<
4559        T0: fidl::encoding::Encode<
4560                fidl::encoding::HandleType<
4561                    fidl::Event,
4562                    { fidl::ObjectType::EVENT.into_raw() },
4563                    49155,
4564                >,
4565                fidl::encoding::DefaultFuchsiaResourceDialect,
4566            >,
4567    >
4568        fidl::encoding::Encode<
4569            EventWithReducedRights,
4570            fidl::encoding::DefaultFuchsiaResourceDialect,
4571        > for (T0,)
4572    {
4573        #[inline]
4574        unsafe fn encode(
4575            self,
4576            encoder: &mut fidl::encoding::Encoder<
4577                '_,
4578                fidl::encoding::DefaultFuchsiaResourceDialect,
4579            >,
4580            offset: usize,
4581            depth: fidl::encoding::Depth,
4582        ) -> fidl::Result<()> {
4583            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4584            // Zero out padding regions. There's no need to apply masks
4585            // because the unmasked parts will be overwritten by fields.
4586            // Write the fields.
4587            self.0.encode(encoder, offset + 0, depth)?;
4588            Ok(())
4589        }
4590    }
4591
4592    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4593        for EventWithReducedRights
4594    {
4595        #[inline(always)]
4596        fn new_empty() -> Self {
4597            Self {
4598                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4599            }
4600        }
4601
4602        #[inline]
4603        unsafe fn decode(
4604            &mut self,
4605            decoder: &mut fidl::encoding::Decoder<
4606                '_,
4607                fidl::encoding::DefaultFuchsiaResourceDialect,
4608            >,
4609            offset: usize,
4610            _depth: fidl::encoding::Depth,
4611        ) -> fidl::Result<()> {
4612            decoder.debug_check_bounds::<Self>(offset);
4613            // Verify that padding bytes are zero.
4614            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4615            Ok(())
4616        }
4617    }
4618
4619    impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4620        type Borrowed<'a> = &'a mut Self;
4621        fn take_or_borrow<'a>(
4622            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4623        ) -> Self::Borrowed<'a> {
4624            value
4625        }
4626    }
4627
4628    unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4629        type Owned = Self;
4630
4631        #[inline(always)]
4632        fn inline_align(_context: fidl::encoding::Context) -> usize {
4633            8
4634        }
4635
4636        #[inline(always)]
4637        fn inline_size(_context: fidl::encoding::Context) -> usize {
4638            248
4639        }
4640    }
4641
4642    unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4643        for &mut FidlvizDemo
4644    {
4645        #[inline]
4646        unsafe fn encode(
4647            self,
4648            encoder: &mut fidl::encoding::Encoder<
4649                '_,
4650                fidl::encoding::DefaultFuchsiaResourceDialect,
4651            >,
4652            offset: usize,
4653            _depth: fidl::encoding::Depth,
4654        ) -> fidl::Result<()> {
4655            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4656            // Delegate to tuple encoding.
4657            fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4658                (
4659                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4660                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4661                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4662                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4663                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4664                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4665                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4666                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4667                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4668                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4669                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4670                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4671                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4672                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4673                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4674                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4675                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4676                    <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4677                    <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4678                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4679                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4680                    <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4681                    <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4682                    <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4683                    <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4684                    <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4685                    <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4686                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4687                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4688                    <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4689                    <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4690                ),
4691                encoder, offset, _depth
4692            )
4693        }
4694    }
4695    unsafe impl<
4696        T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4697        T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4698        T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4699        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4700        T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4701        T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4702        T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4703        T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4704        T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4705        T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4706        T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4707        T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4708        T12: fidl::encoding::Encode<
4709                fidl::encoding::UnboundedString,
4710                fidl::encoding::DefaultFuchsiaResourceDialect,
4711            >,
4712        T13: fidl::encoding::Encode<
4713                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4714                fidl::encoding::DefaultFuchsiaResourceDialect,
4715            >,
4716        T14: fidl::encoding::Encode<
4717                fidl::encoding::UnboundedString,
4718                fidl::encoding::DefaultFuchsiaResourceDialect,
4719            >,
4720        T15: fidl::encoding::Encode<
4721                fidl::encoding::Optional<
4722                    fidl::encoding::HandleType<
4723                        fidl::NullableHandle,
4724                        { fidl::ObjectType::NONE.into_raw() },
4725                        2147483648,
4726                    >,
4727                >,
4728                fidl::encoding::DefaultFuchsiaResourceDialect,
4729            >,
4730        T16: fidl::encoding::Encode<
4731                fidl::encoding::HandleType<
4732                    fidl::NullableHandle,
4733                    { fidl::ObjectType::NONE.into_raw() },
4734                    2147483648,
4735                >,
4736                fidl::encoding::DefaultFuchsiaResourceDialect,
4737            >,
4738        T17: fidl::encoding::Encode<
4739                fidl::encoding::Array<u8, 3>,
4740                fidl::encoding::DefaultFuchsiaResourceDialect,
4741            >,
4742        T18: fidl::encoding::Encode<
4743                fidl::encoding::UnboundedVector<f64>,
4744                fidl::encoding::DefaultFuchsiaResourceDialect,
4745            >,
4746        T19: fidl::encoding::Encode<
4747                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4748                fidl::encoding::DefaultFuchsiaResourceDialect,
4749            >,
4750        T20: fidl::encoding::Encode<
4751                fidl::encoding::UnboundedVector<u8>,
4752                fidl::encoding::DefaultFuchsiaResourceDialect,
4753            >,
4754        T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4755        T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4756        T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4757        T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4758        T25: fidl::encoding::Encode<
4759                fidl::encoding::Boxed<FidlvizStruct1>,
4760                fidl::encoding::DefaultFuchsiaResourceDialect,
4761            >,
4762        T26: fidl::encoding::Encode<
4763                fidl::encoding::Boxed<FidlvizStruct2>,
4764                fidl::encoding::DefaultFuchsiaResourceDialect,
4765            >,
4766        T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4767        T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4768        T29: fidl::encoding::Encode<
4769                fidl::encoding::OptionalUnion<FidlvizUnion>,
4770                fidl::encoding::DefaultFuchsiaResourceDialect,
4771            >,
4772        T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4773    > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4774        for (
4775            T0,
4776            T1,
4777            T2,
4778            T3,
4779            T4,
4780            T5,
4781            T6,
4782            T7,
4783            T8,
4784            T9,
4785            T10,
4786            T11,
4787            T12,
4788            T13,
4789            T14,
4790            T15,
4791            T16,
4792            T17,
4793            T18,
4794            T19,
4795            T20,
4796            T21,
4797            T22,
4798            T23,
4799            T24,
4800            T25,
4801            T26,
4802            T27,
4803            T28,
4804            T29,
4805            T30,
4806        )
4807    {
4808        #[inline]
4809        unsafe fn encode(
4810            self,
4811            encoder: &mut fidl::encoding::Encoder<
4812                '_,
4813                fidl::encoding::DefaultFuchsiaResourceDialect,
4814            >,
4815            offset: usize,
4816            depth: fidl::encoding::Depth,
4817        ) -> fidl::Result<()> {
4818            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4819            // Zero out padding regions. There's no need to apply masks
4820            // because the unmasked parts will be overwritten by fields.
4821            unsafe {
4822                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4823                (ptr as *mut u64).write_unaligned(0);
4824            }
4825            unsafe {
4826                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4827                (ptr as *mut u64).write_unaligned(0);
4828            }
4829            unsafe {
4830                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4831                (ptr as *mut u64).write_unaligned(0);
4832            }
4833            // Write the fields.
4834            self.0.encode(encoder, offset + 0, depth)?;
4835            self.1.encode(encoder, offset + 1, depth)?;
4836            self.2.encode(encoder, offset + 2, depth)?;
4837            self.3.encode(encoder, offset + 4, depth)?;
4838            self.4.encode(encoder, offset + 8, depth)?;
4839            self.5.encode(encoder, offset + 16, depth)?;
4840            self.6.encode(encoder, offset + 17, depth)?;
4841            self.7.encode(encoder, offset + 18, depth)?;
4842            self.8.encode(encoder, offset + 20, depth)?;
4843            self.9.encode(encoder, offset + 24, depth)?;
4844            self.10.encode(encoder, offset + 32, depth)?;
4845            self.11.encode(encoder, offset + 33, depth)?;
4846            self.12.encode(encoder, offset + 40, depth)?;
4847            self.13.encode(encoder, offset + 56, depth)?;
4848            self.14.encode(encoder, offset + 72, depth)?;
4849            self.15.encode(encoder, offset + 88, depth)?;
4850            self.16.encode(encoder, offset + 92, depth)?;
4851            self.17.encode(encoder, offset + 96, depth)?;
4852            self.18.encode(encoder, offset + 104, depth)?;
4853            self.19.encode(encoder, offset + 120, depth)?;
4854            self.20.encode(encoder, offset + 136, depth)?;
4855            self.21.encode(encoder, offset + 152, depth)?;
4856            self.22.encode(encoder, offset + 153, depth)?;
4857            self.23.encode(encoder, offset + 154, depth)?;
4858            self.24.encode(encoder, offset + 160, depth)?;
4859            self.25.encode(encoder, offset + 168, depth)?;
4860            self.26.encode(encoder, offset + 176, depth)?;
4861            self.27.encode(encoder, offset + 184, depth)?;
4862            self.28.encode(encoder, offset + 200, depth)?;
4863            self.29.encode(encoder, offset + 216, depth)?;
4864            self.30.encode(encoder, offset + 232, depth)?;
4865            Ok(())
4866        }
4867    }
4868
4869    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4870        #[inline(always)]
4871        fn new_empty() -> Self {
4872            Self {
4873                f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4874                f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4875                f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4876                f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4877                f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4878                f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4879                f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4880                f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4881                f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4882                f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4883                f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4884                f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4885                f13: fidl::new_empty!(
4886                    fidl::encoding::UnboundedString,
4887                    fidl::encoding::DefaultFuchsiaResourceDialect
4888                ),
4889                f14: fidl::new_empty!(
4890                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4891                    fidl::encoding::DefaultFuchsiaResourceDialect
4892                ),
4893                f15: fidl::new_empty!(
4894                    fidl::encoding::UnboundedString,
4895                    fidl::encoding::DefaultFuchsiaResourceDialect
4896                ),
4897                f16: fidl::new_empty!(
4898                    fidl::encoding::Optional<
4899                        fidl::encoding::HandleType<
4900                            fidl::NullableHandle,
4901                            { fidl::ObjectType::NONE.into_raw() },
4902                            2147483648,
4903                        >,
4904                    >,
4905                    fidl::encoding::DefaultFuchsiaResourceDialect
4906                ),
4907                f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4908                f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4909                f19: fidl::new_empty!(
4910                    fidl::encoding::UnboundedVector<f64>,
4911                    fidl::encoding::DefaultFuchsiaResourceDialect
4912                ),
4913                f20: fidl::new_empty!(
4914                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4915                    fidl::encoding::DefaultFuchsiaResourceDialect
4916                ),
4917                f21: fidl::new_empty!(
4918                    fidl::encoding::UnboundedVector<u8>,
4919                    fidl::encoding::DefaultFuchsiaResourceDialect
4920                ),
4921                f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4922                f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4923                f24: fidl::new_empty!(
4924                    FidlvizStruct1,
4925                    fidl::encoding::DefaultFuchsiaResourceDialect
4926                ),
4927                f25: fidl::new_empty!(
4928                    FidlvizStruct2,
4929                    fidl::encoding::DefaultFuchsiaResourceDialect
4930                ),
4931                f26: fidl::new_empty!(
4932                    fidl::encoding::Boxed<FidlvizStruct1>,
4933                    fidl::encoding::DefaultFuchsiaResourceDialect
4934                ),
4935                f27: fidl::new_empty!(
4936                    fidl::encoding::Boxed<FidlvizStruct2>,
4937                    fidl::encoding::DefaultFuchsiaResourceDialect
4938                ),
4939                f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4940                f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4941                f30: fidl::new_empty!(
4942                    fidl::encoding::OptionalUnion<FidlvizUnion>,
4943                    fidl::encoding::DefaultFuchsiaResourceDialect
4944                ),
4945                f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4946            }
4947        }
4948
4949        #[inline]
4950        unsafe fn decode(
4951            &mut self,
4952            decoder: &mut fidl::encoding::Decoder<
4953                '_,
4954                fidl::encoding::DefaultFuchsiaResourceDialect,
4955            >,
4956            offset: usize,
4957            _depth: fidl::encoding::Depth,
4958        ) -> fidl::Result<()> {
4959            decoder.debug_check_bounds::<Self>(offset);
4960            // Verify that padding bytes are zero.
4961            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4962            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4963            let mask = 0xffffffffffff0000u64;
4964            let maskedval = padval & mask;
4965            if maskedval != 0 {
4966                return Err(fidl::Error::NonZeroPadding {
4967                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4968                });
4969            }
4970            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4971            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4972            let mask = 0xffffffffff000000u64;
4973            let maskedval = padval & mask;
4974            if maskedval != 0 {
4975                return Err(fidl::Error::NonZeroPadding {
4976                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4977                });
4978            }
4979            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4980            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4981            let mask = 0xffffffffff000000u64;
4982            let maskedval = padval & mask;
4983            if maskedval != 0 {
4984                return Err(fidl::Error::NonZeroPadding {
4985                    padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4986                });
4987            }
4988            fidl::decode!(
4989                u8,
4990                fidl::encoding::DefaultFuchsiaResourceDialect,
4991                &mut self.f1,
4992                decoder,
4993                offset + 0,
4994                _depth
4995            )?;
4996            fidl::decode!(
4997                i8,
4998                fidl::encoding::DefaultFuchsiaResourceDialect,
4999                &mut self.f2,
5000                decoder,
5001                offset + 1,
5002                _depth
5003            )?;
5004            fidl::decode!(
5005                u16,
5006                fidl::encoding::DefaultFuchsiaResourceDialect,
5007                &mut self.f3,
5008                decoder,
5009                offset + 2,
5010                _depth
5011            )?;
5012            fidl::decode!(
5013                u32,
5014                fidl::encoding::DefaultFuchsiaResourceDialect,
5015                &mut self.f4,
5016                decoder,
5017                offset + 4,
5018                _depth
5019            )?;
5020            fidl::decode!(
5021                u64,
5022                fidl::encoding::DefaultFuchsiaResourceDialect,
5023                &mut self.f5,
5024                decoder,
5025                offset + 8,
5026                _depth
5027            )?;
5028            fidl::decode!(
5029                u8,
5030                fidl::encoding::DefaultFuchsiaResourceDialect,
5031                &mut self.f6,
5032                decoder,
5033                offset + 16,
5034                _depth
5035            )?;
5036            fidl::decode!(
5037                u8,
5038                fidl::encoding::DefaultFuchsiaResourceDialect,
5039                &mut self.f7,
5040                decoder,
5041                offset + 17,
5042                _depth
5043            )?;
5044            fidl::decode!(
5045                u16,
5046                fidl::encoding::DefaultFuchsiaResourceDialect,
5047                &mut self.f8,
5048                decoder,
5049                offset + 18,
5050                _depth
5051            )?;
5052            fidl::decode!(
5053                f32,
5054                fidl::encoding::DefaultFuchsiaResourceDialect,
5055                &mut self.f9,
5056                decoder,
5057                offset + 20,
5058                _depth
5059            )?;
5060            fidl::decode!(
5061                f64,
5062                fidl::encoding::DefaultFuchsiaResourceDialect,
5063                &mut self.f10,
5064                decoder,
5065                offset + 24,
5066                _depth
5067            )?;
5068            fidl::decode!(
5069                bool,
5070                fidl::encoding::DefaultFuchsiaResourceDialect,
5071                &mut self.f11,
5072                decoder,
5073                offset + 32,
5074                _depth
5075            )?;
5076            fidl::decode!(
5077                bool,
5078                fidl::encoding::DefaultFuchsiaResourceDialect,
5079                &mut self.f12,
5080                decoder,
5081                offset + 33,
5082                _depth
5083            )?;
5084            fidl::decode!(
5085                fidl::encoding::UnboundedString,
5086                fidl::encoding::DefaultFuchsiaResourceDialect,
5087                &mut self.f13,
5088                decoder,
5089                offset + 40,
5090                _depth
5091            )?;
5092            fidl::decode!(
5093                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5094                fidl::encoding::DefaultFuchsiaResourceDialect,
5095                &mut self.f14,
5096                decoder,
5097                offset + 56,
5098                _depth
5099            )?;
5100            fidl::decode!(
5101                fidl::encoding::UnboundedString,
5102                fidl::encoding::DefaultFuchsiaResourceDialect,
5103                &mut self.f15,
5104                decoder,
5105                offset + 72,
5106                _depth
5107            )?;
5108            fidl::decode!(
5109                fidl::encoding::Optional<
5110                    fidl::encoding::HandleType<
5111                        fidl::NullableHandle,
5112                        { fidl::ObjectType::NONE.into_raw() },
5113                        2147483648,
5114                    >,
5115                >,
5116                fidl::encoding::DefaultFuchsiaResourceDialect,
5117                &mut self.f16,
5118                decoder,
5119                offset + 88,
5120                _depth
5121            )?;
5122            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5123            fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5124            fidl::decode!(
5125                fidl::encoding::UnboundedVector<f64>,
5126                fidl::encoding::DefaultFuchsiaResourceDialect,
5127                &mut self.f19,
5128                decoder,
5129                offset + 104,
5130                _depth
5131            )?;
5132            fidl::decode!(
5133                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5134                fidl::encoding::DefaultFuchsiaResourceDialect,
5135                &mut self.f20,
5136                decoder,
5137                offset + 120,
5138                _depth
5139            )?;
5140            fidl::decode!(
5141                fidl::encoding::UnboundedVector<u8>,
5142                fidl::encoding::DefaultFuchsiaResourceDialect,
5143                &mut self.f21,
5144                decoder,
5145                offset + 136,
5146                _depth
5147            )?;
5148            fidl::decode!(
5149                FidlvizBits,
5150                fidl::encoding::DefaultFuchsiaResourceDialect,
5151                &mut self.f22,
5152                decoder,
5153                offset + 152,
5154                _depth
5155            )?;
5156            fidl::decode!(
5157                FidlvizEnum,
5158                fidl::encoding::DefaultFuchsiaResourceDialect,
5159                &mut self.f23,
5160                decoder,
5161                offset + 153,
5162                _depth
5163            )?;
5164            fidl::decode!(
5165                FidlvizStruct1,
5166                fidl::encoding::DefaultFuchsiaResourceDialect,
5167                &mut self.f24,
5168                decoder,
5169                offset + 154,
5170                _depth
5171            )?;
5172            fidl::decode!(
5173                FidlvizStruct2,
5174                fidl::encoding::DefaultFuchsiaResourceDialect,
5175                &mut self.f25,
5176                decoder,
5177                offset + 160,
5178                _depth
5179            )?;
5180            fidl::decode!(
5181                fidl::encoding::Boxed<FidlvizStruct1>,
5182                fidl::encoding::DefaultFuchsiaResourceDialect,
5183                &mut self.f26,
5184                decoder,
5185                offset + 168,
5186                _depth
5187            )?;
5188            fidl::decode!(
5189                fidl::encoding::Boxed<FidlvizStruct2>,
5190                fidl::encoding::DefaultFuchsiaResourceDialect,
5191                &mut self.f27,
5192                decoder,
5193                offset + 176,
5194                _depth
5195            )?;
5196            fidl::decode!(
5197                FidlvizTable,
5198                fidl::encoding::DefaultFuchsiaResourceDialect,
5199                &mut self.f28,
5200                decoder,
5201                offset + 184,
5202                _depth
5203            )?;
5204            fidl::decode!(
5205                FidlvizTable,
5206                fidl::encoding::DefaultFuchsiaResourceDialect,
5207                &mut self.f29,
5208                decoder,
5209                offset + 200,
5210                _depth
5211            )?;
5212            fidl::decode!(
5213                fidl::encoding::OptionalUnion<FidlvizUnion>,
5214                fidl::encoding::DefaultFuchsiaResourceDialect,
5215                &mut self.f30,
5216                decoder,
5217                offset + 216,
5218                _depth
5219            )?;
5220            fidl::decode!(
5221                FidlvizUnion,
5222                fidl::encoding::DefaultFuchsiaResourceDialect,
5223                &mut self.f31,
5224                decoder,
5225                offset + 232,
5226                _depth
5227            )?;
5228            Ok(())
5229        }
5230    }
5231
5232    impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5233        type Borrowed<'a> = &'a mut Self;
5234        fn take_or_borrow<'a>(
5235            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5236        ) -> Self::Borrowed<'a> {
5237            value
5238        }
5239    }
5240
5241    unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5242        type Owned = Self;
5243
5244        #[inline(always)]
5245        fn inline_align(_context: fidl::encoding::Context) -> usize {
5246            4
5247        }
5248
5249        #[inline(always)]
5250        fn inline_size(_context: fidl::encoding::Context) -> usize {
5251            4
5252        }
5253    }
5254
5255    unsafe impl
5256        fidl::encoding::Encode<
5257            GoldenHandleBasicRightsStruct,
5258            fidl::encoding::DefaultFuchsiaResourceDialect,
5259        > for &mut GoldenHandleBasicRightsStruct
5260    {
5261        #[inline]
5262        unsafe fn encode(
5263            self,
5264            encoder: &mut fidl::encoding::Encoder<
5265                '_,
5266                fidl::encoding::DefaultFuchsiaResourceDialect,
5267            >,
5268            offset: usize,
5269            _depth: fidl::encoding::Depth,
5270        ) -> fidl::Result<()> {
5271            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5272            // Delegate to tuple encoding.
5273            fidl::encoding::Encode::<
5274                GoldenHandleBasicRightsStruct,
5275                fidl::encoding::DefaultFuchsiaResourceDialect,
5276            >::encode(
5277                (<fidl::encoding::HandleType<
5278                    fidl::Event,
5279                    { fidl::ObjectType::EVENT.into_raw() },
5280                    49155,
5281                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5282                    &mut self.v
5283                ),),
5284                encoder,
5285                offset,
5286                _depth,
5287            )
5288        }
5289    }
5290    unsafe impl<
5291        T0: fidl::encoding::Encode<
5292                fidl::encoding::HandleType<
5293                    fidl::Event,
5294                    { fidl::ObjectType::EVENT.into_raw() },
5295                    49155,
5296                >,
5297                fidl::encoding::DefaultFuchsiaResourceDialect,
5298            >,
5299    >
5300        fidl::encoding::Encode<
5301            GoldenHandleBasicRightsStruct,
5302            fidl::encoding::DefaultFuchsiaResourceDialect,
5303        > for (T0,)
5304    {
5305        #[inline]
5306        unsafe fn encode(
5307            self,
5308            encoder: &mut fidl::encoding::Encoder<
5309                '_,
5310                fidl::encoding::DefaultFuchsiaResourceDialect,
5311            >,
5312            offset: usize,
5313            depth: fidl::encoding::Depth,
5314        ) -> fidl::Result<()> {
5315            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5316            // Zero out padding regions. There's no need to apply masks
5317            // because the unmasked parts will be overwritten by fields.
5318            // Write the fields.
5319            self.0.encode(encoder, offset + 0, depth)?;
5320            Ok(())
5321        }
5322    }
5323
5324    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5325        for GoldenHandleBasicRightsStruct
5326    {
5327        #[inline(always)]
5328        fn new_empty() -> Self {
5329            Self {
5330                v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5331            }
5332        }
5333
5334        #[inline]
5335        unsafe fn decode(
5336            &mut self,
5337            decoder: &mut fidl::encoding::Decoder<
5338                '_,
5339                fidl::encoding::DefaultFuchsiaResourceDialect,
5340            >,
5341            offset: usize,
5342            _depth: fidl::encoding::Depth,
5343        ) -> fidl::Result<()> {
5344            decoder.debug_check_bounds::<Self>(offset);
5345            // Verify that padding bytes are zero.
5346            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5347            Ok(())
5348        }
5349    }
5350
5351    impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5352        type Borrowed<'a> = &'a mut Self;
5353        fn take_or_borrow<'a>(
5354            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5355        ) -> Self::Borrowed<'a> {
5356            value
5357        }
5358    }
5359
5360    unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5361        type Owned = Self;
5362
5363        #[inline(always)]
5364        fn inline_align(_context: fidl::encoding::Context) -> usize {
5365            4
5366        }
5367
5368        #[inline(always)]
5369        fn inline_size(_context: fidl::encoding::Context) -> usize {
5370            4
5371        }
5372    }
5373
5374    unsafe impl
5375        fidl::encoding::Encode<
5376            GoldenNullableHandleStruct,
5377            fidl::encoding::DefaultFuchsiaResourceDialect,
5378        > for &mut GoldenNullableHandleStruct
5379    {
5380        #[inline]
5381        unsafe fn encode(
5382            self,
5383            encoder: &mut fidl::encoding::Encoder<
5384                '_,
5385                fidl::encoding::DefaultFuchsiaResourceDialect,
5386            >,
5387            offset: usize,
5388            _depth: fidl::encoding::Depth,
5389        ) -> fidl::Result<()> {
5390            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5391            // Delegate to tuple encoding.
5392            fidl::encoding::Encode::<
5393                GoldenNullableHandleStruct,
5394                fidl::encoding::DefaultFuchsiaResourceDialect,
5395            >::encode(
5396                (<fidl::encoding::Optional<
5397                    fidl::encoding::HandleType<
5398                        fidl::NullableHandle,
5399                        { fidl::ObjectType::NONE.into_raw() },
5400                        2147483648,
5401                    >,
5402                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5403                    &mut self.v
5404                ),),
5405                encoder,
5406                offset,
5407                _depth,
5408            )
5409        }
5410    }
5411    unsafe impl<
5412        T0: fidl::encoding::Encode<
5413                fidl::encoding::Optional<
5414                    fidl::encoding::HandleType<
5415                        fidl::NullableHandle,
5416                        { fidl::ObjectType::NONE.into_raw() },
5417                        2147483648,
5418                    >,
5419                >,
5420                fidl::encoding::DefaultFuchsiaResourceDialect,
5421            >,
5422    >
5423        fidl::encoding::Encode<
5424            GoldenNullableHandleStruct,
5425            fidl::encoding::DefaultFuchsiaResourceDialect,
5426        > for (T0,)
5427    {
5428        #[inline]
5429        unsafe fn encode(
5430            self,
5431            encoder: &mut fidl::encoding::Encoder<
5432                '_,
5433                fidl::encoding::DefaultFuchsiaResourceDialect,
5434            >,
5435            offset: usize,
5436            depth: fidl::encoding::Depth,
5437        ) -> fidl::Result<()> {
5438            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5439            // Zero out padding regions. There's no need to apply masks
5440            // because the unmasked parts will be overwritten by fields.
5441            // Write the fields.
5442            self.0.encode(encoder, offset + 0, depth)?;
5443            Ok(())
5444        }
5445    }
5446
5447    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5448        for GoldenNullableHandleStruct
5449    {
5450        #[inline(always)]
5451        fn new_empty() -> Self {
5452            Self {
5453                v: fidl::new_empty!(
5454                    fidl::encoding::Optional<
5455                        fidl::encoding::HandleType<
5456                            fidl::NullableHandle,
5457                            { fidl::ObjectType::NONE.into_raw() },
5458                            2147483648,
5459                        >,
5460                    >,
5461                    fidl::encoding::DefaultFuchsiaResourceDialect
5462                ),
5463            }
5464        }
5465
5466        #[inline]
5467        unsafe fn decode(
5468            &mut self,
5469            decoder: &mut fidl::encoding::Decoder<
5470                '_,
5471                fidl::encoding::DefaultFuchsiaResourceDialect,
5472            >,
5473            offset: usize,
5474            _depth: fidl::encoding::Depth,
5475        ) -> fidl::Result<()> {
5476            decoder.debug_check_bounds::<Self>(offset);
5477            // Verify that padding bytes are zero.
5478            fidl::decode!(
5479                fidl::encoding::Optional<
5480                    fidl::encoding::HandleType<
5481                        fidl::NullableHandle,
5482                        { fidl::ObjectType::NONE.into_raw() },
5483                        2147483648,
5484                    >,
5485                >,
5486                fidl::encoding::DefaultFuchsiaResourceDialect,
5487                &mut self.v,
5488                decoder,
5489                offset + 0,
5490                _depth
5491            )?;
5492            Ok(())
5493        }
5494    }
5495
5496    impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5497        type Borrowed<'a> = &'a mut Self;
5498        fn take_or_borrow<'a>(
5499            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5500        ) -> Self::Borrowed<'a> {
5501            value
5502        }
5503    }
5504
5505    unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5506        type Owned = Self;
5507
5508        #[inline(always)]
5509        fn inline_align(_context: fidl::encoding::Context) -> usize {
5510            8
5511        }
5512
5513        #[inline(always)]
5514        fn inline_size(_context: fidl::encoding::Context) -> usize {
5515            72
5516        }
5517    }
5518
5519    unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5520        for &mut LaunchInfo
5521    {
5522        #[inline]
5523        unsafe fn encode(
5524            self,
5525            encoder: &mut fidl::encoding::Encoder<
5526                '_,
5527                fidl::encoding::DefaultFuchsiaResourceDialect,
5528            >,
5529            offset: usize,
5530            _depth: fidl::encoding::Depth,
5531        ) -> fidl::Result<()> {
5532            encoder.debug_check_bounds::<LaunchInfo>(offset);
5533            // Delegate to tuple encoding.
5534            fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5535                (
5536                    <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5537                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5538                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5539                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5540                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.directory_request),
5541                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5542                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5543                ),
5544                encoder, offset, _depth
5545            )
5546        }
5547    }
5548    unsafe impl<
5549        T0: fidl::encoding::Encode<
5550                fidl::encoding::BoundedString<200>,
5551                fidl::encoding::DefaultFuchsiaResourceDialect,
5552            >,
5553        T1: fidl::encoding::Encode<
5554                fidl::encoding::Optional<
5555                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5556                >,
5557                fidl::encoding::DefaultFuchsiaResourceDialect,
5558            >,
5559        T2: fidl::encoding::Encode<
5560                fidl::encoding::Boxed<TransformerEmptyStruct>,
5561                fidl::encoding::DefaultFuchsiaResourceDialect,
5562            >,
5563        T3: fidl::encoding::Encode<
5564                fidl::encoding::Boxed<TransformerEmptyStruct>,
5565                fidl::encoding::DefaultFuchsiaResourceDialect,
5566            >,
5567        T4: fidl::encoding::Encode<
5568                fidl::encoding::Optional<
5569                    fidl::encoding::HandleType<
5570                        fidl::Channel,
5571                        { fidl::ObjectType::CHANNEL.into_raw() },
5572                        2147483648,
5573                    >,
5574                >,
5575                fidl::encoding::DefaultFuchsiaResourceDialect,
5576            >,
5577        T5: fidl::encoding::Encode<
5578                fidl::encoding::Boxed<TransformerEmptyStruct>,
5579                fidl::encoding::DefaultFuchsiaResourceDialect,
5580            >,
5581        T6: fidl::encoding::Encode<
5582                fidl::encoding::Boxed<TransformerEmptyStruct>,
5583                fidl::encoding::DefaultFuchsiaResourceDialect,
5584            >,
5585    > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5586        for (T0, T1, T2, T3, T4, T5, T6)
5587    {
5588        #[inline]
5589        unsafe fn encode(
5590            self,
5591            encoder: &mut fidl::encoding::Encoder<
5592                '_,
5593                fidl::encoding::DefaultFuchsiaResourceDialect,
5594            >,
5595            offset: usize,
5596            depth: fidl::encoding::Depth,
5597        ) -> fidl::Result<()> {
5598            encoder.debug_check_bounds::<LaunchInfo>(offset);
5599            // Zero out padding regions. There's no need to apply masks
5600            // because the unmasked parts will be overwritten by fields.
5601            unsafe {
5602                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5603                (ptr as *mut u64).write_unaligned(0);
5604            }
5605            // Write the fields.
5606            self.0.encode(encoder, offset + 0, depth)?;
5607            self.1.encode(encoder, offset + 16, depth)?;
5608            self.2.encode(encoder, offset + 32, depth)?;
5609            self.3.encode(encoder, offset + 40, depth)?;
5610            self.4.encode(encoder, offset + 48, depth)?;
5611            self.5.encode(encoder, offset + 56, depth)?;
5612            self.6.encode(encoder, offset + 64, depth)?;
5613            Ok(())
5614        }
5615    }
5616
5617    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5618        #[inline(always)]
5619        fn new_empty() -> Self {
5620            Self {
5621                url: fidl::new_empty!(
5622                    fidl::encoding::BoundedString<200>,
5623                    fidl::encoding::DefaultFuchsiaResourceDialect
5624                ),
5625                arguments: fidl::new_empty!(
5626                    fidl::encoding::Optional<
5627                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5628                    >,
5629                    fidl::encoding::DefaultFuchsiaResourceDialect
5630                ),
5631                out: fidl::new_empty!(
5632                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5633                    fidl::encoding::DefaultFuchsiaResourceDialect
5634                ),
5635                err: fidl::new_empty!(
5636                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5637                    fidl::encoding::DefaultFuchsiaResourceDialect
5638                ),
5639                directory_request: fidl::new_empty!(
5640                    fidl::encoding::Optional<
5641                        fidl::encoding::HandleType<
5642                            fidl::Channel,
5643                            { fidl::ObjectType::CHANNEL.into_raw() },
5644                            2147483648,
5645                        >,
5646                    >,
5647                    fidl::encoding::DefaultFuchsiaResourceDialect
5648                ),
5649                flat_namespace: fidl::new_empty!(
5650                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5651                    fidl::encoding::DefaultFuchsiaResourceDialect
5652                ),
5653                additional_services: fidl::new_empty!(
5654                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5655                    fidl::encoding::DefaultFuchsiaResourceDialect
5656                ),
5657            }
5658        }
5659
5660        #[inline]
5661        unsafe fn decode(
5662            &mut self,
5663            decoder: &mut fidl::encoding::Decoder<
5664                '_,
5665                fidl::encoding::DefaultFuchsiaResourceDialect,
5666            >,
5667            offset: usize,
5668            _depth: fidl::encoding::Depth,
5669        ) -> fidl::Result<()> {
5670            decoder.debug_check_bounds::<Self>(offset);
5671            // Verify that padding bytes are zero.
5672            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5673            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5674            let mask = 0xffffffff00000000u64;
5675            let maskedval = padval & mask;
5676            if maskedval != 0 {
5677                return Err(fidl::Error::NonZeroPadding {
5678                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5679                });
5680            }
5681            fidl::decode!(
5682                fidl::encoding::BoundedString<200>,
5683                fidl::encoding::DefaultFuchsiaResourceDialect,
5684                &mut self.url,
5685                decoder,
5686                offset + 0,
5687                _depth
5688            )?;
5689            fidl::decode!(
5690                fidl::encoding::Optional<
5691                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5692                >,
5693                fidl::encoding::DefaultFuchsiaResourceDialect,
5694                &mut self.arguments,
5695                decoder,
5696                offset + 16,
5697                _depth
5698            )?;
5699            fidl::decode!(
5700                fidl::encoding::Boxed<TransformerEmptyStruct>,
5701                fidl::encoding::DefaultFuchsiaResourceDialect,
5702                &mut self.out,
5703                decoder,
5704                offset + 32,
5705                _depth
5706            )?;
5707            fidl::decode!(
5708                fidl::encoding::Boxed<TransformerEmptyStruct>,
5709                fidl::encoding::DefaultFuchsiaResourceDialect,
5710                &mut self.err,
5711                decoder,
5712                offset + 40,
5713                _depth
5714            )?;
5715            fidl::decode!(
5716                fidl::encoding::Optional<
5717                    fidl::encoding::HandleType<
5718                        fidl::Channel,
5719                        { fidl::ObjectType::CHANNEL.into_raw() },
5720                        2147483648,
5721                    >,
5722                >,
5723                fidl::encoding::DefaultFuchsiaResourceDialect,
5724                &mut self.directory_request,
5725                decoder,
5726                offset + 48,
5727                _depth
5728            )?;
5729            fidl::decode!(
5730                fidl::encoding::Boxed<TransformerEmptyStruct>,
5731                fidl::encoding::DefaultFuchsiaResourceDialect,
5732                &mut self.flat_namespace,
5733                decoder,
5734                offset + 56,
5735                _depth
5736            )?;
5737            fidl::decode!(
5738                fidl::encoding::Boxed<TransformerEmptyStruct>,
5739                fidl::encoding::DefaultFuchsiaResourceDialect,
5740                &mut self.additional_services,
5741                decoder,
5742                offset + 64,
5743                _depth
5744            )?;
5745            Ok(())
5746        }
5747    }
5748
5749    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5750        type Borrowed<'a> = &'a mut Self;
5751        fn take_or_borrow<'a>(
5752            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5753        ) -> Self::Borrowed<'a> {
5754            value
5755        }
5756    }
5757
5758    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5759        type Owned = Self;
5760
5761        #[inline(always)]
5762        fn inline_align(_context: fidl::encoding::Context) -> usize {
5763            8
5764        }
5765
5766        #[inline(always)]
5767        fn inline_size(_context: fidl::encoding::Context) -> usize {
5768            32
5769        }
5770    }
5771
5772    unsafe impl
5773        fidl::encoding::Encode<
5774            MultipleBoundedNonnullableVectorsOfHandles,
5775            fidl::encoding::DefaultFuchsiaResourceDialect,
5776        > for &mut MultipleBoundedNonnullableVectorsOfHandles
5777    {
5778        #[inline]
5779        unsafe fn encode(
5780            self,
5781            encoder: &mut fidl::encoding::Encoder<
5782                '_,
5783                fidl::encoding::DefaultFuchsiaResourceDialect,
5784            >,
5785            offset: usize,
5786            _depth: fidl::encoding::Depth,
5787        ) -> fidl::Result<()> {
5788            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5789            // Delegate to tuple encoding.
5790            fidl::encoding::Encode::<
5791                MultipleBoundedNonnullableVectorsOfHandles,
5792                fidl::encoding::DefaultFuchsiaResourceDialect,
5793            >::encode(
5794                (
5795                    <fidl::encoding::Vector<
5796                        fidl::encoding::HandleType<
5797                            fidl::NullableHandle,
5798                            { fidl::ObjectType::NONE.into_raw() },
5799                            2147483648,
5800                        >,
5801                        2,
5802                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5803                        &mut self.vh0
5804                    ),
5805                    <fidl::encoding::Vector<
5806                        fidl::encoding::HandleType<
5807                            fidl::NullableHandle,
5808                            { fidl::ObjectType::NONE.into_raw() },
5809                            2147483648,
5810                        >,
5811                        32,
5812                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5813                        &mut self.vh1
5814                    ),
5815                ),
5816                encoder,
5817                offset,
5818                _depth,
5819            )
5820        }
5821    }
5822    unsafe impl<
5823        T0: fidl::encoding::Encode<
5824                fidl::encoding::Vector<
5825                    fidl::encoding::HandleType<
5826                        fidl::NullableHandle,
5827                        { fidl::ObjectType::NONE.into_raw() },
5828                        2147483648,
5829                    >,
5830                    2,
5831                >,
5832                fidl::encoding::DefaultFuchsiaResourceDialect,
5833            >,
5834        T1: fidl::encoding::Encode<
5835                fidl::encoding::Vector<
5836                    fidl::encoding::HandleType<
5837                        fidl::NullableHandle,
5838                        { fidl::ObjectType::NONE.into_raw() },
5839                        2147483648,
5840                    >,
5841                    32,
5842                >,
5843                fidl::encoding::DefaultFuchsiaResourceDialect,
5844            >,
5845    >
5846        fidl::encoding::Encode<
5847            MultipleBoundedNonnullableVectorsOfHandles,
5848            fidl::encoding::DefaultFuchsiaResourceDialect,
5849        > for (T0, T1)
5850    {
5851        #[inline]
5852        unsafe fn encode(
5853            self,
5854            encoder: &mut fidl::encoding::Encoder<
5855                '_,
5856                fidl::encoding::DefaultFuchsiaResourceDialect,
5857            >,
5858            offset: usize,
5859            depth: fidl::encoding::Depth,
5860        ) -> fidl::Result<()> {
5861            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5862            // Zero out padding regions. There's no need to apply masks
5863            // because the unmasked parts will be overwritten by fields.
5864            // Write the fields.
5865            self.0.encode(encoder, offset + 0, depth)?;
5866            self.1.encode(encoder, offset + 16, depth)?;
5867            Ok(())
5868        }
5869    }
5870
5871    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5872        for MultipleBoundedNonnullableVectorsOfHandles
5873    {
5874        #[inline(always)]
5875        fn new_empty() -> Self {
5876            Self {
5877                vh0: fidl::new_empty!(
5878                    fidl::encoding::Vector<
5879                        fidl::encoding::HandleType<
5880                            fidl::NullableHandle,
5881                            { fidl::ObjectType::NONE.into_raw() },
5882                            2147483648,
5883                        >,
5884                        2,
5885                    >,
5886                    fidl::encoding::DefaultFuchsiaResourceDialect
5887                ),
5888                vh1: fidl::new_empty!(
5889                    fidl::encoding::Vector<
5890                        fidl::encoding::HandleType<
5891                            fidl::NullableHandle,
5892                            { fidl::ObjectType::NONE.into_raw() },
5893                            2147483648,
5894                        >,
5895                        32,
5896                    >,
5897                    fidl::encoding::DefaultFuchsiaResourceDialect
5898                ),
5899            }
5900        }
5901
5902        #[inline]
5903        unsafe fn decode(
5904            &mut self,
5905            decoder: &mut fidl::encoding::Decoder<
5906                '_,
5907                fidl::encoding::DefaultFuchsiaResourceDialect,
5908            >,
5909            offset: usize,
5910            _depth: fidl::encoding::Depth,
5911        ) -> fidl::Result<()> {
5912            decoder.debug_check_bounds::<Self>(offset);
5913            // Verify that padding bytes are zero.
5914            fidl::decode!(
5915                fidl::encoding::Vector<
5916                    fidl::encoding::HandleType<
5917                        fidl::NullableHandle,
5918                        { fidl::ObjectType::NONE.into_raw() },
5919                        2147483648,
5920                    >,
5921                    2,
5922                >,
5923                fidl::encoding::DefaultFuchsiaResourceDialect,
5924                &mut self.vh0,
5925                decoder,
5926                offset + 0,
5927                _depth
5928            )?;
5929            fidl::decode!(
5930                fidl::encoding::Vector<
5931                    fidl::encoding::HandleType<
5932                        fidl::NullableHandle,
5933                        { fidl::ObjectType::NONE.into_raw() },
5934                        2147483648,
5935                    >,
5936                    32,
5937                >,
5938                fidl::encoding::DefaultFuchsiaResourceDialect,
5939                &mut self.vh1,
5940                decoder,
5941                offset + 16,
5942                _depth
5943            )?;
5944            Ok(())
5945        }
5946    }
5947
5948    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5949        type Borrowed<'a> = &'a mut Self;
5950        fn take_or_borrow<'a>(
5951            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5952        ) -> Self::Borrowed<'a> {
5953            value
5954        }
5955    }
5956
5957    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5958        type Owned = Self;
5959
5960        #[inline(always)]
5961        fn inline_align(_context: fidl::encoding::Context) -> usize {
5962            8
5963        }
5964
5965        #[inline(always)]
5966        fn inline_size(_context: fidl::encoding::Context) -> usize {
5967            32
5968        }
5969    }
5970
5971    unsafe impl
5972        fidl::encoding::Encode<
5973            MultipleBoundedNullableVectorsOfHandles,
5974            fidl::encoding::DefaultFuchsiaResourceDialect,
5975        > for &mut MultipleBoundedNullableVectorsOfHandles
5976    {
5977        #[inline]
5978        unsafe fn encode(
5979            self,
5980            encoder: &mut fidl::encoding::Encoder<
5981                '_,
5982                fidl::encoding::DefaultFuchsiaResourceDialect,
5983            >,
5984            offset: usize,
5985            _depth: fidl::encoding::Depth,
5986        ) -> fidl::Result<()> {
5987            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
5988            // Delegate to tuple encoding.
5989            fidl::encoding::Encode::<
5990                MultipleBoundedNullableVectorsOfHandles,
5991                fidl::encoding::DefaultFuchsiaResourceDialect,
5992            >::encode(
5993                (
5994                    <fidl::encoding::Optional<
5995                        fidl::encoding::Vector<
5996                            fidl::encoding::HandleType<
5997                                fidl::NullableHandle,
5998                                { fidl::ObjectType::NONE.into_raw() },
5999                                2147483648,
6000                            >,
6001                            2,
6002                        >,
6003                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6004                        &mut self.vh0
6005                    ),
6006                    <fidl::encoding::Optional<
6007                        fidl::encoding::Vector<
6008                            fidl::encoding::HandleType<
6009                                fidl::NullableHandle,
6010                                { fidl::ObjectType::NONE.into_raw() },
6011                                2147483648,
6012                            >,
6013                            32,
6014                        >,
6015                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6016                        &mut self.vh1
6017                    ),
6018                ),
6019                encoder,
6020                offset,
6021                _depth,
6022            )
6023        }
6024    }
6025    unsafe impl<
6026        T0: fidl::encoding::Encode<
6027                fidl::encoding::Optional<
6028                    fidl::encoding::Vector<
6029                        fidl::encoding::HandleType<
6030                            fidl::NullableHandle,
6031                            { fidl::ObjectType::NONE.into_raw() },
6032                            2147483648,
6033                        >,
6034                        2,
6035                    >,
6036                >,
6037                fidl::encoding::DefaultFuchsiaResourceDialect,
6038            >,
6039        T1: fidl::encoding::Encode<
6040                fidl::encoding::Optional<
6041                    fidl::encoding::Vector<
6042                        fidl::encoding::HandleType<
6043                            fidl::NullableHandle,
6044                            { fidl::ObjectType::NONE.into_raw() },
6045                            2147483648,
6046                        >,
6047                        32,
6048                    >,
6049                >,
6050                fidl::encoding::DefaultFuchsiaResourceDialect,
6051            >,
6052    >
6053        fidl::encoding::Encode<
6054            MultipleBoundedNullableVectorsOfHandles,
6055            fidl::encoding::DefaultFuchsiaResourceDialect,
6056        > for (T0, T1)
6057    {
6058        #[inline]
6059        unsafe fn encode(
6060            self,
6061            encoder: &mut fidl::encoding::Encoder<
6062                '_,
6063                fidl::encoding::DefaultFuchsiaResourceDialect,
6064            >,
6065            offset: usize,
6066            depth: fidl::encoding::Depth,
6067        ) -> fidl::Result<()> {
6068            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6069            // Zero out padding regions. There's no need to apply masks
6070            // because the unmasked parts will be overwritten by fields.
6071            // Write the fields.
6072            self.0.encode(encoder, offset + 0, depth)?;
6073            self.1.encode(encoder, offset + 16, depth)?;
6074            Ok(())
6075        }
6076    }
6077
6078    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6079        for MultipleBoundedNullableVectorsOfHandles
6080    {
6081        #[inline(always)]
6082        fn new_empty() -> Self {
6083            Self {
6084                vh0: fidl::new_empty!(
6085                    fidl::encoding::Optional<
6086                        fidl::encoding::Vector<
6087                            fidl::encoding::HandleType<
6088                                fidl::NullableHandle,
6089                                { fidl::ObjectType::NONE.into_raw() },
6090                                2147483648,
6091                            >,
6092                            2,
6093                        >,
6094                    >,
6095                    fidl::encoding::DefaultFuchsiaResourceDialect
6096                ),
6097                vh1: fidl::new_empty!(
6098                    fidl::encoding::Optional<
6099                        fidl::encoding::Vector<
6100                            fidl::encoding::HandleType<
6101                                fidl::NullableHandle,
6102                                { fidl::ObjectType::NONE.into_raw() },
6103                                2147483648,
6104                            >,
6105                            32,
6106                        >,
6107                    >,
6108                    fidl::encoding::DefaultFuchsiaResourceDialect
6109                ),
6110            }
6111        }
6112
6113        #[inline]
6114        unsafe fn decode(
6115            &mut self,
6116            decoder: &mut fidl::encoding::Decoder<
6117                '_,
6118                fidl::encoding::DefaultFuchsiaResourceDialect,
6119            >,
6120            offset: usize,
6121            _depth: fidl::encoding::Depth,
6122        ) -> fidl::Result<()> {
6123            decoder.debug_check_bounds::<Self>(offset);
6124            // Verify that padding bytes are zero.
6125            fidl::decode!(
6126                fidl::encoding::Optional<
6127                    fidl::encoding::Vector<
6128                        fidl::encoding::HandleType<
6129                            fidl::NullableHandle,
6130                            { fidl::ObjectType::NONE.into_raw() },
6131                            2147483648,
6132                        >,
6133                        2,
6134                    >,
6135                >,
6136                fidl::encoding::DefaultFuchsiaResourceDialect,
6137                &mut self.vh0,
6138                decoder,
6139                offset + 0,
6140                _depth
6141            )?;
6142            fidl::decode!(
6143                fidl::encoding::Optional<
6144                    fidl::encoding::Vector<
6145                        fidl::encoding::HandleType<
6146                            fidl::NullableHandle,
6147                            { fidl::ObjectType::NONE.into_raw() },
6148                            2147483648,
6149                        >,
6150                        32,
6151                    >,
6152                >,
6153                fidl::encoding::DefaultFuchsiaResourceDialect,
6154                &mut self.vh1,
6155                decoder,
6156                offset + 16,
6157                _depth
6158            )?;
6159            Ok(())
6160        }
6161    }
6162
6163    impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6164        type Borrowed<'a> = &'a mut Self;
6165        fn take_or_borrow<'a>(
6166            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6167        ) -> Self::Borrowed<'a> {
6168            value
6169        }
6170    }
6171
6172    unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6173        type Owned = Self;
6174
6175        #[inline(always)]
6176        fn inline_align(_context: fidl::encoding::Context) -> usize {
6177            4
6178        }
6179
6180        #[inline(always)]
6181        fn inline_size(_context: fidl::encoding::Context) -> usize {
6182            12
6183        }
6184    }
6185
6186    unsafe impl
6187        fidl::encoding::Encode<
6188            MultipleHandleSubtypes,
6189            fidl::encoding::DefaultFuchsiaResourceDialect,
6190        > for &mut MultipleHandleSubtypes
6191    {
6192        #[inline]
6193        unsafe fn encode(
6194            self,
6195            encoder: &mut fidl::encoding::Encoder<
6196                '_,
6197                fidl::encoding::DefaultFuchsiaResourceDialect,
6198            >,
6199            offset: usize,
6200            _depth: fidl::encoding::Depth,
6201        ) -> fidl::Result<()> {
6202            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6203            // Delegate to tuple encoding.
6204            fidl::encoding::Encode::<
6205                MultipleHandleSubtypes,
6206                fidl::encoding::DefaultFuchsiaResourceDialect,
6207            >::encode(
6208                (
6209                    <fidl::encoding::HandleType<
6210                        fidl::NullableHandle,
6211                        { fidl::ObjectType::NONE.into_raw() },
6212                        2147483648,
6213                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6214                        &mut self.untyped
6215                    ),
6216                    <fidl::encoding::HandleType<
6217                        fidl::Event,
6218                        { fidl::ObjectType::EVENT.into_raw() },
6219                        2147483648,
6220                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6221                        &mut self.event
6222                    ),
6223                    <fidl::encoding::HandleType<
6224                        fidl::Channel,
6225                        { fidl::ObjectType::CHANNEL.into_raw() },
6226                        2147483648,
6227                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6228                        &mut self.channel
6229                    ),
6230                ),
6231                encoder,
6232                offset,
6233                _depth,
6234            )
6235        }
6236    }
6237    unsafe impl<
6238        T0: fidl::encoding::Encode<
6239                fidl::encoding::HandleType<
6240                    fidl::NullableHandle,
6241                    { fidl::ObjectType::NONE.into_raw() },
6242                    2147483648,
6243                >,
6244                fidl::encoding::DefaultFuchsiaResourceDialect,
6245            >,
6246        T1: fidl::encoding::Encode<
6247                fidl::encoding::HandleType<
6248                    fidl::Event,
6249                    { fidl::ObjectType::EVENT.into_raw() },
6250                    2147483648,
6251                >,
6252                fidl::encoding::DefaultFuchsiaResourceDialect,
6253            >,
6254        T2: fidl::encoding::Encode<
6255                fidl::encoding::HandleType<
6256                    fidl::Channel,
6257                    { fidl::ObjectType::CHANNEL.into_raw() },
6258                    2147483648,
6259                >,
6260                fidl::encoding::DefaultFuchsiaResourceDialect,
6261            >,
6262    >
6263        fidl::encoding::Encode<
6264            MultipleHandleSubtypes,
6265            fidl::encoding::DefaultFuchsiaResourceDialect,
6266        > for (T0, T1, T2)
6267    {
6268        #[inline]
6269        unsafe fn encode(
6270            self,
6271            encoder: &mut fidl::encoding::Encoder<
6272                '_,
6273                fidl::encoding::DefaultFuchsiaResourceDialect,
6274            >,
6275            offset: usize,
6276            depth: fidl::encoding::Depth,
6277        ) -> fidl::Result<()> {
6278            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6279            // Zero out padding regions. There's no need to apply masks
6280            // because the unmasked parts will be overwritten by fields.
6281            // Write the fields.
6282            self.0.encode(encoder, offset + 0, depth)?;
6283            self.1.encode(encoder, offset + 4, depth)?;
6284            self.2.encode(encoder, offset + 8, depth)?;
6285            Ok(())
6286        }
6287    }
6288
6289    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6290        for MultipleHandleSubtypes
6291    {
6292        #[inline(always)]
6293        fn new_empty() -> Self {
6294            Self {
6295                untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6296                event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6297                channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6298            }
6299        }
6300
6301        #[inline]
6302        unsafe fn decode(
6303            &mut self,
6304            decoder: &mut fidl::encoding::Decoder<
6305                '_,
6306                fidl::encoding::DefaultFuchsiaResourceDialect,
6307            >,
6308            offset: usize,
6309            _depth: fidl::encoding::Depth,
6310        ) -> fidl::Result<()> {
6311            decoder.debug_check_bounds::<Self>(offset);
6312            // Verify that padding bytes are zero.
6313            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6314            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6315            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6316            Ok(())
6317        }
6318    }
6319
6320    impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6321        type Borrowed<'a> = &'a mut Self;
6322        fn take_or_borrow<'a>(
6323            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6324        ) -> Self::Borrowed<'a> {
6325            value
6326        }
6327    }
6328
6329    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6330        type Owned = Self;
6331
6332        #[inline(always)]
6333        fn inline_align(_context: fidl::encoding::Context) -> usize {
6334            8
6335        }
6336
6337        #[inline(always)]
6338        fn inline_size(_context: fidl::encoding::Context) -> usize {
6339            32
6340        }
6341    }
6342
6343    unsafe impl
6344        fidl::encoding::Encode<
6345            MultipleNonnullableHandles,
6346            fidl::encoding::DefaultFuchsiaResourceDialect,
6347        > for &mut MultipleNonnullableHandles
6348    {
6349        #[inline]
6350        unsafe fn encode(
6351            self,
6352            encoder: &mut fidl::encoding::Encoder<
6353                '_,
6354                fidl::encoding::DefaultFuchsiaResourceDialect,
6355            >,
6356            offset: usize,
6357            _depth: fidl::encoding::Depth,
6358        ) -> fidl::Result<()> {
6359            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6360            // Delegate to tuple encoding.
6361            fidl::encoding::Encode::<
6362                MultipleNonnullableHandles,
6363                fidl::encoding::DefaultFuchsiaResourceDialect,
6364            >::encode(
6365                (
6366                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6367                    <fidl::encoding::HandleType<
6368                        fidl::NullableHandle,
6369                        { fidl::ObjectType::NONE.into_raw() },
6370                        2147483648,
6371                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6372                        &mut self.handle0
6373                    ),
6374                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6375                    <fidl::encoding::HandleType<
6376                        fidl::Channel,
6377                        { fidl::ObjectType::CHANNEL.into_raw() },
6378                        2147483648,
6379                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6380                        &mut self.handle1
6381                    ),
6382                    <fidl::encoding::HandleType<
6383                        fidl::Event,
6384                        { fidl::ObjectType::EVENT.into_raw() },
6385                        2147483648,
6386                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6387                        &mut self.handle2
6388                    ),
6389                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6390                ),
6391                encoder,
6392                offset,
6393                _depth,
6394            )
6395        }
6396    }
6397    unsafe impl<
6398        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6399        T1: fidl::encoding::Encode<
6400                fidl::encoding::HandleType<
6401                    fidl::NullableHandle,
6402                    { fidl::ObjectType::NONE.into_raw() },
6403                    2147483648,
6404                >,
6405                fidl::encoding::DefaultFuchsiaResourceDialect,
6406            >,
6407        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6408        T3: fidl::encoding::Encode<
6409                fidl::encoding::HandleType<
6410                    fidl::Channel,
6411                    { fidl::ObjectType::CHANNEL.into_raw() },
6412                    2147483648,
6413                >,
6414                fidl::encoding::DefaultFuchsiaResourceDialect,
6415            >,
6416        T4: fidl::encoding::Encode<
6417                fidl::encoding::HandleType<
6418                    fidl::Event,
6419                    { fidl::ObjectType::EVENT.into_raw() },
6420                    2147483648,
6421                >,
6422                fidl::encoding::DefaultFuchsiaResourceDialect,
6423            >,
6424        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6425    >
6426        fidl::encoding::Encode<
6427            MultipleNonnullableHandles,
6428            fidl::encoding::DefaultFuchsiaResourceDialect,
6429        > for (T0, T1, T2, T3, T4, T5)
6430    {
6431        #[inline]
6432        unsafe fn encode(
6433            self,
6434            encoder: &mut fidl::encoding::Encoder<
6435                '_,
6436                fidl::encoding::DefaultFuchsiaResourceDialect,
6437            >,
6438            offset: usize,
6439            depth: fidl::encoding::Depth,
6440        ) -> fidl::Result<()> {
6441            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6442            // Zero out padding regions. There's no need to apply masks
6443            // because the unmasked parts will be overwritten by fields.
6444            // Write the fields.
6445            self.0.encode(encoder, offset + 0, depth)?;
6446            self.1.encode(encoder, offset + 4, depth)?;
6447            self.2.encode(encoder, offset + 8, depth)?;
6448            self.3.encode(encoder, offset + 16, depth)?;
6449            self.4.encode(encoder, offset + 20, depth)?;
6450            self.5.encode(encoder, offset + 24, depth)?;
6451            Ok(())
6452        }
6453    }
6454
6455    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6456        for MultipleNonnullableHandles
6457    {
6458        #[inline(always)]
6459        fn new_empty() -> Self {
6460            Self {
6461                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6462                handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6463                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6464                handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6465                handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6466                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6467            }
6468        }
6469
6470        #[inline]
6471        unsafe fn decode(
6472            &mut self,
6473            decoder: &mut fidl::encoding::Decoder<
6474                '_,
6475                fidl::encoding::DefaultFuchsiaResourceDialect,
6476            >,
6477            offset: usize,
6478            _depth: fidl::encoding::Depth,
6479        ) -> fidl::Result<()> {
6480            decoder.debug_check_bounds::<Self>(offset);
6481            // Verify that padding bytes are zero.
6482            fidl::decode!(
6483                u32,
6484                fidl::encoding::DefaultFuchsiaResourceDialect,
6485                &mut self.data0,
6486                decoder,
6487                offset + 0,
6488                _depth
6489            )?;
6490            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6491            fidl::decode!(
6492                u64,
6493                fidl::encoding::DefaultFuchsiaResourceDialect,
6494                &mut self.data1,
6495                decoder,
6496                offset + 8,
6497                _depth
6498            )?;
6499            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6500            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6501            fidl::decode!(
6502                u64,
6503                fidl::encoding::DefaultFuchsiaResourceDialect,
6504                &mut self.data2,
6505                decoder,
6506                offset + 24,
6507                _depth
6508            )?;
6509            Ok(())
6510        }
6511    }
6512
6513    impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6514        type Borrowed<'a> = &'a mut Self;
6515        fn take_or_borrow<'a>(
6516            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6517        ) -> Self::Borrowed<'a> {
6518            value
6519        }
6520    }
6521
6522    unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6523        type Owned = Self;
6524
6525        #[inline(always)]
6526        fn inline_align(_context: fidl::encoding::Context) -> usize {
6527            8
6528        }
6529
6530        #[inline(always)]
6531        fn inline_size(_context: fidl::encoding::Context) -> usize {
6532            32
6533        }
6534    }
6535
6536    unsafe impl
6537        fidl::encoding::Encode<
6538            MultipleNullableHandles,
6539            fidl::encoding::DefaultFuchsiaResourceDialect,
6540        > for &mut MultipleNullableHandles
6541    {
6542        #[inline]
6543        unsafe fn encode(
6544            self,
6545            encoder: &mut fidl::encoding::Encoder<
6546                '_,
6547                fidl::encoding::DefaultFuchsiaResourceDialect,
6548            >,
6549            offset: usize,
6550            _depth: fidl::encoding::Depth,
6551        ) -> fidl::Result<()> {
6552            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6553            // Delegate to tuple encoding.
6554            fidl::encoding::Encode::<
6555                MultipleNullableHandles,
6556                fidl::encoding::DefaultFuchsiaResourceDialect,
6557            >::encode(
6558                (
6559                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6560                    <fidl::encoding::Optional<
6561                        fidl::encoding::HandleType<
6562                            fidl::NullableHandle,
6563                            { fidl::ObjectType::NONE.into_raw() },
6564                            2147483648,
6565                        >,
6566                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6567                        &mut self.handle0
6568                    ),
6569                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6570                    <fidl::encoding::Optional<
6571                        fidl::encoding::HandleType<
6572                            fidl::Channel,
6573                            { fidl::ObjectType::CHANNEL.into_raw() },
6574                            2147483648,
6575                        >,
6576                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6577                        &mut self.handle1
6578                    ),
6579                    <fidl::encoding::Optional<
6580                        fidl::encoding::HandleType<
6581                            fidl::Event,
6582                            { fidl::ObjectType::EVENT.into_raw() },
6583                            2147483648,
6584                        >,
6585                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6586                        &mut self.handle2
6587                    ),
6588                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6589                ),
6590                encoder,
6591                offset,
6592                _depth,
6593            )
6594        }
6595    }
6596    unsafe impl<
6597        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6598        T1: fidl::encoding::Encode<
6599                fidl::encoding::Optional<
6600                    fidl::encoding::HandleType<
6601                        fidl::NullableHandle,
6602                        { fidl::ObjectType::NONE.into_raw() },
6603                        2147483648,
6604                    >,
6605                >,
6606                fidl::encoding::DefaultFuchsiaResourceDialect,
6607            >,
6608        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6609        T3: fidl::encoding::Encode<
6610                fidl::encoding::Optional<
6611                    fidl::encoding::HandleType<
6612                        fidl::Channel,
6613                        { fidl::ObjectType::CHANNEL.into_raw() },
6614                        2147483648,
6615                    >,
6616                >,
6617                fidl::encoding::DefaultFuchsiaResourceDialect,
6618            >,
6619        T4: fidl::encoding::Encode<
6620                fidl::encoding::Optional<
6621                    fidl::encoding::HandleType<
6622                        fidl::Event,
6623                        { fidl::ObjectType::EVENT.into_raw() },
6624                        2147483648,
6625                    >,
6626                >,
6627                fidl::encoding::DefaultFuchsiaResourceDialect,
6628            >,
6629        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6630    >
6631        fidl::encoding::Encode<
6632            MultipleNullableHandles,
6633            fidl::encoding::DefaultFuchsiaResourceDialect,
6634        > for (T0, T1, T2, T3, T4, T5)
6635    {
6636        #[inline]
6637        unsafe fn encode(
6638            self,
6639            encoder: &mut fidl::encoding::Encoder<
6640                '_,
6641                fidl::encoding::DefaultFuchsiaResourceDialect,
6642            >,
6643            offset: usize,
6644            depth: fidl::encoding::Depth,
6645        ) -> fidl::Result<()> {
6646            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6647            // Zero out padding regions. There's no need to apply masks
6648            // because the unmasked parts will be overwritten by fields.
6649            // Write the fields.
6650            self.0.encode(encoder, offset + 0, depth)?;
6651            self.1.encode(encoder, offset + 4, depth)?;
6652            self.2.encode(encoder, offset + 8, depth)?;
6653            self.3.encode(encoder, offset + 16, depth)?;
6654            self.4.encode(encoder, offset + 20, depth)?;
6655            self.5.encode(encoder, offset + 24, depth)?;
6656            Ok(())
6657        }
6658    }
6659
6660    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6661        for MultipleNullableHandles
6662    {
6663        #[inline(always)]
6664        fn new_empty() -> Self {
6665            Self {
6666                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6667                handle0: fidl::new_empty!(
6668                    fidl::encoding::Optional<
6669                        fidl::encoding::HandleType<
6670                            fidl::NullableHandle,
6671                            { fidl::ObjectType::NONE.into_raw() },
6672                            2147483648,
6673                        >,
6674                    >,
6675                    fidl::encoding::DefaultFuchsiaResourceDialect
6676                ),
6677                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6678                handle1: fidl::new_empty!(
6679                    fidl::encoding::Optional<
6680                        fidl::encoding::HandleType<
6681                            fidl::Channel,
6682                            { fidl::ObjectType::CHANNEL.into_raw() },
6683                            2147483648,
6684                        >,
6685                    >,
6686                    fidl::encoding::DefaultFuchsiaResourceDialect
6687                ),
6688                handle2: fidl::new_empty!(
6689                    fidl::encoding::Optional<
6690                        fidl::encoding::HandleType<
6691                            fidl::Event,
6692                            { fidl::ObjectType::EVENT.into_raw() },
6693                            2147483648,
6694                        >,
6695                    >,
6696                    fidl::encoding::DefaultFuchsiaResourceDialect
6697                ),
6698                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6699            }
6700        }
6701
6702        #[inline]
6703        unsafe fn decode(
6704            &mut self,
6705            decoder: &mut fidl::encoding::Decoder<
6706                '_,
6707                fidl::encoding::DefaultFuchsiaResourceDialect,
6708            >,
6709            offset: usize,
6710            _depth: fidl::encoding::Depth,
6711        ) -> fidl::Result<()> {
6712            decoder.debug_check_bounds::<Self>(offset);
6713            // Verify that padding bytes are zero.
6714            fidl::decode!(
6715                u32,
6716                fidl::encoding::DefaultFuchsiaResourceDialect,
6717                &mut self.data0,
6718                decoder,
6719                offset + 0,
6720                _depth
6721            )?;
6722            fidl::decode!(
6723                fidl::encoding::Optional<
6724                    fidl::encoding::HandleType<
6725                        fidl::NullableHandle,
6726                        { fidl::ObjectType::NONE.into_raw() },
6727                        2147483648,
6728                    >,
6729                >,
6730                fidl::encoding::DefaultFuchsiaResourceDialect,
6731                &mut self.handle0,
6732                decoder,
6733                offset + 4,
6734                _depth
6735            )?;
6736            fidl::decode!(
6737                u64,
6738                fidl::encoding::DefaultFuchsiaResourceDialect,
6739                &mut self.data1,
6740                decoder,
6741                offset + 8,
6742                _depth
6743            )?;
6744            fidl::decode!(
6745                fidl::encoding::Optional<
6746                    fidl::encoding::HandleType<
6747                        fidl::Channel,
6748                        { fidl::ObjectType::CHANNEL.into_raw() },
6749                        2147483648,
6750                    >,
6751                >,
6752                fidl::encoding::DefaultFuchsiaResourceDialect,
6753                &mut self.handle1,
6754                decoder,
6755                offset + 16,
6756                _depth
6757            )?;
6758            fidl::decode!(
6759                fidl::encoding::Optional<
6760                    fidl::encoding::HandleType<
6761                        fidl::Event,
6762                        { fidl::ObjectType::EVENT.into_raw() },
6763                        2147483648,
6764                    >,
6765                >,
6766                fidl::encoding::DefaultFuchsiaResourceDialect,
6767                &mut self.handle2,
6768                decoder,
6769                offset + 20,
6770                _depth
6771            )?;
6772            fidl::decode!(
6773                u64,
6774                fidl::encoding::DefaultFuchsiaResourceDialect,
6775                &mut self.data2,
6776                decoder,
6777                offset + 24,
6778                _depth
6779            )?;
6780            Ok(())
6781        }
6782    }
6783
6784    impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6785        type Borrowed<'a> = &'a mut Self;
6786        fn take_or_borrow<'a>(
6787            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6788        ) -> Self::Borrowed<'a> {
6789            value
6790        }
6791    }
6792
6793    unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6794        type Owned = Self;
6795
6796        #[inline(always)]
6797        fn inline_align(_context: fidl::encoding::Context) -> usize {
6798            4
6799        }
6800
6801        #[inline(always)]
6802        fn inline_size(_context: fidl::encoding::Context) -> usize {
6803            4
6804        }
6805    }
6806
6807    unsafe impl
6808        fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6809        for &mut NonnullableHandle
6810    {
6811        #[inline]
6812        unsafe fn encode(
6813            self,
6814            encoder: &mut fidl::encoding::Encoder<
6815                '_,
6816                fidl::encoding::DefaultFuchsiaResourceDialect,
6817            >,
6818            offset: usize,
6819            _depth: fidl::encoding::Depth,
6820        ) -> fidl::Result<()> {
6821            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6822            // Delegate to tuple encoding.
6823            fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6824                (
6825                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6826                ),
6827                encoder, offset, _depth
6828            )
6829        }
6830    }
6831    unsafe impl<
6832        T0: fidl::encoding::Encode<
6833                fidl::encoding::HandleType<
6834                    fidl::NullableHandle,
6835                    { fidl::ObjectType::NONE.into_raw() },
6836                    2147483648,
6837                >,
6838                fidl::encoding::DefaultFuchsiaResourceDialect,
6839            >,
6840    > fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6841        for (T0,)
6842    {
6843        #[inline]
6844        unsafe fn encode(
6845            self,
6846            encoder: &mut fidl::encoding::Encoder<
6847                '_,
6848                fidl::encoding::DefaultFuchsiaResourceDialect,
6849            >,
6850            offset: usize,
6851            depth: fidl::encoding::Depth,
6852        ) -> fidl::Result<()> {
6853            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6854            // Zero out padding regions. There's no need to apply masks
6855            // because the unmasked parts will be overwritten by fields.
6856            // Write the fields.
6857            self.0.encode(encoder, offset + 0, depth)?;
6858            Ok(())
6859        }
6860    }
6861
6862    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6863        for NonnullableHandle
6864    {
6865        #[inline(always)]
6866        fn new_empty() -> Self {
6867            Self {
6868                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6869            }
6870        }
6871
6872        #[inline]
6873        unsafe fn decode(
6874            &mut self,
6875            decoder: &mut fidl::encoding::Decoder<
6876                '_,
6877                fidl::encoding::DefaultFuchsiaResourceDialect,
6878            >,
6879            offset: usize,
6880            _depth: fidl::encoding::Depth,
6881        ) -> fidl::Result<()> {
6882            decoder.debug_check_bounds::<Self>(offset);
6883            // Verify that padding bytes are zero.
6884            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6885            Ok(())
6886        }
6887    }
6888
6889    impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6890        type Borrowed<'a> = &'a mut Self;
6891        fn take_or_borrow<'a>(
6892            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6893        ) -> Self::Borrowed<'a> {
6894            value
6895        }
6896    }
6897
6898    unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6899        type Owned = Self;
6900
6901        #[inline(always)]
6902        fn inline_align(_context: fidl::encoding::Context) -> usize {
6903            4
6904        }
6905
6906        #[inline(always)]
6907        fn inline_size(_context: fidl::encoding::Context) -> usize {
6908            16
6909        }
6910    }
6911
6912    unsafe impl
6913        fidl::encoding::Encode<
6914            NonnullableHandleArray,
6915            fidl::encoding::DefaultFuchsiaResourceDialect,
6916        > for &mut NonnullableHandleArray
6917    {
6918        #[inline]
6919        unsafe fn encode(
6920            self,
6921            encoder: &mut fidl::encoding::Encoder<
6922                '_,
6923                fidl::encoding::DefaultFuchsiaResourceDialect,
6924            >,
6925            offset: usize,
6926            _depth: fidl::encoding::Depth,
6927        ) -> fidl::Result<()> {
6928            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6929            // Delegate to tuple encoding.
6930            fidl::encoding::Encode::<
6931                NonnullableHandleArray,
6932                fidl::encoding::DefaultFuchsiaResourceDialect,
6933            >::encode(
6934                (<fidl::encoding::Array<
6935                    fidl::encoding::HandleType<
6936                        fidl::NullableHandle,
6937                        { fidl::ObjectType::NONE.into_raw() },
6938                        2147483648,
6939                    >,
6940                    4,
6941                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6942                    &mut self.handles
6943                ),),
6944                encoder,
6945                offset,
6946                _depth,
6947            )
6948        }
6949    }
6950    unsafe impl<
6951        T0: fidl::encoding::Encode<
6952                fidl::encoding::Array<
6953                    fidl::encoding::HandleType<
6954                        fidl::NullableHandle,
6955                        { fidl::ObjectType::NONE.into_raw() },
6956                        2147483648,
6957                    >,
6958                    4,
6959                >,
6960                fidl::encoding::DefaultFuchsiaResourceDialect,
6961            >,
6962    >
6963        fidl::encoding::Encode<
6964            NonnullableHandleArray,
6965            fidl::encoding::DefaultFuchsiaResourceDialect,
6966        > for (T0,)
6967    {
6968        #[inline]
6969        unsafe fn encode(
6970            self,
6971            encoder: &mut fidl::encoding::Encoder<
6972                '_,
6973                fidl::encoding::DefaultFuchsiaResourceDialect,
6974            >,
6975            offset: usize,
6976            depth: fidl::encoding::Depth,
6977        ) -> fidl::Result<()> {
6978            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6979            // Zero out padding regions. There's no need to apply masks
6980            // because the unmasked parts will be overwritten by fields.
6981            // Write the fields.
6982            self.0.encode(encoder, offset + 0, depth)?;
6983            Ok(())
6984        }
6985    }
6986
6987    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6988        for NonnullableHandleArray
6989    {
6990        #[inline(always)]
6991        fn new_empty() -> Self {
6992            Self {
6993                handles: fidl::new_empty!(
6994                    fidl::encoding::Array<
6995                        fidl::encoding::HandleType<
6996                            fidl::NullableHandle,
6997                            { fidl::ObjectType::NONE.into_raw() },
6998                            2147483648,
6999                        >,
7000                        4,
7001                    >,
7002                    fidl::encoding::DefaultFuchsiaResourceDialect
7003                ),
7004            }
7005        }
7006
7007        #[inline]
7008        unsafe fn decode(
7009            &mut self,
7010            decoder: &mut fidl::encoding::Decoder<
7011                '_,
7012                fidl::encoding::DefaultFuchsiaResourceDialect,
7013            >,
7014            offset: usize,
7015            _depth: fidl::encoding::Depth,
7016        ) -> fidl::Result<()> {
7017            decoder.debug_check_bounds::<Self>(offset);
7018            // Verify that padding bytes are zero.
7019            fidl::decode!(
7020                fidl::encoding::Array<
7021                    fidl::encoding::HandleType<
7022                        fidl::NullableHandle,
7023                        { fidl::ObjectType::NONE.into_raw() },
7024                        2147483648,
7025                    >,
7026                    4,
7027                >,
7028                fidl::encoding::DefaultFuchsiaResourceDialect,
7029                &mut self.handles,
7030                decoder,
7031                offset + 0,
7032                _depth
7033            )?;
7034            Ok(())
7035        }
7036    }
7037
7038    impl fidl::encoding::ResourceTypeMarker for NullableHandle {
7039        type Borrowed<'a> = &'a mut Self;
7040        fn take_or_borrow<'a>(
7041            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7042        ) -> Self::Borrowed<'a> {
7043            value
7044        }
7045    }
7046
7047    unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7048        type Owned = Self;
7049
7050        #[inline(always)]
7051        fn inline_align(_context: fidl::encoding::Context) -> usize {
7052            4
7053        }
7054
7055        #[inline(always)]
7056        fn inline_size(_context: fidl::encoding::Context) -> usize {
7057            4
7058        }
7059    }
7060
7061    unsafe impl
7062        fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7063        for &mut NullableHandle
7064    {
7065        #[inline]
7066        unsafe fn encode(
7067            self,
7068            encoder: &mut fidl::encoding::Encoder<
7069                '_,
7070                fidl::encoding::DefaultFuchsiaResourceDialect,
7071            >,
7072            offset: usize,
7073            _depth: fidl::encoding::Depth,
7074        ) -> fidl::Result<()> {
7075            encoder.debug_check_bounds::<NullableHandle>(offset);
7076            // Delegate to tuple encoding.
7077            fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7078                (
7079                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7080                ),
7081                encoder, offset, _depth
7082            )
7083        }
7084    }
7085    unsafe impl<
7086        T0: fidl::encoding::Encode<
7087                fidl::encoding::Optional<
7088                    fidl::encoding::HandleType<
7089                        fidl::NullableHandle,
7090                        { fidl::ObjectType::NONE.into_raw() },
7091                        2147483648,
7092                    >,
7093                >,
7094                fidl::encoding::DefaultFuchsiaResourceDialect,
7095            >,
7096    > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7097        for (T0,)
7098    {
7099        #[inline]
7100        unsafe fn encode(
7101            self,
7102            encoder: &mut fidl::encoding::Encoder<
7103                '_,
7104                fidl::encoding::DefaultFuchsiaResourceDialect,
7105            >,
7106            offset: usize,
7107            depth: fidl::encoding::Depth,
7108        ) -> fidl::Result<()> {
7109            encoder.debug_check_bounds::<NullableHandle>(offset);
7110            // Zero out padding regions. There's no need to apply masks
7111            // because the unmasked parts will be overwritten by fields.
7112            // Write the fields.
7113            self.0.encode(encoder, offset + 0, depth)?;
7114            Ok(())
7115        }
7116    }
7117
7118    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7119        for NullableHandle
7120    {
7121        #[inline(always)]
7122        fn new_empty() -> Self {
7123            Self {
7124                h: fidl::new_empty!(
7125                    fidl::encoding::Optional<
7126                        fidl::encoding::HandleType<
7127                            fidl::NullableHandle,
7128                            { fidl::ObjectType::NONE.into_raw() },
7129                            2147483648,
7130                        >,
7131                    >,
7132                    fidl::encoding::DefaultFuchsiaResourceDialect
7133                ),
7134            }
7135        }
7136
7137        #[inline]
7138        unsafe fn decode(
7139            &mut self,
7140            decoder: &mut fidl::encoding::Decoder<
7141                '_,
7142                fidl::encoding::DefaultFuchsiaResourceDialect,
7143            >,
7144            offset: usize,
7145            _depth: fidl::encoding::Depth,
7146        ) -> fidl::Result<()> {
7147            decoder.debug_check_bounds::<Self>(offset);
7148            // Verify that padding bytes are zero.
7149            fidl::decode!(
7150                fidl::encoding::Optional<
7151                    fidl::encoding::HandleType<
7152                        fidl::NullableHandle,
7153                        { fidl::ObjectType::NONE.into_raw() },
7154                        2147483648,
7155                    >,
7156                >,
7157                fidl::encoding::DefaultFuchsiaResourceDialect,
7158                &mut self.h,
7159                decoder,
7160                offset + 0,
7161                _depth
7162            )?;
7163            Ok(())
7164        }
7165    }
7166
7167    impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7168        type Borrowed<'a> = &'a mut Self;
7169        fn take_or_borrow<'a>(
7170            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7171        ) -> Self::Borrowed<'a> {
7172            value
7173        }
7174    }
7175
7176    unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7177        type Owned = Self;
7178
7179        #[inline(always)]
7180        fn inline_align(_context: fidl::encoding::Context) -> usize {
7181            8
7182        }
7183
7184        #[inline(always)]
7185        fn inline_size(_context: fidl::encoding::Context) -> usize {
7186            8
7187        }
7188    }
7189
7190    unsafe impl
7191        fidl::encoding::Encode<
7192            OutOfLineArrayOfNonnullableHandles,
7193            fidl::encoding::DefaultFuchsiaResourceDialect,
7194        > for &mut OutOfLineArrayOfNonnullableHandles
7195    {
7196        #[inline]
7197        unsafe fn encode(
7198            self,
7199            encoder: &mut fidl::encoding::Encoder<
7200                '_,
7201                fidl::encoding::DefaultFuchsiaResourceDialect,
7202            >,
7203            offset: usize,
7204            _depth: fidl::encoding::Depth,
7205        ) -> fidl::Result<()> {
7206            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7207            // Delegate to tuple encoding.
7208            fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7209                (
7210                    <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7211                ),
7212                encoder, offset, _depth
7213            )
7214        }
7215    }
7216    unsafe impl<
7217        T0: fidl::encoding::Encode<
7218                fidl::encoding::Boxed<NonnullableHandleArray>,
7219                fidl::encoding::DefaultFuchsiaResourceDialect,
7220            >,
7221    >
7222        fidl::encoding::Encode<
7223            OutOfLineArrayOfNonnullableHandles,
7224            fidl::encoding::DefaultFuchsiaResourceDialect,
7225        > for (T0,)
7226    {
7227        #[inline]
7228        unsafe fn encode(
7229            self,
7230            encoder: &mut fidl::encoding::Encoder<
7231                '_,
7232                fidl::encoding::DefaultFuchsiaResourceDialect,
7233            >,
7234            offset: usize,
7235            depth: fidl::encoding::Depth,
7236        ) -> fidl::Result<()> {
7237            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7238            // Zero out padding regions. There's no need to apply masks
7239            // because the unmasked parts will be overwritten by fields.
7240            // Write the fields.
7241            self.0.encode(encoder, offset + 0, depth)?;
7242            Ok(())
7243        }
7244    }
7245
7246    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7247        for OutOfLineArrayOfNonnullableHandles
7248    {
7249        #[inline(always)]
7250        fn new_empty() -> Self {
7251            Self {
7252                handles: fidl::new_empty!(
7253                    fidl::encoding::Boxed<NonnullableHandleArray>,
7254                    fidl::encoding::DefaultFuchsiaResourceDialect
7255                ),
7256            }
7257        }
7258
7259        #[inline]
7260        unsafe fn decode(
7261            &mut self,
7262            decoder: &mut fidl::encoding::Decoder<
7263                '_,
7264                fidl::encoding::DefaultFuchsiaResourceDialect,
7265            >,
7266            offset: usize,
7267            _depth: fidl::encoding::Depth,
7268        ) -> fidl::Result<()> {
7269            decoder.debug_check_bounds::<Self>(offset);
7270            // Verify that padding bytes are zero.
7271            fidl::decode!(
7272                fidl::encoding::Boxed<NonnullableHandleArray>,
7273                fidl::encoding::DefaultFuchsiaResourceDialect,
7274                &mut self.handles,
7275                decoder,
7276                offset + 0,
7277                _depth
7278            )?;
7279            Ok(())
7280        }
7281    }
7282
7283    impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7284        type Borrowed<'a> = &'a mut Self;
7285        fn take_or_borrow<'a>(
7286            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7287        ) -> Self::Borrowed<'a> {
7288            value
7289        }
7290    }
7291
7292    unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7293        type Owned = Self;
7294
7295        #[inline(always)]
7296        fn inline_align(_context: fidl::encoding::Context) -> usize {
7297            8
7298        }
7299
7300        #[inline(always)]
7301        fn inline_size(_context: fidl::encoding::Context) -> usize {
7302            32
7303        }
7304    }
7305
7306    unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7307        for &mut Sandwich6
7308    {
7309        #[inline]
7310        unsafe fn encode(
7311            self,
7312            encoder: &mut fidl::encoding::Encoder<
7313                '_,
7314                fidl::encoding::DefaultFuchsiaResourceDialect,
7315            >,
7316            offset: usize,
7317            _depth: fidl::encoding::Depth,
7318        ) -> fidl::Result<()> {
7319            encoder.debug_check_bounds::<Sandwich6>(offset);
7320            // Delegate to tuple encoding.
7321            fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7322                (
7323                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7324                    <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7325                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7326                ),
7327                encoder, offset, _depth
7328            )
7329        }
7330    }
7331    unsafe impl<
7332        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7333        T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7334        T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7335    > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7336        for (T0, T1, T2)
7337    {
7338        #[inline]
7339        unsafe fn encode(
7340            self,
7341            encoder: &mut fidl::encoding::Encoder<
7342                '_,
7343                fidl::encoding::DefaultFuchsiaResourceDialect,
7344            >,
7345            offset: usize,
7346            depth: fidl::encoding::Depth,
7347        ) -> fidl::Result<()> {
7348            encoder.debug_check_bounds::<Sandwich6>(offset);
7349            // Zero out padding regions. There's no need to apply masks
7350            // because the unmasked parts will be overwritten by fields.
7351            unsafe {
7352                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7353                (ptr as *mut u64).write_unaligned(0);
7354            }
7355            unsafe {
7356                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7357                (ptr as *mut u64).write_unaligned(0);
7358            }
7359            // Write the fields.
7360            self.0.encode(encoder, offset + 0, depth)?;
7361            self.1.encode(encoder, offset + 8, depth)?;
7362            self.2.encode(encoder, offset + 24, depth)?;
7363            Ok(())
7364        }
7365    }
7366
7367    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7368        #[inline(always)]
7369        fn new_empty() -> Self {
7370            Self {
7371                before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7372                the_union: fidl::new_empty!(
7373                    UnionWithVector,
7374                    fidl::encoding::DefaultFuchsiaResourceDialect
7375                ),
7376                after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7377            }
7378        }
7379
7380        #[inline]
7381        unsafe fn decode(
7382            &mut self,
7383            decoder: &mut fidl::encoding::Decoder<
7384                '_,
7385                fidl::encoding::DefaultFuchsiaResourceDialect,
7386            >,
7387            offset: usize,
7388            _depth: fidl::encoding::Depth,
7389        ) -> fidl::Result<()> {
7390            decoder.debug_check_bounds::<Self>(offset);
7391            // Verify that padding bytes are zero.
7392            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7393            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7394            let mask = 0xffffffff00000000u64;
7395            let maskedval = padval & mask;
7396            if maskedval != 0 {
7397                return Err(fidl::Error::NonZeroPadding {
7398                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7399                });
7400            }
7401            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7402            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7403            let mask = 0xffffffff00000000u64;
7404            let maskedval = padval & mask;
7405            if maskedval != 0 {
7406                return Err(fidl::Error::NonZeroPadding {
7407                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7408                });
7409            }
7410            fidl::decode!(
7411                u32,
7412                fidl::encoding::DefaultFuchsiaResourceDialect,
7413                &mut self.before,
7414                decoder,
7415                offset + 0,
7416                _depth
7417            )?;
7418            fidl::decode!(
7419                UnionWithVector,
7420                fidl::encoding::DefaultFuchsiaResourceDialect,
7421                &mut self.the_union,
7422                decoder,
7423                offset + 8,
7424                _depth
7425            )?;
7426            fidl::decode!(
7427                u32,
7428                fidl::encoding::DefaultFuchsiaResourceDialect,
7429                &mut self.after,
7430                decoder,
7431                offset + 24,
7432                _depth
7433            )?;
7434            Ok(())
7435        }
7436    }
7437
7438    impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7439        type Borrowed<'a> = &'a mut Self;
7440        fn take_or_borrow<'a>(
7441            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7442        ) -> Self::Borrowed<'a> {
7443            value
7444        }
7445    }
7446
7447    unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7448        type Owned = Self;
7449
7450        #[inline(always)]
7451        fn inline_align(_context: fidl::encoding::Context) -> usize {
7452            8
7453        }
7454
7455        #[inline(always)]
7456        fn inline_size(_context: fidl::encoding::Context) -> usize {
7457            24
7458        }
7459    }
7460
7461    unsafe impl
7462        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7463        for &mut ShortStringThenHandle
7464    {
7465        #[inline]
7466        unsafe fn encode(
7467            self,
7468            encoder: &mut fidl::encoding::Encoder<
7469                '_,
7470                fidl::encoding::DefaultFuchsiaResourceDialect,
7471            >,
7472            offset: usize,
7473            _depth: fidl::encoding::Depth,
7474        ) -> fidl::Result<()> {
7475            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7476            // Delegate to tuple encoding.
7477            fidl::encoding::Encode::<
7478                ShortStringThenHandle,
7479                fidl::encoding::DefaultFuchsiaResourceDialect,
7480            >::encode(
7481                (
7482                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7483                        &self.s,
7484                    ),
7485                    <fidl::encoding::HandleType<
7486                        fidl::NullableHandle,
7487                        { fidl::ObjectType::NONE.into_raw() },
7488                        2147483648,
7489                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7490                        &mut self.h
7491                    ),
7492                ),
7493                encoder,
7494                offset,
7495                _depth,
7496            )
7497        }
7498    }
7499    unsafe impl<
7500        T0: fidl::encoding::Encode<
7501                fidl::encoding::BoundedString<1>,
7502                fidl::encoding::DefaultFuchsiaResourceDialect,
7503            >,
7504        T1: fidl::encoding::Encode<
7505                fidl::encoding::HandleType<
7506                    fidl::NullableHandle,
7507                    { fidl::ObjectType::NONE.into_raw() },
7508                    2147483648,
7509                >,
7510                fidl::encoding::DefaultFuchsiaResourceDialect,
7511            >,
7512    >
7513        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7514        for (T0, T1)
7515    {
7516        #[inline]
7517        unsafe fn encode(
7518            self,
7519            encoder: &mut fidl::encoding::Encoder<
7520                '_,
7521                fidl::encoding::DefaultFuchsiaResourceDialect,
7522            >,
7523            offset: usize,
7524            depth: fidl::encoding::Depth,
7525        ) -> fidl::Result<()> {
7526            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7527            // Zero out padding regions. There's no need to apply masks
7528            // because the unmasked parts will be overwritten by fields.
7529            unsafe {
7530                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7531                (ptr as *mut u64).write_unaligned(0);
7532            }
7533            // Write the fields.
7534            self.0.encode(encoder, offset + 0, depth)?;
7535            self.1.encode(encoder, offset + 16, depth)?;
7536            Ok(())
7537        }
7538    }
7539
7540    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7541        for ShortStringThenHandle
7542    {
7543        #[inline(always)]
7544        fn new_empty() -> Self {
7545            Self {
7546                s: fidl::new_empty!(
7547                    fidl::encoding::BoundedString<1>,
7548                    fidl::encoding::DefaultFuchsiaResourceDialect
7549                ),
7550                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7551            }
7552        }
7553
7554        #[inline]
7555        unsafe fn decode(
7556            &mut self,
7557            decoder: &mut fidl::encoding::Decoder<
7558                '_,
7559                fidl::encoding::DefaultFuchsiaResourceDialect,
7560            >,
7561            offset: usize,
7562            _depth: fidl::encoding::Depth,
7563        ) -> fidl::Result<()> {
7564            decoder.debug_check_bounds::<Self>(offset);
7565            // Verify that padding bytes are zero.
7566            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7567            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7568            let mask = 0xffffffff00000000u64;
7569            let maskedval = padval & mask;
7570            if maskedval != 0 {
7571                return Err(fidl::Error::NonZeroPadding {
7572                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7573                });
7574            }
7575            fidl::decode!(
7576                fidl::encoding::BoundedString<1>,
7577                fidl::encoding::DefaultFuchsiaResourceDialect,
7578                &mut self.s,
7579                decoder,
7580                offset + 0,
7581                _depth
7582            )?;
7583            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7584            Ok(())
7585        }
7586    }
7587
7588    impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7589        type Borrowed<'a> = &'a mut Self;
7590        fn take_or_borrow<'a>(
7591            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7592        ) -> Self::Borrowed<'a> {
7593            value
7594        }
7595    }
7596
7597    unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7598        type Owned = Self;
7599
7600        #[inline(always)]
7601        fn inline_align(_context: fidl::encoding::Context) -> usize {
7602            4
7603        }
7604
7605        #[inline(always)]
7606        fn inline_size(_context: fidl::encoding::Context) -> usize {
7607            4
7608        }
7609    }
7610
7611    unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7612        for &mut SingleHandle
7613    {
7614        #[inline]
7615        unsafe fn encode(
7616            self,
7617            encoder: &mut fidl::encoding::Encoder<
7618                '_,
7619                fidl::encoding::DefaultFuchsiaResourceDialect,
7620            >,
7621            offset: usize,
7622            _depth: fidl::encoding::Depth,
7623        ) -> fidl::Result<()> {
7624            encoder.debug_check_bounds::<SingleHandle>(offset);
7625            // Delegate to tuple encoding.
7626            fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7627                (
7628                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7629                ),
7630                encoder, offset, _depth
7631            )
7632        }
7633    }
7634    unsafe impl<
7635        T0: fidl::encoding::Encode<
7636                fidl::encoding::HandleType<
7637                    fidl::NullableHandle,
7638                    { fidl::ObjectType::NONE.into_raw() },
7639                    2147483648,
7640                >,
7641                fidl::encoding::DefaultFuchsiaResourceDialect,
7642            >,
7643    > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
7644    {
7645        #[inline]
7646        unsafe fn encode(
7647            self,
7648            encoder: &mut fidl::encoding::Encoder<
7649                '_,
7650                fidl::encoding::DefaultFuchsiaResourceDialect,
7651            >,
7652            offset: usize,
7653            depth: fidl::encoding::Depth,
7654        ) -> fidl::Result<()> {
7655            encoder.debug_check_bounds::<SingleHandle>(offset);
7656            // Zero out padding regions. There's no need to apply masks
7657            // because the unmasked parts will be overwritten by fields.
7658            // Write the fields.
7659            self.0.encode(encoder, offset + 0, depth)?;
7660            Ok(())
7661        }
7662    }
7663
7664    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7665        #[inline(always)]
7666        fn new_empty() -> Self {
7667            Self {
7668                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7669            }
7670        }
7671
7672        #[inline]
7673        unsafe fn decode(
7674            &mut self,
7675            decoder: &mut fidl::encoding::Decoder<
7676                '_,
7677                fidl::encoding::DefaultFuchsiaResourceDialect,
7678            >,
7679            offset: usize,
7680            _depth: fidl::encoding::Depth,
7681        ) -> fidl::Result<()> {
7682            decoder.debug_check_bounds::<Self>(offset);
7683            // Verify that padding bytes are zero.
7684            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7685            Ok(())
7686        }
7687    }
7688
7689    impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7690        type Borrowed<'a> = &'a mut Self;
7691        fn take_or_borrow<'a>(
7692            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7693        ) -> Self::Borrowed<'a> {
7694            value
7695        }
7696    }
7697
7698    unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7699        type Owned = Self;
7700
7701        #[inline(always)]
7702        fn inline_align(_context: fidl::encoding::Context) -> usize {
7703            4
7704        }
7705
7706        #[inline(always)]
7707        fn inline_size(_context: fidl::encoding::Context) -> usize {
7708            4
7709        }
7710    }
7711
7712    unsafe impl
7713        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7714        for &mut SingleOptionalHandle
7715    {
7716        #[inline]
7717        unsafe fn encode(
7718            self,
7719            encoder: &mut fidl::encoding::Encoder<
7720                '_,
7721                fidl::encoding::DefaultFuchsiaResourceDialect,
7722            >,
7723            offset: usize,
7724            _depth: fidl::encoding::Depth,
7725        ) -> fidl::Result<()> {
7726            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7727            // Delegate to tuple encoding.
7728            fidl::encoding::Encode::<
7729                SingleOptionalHandle,
7730                fidl::encoding::DefaultFuchsiaResourceDialect,
7731            >::encode(
7732                (<fidl::encoding::Optional<
7733                    fidl::encoding::HandleType<
7734                        fidl::NullableHandle,
7735                        { fidl::ObjectType::NONE.into_raw() },
7736                        2147483648,
7737                    >,
7738                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7739                    &mut self.h
7740                ),),
7741                encoder,
7742                offset,
7743                _depth,
7744            )
7745        }
7746    }
7747    unsafe impl<
7748        T0: fidl::encoding::Encode<
7749                fidl::encoding::Optional<
7750                    fidl::encoding::HandleType<
7751                        fidl::NullableHandle,
7752                        { fidl::ObjectType::NONE.into_raw() },
7753                        2147483648,
7754                    >,
7755                >,
7756                fidl::encoding::DefaultFuchsiaResourceDialect,
7757            >,
7758    >
7759        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7760        for (T0,)
7761    {
7762        #[inline]
7763        unsafe fn encode(
7764            self,
7765            encoder: &mut fidl::encoding::Encoder<
7766                '_,
7767                fidl::encoding::DefaultFuchsiaResourceDialect,
7768            >,
7769            offset: usize,
7770            depth: fidl::encoding::Depth,
7771        ) -> fidl::Result<()> {
7772            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7773            // Zero out padding regions. There's no need to apply masks
7774            // because the unmasked parts will be overwritten by fields.
7775            // Write the fields.
7776            self.0.encode(encoder, offset + 0, depth)?;
7777            Ok(())
7778        }
7779    }
7780
7781    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7782        for SingleOptionalHandle
7783    {
7784        #[inline(always)]
7785        fn new_empty() -> Self {
7786            Self {
7787                h: fidl::new_empty!(
7788                    fidl::encoding::Optional<
7789                        fidl::encoding::HandleType<
7790                            fidl::NullableHandle,
7791                            { fidl::ObjectType::NONE.into_raw() },
7792                            2147483648,
7793                        >,
7794                    >,
7795                    fidl::encoding::DefaultFuchsiaResourceDialect
7796                ),
7797            }
7798        }
7799
7800        #[inline]
7801        unsafe fn decode(
7802            &mut self,
7803            decoder: &mut fidl::encoding::Decoder<
7804                '_,
7805                fidl::encoding::DefaultFuchsiaResourceDialect,
7806            >,
7807            offset: usize,
7808            _depth: fidl::encoding::Depth,
7809        ) -> fidl::Result<()> {
7810            decoder.debug_check_bounds::<Self>(offset);
7811            // Verify that padding bytes are zero.
7812            fidl::decode!(
7813                fidl::encoding::Optional<
7814                    fidl::encoding::HandleType<
7815                        fidl::NullableHandle,
7816                        { fidl::ObjectType::NONE.into_raw() },
7817                        2147483648,
7818                    >,
7819                >,
7820                fidl::encoding::DefaultFuchsiaResourceDialect,
7821                &mut self.h,
7822                decoder,
7823                offset + 0,
7824                _depth
7825            )?;
7826            Ok(())
7827        }
7828    }
7829
7830    impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7831        type Borrowed<'a> = &'a mut Self;
7832        fn take_or_borrow<'a>(
7833            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7834        ) -> Self::Borrowed<'a> {
7835            value
7836        }
7837    }
7838
7839    unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7840        type Owned = Self;
7841
7842        #[inline(always)]
7843        fn inline_align(_context: fidl::encoding::Context) -> usize {
7844            4
7845        }
7846
7847        #[inline(always)]
7848        fn inline_size(_context: fidl::encoding::Context) -> usize {
7849            16
7850        }
7851    }
7852
7853    unsafe impl
7854        fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7855        for &mut StructOfEndpoints
7856    {
7857        #[inline]
7858        unsafe fn encode(
7859            self,
7860            encoder: &mut fidl::encoding::Encoder<
7861                '_,
7862                fidl::encoding::DefaultFuchsiaResourceDialect,
7863            >,
7864            offset: usize,
7865            _depth: fidl::encoding::Depth,
7866        ) -> fidl::Result<()> {
7867            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7868            // Delegate to tuple encoding.
7869            fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7870                (
7871                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7872                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7873                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7874                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7875                ),
7876                encoder, offset, _depth
7877            )
7878        }
7879    }
7880    unsafe impl<
7881        T0: fidl::encoding::Encode<
7882                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7883                fidl::encoding::DefaultFuchsiaResourceDialect,
7884            >,
7885        T1: fidl::encoding::Encode<
7886                fidl::encoding::Optional<
7887                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7888                >,
7889                fidl::encoding::DefaultFuchsiaResourceDialect,
7890            >,
7891        T2: fidl::encoding::Encode<
7892                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7893                fidl::encoding::DefaultFuchsiaResourceDialect,
7894            >,
7895        T3: fidl::encoding::Encode<
7896                fidl::encoding::Optional<
7897                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7898                >,
7899                fidl::encoding::DefaultFuchsiaResourceDialect,
7900            >,
7901    > fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7902        for (T0, T1, T2, T3)
7903    {
7904        #[inline]
7905        unsafe fn encode(
7906            self,
7907            encoder: &mut fidl::encoding::Encoder<
7908                '_,
7909                fidl::encoding::DefaultFuchsiaResourceDialect,
7910            >,
7911            offset: usize,
7912            depth: fidl::encoding::Depth,
7913        ) -> fidl::Result<()> {
7914            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7915            // Zero out padding regions. There's no need to apply masks
7916            // because the unmasked parts will be overwritten by fields.
7917            // Write the fields.
7918            self.0.encode(encoder, offset + 0, depth)?;
7919            self.1.encode(encoder, offset + 4, depth)?;
7920            self.2.encode(encoder, offset + 8, depth)?;
7921            self.3.encode(encoder, offset + 12, depth)?;
7922            Ok(())
7923        }
7924    }
7925
7926    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7927        for StructOfEndpoints
7928    {
7929        #[inline(always)]
7930        fn new_empty() -> Self {
7931            Self {
7932                client_end: fidl::new_empty!(
7933                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7934                    fidl::encoding::DefaultFuchsiaResourceDialect
7935                ),
7936                optional_client_end: fidl::new_empty!(
7937                    fidl::encoding::Optional<
7938                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7939                    >,
7940                    fidl::encoding::DefaultFuchsiaResourceDialect
7941                ),
7942                server_end: fidl::new_empty!(
7943                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7944                    fidl::encoding::DefaultFuchsiaResourceDialect
7945                ),
7946                optional_server_end: fidl::new_empty!(
7947                    fidl::encoding::Optional<
7948                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7949                    >,
7950                    fidl::encoding::DefaultFuchsiaResourceDialect
7951                ),
7952            }
7953        }
7954
7955        #[inline]
7956        unsafe fn decode(
7957            &mut self,
7958            decoder: &mut fidl::encoding::Decoder<
7959                '_,
7960                fidl::encoding::DefaultFuchsiaResourceDialect,
7961            >,
7962            offset: usize,
7963            _depth: fidl::encoding::Depth,
7964        ) -> fidl::Result<()> {
7965            decoder.debug_check_bounds::<Self>(offset);
7966            // Verify that padding bytes are zero.
7967            fidl::decode!(
7968                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7969                fidl::encoding::DefaultFuchsiaResourceDialect,
7970                &mut self.client_end,
7971                decoder,
7972                offset + 0,
7973                _depth
7974            )?;
7975            fidl::decode!(
7976                fidl::encoding::Optional<
7977                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7978                >,
7979                fidl::encoding::DefaultFuchsiaResourceDialect,
7980                &mut self.optional_client_end,
7981                decoder,
7982                offset + 4,
7983                _depth
7984            )?;
7985            fidl::decode!(
7986                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7987                fidl::encoding::DefaultFuchsiaResourceDialect,
7988                &mut self.server_end,
7989                decoder,
7990                offset + 8,
7991                _depth
7992            )?;
7993            fidl::decode!(
7994                fidl::encoding::Optional<
7995                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7996                >,
7997                fidl::encoding::DefaultFuchsiaResourceDialect,
7998                &mut self.optional_server_end,
7999                decoder,
8000                offset + 12,
8001                _depth
8002            )?;
8003            Ok(())
8004        }
8005    }
8006
8007    impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
8008        type Borrowed<'a> = &'a mut Self;
8009        fn take_or_borrow<'a>(
8010            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8011        ) -> Self::Borrowed<'a> {
8012            value
8013        }
8014    }
8015
8016    unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
8017        type Owned = Self;
8018
8019        #[inline(always)]
8020        fn inline_align(_context: fidl::encoding::Context) -> usize {
8021            8
8022        }
8023
8024        #[inline(always)]
8025        fn inline_size(_context: fidl::encoding::Context) -> usize {
8026            16
8027        }
8028    }
8029
8030    unsafe impl
8031        fidl::encoding::Encode<
8032            StructOfOptionalUnionOfHandle,
8033            fidl::encoding::DefaultFuchsiaResourceDialect,
8034        > for &mut StructOfOptionalUnionOfHandle
8035    {
8036        #[inline]
8037        unsafe fn encode(
8038            self,
8039            encoder: &mut fidl::encoding::Encoder<
8040                '_,
8041                fidl::encoding::DefaultFuchsiaResourceDialect,
8042            >,
8043            offset: usize,
8044            _depth: fidl::encoding::Depth,
8045        ) -> fidl::Result<()> {
8046            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8047            // Delegate to tuple encoding.
8048            fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8049                (
8050                    <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8051                ),
8052                encoder, offset, _depth
8053            )
8054        }
8055    }
8056    unsafe impl<
8057        T0: fidl::encoding::Encode<
8058                fidl::encoding::OptionalUnion<UnionOfHandle>,
8059                fidl::encoding::DefaultFuchsiaResourceDialect,
8060            >,
8061    >
8062        fidl::encoding::Encode<
8063            StructOfOptionalUnionOfHandle,
8064            fidl::encoding::DefaultFuchsiaResourceDialect,
8065        > for (T0,)
8066    {
8067        #[inline]
8068        unsafe fn encode(
8069            self,
8070            encoder: &mut fidl::encoding::Encoder<
8071                '_,
8072                fidl::encoding::DefaultFuchsiaResourceDialect,
8073            >,
8074            offset: usize,
8075            depth: fidl::encoding::Depth,
8076        ) -> fidl::Result<()> {
8077            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8078            // Zero out padding regions. There's no need to apply masks
8079            // because the unmasked parts will be overwritten by fields.
8080            // Write the fields.
8081            self.0.encode(encoder, offset + 0, depth)?;
8082            Ok(())
8083        }
8084    }
8085
8086    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8087        for StructOfOptionalUnionOfHandle
8088    {
8089        #[inline(always)]
8090        fn new_empty() -> Self {
8091            Self {
8092                u: fidl::new_empty!(
8093                    fidl::encoding::OptionalUnion<UnionOfHandle>,
8094                    fidl::encoding::DefaultFuchsiaResourceDialect
8095                ),
8096            }
8097        }
8098
8099        #[inline]
8100        unsafe fn decode(
8101            &mut self,
8102            decoder: &mut fidl::encoding::Decoder<
8103                '_,
8104                fidl::encoding::DefaultFuchsiaResourceDialect,
8105            >,
8106            offset: usize,
8107            _depth: fidl::encoding::Depth,
8108        ) -> fidl::Result<()> {
8109            decoder.debug_check_bounds::<Self>(offset);
8110            // Verify that padding bytes are zero.
8111            fidl::decode!(
8112                fidl::encoding::OptionalUnion<UnionOfHandle>,
8113                fidl::encoding::DefaultFuchsiaResourceDialect,
8114                &mut self.u,
8115                decoder,
8116                offset + 0,
8117                _depth
8118            )?;
8119            Ok(())
8120        }
8121    }
8122
8123    impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8124        type Borrowed<'a> = &'a mut Self;
8125        fn take_or_borrow<'a>(
8126            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8127        ) -> Self::Borrowed<'a> {
8128            value
8129        }
8130    }
8131
8132    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8133        type Owned = Self;
8134
8135        #[inline(always)]
8136        fn inline_align(_context: fidl::encoding::Context) -> usize {
8137            8
8138        }
8139
8140        #[inline(always)]
8141        fn inline_size(_context: fidl::encoding::Context) -> usize {
8142            16
8143        }
8144    }
8145
8146    unsafe impl
8147        fidl::encoding::Encode<
8148            StructOfSimpleResourceTable,
8149            fidl::encoding::DefaultFuchsiaResourceDialect,
8150        > for &mut StructOfSimpleResourceTable
8151    {
8152        #[inline]
8153        unsafe fn encode(
8154            self,
8155            encoder: &mut fidl::encoding::Encoder<
8156                '_,
8157                fidl::encoding::DefaultFuchsiaResourceDialect,
8158            >,
8159            offset: usize,
8160            _depth: fidl::encoding::Depth,
8161        ) -> fidl::Result<()> {
8162            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8163            // Delegate to tuple encoding.
8164            fidl::encoding::Encode::<
8165                StructOfSimpleResourceTable,
8166                fidl::encoding::DefaultFuchsiaResourceDialect,
8167            >::encode(
8168                (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8169                    &mut self.table,
8170                ),),
8171                encoder,
8172                offset,
8173                _depth,
8174            )
8175        }
8176    }
8177    unsafe impl<
8178        T0: fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
8179    >
8180        fidl::encoding::Encode<
8181            StructOfSimpleResourceTable,
8182            fidl::encoding::DefaultFuchsiaResourceDialect,
8183        > for (T0,)
8184    {
8185        #[inline]
8186        unsafe fn encode(
8187            self,
8188            encoder: &mut fidl::encoding::Encoder<
8189                '_,
8190                fidl::encoding::DefaultFuchsiaResourceDialect,
8191            >,
8192            offset: usize,
8193            depth: fidl::encoding::Depth,
8194        ) -> fidl::Result<()> {
8195            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8196            // Zero out padding regions. There's no need to apply masks
8197            // because the unmasked parts will be overwritten by fields.
8198            // Write the fields.
8199            self.0.encode(encoder, offset + 0, depth)?;
8200            Ok(())
8201        }
8202    }
8203
8204    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8205        for StructOfSimpleResourceTable
8206    {
8207        #[inline(always)]
8208        fn new_empty() -> Self {
8209            Self {
8210                table: fidl::new_empty!(
8211                    SimpleResourceTable,
8212                    fidl::encoding::DefaultFuchsiaResourceDialect
8213                ),
8214            }
8215        }
8216
8217        #[inline]
8218        unsafe fn decode(
8219            &mut self,
8220            decoder: &mut fidl::encoding::Decoder<
8221                '_,
8222                fidl::encoding::DefaultFuchsiaResourceDialect,
8223            >,
8224            offset: usize,
8225            _depth: fidl::encoding::Depth,
8226        ) -> fidl::Result<()> {
8227            decoder.debug_check_bounds::<Self>(offset);
8228            // Verify that padding bytes are zero.
8229            fidl::decode!(
8230                SimpleResourceTable,
8231                fidl::encoding::DefaultFuchsiaResourceDialect,
8232                &mut self.table,
8233                decoder,
8234                offset + 0,
8235                _depth
8236            )?;
8237            Ok(())
8238        }
8239    }
8240
8241    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8242        type Borrowed<'a> = &'a mut Self;
8243        fn take_or_borrow<'a>(
8244            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8245        ) -> Self::Borrowed<'a> {
8246            value
8247        }
8248    }
8249
8250    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8251        type Owned = Self;
8252
8253        #[inline(always)]
8254        fn inline_align(_context: fidl::encoding::Context) -> usize {
8255            8
8256        }
8257
8258        #[inline(always)]
8259        fn inline_size(_context: fidl::encoding::Context) -> usize {
8260            16
8261        }
8262    }
8263
8264    unsafe impl
8265        fidl::encoding::Encode<
8266            TableFieldInlinedHandleStruct,
8267            fidl::encoding::DefaultFuchsiaResourceDialect,
8268        > for &mut TableFieldInlinedHandleStruct
8269    {
8270        #[inline]
8271        unsafe fn encode(
8272            self,
8273            encoder: &mut fidl::encoding::Encoder<
8274                '_,
8275                fidl::encoding::DefaultFuchsiaResourceDialect,
8276            >,
8277            offset: usize,
8278            _depth: fidl::encoding::Depth,
8279        ) -> fidl::Result<()> {
8280            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8281            // Delegate to tuple encoding.
8282            fidl::encoding::Encode::<
8283                TableFieldInlinedHandleStruct,
8284                fidl::encoding::DefaultFuchsiaResourceDialect,
8285            >::encode(
8286                (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8287                    &mut self.t,
8288                ),),
8289                encoder,
8290                offset,
8291                _depth,
8292            )
8293        }
8294    }
8295    unsafe impl<
8296        T0: fidl::encoding::Encode<
8297                TableFieldInlinedHandle,
8298                fidl::encoding::DefaultFuchsiaResourceDialect,
8299            >,
8300    >
8301        fidl::encoding::Encode<
8302            TableFieldInlinedHandleStruct,
8303            fidl::encoding::DefaultFuchsiaResourceDialect,
8304        > for (T0,)
8305    {
8306        #[inline]
8307        unsafe fn encode(
8308            self,
8309            encoder: &mut fidl::encoding::Encoder<
8310                '_,
8311                fidl::encoding::DefaultFuchsiaResourceDialect,
8312            >,
8313            offset: usize,
8314            depth: fidl::encoding::Depth,
8315        ) -> fidl::Result<()> {
8316            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8317            // Zero out padding regions. There's no need to apply masks
8318            // because the unmasked parts will be overwritten by fields.
8319            // Write the fields.
8320            self.0.encode(encoder, offset + 0, depth)?;
8321            Ok(())
8322        }
8323    }
8324
8325    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8326        for TableFieldInlinedHandleStruct
8327    {
8328        #[inline(always)]
8329        fn new_empty() -> Self {
8330            Self {
8331                t: fidl::new_empty!(
8332                    TableFieldInlinedHandle,
8333                    fidl::encoding::DefaultFuchsiaResourceDialect
8334                ),
8335            }
8336        }
8337
8338        #[inline]
8339        unsafe fn decode(
8340            &mut self,
8341            decoder: &mut fidl::encoding::Decoder<
8342                '_,
8343                fidl::encoding::DefaultFuchsiaResourceDialect,
8344            >,
8345            offset: usize,
8346            _depth: fidl::encoding::Depth,
8347        ) -> fidl::Result<()> {
8348            decoder.debug_check_bounds::<Self>(offset);
8349            // Verify that padding bytes are zero.
8350            fidl::decode!(
8351                TableFieldInlinedHandle,
8352                fidl::encoding::DefaultFuchsiaResourceDialect,
8353                &mut self.t,
8354                decoder,
8355                offset + 0,
8356                _depth
8357            )?;
8358            Ok(())
8359        }
8360    }
8361
8362    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8363        type Borrowed<'a> = &'a mut Self;
8364        fn take_or_borrow<'a>(
8365            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8366        ) -> Self::Borrowed<'a> {
8367            value
8368        }
8369    }
8370
8371    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8372        type Owned = Self;
8373
8374        #[inline(always)]
8375        fn inline_align(_context: fidl::encoding::Context) -> usize {
8376            8
8377        }
8378
8379        #[inline(always)]
8380        fn inline_size(_context: fidl::encoding::Context) -> usize {
8381            16
8382        }
8383    }
8384
8385    unsafe impl
8386        fidl::encoding::Encode<
8387            TableFieldUnknownResourceStruct,
8388            fidl::encoding::DefaultFuchsiaResourceDialect,
8389        > for &mut TableFieldUnknownResourceStruct
8390    {
8391        #[inline]
8392        unsafe fn encode(
8393            self,
8394            encoder: &mut fidl::encoding::Encoder<
8395                '_,
8396                fidl::encoding::DefaultFuchsiaResourceDialect,
8397            >,
8398            offset: usize,
8399            _depth: fidl::encoding::Depth,
8400        ) -> fidl::Result<()> {
8401            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8402            // Delegate to tuple encoding.
8403            fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8404                (
8405                    <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8406                ),
8407                encoder, offset, _depth
8408            )
8409        }
8410    }
8411    unsafe impl<
8412        T0: fidl::encoding::Encode<
8413                TableFieldUnknownResource,
8414                fidl::encoding::DefaultFuchsiaResourceDialect,
8415            >,
8416    >
8417        fidl::encoding::Encode<
8418            TableFieldUnknownResourceStruct,
8419            fidl::encoding::DefaultFuchsiaResourceDialect,
8420        > for (T0,)
8421    {
8422        #[inline]
8423        unsafe fn encode(
8424            self,
8425            encoder: &mut fidl::encoding::Encoder<
8426                '_,
8427                fidl::encoding::DefaultFuchsiaResourceDialect,
8428            >,
8429            offset: usize,
8430            depth: fidl::encoding::Depth,
8431        ) -> fidl::Result<()> {
8432            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8433            // Zero out padding regions. There's no need to apply masks
8434            // because the unmasked parts will be overwritten by fields.
8435            // Write the fields.
8436            self.0.encode(encoder, offset + 0, depth)?;
8437            Ok(())
8438        }
8439    }
8440
8441    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8442        for TableFieldUnknownResourceStruct
8443    {
8444        #[inline(always)]
8445        fn new_empty() -> Self {
8446            Self {
8447                t: fidl::new_empty!(
8448                    TableFieldUnknownResource,
8449                    fidl::encoding::DefaultFuchsiaResourceDialect
8450                ),
8451            }
8452        }
8453
8454        #[inline]
8455        unsafe fn decode(
8456            &mut self,
8457            decoder: &mut fidl::encoding::Decoder<
8458                '_,
8459                fidl::encoding::DefaultFuchsiaResourceDialect,
8460            >,
8461            offset: usize,
8462            _depth: fidl::encoding::Depth,
8463        ) -> fidl::Result<()> {
8464            decoder.debug_check_bounds::<Self>(offset);
8465            // Verify that padding bytes are zero.
8466            fidl::decode!(
8467                TableFieldUnknownResource,
8468                fidl::encoding::DefaultFuchsiaResourceDialect,
8469                &mut self.t,
8470                decoder,
8471                offset + 0,
8472                _depth
8473            )?;
8474            Ok(())
8475        }
8476    }
8477
8478    impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8479        type Borrowed<'a> = &'a mut Self;
8480        fn take_or_borrow<'a>(
8481            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8482        ) -> Self::Borrowed<'a> {
8483            value
8484        }
8485    }
8486
8487    unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8488        type Owned = Self;
8489
8490        #[inline(always)]
8491        fn inline_align(_context: fidl::encoding::Context) -> usize {
8492            8
8493        }
8494
8495        #[inline(always)]
8496        fn inline_size(_context: fidl::encoding::Context) -> usize {
8497            16
8498        }
8499    }
8500
8501    unsafe impl
8502        fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8503        for &mut TableOfEndpoints
8504    {
8505        #[inline]
8506        unsafe fn encode(
8507            self,
8508            encoder: &mut fidl::encoding::Encoder<
8509                '_,
8510                fidl::encoding::DefaultFuchsiaResourceDialect,
8511            >,
8512            offset: usize,
8513            _depth: fidl::encoding::Depth,
8514        ) -> fidl::Result<()> {
8515            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8516            // Delegate to tuple encoding.
8517            fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8518                (
8519                    <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8520                ),
8521                encoder, offset, _depth
8522            )
8523        }
8524    }
8525    unsafe impl<
8526        T0: fidl::encoding::Encode<
8527                TableOfEndpointsTable,
8528                fidl::encoding::DefaultFuchsiaResourceDialect,
8529            >,
8530    > fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8531        for (T0,)
8532    {
8533        #[inline]
8534        unsafe fn encode(
8535            self,
8536            encoder: &mut fidl::encoding::Encoder<
8537                '_,
8538                fidl::encoding::DefaultFuchsiaResourceDialect,
8539            >,
8540            offset: usize,
8541            depth: fidl::encoding::Depth,
8542        ) -> fidl::Result<()> {
8543            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8544            // Zero out padding regions. There's no need to apply masks
8545            // because the unmasked parts will be overwritten by fields.
8546            // Write the fields.
8547            self.0.encode(encoder, offset + 0, depth)?;
8548            Ok(())
8549        }
8550    }
8551
8552    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8553        for TableOfEndpoints
8554    {
8555        #[inline(always)]
8556        fn new_empty() -> Self {
8557            Self {
8558                t: fidl::new_empty!(
8559                    TableOfEndpointsTable,
8560                    fidl::encoding::DefaultFuchsiaResourceDialect
8561                ),
8562            }
8563        }
8564
8565        #[inline]
8566        unsafe fn decode(
8567            &mut self,
8568            decoder: &mut fidl::encoding::Decoder<
8569                '_,
8570                fidl::encoding::DefaultFuchsiaResourceDialect,
8571            >,
8572            offset: usize,
8573            _depth: fidl::encoding::Depth,
8574        ) -> fidl::Result<()> {
8575            decoder.debug_check_bounds::<Self>(offset);
8576            // Verify that padding bytes are zero.
8577            fidl::decode!(
8578                TableOfEndpointsTable,
8579                fidl::encoding::DefaultFuchsiaResourceDialect,
8580                &mut self.t,
8581                decoder,
8582                offset + 0,
8583                _depth
8584            )?;
8585            Ok(())
8586        }
8587    }
8588
8589    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8590        type Borrowed<'a> = &'a mut Self;
8591        fn take_or_borrow<'a>(
8592            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8593        ) -> Self::Borrowed<'a> {
8594            value
8595        }
8596    }
8597
8598    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8599        type Owned = Self;
8600
8601        #[inline(always)]
8602        fn inline_align(_context: fidl::encoding::Context) -> usize {
8603            8
8604        }
8605
8606        #[inline(always)]
8607        fn inline_size(_context: fidl::encoding::Context) -> usize {
8608            16
8609        }
8610    }
8611
8612    unsafe impl
8613        fidl::encoding::Encode<
8614            TableUnionWithVectorReservedSandwichStruct,
8615            fidl::encoding::DefaultFuchsiaResourceDialect,
8616        > for &mut TableUnionWithVectorReservedSandwichStruct
8617    {
8618        #[inline]
8619        unsafe fn encode(
8620            self,
8621            encoder: &mut fidl::encoding::Encoder<
8622                '_,
8623                fidl::encoding::DefaultFuchsiaResourceDialect,
8624            >,
8625            offset: usize,
8626            _depth: fidl::encoding::Depth,
8627        ) -> fidl::Result<()> {
8628            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8629            // Delegate to tuple encoding.
8630            fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8631                (
8632                    <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8633                ),
8634                encoder, offset, _depth
8635            )
8636        }
8637    }
8638    unsafe impl<
8639        T0: fidl::encoding::Encode<
8640                TableUnionWithVectorReservedSandwich,
8641                fidl::encoding::DefaultFuchsiaResourceDialect,
8642            >,
8643    >
8644        fidl::encoding::Encode<
8645            TableUnionWithVectorReservedSandwichStruct,
8646            fidl::encoding::DefaultFuchsiaResourceDialect,
8647        > for (T0,)
8648    {
8649        #[inline]
8650        unsafe fn encode(
8651            self,
8652            encoder: &mut fidl::encoding::Encoder<
8653                '_,
8654                fidl::encoding::DefaultFuchsiaResourceDialect,
8655            >,
8656            offset: usize,
8657            depth: fidl::encoding::Depth,
8658        ) -> fidl::Result<()> {
8659            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8660            // Zero out padding regions. There's no need to apply masks
8661            // because the unmasked parts will be overwritten by fields.
8662            // Write the fields.
8663            self.0.encode(encoder, offset + 0, depth)?;
8664            Ok(())
8665        }
8666    }
8667
8668    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8669        for TableUnionWithVectorReservedSandwichStruct
8670    {
8671        #[inline(always)]
8672        fn new_empty() -> Self {
8673            Self {
8674                table: fidl::new_empty!(
8675                    TableUnionWithVectorReservedSandwich,
8676                    fidl::encoding::DefaultFuchsiaResourceDialect
8677                ),
8678            }
8679        }
8680
8681        #[inline]
8682        unsafe fn decode(
8683            &mut self,
8684            decoder: &mut fidl::encoding::Decoder<
8685                '_,
8686                fidl::encoding::DefaultFuchsiaResourceDialect,
8687            >,
8688            offset: usize,
8689            _depth: fidl::encoding::Depth,
8690        ) -> fidl::Result<()> {
8691            decoder.debug_check_bounds::<Self>(offset);
8692            // Verify that padding bytes are zero.
8693            fidl::decode!(
8694                TableUnionWithVectorReservedSandwich,
8695                fidl::encoding::DefaultFuchsiaResourceDialect,
8696                &mut self.table,
8697                decoder,
8698                offset + 0,
8699                _depth
8700            )?;
8701            Ok(())
8702        }
8703    }
8704
8705    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8706        type Borrowed<'a> = &'a mut Self;
8707        fn take_or_borrow<'a>(
8708            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8709        ) -> Self::Borrowed<'a> {
8710            value
8711        }
8712    }
8713
8714    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8715        type Owned = Self;
8716
8717        #[inline(always)]
8718        fn inline_align(_context: fidl::encoding::Context) -> usize {
8719            8
8720        }
8721
8722        #[inline(always)]
8723        fn inline_size(_context: fidl::encoding::Context) -> usize {
8724            16
8725        }
8726    }
8727
8728    unsafe impl
8729        fidl::encoding::Encode<
8730            TableUnionWithVectorStructSandwichStruct,
8731            fidl::encoding::DefaultFuchsiaResourceDialect,
8732        > for &mut TableUnionWithVectorStructSandwichStruct
8733    {
8734        #[inline]
8735        unsafe fn encode(
8736            self,
8737            encoder: &mut fidl::encoding::Encoder<
8738                '_,
8739                fidl::encoding::DefaultFuchsiaResourceDialect,
8740            >,
8741            offset: usize,
8742            _depth: fidl::encoding::Depth,
8743        ) -> fidl::Result<()> {
8744            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8745            // Delegate to tuple encoding.
8746            fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8747                (
8748                    <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8749                ),
8750                encoder, offset, _depth
8751            )
8752        }
8753    }
8754    unsafe impl<
8755        T0: fidl::encoding::Encode<
8756                TableUnionWithVectorStructSandwich,
8757                fidl::encoding::DefaultFuchsiaResourceDialect,
8758            >,
8759    >
8760        fidl::encoding::Encode<
8761            TableUnionWithVectorStructSandwichStruct,
8762            fidl::encoding::DefaultFuchsiaResourceDialect,
8763        > for (T0,)
8764    {
8765        #[inline]
8766        unsafe fn encode(
8767            self,
8768            encoder: &mut fidl::encoding::Encoder<
8769                '_,
8770                fidl::encoding::DefaultFuchsiaResourceDialect,
8771            >,
8772            offset: usize,
8773            depth: fidl::encoding::Depth,
8774        ) -> fidl::Result<()> {
8775            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8776            // Zero out padding regions. There's no need to apply masks
8777            // because the unmasked parts will be overwritten by fields.
8778            // Write the fields.
8779            self.0.encode(encoder, offset + 0, depth)?;
8780            Ok(())
8781        }
8782    }
8783
8784    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8785        for TableUnionWithVectorStructSandwichStruct
8786    {
8787        #[inline(always)]
8788        fn new_empty() -> Self {
8789            Self {
8790                table: fidl::new_empty!(
8791                    TableUnionWithVectorStructSandwich,
8792                    fidl::encoding::DefaultFuchsiaResourceDialect
8793                ),
8794            }
8795        }
8796
8797        #[inline]
8798        unsafe fn decode(
8799            &mut self,
8800            decoder: &mut fidl::encoding::Decoder<
8801                '_,
8802                fidl::encoding::DefaultFuchsiaResourceDialect,
8803            >,
8804            offset: usize,
8805            _depth: fidl::encoding::Depth,
8806        ) -> fidl::Result<()> {
8807            decoder.debug_check_bounds::<Self>(offset);
8808            // Verify that padding bytes are zero.
8809            fidl::decode!(
8810                TableUnionWithVectorStructSandwich,
8811                fidl::encoding::DefaultFuchsiaResourceDialect,
8812                &mut self.table,
8813                decoder,
8814                offset + 0,
8815                _depth
8816            )?;
8817            Ok(())
8818        }
8819    }
8820
8821    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
8822        type Borrowed<'a> = &'a mut Self;
8823        fn take_or_borrow<'a>(
8824            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8825        ) -> Self::Borrowed<'a> {
8826            value
8827        }
8828    }
8829
8830    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
8831        type Owned = Self;
8832
8833        #[inline(always)]
8834        fn inline_align(_context: fidl::encoding::Context) -> usize {
8835            8
8836        }
8837
8838        #[inline(always)]
8839        fn inline_size(_context: fidl::encoding::Context) -> usize {
8840            16
8841        }
8842    }
8843
8844    unsafe impl
8845        fidl::encoding::Encode<
8846            TableWithUnknownEnveloepsAfterKnownEnvelopesStruct,
8847            fidl::encoding::DefaultFuchsiaResourceDialect,
8848        > for &mut TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
8849    {
8850        #[inline]
8851        unsafe fn encode(
8852            self,
8853            encoder: &mut fidl::encoding::Encoder<
8854                '_,
8855                fidl::encoding::DefaultFuchsiaResourceDialect,
8856            >,
8857            offset: usize,
8858            _depth: fidl::encoding::Depth,
8859        ) -> fidl::Result<()> {
8860            encoder
8861                .debug_check_bounds::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct>(offset);
8862            // Delegate to tuple encoding.
8863            fidl::encoding::Encode::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8864                (
8865                    <TableWithUnknownEnvelopesAfterKnownEnvelopes as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8866                ),
8867                encoder, offset, _depth
8868            )
8869        }
8870    }
8871    unsafe impl<
8872        T0: fidl::encoding::Encode<
8873                TableWithUnknownEnvelopesAfterKnownEnvelopes,
8874                fidl::encoding::DefaultFuchsiaResourceDialect,
8875            >,
8876    >
8877        fidl::encoding::Encode<
8878            TableWithUnknownEnveloepsAfterKnownEnvelopesStruct,
8879            fidl::encoding::DefaultFuchsiaResourceDialect,
8880        > for (T0,)
8881    {
8882        #[inline]
8883        unsafe fn encode(
8884            self,
8885            encoder: &mut fidl::encoding::Encoder<
8886                '_,
8887                fidl::encoding::DefaultFuchsiaResourceDialect,
8888            >,
8889            offset: usize,
8890            depth: fidl::encoding::Depth,
8891        ) -> fidl::Result<()> {
8892            encoder
8893                .debug_check_bounds::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct>(offset);
8894            // Zero out padding regions. There's no need to apply masks
8895            // because the unmasked parts will be overwritten by fields.
8896            // Write the fields.
8897            self.0.encode(encoder, offset + 0, depth)?;
8898            Ok(())
8899        }
8900    }
8901
8902    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8903        for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
8904    {
8905        #[inline(always)]
8906        fn new_empty() -> Self {
8907            Self {
8908                t: fidl::new_empty!(
8909                    TableWithUnknownEnvelopesAfterKnownEnvelopes,
8910                    fidl::encoding::DefaultFuchsiaResourceDialect
8911                ),
8912            }
8913        }
8914
8915        #[inline]
8916        unsafe fn decode(
8917            &mut self,
8918            decoder: &mut fidl::encoding::Decoder<
8919                '_,
8920                fidl::encoding::DefaultFuchsiaResourceDialect,
8921            >,
8922            offset: usize,
8923            _depth: fidl::encoding::Depth,
8924        ) -> fidl::Result<()> {
8925            decoder.debug_check_bounds::<Self>(offset);
8926            // Verify that padding bytes are zero.
8927            fidl::decode!(
8928                TableWithUnknownEnvelopesAfterKnownEnvelopes,
8929                fidl::encoding::DefaultFuchsiaResourceDialect,
8930                &mut self.t,
8931                decoder,
8932                offset + 0,
8933                _depth
8934            )?;
8935            Ok(())
8936        }
8937    }
8938
8939    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
8940        type Borrowed<'a> = &'a mut Self;
8941        fn take_or_borrow<'a>(
8942            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8943        ) -> Self::Borrowed<'a> {
8944            value
8945        }
8946    }
8947
8948    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
8949        type Owned = Self;
8950
8951        #[inline(always)]
8952        fn inline_align(_context: fidl::encoding::Context) -> usize {
8953            8
8954        }
8955
8956        #[inline(always)]
8957        fn inline_size(_context: fidl::encoding::Context) -> usize {
8958            16
8959        }
8960    }
8961
8962    unsafe impl
8963        fidl::encoding::Encode<
8964            TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct,
8965            fidl::encoding::DefaultFuchsiaResourceDialect,
8966        > for &mut TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
8967    {
8968        #[inline]
8969        unsafe fn encode(
8970            self,
8971            encoder: &mut fidl::encoding::Encoder<
8972                '_,
8973                fidl::encoding::DefaultFuchsiaResourceDialect,
8974            >,
8975            offset: usize,
8976            _depth: fidl::encoding::Depth,
8977        ) -> fidl::Result<()> {
8978            encoder
8979                .debug_check_bounds::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct>(offset);
8980            // Delegate to tuple encoding.
8981            fidl::encoding::Encode::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8982                (
8983                    <TableWithUnknownEnvelopesBeforeKnownEnvelopes as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8984                ),
8985                encoder, offset, _depth
8986            )
8987        }
8988    }
8989    unsafe impl<
8990        T0: fidl::encoding::Encode<
8991                TableWithUnknownEnvelopesBeforeKnownEnvelopes,
8992                fidl::encoding::DefaultFuchsiaResourceDialect,
8993            >,
8994    >
8995        fidl::encoding::Encode<
8996            TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct,
8997            fidl::encoding::DefaultFuchsiaResourceDialect,
8998        > for (T0,)
8999    {
9000        #[inline]
9001        unsafe fn encode(
9002            self,
9003            encoder: &mut fidl::encoding::Encoder<
9004                '_,
9005                fidl::encoding::DefaultFuchsiaResourceDialect,
9006            >,
9007            offset: usize,
9008            depth: fidl::encoding::Depth,
9009        ) -> fidl::Result<()> {
9010            encoder
9011                .debug_check_bounds::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct>(offset);
9012            // Zero out padding regions. There's no need to apply masks
9013            // because the unmasked parts will be overwritten by fields.
9014            // Write the fields.
9015            self.0.encode(encoder, offset + 0, depth)?;
9016            Ok(())
9017        }
9018    }
9019
9020    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9021        for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
9022    {
9023        #[inline(always)]
9024        fn new_empty() -> Self {
9025            Self {
9026                t: fidl::new_empty!(
9027                    TableWithUnknownEnvelopesBeforeKnownEnvelopes,
9028                    fidl::encoding::DefaultFuchsiaResourceDialect
9029                ),
9030            }
9031        }
9032
9033        #[inline]
9034        unsafe fn decode(
9035            &mut self,
9036            decoder: &mut fidl::encoding::Decoder<
9037                '_,
9038                fidl::encoding::DefaultFuchsiaResourceDialect,
9039            >,
9040            offset: usize,
9041            _depth: fidl::encoding::Depth,
9042        ) -> fidl::Result<()> {
9043            decoder.debug_check_bounds::<Self>(offset);
9044            // Verify that padding bytes are zero.
9045            fidl::decode!(
9046                TableWithUnknownEnvelopesBeforeKnownEnvelopes,
9047                fidl::encoding::DefaultFuchsiaResourceDialect,
9048                &mut self.t,
9049                decoder,
9050                offset + 0,
9051                _depth
9052            )?;
9053            Ok(())
9054        }
9055    }
9056
9057    impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
9058        type Borrowed<'a> = &'a mut Self;
9059        fn take_or_borrow<'a>(
9060            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9061        ) -> Self::Borrowed<'a> {
9062            value
9063        }
9064    }
9065
9066    unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
9067        type Owned = Self;
9068
9069        #[inline(always)]
9070        fn inline_align(_context: fidl::encoding::Context) -> usize {
9071            8
9072        }
9073
9074        #[inline(always)]
9075        fn inline_size(_context: fidl::encoding::Context) -> usize {
9076            16
9077        }
9078    }
9079
9080    unsafe impl
9081        fidl::encoding::Encode<
9082            TestFlexibleResourceXUnionInStruct,
9083            fidl::encoding::DefaultFuchsiaResourceDialect,
9084        > for &mut TestFlexibleResourceXUnionInStruct
9085    {
9086        #[inline]
9087        unsafe fn encode(
9088            self,
9089            encoder: &mut fidl::encoding::Encoder<
9090                '_,
9091                fidl::encoding::DefaultFuchsiaResourceDialect,
9092            >,
9093            offset: usize,
9094            _depth: fidl::encoding::Depth,
9095        ) -> fidl::Result<()> {
9096            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
9097            // Delegate to tuple encoding.
9098            fidl::encoding::Encode::<
9099                TestFlexibleResourceXUnionInStruct,
9100                fidl::encoding::DefaultFuchsiaResourceDialect,
9101            >::encode(
9102                (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9103                    &mut self.xu,
9104                ),),
9105                encoder,
9106                offset,
9107                _depth,
9108            )
9109        }
9110    }
9111    unsafe impl<
9112        T0: fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
9113    >
9114        fidl::encoding::Encode<
9115            TestFlexibleResourceXUnionInStruct,
9116            fidl::encoding::DefaultFuchsiaResourceDialect,
9117        > for (T0,)
9118    {
9119        #[inline]
9120        unsafe fn encode(
9121            self,
9122            encoder: &mut fidl::encoding::Encoder<
9123                '_,
9124                fidl::encoding::DefaultFuchsiaResourceDialect,
9125            >,
9126            offset: usize,
9127            depth: fidl::encoding::Depth,
9128        ) -> fidl::Result<()> {
9129            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
9130            // Zero out padding regions. There's no need to apply masks
9131            // because the unmasked parts will be overwritten by fields.
9132            // Write the fields.
9133            self.0.encode(encoder, offset + 0, depth)?;
9134            Ok(())
9135        }
9136    }
9137
9138    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9139        for TestFlexibleResourceXUnionInStruct
9140    {
9141        #[inline(always)]
9142        fn new_empty() -> Self {
9143            Self {
9144                xu: fidl::new_empty!(
9145                    SampleResourceXUnion,
9146                    fidl::encoding::DefaultFuchsiaResourceDialect
9147                ),
9148            }
9149        }
9150
9151        #[inline]
9152        unsafe fn decode(
9153            &mut self,
9154            decoder: &mut fidl::encoding::Decoder<
9155                '_,
9156                fidl::encoding::DefaultFuchsiaResourceDialect,
9157            >,
9158            offset: usize,
9159            _depth: fidl::encoding::Depth,
9160        ) -> fidl::Result<()> {
9161            decoder.debug_check_bounds::<Self>(offset);
9162            // Verify that padding bytes are zero.
9163            fidl::decode!(
9164                SampleResourceXUnion,
9165                fidl::encoding::DefaultFuchsiaResourceDialect,
9166                &mut self.xu,
9167                decoder,
9168                offset + 0,
9169                _depth
9170            )?;
9171            Ok(())
9172        }
9173    }
9174
9175    impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
9176        type Borrowed<'a> = &'a mut Self;
9177        fn take_or_borrow<'a>(
9178            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9179        ) -> Self::Borrowed<'a> {
9180            value
9181        }
9182    }
9183
9184    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
9185        type Owned = Self;
9186
9187        #[inline(always)]
9188        fn inline_align(_context: fidl::encoding::Context) -> usize {
9189            8
9190        }
9191
9192        #[inline(always)]
9193        fn inline_size(_context: fidl::encoding::Context) -> usize {
9194            16
9195        }
9196    }
9197
9198    unsafe impl
9199        fidl::encoding::Encode<
9200            TestOptionalFlexibleResourceXUnionInStruct,
9201            fidl::encoding::DefaultFuchsiaResourceDialect,
9202        > for &mut TestOptionalFlexibleResourceXUnionInStruct
9203    {
9204        #[inline]
9205        unsafe fn encode(
9206            self,
9207            encoder: &mut fidl::encoding::Encoder<
9208                '_,
9209                fidl::encoding::DefaultFuchsiaResourceDialect,
9210            >,
9211            offset: usize,
9212            _depth: fidl::encoding::Depth,
9213        ) -> fidl::Result<()> {
9214            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
9215            // Delegate to tuple encoding.
9216            fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9217                (
9218                    <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9219                ),
9220                encoder, offset, _depth
9221            )
9222        }
9223    }
9224    unsafe impl<
9225        T0: fidl::encoding::Encode<
9226                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9227                fidl::encoding::DefaultFuchsiaResourceDialect,
9228            >,
9229    >
9230        fidl::encoding::Encode<
9231            TestOptionalFlexibleResourceXUnionInStruct,
9232            fidl::encoding::DefaultFuchsiaResourceDialect,
9233        > for (T0,)
9234    {
9235        #[inline]
9236        unsafe fn encode(
9237            self,
9238            encoder: &mut fidl::encoding::Encoder<
9239                '_,
9240                fidl::encoding::DefaultFuchsiaResourceDialect,
9241            >,
9242            offset: usize,
9243            depth: fidl::encoding::Depth,
9244        ) -> fidl::Result<()> {
9245            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
9246            // Zero out padding regions. There's no need to apply masks
9247            // because the unmasked parts will be overwritten by fields.
9248            // Write the fields.
9249            self.0.encode(encoder, offset + 0, depth)?;
9250            Ok(())
9251        }
9252    }
9253
9254    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9255        for TestOptionalFlexibleResourceXUnionInStruct
9256    {
9257        #[inline(always)]
9258        fn new_empty() -> Self {
9259            Self {
9260                xu: fidl::new_empty!(
9261                    fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9262                    fidl::encoding::DefaultFuchsiaResourceDialect
9263                ),
9264            }
9265        }
9266
9267        #[inline]
9268        unsafe fn decode(
9269            &mut self,
9270            decoder: &mut fidl::encoding::Decoder<
9271                '_,
9272                fidl::encoding::DefaultFuchsiaResourceDialect,
9273            >,
9274            offset: usize,
9275            _depth: fidl::encoding::Depth,
9276        ) -> fidl::Result<()> {
9277            decoder.debug_check_bounds::<Self>(offset);
9278            // Verify that padding bytes are zero.
9279            fidl::decode!(
9280                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9281                fidl::encoding::DefaultFuchsiaResourceDialect,
9282                &mut self.xu,
9283                decoder,
9284                offset + 0,
9285                _depth
9286            )?;
9287            Ok(())
9288        }
9289    }
9290
9291    impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9292        type Borrowed<'a> = &'a mut Self;
9293        fn take_or_borrow<'a>(
9294            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9295        ) -> Self::Borrowed<'a> {
9296            value
9297        }
9298    }
9299
9300    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9301        type Owned = Self;
9302
9303        #[inline(always)]
9304        fn inline_align(_context: fidl::encoding::Context) -> usize {
9305            8
9306        }
9307
9308        #[inline(always)]
9309        fn inline_size(_context: fidl::encoding::Context) -> usize {
9310            16
9311        }
9312    }
9313
9314    unsafe impl
9315        fidl::encoding::Encode<
9316            TestOptionalStrictResourceXUnionInStruct,
9317            fidl::encoding::DefaultFuchsiaResourceDialect,
9318        > for &mut TestOptionalStrictResourceXUnionInStruct
9319    {
9320        #[inline]
9321        unsafe fn encode(
9322            self,
9323            encoder: &mut fidl::encoding::Encoder<
9324                '_,
9325                fidl::encoding::DefaultFuchsiaResourceDialect,
9326            >,
9327            offset: usize,
9328            _depth: fidl::encoding::Depth,
9329        ) -> fidl::Result<()> {
9330            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9331            // Delegate to tuple encoding.
9332            fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9333                (
9334                    <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9335                ),
9336                encoder, offset, _depth
9337            )
9338        }
9339    }
9340    unsafe impl<
9341        T0: fidl::encoding::Encode<
9342                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9343                fidl::encoding::DefaultFuchsiaResourceDialect,
9344            >,
9345    >
9346        fidl::encoding::Encode<
9347            TestOptionalStrictResourceXUnionInStruct,
9348            fidl::encoding::DefaultFuchsiaResourceDialect,
9349        > for (T0,)
9350    {
9351        #[inline]
9352        unsafe fn encode(
9353            self,
9354            encoder: &mut fidl::encoding::Encoder<
9355                '_,
9356                fidl::encoding::DefaultFuchsiaResourceDialect,
9357            >,
9358            offset: usize,
9359            depth: fidl::encoding::Depth,
9360        ) -> fidl::Result<()> {
9361            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9362            // Zero out padding regions. There's no need to apply masks
9363            // because the unmasked parts will be overwritten by fields.
9364            // Write the fields.
9365            self.0.encode(encoder, offset + 0, depth)?;
9366            Ok(())
9367        }
9368    }
9369
9370    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9371        for TestOptionalStrictResourceXUnionInStruct
9372    {
9373        #[inline(always)]
9374        fn new_empty() -> Self {
9375            Self {
9376                xu: fidl::new_empty!(
9377                    fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9378                    fidl::encoding::DefaultFuchsiaResourceDialect
9379                ),
9380            }
9381        }
9382
9383        #[inline]
9384        unsafe fn decode(
9385            &mut self,
9386            decoder: &mut fidl::encoding::Decoder<
9387                '_,
9388                fidl::encoding::DefaultFuchsiaResourceDialect,
9389            >,
9390            offset: usize,
9391            _depth: fidl::encoding::Depth,
9392        ) -> fidl::Result<()> {
9393            decoder.debug_check_bounds::<Self>(offset);
9394            // Verify that padding bytes are zero.
9395            fidl::decode!(
9396                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9397                fidl::encoding::DefaultFuchsiaResourceDialect,
9398                &mut self.xu,
9399                decoder,
9400                offset + 0,
9401                _depth
9402            )?;
9403            Ok(())
9404        }
9405    }
9406
9407    impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9408        type Borrowed<'a> = &'a mut Self;
9409        fn take_or_borrow<'a>(
9410            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9411        ) -> Self::Borrowed<'a> {
9412            value
9413        }
9414    }
9415
9416    unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9417        type Owned = Self;
9418
9419        #[inline(always)]
9420        fn inline_align(_context: fidl::encoding::Context) -> usize {
9421            8
9422        }
9423
9424        #[inline(always)]
9425        fn inline_size(_context: fidl::encoding::Context) -> usize {
9426            40
9427        }
9428    }
9429
9430    unsafe impl
9431        fidl::encoding::Encode<
9432            TestPackageResolverResolveRequest,
9433            fidl::encoding::DefaultFuchsiaResourceDialect,
9434        > for &mut TestPackageResolverResolveRequest
9435    {
9436        #[inline]
9437        unsafe fn encode(
9438            self,
9439            encoder: &mut fidl::encoding::Encoder<
9440                '_,
9441                fidl::encoding::DefaultFuchsiaResourceDialect,
9442            >,
9443            offset: usize,
9444            _depth: fidl::encoding::Depth,
9445        ) -> fidl::Result<()> {
9446            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9447            // Delegate to tuple encoding.
9448            fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9449                (
9450                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9451                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9452                    <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9453                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9454                ),
9455                encoder, offset, _depth
9456            )
9457        }
9458    }
9459    unsafe impl<
9460        T0: fidl::encoding::Encode<
9461                fidl::encoding::UnboundedString,
9462                fidl::encoding::DefaultFuchsiaResourceDialect,
9463            >,
9464        T1: fidl::encoding::Encode<
9465                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9466                fidl::encoding::DefaultFuchsiaResourceDialect,
9467            >,
9468        T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9469        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9470    >
9471        fidl::encoding::Encode<
9472            TestPackageResolverResolveRequest,
9473            fidl::encoding::DefaultFuchsiaResourceDialect,
9474        > for (T0, T1, T2, T3)
9475    {
9476        #[inline]
9477        unsafe fn encode(
9478            self,
9479            encoder: &mut fidl::encoding::Encoder<
9480                '_,
9481                fidl::encoding::DefaultFuchsiaResourceDialect,
9482            >,
9483            offset: usize,
9484            depth: fidl::encoding::Depth,
9485        ) -> fidl::Result<()> {
9486            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9487            // Zero out padding regions. There's no need to apply masks
9488            // because the unmasked parts will be overwritten by fields.
9489            unsafe {
9490                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9491                (ptr as *mut u64).write_unaligned(0);
9492            }
9493            // Write the fields.
9494            self.0.encode(encoder, offset + 0, depth)?;
9495            self.1.encode(encoder, offset + 16, depth)?;
9496            self.2.encode(encoder, offset + 32, depth)?;
9497            self.3.encode(encoder, offset + 36, depth)?;
9498            Ok(())
9499        }
9500    }
9501
9502    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9503        for TestPackageResolverResolveRequest
9504    {
9505        #[inline(always)]
9506        fn new_empty() -> Self {
9507            Self {
9508                package_url: fidl::new_empty!(
9509                    fidl::encoding::UnboundedString,
9510                    fidl::encoding::DefaultFuchsiaResourceDialect
9511                ),
9512                selectors: fidl::new_empty!(
9513                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9514                    fidl::encoding::DefaultFuchsiaResourceDialect
9515                ),
9516                update_policy: fidl::new_empty!(
9517                    UpdatePolicy,
9518                    fidl::encoding::DefaultFuchsiaResourceDialect
9519                ),
9520                this_should_be_a_handle: fidl::new_empty!(
9521                    u32,
9522                    fidl::encoding::DefaultFuchsiaResourceDialect
9523                ),
9524            }
9525        }
9526
9527        #[inline]
9528        unsafe fn decode(
9529            &mut self,
9530            decoder: &mut fidl::encoding::Decoder<
9531                '_,
9532                fidl::encoding::DefaultFuchsiaResourceDialect,
9533            >,
9534            offset: usize,
9535            _depth: fidl::encoding::Depth,
9536        ) -> fidl::Result<()> {
9537            decoder.debug_check_bounds::<Self>(offset);
9538            // Verify that padding bytes are zero.
9539            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9540            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9541            let mask = 0xffff0000u64;
9542            let maskedval = padval & mask;
9543            if maskedval != 0 {
9544                return Err(fidl::Error::NonZeroPadding {
9545                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9546                });
9547            }
9548            fidl::decode!(
9549                fidl::encoding::UnboundedString,
9550                fidl::encoding::DefaultFuchsiaResourceDialect,
9551                &mut self.package_url,
9552                decoder,
9553                offset + 0,
9554                _depth
9555            )?;
9556            fidl::decode!(
9557                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9558                fidl::encoding::DefaultFuchsiaResourceDialect,
9559                &mut self.selectors,
9560                decoder,
9561                offset + 16,
9562                _depth
9563            )?;
9564            fidl::decode!(
9565                UpdatePolicy,
9566                fidl::encoding::DefaultFuchsiaResourceDialect,
9567                &mut self.update_policy,
9568                decoder,
9569                offset + 32,
9570                _depth
9571            )?;
9572            fidl::decode!(
9573                u32,
9574                fidl::encoding::DefaultFuchsiaResourceDialect,
9575                &mut self.this_should_be_a_handle,
9576                decoder,
9577                offset + 36,
9578                _depth
9579            )?;
9580            Ok(())
9581        }
9582    }
9583
9584    impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
9585        type Borrowed<'a> = &'a mut Self;
9586        fn take_or_borrow<'a>(
9587            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9588        ) -> Self::Borrowed<'a> {
9589            value
9590        }
9591    }
9592
9593    unsafe impl fidl::encoding::TypeMarker for TestStrictResourceXUnionInStruct {
9594        type Owned = Self;
9595
9596        #[inline(always)]
9597        fn inline_align(_context: fidl::encoding::Context) -> usize {
9598            8
9599        }
9600
9601        #[inline(always)]
9602        fn inline_size(_context: fidl::encoding::Context) -> usize {
9603            16
9604        }
9605    }
9606
9607    unsafe impl
9608        fidl::encoding::Encode<
9609            TestStrictResourceXUnionInStruct,
9610            fidl::encoding::DefaultFuchsiaResourceDialect,
9611        > for &mut TestStrictResourceXUnionInStruct
9612    {
9613        #[inline]
9614        unsafe fn encode(
9615            self,
9616            encoder: &mut fidl::encoding::Encoder<
9617                '_,
9618                fidl::encoding::DefaultFuchsiaResourceDialect,
9619            >,
9620            offset: usize,
9621            _depth: fidl::encoding::Depth,
9622        ) -> fidl::Result<()> {
9623            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9624            // Delegate to tuple encoding.
9625            fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9626                (
9627                    <SampleStrictResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9628                ),
9629                encoder, offset, _depth
9630            )
9631        }
9632    }
9633    unsafe impl<
9634        T0: fidl::encoding::Encode<
9635                SampleStrictResourceXUnion,
9636                fidl::encoding::DefaultFuchsiaResourceDialect,
9637            >,
9638    >
9639        fidl::encoding::Encode<
9640            TestStrictResourceXUnionInStruct,
9641            fidl::encoding::DefaultFuchsiaResourceDialect,
9642        > for (T0,)
9643    {
9644        #[inline]
9645        unsafe fn encode(
9646            self,
9647            encoder: &mut fidl::encoding::Encoder<
9648                '_,
9649                fidl::encoding::DefaultFuchsiaResourceDialect,
9650            >,
9651            offset: usize,
9652            depth: fidl::encoding::Depth,
9653        ) -> fidl::Result<()> {
9654            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9655            // Zero out padding regions. There's no need to apply masks
9656            // because the unmasked parts will be overwritten by fields.
9657            // Write the fields.
9658            self.0.encode(encoder, offset + 0, depth)?;
9659            Ok(())
9660        }
9661    }
9662
9663    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9664        for TestStrictResourceXUnionInStruct
9665    {
9666        #[inline(always)]
9667        fn new_empty() -> Self {
9668            Self {
9669                xu: fidl::new_empty!(
9670                    SampleStrictResourceXUnion,
9671                    fidl::encoding::DefaultFuchsiaResourceDialect
9672                ),
9673            }
9674        }
9675
9676        #[inline]
9677        unsafe fn decode(
9678            &mut self,
9679            decoder: &mut fidl::encoding::Decoder<
9680                '_,
9681                fidl::encoding::DefaultFuchsiaResourceDialect,
9682            >,
9683            offset: usize,
9684            _depth: fidl::encoding::Depth,
9685        ) -> fidl::Result<()> {
9686            decoder.debug_check_bounds::<Self>(offset);
9687            // Verify that padding bytes are zero.
9688            fidl::decode!(
9689                SampleStrictResourceXUnion,
9690                fidl::encoding::DefaultFuchsiaResourceDialect,
9691                &mut self.xu,
9692                decoder,
9693                offset + 0,
9694                _depth
9695            )?;
9696            Ok(())
9697        }
9698    }
9699
9700    impl fidl::encoding::ResourceTypeMarker for UnboundedNonnullableVectorOfHandles {
9701        type Borrowed<'a> = &'a mut Self;
9702        fn take_or_borrow<'a>(
9703            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9704        ) -> Self::Borrowed<'a> {
9705            value
9706        }
9707    }
9708
9709    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfHandles {
9710        type Owned = Self;
9711
9712        #[inline(always)]
9713        fn inline_align(_context: fidl::encoding::Context) -> usize {
9714            8
9715        }
9716
9717        #[inline(always)]
9718        fn inline_size(_context: fidl::encoding::Context) -> usize {
9719            16
9720        }
9721    }
9722
9723    unsafe impl
9724        fidl::encoding::Encode<
9725            UnboundedNonnullableVectorOfHandles,
9726            fidl::encoding::DefaultFuchsiaResourceDialect,
9727        > for &mut UnboundedNonnullableVectorOfHandles
9728    {
9729        #[inline]
9730        unsafe fn encode(
9731            self,
9732            encoder: &mut fidl::encoding::Encoder<
9733                '_,
9734                fidl::encoding::DefaultFuchsiaResourceDialect,
9735            >,
9736            offset: usize,
9737            _depth: fidl::encoding::Depth,
9738        ) -> fidl::Result<()> {
9739            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9740            // Delegate to tuple encoding.
9741            fidl::encoding::Encode::<
9742                UnboundedNonnullableVectorOfHandles,
9743                fidl::encoding::DefaultFuchsiaResourceDialect,
9744            >::encode(
9745                (<fidl::encoding::UnboundedVector<
9746                    fidl::encoding::HandleType<
9747                        fidl::NullableHandle,
9748                        { fidl::ObjectType::NONE.into_raw() },
9749                        2147483648,
9750                    >,
9751                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9752                    &mut self.vh0
9753                ),),
9754                encoder,
9755                offset,
9756                _depth,
9757            )
9758        }
9759    }
9760    unsafe impl<
9761        T0: fidl::encoding::Encode<
9762                fidl::encoding::UnboundedVector<
9763                    fidl::encoding::HandleType<
9764                        fidl::NullableHandle,
9765                        { fidl::ObjectType::NONE.into_raw() },
9766                        2147483648,
9767                    >,
9768                >,
9769                fidl::encoding::DefaultFuchsiaResourceDialect,
9770            >,
9771    >
9772        fidl::encoding::Encode<
9773            UnboundedNonnullableVectorOfHandles,
9774            fidl::encoding::DefaultFuchsiaResourceDialect,
9775        > for (T0,)
9776    {
9777        #[inline]
9778        unsafe fn encode(
9779            self,
9780            encoder: &mut fidl::encoding::Encoder<
9781                '_,
9782                fidl::encoding::DefaultFuchsiaResourceDialect,
9783            >,
9784            offset: usize,
9785            depth: fidl::encoding::Depth,
9786        ) -> fidl::Result<()> {
9787            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9788            // Zero out padding regions. There's no need to apply masks
9789            // because the unmasked parts will be overwritten by fields.
9790            // Write the fields.
9791            self.0.encode(encoder, offset + 0, depth)?;
9792            Ok(())
9793        }
9794    }
9795
9796    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9797        for UnboundedNonnullableVectorOfHandles
9798    {
9799        #[inline(always)]
9800        fn new_empty() -> Self {
9801            Self {
9802                vh0: fidl::new_empty!(
9803                    fidl::encoding::UnboundedVector<
9804                        fidl::encoding::HandleType<
9805                            fidl::NullableHandle,
9806                            { fidl::ObjectType::NONE.into_raw() },
9807                            2147483648,
9808                        >,
9809                    >,
9810                    fidl::encoding::DefaultFuchsiaResourceDialect
9811                ),
9812            }
9813        }
9814
9815        #[inline]
9816        unsafe fn decode(
9817            &mut self,
9818            decoder: &mut fidl::encoding::Decoder<
9819                '_,
9820                fidl::encoding::DefaultFuchsiaResourceDialect,
9821            >,
9822            offset: usize,
9823            _depth: fidl::encoding::Depth,
9824        ) -> fidl::Result<()> {
9825            decoder.debug_check_bounds::<Self>(offset);
9826            // Verify that padding bytes are zero.
9827            fidl::decode!(
9828                fidl::encoding::UnboundedVector<
9829                    fidl::encoding::HandleType<
9830                        fidl::NullableHandle,
9831                        { fidl::ObjectType::NONE.into_raw() },
9832                        2147483648,
9833                    >,
9834                >,
9835                fidl::encoding::DefaultFuchsiaResourceDialect,
9836                &mut self.vh0,
9837                decoder,
9838                offset + 0,
9839                _depth
9840            )?;
9841            Ok(())
9842        }
9843    }
9844
9845    impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9846        type Borrowed<'a> = &'a mut Self;
9847        fn take_or_borrow<'a>(
9848            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9849        ) -> Self::Borrowed<'a> {
9850            value
9851        }
9852    }
9853
9854    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9855        type Owned = Self;
9856
9857        #[inline(always)]
9858        fn inline_align(_context: fidl::encoding::Context) -> usize {
9859            8
9860        }
9861
9862        #[inline(always)]
9863        fn inline_size(_context: fidl::encoding::Context) -> usize {
9864            16
9865        }
9866    }
9867
9868    unsafe impl
9869        fidl::encoding::Encode<
9870            UnboundedNullableVectorOfHandles,
9871            fidl::encoding::DefaultFuchsiaResourceDialect,
9872        > for &mut UnboundedNullableVectorOfHandles
9873    {
9874        #[inline]
9875        unsafe fn encode(
9876            self,
9877            encoder: &mut fidl::encoding::Encoder<
9878                '_,
9879                fidl::encoding::DefaultFuchsiaResourceDialect,
9880            >,
9881            offset: usize,
9882            _depth: fidl::encoding::Depth,
9883        ) -> fidl::Result<()> {
9884            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9885            // Delegate to tuple encoding.
9886            fidl::encoding::Encode::<
9887                UnboundedNullableVectorOfHandles,
9888                fidl::encoding::DefaultFuchsiaResourceDialect,
9889            >::encode(
9890                (<fidl::encoding::Optional<
9891                    fidl::encoding::UnboundedVector<
9892                        fidl::encoding::HandleType<
9893                            fidl::NullableHandle,
9894                            { fidl::ObjectType::NONE.into_raw() },
9895                            2147483648,
9896                        >,
9897                    >,
9898                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9899                    &mut self.vh0
9900                ),),
9901                encoder,
9902                offset,
9903                _depth,
9904            )
9905        }
9906    }
9907    unsafe impl<
9908        T0: fidl::encoding::Encode<
9909                fidl::encoding::Optional<
9910                    fidl::encoding::UnboundedVector<
9911                        fidl::encoding::HandleType<
9912                            fidl::NullableHandle,
9913                            { fidl::ObjectType::NONE.into_raw() },
9914                            2147483648,
9915                        >,
9916                    >,
9917                >,
9918                fidl::encoding::DefaultFuchsiaResourceDialect,
9919            >,
9920    >
9921        fidl::encoding::Encode<
9922            UnboundedNullableVectorOfHandles,
9923            fidl::encoding::DefaultFuchsiaResourceDialect,
9924        > for (T0,)
9925    {
9926        #[inline]
9927        unsafe fn encode(
9928            self,
9929            encoder: &mut fidl::encoding::Encoder<
9930                '_,
9931                fidl::encoding::DefaultFuchsiaResourceDialect,
9932            >,
9933            offset: usize,
9934            depth: fidl::encoding::Depth,
9935        ) -> fidl::Result<()> {
9936            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9937            // Zero out padding regions. There's no need to apply masks
9938            // because the unmasked parts will be overwritten by fields.
9939            // Write the fields.
9940            self.0.encode(encoder, offset + 0, depth)?;
9941            Ok(())
9942        }
9943    }
9944
9945    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9946        for UnboundedNullableVectorOfHandles
9947    {
9948        #[inline(always)]
9949        fn new_empty() -> Self {
9950            Self {
9951                vh0: fidl::new_empty!(
9952                    fidl::encoding::Optional<
9953                        fidl::encoding::UnboundedVector<
9954                            fidl::encoding::HandleType<
9955                                fidl::NullableHandle,
9956                                { fidl::ObjectType::NONE.into_raw() },
9957                                2147483648,
9958                            >,
9959                        >,
9960                    >,
9961                    fidl::encoding::DefaultFuchsiaResourceDialect
9962                ),
9963            }
9964        }
9965
9966        #[inline]
9967        unsafe fn decode(
9968            &mut self,
9969            decoder: &mut fidl::encoding::Decoder<
9970                '_,
9971                fidl::encoding::DefaultFuchsiaResourceDialect,
9972            >,
9973            offset: usize,
9974            _depth: fidl::encoding::Depth,
9975        ) -> fidl::Result<()> {
9976            decoder.debug_check_bounds::<Self>(offset);
9977            // Verify that padding bytes are zero.
9978            fidl::decode!(
9979                fidl::encoding::Optional<
9980                    fidl::encoding::UnboundedVector<
9981                        fidl::encoding::HandleType<
9982                            fidl::NullableHandle,
9983                            { fidl::ObjectType::NONE.into_raw() },
9984                            2147483648,
9985                        >,
9986                    >,
9987                >,
9988                fidl::encoding::DefaultFuchsiaResourceDialect,
9989                &mut self.vh0,
9990                decoder,
9991                offset + 0,
9992                _depth
9993            )?;
9994            Ok(())
9995        }
9996    }
9997
9998    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
9999        type Borrowed<'a> = &'a mut Self;
10000        fn take_or_borrow<'a>(
10001            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10002        ) -> Self::Borrowed<'a> {
10003            value
10004        }
10005    }
10006
10007    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
10008        type Owned = Self;
10009
10010        #[inline(always)]
10011        fn inline_align(_context: fidl::encoding::Context) -> usize {
10012            8
10013        }
10014
10015        #[inline(always)]
10016        fn inline_size(_context: fidl::encoding::Context) -> usize {
10017            16
10018        }
10019    }
10020
10021    unsafe impl
10022        fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
10023        for &mut UnionOfEndpoints
10024    {
10025        #[inline]
10026        unsafe fn encode(
10027            self,
10028            encoder: &mut fidl::encoding::Encoder<
10029                '_,
10030                fidl::encoding::DefaultFuchsiaResourceDialect,
10031            >,
10032            offset: usize,
10033            _depth: fidl::encoding::Depth,
10034        ) -> fidl::Result<()> {
10035            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
10036            // Delegate to tuple encoding.
10037            fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10038                (
10039                    <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10040                ),
10041                encoder, offset, _depth
10042            )
10043        }
10044    }
10045    unsafe impl<
10046        T0: fidl::encoding::Encode<
10047                UnionOfEndpointsUnion,
10048                fidl::encoding::DefaultFuchsiaResourceDialect,
10049            >,
10050    > fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
10051        for (T0,)
10052    {
10053        #[inline]
10054        unsafe fn encode(
10055            self,
10056            encoder: &mut fidl::encoding::Encoder<
10057                '_,
10058                fidl::encoding::DefaultFuchsiaResourceDialect,
10059            >,
10060            offset: usize,
10061            depth: fidl::encoding::Depth,
10062        ) -> fidl::Result<()> {
10063            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
10064            // Zero out padding regions. There's no need to apply masks
10065            // because the unmasked parts will be overwritten by fields.
10066            // Write the fields.
10067            self.0.encode(encoder, offset + 0, depth)?;
10068            Ok(())
10069        }
10070    }
10071
10072    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10073        for UnionOfEndpoints
10074    {
10075        #[inline(always)]
10076        fn new_empty() -> Self {
10077            Self {
10078                u: fidl::new_empty!(
10079                    UnionOfEndpointsUnion,
10080                    fidl::encoding::DefaultFuchsiaResourceDialect
10081                ),
10082            }
10083        }
10084
10085        #[inline]
10086        unsafe fn decode(
10087            &mut self,
10088            decoder: &mut fidl::encoding::Decoder<
10089                '_,
10090                fidl::encoding::DefaultFuchsiaResourceDialect,
10091            >,
10092            offset: usize,
10093            _depth: fidl::encoding::Depth,
10094        ) -> fidl::Result<()> {
10095            decoder.debug_check_bounds::<Self>(offset);
10096            // Verify that padding bytes are zero.
10097            fidl::decode!(
10098                UnionOfEndpointsUnion,
10099                fidl::encoding::DefaultFuchsiaResourceDialect,
10100                &mut self.u,
10101                decoder,
10102                offset + 0,
10103                _depth
10104            )?;
10105            Ok(())
10106        }
10107    }
10108
10109    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
10110        type Borrowed<'a> = &'a mut Self;
10111        fn take_or_borrow<'a>(
10112            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10113        ) -> Self::Borrowed<'a> {
10114            value
10115        }
10116    }
10117
10118    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
10119        type Owned = Self;
10120
10121        #[inline(always)]
10122        fn inline_align(_context: fidl::encoding::Context) -> usize {
10123            8
10124        }
10125
10126        #[inline(always)]
10127        fn inline_size(_context: fidl::encoding::Context) -> usize {
10128            16
10129        }
10130    }
10131
10132    unsafe impl
10133        fidl::encoding::Encode<
10134            VectorOfArrayOfEventInStructWithDefaultRights,
10135            fidl::encoding::DefaultFuchsiaResourceDialect,
10136        > for &mut VectorOfArrayOfEventInStructWithDefaultRights
10137    {
10138        #[inline]
10139        unsafe fn encode(
10140            self,
10141            encoder: &mut fidl::encoding::Encoder<
10142                '_,
10143                fidl::encoding::DefaultFuchsiaResourceDialect,
10144            >,
10145            offset: usize,
10146            _depth: fidl::encoding::Depth,
10147        ) -> fidl::Result<()> {
10148            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
10149            // Delegate to tuple encoding.
10150            fidl::encoding::Encode::<
10151                VectorOfArrayOfEventInStructWithDefaultRights,
10152                fidl::encoding::DefaultFuchsiaResourceDialect,
10153            >::encode(
10154                (<fidl::encoding::Vector<
10155                    fidl::encoding::Array<
10156                        fidl::encoding::HandleType<
10157                            fidl::Event,
10158                            { fidl::ObjectType::EVENT.into_raw() },
10159                            53251,
10160                        >,
10161                        1,
10162                    >,
10163                    1,
10164                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10165                    &mut self.h
10166                ),),
10167                encoder,
10168                offset,
10169                _depth,
10170            )
10171        }
10172    }
10173    unsafe impl<
10174        T0: fidl::encoding::Encode<
10175                fidl::encoding::Vector<
10176                    fidl::encoding::Array<
10177                        fidl::encoding::HandleType<
10178                            fidl::Event,
10179                            { fidl::ObjectType::EVENT.into_raw() },
10180                            53251,
10181                        >,
10182                        1,
10183                    >,
10184                    1,
10185                >,
10186                fidl::encoding::DefaultFuchsiaResourceDialect,
10187            >,
10188    >
10189        fidl::encoding::Encode<
10190            VectorOfArrayOfEventInStructWithDefaultRights,
10191            fidl::encoding::DefaultFuchsiaResourceDialect,
10192        > for (T0,)
10193    {
10194        #[inline]
10195        unsafe fn encode(
10196            self,
10197            encoder: &mut fidl::encoding::Encoder<
10198                '_,
10199                fidl::encoding::DefaultFuchsiaResourceDialect,
10200            >,
10201            offset: usize,
10202            depth: fidl::encoding::Depth,
10203        ) -> fidl::Result<()> {
10204            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
10205            // Zero out padding regions. There's no need to apply masks
10206            // because the unmasked parts will be overwritten by fields.
10207            // Write the fields.
10208            self.0.encode(encoder, offset + 0, depth)?;
10209            Ok(())
10210        }
10211    }
10212
10213    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10214        for VectorOfArrayOfEventInStructWithDefaultRights
10215    {
10216        #[inline(always)]
10217        fn new_empty() -> Self {
10218            Self {
10219                h: fidl::new_empty!(
10220                    fidl::encoding::Vector<
10221                        fidl::encoding::Array<
10222                            fidl::encoding::HandleType<
10223                                fidl::Event,
10224                                { fidl::ObjectType::EVENT.into_raw() },
10225                                53251,
10226                            >,
10227                            1,
10228                        >,
10229                        1,
10230                    >,
10231                    fidl::encoding::DefaultFuchsiaResourceDialect
10232                ),
10233            }
10234        }
10235
10236        #[inline]
10237        unsafe fn decode(
10238            &mut self,
10239            decoder: &mut fidl::encoding::Decoder<
10240                '_,
10241                fidl::encoding::DefaultFuchsiaResourceDialect,
10242            >,
10243            offset: usize,
10244            _depth: fidl::encoding::Depth,
10245        ) -> fidl::Result<()> {
10246            decoder.debug_check_bounds::<Self>(offset);
10247            // Verify that padding bytes are zero.
10248            fidl::decode!(
10249                fidl::encoding::Vector<
10250                    fidl::encoding::Array<
10251                        fidl::encoding::HandleType<
10252                            fidl::Event,
10253                            { fidl::ObjectType::EVENT.into_raw() },
10254                            53251,
10255                        >,
10256                        1,
10257                    >,
10258                    1,
10259                >,
10260                fidl::encoding::DefaultFuchsiaResourceDialect,
10261                &mut self.h,
10262                decoder,
10263                offset + 0,
10264                _depth
10265            )?;
10266            Ok(())
10267        }
10268    }
10269
10270    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10271        type Borrowed<'a> = &'a mut Self;
10272        fn take_or_borrow<'a>(
10273            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10274        ) -> Self::Borrowed<'a> {
10275            value
10276        }
10277    }
10278
10279    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10280        type Owned = Self;
10281
10282        #[inline(always)]
10283        fn inline_align(_context: fidl::encoding::Context) -> usize {
10284            8
10285        }
10286
10287        #[inline(always)]
10288        fn inline_size(_context: fidl::encoding::Context) -> usize {
10289            16
10290        }
10291    }
10292
10293    unsafe impl
10294        fidl::encoding::Encode<
10295            VectorOfArrayOfEventInStructWithReducedRights,
10296            fidl::encoding::DefaultFuchsiaResourceDialect,
10297        > for &mut VectorOfArrayOfEventInStructWithReducedRights
10298    {
10299        #[inline]
10300        unsafe fn encode(
10301            self,
10302            encoder: &mut fidl::encoding::Encoder<
10303                '_,
10304                fidl::encoding::DefaultFuchsiaResourceDialect,
10305            >,
10306            offset: usize,
10307            _depth: fidl::encoding::Depth,
10308        ) -> fidl::Result<()> {
10309            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10310            // Delegate to tuple encoding.
10311            fidl::encoding::Encode::<
10312                VectorOfArrayOfEventInStructWithReducedRights,
10313                fidl::encoding::DefaultFuchsiaResourceDialect,
10314            >::encode(
10315                (<fidl::encoding::Vector<
10316                    fidl::encoding::Array<
10317                        fidl::encoding::HandleType<
10318                            fidl::Event,
10319                            { fidl::ObjectType::EVENT.into_raw() },
10320                            49155,
10321                        >,
10322                        1,
10323                    >,
10324                    1,
10325                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10326                    &mut self.h
10327                ),),
10328                encoder,
10329                offset,
10330                _depth,
10331            )
10332        }
10333    }
10334    unsafe impl<
10335        T0: fidl::encoding::Encode<
10336                fidl::encoding::Vector<
10337                    fidl::encoding::Array<
10338                        fidl::encoding::HandleType<
10339                            fidl::Event,
10340                            { fidl::ObjectType::EVENT.into_raw() },
10341                            49155,
10342                        >,
10343                        1,
10344                    >,
10345                    1,
10346                >,
10347                fidl::encoding::DefaultFuchsiaResourceDialect,
10348            >,
10349    >
10350        fidl::encoding::Encode<
10351            VectorOfArrayOfEventInStructWithReducedRights,
10352            fidl::encoding::DefaultFuchsiaResourceDialect,
10353        > for (T0,)
10354    {
10355        #[inline]
10356        unsafe fn encode(
10357            self,
10358            encoder: &mut fidl::encoding::Encoder<
10359                '_,
10360                fidl::encoding::DefaultFuchsiaResourceDialect,
10361            >,
10362            offset: usize,
10363            depth: fidl::encoding::Depth,
10364        ) -> fidl::Result<()> {
10365            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10366            // Zero out padding regions. There's no need to apply masks
10367            // because the unmasked parts will be overwritten by fields.
10368            // Write the fields.
10369            self.0.encode(encoder, offset + 0, depth)?;
10370            Ok(())
10371        }
10372    }
10373
10374    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10375        for VectorOfArrayOfEventInStructWithReducedRights
10376    {
10377        #[inline(always)]
10378        fn new_empty() -> Self {
10379            Self {
10380                h: fidl::new_empty!(
10381                    fidl::encoding::Vector<
10382                        fidl::encoding::Array<
10383                            fidl::encoding::HandleType<
10384                                fidl::Event,
10385                                { fidl::ObjectType::EVENT.into_raw() },
10386                                49155,
10387                            >,
10388                            1,
10389                        >,
10390                        1,
10391                    >,
10392                    fidl::encoding::DefaultFuchsiaResourceDialect
10393                ),
10394            }
10395        }
10396
10397        #[inline]
10398        unsafe fn decode(
10399            &mut self,
10400            decoder: &mut fidl::encoding::Decoder<
10401                '_,
10402                fidl::encoding::DefaultFuchsiaResourceDialect,
10403            >,
10404            offset: usize,
10405            _depth: fidl::encoding::Depth,
10406        ) -> fidl::Result<()> {
10407            decoder.debug_check_bounds::<Self>(offset);
10408            // Verify that padding bytes are zero.
10409            fidl::decode!(
10410                fidl::encoding::Vector<
10411                    fidl::encoding::Array<
10412                        fidl::encoding::HandleType<
10413                            fidl::Event,
10414                            { fidl::ObjectType::EVENT.into_raw() },
10415                            49155,
10416                        >,
10417                        1,
10418                    >,
10419                    1,
10420                >,
10421                fidl::encoding::DefaultFuchsiaResourceDialect,
10422                &mut self.h,
10423                decoder,
10424                offset + 0,
10425                _depth
10426            )?;
10427            Ok(())
10428        }
10429    }
10430
10431    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10432        type Borrowed<'a> = &'a mut Self;
10433        fn take_or_borrow<'a>(
10434            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10435        ) -> Self::Borrowed<'a> {
10436            value
10437        }
10438    }
10439
10440    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10441        type Owned = Self;
10442
10443        #[inline(always)]
10444        fn inline_align(_context: fidl::encoding::Context) -> usize {
10445            8
10446        }
10447
10448        #[inline(always)]
10449        fn inline_size(_context: fidl::encoding::Context) -> usize {
10450            16
10451        }
10452    }
10453
10454    unsafe impl
10455        fidl::encoding::Encode<
10456            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10457            fidl::encoding::DefaultFuchsiaResourceDialect,
10458        > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10459    {
10460        #[inline]
10461        unsafe fn encode(
10462            self,
10463            encoder: &mut fidl::encoding::Encoder<
10464                '_,
10465                fidl::encoding::DefaultFuchsiaResourceDialect,
10466            >,
10467            offset: usize,
10468            _depth: fidl::encoding::Depth,
10469        ) -> fidl::Result<()> {
10470            encoder
10471                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10472            // Delegate to tuple encoding.
10473            fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10474                (
10475                    <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10476                ),
10477                encoder, offset, _depth
10478            )
10479        }
10480    }
10481    unsafe impl<
10482        T0: fidl::encoding::Encode<
10483                VectorOfArrayOfEventInTableWithReducedRights,
10484                fidl::encoding::DefaultFuchsiaResourceDialect,
10485            >,
10486    >
10487        fidl::encoding::Encode<
10488            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10489            fidl::encoding::DefaultFuchsiaResourceDialect,
10490        > for (T0,)
10491    {
10492        #[inline]
10493        unsafe fn encode(
10494            self,
10495            encoder: &mut fidl::encoding::Encoder<
10496                '_,
10497                fidl::encoding::DefaultFuchsiaResourceDialect,
10498            >,
10499            offset: usize,
10500            depth: fidl::encoding::Depth,
10501        ) -> fidl::Result<()> {
10502            encoder
10503                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10504            // Zero out padding regions. There's no need to apply masks
10505            // because the unmasked parts will be overwritten by fields.
10506            // Write the fields.
10507            self.0.encode(encoder, offset + 0, depth)?;
10508            Ok(())
10509        }
10510    }
10511
10512    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10513        for VectorOfArrayOfEventInTableWithReducedRightsStruct
10514    {
10515        #[inline(always)]
10516        fn new_empty() -> Self {
10517            Self {
10518                t: fidl::new_empty!(
10519                    VectorOfArrayOfEventInTableWithReducedRights,
10520                    fidl::encoding::DefaultFuchsiaResourceDialect
10521                ),
10522            }
10523        }
10524
10525        #[inline]
10526        unsafe fn decode(
10527            &mut self,
10528            decoder: &mut fidl::encoding::Decoder<
10529                '_,
10530                fidl::encoding::DefaultFuchsiaResourceDialect,
10531            >,
10532            offset: usize,
10533            _depth: fidl::encoding::Depth,
10534        ) -> fidl::Result<()> {
10535            decoder.debug_check_bounds::<Self>(offset);
10536            // Verify that padding bytes are zero.
10537            fidl::decode!(
10538                VectorOfArrayOfEventInTableWithReducedRights,
10539                fidl::encoding::DefaultFuchsiaResourceDialect,
10540                &mut self.t,
10541                decoder,
10542                offset + 0,
10543                _depth
10544            )?;
10545            Ok(())
10546        }
10547    }
10548
10549    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10550        type Borrowed<'a> = &'a mut Self;
10551        fn take_or_borrow<'a>(
10552            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10553        ) -> Self::Borrowed<'a> {
10554            value
10555        }
10556    }
10557
10558    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10559        type Owned = Self;
10560
10561        #[inline(always)]
10562        fn inline_align(_context: fidl::encoding::Context) -> usize {
10563            8
10564        }
10565
10566        #[inline(always)]
10567        fn inline_size(_context: fidl::encoding::Context) -> usize {
10568            16
10569        }
10570    }
10571
10572    unsafe impl
10573        fidl::encoding::Encode<
10574            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10575            fidl::encoding::DefaultFuchsiaResourceDialect,
10576        > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10577    {
10578        #[inline]
10579        unsafe fn encode(
10580            self,
10581            encoder: &mut fidl::encoding::Encoder<
10582                '_,
10583                fidl::encoding::DefaultFuchsiaResourceDialect,
10584            >,
10585            offset: usize,
10586            _depth: fidl::encoding::Depth,
10587        ) -> fidl::Result<()> {
10588            encoder
10589                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10590            // Delegate to tuple encoding.
10591            fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10592                (
10593                    <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10594                ),
10595                encoder, offset, _depth
10596            )
10597        }
10598    }
10599    unsafe impl<
10600        T0: fidl::encoding::Encode<
10601                VectorOfArrayOfEventInUnionWithReducedRights,
10602                fidl::encoding::DefaultFuchsiaResourceDialect,
10603            >,
10604    >
10605        fidl::encoding::Encode<
10606            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10607            fidl::encoding::DefaultFuchsiaResourceDialect,
10608        > for (T0,)
10609    {
10610        #[inline]
10611        unsafe fn encode(
10612            self,
10613            encoder: &mut fidl::encoding::Encoder<
10614                '_,
10615                fidl::encoding::DefaultFuchsiaResourceDialect,
10616            >,
10617            offset: usize,
10618            depth: fidl::encoding::Depth,
10619        ) -> fidl::Result<()> {
10620            encoder
10621                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10622            // Zero out padding regions. There's no need to apply masks
10623            // because the unmasked parts will be overwritten by fields.
10624            // Write the fields.
10625            self.0.encode(encoder, offset + 0, depth)?;
10626            Ok(())
10627        }
10628    }
10629
10630    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10631        for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10632    {
10633        #[inline(always)]
10634        fn new_empty() -> Self {
10635            Self {
10636                u: fidl::new_empty!(
10637                    VectorOfArrayOfEventInUnionWithReducedRights,
10638                    fidl::encoding::DefaultFuchsiaResourceDialect
10639                ),
10640            }
10641        }
10642
10643        #[inline]
10644        unsafe fn decode(
10645            &mut self,
10646            decoder: &mut fidl::encoding::Decoder<
10647                '_,
10648                fidl::encoding::DefaultFuchsiaResourceDialect,
10649            >,
10650            offset: usize,
10651            _depth: fidl::encoding::Depth,
10652        ) -> fidl::Result<()> {
10653            decoder.debug_check_bounds::<Self>(offset);
10654            // Verify that padding bytes are zero.
10655            fidl::decode!(
10656                VectorOfArrayOfEventInUnionWithReducedRights,
10657                fidl::encoding::DefaultFuchsiaResourceDialect,
10658                &mut self.u,
10659                decoder,
10660                offset + 0,
10661                _depth
10662            )?;
10663            Ok(())
10664        }
10665    }
10666
10667    impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10668        type Borrowed<'a> = &'a mut Self;
10669        fn take_or_borrow<'a>(
10670            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10671        ) -> Self::Borrowed<'a> {
10672            value
10673        }
10674    }
10675
10676    unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10677        type Owned = Self;
10678
10679        #[inline(always)]
10680        fn inline_align(_context: fidl::encoding::Context) -> usize {
10681            8
10682        }
10683
10684        #[inline(always)]
10685        fn inline_size(_context: fidl::encoding::Context) -> usize {
10686            16
10687        }
10688    }
10689
10690    unsafe impl
10691        fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10692        for &mut VectorOfHandles
10693    {
10694        #[inline]
10695        unsafe fn encode(
10696            self,
10697            encoder: &mut fidl::encoding::Encoder<
10698                '_,
10699                fidl::encoding::DefaultFuchsiaResourceDialect,
10700            >,
10701            offset: usize,
10702            _depth: fidl::encoding::Depth,
10703        ) -> fidl::Result<()> {
10704            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10705            // Delegate to tuple encoding.
10706            fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10707                (
10708                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10709                ),
10710                encoder, offset, _depth
10711            )
10712        }
10713    }
10714    unsafe impl<
10715        T0: fidl::encoding::Encode<
10716                fidl::encoding::UnboundedVector<
10717                    fidl::encoding::HandleType<
10718                        fidl::NullableHandle,
10719                        { fidl::ObjectType::NONE.into_raw() },
10720                        2147483648,
10721                    >,
10722                >,
10723                fidl::encoding::DefaultFuchsiaResourceDialect,
10724            >,
10725    > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10726        for (T0,)
10727    {
10728        #[inline]
10729        unsafe fn encode(
10730            self,
10731            encoder: &mut fidl::encoding::Encoder<
10732                '_,
10733                fidl::encoding::DefaultFuchsiaResourceDialect,
10734            >,
10735            offset: usize,
10736            depth: fidl::encoding::Depth,
10737        ) -> fidl::Result<()> {
10738            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10739            // Zero out padding regions. There's no need to apply masks
10740            // because the unmasked parts will be overwritten by fields.
10741            // Write the fields.
10742            self.0.encode(encoder, offset + 0, depth)?;
10743            Ok(())
10744        }
10745    }
10746
10747    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10748        for VectorOfHandles
10749    {
10750        #[inline(always)]
10751        fn new_empty() -> Self {
10752            Self {
10753                v: fidl::new_empty!(
10754                    fidl::encoding::UnboundedVector<
10755                        fidl::encoding::HandleType<
10756                            fidl::NullableHandle,
10757                            { fidl::ObjectType::NONE.into_raw() },
10758                            2147483648,
10759                        >,
10760                    >,
10761                    fidl::encoding::DefaultFuchsiaResourceDialect
10762                ),
10763            }
10764        }
10765
10766        #[inline]
10767        unsafe fn decode(
10768            &mut self,
10769            decoder: &mut fidl::encoding::Decoder<
10770                '_,
10771                fidl::encoding::DefaultFuchsiaResourceDialect,
10772            >,
10773            offset: usize,
10774            _depth: fidl::encoding::Depth,
10775        ) -> fidl::Result<()> {
10776            decoder.debug_check_bounds::<Self>(offset);
10777            // Verify that padding bytes are zero.
10778            fidl::decode!(
10779                fidl::encoding::UnboundedVector<
10780                    fidl::encoding::HandleType<
10781                        fidl::NullableHandle,
10782                        { fidl::ObjectType::NONE.into_raw() },
10783                        2147483648,
10784                    >,
10785                >,
10786                fidl::encoding::DefaultFuchsiaResourceDialect,
10787                &mut self.v,
10788                decoder,
10789                offset + 0,
10790                _depth
10791            )?;
10792            Ok(())
10793        }
10794    }
10795
10796    impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10797        type Borrowed<'a> = &'a mut Self;
10798        fn take_or_borrow<'a>(
10799            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10800        ) -> Self::Borrowed<'a> {
10801            value
10802        }
10803    }
10804
10805    unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10806        type Owned = Self;
10807
10808        #[inline(always)]
10809        fn inline_align(_context: fidl::encoding::Context) -> usize {
10810            8
10811        }
10812
10813        #[inline(always)]
10814        fn inline_size(_context: fidl::encoding::Context) -> usize {
10815            16
10816        }
10817    }
10818
10819    unsafe impl
10820        fidl::encoding::Encode<
10821            VectorOfOptionalHandles,
10822            fidl::encoding::DefaultFuchsiaResourceDialect,
10823        > for &mut VectorOfOptionalHandles
10824    {
10825        #[inline]
10826        unsafe fn encode(
10827            self,
10828            encoder: &mut fidl::encoding::Encoder<
10829                '_,
10830                fidl::encoding::DefaultFuchsiaResourceDialect,
10831            >,
10832            offset: usize,
10833            _depth: fidl::encoding::Depth,
10834        ) -> fidl::Result<()> {
10835            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10836            // Delegate to tuple encoding.
10837            fidl::encoding::Encode::<
10838                VectorOfOptionalHandles,
10839                fidl::encoding::DefaultFuchsiaResourceDialect,
10840            >::encode(
10841                (<fidl::encoding::UnboundedVector<
10842                    fidl::encoding::Optional<
10843                        fidl::encoding::HandleType<
10844                            fidl::NullableHandle,
10845                            { fidl::ObjectType::NONE.into_raw() },
10846                            2147483648,
10847                        >,
10848                    >,
10849                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10850                    &mut self.v
10851                ),),
10852                encoder,
10853                offset,
10854                _depth,
10855            )
10856        }
10857    }
10858    unsafe impl<
10859        T0: fidl::encoding::Encode<
10860                fidl::encoding::UnboundedVector<
10861                    fidl::encoding::Optional<
10862                        fidl::encoding::HandleType<
10863                            fidl::NullableHandle,
10864                            { fidl::ObjectType::NONE.into_raw() },
10865                            2147483648,
10866                        >,
10867                    >,
10868                >,
10869                fidl::encoding::DefaultFuchsiaResourceDialect,
10870            >,
10871    >
10872        fidl::encoding::Encode<
10873            VectorOfOptionalHandles,
10874            fidl::encoding::DefaultFuchsiaResourceDialect,
10875        > for (T0,)
10876    {
10877        #[inline]
10878        unsafe fn encode(
10879            self,
10880            encoder: &mut fidl::encoding::Encoder<
10881                '_,
10882                fidl::encoding::DefaultFuchsiaResourceDialect,
10883            >,
10884            offset: usize,
10885            depth: fidl::encoding::Depth,
10886        ) -> fidl::Result<()> {
10887            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10888            // Zero out padding regions. There's no need to apply masks
10889            // because the unmasked parts will be overwritten by fields.
10890            // Write the fields.
10891            self.0.encode(encoder, offset + 0, depth)?;
10892            Ok(())
10893        }
10894    }
10895
10896    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10897        for VectorOfOptionalHandles
10898    {
10899        #[inline(always)]
10900        fn new_empty() -> Self {
10901            Self {
10902                v: fidl::new_empty!(
10903                    fidl::encoding::UnboundedVector<
10904                        fidl::encoding::Optional<
10905                            fidl::encoding::HandleType<
10906                                fidl::NullableHandle,
10907                                { fidl::ObjectType::NONE.into_raw() },
10908                                2147483648,
10909                            >,
10910                        >,
10911                    >,
10912                    fidl::encoding::DefaultFuchsiaResourceDialect
10913                ),
10914            }
10915        }
10916
10917        #[inline]
10918        unsafe fn decode(
10919            &mut self,
10920            decoder: &mut fidl::encoding::Decoder<
10921                '_,
10922                fidl::encoding::DefaultFuchsiaResourceDialect,
10923            >,
10924            offset: usize,
10925            _depth: fidl::encoding::Depth,
10926        ) -> fidl::Result<()> {
10927            decoder.debug_check_bounds::<Self>(offset);
10928            // Verify that padding bytes are zero.
10929            fidl::decode!(
10930                fidl::encoding::UnboundedVector<
10931                    fidl::encoding::Optional<
10932                        fidl::encoding::HandleType<
10933                            fidl::NullableHandle,
10934                            { fidl::ObjectType::NONE.into_raw() },
10935                            2147483648,
10936                        >,
10937                    >,
10938                >,
10939                fidl::encoding::DefaultFuchsiaResourceDialect,
10940                &mut self.v,
10941                decoder,
10942                offset + 0,
10943                _depth
10944            )?;
10945            Ok(())
10946        }
10947    }
10948
10949    impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10950        type Borrowed<'a> = &'a mut Self;
10951        fn take_or_borrow<'a>(
10952            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10953        ) -> Self::Borrowed<'a> {
10954            value
10955        }
10956    }
10957
10958    unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10959        type Owned = Self;
10960
10961        #[inline(always)]
10962        fn inline_align(_context: fidl::encoding::Context) -> usize {
10963            8
10964        }
10965
10966        #[inline(always)]
10967        fn inline_size(_context: fidl::encoding::Context) -> usize {
10968            16
10969        }
10970    }
10971
10972    unsafe impl
10973        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10974        for &mut VectorOfUpTo2Handles
10975    {
10976        #[inline]
10977        unsafe fn encode(
10978            self,
10979            encoder: &mut fidl::encoding::Encoder<
10980                '_,
10981                fidl::encoding::DefaultFuchsiaResourceDialect,
10982            >,
10983            offset: usize,
10984            _depth: fidl::encoding::Depth,
10985        ) -> fidl::Result<()> {
10986            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10987            // Delegate to tuple encoding.
10988            fidl::encoding::Encode::<
10989                VectorOfUpTo2Handles,
10990                fidl::encoding::DefaultFuchsiaResourceDialect,
10991            >::encode(
10992                (<fidl::encoding::Vector<
10993                    fidl::encoding::HandleType<
10994                        fidl::NullableHandle,
10995                        { fidl::ObjectType::NONE.into_raw() },
10996                        2147483648,
10997                    >,
10998                    2,
10999                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11000                    &mut self.v
11001                ),),
11002                encoder,
11003                offset,
11004                _depth,
11005            )
11006        }
11007    }
11008    unsafe impl<
11009        T0: fidl::encoding::Encode<
11010                fidl::encoding::Vector<
11011                    fidl::encoding::HandleType<
11012                        fidl::NullableHandle,
11013                        { fidl::ObjectType::NONE.into_raw() },
11014                        2147483648,
11015                    >,
11016                    2,
11017                >,
11018                fidl::encoding::DefaultFuchsiaResourceDialect,
11019            >,
11020    >
11021        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
11022        for (T0,)
11023    {
11024        #[inline]
11025        unsafe fn encode(
11026            self,
11027            encoder: &mut fidl::encoding::Encoder<
11028                '_,
11029                fidl::encoding::DefaultFuchsiaResourceDialect,
11030            >,
11031            offset: usize,
11032            depth: fidl::encoding::Depth,
11033        ) -> fidl::Result<()> {
11034            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
11035            // Zero out padding regions. There's no need to apply masks
11036            // because the unmasked parts will be overwritten by fields.
11037            // Write the fields.
11038            self.0.encode(encoder, offset + 0, depth)?;
11039            Ok(())
11040        }
11041    }
11042
11043    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11044        for VectorOfUpTo2Handles
11045    {
11046        #[inline(always)]
11047        fn new_empty() -> Self {
11048            Self {
11049                v: fidl::new_empty!(
11050                    fidl::encoding::Vector<
11051                        fidl::encoding::HandleType<
11052                            fidl::NullableHandle,
11053                            { fidl::ObjectType::NONE.into_raw() },
11054                            2147483648,
11055                        >,
11056                        2,
11057                    >,
11058                    fidl::encoding::DefaultFuchsiaResourceDialect
11059                ),
11060            }
11061        }
11062
11063        #[inline]
11064        unsafe fn decode(
11065            &mut self,
11066            decoder: &mut fidl::encoding::Decoder<
11067                '_,
11068                fidl::encoding::DefaultFuchsiaResourceDialect,
11069            >,
11070            offset: usize,
11071            _depth: fidl::encoding::Depth,
11072        ) -> fidl::Result<()> {
11073            decoder.debug_check_bounds::<Self>(offset);
11074            // Verify that padding bytes are zero.
11075            fidl::decode!(
11076                fidl::encoding::Vector<
11077                    fidl::encoding::HandleType<
11078                        fidl::NullableHandle,
11079                        { fidl::ObjectType::NONE.into_raw() },
11080                        2147483648,
11081                    >,
11082                    2,
11083                >,
11084                fidl::encoding::DefaultFuchsiaResourceDialect,
11085                &mut self.v,
11086                decoder,
11087                offset + 0,
11088                _depth
11089            )?;
11090            Ok(())
11091        }
11092    }
11093
11094    impl ArrayOfVectorOfEventInTableWithDefaultRights {
11095        #[inline(always)]
11096        fn max_ordinal_present(&self) -> u64 {
11097            if let Some(_) = self.h {
11098                return 1;
11099            }
11100            0
11101        }
11102    }
11103
11104    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
11105        type Borrowed<'a> = &'a mut Self;
11106        fn take_or_borrow<'a>(
11107            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11108        ) -> Self::Borrowed<'a> {
11109            value
11110        }
11111    }
11112
11113    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
11114        type Owned = Self;
11115
11116        #[inline(always)]
11117        fn inline_align(_context: fidl::encoding::Context) -> usize {
11118            8
11119        }
11120
11121        #[inline(always)]
11122        fn inline_size(_context: fidl::encoding::Context) -> usize {
11123            16
11124        }
11125    }
11126
11127    unsafe impl
11128        fidl::encoding::Encode<
11129            ArrayOfVectorOfEventInTableWithDefaultRights,
11130            fidl::encoding::DefaultFuchsiaResourceDialect,
11131        > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
11132    {
11133        unsafe fn encode(
11134            self,
11135            encoder: &mut fidl::encoding::Encoder<
11136                '_,
11137                fidl::encoding::DefaultFuchsiaResourceDialect,
11138            >,
11139            offset: usize,
11140            mut depth: fidl::encoding::Depth,
11141        ) -> fidl::Result<()> {
11142            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
11143            // Vector header
11144            let max_ordinal: u64 = self.max_ordinal_present();
11145            encoder.write_num(max_ordinal, offset);
11146            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11147            // Calling encoder.out_of_line_offset(0) is not allowed.
11148            if max_ordinal == 0 {
11149                return Ok(());
11150            }
11151            depth.increment()?;
11152            let envelope_size = 8;
11153            let bytes_len = max_ordinal as usize * envelope_size;
11154            #[allow(unused_variables)]
11155            let offset = encoder.out_of_line_offset(bytes_len);
11156            let mut _prev_end_offset: usize = 0;
11157            if 1 > max_ordinal {
11158                return Ok(());
11159            }
11160
11161            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11162            // are envelope_size bytes.
11163            let cur_offset: usize = (1 - 1) * envelope_size;
11164
11165            // Zero reserved fields.
11166            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11167
11168            // Safety:
11169            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11170            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11171            //   envelope_size bytes, there is always sufficient room.
11172            fidl::encoding::encode_in_envelope_optional::<
11173                fidl::encoding::Array<
11174                    fidl::encoding::Vector<
11175                        fidl::encoding::HandleType<
11176                            fidl::Event,
11177                            { fidl::ObjectType::EVENT.into_raw() },
11178                            53251,
11179                        >,
11180                        1,
11181                    >,
11182                    1,
11183                >,
11184                fidl::encoding::DefaultFuchsiaResourceDialect,
11185            >(
11186                self.h.as_mut().map(
11187                    <fidl::encoding::Array<
11188                        fidl::encoding::Vector<
11189                            fidl::encoding::HandleType<
11190                                fidl::Event,
11191                                { fidl::ObjectType::EVENT.into_raw() },
11192                                53251,
11193                            >,
11194                            1,
11195                        >,
11196                        1,
11197                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11198                ),
11199                encoder,
11200                offset + cur_offset,
11201                depth,
11202            )?;
11203
11204            _prev_end_offset = cur_offset + envelope_size;
11205
11206            Ok(())
11207        }
11208    }
11209
11210    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11211        for ArrayOfVectorOfEventInTableWithDefaultRights
11212    {
11213        #[inline(always)]
11214        fn new_empty() -> Self {
11215            Self::default()
11216        }
11217
11218        unsafe fn decode(
11219            &mut self,
11220            decoder: &mut fidl::encoding::Decoder<
11221                '_,
11222                fidl::encoding::DefaultFuchsiaResourceDialect,
11223            >,
11224            offset: usize,
11225            mut depth: fidl::encoding::Depth,
11226        ) -> fidl::Result<()> {
11227            decoder.debug_check_bounds::<Self>(offset);
11228            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11229                None => return Err(fidl::Error::NotNullable),
11230                Some(len) => len,
11231            };
11232            // Calling decoder.out_of_line_offset(0) is not allowed.
11233            if len == 0 {
11234                return Ok(());
11235            };
11236            depth.increment()?;
11237            let envelope_size = 8;
11238            let bytes_len = len * envelope_size;
11239            let offset = decoder.out_of_line_offset(bytes_len)?;
11240            // Decode the envelope for each type.
11241            let mut _next_ordinal_to_read = 0;
11242            let mut next_offset = offset;
11243            let end_offset = offset + bytes_len;
11244            _next_ordinal_to_read += 1;
11245            if next_offset >= end_offset {
11246                return Ok(());
11247            }
11248
11249            // Decode unknown envelopes for gaps in ordinals.
11250            while _next_ordinal_to_read < 1 {
11251                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11252                _next_ordinal_to_read += 1;
11253                next_offset += envelope_size;
11254            }
11255
11256            let next_out_of_line = decoder.next_out_of_line();
11257            let handles_before = decoder.remaining_handles();
11258            if let Some((inlined, num_bytes, num_handles)) =
11259                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11260            {
11261                let member_inline_size = <fidl::encoding::Array<
11262                    fidl::encoding::Vector<
11263                        fidl::encoding::HandleType<
11264                            fidl::Event,
11265                            { fidl::ObjectType::EVENT.into_raw() },
11266                            53251,
11267                        >,
11268                        1,
11269                    >,
11270                    1,
11271                > as fidl::encoding::TypeMarker>::inline_size(
11272                    decoder.context
11273                );
11274                if inlined != (member_inline_size <= 4) {
11275                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11276                }
11277                let inner_offset;
11278                let mut inner_depth = depth.clone();
11279                if inlined {
11280                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11281                    inner_offset = next_offset;
11282                } else {
11283                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11284                    inner_depth.increment()?;
11285                }
11286                let val_ref = self.h.get_or_insert_with(|| {
11287                    fidl::new_empty!(
11288                        fidl::encoding::Array<
11289                            fidl::encoding::Vector<
11290                                fidl::encoding::HandleType<
11291                                    fidl::Event,
11292                                    { fidl::ObjectType::EVENT.into_raw() },
11293                                    53251,
11294                                >,
11295                                1,
11296                            >,
11297                            1,
11298                        >,
11299                        fidl::encoding::DefaultFuchsiaResourceDialect
11300                    )
11301                });
11302                fidl::decode!(
11303                    fidl::encoding::Array<
11304                        fidl::encoding::Vector<
11305                            fidl::encoding::HandleType<
11306                                fidl::Event,
11307                                { fidl::ObjectType::EVENT.into_raw() },
11308                                53251,
11309                            >,
11310                            1,
11311                        >,
11312                        1,
11313                    >,
11314                    fidl::encoding::DefaultFuchsiaResourceDialect,
11315                    val_ref,
11316                    decoder,
11317                    inner_offset,
11318                    inner_depth
11319                )?;
11320                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11321                {
11322                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11323                }
11324                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11325                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11326                }
11327            }
11328
11329            next_offset += envelope_size;
11330
11331            // Decode the remaining unknown envelopes.
11332            while next_offset < end_offset {
11333                _next_ordinal_to_read += 1;
11334                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11335                next_offset += envelope_size;
11336            }
11337
11338            Ok(())
11339        }
11340    }
11341
11342    impl ArrayOfVectorOfEventInTableWithReducedRights {
11343        #[inline(always)]
11344        fn max_ordinal_present(&self) -> u64 {
11345            if let Some(_) = self.h {
11346                return 1;
11347            }
11348            0
11349        }
11350    }
11351
11352    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11353        type Borrowed<'a> = &'a mut Self;
11354        fn take_or_borrow<'a>(
11355            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11356        ) -> Self::Borrowed<'a> {
11357            value
11358        }
11359    }
11360
11361    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11362        type Owned = Self;
11363
11364        #[inline(always)]
11365        fn inline_align(_context: fidl::encoding::Context) -> usize {
11366            8
11367        }
11368
11369        #[inline(always)]
11370        fn inline_size(_context: fidl::encoding::Context) -> usize {
11371            16
11372        }
11373    }
11374
11375    unsafe impl
11376        fidl::encoding::Encode<
11377            ArrayOfVectorOfEventInTableWithReducedRights,
11378            fidl::encoding::DefaultFuchsiaResourceDialect,
11379        > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11380    {
11381        unsafe fn encode(
11382            self,
11383            encoder: &mut fidl::encoding::Encoder<
11384                '_,
11385                fidl::encoding::DefaultFuchsiaResourceDialect,
11386            >,
11387            offset: usize,
11388            mut depth: fidl::encoding::Depth,
11389        ) -> fidl::Result<()> {
11390            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11391            // Vector header
11392            let max_ordinal: u64 = self.max_ordinal_present();
11393            encoder.write_num(max_ordinal, offset);
11394            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11395            // Calling encoder.out_of_line_offset(0) is not allowed.
11396            if max_ordinal == 0 {
11397                return Ok(());
11398            }
11399            depth.increment()?;
11400            let envelope_size = 8;
11401            let bytes_len = max_ordinal as usize * envelope_size;
11402            #[allow(unused_variables)]
11403            let offset = encoder.out_of_line_offset(bytes_len);
11404            let mut _prev_end_offset: usize = 0;
11405            if 1 > max_ordinal {
11406                return Ok(());
11407            }
11408
11409            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11410            // are envelope_size bytes.
11411            let cur_offset: usize = (1 - 1) * envelope_size;
11412
11413            // Zero reserved fields.
11414            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11415
11416            // Safety:
11417            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11418            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11419            //   envelope_size bytes, there is always sufficient room.
11420            fidl::encoding::encode_in_envelope_optional::<
11421                fidl::encoding::Array<
11422                    fidl::encoding::Vector<
11423                        fidl::encoding::HandleType<
11424                            fidl::Event,
11425                            { fidl::ObjectType::EVENT.into_raw() },
11426                            49155,
11427                        >,
11428                        1,
11429                    >,
11430                    1,
11431                >,
11432                fidl::encoding::DefaultFuchsiaResourceDialect,
11433            >(
11434                self.h.as_mut().map(
11435                    <fidl::encoding::Array<
11436                        fidl::encoding::Vector<
11437                            fidl::encoding::HandleType<
11438                                fidl::Event,
11439                                { fidl::ObjectType::EVENT.into_raw() },
11440                                49155,
11441                            >,
11442                            1,
11443                        >,
11444                        1,
11445                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11446                ),
11447                encoder,
11448                offset + cur_offset,
11449                depth,
11450            )?;
11451
11452            _prev_end_offset = cur_offset + envelope_size;
11453
11454            Ok(())
11455        }
11456    }
11457
11458    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11459        for ArrayOfVectorOfEventInTableWithReducedRights
11460    {
11461        #[inline(always)]
11462        fn new_empty() -> Self {
11463            Self::default()
11464        }
11465
11466        unsafe fn decode(
11467            &mut self,
11468            decoder: &mut fidl::encoding::Decoder<
11469                '_,
11470                fidl::encoding::DefaultFuchsiaResourceDialect,
11471            >,
11472            offset: usize,
11473            mut depth: fidl::encoding::Depth,
11474        ) -> fidl::Result<()> {
11475            decoder.debug_check_bounds::<Self>(offset);
11476            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11477                None => return Err(fidl::Error::NotNullable),
11478                Some(len) => len,
11479            };
11480            // Calling decoder.out_of_line_offset(0) is not allowed.
11481            if len == 0 {
11482                return Ok(());
11483            };
11484            depth.increment()?;
11485            let envelope_size = 8;
11486            let bytes_len = len * envelope_size;
11487            let offset = decoder.out_of_line_offset(bytes_len)?;
11488            // Decode the envelope for each type.
11489            let mut _next_ordinal_to_read = 0;
11490            let mut next_offset = offset;
11491            let end_offset = offset + bytes_len;
11492            _next_ordinal_to_read += 1;
11493            if next_offset >= end_offset {
11494                return Ok(());
11495            }
11496
11497            // Decode unknown envelopes for gaps in ordinals.
11498            while _next_ordinal_to_read < 1 {
11499                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11500                _next_ordinal_to_read += 1;
11501                next_offset += envelope_size;
11502            }
11503
11504            let next_out_of_line = decoder.next_out_of_line();
11505            let handles_before = decoder.remaining_handles();
11506            if let Some((inlined, num_bytes, num_handles)) =
11507                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11508            {
11509                let member_inline_size = <fidl::encoding::Array<
11510                    fidl::encoding::Vector<
11511                        fidl::encoding::HandleType<
11512                            fidl::Event,
11513                            { fidl::ObjectType::EVENT.into_raw() },
11514                            49155,
11515                        >,
11516                        1,
11517                    >,
11518                    1,
11519                > as fidl::encoding::TypeMarker>::inline_size(
11520                    decoder.context
11521                );
11522                if inlined != (member_inline_size <= 4) {
11523                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11524                }
11525                let inner_offset;
11526                let mut inner_depth = depth.clone();
11527                if inlined {
11528                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11529                    inner_offset = next_offset;
11530                } else {
11531                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11532                    inner_depth.increment()?;
11533                }
11534                let val_ref = self.h.get_or_insert_with(|| {
11535                    fidl::new_empty!(
11536                        fidl::encoding::Array<
11537                            fidl::encoding::Vector<
11538                                fidl::encoding::HandleType<
11539                                    fidl::Event,
11540                                    { fidl::ObjectType::EVENT.into_raw() },
11541                                    49155,
11542                                >,
11543                                1,
11544                            >,
11545                            1,
11546                        >,
11547                        fidl::encoding::DefaultFuchsiaResourceDialect
11548                    )
11549                });
11550                fidl::decode!(
11551                    fidl::encoding::Array<
11552                        fidl::encoding::Vector<
11553                            fidl::encoding::HandleType<
11554                                fidl::Event,
11555                                { fidl::ObjectType::EVENT.into_raw() },
11556                                49155,
11557                            >,
11558                            1,
11559                        >,
11560                        1,
11561                    >,
11562                    fidl::encoding::DefaultFuchsiaResourceDialect,
11563                    val_ref,
11564                    decoder,
11565                    inner_offset,
11566                    inner_depth
11567                )?;
11568                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11569                {
11570                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11571                }
11572                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11573                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11574                }
11575            }
11576
11577            next_offset += envelope_size;
11578
11579            // Decode the remaining unknown envelopes.
11580            while next_offset < end_offset {
11581                _next_ordinal_to_read += 1;
11582                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11583                next_offset += envelope_size;
11584            }
11585
11586            Ok(())
11587        }
11588    }
11589
11590    impl EmptyResourceTable {
11591        #[inline(always)]
11592        fn max_ordinal_present(&self) -> u64 {
11593            0
11594        }
11595    }
11596
11597    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11598        type Borrowed<'a> = &'a mut Self;
11599        fn take_or_borrow<'a>(
11600            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11601        ) -> Self::Borrowed<'a> {
11602            value
11603        }
11604    }
11605
11606    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11607        type Owned = Self;
11608
11609        #[inline(always)]
11610        fn inline_align(_context: fidl::encoding::Context) -> usize {
11611            8
11612        }
11613
11614        #[inline(always)]
11615        fn inline_size(_context: fidl::encoding::Context) -> usize {
11616            16
11617        }
11618    }
11619
11620    unsafe impl
11621        fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11622        for &mut EmptyResourceTable
11623    {
11624        unsafe fn encode(
11625            self,
11626            encoder: &mut fidl::encoding::Encoder<
11627                '_,
11628                fidl::encoding::DefaultFuchsiaResourceDialect,
11629            >,
11630            offset: usize,
11631            mut depth: fidl::encoding::Depth,
11632        ) -> fidl::Result<()> {
11633            encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11634            // Vector header
11635            let max_ordinal: u64 = self.max_ordinal_present();
11636            encoder.write_num(max_ordinal, offset);
11637            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11638            // Calling encoder.out_of_line_offset(0) is not allowed.
11639            if max_ordinal == 0 {
11640                return Ok(());
11641            }
11642            depth.increment()?;
11643            let envelope_size = 8;
11644            let bytes_len = max_ordinal as usize * envelope_size;
11645            #[allow(unused_variables)]
11646            let offset = encoder.out_of_line_offset(bytes_len);
11647            let mut _prev_end_offset: usize = 0;
11648
11649            Ok(())
11650        }
11651    }
11652
11653    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11654        for EmptyResourceTable
11655    {
11656        #[inline(always)]
11657        fn new_empty() -> Self {
11658            Self::default()
11659        }
11660
11661        unsafe fn decode(
11662            &mut self,
11663            decoder: &mut fidl::encoding::Decoder<
11664                '_,
11665                fidl::encoding::DefaultFuchsiaResourceDialect,
11666            >,
11667            offset: usize,
11668            mut depth: fidl::encoding::Depth,
11669        ) -> fidl::Result<()> {
11670            decoder.debug_check_bounds::<Self>(offset);
11671            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11672                None => return Err(fidl::Error::NotNullable),
11673                Some(len) => len,
11674            };
11675            // Calling decoder.out_of_line_offset(0) is not allowed.
11676            if len == 0 {
11677                return Ok(());
11678            };
11679            depth.increment()?;
11680            let envelope_size = 8;
11681            let bytes_len = len * envelope_size;
11682            let offset = decoder.out_of_line_offset(bytes_len)?;
11683            // Decode the envelope for each type.
11684            let mut _next_ordinal_to_read = 0;
11685            let mut next_offset = offset;
11686            let end_offset = offset + bytes_len;
11687
11688            // Decode the remaining unknown envelopes.
11689            while next_offset < end_offset {
11690                _next_ordinal_to_read += 1;
11691                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11692                next_offset += envelope_size;
11693            }
11694
11695            Ok(())
11696        }
11697    }
11698
11699    impl SimpleResourceTable {
11700        #[inline(always)]
11701        fn max_ordinal_present(&self) -> u64 {
11702            if let Some(_) = self.y {
11703                return 5;
11704            }
11705            if let Some(_) = self.x {
11706                return 1;
11707            }
11708            0
11709        }
11710    }
11711
11712    impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11713        type Borrowed<'a> = &'a mut Self;
11714        fn take_or_borrow<'a>(
11715            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11716        ) -> Self::Borrowed<'a> {
11717            value
11718        }
11719    }
11720
11721    unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11722        type Owned = Self;
11723
11724        #[inline(always)]
11725        fn inline_align(_context: fidl::encoding::Context) -> usize {
11726            8
11727        }
11728
11729        #[inline(always)]
11730        fn inline_size(_context: fidl::encoding::Context) -> usize {
11731            16
11732        }
11733    }
11734
11735    unsafe impl
11736        fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11737        for &mut SimpleResourceTable
11738    {
11739        unsafe fn encode(
11740            self,
11741            encoder: &mut fidl::encoding::Encoder<
11742                '_,
11743                fidl::encoding::DefaultFuchsiaResourceDialect,
11744            >,
11745            offset: usize,
11746            mut depth: fidl::encoding::Depth,
11747        ) -> fidl::Result<()> {
11748            encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11749            // Vector header
11750            let max_ordinal: u64 = self.max_ordinal_present();
11751            encoder.write_num(max_ordinal, offset);
11752            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11753            // Calling encoder.out_of_line_offset(0) is not allowed.
11754            if max_ordinal == 0 {
11755                return Ok(());
11756            }
11757            depth.increment()?;
11758            let envelope_size = 8;
11759            let bytes_len = max_ordinal as usize * envelope_size;
11760            #[allow(unused_variables)]
11761            let offset = encoder.out_of_line_offset(bytes_len);
11762            let mut _prev_end_offset: usize = 0;
11763            if 1 > max_ordinal {
11764                return Ok(());
11765            }
11766
11767            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11768            // are envelope_size bytes.
11769            let cur_offset: usize = (1 - 1) * envelope_size;
11770
11771            // Zero reserved fields.
11772            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11773
11774            // Safety:
11775            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11776            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11777            //   envelope_size bytes, there is always sufficient room.
11778            fidl::encoding::encode_in_envelope_optional::<
11779                i64,
11780                fidl::encoding::DefaultFuchsiaResourceDialect,
11781            >(
11782                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11783                encoder,
11784                offset + cur_offset,
11785                depth,
11786            )?;
11787
11788            _prev_end_offset = cur_offset + envelope_size;
11789            if 5 > max_ordinal {
11790                return Ok(());
11791            }
11792
11793            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11794            // are envelope_size bytes.
11795            let cur_offset: usize = (5 - 1) * envelope_size;
11796
11797            // Zero reserved fields.
11798            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11799
11800            // Safety:
11801            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11802            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11803            //   envelope_size bytes, there is always sufficient room.
11804            fidl::encoding::encode_in_envelope_optional::<
11805                i64,
11806                fidl::encoding::DefaultFuchsiaResourceDialect,
11807            >(
11808                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11809                encoder,
11810                offset + cur_offset,
11811                depth,
11812            )?;
11813
11814            _prev_end_offset = cur_offset + envelope_size;
11815
11816            Ok(())
11817        }
11818    }
11819
11820    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11821        for SimpleResourceTable
11822    {
11823        #[inline(always)]
11824        fn new_empty() -> Self {
11825            Self::default()
11826        }
11827
11828        unsafe fn decode(
11829            &mut self,
11830            decoder: &mut fidl::encoding::Decoder<
11831                '_,
11832                fidl::encoding::DefaultFuchsiaResourceDialect,
11833            >,
11834            offset: usize,
11835            mut depth: fidl::encoding::Depth,
11836        ) -> fidl::Result<()> {
11837            decoder.debug_check_bounds::<Self>(offset);
11838            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11839                None => return Err(fidl::Error::NotNullable),
11840                Some(len) => len,
11841            };
11842            // Calling decoder.out_of_line_offset(0) is not allowed.
11843            if len == 0 {
11844                return Ok(());
11845            };
11846            depth.increment()?;
11847            let envelope_size = 8;
11848            let bytes_len = len * envelope_size;
11849            let offset = decoder.out_of_line_offset(bytes_len)?;
11850            // Decode the envelope for each type.
11851            let mut _next_ordinal_to_read = 0;
11852            let mut next_offset = offset;
11853            let end_offset = offset + bytes_len;
11854            _next_ordinal_to_read += 1;
11855            if next_offset >= end_offset {
11856                return Ok(());
11857            }
11858
11859            // Decode unknown envelopes for gaps in ordinals.
11860            while _next_ordinal_to_read < 1 {
11861                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11862                _next_ordinal_to_read += 1;
11863                next_offset += envelope_size;
11864            }
11865
11866            let next_out_of_line = decoder.next_out_of_line();
11867            let handles_before = decoder.remaining_handles();
11868            if let Some((inlined, num_bytes, num_handles)) =
11869                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11870            {
11871                let member_inline_size =
11872                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11873                if inlined != (member_inline_size <= 4) {
11874                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11875                }
11876                let inner_offset;
11877                let mut inner_depth = depth.clone();
11878                if inlined {
11879                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11880                    inner_offset = next_offset;
11881                } else {
11882                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11883                    inner_depth.increment()?;
11884                }
11885                let val_ref = self.x.get_or_insert_with(|| {
11886                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11887                });
11888                fidl::decode!(
11889                    i64,
11890                    fidl::encoding::DefaultFuchsiaResourceDialect,
11891                    val_ref,
11892                    decoder,
11893                    inner_offset,
11894                    inner_depth
11895                )?;
11896                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11897                {
11898                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11899                }
11900                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11901                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11902                }
11903            }
11904
11905            next_offset += envelope_size;
11906            _next_ordinal_to_read += 1;
11907            if next_offset >= end_offset {
11908                return Ok(());
11909            }
11910
11911            // Decode unknown envelopes for gaps in ordinals.
11912            while _next_ordinal_to_read < 5 {
11913                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11914                _next_ordinal_to_read += 1;
11915                next_offset += envelope_size;
11916            }
11917
11918            let next_out_of_line = decoder.next_out_of_line();
11919            let handles_before = decoder.remaining_handles();
11920            if let Some((inlined, num_bytes, num_handles)) =
11921                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11922            {
11923                let member_inline_size =
11924                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11925                if inlined != (member_inline_size <= 4) {
11926                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11927                }
11928                let inner_offset;
11929                let mut inner_depth = depth.clone();
11930                if inlined {
11931                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11932                    inner_offset = next_offset;
11933                } else {
11934                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11935                    inner_depth.increment()?;
11936                }
11937                let val_ref = self.y.get_or_insert_with(|| {
11938                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11939                });
11940                fidl::decode!(
11941                    i64,
11942                    fidl::encoding::DefaultFuchsiaResourceDialect,
11943                    val_ref,
11944                    decoder,
11945                    inner_offset,
11946                    inner_depth
11947                )?;
11948                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11949                {
11950                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11951                }
11952                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11953                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11954                }
11955            }
11956
11957            next_offset += envelope_size;
11958
11959            // Decode the remaining unknown envelopes.
11960            while next_offset < end_offset {
11961                _next_ordinal_to_read += 1;
11962                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11963                next_offset += envelope_size;
11964            }
11965
11966            Ok(())
11967        }
11968    }
11969
11970    impl TableFieldInlinedHandle {
11971        #[inline(always)]
11972        fn max_ordinal_present(&self) -> u64 {
11973            if let Some(_) = self.f {
11974                return 1;
11975            }
11976            0
11977        }
11978    }
11979
11980    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11981        type Borrowed<'a> = &'a mut Self;
11982        fn take_or_borrow<'a>(
11983            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11984        ) -> Self::Borrowed<'a> {
11985            value
11986        }
11987    }
11988
11989    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
11990        type Owned = Self;
11991
11992        #[inline(always)]
11993        fn inline_align(_context: fidl::encoding::Context) -> usize {
11994            8
11995        }
11996
11997        #[inline(always)]
11998        fn inline_size(_context: fidl::encoding::Context) -> usize {
11999            16
12000        }
12001    }
12002
12003    unsafe impl
12004        fidl::encoding::Encode<
12005            TableFieldInlinedHandle,
12006            fidl::encoding::DefaultFuchsiaResourceDialect,
12007        > for &mut TableFieldInlinedHandle
12008    {
12009        unsafe fn encode(
12010            self,
12011            encoder: &mut fidl::encoding::Encoder<
12012                '_,
12013                fidl::encoding::DefaultFuchsiaResourceDialect,
12014            >,
12015            offset: usize,
12016            mut depth: fidl::encoding::Depth,
12017        ) -> fidl::Result<()> {
12018            encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
12019            // Vector header
12020            let max_ordinal: u64 = self.max_ordinal_present();
12021            encoder.write_num(max_ordinal, offset);
12022            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12023            // Calling encoder.out_of_line_offset(0) is not allowed.
12024            if max_ordinal == 0 {
12025                return Ok(());
12026            }
12027            depth.increment()?;
12028            let envelope_size = 8;
12029            let bytes_len = max_ordinal as usize * envelope_size;
12030            #[allow(unused_variables)]
12031            let offset = encoder.out_of_line_offset(bytes_len);
12032            let mut _prev_end_offset: usize = 0;
12033            if 1 > max_ordinal {
12034                return Ok(());
12035            }
12036
12037            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12038            // are envelope_size bytes.
12039            let cur_offset: usize = (1 - 1) * envelope_size;
12040
12041            // Zero reserved fields.
12042            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12043
12044            // Safety:
12045            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12046            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12047            //   envelope_size bytes, there is always sufficient room.
12048            fidl::encoding::encode_in_envelope_optional::<
12049                fidl::encoding::HandleType<
12050                    fidl::Channel,
12051                    { fidl::ObjectType::CHANNEL.into_raw() },
12052                    2147483648,
12053                >,
12054                fidl::encoding::DefaultFuchsiaResourceDialect,
12055            >(
12056                self.f.as_mut().map(
12057                    <fidl::encoding::HandleType<
12058                        fidl::Channel,
12059                        { fidl::ObjectType::CHANNEL.into_raw() },
12060                        2147483648,
12061                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12062                ),
12063                encoder,
12064                offset + cur_offset,
12065                depth,
12066            )?;
12067
12068            _prev_end_offset = cur_offset + envelope_size;
12069
12070            Ok(())
12071        }
12072    }
12073
12074    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12075        for TableFieldInlinedHandle
12076    {
12077        #[inline(always)]
12078        fn new_empty() -> Self {
12079            Self::default()
12080        }
12081
12082        unsafe fn decode(
12083            &mut self,
12084            decoder: &mut fidl::encoding::Decoder<
12085                '_,
12086                fidl::encoding::DefaultFuchsiaResourceDialect,
12087            >,
12088            offset: usize,
12089            mut depth: fidl::encoding::Depth,
12090        ) -> fidl::Result<()> {
12091            decoder.debug_check_bounds::<Self>(offset);
12092            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12093                None => return Err(fidl::Error::NotNullable),
12094                Some(len) => len,
12095            };
12096            // Calling decoder.out_of_line_offset(0) is not allowed.
12097            if len == 0 {
12098                return Ok(());
12099            };
12100            depth.increment()?;
12101            let envelope_size = 8;
12102            let bytes_len = len * envelope_size;
12103            let offset = decoder.out_of_line_offset(bytes_len)?;
12104            // Decode the envelope for each type.
12105            let mut _next_ordinal_to_read = 0;
12106            let mut next_offset = offset;
12107            let end_offset = offset + bytes_len;
12108            _next_ordinal_to_read += 1;
12109            if next_offset >= end_offset {
12110                return Ok(());
12111            }
12112
12113            // Decode unknown envelopes for gaps in ordinals.
12114            while _next_ordinal_to_read < 1 {
12115                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12116                _next_ordinal_to_read += 1;
12117                next_offset += envelope_size;
12118            }
12119
12120            let next_out_of_line = decoder.next_out_of_line();
12121            let handles_before = decoder.remaining_handles();
12122            if let Some((inlined, num_bytes, num_handles)) =
12123                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12124            {
12125                let member_inline_size = <fidl::encoding::HandleType<
12126                    fidl::Channel,
12127                    { fidl::ObjectType::CHANNEL.into_raw() },
12128                    2147483648,
12129                > as fidl::encoding::TypeMarker>::inline_size(
12130                    decoder.context
12131                );
12132                if inlined != (member_inline_size <= 4) {
12133                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12134                }
12135                let inner_offset;
12136                let mut inner_depth = depth.clone();
12137                if inlined {
12138                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12139                    inner_offset = next_offset;
12140                } else {
12141                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12142                    inner_depth.increment()?;
12143                }
12144                let val_ref =
12145                self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
12146                fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
12147                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12148                {
12149                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12150                }
12151                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12152                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12153                }
12154            }
12155
12156            next_offset += envelope_size;
12157
12158            // Decode the remaining unknown envelopes.
12159            while next_offset < end_offset {
12160                _next_ordinal_to_read += 1;
12161                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12162                next_offset += envelope_size;
12163            }
12164
12165            Ok(())
12166        }
12167    }
12168
12169    impl TableFieldUnknownResource {
12170        #[inline(always)]
12171        fn max_ordinal_present(&self) -> u64 {
12172            0
12173        }
12174    }
12175
12176    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
12177        type Borrowed<'a> = &'a mut Self;
12178        fn take_or_borrow<'a>(
12179            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12180        ) -> Self::Borrowed<'a> {
12181            value
12182        }
12183    }
12184
12185    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
12186        type Owned = Self;
12187
12188        #[inline(always)]
12189        fn inline_align(_context: fidl::encoding::Context) -> usize {
12190            8
12191        }
12192
12193        #[inline(always)]
12194        fn inline_size(_context: fidl::encoding::Context) -> usize {
12195            16
12196        }
12197    }
12198
12199    unsafe impl
12200        fidl::encoding::Encode<
12201            TableFieldUnknownResource,
12202            fidl::encoding::DefaultFuchsiaResourceDialect,
12203        > for &mut TableFieldUnknownResource
12204    {
12205        unsafe fn encode(
12206            self,
12207            encoder: &mut fidl::encoding::Encoder<
12208                '_,
12209                fidl::encoding::DefaultFuchsiaResourceDialect,
12210            >,
12211            offset: usize,
12212            mut depth: fidl::encoding::Depth,
12213        ) -> fidl::Result<()> {
12214            encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
12215            // Vector header
12216            let max_ordinal: u64 = self.max_ordinal_present();
12217            encoder.write_num(max_ordinal, offset);
12218            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12219            // Calling encoder.out_of_line_offset(0) is not allowed.
12220            if max_ordinal == 0 {
12221                return Ok(());
12222            }
12223            depth.increment()?;
12224            let envelope_size = 8;
12225            let bytes_len = max_ordinal as usize * envelope_size;
12226            #[allow(unused_variables)]
12227            let offset = encoder.out_of_line_offset(bytes_len);
12228            let mut _prev_end_offset: usize = 0;
12229
12230            Ok(())
12231        }
12232    }
12233
12234    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12235        for TableFieldUnknownResource
12236    {
12237        #[inline(always)]
12238        fn new_empty() -> Self {
12239            Self::default()
12240        }
12241
12242        unsafe fn decode(
12243            &mut self,
12244            decoder: &mut fidl::encoding::Decoder<
12245                '_,
12246                fidl::encoding::DefaultFuchsiaResourceDialect,
12247            >,
12248            offset: usize,
12249            mut depth: fidl::encoding::Depth,
12250        ) -> fidl::Result<()> {
12251            decoder.debug_check_bounds::<Self>(offset);
12252            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12253                None => return Err(fidl::Error::NotNullable),
12254                Some(len) => len,
12255            };
12256            // Calling decoder.out_of_line_offset(0) is not allowed.
12257            if len == 0 {
12258                return Ok(());
12259            };
12260            depth.increment()?;
12261            let envelope_size = 8;
12262            let bytes_len = len * envelope_size;
12263            let offset = decoder.out_of_line_offset(bytes_len)?;
12264            // Decode the envelope for each type.
12265            let mut _next_ordinal_to_read = 0;
12266            let mut next_offset = offset;
12267            let end_offset = offset + bytes_len;
12268
12269            // Decode the remaining unknown envelopes.
12270            while next_offset < end_offset {
12271                _next_ordinal_to_read += 1;
12272                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12273                next_offset += envelope_size;
12274            }
12275
12276            Ok(())
12277        }
12278    }
12279
12280    impl TableOfEndpointsTable {
12281        #[inline(always)]
12282        fn max_ordinal_present(&self) -> u64 {
12283            if let Some(_) = self.server_end {
12284                return 2;
12285            }
12286            if let Some(_) = self.client_end {
12287                return 1;
12288            }
12289            0
12290        }
12291    }
12292
12293    impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12294        type Borrowed<'a> = &'a mut Self;
12295        fn take_or_borrow<'a>(
12296            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12297        ) -> Self::Borrowed<'a> {
12298            value
12299        }
12300    }
12301
12302    unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12303        type Owned = Self;
12304
12305        #[inline(always)]
12306        fn inline_align(_context: fidl::encoding::Context) -> usize {
12307            8
12308        }
12309
12310        #[inline(always)]
12311        fn inline_size(_context: fidl::encoding::Context) -> usize {
12312            16
12313        }
12314    }
12315
12316    unsafe impl
12317        fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12318        for &mut TableOfEndpointsTable
12319    {
12320        unsafe fn encode(
12321            self,
12322            encoder: &mut fidl::encoding::Encoder<
12323                '_,
12324                fidl::encoding::DefaultFuchsiaResourceDialect,
12325            >,
12326            offset: usize,
12327            mut depth: fidl::encoding::Depth,
12328        ) -> fidl::Result<()> {
12329            encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12330            // Vector header
12331            let max_ordinal: u64 = self.max_ordinal_present();
12332            encoder.write_num(max_ordinal, offset);
12333            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12334            // Calling encoder.out_of_line_offset(0) is not allowed.
12335            if max_ordinal == 0 {
12336                return Ok(());
12337            }
12338            depth.increment()?;
12339            let envelope_size = 8;
12340            let bytes_len = max_ordinal as usize * envelope_size;
12341            #[allow(unused_variables)]
12342            let offset = encoder.out_of_line_offset(bytes_len);
12343            let mut _prev_end_offset: usize = 0;
12344            if 1 > max_ordinal {
12345                return Ok(());
12346            }
12347
12348            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12349            // are envelope_size bytes.
12350            let cur_offset: usize = (1 - 1) * envelope_size;
12351
12352            // Zero reserved fields.
12353            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12354
12355            // Safety:
12356            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12357            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12358            //   envelope_size bytes, there is always sufficient room.
12359            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12360            self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12361            encoder, offset + cur_offset, depth
12362        )?;
12363
12364            _prev_end_offset = cur_offset + envelope_size;
12365            if 2 > max_ordinal {
12366                return Ok(());
12367            }
12368
12369            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12370            // are envelope_size bytes.
12371            let cur_offset: usize = (2 - 1) * envelope_size;
12372
12373            // Zero reserved fields.
12374            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12375
12376            // Safety:
12377            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12378            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12379            //   envelope_size bytes, there is always sufficient room.
12380            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12381            self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12382            encoder, offset + cur_offset, depth
12383        )?;
12384
12385            _prev_end_offset = cur_offset + envelope_size;
12386
12387            Ok(())
12388        }
12389    }
12390
12391    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12392        for TableOfEndpointsTable
12393    {
12394        #[inline(always)]
12395        fn new_empty() -> Self {
12396            Self::default()
12397        }
12398
12399        unsafe fn decode(
12400            &mut self,
12401            decoder: &mut fidl::encoding::Decoder<
12402                '_,
12403                fidl::encoding::DefaultFuchsiaResourceDialect,
12404            >,
12405            offset: usize,
12406            mut depth: fidl::encoding::Depth,
12407        ) -> fidl::Result<()> {
12408            decoder.debug_check_bounds::<Self>(offset);
12409            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12410                None => return Err(fidl::Error::NotNullable),
12411                Some(len) => len,
12412            };
12413            // Calling decoder.out_of_line_offset(0) is not allowed.
12414            if len == 0 {
12415                return Ok(());
12416            };
12417            depth.increment()?;
12418            let envelope_size = 8;
12419            let bytes_len = len * envelope_size;
12420            let offset = decoder.out_of_line_offset(bytes_len)?;
12421            // Decode the envelope for each type.
12422            let mut _next_ordinal_to_read = 0;
12423            let mut next_offset = offset;
12424            let end_offset = offset + bytes_len;
12425            _next_ordinal_to_read += 1;
12426            if next_offset >= end_offset {
12427                return Ok(());
12428            }
12429
12430            // Decode unknown envelopes for gaps in ordinals.
12431            while _next_ordinal_to_read < 1 {
12432                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12433                _next_ordinal_to_read += 1;
12434                next_offset += envelope_size;
12435            }
12436
12437            let next_out_of_line = decoder.next_out_of_line();
12438            let handles_before = decoder.remaining_handles();
12439            if let Some((inlined, num_bytes, num_handles)) =
12440                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12441            {
12442                let member_inline_size = <fidl::encoding::Endpoint<
12443                    fidl::endpoints::ClientEnd<ProtocolMarker>,
12444                > as fidl::encoding::TypeMarker>::inline_size(
12445                    decoder.context
12446                );
12447                if inlined != (member_inline_size <= 4) {
12448                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12449                }
12450                let inner_offset;
12451                let mut inner_depth = depth.clone();
12452                if inlined {
12453                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12454                    inner_offset = next_offset;
12455                } else {
12456                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12457                    inner_depth.increment()?;
12458                }
12459                let val_ref = self.client_end.get_or_insert_with(|| {
12460                    fidl::new_empty!(
12461                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12462                        fidl::encoding::DefaultFuchsiaResourceDialect
12463                    )
12464                });
12465                fidl::decode!(
12466                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12467                    fidl::encoding::DefaultFuchsiaResourceDialect,
12468                    val_ref,
12469                    decoder,
12470                    inner_offset,
12471                    inner_depth
12472                )?;
12473                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12474                {
12475                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12476                }
12477                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12478                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12479                }
12480            }
12481
12482            next_offset += envelope_size;
12483            _next_ordinal_to_read += 1;
12484            if next_offset >= end_offset {
12485                return Ok(());
12486            }
12487
12488            // Decode unknown envelopes for gaps in ordinals.
12489            while _next_ordinal_to_read < 2 {
12490                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12491                _next_ordinal_to_read += 1;
12492                next_offset += envelope_size;
12493            }
12494
12495            let next_out_of_line = decoder.next_out_of_line();
12496            let handles_before = decoder.remaining_handles();
12497            if let Some((inlined, num_bytes, num_handles)) =
12498                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12499            {
12500                let member_inline_size = <fidl::encoding::Endpoint<
12501                    fidl::endpoints::ServerEnd<ProtocolMarker>,
12502                > as fidl::encoding::TypeMarker>::inline_size(
12503                    decoder.context
12504                );
12505                if inlined != (member_inline_size <= 4) {
12506                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12507                }
12508                let inner_offset;
12509                let mut inner_depth = depth.clone();
12510                if inlined {
12511                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12512                    inner_offset = next_offset;
12513                } else {
12514                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12515                    inner_depth.increment()?;
12516                }
12517                let val_ref = self.server_end.get_or_insert_with(|| {
12518                    fidl::new_empty!(
12519                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12520                        fidl::encoding::DefaultFuchsiaResourceDialect
12521                    )
12522                });
12523                fidl::decode!(
12524                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12525                    fidl::encoding::DefaultFuchsiaResourceDialect,
12526                    val_ref,
12527                    decoder,
12528                    inner_offset,
12529                    inner_depth
12530                )?;
12531                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12532                {
12533                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12534                }
12535                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12536                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12537                }
12538            }
12539
12540            next_offset += envelope_size;
12541
12542            // Decode the remaining unknown envelopes.
12543            while next_offset < end_offset {
12544                _next_ordinal_to_read += 1;
12545                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12546                next_offset += envelope_size;
12547            }
12548
12549            Ok(())
12550        }
12551    }
12552
12553    impl TableUnionWithVectorReservedSandwich {
12554        #[inline(always)]
12555        fn max_ordinal_present(&self) -> u64 {
12556            if let Some(_) = self.uv {
12557                return 2;
12558            }
12559            0
12560        }
12561    }
12562
12563    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12564        type Borrowed<'a> = &'a mut Self;
12565        fn take_or_borrow<'a>(
12566            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12567        ) -> Self::Borrowed<'a> {
12568            value
12569        }
12570    }
12571
12572    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12573        type Owned = Self;
12574
12575        #[inline(always)]
12576        fn inline_align(_context: fidl::encoding::Context) -> usize {
12577            8
12578        }
12579
12580        #[inline(always)]
12581        fn inline_size(_context: fidl::encoding::Context) -> usize {
12582            16
12583        }
12584    }
12585
12586    unsafe impl
12587        fidl::encoding::Encode<
12588            TableUnionWithVectorReservedSandwich,
12589            fidl::encoding::DefaultFuchsiaResourceDialect,
12590        > for &mut TableUnionWithVectorReservedSandwich
12591    {
12592        unsafe fn encode(
12593            self,
12594            encoder: &mut fidl::encoding::Encoder<
12595                '_,
12596                fidl::encoding::DefaultFuchsiaResourceDialect,
12597            >,
12598            offset: usize,
12599            mut depth: fidl::encoding::Depth,
12600        ) -> fidl::Result<()> {
12601            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12602            // Vector header
12603            let max_ordinal: u64 = self.max_ordinal_present();
12604            encoder.write_num(max_ordinal, offset);
12605            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12606            // Calling encoder.out_of_line_offset(0) is not allowed.
12607            if max_ordinal == 0 {
12608                return Ok(());
12609            }
12610            depth.increment()?;
12611            let envelope_size = 8;
12612            let bytes_len = max_ordinal as usize * envelope_size;
12613            #[allow(unused_variables)]
12614            let offset = encoder.out_of_line_offset(bytes_len);
12615            let mut _prev_end_offset: usize = 0;
12616            if 2 > max_ordinal {
12617                return Ok(());
12618            }
12619
12620            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12621            // are envelope_size bytes.
12622            let cur_offset: usize = (2 - 1) * envelope_size;
12623
12624            // Zero reserved fields.
12625            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12626
12627            // Safety:
12628            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12629            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12630            //   envelope_size bytes, there is always sufficient room.
12631            fidl::encoding::encode_in_envelope_optional::<
12632                UnionWithVector,
12633                fidl::encoding::DefaultFuchsiaResourceDialect,
12634            >(
12635                self.uv
12636                    .as_mut()
12637                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12638                encoder,
12639                offset + cur_offset,
12640                depth,
12641            )?;
12642
12643            _prev_end_offset = cur_offset + envelope_size;
12644
12645            Ok(())
12646        }
12647    }
12648
12649    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12650        for TableUnionWithVectorReservedSandwich
12651    {
12652        #[inline(always)]
12653        fn new_empty() -> Self {
12654            Self::default()
12655        }
12656
12657        unsafe fn decode(
12658            &mut self,
12659            decoder: &mut fidl::encoding::Decoder<
12660                '_,
12661                fidl::encoding::DefaultFuchsiaResourceDialect,
12662            >,
12663            offset: usize,
12664            mut depth: fidl::encoding::Depth,
12665        ) -> fidl::Result<()> {
12666            decoder.debug_check_bounds::<Self>(offset);
12667            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12668                None => return Err(fidl::Error::NotNullable),
12669                Some(len) => len,
12670            };
12671            // Calling decoder.out_of_line_offset(0) is not allowed.
12672            if len == 0 {
12673                return Ok(());
12674            };
12675            depth.increment()?;
12676            let envelope_size = 8;
12677            let bytes_len = len * envelope_size;
12678            let offset = decoder.out_of_line_offset(bytes_len)?;
12679            // Decode the envelope for each type.
12680            let mut _next_ordinal_to_read = 0;
12681            let mut next_offset = offset;
12682            let end_offset = offset + bytes_len;
12683            _next_ordinal_to_read += 1;
12684            if next_offset >= end_offset {
12685                return Ok(());
12686            }
12687
12688            // Decode unknown envelopes for gaps in ordinals.
12689            while _next_ordinal_to_read < 2 {
12690                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12691                _next_ordinal_to_read += 1;
12692                next_offset += envelope_size;
12693            }
12694
12695            let next_out_of_line = decoder.next_out_of_line();
12696            let handles_before = decoder.remaining_handles();
12697            if let Some((inlined, num_bytes, num_handles)) =
12698                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12699            {
12700                let member_inline_size =
12701                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12702                if inlined != (member_inline_size <= 4) {
12703                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12704                }
12705                let inner_offset;
12706                let mut inner_depth = depth.clone();
12707                if inlined {
12708                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12709                    inner_offset = next_offset;
12710                } else {
12711                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12712                    inner_depth.increment()?;
12713                }
12714                let val_ref = self.uv.get_or_insert_with(|| {
12715                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12716                });
12717                fidl::decode!(
12718                    UnionWithVector,
12719                    fidl::encoding::DefaultFuchsiaResourceDialect,
12720                    val_ref,
12721                    decoder,
12722                    inner_offset,
12723                    inner_depth
12724                )?;
12725                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12726                {
12727                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12728                }
12729                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12730                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12731                }
12732            }
12733
12734            next_offset += envelope_size;
12735
12736            // Decode the remaining unknown envelopes.
12737            while next_offset < end_offset {
12738                _next_ordinal_to_read += 1;
12739                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12740                next_offset += envelope_size;
12741            }
12742
12743            Ok(())
12744        }
12745    }
12746
12747    impl TableUnionWithVectorStructSandwich {
12748        #[inline(always)]
12749        fn max_ordinal_present(&self) -> u64 {
12750            if let Some(_) = self.s2 {
12751                return 3;
12752            }
12753            if let Some(_) = self.uv {
12754                return 2;
12755            }
12756            if let Some(_) = self.s1 {
12757                return 1;
12758            }
12759            0
12760        }
12761    }
12762
12763    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12764        type Borrowed<'a> = &'a mut Self;
12765        fn take_or_borrow<'a>(
12766            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12767        ) -> Self::Borrowed<'a> {
12768            value
12769        }
12770    }
12771
12772    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12773        type Owned = Self;
12774
12775        #[inline(always)]
12776        fn inline_align(_context: fidl::encoding::Context) -> usize {
12777            8
12778        }
12779
12780        #[inline(always)]
12781        fn inline_size(_context: fidl::encoding::Context) -> usize {
12782            16
12783        }
12784    }
12785
12786    unsafe impl
12787        fidl::encoding::Encode<
12788            TableUnionWithVectorStructSandwich,
12789            fidl::encoding::DefaultFuchsiaResourceDialect,
12790        > for &mut TableUnionWithVectorStructSandwich
12791    {
12792        unsafe fn encode(
12793            self,
12794            encoder: &mut fidl::encoding::Encoder<
12795                '_,
12796                fidl::encoding::DefaultFuchsiaResourceDialect,
12797            >,
12798            offset: usize,
12799            mut depth: fidl::encoding::Depth,
12800        ) -> fidl::Result<()> {
12801            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12802            // Vector header
12803            let max_ordinal: u64 = self.max_ordinal_present();
12804            encoder.write_num(max_ordinal, offset);
12805            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12806            // Calling encoder.out_of_line_offset(0) is not allowed.
12807            if max_ordinal == 0 {
12808                return Ok(());
12809            }
12810            depth.increment()?;
12811            let envelope_size = 8;
12812            let bytes_len = max_ordinal as usize * envelope_size;
12813            #[allow(unused_variables)]
12814            let offset = encoder.out_of_line_offset(bytes_len);
12815            let mut _prev_end_offset: usize = 0;
12816            if 1 > max_ordinal {
12817                return Ok(());
12818            }
12819
12820            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12821            // are envelope_size bytes.
12822            let cur_offset: usize = (1 - 1) * envelope_size;
12823
12824            // Zero reserved fields.
12825            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12826
12827            // Safety:
12828            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12829            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12830            //   envelope_size bytes, there is always sufficient room.
12831            fidl::encoding::encode_in_envelope_optional::<
12832                StructSize3Align1,
12833                fidl::encoding::DefaultFuchsiaResourceDialect,
12834            >(
12835                self.s1
12836                    .as_ref()
12837                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12838                encoder,
12839                offset + cur_offset,
12840                depth,
12841            )?;
12842
12843            _prev_end_offset = cur_offset + envelope_size;
12844            if 2 > max_ordinal {
12845                return Ok(());
12846            }
12847
12848            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12849            // are envelope_size bytes.
12850            let cur_offset: usize = (2 - 1) * envelope_size;
12851
12852            // Zero reserved fields.
12853            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12854
12855            // Safety:
12856            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12857            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12858            //   envelope_size bytes, there is always sufficient room.
12859            fidl::encoding::encode_in_envelope_optional::<
12860                UnionWithVector,
12861                fidl::encoding::DefaultFuchsiaResourceDialect,
12862            >(
12863                self.uv
12864                    .as_mut()
12865                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12866                encoder,
12867                offset + cur_offset,
12868                depth,
12869            )?;
12870
12871            _prev_end_offset = cur_offset + envelope_size;
12872            if 3 > max_ordinal {
12873                return Ok(());
12874            }
12875
12876            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12877            // are envelope_size bytes.
12878            let cur_offset: usize = (3 - 1) * envelope_size;
12879
12880            // Zero reserved fields.
12881            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12882
12883            // Safety:
12884            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12885            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12886            //   envelope_size bytes, there is always sufficient room.
12887            fidl::encoding::encode_in_envelope_optional::<
12888                StructSize3Align1,
12889                fidl::encoding::DefaultFuchsiaResourceDialect,
12890            >(
12891                self.s2
12892                    .as_ref()
12893                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12894                encoder,
12895                offset + cur_offset,
12896                depth,
12897            )?;
12898
12899            _prev_end_offset = cur_offset + envelope_size;
12900
12901            Ok(())
12902        }
12903    }
12904
12905    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12906        for TableUnionWithVectorStructSandwich
12907    {
12908        #[inline(always)]
12909        fn new_empty() -> Self {
12910            Self::default()
12911        }
12912
12913        unsafe fn decode(
12914            &mut self,
12915            decoder: &mut fidl::encoding::Decoder<
12916                '_,
12917                fidl::encoding::DefaultFuchsiaResourceDialect,
12918            >,
12919            offset: usize,
12920            mut depth: fidl::encoding::Depth,
12921        ) -> fidl::Result<()> {
12922            decoder.debug_check_bounds::<Self>(offset);
12923            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12924                None => return Err(fidl::Error::NotNullable),
12925                Some(len) => len,
12926            };
12927            // Calling decoder.out_of_line_offset(0) is not allowed.
12928            if len == 0 {
12929                return Ok(());
12930            };
12931            depth.increment()?;
12932            let envelope_size = 8;
12933            let bytes_len = len * envelope_size;
12934            let offset = decoder.out_of_line_offset(bytes_len)?;
12935            // Decode the envelope for each type.
12936            let mut _next_ordinal_to_read = 0;
12937            let mut next_offset = offset;
12938            let end_offset = offset + bytes_len;
12939            _next_ordinal_to_read += 1;
12940            if next_offset >= end_offset {
12941                return Ok(());
12942            }
12943
12944            // Decode unknown envelopes for gaps in ordinals.
12945            while _next_ordinal_to_read < 1 {
12946                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12947                _next_ordinal_to_read += 1;
12948                next_offset += envelope_size;
12949            }
12950
12951            let next_out_of_line = decoder.next_out_of_line();
12952            let handles_before = decoder.remaining_handles();
12953            if let Some((inlined, num_bytes, num_handles)) =
12954                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12955            {
12956                let member_inline_size =
12957                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12958                if inlined != (member_inline_size <= 4) {
12959                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12960                }
12961                let inner_offset;
12962                let mut inner_depth = depth.clone();
12963                if inlined {
12964                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12965                    inner_offset = next_offset;
12966                } else {
12967                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12968                    inner_depth.increment()?;
12969                }
12970                let val_ref = self.s1.get_or_insert_with(|| {
12971                    fidl::new_empty!(
12972                        StructSize3Align1,
12973                        fidl::encoding::DefaultFuchsiaResourceDialect
12974                    )
12975                });
12976                fidl::decode!(
12977                    StructSize3Align1,
12978                    fidl::encoding::DefaultFuchsiaResourceDialect,
12979                    val_ref,
12980                    decoder,
12981                    inner_offset,
12982                    inner_depth
12983                )?;
12984                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12985                {
12986                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12987                }
12988                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12989                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12990                }
12991            }
12992
12993            next_offset += envelope_size;
12994            _next_ordinal_to_read += 1;
12995            if next_offset >= end_offset {
12996                return Ok(());
12997            }
12998
12999            // Decode unknown envelopes for gaps in ordinals.
13000            while _next_ordinal_to_read < 2 {
13001                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13002                _next_ordinal_to_read += 1;
13003                next_offset += envelope_size;
13004            }
13005
13006            let next_out_of_line = decoder.next_out_of_line();
13007            let handles_before = decoder.remaining_handles();
13008            if let Some((inlined, num_bytes, num_handles)) =
13009                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13010            {
13011                let member_inline_size =
13012                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13013                if inlined != (member_inline_size <= 4) {
13014                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13015                }
13016                let inner_offset;
13017                let mut inner_depth = depth.clone();
13018                if inlined {
13019                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13020                    inner_offset = next_offset;
13021                } else {
13022                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13023                    inner_depth.increment()?;
13024                }
13025                let val_ref = self.uv.get_or_insert_with(|| {
13026                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
13027                });
13028                fidl::decode!(
13029                    UnionWithVector,
13030                    fidl::encoding::DefaultFuchsiaResourceDialect,
13031                    val_ref,
13032                    decoder,
13033                    inner_offset,
13034                    inner_depth
13035                )?;
13036                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13037                {
13038                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13039                }
13040                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13041                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13042                }
13043            }
13044
13045            next_offset += envelope_size;
13046            _next_ordinal_to_read += 1;
13047            if next_offset >= end_offset {
13048                return Ok(());
13049            }
13050
13051            // Decode unknown envelopes for gaps in ordinals.
13052            while _next_ordinal_to_read < 3 {
13053                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13054                _next_ordinal_to_read += 1;
13055                next_offset += envelope_size;
13056            }
13057
13058            let next_out_of_line = decoder.next_out_of_line();
13059            let handles_before = decoder.remaining_handles();
13060            if let Some((inlined, num_bytes, num_handles)) =
13061                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13062            {
13063                let member_inline_size =
13064                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13065                if inlined != (member_inline_size <= 4) {
13066                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13067                }
13068                let inner_offset;
13069                let mut inner_depth = depth.clone();
13070                if inlined {
13071                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13072                    inner_offset = next_offset;
13073                } else {
13074                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13075                    inner_depth.increment()?;
13076                }
13077                let val_ref = self.s2.get_or_insert_with(|| {
13078                    fidl::new_empty!(
13079                        StructSize3Align1,
13080                        fidl::encoding::DefaultFuchsiaResourceDialect
13081                    )
13082                });
13083                fidl::decode!(
13084                    StructSize3Align1,
13085                    fidl::encoding::DefaultFuchsiaResourceDialect,
13086                    val_ref,
13087                    decoder,
13088                    inner_offset,
13089                    inner_depth
13090                )?;
13091                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13092                {
13093                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13094                }
13095                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13096                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13097                }
13098            }
13099
13100            next_offset += envelope_size;
13101
13102            // Decode the remaining unknown envelopes.
13103            while next_offset < end_offset {
13104                _next_ordinal_to_read += 1;
13105                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13106                next_offset += envelope_size;
13107            }
13108
13109            Ok(())
13110        }
13111    }
13112
13113    impl TableWithUnknownEnvelopesAfterKnownEnvelopes {
13114        #[inline(always)]
13115        fn max_ordinal_present(&self) -> u64 {
13116            if let Some(_) = self.a {
13117                return 1;
13118            }
13119            0
13120        }
13121    }
13122
13123    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnvelopesAfterKnownEnvelopes {
13124        type Borrowed<'a> = &'a mut Self;
13125        fn take_or_borrow<'a>(
13126            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13127        ) -> Self::Borrowed<'a> {
13128            value
13129        }
13130    }
13131
13132    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnvelopesAfterKnownEnvelopes {
13133        type Owned = Self;
13134
13135        #[inline(always)]
13136        fn inline_align(_context: fidl::encoding::Context) -> usize {
13137            8
13138        }
13139
13140        #[inline(always)]
13141        fn inline_size(_context: fidl::encoding::Context) -> usize {
13142            16
13143        }
13144    }
13145
13146    unsafe impl
13147        fidl::encoding::Encode<
13148            TableWithUnknownEnvelopesAfterKnownEnvelopes,
13149            fidl::encoding::DefaultFuchsiaResourceDialect,
13150        > for &mut TableWithUnknownEnvelopesAfterKnownEnvelopes
13151    {
13152        unsafe fn encode(
13153            self,
13154            encoder: &mut fidl::encoding::Encoder<
13155                '_,
13156                fidl::encoding::DefaultFuchsiaResourceDialect,
13157            >,
13158            offset: usize,
13159            mut depth: fidl::encoding::Depth,
13160        ) -> fidl::Result<()> {
13161            encoder.debug_check_bounds::<TableWithUnknownEnvelopesAfterKnownEnvelopes>(offset);
13162            // Vector header
13163            let max_ordinal: u64 = self.max_ordinal_present();
13164            encoder.write_num(max_ordinal, offset);
13165            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13166            // Calling encoder.out_of_line_offset(0) is not allowed.
13167            if max_ordinal == 0 {
13168                return Ok(());
13169            }
13170            depth.increment()?;
13171            let envelope_size = 8;
13172            let bytes_len = max_ordinal as usize * envelope_size;
13173            #[allow(unused_variables)]
13174            let offset = encoder.out_of_line_offset(bytes_len);
13175            let mut _prev_end_offset: usize = 0;
13176            if 1 > max_ordinal {
13177                return Ok(());
13178            }
13179
13180            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13181            // are envelope_size bytes.
13182            let cur_offset: usize = (1 - 1) * envelope_size;
13183
13184            // Zero reserved fields.
13185            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13186
13187            // Safety:
13188            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13189            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13190            //   envelope_size bytes, there is always sufficient room.
13191            fidl::encoding::encode_in_envelope_optional::<
13192                fidl::encoding::HandleType<
13193                    fidl::Event,
13194                    { fidl::ObjectType::EVENT.into_raw() },
13195                    53251,
13196                >,
13197                fidl::encoding::DefaultFuchsiaResourceDialect,
13198            >(
13199                self.a.as_mut().map(
13200                    <fidl::encoding::HandleType<
13201                        fidl::Event,
13202                        { fidl::ObjectType::EVENT.into_raw() },
13203                        53251,
13204                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13205                ),
13206                encoder,
13207                offset + cur_offset,
13208                depth,
13209            )?;
13210
13211            _prev_end_offset = cur_offset + envelope_size;
13212
13213            Ok(())
13214        }
13215    }
13216
13217    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13218        for TableWithUnknownEnvelopesAfterKnownEnvelopes
13219    {
13220        #[inline(always)]
13221        fn new_empty() -> Self {
13222            Self::default()
13223        }
13224
13225        unsafe fn decode(
13226            &mut self,
13227            decoder: &mut fidl::encoding::Decoder<
13228                '_,
13229                fidl::encoding::DefaultFuchsiaResourceDialect,
13230            >,
13231            offset: usize,
13232            mut depth: fidl::encoding::Depth,
13233        ) -> fidl::Result<()> {
13234            decoder.debug_check_bounds::<Self>(offset);
13235            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13236                None => return Err(fidl::Error::NotNullable),
13237                Some(len) => len,
13238            };
13239            // Calling decoder.out_of_line_offset(0) is not allowed.
13240            if len == 0 {
13241                return Ok(());
13242            };
13243            depth.increment()?;
13244            let envelope_size = 8;
13245            let bytes_len = len * envelope_size;
13246            let offset = decoder.out_of_line_offset(bytes_len)?;
13247            // Decode the envelope for each type.
13248            let mut _next_ordinal_to_read = 0;
13249            let mut next_offset = offset;
13250            let end_offset = offset + bytes_len;
13251            _next_ordinal_to_read += 1;
13252            if next_offset >= end_offset {
13253                return Ok(());
13254            }
13255
13256            // Decode unknown envelopes for gaps in ordinals.
13257            while _next_ordinal_to_read < 1 {
13258                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13259                _next_ordinal_to_read += 1;
13260                next_offset += envelope_size;
13261            }
13262
13263            let next_out_of_line = decoder.next_out_of_line();
13264            let handles_before = decoder.remaining_handles();
13265            if let Some((inlined, num_bytes, num_handles)) =
13266                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13267            {
13268                let member_inline_size = <fidl::encoding::HandleType<
13269                    fidl::Event,
13270                    { fidl::ObjectType::EVENT.into_raw() },
13271                    53251,
13272                > as fidl::encoding::TypeMarker>::inline_size(
13273                    decoder.context
13274                );
13275                if inlined != (member_inline_size <= 4) {
13276                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13277                }
13278                let inner_offset;
13279                let mut inner_depth = depth.clone();
13280                if inlined {
13281                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13282                    inner_offset = next_offset;
13283                } else {
13284                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13285                    inner_depth.increment()?;
13286                }
13287                let val_ref =
13288                self.a.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect));
13289                fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
13290                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13291                {
13292                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13293                }
13294                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13295                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13296                }
13297            }
13298
13299            next_offset += envelope_size;
13300
13301            // Decode the remaining unknown envelopes.
13302            while next_offset < end_offset {
13303                _next_ordinal_to_read += 1;
13304                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13305                next_offset += envelope_size;
13306            }
13307
13308            Ok(())
13309        }
13310    }
13311
13312    impl TableWithUnknownEnvelopesBeforeKnownEnvelopes {
13313        #[inline(always)]
13314        fn max_ordinal_present(&self) -> u64 {
13315            if let Some(_) = self.b {
13316                return 2;
13317            }
13318            0
13319        }
13320    }
13321
13322    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopes {
13323        type Borrowed<'a> = &'a mut Self;
13324        fn take_or_borrow<'a>(
13325            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13326        ) -> Self::Borrowed<'a> {
13327            value
13328        }
13329    }
13330
13331    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopes {
13332        type Owned = Self;
13333
13334        #[inline(always)]
13335        fn inline_align(_context: fidl::encoding::Context) -> usize {
13336            8
13337        }
13338
13339        #[inline(always)]
13340        fn inline_size(_context: fidl::encoding::Context) -> usize {
13341            16
13342        }
13343    }
13344
13345    unsafe impl
13346        fidl::encoding::Encode<
13347            TableWithUnknownEnvelopesBeforeKnownEnvelopes,
13348            fidl::encoding::DefaultFuchsiaResourceDialect,
13349        > for &mut TableWithUnknownEnvelopesBeforeKnownEnvelopes
13350    {
13351        unsafe fn encode(
13352            self,
13353            encoder: &mut fidl::encoding::Encoder<
13354                '_,
13355                fidl::encoding::DefaultFuchsiaResourceDialect,
13356            >,
13357            offset: usize,
13358            mut depth: fidl::encoding::Depth,
13359        ) -> fidl::Result<()> {
13360            encoder.debug_check_bounds::<TableWithUnknownEnvelopesBeforeKnownEnvelopes>(offset);
13361            // Vector header
13362            let max_ordinal: u64 = self.max_ordinal_present();
13363            encoder.write_num(max_ordinal, offset);
13364            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13365            // Calling encoder.out_of_line_offset(0) is not allowed.
13366            if max_ordinal == 0 {
13367                return Ok(());
13368            }
13369            depth.increment()?;
13370            let envelope_size = 8;
13371            let bytes_len = max_ordinal as usize * envelope_size;
13372            #[allow(unused_variables)]
13373            let offset = encoder.out_of_line_offset(bytes_len);
13374            let mut _prev_end_offset: usize = 0;
13375            if 2 > max_ordinal {
13376                return Ok(());
13377            }
13378
13379            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13380            // are envelope_size bytes.
13381            let cur_offset: usize = (2 - 1) * envelope_size;
13382
13383            // Zero reserved fields.
13384            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13385
13386            // Safety:
13387            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13388            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13389            //   envelope_size bytes, there is always sufficient room.
13390            fidl::encoding::encode_in_envelope_optional::<
13391                fidl::encoding::HandleType<
13392                    fidl::Event,
13393                    { fidl::ObjectType::EVENT.into_raw() },
13394                    53251,
13395                >,
13396                fidl::encoding::DefaultFuchsiaResourceDialect,
13397            >(
13398                self.b.as_mut().map(
13399                    <fidl::encoding::HandleType<
13400                        fidl::Event,
13401                        { fidl::ObjectType::EVENT.into_raw() },
13402                        53251,
13403                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13404                ),
13405                encoder,
13406                offset + cur_offset,
13407                depth,
13408            )?;
13409
13410            _prev_end_offset = cur_offset + envelope_size;
13411
13412            Ok(())
13413        }
13414    }
13415
13416    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13417        for TableWithUnknownEnvelopesBeforeKnownEnvelopes
13418    {
13419        #[inline(always)]
13420        fn new_empty() -> Self {
13421            Self::default()
13422        }
13423
13424        unsafe fn decode(
13425            &mut self,
13426            decoder: &mut fidl::encoding::Decoder<
13427                '_,
13428                fidl::encoding::DefaultFuchsiaResourceDialect,
13429            >,
13430            offset: usize,
13431            mut depth: fidl::encoding::Depth,
13432        ) -> fidl::Result<()> {
13433            decoder.debug_check_bounds::<Self>(offset);
13434            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13435                None => return Err(fidl::Error::NotNullable),
13436                Some(len) => len,
13437            };
13438            // Calling decoder.out_of_line_offset(0) is not allowed.
13439            if len == 0 {
13440                return Ok(());
13441            };
13442            depth.increment()?;
13443            let envelope_size = 8;
13444            let bytes_len = len * envelope_size;
13445            let offset = decoder.out_of_line_offset(bytes_len)?;
13446            // Decode the envelope for each type.
13447            let mut _next_ordinal_to_read = 0;
13448            let mut next_offset = offset;
13449            let end_offset = offset + bytes_len;
13450            _next_ordinal_to_read += 1;
13451            if next_offset >= end_offset {
13452                return Ok(());
13453            }
13454
13455            // Decode unknown envelopes for gaps in ordinals.
13456            while _next_ordinal_to_read < 2 {
13457                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13458                _next_ordinal_to_read += 1;
13459                next_offset += envelope_size;
13460            }
13461
13462            let next_out_of_line = decoder.next_out_of_line();
13463            let handles_before = decoder.remaining_handles();
13464            if let Some((inlined, num_bytes, num_handles)) =
13465                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13466            {
13467                let member_inline_size = <fidl::encoding::HandleType<
13468                    fidl::Event,
13469                    { fidl::ObjectType::EVENT.into_raw() },
13470                    53251,
13471                > as fidl::encoding::TypeMarker>::inline_size(
13472                    decoder.context
13473                );
13474                if inlined != (member_inline_size <= 4) {
13475                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13476                }
13477                let inner_offset;
13478                let mut inner_depth = depth.clone();
13479                if inlined {
13480                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13481                    inner_offset = next_offset;
13482                } else {
13483                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13484                    inner_depth.increment()?;
13485                }
13486                let val_ref =
13487                self.b.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect));
13488                fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
13489                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13490                {
13491                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13492                }
13493                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13494                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13495                }
13496            }
13497
13498            next_offset += envelope_size;
13499
13500            // Decode the remaining unknown envelopes.
13501            while next_offset < end_offset {
13502                _next_ordinal_to_read += 1;
13503                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13504                next_offset += envelope_size;
13505            }
13506
13507            Ok(())
13508        }
13509    }
13510
13511    impl VectorOfArrayOfEventInTableWithReducedRights {
13512        #[inline(always)]
13513        fn max_ordinal_present(&self) -> u64 {
13514            if let Some(_) = self.h {
13515                return 1;
13516            }
13517            0
13518        }
13519    }
13520
13521    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
13522        type Borrowed<'a> = &'a mut Self;
13523        fn take_or_borrow<'a>(
13524            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13525        ) -> Self::Borrowed<'a> {
13526            value
13527        }
13528    }
13529
13530    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
13531        type Owned = Self;
13532
13533        #[inline(always)]
13534        fn inline_align(_context: fidl::encoding::Context) -> usize {
13535            8
13536        }
13537
13538        #[inline(always)]
13539        fn inline_size(_context: fidl::encoding::Context) -> usize {
13540            16
13541        }
13542    }
13543
13544    unsafe impl
13545        fidl::encoding::Encode<
13546            VectorOfArrayOfEventInTableWithReducedRights,
13547            fidl::encoding::DefaultFuchsiaResourceDialect,
13548        > for &mut VectorOfArrayOfEventInTableWithReducedRights
13549    {
13550        unsafe fn encode(
13551            self,
13552            encoder: &mut fidl::encoding::Encoder<
13553                '_,
13554                fidl::encoding::DefaultFuchsiaResourceDialect,
13555            >,
13556            offset: usize,
13557            mut depth: fidl::encoding::Depth,
13558        ) -> fidl::Result<()> {
13559            encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
13560            // Vector header
13561            let max_ordinal: u64 = self.max_ordinal_present();
13562            encoder.write_num(max_ordinal, offset);
13563            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13564            // Calling encoder.out_of_line_offset(0) is not allowed.
13565            if max_ordinal == 0 {
13566                return Ok(());
13567            }
13568            depth.increment()?;
13569            let envelope_size = 8;
13570            let bytes_len = max_ordinal as usize * envelope_size;
13571            #[allow(unused_variables)]
13572            let offset = encoder.out_of_line_offset(bytes_len);
13573            let mut _prev_end_offset: usize = 0;
13574            if 1 > max_ordinal {
13575                return Ok(());
13576            }
13577
13578            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13579            // are envelope_size bytes.
13580            let cur_offset: usize = (1 - 1) * envelope_size;
13581
13582            // Zero reserved fields.
13583            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13584
13585            // Safety:
13586            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13587            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13588            //   envelope_size bytes, there is always sufficient room.
13589            fidl::encoding::encode_in_envelope_optional::<
13590                fidl::encoding::Vector<
13591                    fidl::encoding::Array<
13592                        fidl::encoding::HandleType<
13593                            fidl::Event,
13594                            { fidl::ObjectType::EVENT.into_raw() },
13595                            49155,
13596                        >,
13597                        1,
13598                    >,
13599                    1,
13600                >,
13601                fidl::encoding::DefaultFuchsiaResourceDialect,
13602            >(
13603                self.h.as_mut().map(
13604                    <fidl::encoding::Vector<
13605                        fidl::encoding::Array<
13606                            fidl::encoding::HandleType<
13607                                fidl::Event,
13608                                { fidl::ObjectType::EVENT.into_raw() },
13609                                49155,
13610                            >,
13611                            1,
13612                        >,
13613                        1,
13614                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13615                ),
13616                encoder,
13617                offset + cur_offset,
13618                depth,
13619            )?;
13620
13621            _prev_end_offset = cur_offset + envelope_size;
13622
13623            Ok(())
13624        }
13625    }
13626
13627    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13628        for VectorOfArrayOfEventInTableWithReducedRights
13629    {
13630        #[inline(always)]
13631        fn new_empty() -> Self {
13632            Self::default()
13633        }
13634
13635        unsafe fn decode(
13636            &mut self,
13637            decoder: &mut fidl::encoding::Decoder<
13638                '_,
13639                fidl::encoding::DefaultFuchsiaResourceDialect,
13640            >,
13641            offset: usize,
13642            mut depth: fidl::encoding::Depth,
13643        ) -> fidl::Result<()> {
13644            decoder.debug_check_bounds::<Self>(offset);
13645            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13646                None => return Err(fidl::Error::NotNullable),
13647                Some(len) => len,
13648            };
13649            // Calling decoder.out_of_line_offset(0) is not allowed.
13650            if len == 0 {
13651                return Ok(());
13652            };
13653            depth.increment()?;
13654            let envelope_size = 8;
13655            let bytes_len = len * envelope_size;
13656            let offset = decoder.out_of_line_offset(bytes_len)?;
13657            // Decode the envelope for each type.
13658            let mut _next_ordinal_to_read = 0;
13659            let mut next_offset = offset;
13660            let end_offset = offset + bytes_len;
13661            _next_ordinal_to_read += 1;
13662            if next_offset >= end_offset {
13663                return Ok(());
13664            }
13665
13666            // Decode unknown envelopes for gaps in ordinals.
13667            while _next_ordinal_to_read < 1 {
13668                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13669                _next_ordinal_to_read += 1;
13670                next_offset += envelope_size;
13671            }
13672
13673            let next_out_of_line = decoder.next_out_of_line();
13674            let handles_before = decoder.remaining_handles();
13675            if let Some((inlined, num_bytes, num_handles)) =
13676                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13677            {
13678                let member_inline_size = <fidl::encoding::Vector<
13679                    fidl::encoding::Array<
13680                        fidl::encoding::HandleType<
13681                            fidl::Event,
13682                            { fidl::ObjectType::EVENT.into_raw() },
13683                            49155,
13684                        >,
13685                        1,
13686                    >,
13687                    1,
13688                > as fidl::encoding::TypeMarker>::inline_size(
13689                    decoder.context
13690                );
13691                if inlined != (member_inline_size <= 4) {
13692                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13693                }
13694                let inner_offset;
13695                let mut inner_depth = depth.clone();
13696                if inlined {
13697                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13698                    inner_offset = next_offset;
13699                } else {
13700                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13701                    inner_depth.increment()?;
13702                }
13703                let val_ref = self.h.get_or_insert_with(|| {
13704                    fidl::new_empty!(
13705                        fidl::encoding::Vector<
13706                            fidl::encoding::Array<
13707                                fidl::encoding::HandleType<
13708                                    fidl::Event,
13709                                    { fidl::ObjectType::EVENT.into_raw() },
13710                                    49155,
13711                                >,
13712                                1,
13713                            >,
13714                            1,
13715                        >,
13716                        fidl::encoding::DefaultFuchsiaResourceDialect
13717                    )
13718                });
13719                fidl::decode!(
13720                    fidl::encoding::Vector<
13721                        fidl::encoding::Array<
13722                            fidl::encoding::HandleType<
13723                                fidl::Event,
13724                                { fidl::ObjectType::EVENT.into_raw() },
13725                                49155,
13726                            >,
13727                            1,
13728                        >,
13729                        1,
13730                    >,
13731                    fidl::encoding::DefaultFuchsiaResourceDialect,
13732                    val_ref,
13733                    decoder,
13734                    inner_offset,
13735                    inner_depth
13736                )?;
13737                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13738                {
13739                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13740                }
13741                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13742                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13743                }
13744            }
13745
13746            next_offset += envelope_size;
13747
13748            // Decode the remaining unknown envelopes.
13749            while next_offset < end_offset {
13750                _next_ordinal_to_read += 1;
13751                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13752                next_offset += envelope_size;
13753            }
13754
13755            Ok(())
13756        }
13757    }
13758
13759    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13760        type Borrowed<'a> = &'a mut Self;
13761        fn take_or_borrow<'a>(
13762            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13763        ) -> Self::Borrowed<'a> {
13764            value
13765        }
13766    }
13767
13768    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13769        type Owned = Self;
13770
13771        #[inline(always)]
13772        fn inline_align(_context: fidl::encoding::Context) -> usize {
13773            8
13774        }
13775
13776        #[inline(always)]
13777        fn inline_size(_context: fidl::encoding::Context) -> usize {
13778            16
13779        }
13780    }
13781
13782    unsafe impl
13783        fidl::encoding::Encode<
13784            ArrayOfVectorOfEventInUnionWithDefaultRights,
13785            fidl::encoding::DefaultFuchsiaResourceDialect,
13786        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13787    {
13788        #[inline]
13789        unsafe fn encode(
13790            self,
13791            encoder: &mut fidl::encoding::Encoder<
13792                '_,
13793                fidl::encoding::DefaultFuchsiaResourceDialect,
13794            >,
13795            offset: usize,
13796            _depth: fidl::encoding::Depth,
13797        ) -> fidl::Result<()> {
13798            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13799            encoder.write_num::<u64>(self.ordinal(), offset);
13800            match self {
13801                ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13802                    fidl::encoding::encode_in_envelope::<
13803                        fidl::encoding::Array<
13804                            fidl::encoding::Vector<
13805                                fidl::encoding::HandleType<
13806                                    fidl::Event,
13807                                    { fidl::ObjectType::EVENT.into_raw() },
13808                                    53251,
13809                                >,
13810                                1,
13811                            >,
13812                            1,
13813                        >,
13814                        fidl::encoding::DefaultFuchsiaResourceDialect,
13815                    >(
13816                        <fidl::encoding::Array<
13817                            fidl::encoding::Vector<
13818                                fidl::encoding::HandleType<
13819                                    fidl::Event,
13820                                    { fidl::ObjectType::EVENT.into_raw() },
13821                                    53251,
13822                                >,
13823                                1,
13824                            >,
13825                            1,
13826                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13827                            val
13828                        ),
13829                        encoder,
13830                        offset + 8,
13831                        _depth,
13832                    )
13833                }
13834            }
13835        }
13836    }
13837
13838    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13839        for ArrayOfVectorOfEventInUnionWithDefaultRights
13840    {
13841        #[inline(always)]
13842        fn new_empty() -> Self {
13843            Self::H(fidl::new_empty!(
13844                fidl::encoding::Array<
13845                    fidl::encoding::Vector<
13846                        fidl::encoding::HandleType<
13847                            fidl::Event,
13848                            { fidl::ObjectType::EVENT.into_raw() },
13849                            53251,
13850                        >,
13851                        1,
13852                    >,
13853                    1,
13854                >,
13855                fidl::encoding::DefaultFuchsiaResourceDialect
13856            ))
13857        }
13858
13859        #[inline]
13860        unsafe fn decode(
13861            &mut self,
13862            decoder: &mut fidl::encoding::Decoder<
13863                '_,
13864                fidl::encoding::DefaultFuchsiaResourceDialect,
13865            >,
13866            offset: usize,
13867            mut depth: fidl::encoding::Depth,
13868        ) -> fidl::Result<()> {
13869            decoder.debug_check_bounds::<Self>(offset);
13870            #[allow(unused_variables)]
13871            let next_out_of_line = decoder.next_out_of_line();
13872            let handles_before = decoder.remaining_handles();
13873            let (ordinal, inlined, num_bytes, num_handles) =
13874                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13875
13876            let member_inline_size = match ordinal {
13877                1 => <fidl::encoding::Array<
13878                    fidl::encoding::Vector<
13879                        fidl::encoding::HandleType<
13880                            fidl::Event,
13881                            { fidl::ObjectType::EVENT.into_raw() },
13882                            53251,
13883                        >,
13884                        1,
13885                    >,
13886                    1,
13887                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13888                _ => return Err(fidl::Error::UnknownUnionTag),
13889            };
13890
13891            if inlined != (member_inline_size <= 4) {
13892                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13893            }
13894            let _inner_offset;
13895            if inlined {
13896                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13897                _inner_offset = offset + 8;
13898            } else {
13899                depth.increment()?;
13900                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13901            }
13902            match ordinal {
13903                1 => {
13904                    #[allow(irrefutable_let_patterns)]
13905                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13906                        // Do nothing, read the value into the object
13907                    } else {
13908                        // Initialize `self` to the right variant
13909                        *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13910                            fidl::encoding::Array<
13911                                fidl::encoding::Vector<
13912                                    fidl::encoding::HandleType<
13913                                        fidl::Event,
13914                                        { fidl::ObjectType::EVENT.into_raw() },
13915                                        53251,
13916                                    >,
13917                                    1,
13918                                >,
13919                                1,
13920                            >,
13921                            fidl::encoding::DefaultFuchsiaResourceDialect
13922                        ));
13923                    }
13924                    #[allow(irrefutable_let_patterns)]
13925                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13926                        fidl::decode!(
13927                            fidl::encoding::Array<
13928                                fidl::encoding::Vector<
13929                                    fidl::encoding::HandleType<
13930                                        fidl::Event,
13931                                        { fidl::ObjectType::EVENT.into_raw() },
13932                                        53251,
13933                                    >,
13934                                    1,
13935                                >,
13936                                1,
13937                            >,
13938                            fidl::encoding::DefaultFuchsiaResourceDialect,
13939                            val,
13940                            decoder,
13941                            _inner_offset,
13942                            depth
13943                        )?;
13944                    } else {
13945                        unreachable!()
13946                    }
13947                }
13948                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13949            }
13950            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13951                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13952            }
13953            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13954                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13955            }
13956            Ok(())
13957        }
13958    }
13959
13960    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13961        type Borrowed<'a> = &'a mut Self;
13962        fn take_or_borrow<'a>(
13963            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13964        ) -> Self::Borrowed<'a> {
13965            value
13966        }
13967    }
13968
13969    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13970        type Owned = Self;
13971
13972        #[inline(always)]
13973        fn inline_align(_context: fidl::encoding::Context) -> usize {
13974            8
13975        }
13976
13977        #[inline(always)]
13978        fn inline_size(_context: fidl::encoding::Context) -> usize {
13979            16
13980        }
13981    }
13982
13983    unsafe impl
13984        fidl::encoding::Encode<
13985            ArrayOfVectorOfEventInUnionWithReducedRights,
13986            fidl::encoding::DefaultFuchsiaResourceDialect,
13987        > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
13988    {
13989        #[inline]
13990        unsafe fn encode(
13991            self,
13992            encoder: &mut fidl::encoding::Encoder<
13993                '_,
13994                fidl::encoding::DefaultFuchsiaResourceDialect,
13995            >,
13996            offset: usize,
13997            _depth: fidl::encoding::Depth,
13998        ) -> fidl::Result<()> {
13999            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
14000            encoder.write_num::<u64>(self.ordinal(), offset);
14001            match self {
14002                ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
14003                    fidl::encoding::encode_in_envelope::<
14004                        fidl::encoding::Array<
14005                            fidl::encoding::Vector<
14006                                fidl::encoding::HandleType<
14007                                    fidl::Event,
14008                                    { fidl::ObjectType::EVENT.into_raw() },
14009                                    49155,
14010                                >,
14011                                1,
14012                            >,
14013                            1,
14014                        >,
14015                        fidl::encoding::DefaultFuchsiaResourceDialect,
14016                    >(
14017                        <fidl::encoding::Array<
14018                            fidl::encoding::Vector<
14019                                fidl::encoding::HandleType<
14020                                    fidl::Event,
14021                                    { fidl::ObjectType::EVENT.into_raw() },
14022                                    49155,
14023                                >,
14024                                1,
14025                            >,
14026                            1,
14027                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14028                            val
14029                        ),
14030                        encoder,
14031                        offset + 8,
14032                        _depth,
14033                    )
14034                }
14035            }
14036        }
14037    }
14038
14039    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14040        for ArrayOfVectorOfEventInUnionWithReducedRights
14041    {
14042        #[inline(always)]
14043        fn new_empty() -> Self {
14044            Self::H(fidl::new_empty!(
14045                fidl::encoding::Array<
14046                    fidl::encoding::Vector<
14047                        fidl::encoding::HandleType<
14048                            fidl::Event,
14049                            { fidl::ObjectType::EVENT.into_raw() },
14050                            49155,
14051                        >,
14052                        1,
14053                    >,
14054                    1,
14055                >,
14056                fidl::encoding::DefaultFuchsiaResourceDialect
14057            ))
14058        }
14059
14060        #[inline]
14061        unsafe fn decode(
14062            &mut self,
14063            decoder: &mut fidl::encoding::Decoder<
14064                '_,
14065                fidl::encoding::DefaultFuchsiaResourceDialect,
14066            >,
14067            offset: usize,
14068            mut depth: fidl::encoding::Depth,
14069        ) -> fidl::Result<()> {
14070            decoder.debug_check_bounds::<Self>(offset);
14071            #[allow(unused_variables)]
14072            let next_out_of_line = decoder.next_out_of_line();
14073            let handles_before = decoder.remaining_handles();
14074            let (ordinal, inlined, num_bytes, num_handles) =
14075                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14076
14077            let member_inline_size = match ordinal {
14078                1 => <fidl::encoding::Array<
14079                    fidl::encoding::Vector<
14080                        fidl::encoding::HandleType<
14081                            fidl::Event,
14082                            { fidl::ObjectType::EVENT.into_raw() },
14083                            49155,
14084                        >,
14085                        1,
14086                    >,
14087                    1,
14088                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14089                _ => return Err(fidl::Error::UnknownUnionTag),
14090            };
14091
14092            if inlined != (member_inline_size <= 4) {
14093                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14094            }
14095            let _inner_offset;
14096            if inlined {
14097                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14098                _inner_offset = offset + 8;
14099            } else {
14100                depth.increment()?;
14101                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14102            }
14103            match ordinal {
14104                1 => {
14105                    #[allow(irrefutable_let_patterns)]
14106                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
14107                        // Do nothing, read the value into the object
14108                    } else {
14109                        // Initialize `self` to the right variant
14110                        *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14111                            fidl::encoding::Array<
14112                                fidl::encoding::Vector<
14113                                    fidl::encoding::HandleType<
14114                                        fidl::Event,
14115                                        { fidl::ObjectType::EVENT.into_raw() },
14116                                        49155,
14117                                    >,
14118                                    1,
14119                                >,
14120                                1,
14121                            >,
14122                            fidl::encoding::DefaultFuchsiaResourceDialect
14123                        ));
14124                    }
14125                    #[allow(irrefutable_let_patterns)]
14126                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
14127                        fidl::decode!(
14128                            fidl::encoding::Array<
14129                                fidl::encoding::Vector<
14130                                    fidl::encoding::HandleType<
14131                                        fidl::Event,
14132                                        { fidl::ObjectType::EVENT.into_raw() },
14133                                        49155,
14134                                    >,
14135                                    1,
14136                                >,
14137                                1,
14138                            >,
14139                            fidl::encoding::DefaultFuchsiaResourceDialect,
14140                            val,
14141                            decoder,
14142                            _inner_offset,
14143                            depth
14144                        )?;
14145                    } else {
14146                        unreachable!()
14147                    }
14148                }
14149                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14150            }
14151            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14152                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14153            }
14154            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14155                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14156            }
14157            Ok(())
14158        }
14159    }
14160
14161    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
14162        type Borrowed<'a> = &'a mut Self;
14163        fn take_or_borrow<'a>(
14164            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14165        ) -> Self::Borrowed<'a> {
14166            value
14167        }
14168    }
14169
14170    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
14171        type Owned = Self;
14172
14173        #[inline(always)]
14174        fn inline_align(_context: fidl::encoding::Context) -> usize {
14175            8
14176        }
14177
14178        #[inline(always)]
14179        fn inline_size(_context: fidl::encoding::Context) -> usize {
14180            16
14181        }
14182    }
14183
14184    unsafe impl
14185        fidl::encoding::Encode<
14186            EnvelopeInliningTestUnion,
14187            fidl::encoding::DefaultFuchsiaResourceDialect,
14188        > for &mut EnvelopeInliningTestUnion
14189    {
14190        #[inline]
14191        unsafe fn encode(
14192            self,
14193            encoder: &mut fidl::encoding::Encoder<
14194                '_,
14195                fidl::encoding::DefaultFuchsiaResourceDialect,
14196            >,
14197            offset: usize,
14198            _depth: fidl::encoding::Depth,
14199        ) -> fidl::Result<()> {
14200            encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
14201            encoder.write_num::<u64>(self.ordinal(), offset);
14202            match self {
14203                EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
14204                    u32,
14205                    fidl::encoding::DefaultFuchsiaResourceDialect,
14206                >(
14207                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
14208                    encoder,
14209                    offset + 8,
14210                    _depth,
14211                ),
14212                EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
14213                    u64,
14214                    fidl::encoding::DefaultFuchsiaResourceDialect,
14215                >(
14216                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
14217                    encoder,
14218                    offset + 8,
14219                    _depth,
14220                ),
14221                EnvelopeInliningTestUnion::Handle(ref mut val) => {
14222                    fidl::encoding::encode_in_envelope::<
14223                        fidl::encoding::HandleType<
14224                            fidl::NullableHandle,
14225                            { fidl::ObjectType::NONE.into_raw() },
14226                            2147483648,
14227                        >,
14228                        fidl::encoding::DefaultFuchsiaResourceDialect,
14229                    >(
14230                        <fidl::encoding::HandleType<
14231                            fidl::NullableHandle,
14232                            { fidl::ObjectType::NONE.into_raw() },
14233                            2147483648,
14234                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14235                            val
14236                        ),
14237                        encoder,
14238                        offset + 8,
14239                        _depth,
14240                    )
14241                }
14242                EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
14243                    Err(fidl::Error::UnknownUnionTag)
14244                }
14245            }
14246        }
14247    }
14248
14249    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14250        for EnvelopeInliningTestUnion
14251    {
14252        #[inline(always)]
14253        fn new_empty() -> Self {
14254            Self::__SourceBreaking { unknown_ordinal: 0 }
14255        }
14256
14257        #[inline]
14258        unsafe fn decode(
14259            &mut self,
14260            decoder: &mut fidl::encoding::Decoder<
14261                '_,
14262                fidl::encoding::DefaultFuchsiaResourceDialect,
14263            >,
14264            offset: usize,
14265            mut depth: fidl::encoding::Depth,
14266        ) -> fidl::Result<()> {
14267            decoder.debug_check_bounds::<Self>(offset);
14268            #[allow(unused_variables)]
14269            let next_out_of_line = decoder.next_out_of_line();
14270            let handles_before = decoder.remaining_handles();
14271            let (ordinal, inlined, num_bytes, num_handles) =
14272                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14273
14274            let member_inline_size = match ordinal {
14275                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14276                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14277                3 => <fidl::encoding::HandleType<
14278                    fidl::NullableHandle,
14279                    { fidl::ObjectType::NONE.into_raw() },
14280                    2147483648,
14281                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14282                0 => return Err(fidl::Error::UnknownUnionTag),
14283                _ => num_bytes as usize,
14284            };
14285
14286            if inlined != (member_inline_size <= 4) {
14287                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14288            }
14289            let _inner_offset;
14290            if inlined {
14291                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14292                _inner_offset = offset + 8;
14293            } else {
14294                depth.increment()?;
14295                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14296            }
14297            match ordinal {
14298                1 => {
14299                    #[allow(irrefutable_let_patterns)]
14300                    if let EnvelopeInliningTestUnion::Small(_) = self {
14301                        // Do nothing, read the value into the object
14302                    } else {
14303                        // Initialize `self` to the right variant
14304                        *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
14305                            u32,
14306                            fidl::encoding::DefaultFuchsiaResourceDialect
14307                        ));
14308                    }
14309                    #[allow(irrefutable_let_patterns)]
14310                    if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
14311                        fidl::decode!(
14312                            u32,
14313                            fidl::encoding::DefaultFuchsiaResourceDialect,
14314                            val,
14315                            decoder,
14316                            _inner_offset,
14317                            depth
14318                        )?;
14319                    } else {
14320                        unreachable!()
14321                    }
14322                }
14323                2 => {
14324                    #[allow(irrefutable_let_patterns)]
14325                    if let EnvelopeInliningTestUnion::Large(_) = self {
14326                        // Do nothing, read the value into the object
14327                    } else {
14328                        // Initialize `self` to the right variant
14329                        *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
14330                            u64,
14331                            fidl::encoding::DefaultFuchsiaResourceDialect
14332                        ));
14333                    }
14334                    #[allow(irrefutable_let_patterns)]
14335                    if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
14336                        fidl::decode!(
14337                            u64,
14338                            fidl::encoding::DefaultFuchsiaResourceDialect,
14339                            val,
14340                            decoder,
14341                            _inner_offset,
14342                            depth
14343                        )?;
14344                    } else {
14345                        unreachable!()
14346                    }
14347                }
14348                3 => {
14349                    #[allow(irrefutable_let_patterns)]
14350                    if let EnvelopeInliningTestUnion::Handle(_) = self {
14351                        // Do nothing, read the value into the object
14352                    } else {
14353                        // Initialize `self` to the right variant
14354                        *self = EnvelopeInliningTestUnion::Handle(
14355                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14356                        );
14357                    }
14358                    #[allow(irrefutable_let_patterns)]
14359                    if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
14360                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14361                    } else {
14362                        unreachable!()
14363                    }
14364                }
14365                #[allow(deprecated)]
14366                ordinal => {
14367                    for _ in 0..num_handles {
14368                        decoder.drop_next_handle()?;
14369                    }
14370                    *self =
14371                        EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
14372                }
14373            }
14374            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14375                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14376            }
14377            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14378                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14379            }
14380            Ok(())
14381        }
14382    }
14383
14384    impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
14385        type Borrowed<'a> = &'a mut Self;
14386        fn take_or_borrow<'a>(
14387            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14388        ) -> Self::Borrowed<'a> {
14389            value
14390        }
14391    }
14392
14393    unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
14394        type Owned = Self;
14395
14396        #[inline(always)]
14397        fn inline_align(_context: fidl::encoding::Context) -> usize {
14398            8
14399        }
14400
14401        #[inline(always)]
14402        fn inline_size(_context: fidl::encoding::Context) -> usize {
14403            16
14404        }
14405    }
14406
14407    unsafe impl
14408        fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14409        for &mut SampleResourceXUnion
14410    {
14411        #[inline]
14412        unsafe fn encode(
14413            self,
14414            encoder: &mut fidl::encoding::Encoder<
14415                '_,
14416                fidl::encoding::DefaultFuchsiaResourceDialect,
14417            >,
14418            offset: usize,
14419            _depth: fidl::encoding::Depth,
14420        ) -> fidl::Result<()> {
14421            encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
14422            encoder.write_num::<u64>(self.ordinal(), offset);
14423            match self {
14424                SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
14425                    u32,
14426                    fidl::encoding::DefaultFuchsiaResourceDialect,
14427                >(
14428                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
14429                    encoder,
14430                    offset + 8,
14431                    _depth,
14432                ),
14433                SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
14434                    SimpleUnion,
14435                    fidl::encoding::DefaultFuchsiaResourceDialect,
14436                >(
14437                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
14438                    encoder,
14439                    offset + 8,
14440                    _depth,
14441                ),
14442                SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
14443                    SimpleTable,
14444                    fidl::encoding::DefaultFuchsiaResourceDialect,
14445                >(
14446                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
14447                    encoder,
14448                    offset + 8,
14449                    _depth,
14450                ),
14451                SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14452            }
14453        }
14454    }
14455
14456    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14457        for SampleResourceXUnion
14458    {
14459        #[inline(always)]
14460        fn new_empty() -> Self {
14461            Self::__SourceBreaking { unknown_ordinal: 0 }
14462        }
14463
14464        #[inline]
14465        unsafe fn decode(
14466            &mut self,
14467            decoder: &mut fidl::encoding::Decoder<
14468                '_,
14469                fidl::encoding::DefaultFuchsiaResourceDialect,
14470            >,
14471            offset: usize,
14472            mut depth: fidl::encoding::Depth,
14473        ) -> fidl::Result<()> {
14474            decoder.debug_check_bounds::<Self>(offset);
14475            #[allow(unused_variables)]
14476            let next_out_of_line = decoder.next_out_of_line();
14477            let handles_before = decoder.remaining_handles();
14478            let (ordinal, inlined, num_bytes, num_handles) =
14479                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14480
14481            let member_inline_size = match ordinal {
14482                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14483                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14484                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14485                0 => return Err(fidl::Error::UnknownUnionTag),
14486                _ => num_bytes as usize,
14487            };
14488
14489            if inlined != (member_inline_size <= 4) {
14490                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14491            }
14492            let _inner_offset;
14493            if inlined {
14494                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14495                _inner_offset = offset + 8;
14496            } else {
14497                depth.increment()?;
14498                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14499            }
14500            match ordinal {
14501                1 => {
14502                    #[allow(irrefutable_let_patterns)]
14503                    if let SampleResourceXUnion::U(_) = self {
14504                        // Do nothing, read the value into the object
14505                    } else {
14506                        // Initialize `self` to the right variant
14507                        *self = SampleResourceXUnion::U(fidl::new_empty!(
14508                            u32,
14509                            fidl::encoding::DefaultFuchsiaResourceDialect
14510                        ));
14511                    }
14512                    #[allow(irrefutable_let_patterns)]
14513                    if let SampleResourceXUnion::U(ref mut val) = self {
14514                        fidl::decode!(
14515                            u32,
14516                            fidl::encoding::DefaultFuchsiaResourceDialect,
14517                            val,
14518                            decoder,
14519                            _inner_offset,
14520                            depth
14521                        )?;
14522                    } else {
14523                        unreachable!()
14524                    }
14525                }
14526                2 => {
14527                    #[allow(irrefutable_let_patterns)]
14528                    if let SampleResourceXUnion::Su(_) = self {
14529                        // Do nothing, read the value into the object
14530                    } else {
14531                        // Initialize `self` to the right variant
14532                        *self = SampleResourceXUnion::Su(fidl::new_empty!(
14533                            SimpleUnion,
14534                            fidl::encoding::DefaultFuchsiaResourceDialect
14535                        ));
14536                    }
14537                    #[allow(irrefutable_let_patterns)]
14538                    if let SampleResourceXUnion::Su(ref mut val) = self {
14539                        fidl::decode!(
14540                            SimpleUnion,
14541                            fidl::encoding::DefaultFuchsiaResourceDialect,
14542                            val,
14543                            decoder,
14544                            _inner_offset,
14545                            depth
14546                        )?;
14547                    } else {
14548                        unreachable!()
14549                    }
14550                }
14551                3 => {
14552                    #[allow(irrefutable_let_patterns)]
14553                    if let SampleResourceXUnion::St(_) = self {
14554                        // Do nothing, read the value into the object
14555                    } else {
14556                        // Initialize `self` to the right variant
14557                        *self = SampleResourceXUnion::St(fidl::new_empty!(
14558                            SimpleTable,
14559                            fidl::encoding::DefaultFuchsiaResourceDialect
14560                        ));
14561                    }
14562                    #[allow(irrefutable_let_patterns)]
14563                    if let SampleResourceXUnion::St(ref mut val) = self {
14564                        fidl::decode!(
14565                            SimpleTable,
14566                            fidl::encoding::DefaultFuchsiaResourceDialect,
14567                            val,
14568                            decoder,
14569                            _inner_offset,
14570                            depth
14571                        )?;
14572                    } else {
14573                        unreachable!()
14574                    }
14575                }
14576                #[allow(deprecated)]
14577                ordinal => {
14578                    for _ in 0..num_handles {
14579                        decoder.drop_next_handle()?;
14580                    }
14581                    *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
14582                }
14583            }
14584            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14585                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14586            }
14587            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14588                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14589            }
14590            Ok(())
14591        }
14592    }
14593
14594    impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
14595        type Borrowed<'a> = &'a mut Self;
14596        fn take_or_borrow<'a>(
14597            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14598        ) -> Self::Borrowed<'a> {
14599            value
14600        }
14601    }
14602
14603    unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
14604        type Owned = Self;
14605
14606        #[inline(always)]
14607        fn inline_align(_context: fidl::encoding::Context) -> usize {
14608            8
14609        }
14610
14611        #[inline(always)]
14612        fn inline_size(_context: fidl::encoding::Context) -> usize {
14613            16
14614        }
14615    }
14616
14617    unsafe impl
14618        fidl::encoding::Encode<
14619            SampleStrictResourceXUnion,
14620            fidl::encoding::DefaultFuchsiaResourceDialect,
14621        > for &mut SampleStrictResourceXUnion
14622    {
14623        #[inline]
14624        unsafe fn encode(
14625            self,
14626            encoder: &mut fidl::encoding::Encoder<
14627                '_,
14628                fidl::encoding::DefaultFuchsiaResourceDialect,
14629            >,
14630            offset: usize,
14631            _depth: fidl::encoding::Depth,
14632        ) -> fidl::Result<()> {
14633            encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
14634            encoder.write_num::<u64>(self.ordinal(), offset);
14635            match self {
14636                SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
14637                    u32,
14638                    fidl::encoding::DefaultFuchsiaResourceDialect,
14639                >(
14640                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
14641                    encoder,
14642                    offset + 8,
14643                    _depth,
14644                ),
14645                SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
14646                    SimpleUnion,
14647                    fidl::encoding::DefaultFuchsiaResourceDialect,
14648                >(
14649                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
14650                    encoder,
14651                    offset + 8,
14652                    _depth,
14653                ),
14654                SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
14655                    SimpleTable,
14656                    fidl::encoding::DefaultFuchsiaResourceDialect,
14657                >(
14658                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
14659                    encoder,
14660                    offset + 8,
14661                    _depth,
14662                ),
14663            }
14664        }
14665    }
14666
14667    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14668        for SampleStrictResourceXUnion
14669    {
14670        #[inline(always)]
14671        fn new_empty() -> Self {
14672            Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
14673        }
14674
14675        #[inline]
14676        unsafe fn decode(
14677            &mut self,
14678            decoder: &mut fidl::encoding::Decoder<
14679                '_,
14680                fidl::encoding::DefaultFuchsiaResourceDialect,
14681            >,
14682            offset: usize,
14683            mut depth: fidl::encoding::Depth,
14684        ) -> fidl::Result<()> {
14685            decoder.debug_check_bounds::<Self>(offset);
14686            #[allow(unused_variables)]
14687            let next_out_of_line = decoder.next_out_of_line();
14688            let handles_before = decoder.remaining_handles();
14689            let (ordinal, inlined, num_bytes, num_handles) =
14690                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14691
14692            let member_inline_size = match ordinal {
14693                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14694                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14695                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14696                _ => return Err(fidl::Error::UnknownUnionTag),
14697            };
14698
14699            if inlined != (member_inline_size <= 4) {
14700                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14701            }
14702            let _inner_offset;
14703            if inlined {
14704                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14705                _inner_offset = offset + 8;
14706            } else {
14707                depth.increment()?;
14708                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14709            }
14710            match ordinal {
14711                1 => {
14712                    #[allow(irrefutable_let_patterns)]
14713                    if let SampleStrictResourceXUnion::U(_) = self {
14714                        // Do nothing, read the value into the object
14715                    } else {
14716                        // Initialize `self` to the right variant
14717                        *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14718                            u32,
14719                            fidl::encoding::DefaultFuchsiaResourceDialect
14720                        ));
14721                    }
14722                    #[allow(irrefutable_let_patterns)]
14723                    if let SampleStrictResourceXUnion::U(ref mut val) = self {
14724                        fidl::decode!(
14725                            u32,
14726                            fidl::encoding::DefaultFuchsiaResourceDialect,
14727                            val,
14728                            decoder,
14729                            _inner_offset,
14730                            depth
14731                        )?;
14732                    } else {
14733                        unreachable!()
14734                    }
14735                }
14736                2 => {
14737                    #[allow(irrefutable_let_patterns)]
14738                    if let SampleStrictResourceXUnion::Su(_) = self {
14739                        // Do nothing, read the value into the object
14740                    } else {
14741                        // Initialize `self` to the right variant
14742                        *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14743                            SimpleUnion,
14744                            fidl::encoding::DefaultFuchsiaResourceDialect
14745                        ));
14746                    }
14747                    #[allow(irrefutable_let_patterns)]
14748                    if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14749                        fidl::decode!(
14750                            SimpleUnion,
14751                            fidl::encoding::DefaultFuchsiaResourceDialect,
14752                            val,
14753                            decoder,
14754                            _inner_offset,
14755                            depth
14756                        )?;
14757                    } else {
14758                        unreachable!()
14759                    }
14760                }
14761                3 => {
14762                    #[allow(irrefutable_let_patterns)]
14763                    if let SampleStrictResourceXUnion::St(_) = self {
14764                        // Do nothing, read the value into the object
14765                    } else {
14766                        // Initialize `self` to the right variant
14767                        *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14768                            SimpleTable,
14769                            fidl::encoding::DefaultFuchsiaResourceDialect
14770                        ));
14771                    }
14772                    #[allow(irrefutable_let_patterns)]
14773                    if let SampleStrictResourceXUnion::St(ref mut val) = self {
14774                        fidl::decode!(
14775                            SimpleTable,
14776                            fidl::encoding::DefaultFuchsiaResourceDialect,
14777                            val,
14778                            decoder,
14779                            _inner_offset,
14780                            depth
14781                        )?;
14782                    } else {
14783                        unreachable!()
14784                    }
14785                }
14786                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14787            }
14788            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14789                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14790            }
14791            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14792                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14793            }
14794            Ok(())
14795        }
14796    }
14797
14798    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14799        type Borrowed<'a> = &'a mut Self;
14800        fn take_or_borrow<'a>(
14801            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14802        ) -> Self::Borrowed<'a> {
14803            value
14804        }
14805    }
14806
14807    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14808        type Owned = Self;
14809
14810        #[inline(always)]
14811        fn inline_align(_context: fidl::encoding::Context) -> usize {
14812            8
14813        }
14814
14815        #[inline(always)]
14816        fn inline_size(_context: fidl::encoding::Context) -> usize {
14817            16
14818        }
14819    }
14820
14821    unsafe impl
14822        fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14823        for &mut UnionOfEndpointsUnion
14824    {
14825        #[inline]
14826        unsafe fn encode(
14827            self,
14828            encoder: &mut fidl::encoding::Encoder<
14829                '_,
14830                fidl::encoding::DefaultFuchsiaResourceDialect,
14831            >,
14832            offset: usize,
14833            _depth: fidl::encoding::Depth,
14834        ) -> fidl::Result<()> {
14835            encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14836            encoder.write_num::<u64>(self.ordinal(), offset);
14837            match self {
14838            UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14839                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14840                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14841                    encoder, offset + 8, _depth
14842                )
14843            }
14844            UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14845                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14846                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14847                    encoder, offset + 8, _depth
14848                )
14849            }
14850            UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14851        }
14852        }
14853    }
14854
14855    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14856        for UnionOfEndpointsUnion
14857    {
14858        #[inline(always)]
14859        fn new_empty() -> Self {
14860            Self::__SourceBreaking { unknown_ordinal: 0 }
14861        }
14862
14863        #[inline]
14864        unsafe fn decode(
14865            &mut self,
14866            decoder: &mut fidl::encoding::Decoder<
14867                '_,
14868                fidl::encoding::DefaultFuchsiaResourceDialect,
14869            >,
14870            offset: usize,
14871            mut depth: fidl::encoding::Depth,
14872        ) -> fidl::Result<()> {
14873            decoder.debug_check_bounds::<Self>(offset);
14874            #[allow(unused_variables)]
14875            let next_out_of_line = decoder.next_out_of_line();
14876            let handles_before = decoder.remaining_handles();
14877            let (ordinal, inlined, num_bytes, num_handles) =
14878                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14879
14880            let member_inline_size = match ordinal {
14881            1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14882            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14883            0 => return Err(fidl::Error::UnknownUnionTag),
14884            _ => num_bytes as usize,
14885        };
14886
14887            if inlined != (member_inline_size <= 4) {
14888                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14889            }
14890            let _inner_offset;
14891            if inlined {
14892                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14893                _inner_offset = offset + 8;
14894            } else {
14895                depth.increment()?;
14896                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14897            }
14898            match ordinal {
14899                1 => {
14900                    #[allow(irrefutable_let_patterns)]
14901                    if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14902                        // Do nothing, read the value into the object
14903                    } else {
14904                        // Initialize `self` to the right variant
14905                        *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14906                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14907                            fidl::encoding::DefaultFuchsiaResourceDialect
14908                        ));
14909                    }
14910                    #[allow(irrefutable_let_patterns)]
14911                    if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14912                        fidl::decode!(
14913                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14914                            fidl::encoding::DefaultFuchsiaResourceDialect,
14915                            val,
14916                            decoder,
14917                            _inner_offset,
14918                            depth
14919                        )?;
14920                    } else {
14921                        unreachable!()
14922                    }
14923                }
14924                2 => {
14925                    #[allow(irrefutable_let_patterns)]
14926                    if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14927                        // Do nothing, read the value into the object
14928                    } else {
14929                        // Initialize `self` to the right variant
14930                        *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14931                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14932                            fidl::encoding::DefaultFuchsiaResourceDialect
14933                        ));
14934                    }
14935                    #[allow(irrefutable_let_patterns)]
14936                    if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14937                        fidl::decode!(
14938                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14939                            fidl::encoding::DefaultFuchsiaResourceDialect,
14940                            val,
14941                            decoder,
14942                            _inner_offset,
14943                            depth
14944                        )?;
14945                    } else {
14946                        unreachable!()
14947                    }
14948                }
14949                #[allow(deprecated)]
14950                ordinal => {
14951                    for _ in 0..num_handles {
14952                        decoder.drop_next_handle()?;
14953                    }
14954                    *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14955                }
14956            }
14957            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14958                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14959            }
14960            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14961                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14962            }
14963            Ok(())
14964        }
14965    }
14966
14967    impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14968        type Borrowed<'a> = &'a mut Self;
14969        fn take_or_borrow<'a>(
14970            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14971        ) -> Self::Borrowed<'a> {
14972            value
14973        }
14974    }
14975
14976    unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14977        type Owned = Self;
14978
14979        #[inline(always)]
14980        fn inline_align(_context: fidl::encoding::Context) -> usize {
14981            8
14982        }
14983
14984        #[inline(always)]
14985        fn inline_size(_context: fidl::encoding::Context) -> usize {
14986            16
14987        }
14988    }
14989
14990    unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
14991        for &mut UnionOfHandle
14992    {
14993        #[inline]
14994        unsafe fn encode(
14995            self,
14996            encoder: &mut fidl::encoding::Encoder<
14997                '_,
14998                fidl::encoding::DefaultFuchsiaResourceDialect,
14999            >,
15000            offset: usize,
15001            _depth: fidl::encoding::Depth,
15002        ) -> fidl::Result<()> {
15003            encoder.debug_check_bounds::<UnionOfHandle>(offset);
15004            encoder.write_num::<u64>(self.ordinal(), offset);
15005            match self {
15006                UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
15007                    fidl::encoding::HandleType<
15008                        fidl::NullableHandle,
15009                        { fidl::ObjectType::NONE.into_raw() },
15010                        2147483648,
15011                    >,
15012                    fidl::encoding::DefaultFuchsiaResourceDialect,
15013                >(
15014                    <fidl::encoding::HandleType<
15015                        fidl::NullableHandle,
15016                        { fidl::ObjectType::NONE.into_raw() },
15017                        2147483648,
15018                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
15019                        val
15020                    ),
15021                    encoder,
15022                    offset + 8,
15023                    _depth,
15024                ),
15025            }
15026        }
15027    }
15028
15029    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
15030        #[inline(always)]
15031        fn new_empty() -> Self {
15032            Self::H(
15033                fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
15034            )
15035        }
15036
15037        #[inline]
15038        unsafe fn decode(
15039            &mut self,
15040            decoder: &mut fidl::encoding::Decoder<
15041                '_,
15042                fidl::encoding::DefaultFuchsiaResourceDialect,
15043            >,
15044            offset: usize,
15045            mut depth: fidl::encoding::Depth,
15046        ) -> fidl::Result<()> {
15047            decoder.debug_check_bounds::<Self>(offset);
15048            #[allow(unused_variables)]
15049            let next_out_of_line = decoder.next_out_of_line();
15050            let handles_before = decoder.remaining_handles();
15051            let (ordinal, inlined, num_bytes, num_handles) =
15052                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15053
15054            let member_inline_size = match ordinal {
15055                1 => <fidl::encoding::HandleType<
15056                    fidl::NullableHandle,
15057                    { fidl::ObjectType::NONE.into_raw() },
15058                    2147483648,
15059                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15060                _ => return Err(fidl::Error::UnknownUnionTag),
15061            };
15062
15063            if inlined != (member_inline_size <= 4) {
15064                return Err(fidl::Error::InvalidInlineBitInEnvelope);
15065            }
15066            let _inner_offset;
15067            if inlined {
15068                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15069                _inner_offset = offset + 8;
15070            } else {
15071                depth.increment()?;
15072                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15073            }
15074            match ordinal {
15075                1 => {
15076                    #[allow(irrefutable_let_patterns)]
15077                    if let UnionOfHandle::H(_) = self {
15078                        // Do nothing, read the value into the object
15079                    } else {
15080                        // Initialize `self` to the right variant
15081                        *self = UnionOfHandle::H(
15082                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
15083                        );
15084                    }
15085                    #[allow(irrefutable_let_patterns)]
15086                    if let UnionOfHandle::H(ref mut val) = self {
15087                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15088                    } else {
15089                        unreachable!()
15090                    }
15091                }
15092                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15093            }
15094            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15095                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15096            }
15097            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15098                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15099            }
15100            Ok(())
15101        }
15102    }
15103
15104    impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
15105        type Borrowed<'a> = &'a mut Self;
15106        fn take_or_borrow<'a>(
15107            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15108        ) -> Self::Borrowed<'a> {
15109            value
15110        }
15111    }
15112
15113    unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
15114        type Owned = Self;
15115
15116        #[inline(always)]
15117        fn inline_align(_context: fidl::encoding::Context) -> usize {
15118            8
15119        }
15120
15121        #[inline(always)]
15122        fn inline_size(_context: fidl::encoding::Context) -> usize {
15123            16
15124        }
15125    }
15126
15127    unsafe impl
15128        fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
15129        for &mut UnionWithVector
15130    {
15131        #[inline]
15132        unsafe fn encode(
15133            self,
15134            encoder: &mut fidl::encoding::Encoder<
15135                '_,
15136                fidl::encoding::DefaultFuchsiaResourceDialect,
15137            >,
15138            offset: usize,
15139            _depth: fidl::encoding::Depth,
15140        ) -> fidl::Result<()> {
15141            encoder.debug_check_bounds::<UnionWithVector>(offset);
15142            encoder.write_num::<u64>(self.ordinal(), offset);
15143            match self {
15144            UnionWithVector::Unused(ref val) => {
15145                fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
15146                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
15147                    encoder, offset + 8, _depth
15148                )
15149            }
15150            UnionWithVector::VectorOfUint8(ref val) => {
15151                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15152                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
15153                    encoder, offset + 8, _depth
15154                )
15155            }
15156            UnionWithVector::S(ref val) => {
15157                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
15158                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
15159                    encoder, offset + 8, _depth
15160                )
15161            }
15162            UnionWithVector::VectorS3A1(ref val) => {
15163                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15164                    <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
15165                    encoder, offset + 8, _depth
15166                )
15167            }
15168            UnionWithVector::VectorS3A2(ref val) => {
15169                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15170                    <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
15171                    encoder, offset + 8, _depth
15172                )
15173            }
15174            UnionWithVector::Handles(ref mut val) => {
15175                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15176                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15177                    encoder, offset + 8, _depth
15178                )
15179            }
15180            UnionWithVector::ArrayS3A1(ref val) => {
15181                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15182                    <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
15183                    encoder, offset + 8, _depth
15184                )
15185            }
15186            UnionWithVector::ArrayS3A2(ref val) => {
15187                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15188                    <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
15189                    encoder, offset + 8, _depth
15190                )
15191            }
15192            UnionWithVector::VectorUnion(ref val) => {
15193                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15194                    <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
15195                    encoder, offset + 8, _depth
15196                )
15197            }
15198        }
15199        }
15200    }
15201
15202    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15203        for UnionWithVector
15204    {
15205        #[inline(always)]
15206        fn new_empty() -> Self {
15207            Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
15208        }
15209
15210        #[inline]
15211        unsafe fn decode(
15212            &mut self,
15213            decoder: &mut fidl::encoding::Decoder<
15214                '_,
15215                fidl::encoding::DefaultFuchsiaResourceDialect,
15216            >,
15217            offset: usize,
15218            mut depth: fidl::encoding::Depth,
15219        ) -> fidl::Result<()> {
15220            decoder.debug_check_bounds::<Self>(offset);
15221            #[allow(unused_variables)]
15222            let next_out_of_line = decoder.next_out_of_line();
15223            let handles_before = decoder.remaining_handles();
15224            let (ordinal, inlined, num_bytes, num_handles) =
15225                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15226
15227            let member_inline_size = match ordinal {
15228            1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15229            2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15230            3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15231            4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15232            5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15233            6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15234            7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15235            8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15236            9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15237            _ => return Err(fidl::Error::UnknownUnionTag),
15238        };
15239
15240            if inlined != (member_inline_size <= 4) {
15241                return Err(fidl::Error::InvalidInlineBitInEnvelope);
15242            }
15243            let _inner_offset;
15244            if inlined {
15245                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15246                _inner_offset = offset + 8;
15247            } else {
15248                depth.increment()?;
15249                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15250            }
15251            match ordinal {
15252                1 => {
15253                    #[allow(irrefutable_let_patterns)]
15254                    if let UnionWithVector::Unused(_) = self {
15255                        // Do nothing, read the value into the object
15256                    } else {
15257                        // Initialize `self` to the right variant
15258                        *self = UnionWithVector::Unused(fidl::new_empty!(
15259                            u8,
15260                            fidl::encoding::DefaultFuchsiaResourceDialect
15261                        ));
15262                    }
15263                    #[allow(irrefutable_let_patterns)]
15264                    if let UnionWithVector::Unused(ref mut val) = self {
15265                        fidl::decode!(
15266                            u8,
15267                            fidl::encoding::DefaultFuchsiaResourceDialect,
15268                            val,
15269                            decoder,
15270                            _inner_offset,
15271                            depth
15272                        )?;
15273                    } else {
15274                        unreachable!()
15275                    }
15276                }
15277                2 => {
15278                    #[allow(irrefutable_let_patterns)]
15279                    if let UnionWithVector::VectorOfUint8(_) = self {
15280                        // Do nothing, read the value into the object
15281                    } else {
15282                        // Initialize `self` to the right variant
15283                        *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
15284                            fidl::encoding::UnboundedVector<u8>,
15285                            fidl::encoding::DefaultFuchsiaResourceDialect
15286                        ));
15287                    }
15288                    #[allow(irrefutable_let_patterns)]
15289                    if let UnionWithVector::VectorOfUint8(ref mut val) = self {
15290                        fidl::decode!(
15291                            fidl::encoding::UnboundedVector<u8>,
15292                            fidl::encoding::DefaultFuchsiaResourceDialect,
15293                            val,
15294                            decoder,
15295                            _inner_offset,
15296                            depth
15297                        )?;
15298                    } else {
15299                        unreachable!()
15300                    }
15301                }
15302                3 => {
15303                    #[allow(irrefutable_let_patterns)]
15304                    if let UnionWithVector::S(_) = self {
15305                        // Do nothing, read the value into the object
15306                    } else {
15307                        // Initialize `self` to the right variant
15308                        *self = UnionWithVector::S(fidl::new_empty!(
15309                            fidl::encoding::UnboundedString,
15310                            fidl::encoding::DefaultFuchsiaResourceDialect
15311                        ));
15312                    }
15313                    #[allow(irrefutable_let_patterns)]
15314                    if let UnionWithVector::S(ref mut val) = self {
15315                        fidl::decode!(
15316                            fidl::encoding::UnboundedString,
15317                            fidl::encoding::DefaultFuchsiaResourceDialect,
15318                            val,
15319                            decoder,
15320                            _inner_offset,
15321                            depth
15322                        )?;
15323                    } else {
15324                        unreachable!()
15325                    }
15326                }
15327                4 => {
15328                    #[allow(irrefutable_let_patterns)]
15329                    if let UnionWithVector::VectorS3A1(_) = self {
15330                        // Do nothing, read the value into the object
15331                    } else {
15332                        // Initialize `self` to the right variant
15333                        *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
15334                            fidl::encoding::UnboundedVector<StructSize3Align1>,
15335                            fidl::encoding::DefaultFuchsiaResourceDialect
15336                        ));
15337                    }
15338                    #[allow(irrefutable_let_patterns)]
15339                    if let UnionWithVector::VectorS3A1(ref mut val) = self {
15340                        fidl::decode!(
15341                            fidl::encoding::UnboundedVector<StructSize3Align1>,
15342                            fidl::encoding::DefaultFuchsiaResourceDialect,
15343                            val,
15344                            decoder,
15345                            _inner_offset,
15346                            depth
15347                        )?;
15348                    } else {
15349                        unreachable!()
15350                    }
15351                }
15352                5 => {
15353                    #[allow(irrefutable_let_patterns)]
15354                    if let UnionWithVector::VectorS3A2(_) = self {
15355                        // Do nothing, read the value into the object
15356                    } else {
15357                        // Initialize `self` to the right variant
15358                        *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
15359                            fidl::encoding::UnboundedVector<StructSize3Align2>,
15360                            fidl::encoding::DefaultFuchsiaResourceDialect
15361                        ));
15362                    }
15363                    #[allow(irrefutable_let_patterns)]
15364                    if let UnionWithVector::VectorS3A2(ref mut val) = self {
15365                        fidl::decode!(
15366                            fidl::encoding::UnboundedVector<StructSize3Align2>,
15367                            fidl::encoding::DefaultFuchsiaResourceDialect,
15368                            val,
15369                            decoder,
15370                            _inner_offset,
15371                            depth
15372                        )?;
15373                    } else {
15374                        unreachable!()
15375                    }
15376                }
15377                6 => {
15378                    #[allow(irrefutable_let_patterns)]
15379                    if let UnionWithVector::Handles(_) = self {
15380                        // Do nothing, read the value into the object
15381                    } else {
15382                        // Initialize `self` to the right variant
15383                        *self = UnionWithVector::Handles(fidl::new_empty!(
15384                            fidl::encoding::UnboundedVector<
15385                                fidl::encoding::HandleType<
15386                                    fidl::NullableHandle,
15387                                    { fidl::ObjectType::NONE.into_raw() },
15388                                    2147483648,
15389                                >,
15390                            >,
15391                            fidl::encoding::DefaultFuchsiaResourceDialect
15392                        ));
15393                    }
15394                    #[allow(irrefutable_let_patterns)]
15395                    if let UnionWithVector::Handles(ref mut val) = self {
15396                        fidl::decode!(
15397                            fidl::encoding::UnboundedVector<
15398                                fidl::encoding::HandleType<
15399                                    fidl::NullableHandle,
15400                                    { fidl::ObjectType::NONE.into_raw() },
15401                                    2147483648,
15402                                >,
15403                            >,
15404                            fidl::encoding::DefaultFuchsiaResourceDialect,
15405                            val,
15406                            decoder,
15407                            _inner_offset,
15408                            depth
15409                        )?;
15410                    } else {
15411                        unreachable!()
15412                    }
15413                }
15414                7 => {
15415                    #[allow(irrefutable_let_patterns)]
15416                    if let UnionWithVector::ArrayS3A1(_) = self {
15417                        // Do nothing, read the value into the object
15418                    } else {
15419                        // Initialize `self` to the right variant
15420                        *self = UnionWithVector::ArrayS3A1(
15421                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
15422                        );
15423                    }
15424                    #[allow(irrefutable_let_patterns)]
15425                    if let UnionWithVector::ArrayS3A1(ref mut val) = self {
15426                        fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15427                    } else {
15428                        unreachable!()
15429                    }
15430                }
15431                8 => {
15432                    #[allow(irrefutable_let_patterns)]
15433                    if let UnionWithVector::ArrayS3A2(_) = self {
15434                        // Do nothing, read the value into the object
15435                    } else {
15436                        // Initialize `self` to the right variant
15437                        *self = UnionWithVector::ArrayS3A2(
15438                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
15439                        );
15440                    }
15441                    #[allow(irrefutable_let_patterns)]
15442                    if let UnionWithVector::ArrayS3A2(ref mut val) = self {
15443                        fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15444                    } else {
15445                        unreachable!()
15446                    }
15447                }
15448                9 => {
15449                    #[allow(irrefutable_let_patterns)]
15450                    if let UnionWithVector::VectorUnion(_) = self {
15451                        // Do nothing, read the value into the object
15452                    } else {
15453                        // Initialize `self` to the right variant
15454                        *self = UnionWithVector::VectorUnion(fidl::new_empty!(
15455                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
15456                            fidl::encoding::DefaultFuchsiaResourceDialect
15457                        ));
15458                    }
15459                    #[allow(irrefutable_let_patterns)]
15460                    if let UnionWithVector::VectorUnion(ref mut val) = self {
15461                        fidl::decode!(
15462                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
15463                            fidl::encoding::DefaultFuchsiaResourceDialect,
15464                            val,
15465                            decoder,
15466                            _inner_offset,
15467                            depth
15468                        )?;
15469                    } else {
15470                        unreachable!()
15471                    }
15472                }
15473                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15474            }
15475            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15476                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15477            }
15478            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15479                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15480            }
15481            Ok(())
15482        }
15483    }
15484
15485    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
15486        type Borrowed<'a> = &'a mut Self;
15487        fn take_or_borrow<'a>(
15488            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15489        ) -> Self::Borrowed<'a> {
15490            value
15491        }
15492    }
15493
15494    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
15495        type Owned = Self;
15496
15497        #[inline(always)]
15498        fn inline_align(_context: fidl::encoding::Context) -> usize {
15499            8
15500        }
15501
15502        #[inline(always)]
15503        fn inline_size(_context: fidl::encoding::Context) -> usize {
15504            16
15505        }
15506    }
15507
15508    unsafe impl
15509        fidl::encoding::Encode<
15510            VectorOfArrayOfEventInUnionWithReducedRights,
15511            fidl::encoding::DefaultFuchsiaResourceDialect,
15512        > for &mut VectorOfArrayOfEventInUnionWithReducedRights
15513    {
15514        #[inline]
15515        unsafe fn encode(
15516            self,
15517            encoder: &mut fidl::encoding::Encoder<
15518                '_,
15519                fidl::encoding::DefaultFuchsiaResourceDialect,
15520            >,
15521            offset: usize,
15522            _depth: fidl::encoding::Depth,
15523        ) -> fidl::Result<()> {
15524            encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
15525            encoder.write_num::<u64>(self.ordinal(), offset);
15526            match self {
15527                VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
15528                    fidl::encoding::encode_in_envelope::<
15529                        fidl::encoding::Vector<
15530                            fidl::encoding::Array<
15531                                fidl::encoding::HandleType<
15532                                    fidl::Event,
15533                                    { fidl::ObjectType::EVENT.into_raw() },
15534                                    49155,
15535                                >,
15536                                1,
15537                            >,
15538                            1,
15539                        >,
15540                        fidl::encoding::DefaultFuchsiaResourceDialect,
15541                    >(
15542                        <fidl::encoding::Vector<
15543                            fidl::encoding::Array<
15544                                fidl::encoding::HandleType<
15545                                    fidl::Event,
15546                                    { fidl::ObjectType::EVENT.into_raw() },
15547                                    49155,
15548                                >,
15549                                1,
15550                            >,
15551                            1,
15552                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
15553                            val
15554                        ),
15555                        encoder,
15556                        offset + 8,
15557                        _depth,
15558                    )
15559                }
15560            }
15561        }
15562    }
15563
15564    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15565        for VectorOfArrayOfEventInUnionWithReducedRights
15566    {
15567        #[inline(always)]
15568        fn new_empty() -> Self {
15569            Self::H(fidl::new_empty!(
15570                fidl::encoding::Vector<
15571                    fidl::encoding::Array<
15572                        fidl::encoding::HandleType<
15573                            fidl::Event,
15574                            { fidl::ObjectType::EVENT.into_raw() },
15575                            49155,
15576                        >,
15577                        1,
15578                    >,
15579                    1,
15580                >,
15581                fidl::encoding::DefaultFuchsiaResourceDialect
15582            ))
15583        }
15584
15585        #[inline]
15586        unsafe fn decode(
15587            &mut self,
15588            decoder: &mut fidl::encoding::Decoder<
15589                '_,
15590                fidl::encoding::DefaultFuchsiaResourceDialect,
15591            >,
15592            offset: usize,
15593            mut depth: fidl::encoding::Depth,
15594        ) -> fidl::Result<()> {
15595            decoder.debug_check_bounds::<Self>(offset);
15596            #[allow(unused_variables)]
15597            let next_out_of_line = decoder.next_out_of_line();
15598            let handles_before = decoder.remaining_handles();
15599            let (ordinal, inlined, num_bytes, num_handles) =
15600                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15601
15602            let member_inline_size = match ordinal {
15603                1 => <fidl::encoding::Vector<
15604                    fidl::encoding::Array<
15605                        fidl::encoding::HandleType<
15606                            fidl::Event,
15607                            { fidl::ObjectType::EVENT.into_raw() },
15608                            49155,
15609                        >,
15610                        1,
15611                    >,
15612                    1,
15613                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15614                _ => return Err(fidl::Error::UnknownUnionTag),
15615            };
15616
15617            if inlined != (member_inline_size <= 4) {
15618                return Err(fidl::Error::InvalidInlineBitInEnvelope);
15619            }
15620            let _inner_offset;
15621            if inlined {
15622                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15623                _inner_offset = offset + 8;
15624            } else {
15625                depth.increment()?;
15626                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15627            }
15628            match ordinal {
15629                1 => {
15630                    #[allow(irrefutable_let_patterns)]
15631                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
15632                        // Do nothing, read the value into the object
15633                    } else {
15634                        // Initialize `self` to the right variant
15635                        *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
15636                            fidl::encoding::Vector<
15637                                fidl::encoding::Array<
15638                                    fidl::encoding::HandleType<
15639                                        fidl::Event,
15640                                        { fidl::ObjectType::EVENT.into_raw() },
15641                                        49155,
15642                                    >,
15643                                    1,
15644                                >,
15645                                1,
15646                            >,
15647                            fidl::encoding::DefaultFuchsiaResourceDialect
15648                        ));
15649                    }
15650                    #[allow(irrefutable_let_patterns)]
15651                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
15652                        fidl::decode!(
15653                            fidl::encoding::Vector<
15654                                fidl::encoding::Array<
15655                                    fidl::encoding::HandleType<
15656                                        fidl::Event,
15657                                        { fidl::ObjectType::EVENT.into_raw() },
15658                                        49155,
15659                                    >,
15660                                    1,
15661                                >,
15662                                1,
15663                            >,
15664                            fidl::encoding::DefaultFuchsiaResourceDialect,
15665                            val,
15666                            decoder,
15667                            _inner_offset,
15668                            depth
15669                        )?;
15670                    } else {
15671                        unreachable!()
15672                    }
15673                }
15674                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15675            }
15676            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15677                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15678            }
15679            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15680                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15681            }
15682            Ok(())
15683        }
15684    }
15685}