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 TestFlexibleResourceXUnionInStruct {
468    pub xu: SampleResourceXUnion,
469}
470
471impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
472    for TestFlexibleResourceXUnionInStruct
473{
474}
475
476#[derive(Debug, PartialEq)]
477pub struct TestOptionalFlexibleResourceXUnionInStruct {
478    pub xu: Option<Box<SampleResourceXUnion>>,
479}
480
481impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
482    for TestOptionalFlexibleResourceXUnionInStruct
483{
484}
485
486#[derive(Debug, PartialEq)]
487pub struct TestOptionalStrictResourceXUnionInStruct {
488    pub xu: Option<Box<SampleStrictResourceXUnion>>,
489}
490
491impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
492    for TestOptionalStrictResourceXUnionInStruct
493{
494}
495
496#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
497pub struct TestPackageResolverResolveRequest {
498    pub package_url: String,
499    pub selectors: Vec<String>,
500    pub update_policy: UpdatePolicy,
501    pub this_should_be_a_handle: u32,
502}
503
504impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
505    for TestPackageResolverResolveRequest
506{
507}
508
509#[derive(Debug, PartialEq)]
510pub struct TestStrictResourceXUnionInStruct {
511    pub xu: SampleStrictResourceXUnion,
512}
513
514impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
515    for TestStrictResourceXUnionInStruct
516{
517}
518
519#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
520pub struct UnboundedNonnullableVectorOfHandles {
521    pub vh0: Vec<fidl::NullableHandle>,
522}
523
524impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
525    for UnboundedNonnullableVectorOfHandles
526{
527}
528
529#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
530pub struct UnboundedNullableVectorOfHandles {
531    pub vh0: Option<Vec<fidl::NullableHandle>>,
532}
533
534impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
535    for UnboundedNullableVectorOfHandles
536{
537}
538
539#[derive(Debug, PartialEq)]
540pub struct UnionOfEndpoints {
541    pub u: UnionOfEndpointsUnion,
542}
543
544impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpoints {}
545
546#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
547pub struct VectorOfArrayOfEventInStructWithDefaultRights {
548    pub h: Vec<[fidl::Event; 1]>,
549}
550
551impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
552    for VectorOfArrayOfEventInStructWithDefaultRights
553{
554}
555
556#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
557pub struct VectorOfArrayOfEventInStructWithReducedRights {
558    pub h: Vec<[fidl::Event; 1]>,
559}
560
561impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
562    for VectorOfArrayOfEventInStructWithReducedRights
563{
564}
565
566#[derive(Debug, PartialEq)]
567pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
568    pub t: VectorOfArrayOfEventInTableWithReducedRights,
569}
570
571impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
572    for VectorOfArrayOfEventInTableWithReducedRightsStruct
573{
574}
575
576#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
577pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
578    pub u: VectorOfArrayOfEventInUnionWithReducedRights,
579}
580
581impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
582    for VectorOfArrayOfEventInUnionWithReducedRightsStruct
583{
584}
585
586#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
587pub struct VectorOfHandles {
588    pub v: Vec<fidl::NullableHandle>,
589}
590
591impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfHandles {}
592
593#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
594pub struct VectorOfOptionalHandles {
595    pub v: Vec<Option<fidl::NullableHandle>>,
596}
597
598impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfOptionalHandles {}
599
600#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
601pub struct VectorOfUpTo2Handles {
602    pub v: Vec<fidl::NullableHandle>,
603}
604
605impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfUpTo2Handles {}
606
607#[derive(Debug, Default, PartialEq)]
608pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
609    pub h: Option<[Vec<fidl::Event>; 1]>,
610    #[doc(hidden)]
611    pub __source_breaking: fidl::marker::SourceBreaking,
612}
613
614impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
615    for ArrayOfVectorOfEventInTableWithDefaultRights
616{
617}
618
619#[derive(Debug, Default, PartialEq)]
620pub struct ArrayOfVectorOfEventInTableWithReducedRights {
621    pub h: Option<[Vec<fidl::Event>; 1]>,
622    #[doc(hidden)]
623    pub __source_breaking: fidl::marker::SourceBreaking,
624}
625
626impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
627    for ArrayOfVectorOfEventInTableWithReducedRights
628{
629}
630
631#[derive(Debug, Default, PartialEq)]
632pub struct EmptyResourceTable {
633    #[doc(hidden)]
634    pub __source_breaking: fidl::marker::SourceBreaking,
635}
636
637impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTable {}
638
639#[derive(Debug, Default, PartialEq)]
640pub struct SimpleResourceTable {
641    pub x: Option<i64>,
642    pub y: Option<i64>,
643    #[doc(hidden)]
644    pub __source_breaking: fidl::marker::SourceBreaking,
645}
646
647impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SimpleResourceTable {}
648
649#[derive(Debug, Default, PartialEq)]
650pub struct TableFieldInlinedHandle {
651    pub f: Option<fidl::Channel>,
652    #[doc(hidden)]
653    pub __source_breaking: fidl::marker::SourceBreaking,
654}
655
656impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldInlinedHandle {}
657
658#[derive(Debug, Default, PartialEq)]
659pub struct TableFieldUnknownResource {
660    #[doc(hidden)]
661    pub __source_breaking: fidl::marker::SourceBreaking,
662}
663
664impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldUnknownResource {}
665
666#[derive(Debug, Default, PartialEq)]
667pub struct TableOfEndpointsTable {
668    pub client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
669    pub server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
670    #[doc(hidden)]
671    pub __source_breaking: fidl::marker::SourceBreaking,
672}
673
674impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpointsTable {}
675
676#[derive(Debug, Default, PartialEq)]
677pub struct TableUnionWithVectorReservedSandwich {
678    pub uv: Option<UnionWithVector>,
679    #[doc(hidden)]
680    pub __source_breaking: fidl::marker::SourceBreaking,
681}
682
683impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
684    for TableUnionWithVectorReservedSandwich
685{
686}
687
688#[derive(Debug, Default, PartialEq)]
689pub struct TableUnionWithVectorStructSandwich {
690    pub s1: Option<StructSize3Align1>,
691    pub uv: Option<UnionWithVector>,
692    pub s2: Option<StructSize3Align1>,
693    #[doc(hidden)]
694    pub __source_breaking: fidl::marker::SourceBreaking,
695}
696
697impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
698    for TableUnionWithVectorStructSandwich
699{
700}
701
702#[derive(Debug, Default, PartialEq)]
703pub struct VectorOfArrayOfEventInTableWithReducedRights {
704    pub h: Option<Vec<[fidl::Event; 1]>>,
705    #[doc(hidden)]
706    pub __source_breaking: fidl::marker::SourceBreaking,
707}
708
709impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
710    for VectorOfArrayOfEventInTableWithReducedRights
711{
712}
713
714#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
715pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
716    H([Vec<fidl::Event>; 1]),
717}
718
719impl ArrayOfVectorOfEventInUnionWithDefaultRights {
720    #[inline]
721    pub fn ordinal(&self) -> u64 {
722        match *self {
723            Self::H(_) => 1,
724        }
725    }
726}
727
728impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
729    for ArrayOfVectorOfEventInUnionWithDefaultRights
730{
731}
732
733#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
734pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
735    H([Vec<fidl::Event>; 1]),
736}
737
738impl ArrayOfVectorOfEventInUnionWithReducedRights {
739    #[inline]
740    pub fn ordinal(&self) -> u64 {
741        match *self {
742            Self::H(_) => 1,
743        }
744    }
745}
746
747impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
748    for ArrayOfVectorOfEventInUnionWithReducedRights
749{
750}
751
752#[derive(Debug)]
753pub enum EnvelopeInliningTestUnion {
754    Small(u32),
755    Large(u64),
756    Handle(fidl::NullableHandle),
757    #[doc(hidden)]
758    __SourceBreaking {
759        unknown_ordinal: u64,
760    },
761}
762
763/// Pattern that matches an unknown `EnvelopeInliningTestUnion` member.
764#[macro_export]
765macro_rules! EnvelopeInliningTestUnionUnknown {
766    () => {
767        _
768    };
769}
770
771// Custom PartialEq so that unknown variants are not equal to themselves.
772impl PartialEq for EnvelopeInliningTestUnion {
773    fn eq(&self, other: &Self) -> bool {
774        match (self, other) {
775            (Self::Small(x), Self::Small(y)) => *x == *y,
776            (Self::Large(x), Self::Large(y)) => *x == *y,
777            (Self::Handle(x), Self::Handle(y)) => *x == *y,
778            _ => false,
779        }
780    }
781}
782
783impl EnvelopeInliningTestUnion {
784    #[inline]
785    pub fn ordinal(&self) -> u64 {
786        match *self {
787            Self::Small(_) => 1,
788            Self::Large(_) => 2,
789            Self::Handle(_) => 3,
790            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
791        }
792    }
793
794    #[inline]
795    pub fn unknown_variant_for_testing() -> Self {
796        Self::__SourceBreaking { unknown_ordinal: 0 }
797    }
798
799    #[inline]
800    pub fn is_unknown(&self) -> bool {
801        match self {
802            Self::__SourceBreaking { .. } => true,
803            _ => false,
804        }
805    }
806}
807
808impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnvelopeInliningTestUnion {}
809
810#[derive(Debug)]
811pub enum SampleResourceXUnion {
812    U(u32),
813    Su(SimpleUnion),
814    St(SimpleTable),
815    #[doc(hidden)]
816    __SourceBreaking {
817        unknown_ordinal: u64,
818    },
819}
820
821/// Pattern that matches an unknown `SampleResourceXUnion` member.
822#[macro_export]
823macro_rules! SampleResourceXUnionUnknown {
824    () => {
825        _
826    };
827}
828
829// Custom PartialEq so that unknown variants are not equal to themselves.
830impl PartialEq for SampleResourceXUnion {
831    fn eq(&self, other: &Self) -> bool {
832        match (self, other) {
833            (Self::U(x), Self::U(y)) => *x == *y,
834            (Self::Su(x), Self::Su(y)) => *x == *y,
835            (Self::St(x), Self::St(y)) => *x == *y,
836            _ => false,
837        }
838    }
839}
840
841impl SampleResourceXUnion {
842    #[inline]
843    pub fn ordinal(&self) -> u64 {
844        match *self {
845            Self::U(_) => 1,
846            Self::Su(_) => 2,
847            Self::St(_) => 3,
848            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
849        }
850    }
851
852    #[inline]
853    pub fn unknown_variant_for_testing() -> Self {
854        Self::__SourceBreaking { unknown_ordinal: 0 }
855    }
856
857    #[inline]
858    pub fn is_unknown(&self) -> bool {
859        match self {
860            Self::__SourceBreaking { .. } => true,
861            _ => false,
862        }
863    }
864}
865
866impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SampleResourceXUnion {}
867
868#[derive(Debug, PartialEq)]
869pub enum SampleStrictResourceXUnion {
870    U(u32),
871    Su(SimpleUnion),
872    St(SimpleTable),
873}
874
875impl SampleStrictResourceXUnion {
876    #[inline]
877    pub fn ordinal(&self) -> u64 {
878        match *self {
879            Self::U(_) => 1,
880            Self::Su(_) => 2,
881            Self::St(_) => 3,
882        }
883    }
884}
885
886impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
887    for SampleStrictResourceXUnion
888{
889}
890
891#[derive(Debug)]
892pub enum UnionOfEndpointsUnion {
893    ClientEnd(fidl::endpoints::ClientEnd<ProtocolMarker>),
894    ServerEnd(fidl::endpoints::ServerEnd<ProtocolMarker>),
895    #[doc(hidden)]
896    __SourceBreaking {
897        unknown_ordinal: u64,
898    },
899}
900
901/// Pattern that matches an unknown `UnionOfEndpointsUnion` member.
902#[macro_export]
903macro_rules! UnionOfEndpointsUnionUnknown {
904    () => {
905        _
906    };
907}
908
909// Custom PartialEq so that unknown variants are not equal to themselves.
910impl PartialEq for UnionOfEndpointsUnion {
911    fn eq(&self, other: &Self) -> bool {
912        match (self, other) {
913            (Self::ClientEnd(x), Self::ClientEnd(y)) => *x == *y,
914            (Self::ServerEnd(x), Self::ServerEnd(y)) => *x == *y,
915            _ => false,
916        }
917    }
918}
919
920impl UnionOfEndpointsUnion {
921    #[inline]
922    pub fn ordinal(&self) -> u64 {
923        match *self {
924            Self::ClientEnd(_) => 1,
925            Self::ServerEnd(_) => 2,
926            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
927        }
928    }
929
930    #[inline]
931    pub fn unknown_variant_for_testing() -> Self {
932        Self::__SourceBreaking { unknown_ordinal: 0 }
933    }
934
935    #[inline]
936    pub fn is_unknown(&self) -> bool {
937        match self {
938            Self::__SourceBreaking { .. } => true,
939            _ => false,
940        }
941    }
942}
943
944impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpointsUnion {}
945
946#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
947pub enum UnionOfHandle {
948    H(fidl::NullableHandle),
949}
950
951impl UnionOfHandle {
952    #[inline]
953    pub fn ordinal(&self) -> u64 {
954        match *self {
955            Self::H(_) => 1,
956        }
957    }
958}
959
960impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {}
961
962#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
963pub enum UnionWithVector {
964    Unused(u8),
965    VectorOfUint8(Vec<u8>),
966    S(String),
967    VectorS3A1(Vec<StructSize3Align1>),
968    VectorS3A2(Vec<StructSize3Align2>),
969    Handles(Vec<fidl::NullableHandle>),
970    ArrayS3A1([StructSize3Align1; 2]),
971    ArrayS3A2([StructSize3Align2; 2]),
972    VectorUnion(Vec<UnionSize8Align4>),
973}
974
975impl UnionWithVector {
976    #[inline]
977    pub fn ordinal(&self) -> u64 {
978        match *self {
979            Self::Unused(_) => 1,
980            Self::VectorOfUint8(_) => 2,
981            Self::S(_) => 3,
982            Self::VectorS3A1(_) => 4,
983            Self::VectorS3A2(_) => 5,
984            Self::Handles(_) => 6,
985            Self::ArrayS3A1(_) => 7,
986            Self::ArrayS3A2(_) => 8,
987            Self::VectorUnion(_) => 9,
988        }
989    }
990}
991
992impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionWithVector {}
993
994#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
995pub enum VectorOfArrayOfEventInUnionWithReducedRights {
996    H(Vec<[fidl::Event; 1]>),
997}
998
999impl VectorOfArrayOfEventInUnionWithReducedRights {
1000    #[inline]
1001    pub fn ordinal(&self) -> u64 {
1002        match *self {
1003            Self::H(_) => 1,
1004        }
1005    }
1006}
1007
1008impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1009    for VectorOfArrayOfEventInUnionWithReducedRights
1010{
1011}
1012
1013#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1014pub struct ComponentControllerMarker;
1015
1016impl fidl::endpoints::ProtocolMarker for ComponentControllerMarker {
1017    type Proxy = ComponentControllerProxy;
1018    type RequestStream = ComponentControllerRequestStream;
1019    #[cfg(target_os = "fuchsia")]
1020    type SynchronousProxy = ComponentControllerSynchronousProxy;
1021
1022    const DEBUG_NAME: &'static str = "(anonymous) ComponentController";
1023}
1024
1025pub trait ComponentControllerProxyInterface: Send + Sync {}
1026#[derive(Debug)]
1027#[cfg(target_os = "fuchsia")]
1028pub struct ComponentControllerSynchronousProxy {
1029    client: fidl::client::sync::Client,
1030}
1031
1032#[cfg(target_os = "fuchsia")]
1033impl fidl::endpoints::SynchronousProxy for ComponentControllerSynchronousProxy {
1034    type Proxy = ComponentControllerProxy;
1035    type Protocol = ComponentControllerMarker;
1036
1037    fn from_channel(inner: fidl::Channel) -> Self {
1038        Self::new(inner)
1039    }
1040
1041    fn into_channel(self) -> fidl::Channel {
1042        self.client.into_channel()
1043    }
1044
1045    fn as_channel(&self) -> &fidl::Channel {
1046        self.client.as_channel()
1047    }
1048}
1049
1050#[cfg(target_os = "fuchsia")]
1051impl ComponentControllerSynchronousProxy {
1052    pub fn new(channel: fidl::Channel) -> Self {
1053        Self { client: fidl::client::sync::Client::new(channel) }
1054    }
1055
1056    pub fn into_channel(self) -> fidl::Channel {
1057        self.client.into_channel()
1058    }
1059
1060    /// Waits until an event arrives and returns it. It is safe for other
1061    /// threads to make concurrent requests while waiting for an event.
1062    pub fn wait_for_event(
1063        &self,
1064        deadline: zx::MonotonicInstant,
1065    ) -> Result<ComponentControllerEvent, fidl::Error> {
1066        ComponentControllerEvent::decode(
1067            self.client.wait_for_event::<ComponentControllerMarker>(deadline)?,
1068        )
1069    }
1070}
1071
1072#[cfg(target_os = "fuchsia")]
1073impl From<ComponentControllerSynchronousProxy> for zx::NullableHandle {
1074    fn from(value: ComponentControllerSynchronousProxy) -> Self {
1075        value.into_channel().into()
1076    }
1077}
1078
1079#[cfg(target_os = "fuchsia")]
1080impl From<fidl::Channel> for ComponentControllerSynchronousProxy {
1081    fn from(value: fidl::Channel) -> Self {
1082        Self::new(value)
1083    }
1084}
1085
1086#[cfg(target_os = "fuchsia")]
1087impl fidl::endpoints::FromClient for ComponentControllerSynchronousProxy {
1088    type Protocol = ComponentControllerMarker;
1089
1090    fn from_client(value: fidl::endpoints::ClientEnd<ComponentControllerMarker>) -> Self {
1091        Self::new(value.into_channel())
1092    }
1093}
1094
1095#[derive(Debug, Clone)]
1096pub struct ComponentControllerProxy {
1097    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1098}
1099
1100impl fidl::endpoints::Proxy for ComponentControllerProxy {
1101    type Protocol = ComponentControllerMarker;
1102
1103    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1104        Self::new(inner)
1105    }
1106
1107    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1108        self.client.into_channel().map_err(|client| Self { client })
1109    }
1110
1111    fn as_channel(&self) -> &::fidl::AsyncChannel {
1112        self.client.as_channel()
1113    }
1114}
1115
1116impl ComponentControllerProxy {
1117    /// Create a new Proxy for test.conformance/ComponentController.
1118    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1119        let protocol_name =
1120            <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1121        Self { client: fidl::client::Client::new(channel, protocol_name) }
1122    }
1123
1124    /// Get a Stream of events from the remote end of the protocol.
1125    ///
1126    /// # Panics
1127    ///
1128    /// Panics if the event stream was already taken.
1129    pub fn take_event_stream(&self) -> ComponentControllerEventStream {
1130        ComponentControllerEventStream { event_receiver: self.client.take_event_receiver() }
1131    }
1132}
1133
1134impl ComponentControllerProxyInterface for ComponentControllerProxy {}
1135
1136pub struct ComponentControllerEventStream {
1137    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1138}
1139
1140impl std::marker::Unpin for ComponentControllerEventStream {}
1141
1142impl futures::stream::FusedStream for ComponentControllerEventStream {
1143    fn is_terminated(&self) -> bool {
1144        self.event_receiver.is_terminated()
1145    }
1146}
1147
1148impl futures::Stream for ComponentControllerEventStream {
1149    type Item = Result<ComponentControllerEvent, fidl::Error>;
1150
1151    fn poll_next(
1152        mut self: std::pin::Pin<&mut Self>,
1153        cx: &mut std::task::Context<'_>,
1154    ) -> std::task::Poll<Option<Self::Item>> {
1155        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1156            &mut self.event_receiver,
1157            cx
1158        )?) {
1159            Some(buf) => std::task::Poll::Ready(Some(ComponentControllerEvent::decode(buf))),
1160            None => std::task::Poll::Ready(None),
1161        }
1162    }
1163}
1164
1165#[derive(Debug)]
1166pub enum ComponentControllerEvent {}
1167
1168impl ComponentControllerEvent {
1169    /// Decodes a message buffer as a [`ComponentControllerEvent`].
1170    fn decode(
1171        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1172    ) -> Result<ComponentControllerEvent, fidl::Error> {
1173        let (bytes, _handles) = buf.split_mut();
1174        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1175        debug_assert_eq!(tx_header.tx_id, 0);
1176        match tx_header.ordinal {
1177            _ => Err(fidl::Error::UnknownOrdinal {
1178                ordinal: tx_header.ordinal,
1179                protocol_name:
1180                    <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1181            }),
1182        }
1183    }
1184}
1185
1186/// A Stream of incoming requests for test.conformance/ComponentController.
1187pub struct ComponentControllerRequestStream {
1188    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1189    is_terminated: bool,
1190}
1191
1192impl std::marker::Unpin for ComponentControllerRequestStream {}
1193
1194impl futures::stream::FusedStream for ComponentControllerRequestStream {
1195    fn is_terminated(&self) -> bool {
1196        self.is_terminated
1197    }
1198}
1199
1200impl fidl::endpoints::RequestStream for ComponentControllerRequestStream {
1201    type Protocol = ComponentControllerMarker;
1202    type ControlHandle = ComponentControllerControlHandle;
1203
1204    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1205        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1206    }
1207
1208    fn control_handle(&self) -> Self::ControlHandle {
1209        ComponentControllerControlHandle { inner: self.inner.clone() }
1210    }
1211
1212    fn into_inner(
1213        self,
1214    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1215    {
1216        (self.inner, self.is_terminated)
1217    }
1218
1219    fn from_inner(
1220        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1221        is_terminated: bool,
1222    ) -> Self {
1223        Self { inner, is_terminated }
1224    }
1225}
1226
1227impl futures::Stream for ComponentControllerRequestStream {
1228    type Item = Result<ComponentControllerRequest, fidl::Error>;
1229
1230    fn poll_next(
1231        mut self: std::pin::Pin<&mut Self>,
1232        cx: &mut std::task::Context<'_>,
1233    ) -> std::task::Poll<Option<Self::Item>> {
1234        let this = &mut *self;
1235        if this.inner.check_shutdown(cx) {
1236            this.is_terminated = true;
1237            return std::task::Poll::Ready(None);
1238        }
1239        if this.is_terminated {
1240            panic!("polled ComponentControllerRequestStream after completion");
1241        }
1242        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1243            |bytes, handles| {
1244                match this.inner.channel().read_etc(cx, bytes, handles) {
1245                    std::task::Poll::Ready(Ok(())) => {}
1246                    std::task::Poll::Pending => return std::task::Poll::Pending,
1247                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1248                        this.is_terminated = true;
1249                        return std::task::Poll::Ready(None);
1250                    }
1251                    std::task::Poll::Ready(Err(e)) => {
1252                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1253                            e.into(),
1254                        ))));
1255                    }
1256                }
1257
1258                // A message has been received from the channel
1259                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1260
1261                std::task::Poll::Ready(Some(match header.ordinal {
1262                _ => Err(fidl::Error::UnknownOrdinal {
1263                    ordinal: header.ordinal,
1264                    protocol_name: <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1265                }),
1266            }))
1267            },
1268        )
1269    }
1270}
1271
1272#[derive(Debug)]
1273pub enum ComponentControllerRequest {}
1274
1275impl ComponentControllerRequest {
1276    /// Name of the method defined in FIDL
1277    pub fn method_name(&self) -> &'static str {
1278        match *self {}
1279    }
1280}
1281
1282#[derive(Debug, Clone)]
1283pub struct ComponentControllerControlHandle {
1284    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1285}
1286
1287impl fidl::endpoints::ControlHandle for ComponentControllerControlHandle {
1288    fn shutdown(&self) {
1289        self.inner.shutdown()
1290    }
1291
1292    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1293        self.inner.shutdown_with_epitaph(status)
1294    }
1295
1296    fn is_closed(&self) -> bool {
1297        self.inner.channel().is_closed()
1298    }
1299    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1300        self.inner.channel().on_closed()
1301    }
1302
1303    #[cfg(target_os = "fuchsia")]
1304    fn signal_peer(
1305        &self,
1306        clear_mask: zx::Signals,
1307        set_mask: zx::Signals,
1308    ) -> Result<(), zx_status::Status> {
1309        use fidl::Peered;
1310        self.inner.channel().signal_peer(clear_mask, set_mask)
1311    }
1312}
1313
1314impl ComponentControllerControlHandle {}
1315
1316#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1317pub struct ProtocolMarker;
1318
1319impl fidl::endpoints::ProtocolMarker for ProtocolMarker {
1320    type Proxy = ProtocolProxy;
1321    type RequestStream = ProtocolRequestStream;
1322    #[cfg(target_os = "fuchsia")]
1323    type SynchronousProxy = ProtocolSynchronousProxy;
1324
1325    const DEBUG_NAME: &'static str = "(anonymous) Protocol";
1326}
1327
1328pub trait ProtocolProxyInterface: Send + Sync {}
1329#[derive(Debug)]
1330#[cfg(target_os = "fuchsia")]
1331pub struct ProtocolSynchronousProxy {
1332    client: fidl::client::sync::Client,
1333}
1334
1335#[cfg(target_os = "fuchsia")]
1336impl fidl::endpoints::SynchronousProxy for ProtocolSynchronousProxy {
1337    type Proxy = ProtocolProxy;
1338    type Protocol = ProtocolMarker;
1339
1340    fn from_channel(inner: fidl::Channel) -> Self {
1341        Self::new(inner)
1342    }
1343
1344    fn into_channel(self) -> fidl::Channel {
1345        self.client.into_channel()
1346    }
1347
1348    fn as_channel(&self) -> &fidl::Channel {
1349        self.client.as_channel()
1350    }
1351}
1352
1353#[cfg(target_os = "fuchsia")]
1354impl ProtocolSynchronousProxy {
1355    pub fn new(channel: fidl::Channel) -> Self {
1356        Self { client: fidl::client::sync::Client::new(channel) }
1357    }
1358
1359    pub fn into_channel(self) -> fidl::Channel {
1360        self.client.into_channel()
1361    }
1362
1363    /// Waits until an event arrives and returns it. It is safe for other
1364    /// threads to make concurrent requests while waiting for an event.
1365    pub fn wait_for_event(
1366        &self,
1367        deadline: zx::MonotonicInstant,
1368    ) -> Result<ProtocolEvent, fidl::Error> {
1369        ProtocolEvent::decode(self.client.wait_for_event::<ProtocolMarker>(deadline)?)
1370    }
1371}
1372
1373#[cfg(target_os = "fuchsia")]
1374impl From<ProtocolSynchronousProxy> for zx::NullableHandle {
1375    fn from(value: ProtocolSynchronousProxy) -> Self {
1376        value.into_channel().into()
1377    }
1378}
1379
1380#[cfg(target_os = "fuchsia")]
1381impl From<fidl::Channel> for ProtocolSynchronousProxy {
1382    fn from(value: fidl::Channel) -> Self {
1383        Self::new(value)
1384    }
1385}
1386
1387#[cfg(target_os = "fuchsia")]
1388impl fidl::endpoints::FromClient for ProtocolSynchronousProxy {
1389    type Protocol = ProtocolMarker;
1390
1391    fn from_client(value: fidl::endpoints::ClientEnd<ProtocolMarker>) -> Self {
1392        Self::new(value.into_channel())
1393    }
1394}
1395
1396#[derive(Debug, Clone)]
1397pub struct ProtocolProxy {
1398    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1399}
1400
1401impl fidl::endpoints::Proxy for ProtocolProxy {
1402    type Protocol = ProtocolMarker;
1403
1404    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1405        Self::new(inner)
1406    }
1407
1408    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1409        self.client.into_channel().map_err(|client| Self { client })
1410    }
1411
1412    fn as_channel(&self) -> &::fidl::AsyncChannel {
1413        self.client.as_channel()
1414    }
1415}
1416
1417impl ProtocolProxy {
1418    /// Create a new Proxy for test.conformance/Protocol.
1419    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1420        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1421        Self { client: fidl::client::Client::new(channel, protocol_name) }
1422    }
1423
1424    /// Get a Stream of events from the remote end of the protocol.
1425    ///
1426    /// # Panics
1427    ///
1428    /// Panics if the event stream was already taken.
1429    pub fn take_event_stream(&self) -> ProtocolEventStream {
1430        ProtocolEventStream { event_receiver: self.client.take_event_receiver() }
1431    }
1432}
1433
1434impl ProtocolProxyInterface for ProtocolProxy {}
1435
1436pub struct ProtocolEventStream {
1437    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1438}
1439
1440impl std::marker::Unpin for ProtocolEventStream {}
1441
1442impl futures::stream::FusedStream for ProtocolEventStream {
1443    fn is_terminated(&self) -> bool {
1444        self.event_receiver.is_terminated()
1445    }
1446}
1447
1448impl futures::Stream for ProtocolEventStream {
1449    type Item = Result<ProtocolEvent, fidl::Error>;
1450
1451    fn poll_next(
1452        mut self: std::pin::Pin<&mut Self>,
1453        cx: &mut std::task::Context<'_>,
1454    ) -> std::task::Poll<Option<Self::Item>> {
1455        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1456            &mut self.event_receiver,
1457            cx
1458        )?) {
1459            Some(buf) => std::task::Poll::Ready(Some(ProtocolEvent::decode(buf))),
1460            None => std::task::Poll::Ready(None),
1461        }
1462    }
1463}
1464
1465#[derive(Debug)]
1466pub enum ProtocolEvent {}
1467
1468impl ProtocolEvent {
1469    /// Decodes a message buffer as a [`ProtocolEvent`].
1470    fn decode(
1471        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1472    ) -> Result<ProtocolEvent, fidl::Error> {
1473        let (bytes, _handles) = buf.split_mut();
1474        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1475        debug_assert_eq!(tx_header.tx_id, 0);
1476        match tx_header.ordinal {
1477            _ => Err(fidl::Error::UnknownOrdinal {
1478                ordinal: tx_header.ordinal,
1479                protocol_name: <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1480            }),
1481        }
1482    }
1483}
1484
1485/// A Stream of incoming requests for test.conformance/Protocol.
1486pub struct ProtocolRequestStream {
1487    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1488    is_terminated: bool,
1489}
1490
1491impl std::marker::Unpin for ProtocolRequestStream {}
1492
1493impl futures::stream::FusedStream for ProtocolRequestStream {
1494    fn is_terminated(&self) -> bool {
1495        self.is_terminated
1496    }
1497}
1498
1499impl fidl::endpoints::RequestStream for ProtocolRequestStream {
1500    type Protocol = ProtocolMarker;
1501    type ControlHandle = ProtocolControlHandle;
1502
1503    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1504        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1505    }
1506
1507    fn control_handle(&self) -> Self::ControlHandle {
1508        ProtocolControlHandle { inner: self.inner.clone() }
1509    }
1510
1511    fn into_inner(
1512        self,
1513    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1514    {
1515        (self.inner, self.is_terminated)
1516    }
1517
1518    fn from_inner(
1519        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1520        is_terminated: bool,
1521    ) -> Self {
1522        Self { inner, is_terminated }
1523    }
1524}
1525
1526impl futures::Stream for ProtocolRequestStream {
1527    type Item = Result<ProtocolRequest, fidl::Error>;
1528
1529    fn poll_next(
1530        mut self: std::pin::Pin<&mut Self>,
1531        cx: &mut std::task::Context<'_>,
1532    ) -> std::task::Poll<Option<Self::Item>> {
1533        let this = &mut *self;
1534        if this.inner.check_shutdown(cx) {
1535            this.is_terminated = true;
1536            return std::task::Poll::Ready(None);
1537        }
1538        if this.is_terminated {
1539            panic!("polled ProtocolRequestStream after completion");
1540        }
1541        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1542            |bytes, handles| {
1543                match this.inner.channel().read_etc(cx, bytes, handles) {
1544                    std::task::Poll::Ready(Ok(())) => {}
1545                    std::task::Poll::Pending => return std::task::Poll::Pending,
1546                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1547                        this.is_terminated = true;
1548                        return std::task::Poll::Ready(None);
1549                    }
1550                    std::task::Poll::Ready(Err(e)) => {
1551                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1552                            e.into(),
1553                        ))));
1554                    }
1555                }
1556
1557                // A message has been received from the channel
1558                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1559
1560                std::task::Poll::Ready(Some(match header.ordinal {
1561                    _ => Err(fidl::Error::UnknownOrdinal {
1562                        ordinal: header.ordinal,
1563                        protocol_name:
1564                            <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1565                    }),
1566                }))
1567            },
1568        )
1569    }
1570}
1571
1572#[derive(Debug)]
1573pub enum ProtocolRequest {}
1574
1575impl ProtocolRequest {
1576    /// Name of the method defined in FIDL
1577    pub fn method_name(&self) -> &'static str {
1578        match *self {}
1579    }
1580}
1581
1582#[derive(Debug, Clone)]
1583pub struct ProtocolControlHandle {
1584    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1585}
1586
1587impl fidl::endpoints::ControlHandle for ProtocolControlHandle {
1588    fn shutdown(&self) {
1589        self.inner.shutdown()
1590    }
1591
1592    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1593        self.inner.shutdown_with_epitaph(status)
1594    }
1595
1596    fn is_closed(&self) -> bool {
1597        self.inner.channel().is_closed()
1598    }
1599    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1600        self.inner.channel().on_closed()
1601    }
1602
1603    #[cfg(target_os = "fuchsia")]
1604    fn signal_peer(
1605        &self,
1606        clear_mask: zx::Signals,
1607        set_mask: zx::Signals,
1608    ) -> Result<(), zx_status::Status> {
1609        use fidl::Peered;
1610        self.inner.channel().signal_peer(clear_mask, set_mask)
1611    }
1612}
1613
1614impl ProtocolControlHandle {}
1615
1616mod internal {
1617    use super::*;
1618
1619    impl fidl::encoding::ResourceTypeMarker for AlternatingHandlesAndFailures {
1620        type Borrowed<'a> = &'a mut Self;
1621        fn take_or_borrow<'a>(
1622            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1623        ) -> Self::Borrowed<'a> {
1624            value
1625        }
1626    }
1627
1628    unsafe impl fidl::encoding::TypeMarker for AlternatingHandlesAndFailures {
1629        type Owned = Self;
1630
1631        #[inline(always)]
1632        fn inline_align(_context: fidl::encoding::Context) -> usize {
1633            8
1634        }
1635
1636        #[inline(always)]
1637        fn inline_size(_context: fidl::encoding::Context) -> usize {
1638            56
1639        }
1640    }
1641
1642    unsafe impl
1643        fidl::encoding::Encode<
1644            AlternatingHandlesAndFailures,
1645            fidl::encoding::DefaultFuchsiaResourceDialect,
1646        > for &mut AlternatingHandlesAndFailures
1647    {
1648        #[inline]
1649        unsafe fn encode(
1650            self,
1651            encoder: &mut fidl::encoding::Encoder<
1652                '_,
1653                fidl::encoding::DefaultFuchsiaResourceDialect,
1654            >,
1655            offset: usize,
1656            _depth: fidl::encoding::Depth,
1657        ) -> fidl::Result<()> {
1658            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1659            // Delegate to tuple encoding.
1660            fidl::encoding::Encode::<
1661                AlternatingHandlesAndFailures,
1662                fidl::encoding::DefaultFuchsiaResourceDialect,
1663            >::encode(
1664                (
1665                    <fidl::encoding::HandleType<
1666                        fidl::NullableHandle,
1667                        { fidl::ObjectType::NONE.into_raw() },
1668                        2147483648,
1669                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1670                        &mut self.h1
1671                    ),
1672                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1673                        &self.failure_trigger1,
1674                    ),
1675                    <fidl::encoding::HandleType<
1676                        fidl::NullableHandle,
1677                        { fidl::ObjectType::NONE.into_raw() },
1678                        2147483648,
1679                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1680                        &mut self.h2
1681                    ),
1682                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1683                        &self.failure_trigger2,
1684                    ),
1685                    <fidl::encoding::HandleType<
1686                        fidl::NullableHandle,
1687                        { fidl::ObjectType::NONE.into_raw() },
1688                        2147483648,
1689                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1690                        &mut self.h3
1691                    ),
1692                ),
1693                encoder,
1694                offset,
1695                _depth,
1696            )
1697        }
1698    }
1699    unsafe impl<
1700        T0: fidl::encoding::Encode<
1701                fidl::encoding::HandleType<
1702                    fidl::NullableHandle,
1703                    { fidl::ObjectType::NONE.into_raw() },
1704                    2147483648,
1705                >,
1706                fidl::encoding::DefaultFuchsiaResourceDialect,
1707            >,
1708        T1: fidl::encoding::Encode<
1709                fidl::encoding::BoundedString<1>,
1710                fidl::encoding::DefaultFuchsiaResourceDialect,
1711            >,
1712        T2: fidl::encoding::Encode<
1713                fidl::encoding::HandleType<
1714                    fidl::NullableHandle,
1715                    { fidl::ObjectType::NONE.into_raw() },
1716                    2147483648,
1717                >,
1718                fidl::encoding::DefaultFuchsiaResourceDialect,
1719            >,
1720        T3: fidl::encoding::Encode<
1721                fidl::encoding::BoundedString<1>,
1722                fidl::encoding::DefaultFuchsiaResourceDialect,
1723            >,
1724        T4: fidl::encoding::Encode<
1725                fidl::encoding::HandleType<
1726                    fidl::NullableHandle,
1727                    { fidl::ObjectType::NONE.into_raw() },
1728                    2147483648,
1729                >,
1730                fidl::encoding::DefaultFuchsiaResourceDialect,
1731            >,
1732    >
1733        fidl::encoding::Encode<
1734            AlternatingHandlesAndFailures,
1735            fidl::encoding::DefaultFuchsiaResourceDialect,
1736        > for (T0, T1, T2, T3, T4)
1737    {
1738        #[inline]
1739        unsafe fn encode(
1740            self,
1741            encoder: &mut fidl::encoding::Encoder<
1742                '_,
1743                fidl::encoding::DefaultFuchsiaResourceDialect,
1744            >,
1745            offset: usize,
1746            depth: fidl::encoding::Depth,
1747        ) -> fidl::Result<()> {
1748            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1749            // Zero out padding regions. There's no need to apply masks
1750            // because the unmasked parts will be overwritten by fields.
1751            unsafe {
1752                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1753                (ptr as *mut u64).write_unaligned(0);
1754            }
1755            unsafe {
1756                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1757                (ptr as *mut u64).write_unaligned(0);
1758            }
1759            unsafe {
1760                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
1761                (ptr as *mut u64).write_unaligned(0);
1762            }
1763            // Write the fields.
1764            self.0.encode(encoder, offset + 0, depth)?;
1765            self.1.encode(encoder, offset + 8, depth)?;
1766            self.2.encode(encoder, offset + 24, depth)?;
1767            self.3.encode(encoder, offset + 32, depth)?;
1768            self.4.encode(encoder, offset + 48, depth)?;
1769            Ok(())
1770        }
1771    }
1772
1773    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1774        for AlternatingHandlesAndFailures
1775    {
1776        #[inline(always)]
1777        fn new_empty() -> Self {
1778            Self {
1779                h1: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1780                failure_trigger1: fidl::new_empty!(
1781                    fidl::encoding::BoundedString<1>,
1782                    fidl::encoding::DefaultFuchsiaResourceDialect
1783                ),
1784                h2: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1785                failure_trigger2: fidl::new_empty!(
1786                    fidl::encoding::BoundedString<1>,
1787                    fidl::encoding::DefaultFuchsiaResourceDialect
1788                ),
1789                h3: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1790            }
1791        }
1792
1793        #[inline]
1794        unsafe fn decode(
1795            &mut self,
1796            decoder: &mut fidl::encoding::Decoder<
1797                '_,
1798                fidl::encoding::DefaultFuchsiaResourceDialect,
1799            >,
1800            offset: usize,
1801            _depth: fidl::encoding::Depth,
1802        ) -> fidl::Result<()> {
1803            decoder.debug_check_bounds::<Self>(offset);
1804            // Verify that padding bytes are zero.
1805            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1806            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1807            let mask = 0xffffffff00000000u64;
1808            let maskedval = padval & mask;
1809            if maskedval != 0 {
1810                return Err(fidl::Error::NonZeroPadding {
1811                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1812                });
1813            }
1814            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1815            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1816            let mask = 0xffffffff00000000u64;
1817            let maskedval = padval & mask;
1818            if maskedval != 0 {
1819                return Err(fidl::Error::NonZeroPadding {
1820                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1821                });
1822            }
1823            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
1824            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1825            let mask = 0xffffffff00000000u64;
1826            let maskedval = padval & mask;
1827            if maskedval != 0 {
1828                return Err(fidl::Error::NonZeroPadding {
1829                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
1830                });
1831            }
1832            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h1, decoder, offset + 0, _depth)?;
1833            fidl::decode!(
1834                fidl::encoding::BoundedString<1>,
1835                fidl::encoding::DefaultFuchsiaResourceDialect,
1836                &mut self.failure_trigger1,
1837                decoder,
1838                offset + 8,
1839                _depth
1840            )?;
1841            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h2, decoder, offset + 24, _depth)?;
1842            fidl::decode!(
1843                fidl::encoding::BoundedString<1>,
1844                fidl::encoding::DefaultFuchsiaResourceDialect,
1845                &mut self.failure_trigger2,
1846                decoder,
1847                offset + 32,
1848                _depth
1849            )?;
1850            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h3, decoder, offset + 48, _depth)?;
1851            Ok(())
1852        }
1853    }
1854
1855    impl fidl::encoding::ResourceTypeMarker for ArrayOfArrayOfNonnullableHandles {
1856        type Borrowed<'a> = &'a mut Self;
1857        fn take_or_borrow<'a>(
1858            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1859        ) -> Self::Borrowed<'a> {
1860            value
1861        }
1862    }
1863
1864    unsafe impl fidl::encoding::TypeMarker for ArrayOfArrayOfNonnullableHandles {
1865        type Owned = Self;
1866
1867        #[inline(always)]
1868        fn inline_align(_context: fidl::encoding::Context) -> usize {
1869            4
1870        }
1871
1872        #[inline(always)]
1873        fn inline_size(_context: fidl::encoding::Context) -> usize {
1874            48
1875        }
1876    }
1877
1878    unsafe impl
1879        fidl::encoding::Encode<
1880            ArrayOfArrayOfNonnullableHandles,
1881            fidl::encoding::DefaultFuchsiaResourceDialect,
1882        > for &mut ArrayOfArrayOfNonnullableHandles
1883    {
1884        #[inline]
1885        unsafe fn encode(
1886            self,
1887            encoder: &mut fidl::encoding::Encoder<
1888                '_,
1889                fidl::encoding::DefaultFuchsiaResourceDialect,
1890            >,
1891            offset: usize,
1892            _depth: fidl::encoding::Depth,
1893        ) -> fidl::Result<()> {
1894            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1895            // Delegate to tuple encoding.
1896            fidl::encoding::Encode::<
1897                ArrayOfArrayOfNonnullableHandles,
1898                fidl::encoding::DefaultFuchsiaResourceDialect,
1899            >::encode(
1900                (<fidl::encoding::Array<
1901                    fidl::encoding::Array<
1902                        fidl::encoding::HandleType<
1903                            fidl::NullableHandle,
1904                            { fidl::ObjectType::NONE.into_raw() },
1905                            2147483648,
1906                        >,
1907                        3,
1908                    >,
1909                    4,
1910                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1911                    &mut self.handles
1912                ),),
1913                encoder,
1914                offset,
1915                _depth,
1916            )
1917        }
1918    }
1919    unsafe impl<
1920        T0: fidl::encoding::Encode<
1921                fidl::encoding::Array<
1922                    fidl::encoding::Array<
1923                        fidl::encoding::HandleType<
1924                            fidl::NullableHandle,
1925                            { fidl::ObjectType::NONE.into_raw() },
1926                            2147483648,
1927                        >,
1928                        3,
1929                    >,
1930                    4,
1931                >,
1932                fidl::encoding::DefaultFuchsiaResourceDialect,
1933            >,
1934    >
1935        fidl::encoding::Encode<
1936            ArrayOfArrayOfNonnullableHandles,
1937            fidl::encoding::DefaultFuchsiaResourceDialect,
1938        > for (T0,)
1939    {
1940        #[inline]
1941        unsafe fn encode(
1942            self,
1943            encoder: &mut fidl::encoding::Encoder<
1944                '_,
1945                fidl::encoding::DefaultFuchsiaResourceDialect,
1946            >,
1947            offset: usize,
1948            depth: fidl::encoding::Depth,
1949        ) -> fidl::Result<()> {
1950            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1951            // Zero out padding regions. There's no need to apply masks
1952            // because the unmasked parts will be overwritten by fields.
1953            // Write the fields.
1954            self.0.encode(encoder, offset + 0, depth)?;
1955            Ok(())
1956        }
1957    }
1958
1959    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1960        for ArrayOfArrayOfNonnullableHandles
1961    {
1962        #[inline(always)]
1963        fn new_empty() -> Self {
1964            Self {
1965                handles: fidl::new_empty!(
1966                    fidl::encoding::Array<
1967                        fidl::encoding::Array<
1968                            fidl::encoding::HandleType<
1969                                fidl::NullableHandle,
1970                                { fidl::ObjectType::NONE.into_raw() },
1971                                2147483648,
1972                            >,
1973                            3,
1974                        >,
1975                        4,
1976                    >,
1977                    fidl::encoding::DefaultFuchsiaResourceDialect
1978                ),
1979            }
1980        }
1981
1982        #[inline]
1983        unsafe fn decode(
1984            &mut self,
1985            decoder: &mut fidl::encoding::Decoder<
1986                '_,
1987                fidl::encoding::DefaultFuchsiaResourceDialect,
1988            >,
1989            offset: usize,
1990            _depth: fidl::encoding::Depth,
1991        ) -> fidl::Result<()> {
1992            decoder.debug_check_bounds::<Self>(offset);
1993            // Verify that padding bytes are zero.
1994            fidl::decode!(
1995                fidl::encoding::Array<
1996                    fidl::encoding::Array<
1997                        fidl::encoding::HandleType<
1998                            fidl::NullableHandle,
1999                            { fidl::ObjectType::NONE.into_raw() },
2000                            2147483648,
2001                        >,
2002                        3,
2003                    >,
2004                    4,
2005                >,
2006                fidl::encoding::DefaultFuchsiaResourceDialect,
2007                &mut self.handles,
2008                decoder,
2009                offset + 0,
2010                _depth
2011            )?;
2012            Ok(())
2013        }
2014    }
2015
2016    impl fidl::encoding::ResourceTypeMarker for ArrayOfHandles {
2017        type Borrowed<'a> = &'a mut Self;
2018        fn take_or_borrow<'a>(
2019            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2020        ) -> Self::Borrowed<'a> {
2021            value
2022        }
2023    }
2024
2025    unsafe impl fidl::encoding::TypeMarker for ArrayOfHandles {
2026        type Owned = Self;
2027
2028        #[inline(always)]
2029        fn inline_align(_context: fidl::encoding::Context) -> usize {
2030            4
2031        }
2032
2033        #[inline(always)]
2034        fn inline_size(_context: fidl::encoding::Context) -> usize {
2035            12
2036        }
2037    }
2038
2039    unsafe impl
2040        fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2041        for &mut ArrayOfHandles
2042    {
2043        #[inline]
2044        unsafe fn encode(
2045            self,
2046            encoder: &mut fidl::encoding::Encoder<
2047                '_,
2048                fidl::encoding::DefaultFuchsiaResourceDialect,
2049            >,
2050            offset: usize,
2051            _depth: fidl::encoding::Depth,
2052        ) -> fidl::Result<()> {
2053            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2054            // Delegate to tuple encoding.
2055            fidl::encoding::Encode::<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2056                (
2057                    <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),
2058                ),
2059                encoder, offset, _depth
2060            )
2061        }
2062    }
2063    unsafe impl<
2064        T0: fidl::encoding::Encode<
2065                fidl::encoding::Array<
2066                    fidl::encoding::HandleType<
2067                        fidl::NullableHandle,
2068                        { fidl::ObjectType::NONE.into_raw() },
2069                        2147483648,
2070                    >,
2071                    3,
2072                >,
2073                fidl::encoding::DefaultFuchsiaResourceDialect,
2074            >,
2075    > fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2076        for (T0,)
2077    {
2078        #[inline]
2079        unsafe fn encode(
2080            self,
2081            encoder: &mut fidl::encoding::Encoder<
2082                '_,
2083                fidl::encoding::DefaultFuchsiaResourceDialect,
2084            >,
2085            offset: usize,
2086            depth: fidl::encoding::Depth,
2087        ) -> fidl::Result<()> {
2088            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2089            // Zero out padding regions. There's no need to apply masks
2090            // because the unmasked parts will be overwritten by fields.
2091            // Write the fields.
2092            self.0.encode(encoder, offset + 0, depth)?;
2093            Ok(())
2094        }
2095    }
2096
2097    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2098        for ArrayOfHandles
2099    {
2100        #[inline(always)]
2101        fn new_empty() -> Self {
2102            Self {
2103                a: fidl::new_empty!(
2104                    fidl::encoding::Array<
2105                        fidl::encoding::HandleType<
2106                            fidl::NullableHandle,
2107                            { fidl::ObjectType::NONE.into_raw() },
2108                            2147483648,
2109                        >,
2110                        3,
2111                    >,
2112                    fidl::encoding::DefaultFuchsiaResourceDialect
2113                ),
2114            }
2115        }
2116
2117        #[inline]
2118        unsafe fn decode(
2119            &mut self,
2120            decoder: &mut fidl::encoding::Decoder<
2121                '_,
2122                fidl::encoding::DefaultFuchsiaResourceDialect,
2123            >,
2124            offset: usize,
2125            _depth: fidl::encoding::Depth,
2126        ) -> fidl::Result<()> {
2127            decoder.debug_check_bounds::<Self>(offset);
2128            // Verify that padding bytes are zero.
2129            fidl::decode!(
2130                fidl::encoding::Array<
2131                    fidl::encoding::HandleType<
2132                        fidl::NullableHandle,
2133                        { fidl::ObjectType::NONE.into_raw() },
2134                        2147483648,
2135                    >,
2136                    3,
2137                >,
2138                fidl::encoding::DefaultFuchsiaResourceDialect,
2139                &mut self.a,
2140                decoder,
2141                offset + 0,
2142                _depth
2143            )?;
2144            Ok(())
2145        }
2146    }
2147
2148    impl fidl::encoding::ResourceTypeMarker for ArrayOfNonnullableHandles {
2149        type Borrowed<'a> = &'a mut Self;
2150        fn take_or_borrow<'a>(
2151            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2152        ) -> Self::Borrowed<'a> {
2153            value
2154        }
2155    }
2156
2157    unsafe impl fidl::encoding::TypeMarker for ArrayOfNonnullableHandles {
2158        type Owned = Self;
2159
2160        #[inline(always)]
2161        fn inline_align(_context: fidl::encoding::Context) -> usize {
2162            4
2163        }
2164
2165        #[inline(always)]
2166        fn inline_size(_context: fidl::encoding::Context) -> usize {
2167            16
2168        }
2169    }
2170
2171    unsafe impl
2172        fidl::encoding::Encode<
2173            ArrayOfNonnullableHandles,
2174            fidl::encoding::DefaultFuchsiaResourceDialect,
2175        > for &mut ArrayOfNonnullableHandles
2176    {
2177        #[inline]
2178        unsafe fn encode(
2179            self,
2180            encoder: &mut fidl::encoding::Encoder<
2181                '_,
2182                fidl::encoding::DefaultFuchsiaResourceDialect,
2183            >,
2184            offset: usize,
2185            _depth: fidl::encoding::Depth,
2186        ) -> fidl::Result<()> {
2187            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2188            // Delegate to tuple encoding.
2189            fidl::encoding::Encode::<
2190                ArrayOfNonnullableHandles,
2191                fidl::encoding::DefaultFuchsiaResourceDialect,
2192            >::encode(
2193                (<fidl::encoding::Array<
2194                    fidl::encoding::HandleType<
2195                        fidl::NullableHandle,
2196                        { fidl::ObjectType::NONE.into_raw() },
2197                        2147483648,
2198                    >,
2199                    4,
2200                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2201                    &mut self.handles
2202                ),),
2203                encoder,
2204                offset,
2205                _depth,
2206            )
2207        }
2208    }
2209    unsafe impl<
2210        T0: fidl::encoding::Encode<
2211                fidl::encoding::Array<
2212                    fidl::encoding::HandleType<
2213                        fidl::NullableHandle,
2214                        { fidl::ObjectType::NONE.into_raw() },
2215                        2147483648,
2216                    >,
2217                    4,
2218                >,
2219                fidl::encoding::DefaultFuchsiaResourceDialect,
2220            >,
2221    >
2222        fidl::encoding::Encode<
2223            ArrayOfNonnullableHandles,
2224            fidl::encoding::DefaultFuchsiaResourceDialect,
2225        > for (T0,)
2226    {
2227        #[inline]
2228        unsafe fn encode(
2229            self,
2230            encoder: &mut fidl::encoding::Encoder<
2231                '_,
2232                fidl::encoding::DefaultFuchsiaResourceDialect,
2233            >,
2234            offset: usize,
2235            depth: fidl::encoding::Depth,
2236        ) -> fidl::Result<()> {
2237            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2238            // Zero out padding regions. There's no need to apply masks
2239            // because the unmasked parts will be overwritten by fields.
2240            // Write the fields.
2241            self.0.encode(encoder, offset + 0, depth)?;
2242            Ok(())
2243        }
2244    }
2245
2246    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2247        for ArrayOfNonnullableHandles
2248    {
2249        #[inline(always)]
2250        fn new_empty() -> Self {
2251            Self {
2252                handles: fidl::new_empty!(
2253                    fidl::encoding::Array<
2254                        fidl::encoding::HandleType<
2255                            fidl::NullableHandle,
2256                            { fidl::ObjectType::NONE.into_raw() },
2257                            2147483648,
2258                        >,
2259                        4,
2260                    >,
2261                    fidl::encoding::DefaultFuchsiaResourceDialect
2262                ),
2263            }
2264        }
2265
2266        #[inline]
2267        unsafe fn decode(
2268            &mut self,
2269            decoder: &mut fidl::encoding::Decoder<
2270                '_,
2271                fidl::encoding::DefaultFuchsiaResourceDialect,
2272            >,
2273            offset: usize,
2274            _depth: fidl::encoding::Depth,
2275        ) -> fidl::Result<()> {
2276            decoder.debug_check_bounds::<Self>(offset);
2277            // Verify that padding bytes are zero.
2278            fidl::decode!(
2279                fidl::encoding::Array<
2280                    fidl::encoding::HandleType<
2281                        fidl::NullableHandle,
2282                        { fidl::ObjectType::NONE.into_raw() },
2283                        2147483648,
2284                    >,
2285                    4,
2286                >,
2287                fidl::encoding::DefaultFuchsiaResourceDialect,
2288                &mut self.handles,
2289                decoder,
2290                offset + 0,
2291                _depth
2292            )?;
2293            Ok(())
2294        }
2295    }
2296
2297    impl fidl::encoding::ResourceTypeMarker for ArrayOfNullableHandles {
2298        type Borrowed<'a> = &'a mut Self;
2299        fn take_or_borrow<'a>(
2300            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2301        ) -> Self::Borrowed<'a> {
2302            value
2303        }
2304    }
2305
2306    unsafe impl fidl::encoding::TypeMarker for ArrayOfNullableHandles {
2307        type Owned = Self;
2308
2309        #[inline(always)]
2310        fn inline_align(_context: fidl::encoding::Context) -> usize {
2311            4
2312        }
2313
2314        #[inline(always)]
2315        fn inline_size(_context: fidl::encoding::Context) -> usize {
2316            20
2317        }
2318    }
2319
2320    unsafe impl
2321        fidl::encoding::Encode<
2322            ArrayOfNullableHandles,
2323            fidl::encoding::DefaultFuchsiaResourceDialect,
2324        > for &mut ArrayOfNullableHandles
2325    {
2326        #[inline]
2327        unsafe fn encode(
2328            self,
2329            encoder: &mut fidl::encoding::Encoder<
2330                '_,
2331                fidl::encoding::DefaultFuchsiaResourceDialect,
2332            >,
2333            offset: usize,
2334            _depth: fidl::encoding::Depth,
2335        ) -> fidl::Result<()> {
2336            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2337            // Delegate to tuple encoding.
2338            fidl::encoding::Encode::<
2339                ArrayOfNullableHandles,
2340                fidl::encoding::DefaultFuchsiaResourceDialect,
2341            >::encode(
2342                (<fidl::encoding::Array<
2343                    fidl::encoding::Optional<
2344                        fidl::encoding::HandleType<
2345                            fidl::NullableHandle,
2346                            { fidl::ObjectType::NONE.into_raw() },
2347                            2147483648,
2348                        >,
2349                    >,
2350                    5,
2351                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2352                    &mut self.handles
2353                ),),
2354                encoder,
2355                offset,
2356                _depth,
2357            )
2358        }
2359    }
2360    unsafe impl<
2361        T0: fidl::encoding::Encode<
2362                fidl::encoding::Array<
2363                    fidl::encoding::Optional<
2364                        fidl::encoding::HandleType<
2365                            fidl::NullableHandle,
2366                            { fidl::ObjectType::NONE.into_raw() },
2367                            2147483648,
2368                        >,
2369                    >,
2370                    5,
2371                >,
2372                fidl::encoding::DefaultFuchsiaResourceDialect,
2373            >,
2374    >
2375        fidl::encoding::Encode<
2376            ArrayOfNullableHandles,
2377            fidl::encoding::DefaultFuchsiaResourceDialect,
2378        > for (T0,)
2379    {
2380        #[inline]
2381        unsafe fn encode(
2382            self,
2383            encoder: &mut fidl::encoding::Encoder<
2384                '_,
2385                fidl::encoding::DefaultFuchsiaResourceDialect,
2386            >,
2387            offset: usize,
2388            depth: fidl::encoding::Depth,
2389        ) -> fidl::Result<()> {
2390            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2391            // Zero out padding regions. There's no need to apply masks
2392            // because the unmasked parts will be overwritten by fields.
2393            // Write the fields.
2394            self.0.encode(encoder, offset + 0, depth)?;
2395            Ok(())
2396        }
2397    }
2398
2399    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2400        for ArrayOfNullableHandles
2401    {
2402        #[inline(always)]
2403        fn new_empty() -> Self {
2404            Self {
2405                handles: fidl::new_empty!(
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        }
2420
2421        #[inline]
2422        unsafe fn decode(
2423            &mut self,
2424            decoder: &mut fidl::encoding::Decoder<
2425                '_,
2426                fidl::encoding::DefaultFuchsiaResourceDialect,
2427            >,
2428            offset: usize,
2429            _depth: fidl::encoding::Depth,
2430        ) -> fidl::Result<()> {
2431            decoder.debug_check_bounds::<Self>(offset);
2432            // Verify that padding bytes are zero.
2433            fidl::decode!(
2434                fidl::encoding::Array<
2435                    fidl::encoding::Optional<
2436                        fidl::encoding::HandleType<
2437                            fidl::NullableHandle,
2438                            { fidl::ObjectType::NONE.into_raw() },
2439                            2147483648,
2440                        >,
2441                    >,
2442                    5,
2443                >,
2444                fidl::encoding::DefaultFuchsiaResourceDialect,
2445                &mut self.handles,
2446                decoder,
2447                offset + 0,
2448                _depth
2449            )?;
2450            Ok(())
2451        }
2452    }
2453
2454    impl fidl::encoding::ResourceTypeMarker for ArrayOfOptionalHandles {
2455        type Borrowed<'a> = &'a mut Self;
2456        fn take_or_borrow<'a>(
2457            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2458        ) -> Self::Borrowed<'a> {
2459            value
2460        }
2461    }
2462
2463    unsafe impl fidl::encoding::TypeMarker for ArrayOfOptionalHandles {
2464        type Owned = Self;
2465
2466        #[inline(always)]
2467        fn inline_align(_context: fidl::encoding::Context) -> usize {
2468            4
2469        }
2470
2471        #[inline(always)]
2472        fn inline_size(_context: fidl::encoding::Context) -> usize {
2473            12
2474        }
2475    }
2476
2477    unsafe impl
2478        fidl::encoding::Encode<
2479            ArrayOfOptionalHandles,
2480            fidl::encoding::DefaultFuchsiaResourceDialect,
2481        > for &mut ArrayOfOptionalHandles
2482    {
2483        #[inline]
2484        unsafe fn encode(
2485            self,
2486            encoder: &mut fidl::encoding::Encoder<
2487                '_,
2488                fidl::encoding::DefaultFuchsiaResourceDialect,
2489            >,
2490            offset: usize,
2491            _depth: fidl::encoding::Depth,
2492        ) -> fidl::Result<()> {
2493            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2494            // Delegate to tuple encoding.
2495            fidl::encoding::Encode::<
2496                ArrayOfOptionalHandles,
2497                fidl::encoding::DefaultFuchsiaResourceDialect,
2498            >::encode(
2499                (<fidl::encoding::Array<
2500                    fidl::encoding::Optional<
2501                        fidl::encoding::HandleType<
2502                            fidl::NullableHandle,
2503                            { fidl::ObjectType::NONE.into_raw() },
2504                            2147483648,
2505                        >,
2506                    >,
2507                    3,
2508                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2509                    &mut self.a
2510                ),),
2511                encoder,
2512                offset,
2513                _depth,
2514            )
2515        }
2516    }
2517    unsafe impl<
2518        T0: fidl::encoding::Encode<
2519                fidl::encoding::Array<
2520                    fidl::encoding::Optional<
2521                        fidl::encoding::HandleType<
2522                            fidl::NullableHandle,
2523                            { fidl::ObjectType::NONE.into_raw() },
2524                            2147483648,
2525                        >,
2526                    >,
2527                    3,
2528                >,
2529                fidl::encoding::DefaultFuchsiaResourceDialect,
2530            >,
2531    >
2532        fidl::encoding::Encode<
2533            ArrayOfOptionalHandles,
2534            fidl::encoding::DefaultFuchsiaResourceDialect,
2535        > for (T0,)
2536    {
2537        #[inline]
2538        unsafe fn encode(
2539            self,
2540            encoder: &mut fidl::encoding::Encoder<
2541                '_,
2542                fidl::encoding::DefaultFuchsiaResourceDialect,
2543            >,
2544            offset: usize,
2545            depth: fidl::encoding::Depth,
2546        ) -> fidl::Result<()> {
2547            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2548            // Zero out padding regions. There's no need to apply masks
2549            // because the unmasked parts will be overwritten by fields.
2550            // Write the fields.
2551            self.0.encode(encoder, offset + 0, depth)?;
2552            Ok(())
2553        }
2554    }
2555
2556    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2557        for ArrayOfOptionalHandles
2558    {
2559        #[inline(always)]
2560        fn new_empty() -> Self {
2561            Self {
2562                a: fidl::new_empty!(
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        }
2577
2578        #[inline]
2579        unsafe fn decode(
2580            &mut self,
2581            decoder: &mut fidl::encoding::Decoder<
2582                '_,
2583                fidl::encoding::DefaultFuchsiaResourceDialect,
2584            >,
2585            offset: usize,
2586            _depth: fidl::encoding::Depth,
2587        ) -> fidl::Result<()> {
2588            decoder.debug_check_bounds::<Self>(offset);
2589            // Verify that padding bytes are zero.
2590            fidl::decode!(
2591                fidl::encoding::Array<
2592                    fidl::encoding::Optional<
2593                        fidl::encoding::HandleType<
2594                            fidl::NullableHandle,
2595                            { fidl::ObjectType::NONE.into_raw() },
2596                            2147483648,
2597                        >,
2598                    >,
2599                    3,
2600                >,
2601                fidl::encoding::DefaultFuchsiaResourceDialect,
2602                &mut self.a,
2603                decoder,
2604                offset + 0,
2605                _depth
2606            )?;
2607            Ok(())
2608        }
2609    }
2610
2611    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2612        type Borrowed<'a> = &'a mut Self;
2613        fn take_or_borrow<'a>(
2614            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2615        ) -> Self::Borrowed<'a> {
2616            value
2617        }
2618    }
2619
2620    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2621        type Owned = Self;
2622
2623        #[inline(always)]
2624        fn inline_align(_context: fidl::encoding::Context) -> usize {
2625            8
2626        }
2627
2628        #[inline(always)]
2629        fn inline_size(_context: fidl::encoding::Context) -> usize {
2630            16
2631        }
2632    }
2633
2634    unsafe impl
2635        fidl::encoding::Encode<
2636            ArrayOfVectorOfEventInStructWithDefaultRights,
2637            fidl::encoding::DefaultFuchsiaResourceDialect,
2638        > for &mut ArrayOfVectorOfEventInStructWithDefaultRights
2639    {
2640        #[inline]
2641        unsafe fn encode(
2642            self,
2643            encoder: &mut fidl::encoding::Encoder<
2644                '_,
2645                fidl::encoding::DefaultFuchsiaResourceDialect,
2646            >,
2647            offset: usize,
2648            _depth: fidl::encoding::Depth,
2649        ) -> fidl::Result<()> {
2650            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2651            // Delegate to tuple encoding.
2652            fidl::encoding::Encode::<
2653                ArrayOfVectorOfEventInStructWithDefaultRights,
2654                fidl::encoding::DefaultFuchsiaResourceDialect,
2655            >::encode(
2656                (<fidl::encoding::Array<
2657                    fidl::encoding::Vector<
2658                        fidl::encoding::HandleType<
2659                            fidl::Event,
2660                            { fidl::ObjectType::EVENT.into_raw() },
2661                            53251,
2662                        >,
2663                        1,
2664                    >,
2665                    1,
2666                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2667                    &mut self.h
2668                ),),
2669                encoder,
2670                offset,
2671                _depth,
2672            )
2673        }
2674    }
2675    unsafe impl<
2676        T0: fidl::encoding::Encode<
2677                fidl::encoding::Array<
2678                    fidl::encoding::Vector<
2679                        fidl::encoding::HandleType<
2680                            fidl::Event,
2681                            { fidl::ObjectType::EVENT.into_raw() },
2682                            53251,
2683                        >,
2684                        1,
2685                    >,
2686                    1,
2687                >,
2688                fidl::encoding::DefaultFuchsiaResourceDialect,
2689            >,
2690    >
2691        fidl::encoding::Encode<
2692            ArrayOfVectorOfEventInStructWithDefaultRights,
2693            fidl::encoding::DefaultFuchsiaResourceDialect,
2694        > for (T0,)
2695    {
2696        #[inline]
2697        unsafe fn encode(
2698            self,
2699            encoder: &mut fidl::encoding::Encoder<
2700                '_,
2701                fidl::encoding::DefaultFuchsiaResourceDialect,
2702            >,
2703            offset: usize,
2704            depth: fidl::encoding::Depth,
2705        ) -> fidl::Result<()> {
2706            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2707            // Zero out padding regions. There's no need to apply masks
2708            // because the unmasked parts will be overwritten by fields.
2709            // Write the fields.
2710            self.0.encode(encoder, offset + 0, depth)?;
2711            Ok(())
2712        }
2713    }
2714
2715    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2716        for ArrayOfVectorOfEventInStructWithDefaultRights
2717    {
2718        #[inline(always)]
2719        fn new_empty() -> Self {
2720            Self {
2721                h: fidl::new_empty!(
2722                    fidl::encoding::Array<
2723                        fidl::encoding::Vector<
2724                            fidl::encoding::HandleType<
2725                                fidl::Event,
2726                                { fidl::ObjectType::EVENT.into_raw() },
2727                                53251,
2728                            >,
2729                            1,
2730                        >,
2731                        1,
2732                    >,
2733                    fidl::encoding::DefaultFuchsiaResourceDialect
2734                ),
2735            }
2736        }
2737
2738        #[inline]
2739        unsafe fn decode(
2740            &mut self,
2741            decoder: &mut fidl::encoding::Decoder<
2742                '_,
2743                fidl::encoding::DefaultFuchsiaResourceDialect,
2744            >,
2745            offset: usize,
2746            _depth: fidl::encoding::Depth,
2747        ) -> fidl::Result<()> {
2748            decoder.debug_check_bounds::<Self>(offset);
2749            // Verify that padding bytes are zero.
2750            fidl::decode!(
2751                fidl::encoding::Array<
2752                    fidl::encoding::Vector<
2753                        fidl::encoding::HandleType<
2754                            fidl::Event,
2755                            { fidl::ObjectType::EVENT.into_raw() },
2756                            53251,
2757                        >,
2758                        1,
2759                    >,
2760                    1,
2761                >,
2762                fidl::encoding::DefaultFuchsiaResourceDialect,
2763                &mut self.h,
2764                decoder,
2765                offset + 0,
2766                _depth
2767            )?;
2768            Ok(())
2769        }
2770    }
2771
2772    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2773        type Borrowed<'a> = &'a mut Self;
2774        fn take_or_borrow<'a>(
2775            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2776        ) -> Self::Borrowed<'a> {
2777            value
2778        }
2779    }
2780
2781    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2782        type Owned = Self;
2783
2784        #[inline(always)]
2785        fn inline_align(_context: fidl::encoding::Context) -> usize {
2786            8
2787        }
2788
2789        #[inline(always)]
2790        fn inline_size(_context: fidl::encoding::Context) -> usize {
2791            16
2792        }
2793    }
2794
2795    unsafe impl
2796        fidl::encoding::Encode<
2797            ArrayOfVectorOfEventInStructWithReducedRights,
2798            fidl::encoding::DefaultFuchsiaResourceDialect,
2799        > for &mut ArrayOfVectorOfEventInStructWithReducedRights
2800    {
2801        #[inline]
2802        unsafe fn encode(
2803            self,
2804            encoder: &mut fidl::encoding::Encoder<
2805                '_,
2806                fidl::encoding::DefaultFuchsiaResourceDialect,
2807            >,
2808            offset: usize,
2809            _depth: fidl::encoding::Depth,
2810        ) -> fidl::Result<()> {
2811            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2812            // Delegate to tuple encoding.
2813            fidl::encoding::Encode::<
2814                ArrayOfVectorOfEventInStructWithReducedRights,
2815                fidl::encoding::DefaultFuchsiaResourceDialect,
2816            >::encode(
2817                (<fidl::encoding::Array<
2818                    fidl::encoding::Vector<
2819                        fidl::encoding::HandleType<
2820                            fidl::Event,
2821                            { fidl::ObjectType::EVENT.into_raw() },
2822                            49155,
2823                        >,
2824                        1,
2825                    >,
2826                    1,
2827                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2828                    &mut self.h
2829                ),),
2830                encoder,
2831                offset,
2832                _depth,
2833            )
2834        }
2835    }
2836    unsafe impl<
2837        T0: fidl::encoding::Encode<
2838                fidl::encoding::Array<
2839                    fidl::encoding::Vector<
2840                        fidl::encoding::HandleType<
2841                            fidl::Event,
2842                            { fidl::ObjectType::EVENT.into_raw() },
2843                            49155,
2844                        >,
2845                        1,
2846                    >,
2847                    1,
2848                >,
2849                fidl::encoding::DefaultFuchsiaResourceDialect,
2850            >,
2851    >
2852        fidl::encoding::Encode<
2853            ArrayOfVectorOfEventInStructWithReducedRights,
2854            fidl::encoding::DefaultFuchsiaResourceDialect,
2855        > for (T0,)
2856    {
2857        #[inline]
2858        unsafe fn encode(
2859            self,
2860            encoder: &mut fidl::encoding::Encoder<
2861                '_,
2862                fidl::encoding::DefaultFuchsiaResourceDialect,
2863            >,
2864            offset: usize,
2865            depth: fidl::encoding::Depth,
2866        ) -> fidl::Result<()> {
2867            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2868            // Zero out padding regions. There's no need to apply masks
2869            // because the unmasked parts will be overwritten by fields.
2870            // Write the fields.
2871            self.0.encode(encoder, offset + 0, depth)?;
2872            Ok(())
2873        }
2874    }
2875
2876    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2877        for ArrayOfVectorOfEventInStructWithReducedRights
2878    {
2879        #[inline(always)]
2880        fn new_empty() -> Self {
2881            Self {
2882                h: fidl::new_empty!(
2883                    fidl::encoding::Array<
2884                        fidl::encoding::Vector<
2885                            fidl::encoding::HandleType<
2886                                fidl::Event,
2887                                { fidl::ObjectType::EVENT.into_raw() },
2888                                49155,
2889                            >,
2890                            1,
2891                        >,
2892                        1,
2893                    >,
2894                    fidl::encoding::DefaultFuchsiaResourceDialect
2895                ),
2896            }
2897        }
2898
2899        #[inline]
2900        unsafe fn decode(
2901            &mut self,
2902            decoder: &mut fidl::encoding::Decoder<
2903                '_,
2904                fidl::encoding::DefaultFuchsiaResourceDialect,
2905            >,
2906            offset: usize,
2907            _depth: fidl::encoding::Depth,
2908        ) -> fidl::Result<()> {
2909            decoder.debug_check_bounds::<Self>(offset);
2910            // Verify that padding bytes are zero.
2911            fidl::decode!(
2912                fidl::encoding::Array<
2913                    fidl::encoding::Vector<
2914                        fidl::encoding::HandleType<
2915                            fidl::Event,
2916                            { fidl::ObjectType::EVENT.into_raw() },
2917                            49155,
2918                        >,
2919                        1,
2920                    >,
2921                    1,
2922                >,
2923                fidl::encoding::DefaultFuchsiaResourceDialect,
2924                &mut self.h,
2925                decoder,
2926                offset + 0,
2927                _depth
2928            )?;
2929            Ok(())
2930        }
2931    }
2932
2933    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2934        type Borrowed<'a> = &'a mut Self;
2935        fn take_or_borrow<'a>(
2936            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2937        ) -> Self::Borrowed<'a> {
2938            value
2939        }
2940    }
2941
2942    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2943        type Owned = Self;
2944
2945        #[inline(always)]
2946        fn inline_align(_context: fidl::encoding::Context) -> usize {
2947            8
2948        }
2949
2950        #[inline(always)]
2951        fn inline_size(_context: fidl::encoding::Context) -> usize {
2952            16
2953        }
2954    }
2955
2956    unsafe impl
2957        fidl::encoding::Encode<
2958            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2959            fidl::encoding::DefaultFuchsiaResourceDialect,
2960        > for &mut ArrayOfVectorOfEventInTableWithDefaultRightsStruct
2961    {
2962        #[inline]
2963        unsafe fn encode(
2964            self,
2965            encoder: &mut fidl::encoding::Encoder<
2966                '_,
2967                fidl::encoding::DefaultFuchsiaResourceDialect,
2968            >,
2969            offset: usize,
2970            _depth: fidl::encoding::Depth,
2971        ) -> fidl::Result<()> {
2972            encoder
2973                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
2974            // Delegate to tuple encoding.
2975            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2976                (
2977                    <ArrayOfVectorOfEventInTableWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
2978                ),
2979                encoder, offset, _depth
2980            )
2981        }
2982    }
2983    unsafe impl<
2984        T0: fidl::encoding::Encode<
2985                ArrayOfVectorOfEventInTableWithDefaultRights,
2986                fidl::encoding::DefaultFuchsiaResourceDialect,
2987            >,
2988    >
2989        fidl::encoding::Encode<
2990            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2991            fidl::encoding::DefaultFuchsiaResourceDialect,
2992        > for (T0,)
2993    {
2994        #[inline]
2995        unsafe fn encode(
2996            self,
2997            encoder: &mut fidl::encoding::Encoder<
2998                '_,
2999                fidl::encoding::DefaultFuchsiaResourceDialect,
3000            >,
3001            offset: usize,
3002            depth: fidl::encoding::Depth,
3003        ) -> fidl::Result<()> {
3004            encoder
3005                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3006            // Zero out padding regions. There's no need to apply masks
3007            // because the unmasked parts will be overwritten by fields.
3008            // Write the fields.
3009            self.0.encode(encoder, offset + 0, depth)?;
3010            Ok(())
3011        }
3012    }
3013
3014    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3015        for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3016    {
3017        #[inline(always)]
3018        fn new_empty() -> Self {
3019            Self {
3020                t: fidl::new_empty!(
3021                    ArrayOfVectorOfEventInTableWithDefaultRights,
3022                    fidl::encoding::DefaultFuchsiaResourceDialect
3023                ),
3024            }
3025        }
3026
3027        #[inline]
3028        unsafe fn decode(
3029            &mut self,
3030            decoder: &mut fidl::encoding::Decoder<
3031                '_,
3032                fidl::encoding::DefaultFuchsiaResourceDialect,
3033            >,
3034            offset: usize,
3035            _depth: fidl::encoding::Depth,
3036        ) -> fidl::Result<()> {
3037            decoder.debug_check_bounds::<Self>(offset);
3038            // Verify that padding bytes are zero.
3039            fidl::decode!(
3040                ArrayOfVectorOfEventInTableWithDefaultRights,
3041                fidl::encoding::DefaultFuchsiaResourceDialect,
3042                &mut self.t,
3043                decoder,
3044                offset + 0,
3045                _depth
3046            )?;
3047            Ok(())
3048        }
3049    }
3050
3051    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3052        type Borrowed<'a> = &'a mut Self;
3053        fn take_or_borrow<'a>(
3054            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3055        ) -> Self::Borrowed<'a> {
3056            value
3057        }
3058    }
3059
3060    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3061        type Owned = Self;
3062
3063        #[inline(always)]
3064        fn inline_align(_context: fidl::encoding::Context) -> usize {
3065            8
3066        }
3067
3068        #[inline(always)]
3069        fn inline_size(_context: fidl::encoding::Context) -> usize {
3070            16
3071        }
3072    }
3073
3074    unsafe impl
3075        fidl::encoding::Encode<
3076            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3077            fidl::encoding::DefaultFuchsiaResourceDialect,
3078        > for &mut ArrayOfVectorOfEventInTableWithReducedRightsStruct
3079    {
3080        #[inline]
3081        unsafe fn encode(
3082            self,
3083            encoder: &mut fidl::encoding::Encoder<
3084                '_,
3085                fidl::encoding::DefaultFuchsiaResourceDialect,
3086            >,
3087            offset: usize,
3088            _depth: fidl::encoding::Depth,
3089        ) -> fidl::Result<()> {
3090            encoder
3091                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3092            // Delegate to tuple encoding.
3093            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3094                (
3095                    <ArrayOfVectorOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3096                ),
3097                encoder, offset, _depth
3098            )
3099        }
3100    }
3101    unsafe impl<
3102        T0: fidl::encoding::Encode<
3103                ArrayOfVectorOfEventInTableWithReducedRights,
3104                fidl::encoding::DefaultFuchsiaResourceDialect,
3105            >,
3106    >
3107        fidl::encoding::Encode<
3108            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3109            fidl::encoding::DefaultFuchsiaResourceDialect,
3110        > for (T0,)
3111    {
3112        #[inline]
3113        unsafe fn encode(
3114            self,
3115            encoder: &mut fidl::encoding::Encoder<
3116                '_,
3117                fidl::encoding::DefaultFuchsiaResourceDialect,
3118            >,
3119            offset: usize,
3120            depth: fidl::encoding::Depth,
3121        ) -> fidl::Result<()> {
3122            encoder
3123                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3124            // Zero out padding regions. There's no need to apply masks
3125            // because the unmasked parts will be overwritten by fields.
3126            // Write the fields.
3127            self.0.encode(encoder, offset + 0, depth)?;
3128            Ok(())
3129        }
3130    }
3131
3132    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3133        for ArrayOfVectorOfEventInTableWithReducedRightsStruct
3134    {
3135        #[inline(always)]
3136        fn new_empty() -> Self {
3137            Self {
3138                t: fidl::new_empty!(
3139                    ArrayOfVectorOfEventInTableWithReducedRights,
3140                    fidl::encoding::DefaultFuchsiaResourceDialect
3141                ),
3142            }
3143        }
3144
3145        #[inline]
3146        unsafe fn decode(
3147            &mut self,
3148            decoder: &mut fidl::encoding::Decoder<
3149                '_,
3150                fidl::encoding::DefaultFuchsiaResourceDialect,
3151            >,
3152            offset: usize,
3153            _depth: fidl::encoding::Depth,
3154        ) -> fidl::Result<()> {
3155            decoder.debug_check_bounds::<Self>(offset);
3156            // Verify that padding bytes are zero.
3157            fidl::decode!(
3158                ArrayOfVectorOfEventInTableWithReducedRights,
3159                fidl::encoding::DefaultFuchsiaResourceDialect,
3160                &mut self.t,
3161                decoder,
3162                offset + 0,
3163                _depth
3164            )?;
3165            Ok(())
3166        }
3167    }
3168
3169    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3170        type Borrowed<'a> = &'a mut Self;
3171        fn take_or_borrow<'a>(
3172            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3173        ) -> Self::Borrowed<'a> {
3174            value
3175        }
3176    }
3177
3178    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3179        type Owned = Self;
3180
3181        #[inline(always)]
3182        fn inline_align(_context: fidl::encoding::Context) -> usize {
3183            8
3184        }
3185
3186        #[inline(always)]
3187        fn inline_size(_context: fidl::encoding::Context) -> usize {
3188            16
3189        }
3190    }
3191
3192    unsafe impl
3193        fidl::encoding::Encode<
3194            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3195            fidl::encoding::DefaultFuchsiaResourceDialect,
3196        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3197    {
3198        #[inline]
3199        unsafe fn encode(
3200            self,
3201            encoder: &mut fidl::encoding::Encoder<
3202                '_,
3203                fidl::encoding::DefaultFuchsiaResourceDialect,
3204            >,
3205            offset: usize,
3206            _depth: fidl::encoding::Depth,
3207        ) -> fidl::Result<()> {
3208            encoder
3209                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3210            // Delegate to tuple encoding.
3211            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3212                (
3213                    <ArrayOfVectorOfEventInUnionWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3214                ),
3215                encoder, offset, _depth
3216            )
3217        }
3218    }
3219    unsafe impl<
3220        T0: fidl::encoding::Encode<
3221                ArrayOfVectorOfEventInUnionWithDefaultRights,
3222                fidl::encoding::DefaultFuchsiaResourceDialect,
3223            >,
3224    >
3225        fidl::encoding::Encode<
3226            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3227            fidl::encoding::DefaultFuchsiaResourceDialect,
3228        > for (T0,)
3229    {
3230        #[inline]
3231        unsafe fn encode(
3232            self,
3233            encoder: &mut fidl::encoding::Encoder<
3234                '_,
3235                fidl::encoding::DefaultFuchsiaResourceDialect,
3236            >,
3237            offset: usize,
3238            depth: fidl::encoding::Depth,
3239        ) -> fidl::Result<()> {
3240            encoder
3241                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3242            // Zero out padding regions. There's no need to apply masks
3243            // because the unmasked parts will be overwritten by fields.
3244            // Write the fields.
3245            self.0.encode(encoder, offset + 0, depth)?;
3246            Ok(())
3247        }
3248    }
3249
3250    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3251        for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3252    {
3253        #[inline(always)]
3254        fn new_empty() -> Self {
3255            Self {
3256                u: fidl::new_empty!(
3257                    ArrayOfVectorOfEventInUnionWithDefaultRights,
3258                    fidl::encoding::DefaultFuchsiaResourceDialect
3259                ),
3260            }
3261        }
3262
3263        #[inline]
3264        unsafe fn decode(
3265            &mut self,
3266            decoder: &mut fidl::encoding::Decoder<
3267                '_,
3268                fidl::encoding::DefaultFuchsiaResourceDialect,
3269            >,
3270            offset: usize,
3271            _depth: fidl::encoding::Depth,
3272        ) -> fidl::Result<()> {
3273            decoder.debug_check_bounds::<Self>(offset);
3274            // Verify that padding bytes are zero.
3275            fidl::decode!(
3276                ArrayOfVectorOfEventInUnionWithDefaultRights,
3277                fidl::encoding::DefaultFuchsiaResourceDialect,
3278                &mut self.u,
3279                decoder,
3280                offset + 0,
3281                _depth
3282            )?;
3283            Ok(())
3284        }
3285    }
3286
3287    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3288        type Borrowed<'a> = &'a mut Self;
3289        fn take_or_borrow<'a>(
3290            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3291        ) -> Self::Borrowed<'a> {
3292            value
3293        }
3294    }
3295
3296    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3297        type Owned = Self;
3298
3299        #[inline(always)]
3300        fn inline_align(_context: fidl::encoding::Context) -> usize {
3301            8
3302        }
3303
3304        #[inline(always)]
3305        fn inline_size(_context: fidl::encoding::Context) -> usize {
3306            16
3307        }
3308    }
3309
3310    unsafe impl
3311        fidl::encoding::Encode<
3312            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3313            fidl::encoding::DefaultFuchsiaResourceDialect,
3314        > for &mut ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3315    {
3316        #[inline]
3317        unsafe fn encode(
3318            self,
3319            encoder: &mut fidl::encoding::Encoder<
3320                '_,
3321                fidl::encoding::DefaultFuchsiaResourceDialect,
3322            >,
3323            offset: usize,
3324            _depth: fidl::encoding::Depth,
3325        ) -> fidl::Result<()> {
3326            encoder
3327                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3328            // Delegate to tuple encoding.
3329            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3330                (
3331                    <ArrayOfVectorOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3332                ),
3333                encoder, offset, _depth
3334            )
3335        }
3336    }
3337    unsafe impl<
3338        T0: fidl::encoding::Encode<
3339                ArrayOfVectorOfEventInUnionWithReducedRights,
3340                fidl::encoding::DefaultFuchsiaResourceDialect,
3341            >,
3342    >
3343        fidl::encoding::Encode<
3344            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3345            fidl::encoding::DefaultFuchsiaResourceDialect,
3346        > for (T0,)
3347    {
3348        #[inline]
3349        unsafe fn encode(
3350            self,
3351            encoder: &mut fidl::encoding::Encoder<
3352                '_,
3353                fidl::encoding::DefaultFuchsiaResourceDialect,
3354            >,
3355            offset: usize,
3356            depth: fidl::encoding::Depth,
3357        ) -> fidl::Result<()> {
3358            encoder
3359                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3360            // Zero out padding regions. There's no need to apply masks
3361            // because the unmasked parts will be overwritten by fields.
3362            // Write the fields.
3363            self.0.encode(encoder, offset + 0, depth)?;
3364            Ok(())
3365        }
3366    }
3367
3368    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3369        for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3370    {
3371        #[inline(always)]
3372        fn new_empty() -> Self {
3373            Self {
3374                u: fidl::new_empty!(
3375                    ArrayOfVectorOfEventInUnionWithReducedRights,
3376                    fidl::encoding::DefaultFuchsiaResourceDialect
3377                ),
3378            }
3379        }
3380
3381        #[inline]
3382        unsafe fn decode(
3383            &mut self,
3384            decoder: &mut fidl::encoding::Decoder<
3385                '_,
3386                fidl::encoding::DefaultFuchsiaResourceDialect,
3387            >,
3388            offset: usize,
3389            _depth: fidl::encoding::Depth,
3390        ) -> fidl::Result<()> {
3391            decoder.debug_check_bounds::<Self>(offset);
3392            // Verify that padding bytes are zero.
3393            fidl::decode!(
3394                ArrayOfVectorOfEventInUnionWithReducedRights,
3395                fidl::encoding::DefaultFuchsiaResourceDialect,
3396                &mut self.u,
3397                decoder,
3398                offset + 0,
3399                _depth
3400            )?;
3401            Ok(())
3402        }
3403    }
3404
3405    impl fidl::encoding::ResourceTypeMarker for Bounded32NonnullableVectorOfHandles {
3406        type Borrowed<'a> = &'a mut Self;
3407        fn take_or_borrow<'a>(
3408            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3409        ) -> Self::Borrowed<'a> {
3410            value
3411        }
3412    }
3413
3414    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfHandles {
3415        type Owned = Self;
3416
3417        #[inline(always)]
3418        fn inline_align(_context: fidl::encoding::Context) -> usize {
3419            8
3420        }
3421
3422        #[inline(always)]
3423        fn inline_size(_context: fidl::encoding::Context) -> usize {
3424            16
3425        }
3426    }
3427
3428    unsafe impl
3429        fidl::encoding::Encode<
3430            Bounded32NonnullableVectorOfHandles,
3431            fidl::encoding::DefaultFuchsiaResourceDialect,
3432        > for &mut Bounded32NonnullableVectorOfHandles
3433    {
3434        #[inline]
3435        unsafe fn encode(
3436            self,
3437            encoder: &mut fidl::encoding::Encoder<
3438                '_,
3439                fidl::encoding::DefaultFuchsiaResourceDialect,
3440            >,
3441            offset: usize,
3442            _depth: fidl::encoding::Depth,
3443        ) -> fidl::Result<()> {
3444            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3445            // Delegate to tuple encoding.
3446            fidl::encoding::Encode::<
3447                Bounded32NonnullableVectorOfHandles,
3448                fidl::encoding::DefaultFuchsiaResourceDialect,
3449            >::encode(
3450                (<fidl::encoding::Vector<
3451                    fidl::encoding::HandleType<
3452                        fidl::NullableHandle,
3453                        { fidl::ObjectType::NONE.into_raw() },
3454                        2147483648,
3455                    >,
3456                    32,
3457                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3458                    &mut self.vh0
3459                ),),
3460                encoder,
3461                offset,
3462                _depth,
3463            )
3464        }
3465    }
3466    unsafe impl<
3467        T0: fidl::encoding::Encode<
3468                fidl::encoding::Vector<
3469                    fidl::encoding::HandleType<
3470                        fidl::NullableHandle,
3471                        { fidl::ObjectType::NONE.into_raw() },
3472                        2147483648,
3473                    >,
3474                    32,
3475                >,
3476                fidl::encoding::DefaultFuchsiaResourceDialect,
3477            >,
3478    >
3479        fidl::encoding::Encode<
3480            Bounded32NonnullableVectorOfHandles,
3481            fidl::encoding::DefaultFuchsiaResourceDialect,
3482        > for (T0,)
3483    {
3484        #[inline]
3485        unsafe fn encode(
3486            self,
3487            encoder: &mut fidl::encoding::Encoder<
3488                '_,
3489                fidl::encoding::DefaultFuchsiaResourceDialect,
3490            >,
3491            offset: usize,
3492            depth: fidl::encoding::Depth,
3493        ) -> fidl::Result<()> {
3494            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3495            // Zero out padding regions. There's no need to apply masks
3496            // because the unmasked parts will be overwritten by fields.
3497            // Write the fields.
3498            self.0.encode(encoder, offset + 0, depth)?;
3499            Ok(())
3500        }
3501    }
3502
3503    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3504        for Bounded32NonnullableVectorOfHandles
3505    {
3506        #[inline(always)]
3507        fn new_empty() -> Self {
3508            Self {
3509                vh0: fidl::new_empty!(
3510                    fidl::encoding::Vector<
3511                        fidl::encoding::HandleType<
3512                            fidl::NullableHandle,
3513                            { fidl::ObjectType::NONE.into_raw() },
3514                            2147483648,
3515                        >,
3516                        32,
3517                    >,
3518                    fidl::encoding::DefaultFuchsiaResourceDialect
3519                ),
3520            }
3521        }
3522
3523        #[inline]
3524        unsafe fn decode(
3525            &mut self,
3526            decoder: &mut fidl::encoding::Decoder<
3527                '_,
3528                fidl::encoding::DefaultFuchsiaResourceDialect,
3529            >,
3530            offset: usize,
3531            _depth: fidl::encoding::Depth,
3532        ) -> fidl::Result<()> {
3533            decoder.debug_check_bounds::<Self>(offset);
3534            // Verify that padding bytes are zero.
3535            fidl::decode!(
3536                fidl::encoding::Vector<
3537                    fidl::encoding::HandleType<
3538                        fidl::NullableHandle,
3539                        { fidl::ObjectType::NONE.into_raw() },
3540                        2147483648,
3541                    >,
3542                    32,
3543                >,
3544                fidl::encoding::DefaultFuchsiaResourceDialect,
3545                &mut self.vh0,
3546                decoder,
3547                offset + 0,
3548                _depth
3549            )?;
3550            Ok(())
3551        }
3552    }
3553
3554    impl fidl::encoding::ResourceTypeMarker for Bounded32NullableVectorOfHandles {
3555        type Borrowed<'a> = &'a mut Self;
3556        fn take_or_borrow<'a>(
3557            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3558        ) -> Self::Borrowed<'a> {
3559            value
3560        }
3561    }
3562
3563    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfHandles {
3564        type Owned = Self;
3565
3566        #[inline(always)]
3567        fn inline_align(_context: fidl::encoding::Context) -> usize {
3568            8
3569        }
3570
3571        #[inline(always)]
3572        fn inline_size(_context: fidl::encoding::Context) -> usize {
3573            16
3574        }
3575    }
3576
3577    unsafe impl
3578        fidl::encoding::Encode<
3579            Bounded32NullableVectorOfHandles,
3580            fidl::encoding::DefaultFuchsiaResourceDialect,
3581        > for &mut Bounded32NullableVectorOfHandles
3582    {
3583        #[inline]
3584        unsafe fn encode(
3585            self,
3586            encoder: &mut fidl::encoding::Encoder<
3587                '_,
3588                fidl::encoding::DefaultFuchsiaResourceDialect,
3589            >,
3590            offset: usize,
3591            _depth: fidl::encoding::Depth,
3592        ) -> fidl::Result<()> {
3593            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3594            // Delegate to tuple encoding.
3595            fidl::encoding::Encode::<
3596                Bounded32NullableVectorOfHandles,
3597                fidl::encoding::DefaultFuchsiaResourceDialect,
3598            >::encode(
3599                (<fidl::encoding::Optional<
3600                    fidl::encoding::Vector<
3601                        fidl::encoding::HandleType<
3602                            fidl::NullableHandle,
3603                            { fidl::ObjectType::NONE.into_raw() },
3604                            2147483648,
3605                        >,
3606                        32,
3607                    >,
3608                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3609                    &mut self.vh0
3610                ),),
3611                encoder,
3612                offset,
3613                _depth,
3614            )
3615        }
3616    }
3617    unsafe impl<
3618        T0: fidl::encoding::Encode<
3619                fidl::encoding::Optional<
3620                    fidl::encoding::Vector<
3621                        fidl::encoding::HandleType<
3622                            fidl::NullableHandle,
3623                            { fidl::ObjectType::NONE.into_raw() },
3624                            2147483648,
3625                        >,
3626                        32,
3627                    >,
3628                >,
3629                fidl::encoding::DefaultFuchsiaResourceDialect,
3630            >,
3631    >
3632        fidl::encoding::Encode<
3633            Bounded32NullableVectorOfHandles,
3634            fidl::encoding::DefaultFuchsiaResourceDialect,
3635        > for (T0,)
3636    {
3637        #[inline]
3638        unsafe fn encode(
3639            self,
3640            encoder: &mut fidl::encoding::Encoder<
3641                '_,
3642                fidl::encoding::DefaultFuchsiaResourceDialect,
3643            >,
3644            offset: usize,
3645            depth: fidl::encoding::Depth,
3646        ) -> fidl::Result<()> {
3647            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3648            // Zero out padding regions. There's no need to apply masks
3649            // because the unmasked parts will be overwritten by fields.
3650            // Write the fields.
3651            self.0.encode(encoder, offset + 0, depth)?;
3652            Ok(())
3653        }
3654    }
3655
3656    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3657        for Bounded32NullableVectorOfHandles
3658    {
3659        #[inline(always)]
3660        fn new_empty() -> Self {
3661            Self {
3662                vh0: fidl::new_empty!(
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        }
3677
3678        #[inline]
3679        unsafe fn decode(
3680            &mut self,
3681            decoder: &mut fidl::encoding::Decoder<
3682                '_,
3683                fidl::encoding::DefaultFuchsiaResourceDialect,
3684            >,
3685            offset: usize,
3686            _depth: fidl::encoding::Depth,
3687        ) -> fidl::Result<()> {
3688            decoder.debug_check_bounds::<Self>(offset);
3689            // Verify that padding bytes are zero.
3690            fidl::decode!(
3691                fidl::encoding::Optional<
3692                    fidl::encoding::Vector<
3693                        fidl::encoding::HandleType<
3694                            fidl::NullableHandle,
3695                            { fidl::ObjectType::NONE.into_raw() },
3696                            2147483648,
3697                        >,
3698                        32,
3699                    >,
3700                >,
3701                fidl::encoding::DefaultFuchsiaResourceDialect,
3702                &mut self.vh0,
3703                decoder,
3704                offset + 0,
3705                _depth
3706            )?;
3707            Ok(())
3708        }
3709    }
3710
3711    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleHandle {
3712        type Borrowed<'a> = &'a mut Self;
3713        fn take_or_borrow<'a>(
3714            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3715        ) -> Self::Borrowed<'a> {
3716            value
3717        }
3718    }
3719
3720    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleHandle {
3721        type Owned = Self;
3722
3723        #[inline(always)]
3724        fn inline_align(_context: fidl::encoding::Context) -> usize {
3725            8
3726        }
3727
3728        #[inline(always)]
3729        fn inline_size(_context: fidl::encoding::Context) -> usize {
3730            8
3731        }
3732    }
3733
3734    unsafe impl
3735        fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3736        for &mut BoxOfSingleHandle
3737    {
3738        #[inline]
3739        unsafe fn encode(
3740            self,
3741            encoder: &mut fidl::encoding::Encoder<
3742                '_,
3743                fidl::encoding::DefaultFuchsiaResourceDialect,
3744            >,
3745            offset: usize,
3746            _depth: fidl::encoding::Depth,
3747        ) -> fidl::Result<()> {
3748            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3749            // Delegate to tuple encoding.
3750            fidl::encoding::Encode::<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3751                (
3752                    <fidl::encoding::Boxed<SingleHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3753                ),
3754                encoder, offset, _depth
3755            )
3756        }
3757    }
3758    unsafe impl<
3759        T0: fidl::encoding::Encode<
3760                fidl::encoding::Boxed<SingleHandle>,
3761                fidl::encoding::DefaultFuchsiaResourceDialect,
3762            >,
3763    > fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3764        for (T0,)
3765    {
3766        #[inline]
3767        unsafe fn encode(
3768            self,
3769            encoder: &mut fidl::encoding::Encoder<
3770                '_,
3771                fidl::encoding::DefaultFuchsiaResourceDialect,
3772            >,
3773            offset: usize,
3774            depth: fidl::encoding::Depth,
3775        ) -> fidl::Result<()> {
3776            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3777            // Zero out padding regions. There's no need to apply masks
3778            // because the unmasked parts will be overwritten by fields.
3779            // Write the fields.
3780            self.0.encode(encoder, offset + 0, depth)?;
3781            Ok(())
3782        }
3783    }
3784
3785    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3786        for BoxOfSingleHandle
3787    {
3788        #[inline(always)]
3789        fn new_empty() -> Self {
3790            Self {
3791                b: fidl::new_empty!(
3792                    fidl::encoding::Boxed<SingleHandle>,
3793                    fidl::encoding::DefaultFuchsiaResourceDialect
3794                ),
3795            }
3796        }
3797
3798        #[inline]
3799        unsafe fn decode(
3800            &mut self,
3801            decoder: &mut fidl::encoding::Decoder<
3802                '_,
3803                fidl::encoding::DefaultFuchsiaResourceDialect,
3804            >,
3805            offset: usize,
3806            _depth: fidl::encoding::Depth,
3807        ) -> fidl::Result<()> {
3808            decoder.debug_check_bounds::<Self>(offset);
3809            // Verify that padding bytes are zero.
3810            fidl::decode!(
3811                fidl::encoding::Boxed<SingleHandle>,
3812                fidl::encoding::DefaultFuchsiaResourceDialect,
3813                &mut self.b,
3814                decoder,
3815                offset + 0,
3816                _depth
3817            )?;
3818            Ok(())
3819        }
3820    }
3821
3822    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3823        type Borrowed<'a> = &'a mut Self;
3824        fn take_or_borrow<'a>(
3825            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3826        ) -> Self::Borrowed<'a> {
3827            value
3828        }
3829    }
3830
3831    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3832        type Owned = Self;
3833
3834        #[inline(always)]
3835        fn inline_align(_context: fidl::encoding::Context) -> usize {
3836            8
3837        }
3838
3839        #[inline(always)]
3840        fn inline_size(_context: fidl::encoding::Context) -> usize {
3841            8
3842        }
3843    }
3844
3845    unsafe impl
3846        fidl::encoding::Encode<
3847            BoxOfSingleOptionalHandle,
3848            fidl::encoding::DefaultFuchsiaResourceDialect,
3849        > for &mut BoxOfSingleOptionalHandle
3850    {
3851        #[inline]
3852        unsafe fn encode(
3853            self,
3854            encoder: &mut fidl::encoding::Encoder<
3855                '_,
3856                fidl::encoding::DefaultFuchsiaResourceDialect,
3857            >,
3858            offset: usize,
3859            _depth: fidl::encoding::Depth,
3860        ) -> fidl::Result<()> {
3861            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3862            // Delegate to tuple encoding.
3863            fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3864                (
3865                    <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3866                ),
3867                encoder, offset, _depth
3868            )
3869        }
3870    }
3871    unsafe impl<
3872        T0: fidl::encoding::Encode<
3873                fidl::encoding::Boxed<SingleOptionalHandle>,
3874                fidl::encoding::DefaultFuchsiaResourceDialect,
3875            >,
3876    >
3877        fidl::encoding::Encode<
3878            BoxOfSingleOptionalHandle,
3879            fidl::encoding::DefaultFuchsiaResourceDialect,
3880        > for (T0,)
3881    {
3882        #[inline]
3883        unsafe fn encode(
3884            self,
3885            encoder: &mut fidl::encoding::Encoder<
3886                '_,
3887                fidl::encoding::DefaultFuchsiaResourceDialect,
3888            >,
3889            offset: usize,
3890            depth: fidl::encoding::Depth,
3891        ) -> fidl::Result<()> {
3892            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3893            // Zero out padding regions. There's no need to apply masks
3894            // because the unmasked parts will be overwritten by fields.
3895            // Write the fields.
3896            self.0.encode(encoder, offset + 0, depth)?;
3897            Ok(())
3898        }
3899    }
3900
3901    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3902        for BoxOfSingleOptionalHandle
3903    {
3904        #[inline(always)]
3905        fn new_empty() -> Self {
3906            Self {
3907                b: fidl::new_empty!(
3908                    fidl::encoding::Boxed<SingleOptionalHandle>,
3909                    fidl::encoding::DefaultFuchsiaResourceDialect
3910                ),
3911            }
3912        }
3913
3914        #[inline]
3915        unsafe fn decode(
3916            &mut self,
3917            decoder: &mut fidl::encoding::Decoder<
3918                '_,
3919                fidl::encoding::DefaultFuchsiaResourceDialect,
3920            >,
3921            offset: usize,
3922            _depth: fidl::encoding::Depth,
3923        ) -> fidl::Result<()> {
3924            decoder.debug_check_bounds::<Self>(offset);
3925            // Verify that padding bytes are zero.
3926            fidl::decode!(
3927                fidl::encoding::Boxed<SingleOptionalHandle>,
3928                fidl::encoding::DefaultFuchsiaResourceDialect,
3929                &mut self.b,
3930                decoder,
3931                offset + 0,
3932                _depth
3933            )?;
3934            Ok(())
3935        }
3936    }
3937
3938    impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3939        type Borrowed<'a> = &'a mut Self;
3940        fn take_or_borrow<'a>(
3941            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3942        ) -> Self::Borrowed<'a> {
3943            value
3944        }
3945    }
3946
3947    unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
3948        type Owned = Self;
3949
3950        #[inline(always)]
3951        fn inline_align(_context: fidl::encoding::Context) -> usize {
3952            8
3953        }
3954
3955        #[inline(always)]
3956        fn inline_size(_context: fidl::encoding::Context) -> usize {
3957            80
3958        }
3959    }
3960
3961    unsafe impl
3962        fidl::encoding::Encode<
3963            CreateComponentRequest,
3964            fidl::encoding::DefaultFuchsiaResourceDialect,
3965        > for &mut CreateComponentRequest
3966    {
3967        #[inline]
3968        unsafe fn encode(
3969            self,
3970            encoder: &mut fidl::encoding::Encoder<
3971                '_,
3972                fidl::encoding::DefaultFuchsiaResourceDialect,
3973            >,
3974            offset: usize,
3975            _depth: fidl::encoding::Depth,
3976        ) -> fidl::Result<()> {
3977            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
3978            // Delegate to tuple encoding.
3979            fidl::encoding::Encode::<
3980                CreateComponentRequest,
3981                fidl::encoding::DefaultFuchsiaResourceDialect,
3982            >::encode(
3983                (
3984                    <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3985                        &mut self.launch_info,
3986                    ),
3987                    <fidl::encoding::Optional<
3988                        fidl::encoding::Endpoint<
3989                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
3990                        >,
3991                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3992                        &mut self.controller
3993                    ),
3994                ),
3995                encoder,
3996                offset,
3997                _depth,
3998            )
3999        }
4000    }
4001    unsafe impl<
4002        T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4003        T1: fidl::encoding::Encode<
4004                fidl::encoding::Optional<
4005                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4006                >,
4007                fidl::encoding::DefaultFuchsiaResourceDialect,
4008            >,
4009    >
4010        fidl::encoding::Encode<
4011            CreateComponentRequest,
4012            fidl::encoding::DefaultFuchsiaResourceDialect,
4013        > for (T0, T1)
4014    {
4015        #[inline]
4016        unsafe fn encode(
4017            self,
4018            encoder: &mut fidl::encoding::Encoder<
4019                '_,
4020                fidl::encoding::DefaultFuchsiaResourceDialect,
4021            >,
4022            offset: usize,
4023            depth: fidl::encoding::Depth,
4024        ) -> fidl::Result<()> {
4025            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4026            // Zero out padding regions. There's no need to apply masks
4027            // because the unmasked parts will be overwritten by fields.
4028            unsafe {
4029                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4030                (ptr as *mut u64).write_unaligned(0);
4031            }
4032            // Write the fields.
4033            self.0.encode(encoder, offset + 0, depth)?;
4034            self.1.encode(encoder, offset + 72, depth)?;
4035            Ok(())
4036        }
4037    }
4038
4039    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4040        for CreateComponentRequest
4041    {
4042        #[inline(always)]
4043        fn new_empty() -> Self {
4044            Self {
4045                launch_info: fidl::new_empty!(
4046                    LaunchInfo,
4047                    fidl::encoding::DefaultFuchsiaResourceDialect
4048                ),
4049                controller: fidl::new_empty!(
4050                    fidl::encoding::Optional<
4051                        fidl::encoding::Endpoint<
4052                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4053                        >,
4054                    >,
4055                    fidl::encoding::DefaultFuchsiaResourceDialect
4056                ),
4057            }
4058        }
4059
4060        #[inline]
4061        unsafe fn decode(
4062            &mut self,
4063            decoder: &mut fidl::encoding::Decoder<
4064                '_,
4065                fidl::encoding::DefaultFuchsiaResourceDialect,
4066            >,
4067            offset: usize,
4068            _depth: fidl::encoding::Depth,
4069        ) -> fidl::Result<()> {
4070            decoder.debug_check_bounds::<Self>(offset);
4071            // Verify that padding bytes are zero.
4072            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4073            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4074            let mask = 0xffffffff00000000u64;
4075            let maskedval = padval & mask;
4076            if maskedval != 0 {
4077                return Err(fidl::Error::NonZeroPadding {
4078                    padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4079                });
4080            }
4081            fidl::decode!(
4082                LaunchInfo,
4083                fidl::encoding::DefaultFuchsiaResourceDialect,
4084                &mut self.launch_info,
4085                decoder,
4086                offset + 0,
4087                _depth
4088            )?;
4089            fidl::decode!(
4090                fidl::encoding::Optional<
4091                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4092                >,
4093                fidl::encoding::DefaultFuchsiaResourceDialect,
4094                &mut self.controller,
4095                decoder,
4096                offset + 72,
4097                _depth
4098            )?;
4099            Ok(())
4100        }
4101    }
4102
4103    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4104        type Borrowed<'a> = &'a mut Self;
4105        fn take_or_borrow<'a>(
4106            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4107        ) -> Self::Borrowed<'a> {
4108            value
4109        }
4110    }
4111
4112    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4113        type Owned = Self;
4114
4115        #[inline(always)]
4116        fn inline_align(_context: fidl::encoding::Context) -> usize {
4117            8
4118        }
4119
4120        #[inline(always)]
4121        fn inline_size(_context: fidl::encoding::Context) -> usize {
4122            16
4123        }
4124    }
4125
4126    unsafe impl
4127        fidl::encoding::Encode<
4128            EmptyResourceTableStruct,
4129            fidl::encoding::DefaultFuchsiaResourceDialect,
4130        > for &mut EmptyResourceTableStruct
4131    {
4132        #[inline]
4133        unsafe fn encode(
4134            self,
4135            encoder: &mut fidl::encoding::Encoder<
4136                '_,
4137                fidl::encoding::DefaultFuchsiaResourceDialect,
4138            >,
4139            offset: usize,
4140            _depth: fidl::encoding::Depth,
4141        ) -> fidl::Result<()> {
4142            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4143            // Delegate to tuple encoding.
4144            fidl::encoding::Encode::<
4145                EmptyResourceTableStruct,
4146                fidl::encoding::DefaultFuchsiaResourceDialect,
4147            >::encode(
4148                (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4149                    &mut self.table,
4150                ),),
4151                encoder,
4152                offset,
4153                _depth,
4154            )
4155        }
4156    }
4157    unsafe impl<
4158        T0: fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4159    >
4160        fidl::encoding::Encode<
4161            EmptyResourceTableStruct,
4162            fidl::encoding::DefaultFuchsiaResourceDialect,
4163        > for (T0,)
4164    {
4165        #[inline]
4166        unsafe fn encode(
4167            self,
4168            encoder: &mut fidl::encoding::Encoder<
4169                '_,
4170                fidl::encoding::DefaultFuchsiaResourceDialect,
4171            >,
4172            offset: usize,
4173            depth: fidl::encoding::Depth,
4174        ) -> fidl::Result<()> {
4175            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4176            // Zero out padding regions. There's no need to apply masks
4177            // because the unmasked parts will be overwritten by fields.
4178            // Write the fields.
4179            self.0.encode(encoder, offset + 0, depth)?;
4180            Ok(())
4181        }
4182    }
4183
4184    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4185        for EmptyResourceTableStruct
4186    {
4187        #[inline(always)]
4188        fn new_empty() -> Self {
4189            Self {
4190                table: fidl::new_empty!(
4191                    EmptyResourceTable,
4192                    fidl::encoding::DefaultFuchsiaResourceDialect
4193                ),
4194            }
4195        }
4196
4197        #[inline]
4198        unsafe fn decode(
4199            &mut self,
4200            decoder: &mut fidl::encoding::Decoder<
4201                '_,
4202                fidl::encoding::DefaultFuchsiaResourceDialect,
4203            >,
4204            offset: usize,
4205            _depth: fidl::encoding::Depth,
4206        ) -> fidl::Result<()> {
4207            decoder.debug_check_bounds::<Self>(offset);
4208            // Verify that padding bytes are zero.
4209            fidl::decode!(
4210                EmptyResourceTable,
4211                fidl::encoding::DefaultFuchsiaResourceDialect,
4212                &mut self.table,
4213                decoder,
4214                offset + 0,
4215                _depth
4216            )?;
4217            Ok(())
4218        }
4219    }
4220
4221    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4222        type Borrowed<'a> = &'a mut Self;
4223        fn take_or_borrow<'a>(
4224            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4225        ) -> Self::Borrowed<'a> {
4226            value
4227        }
4228    }
4229
4230    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4231        type Owned = Self;
4232
4233        #[inline(always)]
4234        fn inline_align(_context: fidl::encoding::Context) -> usize {
4235            8
4236        }
4237
4238        #[inline(always)]
4239        fn inline_size(_context: fidl::encoding::Context) -> usize {
4240            16
4241        }
4242    }
4243
4244    unsafe impl
4245        fidl::encoding::Encode<
4246            EnvelopeInliningTestUnionStruct,
4247            fidl::encoding::DefaultFuchsiaResourceDialect,
4248        > for &mut EnvelopeInliningTestUnionStruct
4249    {
4250        #[inline]
4251        unsafe fn encode(
4252            self,
4253            encoder: &mut fidl::encoding::Encoder<
4254                '_,
4255                fidl::encoding::DefaultFuchsiaResourceDialect,
4256            >,
4257            offset: usize,
4258            _depth: fidl::encoding::Depth,
4259        ) -> fidl::Result<()> {
4260            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4261            // Delegate to tuple encoding.
4262            fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4263                (
4264                    <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4265                ),
4266                encoder, offset, _depth
4267            )
4268        }
4269    }
4270    unsafe impl<
4271        T0: fidl::encoding::Encode<
4272                EnvelopeInliningTestUnion,
4273                fidl::encoding::DefaultFuchsiaResourceDialect,
4274            >,
4275    >
4276        fidl::encoding::Encode<
4277            EnvelopeInliningTestUnionStruct,
4278            fidl::encoding::DefaultFuchsiaResourceDialect,
4279        > for (T0,)
4280    {
4281        #[inline]
4282        unsafe fn encode(
4283            self,
4284            encoder: &mut fidl::encoding::Encoder<
4285                '_,
4286                fidl::encoding::DefaultFuchsiaResourceDialect,
4287            >,
4288            offset: usize,
4289            depth: fidl::encoding::Depth,
4290        ) -> fidl::Result<()> {
4291            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4292            // Zero out padding regions. There's no need to apply masks
4293            // because the unmasked parts will be overwritten by fields.
4294            // Write the fields.
4295            self.0.encode(encoder, offset + 0, depth)?;
4296            Ok(())
4297        }
4298    }
4299
4300    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4301        for EnvelopeInliningTestUnionStruct
4302    {
4303        #[inline(always)]
4304        fn new_empty() -> Self {
4305            Self {
4306                u: fidl::new_empty!(
4307                    EnvelopeInliningTestUnion,
4308                    fidl::encoding::DefaultFuchsiaResourceDialect
4309                ),
4310            }
4311        }
4312
4313        #[inline]
4314        unsafe fn decode(
4315            &mut self,
4316            decoder: &mut fidl::encoding::Decoder<
4317                '_,
4318                fidl::encoding::DefaultFuchsiaResourceDialect,
4319            >,
4320            offset: usize,
4321            _depth: fidl::encoding::Depth,
4322        ) -> fidl::Result<()> {
4323            decoder.debug_check_bounds::<Self>(offset);
4324            // Verify that padding bytes are zero.
4325            fidl::decode!(
4326                EnvelopeInliningTestUnion,
4327                fidl::encoding::DefaultFuchsiaResourceDialect,
4328                &mut self.u,
4329                decoder,
4330                offset + 0,
4331                _depth
4332            )?;
4333            Ok(())
4334        }
4335    }
4336
4337    impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4338        type Borrowed<'a> = &'a mut Self;
4339        fn take_or_borrow<'a>(
4340            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4341        ) -> Self::Borrowed<'a> {
4342            value
4343        }
4344    }
4345
4346    unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4347        type Owned = Self;
4348
4349        #[inline(always)]
4350        fn inline_align(_context: fidl::encoding::Context) -> usize {
4351            4
4352        }
4353
4354        #[inline(always)]
4355        fn inline_size(_context: fidl::encoding::Context) -> usize {
4356            4
4357        }
4358    }
4359
4360    unsafe impl
4361        fidl::encoding::Encode<
4362            EventWithDefaultRights,
4363            fidl::encoding::DefaultFuchsiaResourceDialect,
4364        > for &mut EventWithDefaultRights
4365    {
4366        #[inline]
4367        unsafe fn encode(
4368            self,
4369            encoder: &mut fidl::encoding::Encoder<
4370                '_,
4371                fidl::encoding::DefaultFuchsiaResourceDialect,
4372            >,
4373            offset: usize,
4374            _depth: fidl::encoding::Depth,
4375        ) -> fidl::Result<()> {
4376            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4377            // Delegate to tuple encoding.
4378            fidl::encoding::Encode::<
4379                EventWithDefaultRights,
4380                fidl::encoding::DefaultFuchsiaResourceDialect,
4381            >::encode(
4382                (<fidl::encoding::HandleType<
4383                    fidl::Event,
4384                    { fidl::ObjectType::EVENT.into_raw() },
4385                    53251,
4386                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4387                    &mut self.h
4388                ),),
4389                encoder,
4390                offset,
4391                _depth,
4392            )
4393        }
4394    }
4395    unsafe impl<
4396        T0: fidl::encoding::Encode<
4397                fidl::encoding::HandleType<
4398                    fidl::Event,
4399                    { fidl::ObjectType::EVENT.into_raw() },
4400                    53251,
4401                >,
4402                fidl::encoding::DefaultFuchsiaResourceDialect,
4403            >,
4404    >
4405        fidl::encoding::Encode<
4406            EventWithDefaultRights,
4407            fidl::encoding::DefaultFuchsiaResourceDialect,
4408        > for (T0,)
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            // Zero out padding regions. There's no need to apply masks
4422            // because the unmasked parts will be overwritten by fields.
4423            // Write the fields.
4424            self.0.encode(encoder, offset + 0, depth)?;
4425            Ok(())
4426        }
4427    }
4428
4429    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4430        for EventWithDefaultRights
4431    {
4432        #[inline(always)]
4433        fn new_empty() -> Self {
4434            Self {
4435                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4436            }
4437        }
4438
4439        #[inline]
4440        unsafe fn decode(
4441            &mut self,
4442            decoder: &mut fidl::encoding::Decoder<
4443                '_,
4444                fidl::encoding::DefaultFuchsiaResourceDialect,
4445            >,
4446            offset: usize,
4447            _depth: fidl::encoding::Depth,
4448        ) -> fidl::Result<()> {
4449            decoder.debug_check_bounds::<Self>(offset);
4450            // Verify that padding bytes are zero.
4451            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4452            Ok(())
4453        }
4454    }
4455
4456    impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4457        type Borrowed<'a> = &'a mut Self;
4458        fn take_or_borrow<'a>(
4459            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4460        ) -> Self::Borrowed<'a> {
4461            value
4462        }
4463    }
4464
4465    unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4466        type Owned = Self;
4467
4468        #[inline(always)]
4469        fn inline_align(_context: fidl::encoding::Context) -> usize {
4470            4
4471        }
4472
4473        #[inline(always)]
4474        fn inline_size(_context: fidl::encoding::Context) -> usize {
4475            4
4476        }
4477    }
4478
4479    unsafe impl
4480        fidl::encoding::Encode<
4481            EventWithReducedRights,
4482            fidl::encoding::DefaultFuchsiaResourceDialect,
4483        > for &mut EventWithReducedRights
4484    {
4485        #[inline]
4486        unsafe fn encode(
4487            self,
4488            encoder: &mut fidl::encoding::Encoder<
4489                '_,
4490                fidl::encoding::DefaultFuchsiaResourceDialect,
4491            >,
4492            offset: usize,
4493            _depth: fidl::encoding::Depth,
4494        ) -> fidl::Result<()> {
4495            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4496            // Delegate to tuple encoding.
4497            fidl::encoding::Encode::<
4498                EventWithReducedRights,
4499                fidl::encoding::DefaultFuchsiaResourceDialect,
4500            >::encode(
4501                (<fidl::encoding::HandleType<
4502                    fidl::Event,
4503                    { fidl::ObjectType::EVENT.into_raw() },
4504                    49155,
4505                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4506                    &mut self.h
4507                ),),
4508                encoder,
4509                offset,
4510                _depth,
4511            )
4512        }
4513    }
4514    unsafe impl<
4515        T0: fidl::encoding::Encode<
4516                fidl::encoding::HandleType<
4517                    fidl::Event,
4518                    { fidl::ObjectType::EVENT.into_raw() },
4519                    49155,
4520                >,
4521                fidl::encoding::DefaultFuchsiaResourceDialect,
4522            >,
4523    >
4524        fidl::encoding::Encode<
4525            EventWithReducedRights,
4526            fidl::encoding::DefaultFuchsiaResourceDialect,
4527        > for (T0,)
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            // Zero out padding regions. There's no need to apply masks
4541            // because the unmasked parts will be overwritten by fields.
4542            // Write the fields.
4543            self.0.encode(encoder, offset + 0, depth)?;
4544            Ok(())
4545        }
4546    }
4547
4548    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4549        for EventWithReducedRights
4550    {
4551        #[inline(always)]
4552        fn new_empty() -> Self {
4553            Self {
4554                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4555            }
4556        }
4557
4558        #[inline]
4559        unsafe fn decode(
4560            &mut self,
4561            decoder: &mut fidl::encoding::Decoder<
4562                '_,
4563                fidl::encoding::DefaultFuchsiaResourceDialect,
4564            >,
4565            offset: usize,
4566            _depth: fidl::encoding::Depth,
4567        ) -> fidl::Result<()> {
4568            decoder.debug_check_bounds::<Self>(offset);
4569            // Verify that padding bytes are zero.
4570            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4571            Ok(())
4572        }
4573    }
4574
4575    impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4576        type Borrowed<'a> = &'a mut Self;
4577        fn take_or_borrow<'a>(
4578            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4579        ) -> Self::Borrowed<'a> {
4580            value
4581        }
4582    }
4583
4584    unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4585        type Owned = Self;
4586
4587        #[inline(always)]
4588        fn inline_align(_context: fidl::encoding::Context) -> usize {
4589            8
4590        }
4591
4592        #[inline(always)]
4593        fn inline_size(_context: fidl::encoding::Context) -> usize {
4594            248
4595        }
4596    }
4597
4598    unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4599        for &mut FidlvizDemo
4600    {
4601        #[inline]
4602        unsafe fn encode(
4603            self,
4604            encoder: &mut fidl::encoding::Encoder<
4605                '_,
4606                fidl::encoding::DefaultFuchsiaResourceDialect,
4607            >,
4608            offset: usize,
4609            _depth: fidl::encoding::Depth,
4610        ) -> fidl::Result<()> {
4611            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4612            // Delegate to tuple encoding.
4613            fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4614                (
4615                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4616                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4617                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4618                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4619                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4620                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4621                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4622                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4623                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4624                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4625                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4626                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4627                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4628                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4629                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4630                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4631                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4632                    <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4633                    <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4634                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4635                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4636                    <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4637                    <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4638                    <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4639                    <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4640                    <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4641                    <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4642                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4643                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4644                    <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4645                    <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4646                ),
4647                encoder, offset, _depth
4648            )
4649        }
4650    }
4651    unsafe impl<
4652        T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4653        T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4654        T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4655        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4656        T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4657        T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4658        T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4659        T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4660        T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4661        T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4662        T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4663        T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4664        T12: fidl::encoding::Encode<
4665                fidl::encoding::UnboundedString,
4666                fidl::encoding::DefaultFuchsiaResourceDialect,
4667            >,
4668        T13: fidl::encoding::Encode<
4669                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4670                fidl::encoding::DefaultFuchsiaResourceDialect,
4671            >,
4672        T14: fidl::encoding::Encode<
4673                fidl::encoding::UnboundedString,
4674                fidl::encoding::DefaultFuchsiaResourceDialect,
4675            >,
4676        T15: fidl::encoding::Encode<
4677                fidl::encoding::Optional<
4678                    fidl::encoding::HandleType<
4679                        fidl::NullableHandle,
4680                        { fidl::ObjectType::NONE.into_raw() },
4681                        2147483648,
4682                    >,
4683                >,
4684                fidl::encoding::DefaultFuchsiaResourceDialect,
4685            >,
4686        T16: fidl::encoding::Encode<
4687                fidl::encoding::HandleType<
4688                    fidl::NullableHandle,
4689                    { fidl::ObjectType::NONE.into_raw() },
4690                    2147483648,
4691                >,
4692                fidl::encoding::DefaultFuchsiaResourceDialect,
4693            >,
4694        T17: fidl::encoding::Encode<
4695                fidl::encoding::Array<u8, 3>,
4696                fidl::encoding::DefaultFuchsiaResourceDialect,
4697            >,
4698        T18: fidl::encoding::Encode<
4699                fidl::encoding::UnboundedVector<f64>,
4700                fidl::encoding::DefaultFuchsiaResourceDialect,
4701            >,
4702        T19: fidl::encoding::Encode<
4703                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4704                fidl::encoding::DefaultFuchsiaResourceDialect,
4705            >,
4706        T20: fidl::encoding::Encode<
4707                fidl::encoding::UnboundedVector<u8>,
4708                fidl::encoding::DefaultFuchsiaResourceDialect,
4709            >,
4710        T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4711        T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4712        T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4713        T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4714        T25: fidl::encoding::Encode<
4715                fidl::encoding::Boxed<FidlvizStruct1>,
4716                fidl::encoding::DefaultFuchsiaResourceDialect,
4717            >,
4718        T26: fidl::encoding::Encode<
4719                fidl::encoding::Boxed<FidlvizStruct2>,
4720                fidl::encoding::DefaultFuchsiaResourceDialect,
4721            >,
4722        T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4723        T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4724        T29: fidl::encoding::Encode<
4725                fidl::encoding::OptionalUnion<FidlvizUnion>,
4726                fidl::encoding::DefaultFuchsiaResourceDialect,
4727            >,
4728        T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4729    > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4730        for (
4731            T0,
4732            T1,
4733            T2,
4734            T3,
4735            T4,
4736            T5,
4737            T6,
4738            T7,
4739            T8,
4740            T9,
4741            T10,
4742            T11,
4743            T12,
4744            T13,
4745            T14,
4746            T15,
4747            T16,
4748            T17,
4749            T18,
4750            T19,
4751            T20,
4752            T21,
4753            T22,
4754            T23,
4755            T24,
4756            T25,
4757            T26,
4758            T27,
4759            T28,
4760            T29,
4761            T30,
4762        )
4763    {
4764        #[inline]
4765        unsafe fn encode(
4766            self,
4767            encoder: &mut fidl::encoding::Encoder<
4768                '_,
4769                fidl::encoding::DefaultFuchsiaResourceDialect,
4770            >,
4771            offset: usize,
4772            depth: fidl::encoding::Depth,
4773        ) -> fidl::Result<()> {
4774            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4775            // Zero out padding regions. There's no need to apply masks
4776            // because the unmasked parts will be overwritten by fields.
4777            unsafe {
4778                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4779                (ptr as *mut u64).write_unaligned(0);
4780            }
4781            unsafe {
4782                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4783                (ptr as *mut u64).write_unaligned(0);
4784            }
4785            unsafe {
4786                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4787                (ptr as *mut u64).write_unaligned(0);
4788            }
4789            // Write the fields.
4790            self.0.encode(encoder, offset + 0, depth)?;
4791            self.1.encode(encoder, offset + 1, depth)?;
4792            self.2.encode(encoder, offset + 2, depth)?;
4793            self.3.encode(encoder, offset + 4, depth)?;
4794            self.4.encode(encoder, offset + 8, depth)?;
4795            self.5.encode(encoder, offset + 16, depth)?;
4796            self.6.encode(encoder, offset + 17, depth)?;
4797            self.7.encode(encoder, offset + 18, depth)?;
4798            self.8.encode(encoder, offset + 20, depth)?;
4799            self.9.encode(encoder, offset + 24, depth)?;
4800            self.10.encode(encoder, offset + 32, depth)?;
4801            self.11.encode(encoder, offset + 33, depth)?;
4802            self.12.encode(encoder, offset + 40, depth)?;
4803            self.13.encode(encoder, offset + 56, depth)?;
4804            self.14.encode(encoder, offset + 72, depth)?;
4805            self.15.encode(encoder, offset + 88, depth)?;
4806            self.16.encode(encoder, offset + 92, depth)?;
4807            self.17.encode(encoder, offset + 96, depth)?;
4808            self.18.encode(encoder, offset + 104, depth)?;
4809            self.19.encode(encoder, offset + 120, depth)?;
4810            self.20.encode(encoder, offset + 136, depth)?;
4811            self.21.encode(encoder, offset + 152, depth)?;
4812            self.22.encode(encoder, offset + 153, depth)?;
4813            self.23.encode(encoder, offset + 154, depth)?;
4814            self.24.encode(encoder, offset + 160, depth)?;
4815            self.25.encode(encoder, offset + 168, depth)?;
4816            self.26.encode(encoder, offset + 176, depth)?;
4817            self.27.encode(encoder, offset + 184, depth)?;
4818            self.28.encode(encoder, offset + 200, depth)?;
4819            self.29.encode(encoder, offset + 216, depth)?;
4820            self.30.encode(encoder, offset + 232, depth)?;
4821            Ok(())
4822        }
4823    }
4824
4825    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4826        #[inline(always)]
4827        fn new_empty() -> Self {
4828            Self {
4829                f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4830                f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4831                f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4832                f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4833                f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4834                f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4835                f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4836                f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4837                f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4838                f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4839                f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4840                f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4841                f13: fidl::new_empty!(
4842                    fidl::encoding::UnboundedString,
4843                    fidl::encoding::DefaultFuchsiaResourceDialect
4844                ),
4845                f14: fidl::new_empty!(
4846                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4847                    fidl::encoding::DefaultFuchsiaResourceDialect
4848                ),
4849                f15: fidl::new_empty!(
4850                    fidl::encoding::UnboundedString,
4851                    fidl::encoding::DefaultFuchsiaResourceDialect
4852                ),
4853                f16: fidl::new_empty!(
4854                    fidl::encoding::Optional<
4855                        fidl::encoding::HandleType<
4856                            fidl::NullableHandle,
4857                            { fidl::ObjectType::NONE.into_raw() },
4858                            2147483648,
4859                        >,
4860                    >,
4861                    fidl::encoding::DefaultFuchsiaResourceDialect
4862                ),
4863                f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4864                f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4865                f19: fidl::new_empty!(
4866                    fidl::encoding::UnboundedVector<f64>,
4867                    fidl::encoding::DefaultFuchsiaResourceDialect
4868                ),
4869                f20: fidl::new_empty!(
4870                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4871                    fidl::encoding::DefaultFuchsiaResourceDialect
4872                ),
4873                f21: fidl::new_empty!(
4874                    fidl::encoding::UnboundedVector<u8>,
4875                    fidl::encoding::DefaultFuchsiaResourceDialect
4876                ),
4877                f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4878                f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4879                f24: fidl::new_empty!(
4880                    FidlvizStruct1,
4881                    fidl::encoding::DefaultFuchsiaResourceDialect
4882                ),
4883                f25: fidl::new_empty!(
4884                    FidlvizStruct2,
4885                    fidl::encoding::DefaultFuchsiaResourceDialect
4886                ),
4887                f26: fidl::new_empty!(
4888                    fidl::encoding::Boxed<FidlvizStruct1>,
4889                    fidl::encoding::DefaultFuchsiaResourceDialect
4890                ),
4891                f27: fidl::new_empty!(
4892                    fidl::encoding::Boxed<FidlvizStruct2>,
4893                    fidl::encoding::DefaultFuchsiaResourceDialect
4894                ),
4895                f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4896                f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4897                f30: fidl::new_empty!(
4898                    fidl::encoding::OptionalUnion<FidlvizUnion>,
4899                    fidl::encoding::DefaultFuchsiaResourceDialect
4900                ),
4901                f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4902            }
4903        }
4904
4905        #[inline]
4906        unsafe fn decode(
4907            &mut self,
4908            decoder: &mut fidl::encoding::Decoder<
4909                '_,
4910                fidl::encoding::DefaultFuchsiaResourceDialect,
4911            >,
4912            offset: usize,
4913            _depth: fidl::encoding::Depth,
4914        ) -> fidl::Result<()> {
4915            decoder.debug_check_bounds::<Self>(offset);
4916            // Verify that padding bytes are zero.
4917            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4918            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4919            let mask = 0xffffffffffff0000u64;
4920            let maskedval = padval & mask;
4921            if maskedval != 0 {
4922                return Err(fidl::Error::NonZeroPadding {
4923                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4924                });
4925            }
4926            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4927            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4928            let mask = 0xffffffffff000000u64;
4929            let maskedval = padval & mask;
4930            if maskedval != 0 {
4931                return Err(fidl::Error::NonZeroPadding {
4932                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4933                });
4934            }
4935            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4936            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4937            let mask = 0xffffffffff000000u64;
4938            let maskedval = padval & mask;
4939            if maskedval != 0 {
4940                return Err(fidl::Error::NonZeroPadding {
4941                    padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4942                });
4943            }
4944            fidl::decode!(
4945                u8,
4946                fidl::encoding::DefaultFuchsiaResourceDialect,
4947                &mut self.f1,
4948                decoder,
4949                offset + 0,
4950                _depth
4951            )?;
4952            fidl::decode!(
4953                i8,
4954                fidl::encoding::DefaultFuchsiaResourceDialect,
4955                &mut self.f2,
4956                decoder,
4957                offset + 1,
4958                _depth
4959            )?;
4960            fidl::decode!(
4961                u16,
4962                fidl::encoding::DefaultFuchsiaResourceDialect,
4963                &mut self.f3,
4964                decoder,
4965                offset + 2,
4966                _depth
4967            )?;
4968            fidl::decode!(
4969                u32,
4970                fidl::encoding::DefaultFuchsiaResourceDialect,
4971                &mut self.f4,
4972                decoder,
4973                offset + 4,
4974                _depth
4975            )?;
4976            fidl::decode!(
4977                u64,
4978                fidl::encoding::DefaultFuchsiaResourceDialect,
4979                &mut self.f5,
4980                decoder,
4981                offset + 8,
4982                _depth
4983            )?;
4984            fidl::decode!(
4985                u8,
4986                fidl::encoding::DefaultFuchsiaResourceDialect,
4987                &mut self.f6,
4988                decoder,
4989                offset + 16,
4990                _depth
4991            )?;
4992            fidl::decode!(
4993                u8,
4994                fidl::encoding::DefaultFuchsiaResourceDialect,
4995                &mut self.f7,
4996                decoder,
4997                offset + 17,
4998                _depth
4999            )?;
5000            fidl::decode!(
5001                u16,
5002                fidl::encoding::DefaultFuchsiaResourceDialect,
5003                &mut self.f8,
5004                decoder,
5005                offset + 18,
5006                _depth
5007            )?;
5008            fidl::decode!(
5009                f32,
5010                fidl::encoding::DefaultFuchsiaResourceDialect,
5011                &mut self.f9,
5012                decoder,
5013                offset + 20,
5014                _depth
5015            )?;
5016            fidl::decode!(
5017                f64,
5018                fidl::encoding::DefaultFuchsiaResourceDialect,
5019                &mut self.f10,
5020                decoder,
5021                offset + 24,
5022                _depth
5023            )?;
5024            fidl::decode!(
5025                bool,
5026                fidl::encoding::DefaultFuchsiaResourceDialect,
5027                &mut self.f11,
5028                decoder,
5029                offset + 32,
5030                _depth
5031            )?;
5032            fidl::decode!(
5033                bool,
5034                fidl::encoding::DefaultFuchsiaResourceDialect,
5035                &mut self.f12,
5036                decoder,
5037                offset + 33,
5038                _depth
5039            )?;
5040            fidl::decode!(
5041                fidl::encoding::UnboundedString,
5042                fidl::encoding::DefaultFuchsiaResourceDialect,
5043                &mut self.f13,
5044                decoder,
5045                offset + 40,
5046                _depth
5047            )?;
5048            fidl::decode!(
5049                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5050                fidl::encoding::DefaultFuchsiaResourceDialect,
5051                &mut self.f14,
5052                decoder,
5053                offset + 56,
5054                _depth
5055            )?;
5056            fidl::decode!(
5057                fidl::encoding::UnboundedString,
5058                fidl::encoding::DefaultFuchsiaResourceDialect,
5059                &mut self.f15,
5060                decoder,
5061                offset + 72,
5062                _depth
5063            )?;
5064            fidl::decode!(
5065                fidl::encoding::Optional<
5066                    fidl::encoding::HandleType<
5067                        fidl::NullableHandle,
5068                        { fidl::ObjectType::NONE.into_raw() },
5069                        2147483648,
5070                    >,
5071                >,
5072                fidl::encoding::DefaultFuchsiaResourceDialect,
5073                &mut self.f16,
5074                decoder,
5075                offset + 88,
5076                _depth
5077            )?;
5078            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5079            fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5080            fidl::decode!(
5081                fidl::encoding::UnboundedVector<f64>,
5082                fidl::encoding::DefaultFuchsiaResourceDialect,
5083                &mut self.f19,
5084                decoder,
5085                offset + 104,
5086                _depth
5087            )?;
5088            fidl::decode!(
5089                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5090                fidl::encoding::DefaultFuchsiaResourceDialect,
5091                &mut self.f20,
5092                decoder,
5093                offset + 120,
5094                _depth
5095            )?;
5096            fidl::decode!(
5097                fidl::encoding::UnboundedVector<u8>,
5098                fidl::encoding::DefaultFuchsiaResourceDialect,
5099                &mut self.f21,
5100                decoder,
5101                offset + 136,
5102                _depth
5103            )?;
5104            fidl::decode!(
5105                FidlvizBits,
5106                fidl::encoding::DefaultFuchsiaResourceDialect,
5107                &mut self.f22,
5108                decoder,
5109                offset + 152,
5110                _depth
5111            )?;
5112            fidl::decode!(
5113                FidlvizEnum,
5114                fidl::encoding::DefaultFuchsiaResourceDialect,
5115                &mut self.f23,
5116                decoder,
5117                offset + 153,
5118                _depth
5119            )?;
5120            fidl::decode!(
5121                FidlvizStruct1,
5122                fidl::encoding::DefaultFuchsiaResourceDialect,
5123                &mut self.f24,
5124                decoder,
5125                offset + 154,
5126                _depth
5127            )?;
5128            fidl::decode!(
5129                FidlvizStruct2,
5130                fidl::encoding::DefaultFuchsiaResourceDialect,
5131                &mut self.f25,
5132                decoder,
5133                offset + 160,
5134                _depth
5135            )?;
5136            fidl::decode!(
5137                fidl::encoding::Boxed<FidlvizStruct1>,
5138                fidl::encoding::DefaultFuchsiaResourceDialect,
5139                &mut self.f26,
5140                decoder,
5141                offset + 168,
5142                _depth
5143            )?;
5144            fidl::decode!(
5145                fidl::encoding::Boxed<FidlvizStruct2>,
5146                fidl::encoding::DefaultFuchsiaResourceDialect,
5147                &mut self.f27,
5148                decoder,
5149                offset + 176,
5150                _depth
5151            )?;
5152            fidl::decode!(
5153                FidlvizTable,
5154                fidl::encoding::DefaultFuchsiaResourceDialect,
5155                &mut self.f28,
5156                decoder,
5157                offset + 184,
5158                _depth
5159            )?;
5160            fidl::decode!(
5161                FidlvizTable,
5162                fidl::encoding::DefaultFuchsiaResourceDialect,
5163                &mut self.f29,
5164                decoder,
5165                offset + 200,
5166                _depth
5167            )?;
5168            fidl::decode!(
5169                fidl::encoding::OptionalUnion<FidlvizUnion>,
5170                fidl::encoding::DefaultFuchsiaResourceDialect,
5171                &mut self.f30,
5172                decoder,
5173                offset + 216,
5174                _depth
5175            )?;
5176            fidl::decode!(
5177                FidlvizUnion,
5178                fidl::encoding::DefaultFuchsiaResourceDialect,
5179                &mut self.f31,
5180                decoder,
5181                offset + 232,
5182                _depth
5183            )?;
5184            Ok(())
5185        }
5186    }
5187
5188    impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5189        type Borrowed<'a> = &'a mut Self;
5190        fn take_or_borrow<'a>(
5191            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5192        ) -> Self::Borrowed<'a> {
5193            value
5194        }
5195    }
5196
5197    unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5198        type Owned = Self;
5199
5200        #[inline(always)]
5201        fn inline_align(_context: fidl::encoding::Context) -> usize {
5202            4
5203        }
5204
5205        #[inline(always)]
5206        fn inline_size(_context: fidl::encoding::Context) -> usize {
5207            4
5208        }
5209    }
5210
5211    unsafe impl
5212        fidl::encoding::Encode<
5213            GoldenHandleBasicRightsStruct,
5214            fidl::encoding::DefaultFuchsiaResourceDialect,
5215        > for &mut GoldenHandleBasicRightsStruct
5216    {
5217        #[inline]
5218        unsafe fn encode(
5219            self,
5220            encoder: &mut fidl::encoding::Encoder<
5221                '_,
5222                fidl::encoding::DefaultFuchsiaResourceDialect,
5223            >,
5224            offset: usize,
5225            _depth: fidl::encoding::Depth,
5226        ) -> fidl::Result<()> {
5227            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5228            // Delegate to tuple encoding.
5229            fidl::encoding::Encode::<
5230                GoldenHandleBasicRightsStruct,
5231                fidl::encoding::DefaultFuchsiaResourceDialect,
5232            >::encode(
5233                (<fidl::encoding::HandleType<
5234                    fidl::Event,
5235                    { fidl::ObjectType::EVENT.into_raw() },
5236                    49155,
5237                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5238                    &mut self.v
5239                ),),
5240                encoder,
5241                offset,
5242                _depth,
5243            )
5244        }
5245    }
5246    unsafe impl<
5247        T0: fidl::encoding::Encode<
5248                fidl::encoding::HandleType<
5249                    fidl::Event,
5250                    { fidl::ObjectType::EVENT.into_raw() },
5251                    49155,
5252                >,
5253                fidl::encoding::DefaultFuchsiaResourceDialect,
5254            >,
5255    >
5256        fidl::encoding::Encode<
5257            GoldenHandleBasicRightsStruct,
5258            fidl::encoding::DefaultFuchsiaResourceDialect,
5259        > for (T0,)
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            // Zero out padding regions. There's no need to apply masks
5273            // because the unmasked parts will be overwritten by fields.
5274            // Write the fields.
5275            self.0.encode(encoder, offset + 0, depth)?;
5276            Ok(())
5277        }
5278    }
5279
5280    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5281        for GoldenHandleBasicRightsStruct
5282    {
5283        #[inline(always)]
5284        fn new_empty() -> Self {
5285            Self {
5286                v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5287            }
5288        }
5289
5290        #[inline]
5291        unsafe fn decode(
5292            &mut self,
5293            decoder: &mut fidl::encoding::Decoder<
5294                '_,
5295                fidl::encoding::DefaultFuchsiaResourceDialect,
5296            >,
5297            offset: usize,
5298            _depth: fidl::encoding::Depth,
5299        ) -> fidl::Result<()> {
5300            decoder.debug_check_bounds::<Self>(offset);
5301            // Verify that padding bytes are zero.
5302            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5303            Ok(())
5304        }
5305    }
5306
5307    impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5308        type Borrowed<'a> = &'a mut Self;
5309        fn take_or_borrow<'a>(
5310            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5311        ) -> Self::Borrowed<'a> {
5312            value
5313        }
5314    }
5315
5316    unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5317        type Owned = Self;
5318
5319        #[inline(always)]
5320        fn inline_align(_context: fidl::encoding::Context) -> usize {
5321            4
5322        }
5323
5324        #[inline(always)]
5325        fn inline_size(_context: fidl::encoding::Context) -> usize {
5326            4
5327        }
5328    }
5329
5330    unsafe impl
5331        fidl::encoding::Encode<
5332            GoldenNullableHandleStruct,
5333            fidl::encoding::DefaultFuchsiaResourceDialect,
5334        > for &mut GoldenNullableHandleStruct
5335    {
5336        #[inline]
5337        unsafe fn encode(
5338            self,
5339            encoder: &mut fidl::encoding::Encoder<
5340                '_,
5341                fidl::encoding::DefaultFuchsiaResourceDialect,
5342            >,
5343            offset: usize,
5344            _depth: fidl::encoding::Depth,
5345        ) -> fidl::Result<()> {
5346            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5347            // Delegate to tuple encoding.
5348            fidl::encoding::Encode::<
5349                GoldenNullableHandleStruct,
5350                fidl::encoding::DefaultFuchsiaResourceDialect,
5351            >::encode(
5352                (<fidl::encoding::Optional<
5353                    fidl::encoding::HandleType<
5354                        fidl::NullableHandle,
5355                        { fidl::ObjectType::NONE.into_raw() },
5356                        2147483648,
5357                    >,
5358                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5359                    &mut self.v
5360                ),),
5361                encoder,
5362                offset,
5363                _depth,
5364            )
5365        }
5366    }
5367    unsafe impl<
5368        T0: fidl::encoding::Encode<
5369                fidl::encoding::Optional<
5370                    fidl::encoding::HandleType<
5371                        fidl::NullableHandle,
5372                        { fidl::ObjectType::NONE.into_raw() },
5373                        2147483648,
5374                    >,
5375                >,
5376                fidl::encoding::DefaultFuchsiaResourceDialect,
5377            >,
5378    >
5379        fidl::encoding::Encode<
5380            GoldenNullableHandleStruct,
5381            fidl::encoding::DefaultFuchsiaResourceDialect,
5382        > for (T0,)
5383    {
5384        #[inline]
5385        unsafe fn encode(
5386            self,
5387            encoder: &mut fidl::encoding::Encoder<
5388                '_,
5389                fidl::encoding::DefaultFuchsiaResourceDialect,
5390            >,
5391            offset: usize,
5392            depth: fidl::encoding::Depth,
5393        ) -> fidl::Result<()> {
5394            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5395            // Zero out padding regions. There's no need to apply masks
5396            // because the unmasked parts will be overwritten by fields.
5397            // Write the fields.
5398            self.0.encode(encoder, offset + 0, depth)?;
5399            Ok(())
5400        }
5401    }
5402
5403    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5404        for GoldenNullableHandleStruct
5405    {
5406        #[inline(always)]
5407        fn new_empty() -> Self {
5408            Self {
5409                v: fidl::new_empty!(
5410                    fidl::encoding::Optional<
5411                        fidl::encoding::HandleType<
5412                            fidl::NullableHandle,
5413                            { fidl::ObjectType::NONE.into_raw() },
5414                            2147483648,
5415                        >,
5416                    >,
5417                    fidl::encoding::DefaultFuchsiaResourceDialect
5418                ),
5419            }
5420        }
5421
5422        #[inline]
5423        unsafe fn decode(
5424            &mut self,
5425            decoder: &mut fidl::encoding::Decoder<
5426                '_,
5427                fidl::encoding::DefaultFuchsiaResourceDialect,
5428            >,
5429            offset: usize,
5430            _depth: fidl::encoding::Depth,
5431        ) -> fidl::Result<()> {
5432            decoder.debug_check_bounds::<Self>(offset);
5433            // Verify that padding bytes are zero.
5434            fidl::decode!(
5435                fidl::encoding::Optional<
5436                    fidl::encoding::HandleType<
5437                        fidl::NullableHandle,
5438                        { fidl::ObjectType::NONE.into_raw() },
5439                        2147483648,
5440                    >,
5441                >,
5442                fidl::encoding::DefaultFuchsiaResourceDialect,
5443                &mut self.v,
5444                decoder,
5445                offset + 0,
5446                _depth
5447            )?;
5448            Ok(())
5449        }
5450    }
5451
5452    impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5453        type Borrowed<'a> = &'a mut Self;
5454        fn take_or_borrow<'a>(
5455            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5456        ) -> Self::Borrowed<'a> {
5457            value
5458        }
5459    }
5460
5461    unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5462        type Owned = Self;
5463
5464        #[inline(always)]
5465        fn inline_align(_context: fidl::encoding::Context) -> usize {
5466            8
5467        }
5468
5469        #[inline(always)]
5470        fn inline_size(_context: fidl::encoding::Context) -> usize {
5471            72
5472        }
5473    }
5474
5475    unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5476        for &mut LaunchInfo
5477    {
5478        #[inline]
5479        unsafe fn encode(
5480            self,
5481            encoder: &mut fidl::encoding::Encoder<
5482                '_,
5483                fidl::encoding::DefaultFuchsiaResourceDialect,
5484            >,
5485            offset: usize,
5486            _depth: fidl::encoding::Depth,
5487        ) -> fidl::Result<()> {
5488            encoder.debug_check_bounds::<LaunchInfo>(offset);
5489            // Delegate to tuple encoding.
5490            fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5491                (
5492                    <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5493                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5494                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5495                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5496                    <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),
5497                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5498                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5499                ),
5500                encoder, offset, _depth
5501            )
5502        }
5503    }
5504    unsafe impl<
5505        T0: fidl::encoding::Encode<
5506                fidl::encoding::BoundedString<200>,
5507                fidl::encoding::DefaultFuchsiaResourceDialect,
5508            >,
5509        T1: fidl::encoding::Encode<
5510                fidl::encoding::Optional<
5511                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5512                >,
5513                fidl::encoding::DefaultFuchsiaResourceDialect,
5514            >,
5515        T2: fidl::encoding::Encode<
5516                fidl::encoding::Boxed<TransformerEmptyStruct>,
5517                fidl::encoding::DefaultFuchsiaResourceDialect,
5518            >,
5519        T3: fidl::encoding::Encode<
5520                fidl::encoding::Boxed<TransformerEmptyStruct>,
5521                fidl::encoding::DefaultFuchsiaResourceDialect,
5522            >,
5523        T4: fidl::encoding::Encode<
5524                fidl::encoding::Optional<
5525                    fidl::encoding::HandleType<
5526                        fidl::Channel,
5527                        { fidl::ObjectType::CHANNEL.into_raw() },
5528                        2147483648,
5529                    >,
5530                >,
5531                fidl::encoding::DefaultFuchsiaResourceDialect,
5532            >,
5533        T5: fidl::encoding::Encode<
5534                fidl::encoding::Boxed<TransformerEmptyStruct>,
5535                fidl::encoding::DefaultFuchsiaResourceDialect,
5536            >,
5537        T6: fidl::encoding::Encode<
5538                fidl::encoding::Boxed<TransformerEmptyStruct>,
5539                fidl::encoding::DefaultFuchsiaResourceDialect,
5540            >,
5541    > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5542        for (T0, T1, T2, T3, T4, T5, T6)
5543    {
5544        #[inline]
5545        unsafe fn encode(
5546            self,
5547            encoder: &mut fidl::encoding::Encoder<
5548                '_,
5549                fidl::encoding::DefaultFuchsiaResourceDialect,
5550            >,
5551            offset: usize,
5552            depth: fidl::encoding::Depth,
5553        ) -> fidl::Result<()> {
5554            encoder.debug_check_bounds::<LaunchInfo>(offset);
5555            // Zero out padding regions. There's no need to apply masks
5556            // because the unmasked parts will be overwritten by fields.
5557            unsafe {
5558                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5559                (ptr as *mut u64).write_unaligned(0);
5560            }
5561            // Write the fields.
5562            self.0.encode(encoder, offset + 0, depth)?;
5563            self.1.encode(encoder, offset + 16, depth)?;
5564            self.2.encode(encoder, offset + 32, depth)?;
5565            self.3.encode(encoder, offset + 40, depth)?;
5566            self.4.encode(encoder, offset + 48, depth)?;
5567            self.5.encode(encoder, offset + 56, depth)?;
5568            self.6.encode(encoder, offset + 64, depth)?;
5569            Ok(())
5570        }
5571    }
5572
5573    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5574        #[inline(always)]
5575        fn new_empty() -> Self {
5576            Self {
5577                url: fidl::new_empty!(
5578                    fidl::encoding::BoundedString<200>,
5579                    fidl::encoding::DefaultFuchsiaResourceDialect
5580                ),
5581                arguments: fidl::new_empty!(
5582                    fidl::encoding::Optional<
5583                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5584                    >,
5585                    fidl::encoding::DefaultFuchsiaResourceDialect
5586                ),
5587                out: fidl::new_empty!(
5588                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5589                    fidl::encoding::DefaultFuchsiaResourceDialect
5590                ),
5591                err: fidl::new_empty!(
5592                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5593                    fidl::encoding::DefaultFuchsiaResourceDialect
5594                ),
5595                directory_request: fidl::new_empty!(
5596                    fidl::encoding::Optional<
5597                        fidl::encoding::HandleType<
5598                            fidl::Channel,
5599                            { fidl::ObjectType::CHANNEL.into_raw() },
5600                            2147483648,
5601                        >,
5602                    >,
5603                    fidl::encoding::DefaultFuchsiaResourceDialect
5604                ),
5605                flat_namespace: fidl::new_empty!(
5606                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5607                    fidl::encoding::DefaultFuchsiaResourceDialect
5608                ),
5609                additional_services: fidl::new_empty!(
5610                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5611                    fidl::encoding::DefaultFuchsiaResourceDialect
5612                ),
5613            }
5614        }
5615
5616        #[inline]
5617        unsafe fn decode(
5618            &mut self,
5619            decoder: &mut fidl::encoding::Decoder<
5620                '_,
5621                fidl::encoding::DefaultFuchsiaResourceDialect,
5622            >,
5623            offset: usize,
5624            _depth: fidl::encoding::Depth,
5625        ) -> fidl::Result<()> {
5626            decoder.debug_check_bounds::<Self>(offset);
5627            // Verify that padding bytes are zero.
5628            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5629            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5630            let mask = 0xffffffff00000000u64;
5631            let maskedval = padval & mask;
5632            if maskedval != 0 {
5633                return Err(fidl::Error::NonZeroPadding {
5634                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5635                });
5636            }
5637            fidl::decode!(
5638                fidl::encoding::BoundedString<200>,
5639                fidl::encoding::DefaultFuchsiaResourceDialect,
5640                &mut self.url,
5641                decoder,
5642                offset + 0,
5643                _depth
5644            )?;
5645            fidl::decode!(
5646                fidl::encoding::Optional<
5647                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5648                >,
5649                fidl::encoding::DefaultFuchsiaResourceDialect,
5650                &mut self.arguments,
5651                decoder,
5652                offset + 16,
5653                _depth
5654            )?;
5655            fidl::decode!(
5656                fidl::encoding::Boxed<TransformerEmptyStruct>,
5657                fidl::encoding::DefaultFuchsiaResourceDialect,
5658                &mut self.out,
5659                decoder,
5660                offset + 32,
5661                _depth
5662            )?;
5663            fidl::decode!(
5664                fidl::encoding::Boxed<TransformerEmptyStruct>,
5665                fidl::encoding::DefaultFuchsiaResourceDialect,
5666                &mut self.err,
5667                decoder,
5668                offset + 40,
5669                _depth
5670            )?;
5671            fidl::decode!(
5672                fidl::encoding::Optional<
5673                    fidl::encoding::HandleType<
5674                        fidl::Channel,
5675                        { fidl::ObjectType::CHANNEL.into_raw() },
5676                        2147483648,
5677                    >,
5678                >,
5679                fidl::encoding::DefaultFuchsiaResourceDialect,
5680                &mut self.directory_request,
5681                decoder,
5682                offset + 48,
5683                _depth
5684            )?;
5685            fidl::decode!(
5686                fidl::encoding::Boxed<TransformerEmptyStruct>,
5687                fidl::encoding::DefaultFuchsiaResourceDialect,
5688                &mut self.flat_namespace,
5689                decoder,
5690                offset + 56,
5691                _depth
5692            )?;
5693            fidl::decode!(
5694                fidl::encoding::Boxed<TransformerEmptyStruct>,
5695                fidl::encoding::DefaultFuchsiaResourceDialect,
5696                &mut self.additional_services,
5697                decoder,
5698                offset + 64,
5699                _depth
5700            )?;
5701            Ok(())
5702        }
5703    }
5704
5705    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5706        type Borrowed<'a> = &'a mut Self;
5707        fn take_or_borrow<'a>(
5708            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5709        ) -> Self::Borrowed<'a> {
5710            value
5711        }
5712    }
5713
5714    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5715        type Owned = Self;
5716
5717        #[inline(always)]
5718        fn inline_align(_context: fidl::encoding::Context) -> usize {
5719            8
5720        }
5721
5722        #[inline(always)]
5723        fn inline_size(_context: fidl::encoding::Context) -> usize {
5724            32
5725        }
5726    }
5727
5728    unsafe impl
5729        fidl::encoding::Encode<
5730            MultipleBoundedNonnullableVectorsOfHandles,
5731            fidl::encoding::DefaultFuchsiaResourceDialect,
5732        > for &mut MultipleBoundedNonnullableVectorsOfHandles
5733    {
5734        #[inline]
5735        unsafe fn encode(
5736            self,
5737            encoder: &mut fidl::encoding::Encoder<
5738                '_,
5739                fidl::encoding::DefaultFuchsiaResourceDialect,
5740            >,
5741            offset: usize,
5742            _depth: fidl::encoding::Depth,
5743        ) -> fidl::Result<()> {
5744            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5745            // Delegate to tuple encoding.
5746            fidl::encoding::Encode::<
5747                MultipleBoundedNonnullableVectorsOfHandles,
5748                fidl::encoding::DefaultFuchsiaResourceDialect,
5749            >::encode(
5750                (
5751                    <fidl::encoding::Vector<
5752                        fidl::encoding::HandleType<
5753                            fidl::NullableHandle,
5754                            { fidl::ObjectType::NONE.into_raw() },
5755                            2147483648,
5756                        >,
5757                        2,
5758                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5759                        &mut self.vh0
5760                    ),
5761                    <fidl::encoding::Vector<
5762                        fidl::encoding::HandleType<
5763                            fidl::NullableHandle,
5764                            { fidl::ObjectType::NONE.into_raw() },
5765                            2147483648,
5766                        >,
5767                        32,
5768                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5769                        &mut self.vh1
5770                    ),
5771                ),
5772                encoder,
5773                offset,
5774                _depth,
5775            )
5776        }
5777    }
5778    unsafe impl<
5779        T0: fidl::encoding::Encode<
5780                fidl::encoding::Vector<
5781                    fidl::encoding::HandleType<
5782                        fidl::NullableHandle,
5783                        { fidl::ObjectType::NONE.into_raw() },
5784                        2147483648,
5785                    >,
5786                    2,
5787                >,
5788                fidl::encoding::DefaultFuchsiaResourceDialect,
5789            >,
5790        T1: fidl::encoding::Encode<
5791                fidl::encoding::Vector<
5792                    fidl::encoding::HandleType<
5793                        fidl::NullableHandle,
5794                        { fidl::ObjectType::NONE.into_raw() },
5795                        2147483648,
5796                    >,
5797                    32,
5798                >,
5799                fidl::encoding::DefaultFuchsiaResourceDialect,
5800            >,
5801    >
5802        fidl::encoding::Encode<
5803            MultipleBoundedNonnullableVectorsOfHandles,
5804            fidl::encoding::DefaultFuchsiaResourceDialect,
5805        > for (T0, T1)
5806    {
5807        #[inline]
5808        unsafe fn encode(
5809            self,
5810            encoder: &mut fidl::encoding::Encoder<
5811                '_,
5812                fidl::encoding::DefaultFuchsiaResourceDialect,
5813            >,
5814            offset: usize,
5815            depth: fidl::encoding::Depth,
5816        ) -> fidl::Result<()> {
5817            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5818            // Zero out padding regions. There's no need to apply masks
5819            // because the unmasked parts will be overwritten by fields.
5820            // Write the fields.
5821            self.0.encode(encoder, offset + 0, depth)?;
5822            self.1.encode(encoder, offset + 16, depth)?;
5823            Ok(())
5824        }
5825    }
5826
5827    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5828        for MultipleBoundedNonnullableVectorsOfHandles
5829    {
5830        #[inline(always)]
5831        fn new_empty() -> Self {
5832            Self {
5833                vh0: fidl::new_empty!(
5834                    fidl::encoding::Vector<
5835                        fidl::encoding::HandleType<
5836                            fidl::NullableHandle,
5837                            { fidl::ObjectType::NONE.into_raw() },
5838                            2147483648,
5839                        >,
5840                        2,
5841                    >,
5842                    fidl::encoding::DefaultFuchsiaResourceDialect
5843                ),
5844                vh1: fidl::new_empty!(
5845                    fidl::encoding::Vector<
5846                        fidl::encoding::HandleType<
5847                            fidl::NullableHandle,
5848                            { fidl::ObjectType::NONE.into_raw() },
5849                            2147483648,
5850                        >,
5851                        32,
5852                    >,
5853                    fidl::encoding::DefaultFuchsiaResourceDialect
5854                ),
5855            }
5856        }
5857
5858        #[inline]
5859        unsafe fn decode(
5860            &mut self,
5861            decoder: &mut fidl::encoding::Decoder<
5862                '_,
5863                fidl::encoding::DefaultFuchsiaResourceDialect,
5864            >,
5865            offset: usize,
5866            _depth: fidl::encoding::Depth,
5867        ) -> fidl::Result<()> {
5868            decoder.debug_check_bounds::<Self>(offset);
5869            // Verify that padding bytes are zero.
5870            fidl::decode!(
5871                fidl::encoding::Vector<
5872                    fidl::encoding::HandleType<
5873                        fidl::NullableHandle,
5874                        { fidl::ObjectType::NONE.into_raw() },
5875                        2147483648,
5876                    >,
5877                    2,
5878                >,
5879                fidl::encoding::DefaultFuchsiaResourceDialect,
5880                &mut self.vh0,
5881                decoder,
5882                offset + 0,
5883                _depth
5884            )?;
5885            fidl::decode!(
5886                fidl::encoding::Vector<
5887                    fidl::encoding::HandleType<
5888                        fidl::NullableHandle,
5889                        { fidl::ObjectType::NONE.into_raw() },
5890                        2147483648,
5891                    >,
5892                    32,
5893                >,
5894                fidl::encoding::DefaultFuchsiaResourceDialect,
5895                &mut self.vh1,
5896                decoder,
5897                offset + 16,
5898                _depth
5899            )?;
5900            Ok(())
5901        }
5902    }
5903
5904    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5905        type Borrowed<'a> = &'a mut Self;
5906        fn take_or_borrow<'a>(
5907            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5908        ) -> Self::Borrowed<'a> {
5909            value
5910        }
5911    }
5912
5913    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5914        type Owned = Self;
5915
5916        #[inline(always)]
5917        fn inline_align(_context: fidl::encoding::Context) -> usize {
5918            8
5919        }
5920
5921        #[inline(always)]
5922        fn inline_size(_context: fidl::encoding::Context) -> usize {
5923            32
5924        }
5925    }
5926
5927    unsafe impl
5928        fidl::encoding::Encode<
5929            MultipleBoundedNullableVectorsOfHandles,
5930            fidl::encoding::DefaultFuchsiaResourceDialect,
5931        > for &mut MultipleBoundedNullableVectorsOfHandles
5932    {
5933        #[inline]
5934        unsafe fn encode(
5935            self,
5936            encoder: &mut fidl::encoding::Encoder<
5937                '_,
5938                fidl::encoding::DefaultFuchsiaResourceDialect,
5939            >,
5940            offset: usize,
5941            _depth: fidl::encoding::Depth,
5942        ) -> fidl::Result<()> {
5943            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
5944            // Delegate to tuple encoding.
5945            fidl::encoding::Encode::<
5946                MultipleBoundedNullableVectorsOfHandles,
5947                fidl::encoding::DefaultFuchsiaResourceDialect,
5948            >::encode(
5949                (
5950                    <fidl::encoding::Optional<
5951                        fidl::encoding::Vector<
5952                            fidl::encoding::HandleType<
5953                                fidl::NullableHandle,
5954                                { fidl::ObjectType::NONE.into_raw() },
5955                                2147483648,
5956                            >,
5957                            2,
5958                        >,
5959                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5960                        &mut self.vh0
5961                    ),
5962                    <fidl::encoding::Optional<
5963                        fidl::encoding::Vector<
5964                            fidl::encoding::HandleType<
5965                                fidl::NullableHandle,
5966                                { fidl::ObjectType::NONE.into_raw() },
5967                                2147483648,
5968                            >,
5969                            32,
5970                        >,
5971                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5972                        &mut self.vh1
5973                    ),
5974                ),
5975                encoder,
5976                offset,
5977                _depth,
5978            )
5979        }
5980    }
5981    unsafe impl<
5982        T0: fidl::encoding::Encode<
5983                fidl::encoding::Optional<
5984                    fidl::encoding::Vector<
5985                        fidl::encoding::HandleType<
5986                            fidl::NullableHandle,
5987                            { fidl::ObjectType::NONE.into_raw() },
5988                            2147483648,
5989                        >,
5990                        2,
5991                    >,
5992                >,
5993                fidl::encoding::DefaultFuchsiaResourceDialect,
5994            >,
5995        T1: fidl::encoding::Encode<
5996                fidl::encoding::Optional<
5997                    fidl::encoding::Vector<
5998                        fidl::encoding::HandleType<
5999                            fidl::NullableHandle,
6000                            { fidl::ObjectType::NONE.into_raw() },
6001                            2147483648,
6002                        >,
6003                        32,
6004                    >,
6005                >,
6006                fidl::encoding::DefaultFuchsiaResourceDialect,
6007            >,
6008    >
6009        fidl::encoding::Encode<
6010            MultipleBoundedNullableVectorsOfHandles,
6011            fidl::encoding::DefaultFuchsiaResourceDialect,
6012        > for (T0, T1)
6013    {
6014        #[inline]
6015        unsafe fn encode(
6016            self,
6017            encoder: &mut fidl::encoding::Encoder<
6018                '_,
6019                fidl::encoding::DefaultFuchsiaResourceDialect,
6020            >,
6021            offset: usize,
6022            depth: fidl::encoding::Depth,
6023        ) -> fidl::Result<()> {
6024            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6025            // Zero out padding regions. There's no need to apply masks
6026            // because the unmasked parts will be overwritten by fields.
6027            // Write the fields.
6028            self.0.encode(encoder, offset + 0, depth)?;
6029            self.1.encode(encoder, offset + 16, depth)?;
6030            Ok(())
6031        }
6032    }
6033
6034    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6035        for MultipleBoundedNullableVectorsOfHandles
6036    {
6037        #[inline(always)]
6038        fn new_empty() -> Self {
6039            Self {
6040                vh0: fidl::new_empty!(
6041                    fidl::encoding::Optional<
6042                        fidl::encoding::Vector<
6043                            fidl::encoding::HandleType<
6044                                fidl::NullableHandle,
6045                                { fidl::ObjectType::NONE.into_raw() },
6046                                2147483648,
6047                            >,
6048                            2,
6049                        >,
6050                    >,
6051                    fidl::encoding::DefaultFuchsiaResourceDialect
6052                ),
6053                vh1: fidl::new_empty!(
6054                    fidl::encoding::Optional<
6055                        fidl::encoding::Vector<
6056                            fidl::encoding::HandleType<
6057                                fidl::NullableHandle,
6058                                { fidl::ObjectType::NONE.into_raw() },
6059                                2147483648,
6060                            >,
6061                            32,
6062                        >,
6063                    >,
6064                    fidl::encoding::DefaultFuchsiaResourceDialect
6065                ),
6066            }
6067        }
6068
6069        #[inline]
6070        unsafe fn decode(
6071            &mut self,
6072            decoder: &mut fidl::encoding::Decoder<
6073                '_,
6074                fidl::encoding::DefaultFuchsiaResourceDialect,
6075            >,
6076            offset: usize,
6077            _depth: fidl::encoding::Depth,
6078        ) -> fidl::Result<()> {
6079            decoder.debug_check_bounds::<Self>(offset);
6080            // Verify that padding bytes are zero.
6081            fidl::decode!(
6082                fidl::encoding::Optional<
6083                    fidl::encoding::Vector<
6084                        fidl::encoding::HandleType<
6085                            fidl::NullableHandle,
6086                            { fidl::ObjectType::NONE.into_raw() },
6087                            2147483648,
6088                        >,
6089                        2,
6090                    >,
6091                >,
6092                fidl::encoding::DefaultFuchsiaResourceDialect,
6093                &mut self.vh0,
6094                decoder,
6095                offset + 0,
6096                _depth
6097            )?;
6098            fidl::decode!(
6099                fidl::encoding::Optional<
6100                    fidl::encoding::Vector<
6101                        fidl::encoding::HandleType<
6102                            fidl::NullableHandle,
6103                            { fidl::ObjectType::NONE.into_raw() },
6104                            2147483648,
6105                        >,
6106                        32,
6107                    >,
6108                >,
6109                fidl::encoding::DefaultFuchsiaResourceDialect,
6110                &mut self.vh1,
6111                decoder,
6112                offset + 16,
6113                _depth
6114            )?;
6115            Ok(())
6116        }
6117    }
6118
6119    impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6120        type Borrowed<'a> = &'a mut Self;
6121        fn take_or_borrow<'a>(
6122            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6123        ) -> Self::Borrowed<'a> {
6124            value
6125        }
6126    }
6127
6128    unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6129        type Owned = Self;
6130
6131        #[inline(always)]
6132        fn inline_align(_context: fidl::encoding::Context) -> usize {
6133            4
6134        }
6135
6136        #[inline(always)]
6137        fn inline_size(_context: fidl::encoding::Context) -> usize {
6138            12
6139        }
6140    }
6141
6142    unsafe impl
6143        fidl::encoding::Encode<
6144            MultipleHandleSubtypes,
6145            fidl::encoding::DefaultFuchsiaResourceDialect,
6146        > for &mut MultipleHandleSubtypes
6147    {
6148        #[inline]
6149        unsafe fn encode(
6150            self,
6151            encoder: &mut fidl::encoding::Encoder<
6152                '_,
6153                fidl::encoding::DefaultFuchsiaResourceDialect,
6154            >,
6155            offset: usize,
6156            _depth: fidl::encoding::Depth,
6157        ) -> fidl::Result<()> {
6158            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6159            // Delegate to tuple encoding.
6160            fidl::encoding::Encode::<
6161                MultipleHandleSubtypes,
6162                fidl::encoding::DefaultFuchsiaResourceDialect,
6163            >::encode(
6164                (
6165                    <fidl::encoding::HandleType<
6166                        fidl::NullableHandle,
6167                        { fidl::ObjectType::NONE.into_raw() },
6168                        2147483648,
6169                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6170                        &mut self.untyped
6171                    ),
6172                    <fidl::encoding::HandleType<
6173                        fidl::Event,
6174                        { fidl::ObjectType::EVENT.into_raw() },
6175                        2147483648,
6176                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6177                        &mut self.event
6178                    ),
6179                    <fidl::encoding::HandleType<
6180                        fidl::Channel,
6181                        { fidl::ObjectType::CHANNEL.into_raw() },
6182                        2147483648,
6183                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6184                        &mut self.channel
6185                    ),
6186                ),
6187                encoder,
6188                offset,
6189                _depth,
6190            )
6191        }
6192    }
6193    unsafe impl<
6194        T0: fidl::encoding::Encode<
6195                fidl::encoding::HandleType<
6196                    fidl::NullableHandle,
6197                    { fidl::ObjectType::NONE.into_raw() },
6198                    2147483648,
6199                >,
6200                fidl::encoding::DefaultFuchsiaResourceDialect,
6201            >,
6202        T1: fidl::encoding::Encode<
6203                fidl::encoding::HandleType<
6204                    fidl::Event,
6205                    { fidl::ObjectType::EVENT.into_raw() },
6206                    2147483648,
6207                >,
6208                fidl::encoding::DefaultFuchsiaResourceDialect,
6209            >,
6210        T2: fidl::encoding::Encode<
6211                fidl::encoding::HandleType<
6212                    fidl::Channel,
6213                    { fidl::ObjectType::CHANNEL.into_raw() },
6214                    2147483648,
6215                >,
6216                fidl::encoding::DefaultFuchsiaResourceDialect,
6217            >,
6218    >
6219        fidl::encoding::Encode<
6220            MultipleHandleSubtypes,
6221            fidl::encoding::DefaultFuchsiaResourceDialect,
6222        > for (T0, T1, T2)
6223    {
6224        #[inline]
6225        unsafe fn encode(
6226            self,
6227            encoder: &mut fidl::encoding::Encoder<
6228                '_,
6229                fidl::encoding::DefaultFuchsiaResourceDialect,
6230            >,
6231            offset: usize,
6232            depth: fidl::encoding::Depth,
6233        ) -> fidl::Result<()> {
6234            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6235            // Zero out padding regions. There's no need to apply masks
6236            // because the unmasked parts will be overwritten by fields.
6237            // Write the fields.
6238            self.0.encode(encoder, offset + 0, depth)?;
6239            self.1.encode(encoder, offset + 4, depth)?;
6240            self.2.encode(encoder, offset + 8, depth)?;
6241            Ok(())
6242        }
6243    }
6244
6245    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6246        for MultipleHandleSubtypes
6247    {
6248        #[inline(always)]
6249        fn new_empty() -> Self {
6250            Self {
6251                untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6252                event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6253                channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6254            }
6255        }
6256
6257        #[inline]
6258        unsafe fn decode(
6259            &mut self,
6260            decoder: &mut fidl::encoding::Decoder<
6261                '_,
6262                fidl::encoding::DefaultFuchsiaResourceDialect,
6263            >,
6264            offset: usize,
6265            _depth: fidl::encoding::Depth,
6266        ) -> fidl::Result<()> {
6267            decoder.debug_check_bounds::<Self>(offset);
6268            // Verify that padding bytes are zero.
6269            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6270            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6271            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6272            Ok(())
6273        }
6274    }
6275
6276    impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6277        type Borrowed<'a> = &'a mut Self;
6278        fn take_or_borrow<'a>(
6279            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6280        ) -> Self::Borrowed<'a> {
6281            value
6282        }
6283    }
6284
6285    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6286        type Owned = Self;
6287
6288        #[inline(always)]
6289        fn inline_align(_context: fidl::encoding::Context) -> usize {
6290            8
6291        }
6292
6293        #[inline(always)]
6294        fn inline_size(_context: fidl::encoding::Context) -> usize {
6295            32
6296        }
6297    }
6298
6299    unsafe impl
6300        fidl::encoding::Encode<
6301            MultipleNonnullableHandles,
6302            fidl::encoding::DefaultFuchsiaResourceDialect,
6303        > for &mut MultipleNonnullableHandles
6304    {
6305        #[inline]
6306        unsafe fn encode(
6307            self,
6308            encoder: &mut fidl::encoding::Encoder<
6309                '_,
6310                fidl::encoding::DefaultFuchsiaResourceDialect,
6311            >,
6312            offset: usize,
6313            _depth: fidl::encoding::Depth,
6314        ) -> fidl::Result<()> {
6315            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6316            // Delegate to tuple encoding.
6317            fidl::encoding::Encode::<
6318                MultipleNonnullableHandles,
6319                fidl::encoding::DefaultFuchsiaResourceDialect,
6320            >::encode(
6321                (
6322                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6323                    <fidl::encoding::HandleType<
6324                        fidl::NullableHandle,
6325                        { fidl::ObjectType::NONE.into_raw() },
6326                        2147483648,
6327                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6328                        &mut self.handle0
6329                    ),
6330                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6331                    <fidl::encoding::HandleType<
6332                        fidl::Channel,
6333                        { fidl::ObjectType::CHANNEL.into_raw() },
6334                        2147483648,
6335                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6336                        &mut self.handle1
6337                    ),
6338                    <fidl::encoding::HandleType<
6339                        fidl::Event,
6340                        { fidl::ObjectType::EVENT.into_raw() },
6341                        2147483648,
6342                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6343                        &mut self.handle2
6344                    ),
6345                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6346                ),
6347                encoder,
6348                offset,
6349                _depth,
6350            )
6351        }
6352    }
6353    unsafe impl<
6354        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6355        T1: fidl::encoding::Encode<
6356                fidl::encoding::HandleType<
6357                    fidl::NullableHandle,
6358                    { fidl::ObjectType::NONE.into_raw() },
6359                    2147483648,
6360                >,
6361                fidl::encoding::DefaultFuchsiaResourceDialect,
6362            >,
6363        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6364        T3: fidl::encoding::Encode<
6365                fidl::encoding::HandleType<
6366                    fidl::Channel,
6367                    { fidl::ObjectType::CHANNEL.into_raw() },
6368                    2147483648,
6369                >,
6370                fidl::encoding::DefaultFuchsiaResourceDialect,
6371            >,
6372        T4: fidl::encoding::Encode<
6373                fidl::encoding::HandleType<
6374                    fidl::Event,
6375                    { fidl::ObjectType::EVENT.into_raw() },
6376                    2147483648,
6377                >,
6378                fidl::encoding::DefaultFuchsiaResourceDialect,
6379            >,
6380        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6381    >
6382        fidl::encoding::Encode<
6383            MultipleNonnullableHandles,
6384            fidl::encoding::DefaultFuchsiaResourceDialect,
6385        > for (T0, T1, T2, T3, T4, T5)
6386    {
6387        #[inline]
6388        unsafe fn encode(
6389            self,
6390            encoder: &mut fidl::encoding::Encoder<
6391                '_,
6392                fidl::encoding::DefaultFuchsiaResourceDialect,
6393            >,
6394            offset: usize,
6395            depth: fidl::encoding::Depth,
6396        ) -> fidl::Result<()> {
6397            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6398            // Zero out padding regions. There's no need to apply masks
6399            // because the unmasked parts will be overwritten by fields.
6400            // Write the fields.
6401            self.0.encode(encoder, offset + 0, depth)?;
6402            self.1.encode(encoder, offset + 4, depth)?;
6403            self.2.encode(encoder, offset + 8, depth)?;
6404            self.3.encode(encoder, offset + 16, depth)?;
6405            self.4.encode(encoder, offset + 20, depth)?;
6406            self.5.encode(encoder, offset + 24, depth)?;
6407            Ok(())
6408        }
6409    }
6410
6411    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6412        for MultipleNonnullableHandles
6413    {
6414        #[inline(always)]
6415        fn new_empty() -> Self {
6416            Self {
6417                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6418                handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6419                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6420                handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6421                handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6422                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6423            }
6424        }
6425
6426        #[inline]
6427        unsafe fn decode(
6428            &mut self,
6429            decoder: &mut fidl::encoding::Decoder<
6430                '_,
6431                fidl::encoding::DefaultFuchsiaResourceDialect,
6432            >,
6433            offset: usize,
6434            _depth: fidl::encoding::Depth,
6435        ) -> fidl::Result<()> {
6436            decoder.debug_check_bounds::<Self>(offset);
6437            // Verify that padding bytes are zero.
6438            fidl::decode!(
6439                u32,
6440                fidl::encoding::DefaultFuchsiaResourceDialect,
6441                &mut self.data0,
6442                decoder,
6443                offset + 0,
6444                _depth
6445            )?;
6446            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6447            fidl::decode!(
6448                u64,
6449                fidl::encoding::DefaultFuchsiaResourceDialect,
6450                &mut self.data1,
6451                decoder,
6452                offset + 8,
6453                _depth
6454            )?;
6455            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6456            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6457            fidl::decode!(
6458                u64,
6459                fidl::encoding::DefaultFuchsiaResourceDialect,
6460                &mut self.data2,
6461                decoder,
6462                offset + 24,
6463                _depth
6464            )?;
6465            Ok(())
6466        }
6467    }
6468
6469    impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6470        type Borrowed<'a> = &'a mut Self;
6471        fn take_or_borrow<'a>(
6472            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6473        ) -> Self::Borrowed<'a> {
6474            value
6475        }
6476    }
6477
6478    unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6479        type Owned = Self;
6480
6481        #[inline(always)]
6482        fn inline_align(_context: fidl::encoding::Context) -> usize {
6483            8
6484        }
6485
6486        #[inline(always)]
6487        fn inline_size(_context: fidl::encoding::Context) -> usize {
6488            32
6489        }
6490    }
6491
6492    unsafe impl
6493        fidl::encoding::Encode<
6494            MultipleNullableHandles,
6495            fidl::encoding::DefaultFuchsiaResourceDialect,
6496        > for &mut MultipleNullableHandles
6497    {
6498        #[inline]
6499        unsafe fn encode(
6500            self,
6501            encoder: &mut fidl::encoding::Encoder<
6502                '_,
6503                fidl::encoding::DefaultFuchsiaResourceDialect,
6504            >,
6505            offset: usize,
6506            _depth: fidl::encoding::Depth,
6507        ) -> fidl::Result<()> {
6508            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6509            // Delegate to tuple encoding.
6510            fidl::encoding::Encode::<
6511                MultipleNullableHandles,
6512                fidl::encoding::DefaultFuchsiaResourceDialect,
6513            >::encode(
6514                (
6515                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6516                    <fidl::encoding::Optional<
6517                        fidl::encoding::HandleType<
6518                            fidl::NullableHandle,
6519                            { fidl::ObjectType::NONE.into_raw() },
6520                            2147483648,
6521                        >,
6522                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6523                        &mut self.handle0
6524                    ),
6525                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6526                    <fidl::encoding::Optional<
6527                        fidl::encoding::HandleType<
6528                            fidl::Channel,
6529                            { fidl::ObjectType::CHANNEL.into_raw() },
6530                            2147483648,
6531                        >,
6532                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6533                        &mut self.handle1
6534                    ),
6535                    <fidl::encoding::Optional<
6536                        fidl::encoding::HandleType<
6537                            fidl::Event,
6538                            { fidl::ObjectType::EVENT.into_raw() },
6539                            2147483648,
6540                        >,
6541                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6542                        &mut self.handle2
6543                    ),
6544                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6545                ),
6546                encoder,
6547                offset,
6548                _depth,
6549            )
6550        }
6551    }
6552    unsafe impl<
6553        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6554        T1: fidl::encoding::Encode<
6555                fidl::encoding::Optional<
6556                    fidl::encoding::HandleType<
6557                        fidl::NullableHandle,
6558                        { fidl::ObjectType::NONE.into_raw() },
6559                        2147483648,
6560                    >,
6561                >,
6562                fidl::encoding::DefaultFuchsiaResourceDialect,
6563            >,
6564        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6565        T3: fidl::encoding::Encode<
6566                fidl::encoding::Optional<
6567                    fidl::encoding::HandleType<
6568                        fidl::Channel,
6569                        { fidl::ObjectType::CHANNEL.into_raw() },
6570                        2147483648,
6571                    >,
6572                >,
6573                fidl::encoding::DefaultFuchsiaResourceDialect,
6574            >,
6575        T4: fidl::encoding::Encode<
6576                fidl::encoding::Optional<
6577                    fidl::encoding::HandleType<
6578                        fidl::Event,
6579                        { fidl::ObjectType::EVENT.into_raw() },
6580                        2147483648,
6581                    >,
6582                >,
6583                fidl::encoding::DefaultFuchsiaResourceDialect,
6584            >,
6585        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6586    >
6587        fidl::encoding::Encode<
6588            MultipleNullableHandles,
6589            fidl::encoding::DefaultFuchsiaResourceDialect,
6590        > for (T0, T1, T2, T3, T4, T5)
6591    {
6592        #[inline]
6593        unsafe fn encode(
6594            self,
6595            encoder: &mut fidl::encoding::Encoder<
6596                '_,
6597                fidl::encoding::DefaultFuchsiaResourceDialect,
6598            >,
6599            offset: usize,
6600            depth: fidl::encoding::Depth,
6601        ) -> fidl::Result<()> {
6602            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6603            // Zero out padding regions. There's no need to apply masks
6604            // because the unmasked parts will be overwritten by fields.
6605            // Write the fields.
6606            self.0.encode(encoder, offset + 0, depth)?;
6607            self.1.encode(encoder, offset + 4, depth)?;
6608            self.2.encode(encoder, offset + 8, depth)?;
6609            self.3.encode(encoder, offset + 16, depth)?;
6610            self.4.encode(encoder, offset + 20, depth)?;
6611            self.5.encode(encoder, offset + 24, depth)?;
6612            Ok(())
6613        }
6614    }
6615
6616    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6617        for MultipleNullableHandles
6618    {
6619        #[inline(always)]
6620        fn new_empty() -> Self {
6621            Self {
6622                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6623                handle0: fidl::new_empty!(
6624                    fidl::encoding::Optional<
6625                        fidl::encoding::HandleType<
6626                            fidl::NullableHandle,
6627                            { fidl::ObjectType::NONE.into_raw() },
6628                            2147483648,
6629                        >,
6630                    >,
6631                    fidl::encoding::DefaultFuchsiaResourceDialect
6632                ),
6633                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6634                handle1: fidl::new_empty!(
6635                    fidl::encoding::Optional<
6636                        fidl::encoding::HandleType<
6637                            fidl::Channel,
6638                            { fidl::ObjectType::CHANNEL.into_raw() },
6639                            2147483648,
6640                        >,
6641                    >,
6642                    fidl::encoding::DefaultFuchsiaResourceDialect
6643                ),
6644                handle2: fidl::new_empty!(
6645                    fidl::encoding::Optional<
6646                        fidl::encoding::HandleType<
6647                            fidl::Event,
6648                            { fidl::ObjectType::EVENT.into_raw() },
6649                            2147483648,
6650                        >,
6651                    >,
6652                    fidl::encoding::DefaultFuchsiaResourceDialect
6653                ),
6654                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6655            }
6656        }
6657
6658        #[inline]
6659        unsafe fn decode(
6660            &mut self,
6661            decoder: &mut fidl::encoding::Decoder<
6662                '_,
6663                fidl::encoding::DefaultFuchsiaResourceDialect,
6664            >,
6665            offset: usize,
6666            _depth: fidl::encoding::Depth,
6667        ) -> fidl::Result<()> {
6668            decoder.debug_check_bounds::<Self>(offset);
6669            // Verify that padding bytes are zero.
6670            fidl::decode!(
6671                u32,
6672                fidl::encoding::DefaultFuchsiaResourceDialect,
6673                &mut self.data0,
6674                decoder,
6675                offset + 0,
6676                _depth
6677            )?;
6678            fidl::decode!(
6679                fidl::encoding::Optional<
6680                    fidl::encoding::HandleType<
6681                        fidl::NullableHandle,
6682                        { fidl::ObjectType::NONE.into_raw() },
6683                        2147483648,
6684                    >,
6685                >,
6686                fidl::encoding::DefaultFuchsiaResourceDialect,
6687                &mut self.handle0,
6688                decoder,
6689                offset + 4,
6690                _depth
6691            )?;
6692            fidl::decode!(
6693                u64,
6694                fidl::encoding::DefaultFuchsiaResourceDialect,
6695                &mut self.data1,
6696                decoder,
6697                offset + 8,
6698                _depth
6699            )?;
6700            fidl::decode!(
6701                fidl::encoding::Optional<
6702                    fidl::encoding::HandleType<
6703                        fidl::Channel,
6704                        { fidl::ObjectType::CHANNEL.into_raw() },
6705                        2147483648,
6706                    >,
6707                >,
6708                fidl::encoding::DefaultFuchsiaResourceDialect,
6709                &mut self.handle1,
6710                decoder,
6711                offset + 16,
6712                _depth
6713            )?;
6714            fidl::decode!(
6715                fidl::encoding::Optional<
6716                    fidl::encoding::HandleType<
6717                        fidl::Event,
6718                        { fidl::ObjectType::EVENT.into_raw() },
6719                        2147483648,
6720                    >,
6721                >,
6722                fidl::encoding::DefaultFuchsiaResourceDialect,
6723                &mut self.handle2,
6724                decoder,
6725                offset + 20,
6726                _depth
6727            )?;
6728            fidl::decode!(
6729                u64,
6730                fidl::encoding::DefaultFuchsiaResourceDialect,
6731                &mut self.data2,
6732                decoder,
6733                offset + 24,
6734                _depth
6735            )?;
6736            Ok(())
6737        }
6738    }
6739
6740    impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6741        type Borrowed<'a> = &'a mut Self;
6742        fn take_or_borrow<'a>(
6743            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6744        ) -> Self::Borrowed<'a> {
6745            value
6746        }
6747    }
6748
6749    unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6750        type Owned = Self;
6751
6752        #[inline(always)]
6753        fn inline_align(_context: fidl::encoding::Context) -> usize {
6754            4
6755        }
6756
6757        #[inline(always)]
6758        fn inline_size(_context: fidl::encoding::Context) -> usize {
6759            4
6760        }
6761    }
6762
6763    unsafe impl
6764        fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6765        for &mut NonnullableHandle
6766    {
6767        #[inline]
6768        unsafe fn encode(
6769            self,
6770            encoder: &mut fidl::encoding::Encoder<
6771                '_,
6772                fidl::encoding::DefaultFuchsiaResourceDialect,
6773            >,
6774            offset: usize,
6775            _depth: fidl::encoding::Depth,
6776        ) -> fidl::Result<()> {
6777            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6778            // Delegate to tuple encoding.
6779            fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6780                (
6781                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6782                ),
6783                encoder, offset, _depth
6784            )
6785        }
6786    }
6787    unsafe impl<
6788        T0: fidl::encoding::Encode<
6789                fidl::encoding::HandleType<
6790                    fidl::NullableHandle,
6791                    { fidl::ObjectType::NONE.into_raw() },
6792                    2147483648,
6793                >,
6794                fidl::encoding::DefaultFuchsiaResourceDialect,
6795            >,
6796    > fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6797        for (T0,)
6798    {
6799        #[inline]
6800        unsafe fn encode(
6801            self,
6802            encoder: &mut fidl::encoding::Encoder<
6803                '_,
6804                fidl::encoding::DefaultFuchsiaResourceDialect,
6805            >,
6806            offset: usize,
6807            depth: fidl::encoding::Depth,
6808        ) -> fidl::Result<()> {
6809            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6810            // Zero out padding regions. There's no need to apply masks
6811            // because the unmasked parts will be overwritten by fields.
6812            // Write the fields.
6813            self.0.encode(encoder, offset + 0, depth)?;
6814            Ok(())
6815        }
6816    }
6817
6818    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6819        for NonnullableHandle
6820    {
6821        #[inline(always)]
6822        fn new_empty() -> Self {
6823            Self {
6824                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6825            }
6826        }
6827
6828        #[inline]
6829        unsafe fn decode(
6830            &mut self,
6831            decoder: &mut fidl::encoding::Decoder<
6832                '_,
6833                fidl::encoding::DefaultFuchsiaResourceDialect,
6834            >,
6835            offset: usize,
6836            _depth: fidl::encoding::Depth,
6837        ) -> fidl::Result<()> {
6838            decoder.debug_check_bounds::<Self>(offset);
6839            // Verify that padding bytes are zero.
6840            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6841            Ok(())
6842        }
6843    }
6844
6845    impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6846        type Borrowed<'a> = &'a mut Self;
6847        fn take_or_borrow<'a>(
6848            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6849        ) -> Self::Borrowed<'a> {
6850            value
6851        }
6852    }
6853
6854    unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6855        type Owned = Self;
6856
6857        #[inline(always)]
6858        fn inline_align(_context: fidl::encoding::Context) -> usize {
6859            4
6860        }
6861
6862        #[inline(always)]
6863        fn inline_size(_context: fidl::encoding::Context) -> usize {
6864            16
6865        }
6866    }
6867
6868    unsafe impl
6869        fidl::encoding::Encode<
6870            NonnullableHandleArray,
6871            fidl::encoding::DefaultFuchsiaResourceDialect,
6872        > for &mut NonnullableHandleArray
6873    {
6874        #[inline]
6875        unsafe fn encode(
6876            self,
6877            encoder: &mut fidl::encoding::Encoder<
6878                '_,
6879                fidl::encoding::DefaultFuchsiaResourceDialect,
6880            >,
6881            offset: usize,
6882            _depth: fidl::encoding::Depth,
6883        ) -> fidl::Result<()> {
6884            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6885            // Delegate to tuple encoding.
6886            fidl::encoding::Encode::<
6887                NonnullableHandleArray,
6888                fidl::encoding::DefaultFuchsiaResourceDialect,
6889            >::encode(
6890                (<fidl::encoding::Array<
6891                    fidl::encoding::HandleType<
6892                        fidl::NullableHandle,
6893                        { fidl::ObjectType::NONE.into_raw() },
6894                        2147483648,
6895                    >,
6896                    4,
6897                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6898                    &mut self.handles
6899                ),),
6900                encoder,
6901                offset,
6902                _depth,
6903            )
6904        }
6905    }
6906    unsafe impl<
6907        T0: fidl::encoding::Encode<
6908                fidl::encoding::Array<
6909                    fidl::encoding::HandleType<
6910                        fidl::NullableHandle,
6911                        { fidl::ObjectType::NONE.into_raw() },
6912                        2147483648,
6913                    >,
6914                    4,
6915                >,
6916                fidl::encoding::DefaultFuchsiaResourceDialect,
6917            >,
6918    >
6919        fidl::encoding::Encode<
6920            NonnullableHandleArray,
6921            fidl::encoding::DefaultFuchsiaResourceDialect,
6922        > for (T0,)
6923    {
6924        #[inline]
6925        unsafe fn encode(
6926            self,
6927            encoder: &mut fidl::encoding::Encoder<
6928                '_,
6929                fidl::encoding::DefaultFuchsiaResourceDialect,
6930            >,
6931            offset: usize,
6932            depth: fidl::encoding::Depth,
6933        ) -> fidl::Result<()> {
6934            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6935            // Zero out padding regions. There's no need to apply masks
6936            // because the unmasked parts will be overwritten by fields.
6937            // Write the fields.
6938            self.0.encode(encoder, offset + 0, depth)?;
6939            Ok(())
6940        }
6941    }
6942
6943    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6944        for NonnullableHandleArray
6945    {
6946        #[inline(always)]
6947        fn new_empty() -> Self {
6948            Self {
6949                handles: fidl::new_empty!(
6950                    fidl::encoding::Array<
6951                        fidl::encoding::HandleType<
6952                            fidl::NullableHandle,
6953                            { fidl::ObjectType::NONE.into_raw() },
6954                            2147483648,
6955                        >,
6956                        4,
6957                    >,
6958                    fidl::encoding::DefaultFuchsiaResourceDialect
6959                ),
6960            }
6961        }
6962
6963        #[inline]
6964        unsafe fn decode(
6965            &mut self,
6966            decoder: &mut fidl::encoding::Decoder<
6967                '_,
6968                fidl::encoding::DefaultFuchsiaResourceDialect,
6969            >,
6970            offset: usize,
6971            _depth: fidl::encoding::Depth,
6972        ) -> fidl::Result<()> {
6973            decoder.debug_check_bounds::<Self>(offset);
6974            // Verify that padding bytes are zero.
6975            fidl::decode!(
6976                fidl::encoding::Array<
6977                    fidl::encoding::HandleType<
6978                        fidl::NullableHandle,
6979                        { fidl::ObjectType::NONE.into_raw() },
6980                        2147483648,
6981                    >,
6982                    4,
6983                >,
6984                fidl::encoding::DefaultFuchsiaResourceDialect,
6985                &mut self.handles,
6986                decoder,
6987                offset + 0,
6988                _depth
6989            )?;
6990            Ok(())
6991        }
6992    }
6993
6994    impl fidl::encoding::ResourceTypeMarker for NullableHandle {
6995        type Borrowed<'a> = &'a mut Self;
6996        fn take_or_borrow<'a>(
6997            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6998        ) -> Self::Borrowed<'a> {
6999            value
7000        }
7001    }
7002
7003    unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7004        type Owned = Self;
7005
7006        #[inline(always)]
7007        fn inline_align(_context: fidl::encoding::Context) -> usize {
7008            4
7009        }
7010
7011        #[inline(always)]
7012        fn inline_size(_context: fidl::encoding::Context) -> usize {
7013            4
7014        }
7015    }
7016
7017    unsafe impl
7018        fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7019        for &mut NullableHandle
7020    {
7021        #[inline]
7022        unsafe fn encode(
7023            self,
7024            encoder: &mut fidl::encoding::Encoder<
7025                '_,
7026                fidl::encoding::DefaultFuchsiaResourceDialect,
7027            >,
7028            offset: usize,
7029            _depth: fidl::encoding::Depth,
7030        ) -> fidl::Result<()> {
7031            encoder.debug_check_bounds::<NullableHandle>(offset);
7032            // Delegate to tuple encoding.
7033            fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7034                (
7035                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7036                ),
7037                encoder, offset, _depth
7038            )
7039        }
7040    }
7041    unsafe impl<
7042        T0: fidl::encoding::Encode<
7043                fidl::encoding::Optional<
7044                    fidl::encoding::HandleType<
7045                        fidl::NullableHandle,
7046                        { fidl::ObjectType::NONE.into_raw() },
7047                        2147483648,
7048                    >,
7049                >,
7050                fidl::encoding::DefaultFuchsiaResourceDialect,
7051            >,
7052    > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7053        for (T0,)
7054    {
7055        #[inline]
7056        unsafe fn encode(
7057            self,
7058            encoder: &mut fidl::encoding::Encoder<
7059                '_,
7060                fidl::encoding::DefaultFuchsiaResourceDialect,
7061            >,
7062            offset: usize,
7063            depth: fidl::encoding::Depth,
7064        ) -> fidl::Result<()> {
7065            encoder.debug_check_bounds::<NullableHandle>(offset);
7066            // Zero out padding regions. There's no need to apply masks
7067            // because the unmasked parts will be overwritten by fields.
7068            // Write the fields.
7069            self.0.encode(encoder, offset + 0, depth)?;
7070            Ok(())
7071        }
7072    }
7073
7074    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7075        for NullableHandle
7076    {
7077        #[inline(always)]
7078        fn new_empty() -> Self {
7079            Self {
7080                h: fidl::new_empty!(
7081                    fidl::encoding::Optional<
7082                        fidl::encoding::HandleType<
7083                            fidl::NullableHandle,
7084                            { fidl::ObjectType::NONE.into_raw() },
7085                            2147483648,
7086                        >,
7087                    >,
7088                    fidl::encoding::DefaultFuchsiaResourceDialect
7089                ),
7090            }
7091        }
7092
7093        #[inline]
7094        unsafe fn decode(
7095            &mut self,
7096            decoder: &mut fidl::encoding::Decoder<
7097                '_,
7098                fidl::encoding::DefaultFuchsiaResourceDialect,
7099            >,
7100            offset: usize,
7101            _depth: fidl::encoding::Depth,
7102        ) -> fidl::Result<()> {
7103            decoder.debug_check_bounds::<Self>(offset);
7104            // Verify that padding bytes are zero.
7105            fidl::decode!(
7106                fidl::encoding::Optional<
7107                    fidl::encoding::HandleType<
7108                        fidl::NullableHandle,
7109                        { fidl::ObjectType::NONE.into_raw() },
7110                        2147483648,
7111                    >,
7112                >,
7113                fidl::encoding::DefaultFuchsiaResourceDialect,
7114                &mut self.h,
7115                decoder,
7116                offset + 0,
7117                _depth
7118            )?;
7119            Ok(())
7120        }
7121    }
7122
7123    impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7124        type Borrowed<'a> = &'a mut Self;
7125        fn take_or_borrow<'a>(
7126            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7127        ) -> Self::Borrowed<'a> {
7128            value
7129        }
7130    }
7131
7132    unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7133        type Owned = Self;
7134
7135        #[inline(always)]
7136        fn inline_align(_context: fidl::encoding::Context) -> usize {
7137            8
7138        }
7139
7140        #[inline(always)]
7141        fn inline_size(_context: fidl::encoding::Context) -> usize {
7142            8
7143        }
7144    }
7145
7146    unsafe impl
7147        fidl::encoding::Encode<
7148            OutOfLineArrayOfNonnullableHandles,
7149            fidl::encoding::DefaultFuchsiaResourceDialect,
7150        > for &mut OutOfLineArrayOfNonnullableHandles
7151    {
7152        #[inline]
7153        unsafe fn encode(
7154            self,
7155            encoder: &mut fidl::encoding::Encoder<
7156                '_,
7157                fidl::encoding::DefaultFuchsiaResourceDialect,
7158            >,
7159            offset: usize,
7160            _depth: fidl::encoding::Depth,
7161        ) -> fidl::Result<()> {
7162            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7163            // Delegate to tuple encoding.
7164            fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7165                (
7166                    <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7167                ),
7168                encoder, offset, _depth
7169            )
7170        }
7171    }
7172    unsafe impl<
7173        T0: fidl::encoding::Encode<
7174                fidl::encoding::Boxed<NonnullableHandleArray>,
7175                fidl::encoding::DefaultFuchsiaResourceDialect,
7176            >,
7177    >
7178        fidl::encoding::Encode<
7179            OutOfLineArrayOfNonnullableHandles,
7180            fidl::encoding::DefaultFuchsiaResourceDialect,
7181        > for (T0,)
7182    {
7183        #[inline]
7184        unsafe fn encode(
7185            self,
7186            encoder: &mut fidl::encoding::Encoder<
7187                '_,
7188                fidl::encoding::DefaultFuchsiaResourceDialect,
7189            >,
7190            offset: usize,
7191            depth: fidl::encoding::Depth,
7192        ) -> fidl::Result<()> {
7193            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7194            // Zero out padding regions. There's no need to apply masks
7195            // because the unmasked parts will be overwritten by fields.
7196            // Write the fields.
7197            self.0.encode(encoder, offset + 0, depth)?;
7198            Ok(())
7199        }
7200    }
7201
7202    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7203        for OutOfLineArrayOfNonnullableHandles
7204    {
7205        #[inline(always)]
7206        fn new_empty() -> Self {
7207            Self {
7208                handles: fidl::new_empty!(
7209                    fidl::encoding::Boxed<NonnullableHandleArray>,
7210                    fidl::encoding::DefaultFuchsiaResourceDialect
7211                ),
7212            }
7213        }
7214
7215        #[inline]
7216        unsafe fn decode(
7217            &mut self,
7218            decoder: &mut fidl::encoding::Decoder<
7219                '_,
7220                fidl::encoding::DefaultFuchsiaResourceDialect,
7221            >,
7222            offset: usize,
7223            _depth: fidl::encoding::Depth,
7224        ) -> fidl::Result<()> {
7225            decoder.debug_check_bounds::<Self>(offset);
7226            // Verify that padding bytes are zero.
7227            fidl::decode!(
7228                fidl::encoding::Boxed<NonnullableHandleArray>,
7229                fidl::encoding::DefaultFuchsiaResourceDialect,
7230                &mut self.handles,
7231                decoder,
7232                offset + 0,
7233                _depth
7234            )?;
7235            Ok(())
7236        }
7237    }
7238
7239    impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7240        type Borrowed<'a> = &'a mut Self;
7241        fn take_or_borrow<'a>(
7242            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7243        ) -> Self::Borrowed<'a> {
7244            value
7245        }
7246    }
7247
7248    unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7249        type Owned = Self;
7250
7251        #[inline(always)]
7252        fn inline_align(_context: fidl::encoding::Context) -> usize {
7253            8
7254        }
7255
7256        #[inline(always)]
7257        fn inline_size(_context: fidl::encoding::Context) -> usize {
7258            32
7259        }
7260    }
7261
7262    unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7263        for &mut Sandwich6
7264    {
7265        #[inline]
7266        unsafe fn encode(
7267            self,
7268            encoder: &mut fidl::encoding::Encoder<
7269                '_,
7270                fidl::encoding::DefaultFuchsiaResourceDialect,
7271            >,
7272            offset: usize,
7273            _depth: fidl::encoding::Depth,
7274        ) -> fidl::Result<()> {
7275            encoder.debug_check_bounds::<Sandwich6>(offset);
7276            // Delegate to tuple encoding.
7277            fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7278                (
7279                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7280                    <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7281                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7282                ),
7283                encoder, offset, _depth
7284            )
7285        }
7286    }
7287    unsafe impl<
7288        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7289        T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7290        T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7291    > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7292        for (T0, T1, T2)
7293    {
7294        #[inline]
7295        unsafe fn encode(
7296            self,
7297            encoder: &mut fidl::encoding::Encoder<
7298                '_,
7299                fidl::encoding::DefaultFuchsiaResourceDialect,
7300            >,
7301            offset: usize,
7302            depth: fidl::encoding::Depth,
7303        ) -> fidl::Result<()> {
7304            encoder.debug_check_bounds::<Sandwich6>(offset);
7305            // Zero out padding regions. There's no need to apply masks
7306            // because the unmasked parts will be overwritten by fields.
7307            unsafe {
7308                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7309                (ptr as *mut u64).write_unaligned(0);
7310            }
7311            unsafe {
7312                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7313                (ptr as *mut u64).write_unaligned(0);
7314            }
7315            // Write the fields.
7316            self.0.encode(encoder, offset + 0, depth)?;
7317            self.1.encode(encoder, offset + 8, depth)?;
7318            self.2.encode(encoder, offset + 24, depth)?;
7319            Ok(())
7320        }
7321    }
7322
7323    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7324        #[inline(always)]
7325        fn new_empty() -> Self {
7326            Self {
7327                before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7328                the_union: fidl::new_empty!(
7329                    UnionWithVector,
7330                    fidl::encoding::DefaultFuchsiaResourceDialect
7331                ),
7332                after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7333            }
7334        }
7335
7336        #[inline]
7337        unsafe fn decode(
7338            &mut self,
7339            decoder: &mut fidl::encoding::Decoder<
7340                '_,
7341                fidl::encoding::DefaultFuchsiaResourceDialect,
7342            >,
7343            offset: usize,
7344            _depth: fidl::encoding::Depth,
7345        ) -> fidl::Result<()> {
7346            decoder.debug_check_bounds::<Self>(offset);
7347            // Verify that padding bytes are zero.
7348            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7349            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7350            let mask = 0xffffffff00000000u64;
7351            let maskedval = padval & mask;
7352            if maskedval != 0 {
7353                return Err(fidl::Error::NonZeroPadding {
7354                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7355                });
7356            }
7357            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7358            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7359            let mask = 0xffffffff00000000u64;
7360            let maskedval = padval & mask;
7361            if maskedval != 0 {
7362                return Err(fidl::Error::NonZeroPadding {
7363                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7364                });
7365            }
7366            fidl::decode!(
7367                u32,
7368                fidl::encoding::DefaultFuchsiaResourceDialect,
7369                &mut self.before,
7370                decoder,
7371                offset + 0,
7372                _depth
7373            )?;
7374            fidl::decode!(
7375                UnionWithVector,
7376                fidl::encoding::DefaultFuchsiaResourceDialect,
7377                &mut self.the_union,
7378                decoder,
7379                offset + 8,
7380                _depth
7381            )?;
7382            fidl::decode!(
7383                u32,
7384                fidl::encoding::DefaultFuchsiaResourceDialect,
7385                &mut self.after,
7386                decoder,
7387                offset + 24,
7388                _depth
7389            )?;
7390            Ok(())
7391        }
7392    }
7393
7394    impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7395        type Borrowed<'a> = &'a mut Self;
7396        fn take_or_borrow<'a>(
7397            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7398        ) -> Self::Borrowed<'a> {
7399            value
7400        }
7401    }
7402
7403    unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7404        type Owned = Self;
7405
7406        #[inline(always)]
7407        fn inline_align(_context: fidl::encoding::Context) -> usize {
7408            8
7409        }
7410
7411        #[inline(always)]
7412        fn inline_size(_context: fidl::encoding::Context) -> usize {
7413            24
7414        }
7415    }
7416
7417    unsafe impl
7418        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7419        for &mut ShortStringThenHandle
7420    {
7421        #[inline]
7422        unsafe fn encode(
7423            self,
7424            encoder: &mut fidl::encoding::Encoder<
7425                '_,
7426                fidl::encoding::DefaultFuchsiaResourceDialect,
7427            >,
7428            offset: usize,
7429            _depth: fidl::encoding::Depth,
7430        ) -> fidl::Result<()> {
7431            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7432            // Delegate to tuple encoding.
7433            fidl::encoding::Encode::<
7434                ShortStringThenHandle,
7435                fidl::encoding::DefaultFuchsiaResourceDialect,
7436            >::encode(
7437                (
7438                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7439                        &self.s,
7440                    ),
7441                    <fidl::encoding::HandleType<
7442                        fidl::NullableHandle,
7443                        { fidl::ObjectType::NONE.into_raw() },
7444                        2147483648,
7445                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7446                        &mut self.h
7447                    ),
7448                ),
7449                encoder,
7450                offset,
7451                _depth,
7452            )
7453        }
7454    }
7455    unsafe impl<
7456        T0: fidl::encoding::Encode<
7457                fidl::encoding::BoundedString<1>,
7458                fidl::encoding::DefaultFuchsiaResourceDialect,
7459            >,
7460        T1: fidl::encoding::Encode<
7461                fidl::encoding::HandleType<
7462                    fidl::NullableHandle,
7463                    { fidl::ObjectType::NONE.into_raw() },
7464                    2147483648,
7465                >,
7466                fidl::encoding::DefaultFuchsiaResourceDialect,
7467            >,
7468    >
7469        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7470        for (T0, T1)
7471    {
7472        #[inline]
7473        unsafe fn encode(
7474            self,
7475            encoder: &mut fidl::encoding::Encoder<
7476                '_,
7477                fidl::encoding::DefaultFuchsiaResourceDialect,
7478            >,
7479            offset: usize,
7480            depth: fidl::encoding::Depth,
7481        ) -> fidl::Result<()> {
7482            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7483            // Zero out padding regions. There's no need to apply masks
7484            // because the unmasked parts will be overwritten by fields.
7485            unsafe {
7486                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7487                (ptr as *mut u64).write_unaligned(0);
7488            }
7489            // Write the fields.
7490            self.0.encode(encoder, offset + 0, depth)?;
7491            self.1.encode(encoder, offset + 16, depth)?;
7492            Ok(())
7493        }
7494    }
7495
7496    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7497        for ShortStringThenHandle
7498    {
7499        #[inline(always)]
7500        fn new_empty() -> Self {
7501            Self {
7502                s: fidl::new_empty!(
7503                    fidl::encoding::BoundedString<1>,
7504                    fidl::encoding::DefaultFuchsiaResourceDialect
7505                ),
7506                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7507            }
7508        }
7509
7510        #[inline]
7511        unsafe fn decode(
7512            &mut self,
7513            decoder: &mut fidl::encoding::Decoder<
7514                '_,
7515                fidl::encoding::DefaultFuchsiaResourceDialect,
7516            >,
7517            offset: usize,
7518            _depth: fidl::encoding::Depth,
7519        ) -> fidl::Result<()> {
7520            decoder.debug_check_bounds::<Self>(offset);
7521            // Verify that padding bytes are zero.
7522            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7523            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7524            let mask = 0xffffffff00000000u64;
7525            let maskedval = padval & mask;
7526            if maskedval != 0 {
7527                return Err(fidl::Error::NonZeroPadding {
7528                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7529                });
7530            }
7531            fidl::decode!(
7532                fidl::encoding::BoundedString<1>,
7533                fidl::encoding::DefaultFuchsiaResourceDialect,
7534                &mut self.s,
7535                decoder,
7536                offset + 0,
7537                _depth
7538            )?;
7539            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7540            Ok(())
7541        }
7542    }
7543
7544    impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7545        type Borrowed<'a> = &'a mut Self;
7546        fn take_or_borrow<'a>(
7547            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7548        ) -> Self::Borrowed<'a> {
7549            value
7550        }
7551    }
7552
7553    unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7554        type Owned = Self;
7555
7556        #[inline(always)]
7557        fn inline_align(_context: fidl::encoding::Context) -> usize {
7558            4
7559        }
7560
7561        #[inline(always)]
7562        fn inline_size(_context: fidl::encoding::Context) -> usize {
7563            4
7564        }
7565    }
7566
7567    unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7568        for &mut SingleHandle
7569    {
7570        #[inline]
7571        unsafe fn encode(
7572            self,
7573            encoder: &mut fidl::encoding::Encoder<
7574                '_,
7575                fidl::encoding::DefaultFuchsiaResourceDialect,
7576            >,
7577            offset: usize,
7578            _depth: fidl::encoding::Depth,
7579        ) -> fidl::Result<()> {
7580            encoder.debug_check_bounds::<SingleHandle>(offset);
7581            // Delegate to tuple encoding.
7582            fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7583                (
7584                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7585                ),
7586                encoder, offset, _depth
7587            )
7588        }
7589    }
7590    unsafe impl<
7591        T0: fidl::encoding::Encode<
7592                fidl::encoding::HandleType<
7593                    fidl::NullableHandle,
7594                    { fidl::ObjectType::NONE.into_raw() },
7595                    2147483648,
7596                >,
7597                fidl::encoding::DefaultFuchsiaResourceDialect,
7598            >,
7599    > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
7600    {
7601        #[inline]
7602        unsafe fn encode(
7603            self,
7604            encoder: &mut fidl::encoding::Encoder<
7605                '_,
7606                fidl::encoding::DefaultFuchsiaResourceDialect,
7607            >,
7608            offset: usize,
7609            depth: fidl::encoding::Depth,
7610        ) -> fidl::Result<()> {
7611            encoder.debug_check_bounds::<SingleHandle>(offset);
7612            // Zero out padding regions. There's no need to apply masks
7613            // because the unmasked parts will be overwritten by fields.
7614            // Write the fields.
7615            self.0.encode(encoder, offset + 0, depth)?;
7616            Ok(())
7617        }
7618    }
7619
7620    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7621        #[inline(always)]
7622        fn new_empty() -> Self {
7623            Self {
7624                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7625            }
7626        }
7627
7628        #[inline]
7629        unsafe fn decode(
7630            &mut self,
7631            decoder: &mut fidl::encoding::Decoder<
7632                '_,
7633                fidl::encoding::DefaultFuchsiaResourceDialect,
7634            >,
7635            offset: usize,
7636            _depth: fidl::encoding::Depth,
7637        ) -> fidl::Result<()> {
7638            decoder.debug_check_bounds::<Self>(offset);
7639            // Verify that padding bytes are zero.
7640            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7641            Ok(())
7642        }
7643    }
7644
7645    impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7646        type Borrowed<'a> = &'a mut Self;
7647        fn take_or_borrow<'a>(
7648            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7649        ) -> Self::Borrowed<'a> {
7650            value
7651        }
7652    }
7653
7654    unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7655        type Owned = Self;
7656
7657        #[inline(always)]
7658        fn inline_align(_context: fidl::encoding::Context) -> usize {
7659            4
7660        }
7661
7662        #[inline(always)]
7663        fn inline_size(_context: fidl::encoding::Context) -> usize {
7664            4
7665        }
7666    }
7667
7668    unsafe impl
7669        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7670        for &mut SingleOptionalHandle
7671    {
7672        #[inline]
7673        unsafe fn encode(
7674            self,
7675            encoder: &mut fidl::encoding::Encoder<
7676                '_,
7677                fidl::encoding::DefaultFuchsiaResourceDialect,
7678            >,
7679            offset: usize,
7680            _depth: fidl::encoding::Depth,
7681        ) -> fidl::Result<()> {
7682            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7683            // Delegate to tuple encoding.
7684            fidl::encoding::Encode::<
7685                SingleOptionalHandle,
7686                fidl::encoding::DefaultFuchsiaResourceDialect,
7687            >::encode(
7688                (<fidl::encoding::Optional<
7689                    fidl::encoding::HandleType<
7690                        fidl::NullableHandle,
7691                        { fidl::ObjectType::NONE.into_raw() },
7692                        2147483648,
7693                    >,
7694                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7695                    &mut self.h
7696                ),),
7697                encoder,
7698                offset,
7699                _depth,
7700            )
7701        }
7702    }
7703    unsafe impl<
7704        T0: fidl::encoding::Encode<
7705                fidl::encoding::Optional<
7706                    fidl::encoding::HandleType<
7707                        fidl::NullableHandle,
7708                        { fidl::ObjectType::NONE.into_raw() },
7709                        2147483648,
7710                    >,
7711                >,
7712                fidl::encoding::DefaultFuchsiaResourceDialect,
7713            >,
7714    >
7715        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7716        for (T0,)
7717    {
7718        #[inline]
7719        unsafe fn encode(
7720            self,
7721            encoder: &mut fidl::encoding::Encoder<
7722                '_,
7723                fidl::encoding::DefaultFuchsiaResourceDialect,
7724            >,
7725            offset: usize,
7726            depth: fidl::encoding::Depth,
7727        ) -> fidl::Result<()> {
7728            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7729            // Zero out padding regions. There's no need to apply masks
7730            // because the unmasked parts will be overwritten by fields.
7731            // Write the fields.
7732            self.0.encode(encoder, offset + 0, depth)?;
7733            Ok(())
7734        }
7735    }
7736
7737    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7738        for SingleOptionalHandle
7739    {
7740        #[inline(always)]
7741        fn new_empty() -> Self {
7742            Self {
7743                h: fidl::new_empty!(
7744                    fidl::encoding::Optional<
7745                        fidl::encoding::HandleType<
7746                            fidl::NullableHandle,
7747                            { fidl::ObjectType::NONE.into_raw() },
7748                            2147483648,
7749                        >,
7750                    >,
7751                    fidl::encoding::DefaultFuchsiaResourceDialect
7752                ),
7753            }
7754        }
7755
7756        #[inline]
7757        unsafe fn decode(
7758            &mut self,
7759            decoder: &mut fidl::encoding::Decoder<
7760                '_,
7761                fidl::encoding::DefaultFuchsiaResourceDialect,
7762            >,
7763            offset: usize,
7764            _depth: fidl::encoding::Depth,
7765        ) -> fidl::Result<()> {
7766            decoder.debug_check_bounds::<Self>(offset);
7767            // Verify that padding bytes are zero.
7768            fidl::decode!(
7769                fidl::encoding::Optional<
7770                    fidl::encoding::HandleType<
7771                        fidl::NullableHandle,
7772                        { fidl::ObjectType::NONE.into_raw() },
7773                        2147483648,
7774                    >,
7775                >,
7776                fidl::encoding::DefaultFuchsiaResourceDialect,
7777                &mut self.h,
7778                decoder,
7779                offset + 0,
7780                _depth
7781            )?;
7782            Ok(())
7783        }
7784    }
7785
7786    impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7787        type Borrowed<'a> = &'a mut Self;
7788        fn take_or_borrow<'a>(
7789            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7790        ) -> Self::Borrowed<'a> {
7791            value
7792        }
7793    }
7794
7795    unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7796        type Owned = Self;
7797
7798        #[inline(always)]
7799        fn inline_align(_context: fidl::encoding::Context) -> usize {
7800            4
7801        }
7802
7803        #[inline(always)]
7804        fn inline_size(_context: fidl::encoding::Context) -> usize {
7805            16
7806        }
7807    }
7808
7809    unsafe impl
7810        fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7811        for &mut StructOfEndpoints
7812    {
7813        #[inline]
7814        unsafe fn encode(
7815            self,
7816            encoder: &mut fidl::encoding::Encoder<
7817                '_,
7818                fidl::encoding::DefaultFuchsiaResourceDialect,
7819            >,
7820            offset: usize,
7821            _depth: fidl::encoding::Depth,
7822        ) -> fidl::Result<()> {
7823            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7824            // Delegate to tuple encoding.
7825            fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7826                (
7827                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7828                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7829                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7830                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7831                ),
7832                encoder, offset, _depth
7833            )
7834        }
7835    }
7836    unsafe impl<
7837        T0: fidl::encoding::Encode<
7838                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7839                fidl::encoding::DefaultFuchsiaResourceDialect,
7840            >,
7841        T1: fidl::encoding::Encode<
7842                fidl::encoding::Optional<
7843                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7844                >,
7845                fidl::encoding::DefaultFuchsiaResourceDialect,
7846            >,
7847        T2: fidl::encoding::Encode<
7848                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7849                fidl::encoding::DefaultFuchsiaResourceDialect,
7850            >,
7851        T3: fidl::encoding::Encode<
7852                fidl::encoding::Optional<
7853                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7854                >,
7855                fidl::encoding::DefaultFuchsiaResourceDialect,
7856            >,
7857    > fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7858        for (T0, T1, T2, T3)
7859    {
7860        #[inline]
7861        unsafe fn encode(
7862            self,
7863            encoder: &mut fidl::encoding::Encoder<
7864                '_,
7865                fidl::encoding::DefaultFuchsiaResourceDialect,
7866            >,
7867            offset: usize,
7868            depth: fidl::encoding::Depth,
7869        ) -> fidl::Result<()> {
7870            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7871            // Zero out padding regions. There's no need to apply masks
7872            // because the unmasked parts will be overwritten by fields.
7873            // Write the fields.
7874            self.0.encode(encoder, offset + 0, depth)?;
7875            self.1.encode(encoder, offset + 4, depth)?;
7876            self.2.encode(encoder, offset + 8, depth)?;
7877            self.3.encode(encoder, offset + 12, depth)?;
7878            Ok(())
7879        }
7880    }
7881
7882    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7883        for StructOfEndpoints
7884    {
7885        #[inline(always)]
7886        fn new_empty() -> Self {
7887            Self {
7888                client_end: fidl::new_empty!(
7889                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7890                    fidl::encoding::DefaultFuchsiaResourceDialect
7891                ),
7892                optional_client_end: fidl::new_empty!(
7893                    fidl::encoding::Optional<
7894                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7895                    >,
7896                    fidl::encoding::DefaultFuchsiaResourceDialect
7897                ),
7898                server_end: fidl::new_empty!(
7899                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7900                    fidl::encoding::DefaultFuchsiaResourceDialect
7901                ),
7902                optional_server_end: fidl::new_empty!(
7903                    fidl::encoding::Optional<
7904                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7905                    >,
7906                    fidl::encoding::DefaultFuchsiaResourceDialect
7907                ),
7908            }
7909        }
7910
7911        #[inline]
7912        unsafe fn decode(
7913            &mut self,
7914            decoder: &mut fidl::encoding::Decoder<
7915                '_,
7916                fidl::encoding::DefaultFuchsiaResourceDialect,
7917            >,
7918            offset: usize,
7919            _depth: fidl::encoding::Depth,
7920        ) -> fidl::Result<()> {
7921            decoder.debug_check_bounds::<Self>(offset);
7922            // Verify that padding bytes are zero.
7923            fidl::decode!(
7924                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7925                fidl::encoding::DefaultFuchsiaResourceDialect,
7926                &mut self.client_end,
7927                decoder,
7928                offset + 0,
7929                _depth
7930            )?;
7931            fidl::decode!(
7932                fidl::encoding::Optional<
7933                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7934                >,
7935                fidl::encoding::DefaultFuchsiaResourceDialect,
7936                &mut self.optional_client_end,
7937                decoder,
7938                offset + 4,
7939                _depth
7940            )?;
7941            fidl::decode!(
7942                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7943                fidl::encoding::DefaultFuchsiaResourceDialect,
7944                &mut self.server_end,
7945                decoder,
7946                offset + 8,
7947                _depth
7948            )?;
7949            fidl::decode!(
7950                fidl::encoding::Optional<
7951                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7952                >,
7953                fidl::encoding::DefaultFuchsiaResourceDialect,
7954                &mut self.optional_server_end,
7955                decoder,
7956                offset + 12,
7957                _depth
7958            )?;
7959            Ok(())
7960        }
7961    }
7962
7963    impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
7964        type Borrowed<'a> = &'a mut Self;
7965        fn take_or_borrow<'a>(
7966            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7967        ) -> Self::Borrowed<'a> {
7968            value
7969        }
7970    }
7971
7972    unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
7973        type Owned = Self;
7974
7975        #[inline(always)]
7976        fn inline_align(_context: fidl::encoding::Context) -> usize {
7977            8
7978        }
7979
7980        #[inline(always)]
7981        fn inline_size(_context: fidl::encoding::Context) -> usize {
7982            16
7983        }
7984    }
7985
7986    unsafe impl
7987        fidl::encoding::Encode<
7988            StructOfOptionalUnionOfHandle,
7989            fidl::encoding::DefaultFuchsiaResourceDialect,
7990        > for &mut StructOfOptionalUnionOfHandle
7991    {
7992        #[inline]
7993        unsafe fn encode(
7994            self,
7995            encoder: &mut fidl::encoding::Encoder<
7996                '_,
7997                fidl::encoding::DefaultFuchsiaResourceDialect,
7998            >,
7999            offset: usize,
8000            _depth: fidl::encoding::Depth,
8001        ) -> fidl::Result<()> {
8002            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8003            // Delegate to tuple encoding.
8004            fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8005                (
8006                    <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8007                ),
8008                encoder, offset, _depth
8009            )
8010        }
8011    }
8012    unsafe impl<
8013        T0: fidl::encoding::Encode<
8014                fidl::encoding::OptionalUnion<UnionOfHandle>,
8015                fidl::encoding::DefaultFuchsiaResourceDialect,
8016            >,
8017    >
8018        fidl::encoding::Encode<
8019            StructOfOptionalUnionOfHandle,
8020            fidl::encoding::DefaultFuchsiaResourceDialect,
8021        > for (T0,)
8022    {
8023        #[inline]
8024        unsafe fn encode(
8025            self,
8026            encoder: &mut fidl::encoding::Encoder<
8027                '_,
8028                fidl::encoding::DefaultFuchsiaResourceDialect,
8029            >,
8030            offset: usize,
8031            depth: fidl::encoding::Depth,
8032        ) -> fidl::Result<()> {
8033            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8034            // Zero out padding regions. There's no need to apply masks
8035            // because the unmasked parts will be overwritten by fields.
8036            // Write the fields.
8037            self.0.encode(encoder, offset + 0, depth)?;
8038            Ok(())
8039        }
8040    }
8041
8042    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8043        for StructOfOptionalUnionOfHandle
8044    {
8045        #[inline(always)]
8046        fn new_empty() -> Self {
8047            Self {
8048                u: fidl::new_empty!(
8049                    fidl::encoding::OptionalUnion<UnionOfHandle>,
8050                    fidl::encoding::DefaultFuchsiaResourceDialect
8051                ),
8052            }
8053        }
8054
8055        #[inline]
8056        unsafe fn decode(
8057            &mut self,
8058            decoder: &mut fidl::encoding::Decoder<
8059                '_,
8060                fidl::encoding::DefaultFuchsiaResourceDialect,
8061            >,
8062            offset: usize,
8063            _depth: fidl::encoding::Depth,
8064        ) -> fidl::Result<()> {
8065            decoder.debug_check_bounds::<Self>(offset);
8066            // Verify that padding bytes are zero.
8067            fidl::decode!(
8068                fidl::encoding::OptionalUnion<UnionOfHandle>,
8069                fidl::encoding::DefaultFuchsiaResourceDialect,
8070                &mut self.u,
8071                decoder,
8072                offset + 0,
8073                _depth
8074            )?;
8075            Ok(())
8076        }
8077    }
8078
8079    impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8080        type Borrowed<'a> = &'a mut Self;
8081        fn take_or_borrow<'a>(
8082            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8083        ) -> Self::Borrowed<'a> {
8084            value
8085        }
8086    }
8087
8088    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8089        type Owned = Self;
8090
8091        #[inline(always)]
8092        fn inline_align(_context: fidl::encoding::Context) -> usize {
8093            8
8094        }
8095
8096        #[inline(always)]
8097        fn inline_size(_context: fidl::encoding::Context) -> usize {
8098            16
8099        }
8100    }
8101
8102    unsafe impl
8103        fidl::encoding::Encode<
8104            StructOfSimpleResourceTable,
8105            fidl::encoding::DefaultFuchsiaResourceDialect,
8106        > for &mut StructOfSimpleResourceTable
8107    {
8108        #[inline]
8109        unsafe fn encode(
8110            self,
8111            encoder: &mut fidl::encoding::Encoder<
8112                '_,
8113                fidl::encoding::DefaultFuchsiaResourceDialect,
8114            >,
8115            offset: usize,
8116            _depth: fidl::encoding::Depth,
8117        ) -> fidl::Result<()> {
8118            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8119            // Delegate to tuple encoding.
8120            fidl::encoding::Encode::<
8121                StructOfSimpleResourceTable,
8122                fidl::encoding::DefaultFuchsiaResourceDialect,
8123            >::encode(
8124                (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8125                    &mut self.table,
8126                ),),
8127                encoder,
8128                offset,
8129                _depth,
8130            )
8131        }
8132    }
8133    unsafe impl<
8134        T0: fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
8135    >
8136        fidl::encoding::Encode<
8137            StructOfSimpleResourceTable,
8138            fidl::encoding::DefaultFuchsiaResourceDialect,
8139        > for (T0,)
8140    {
8141        #[inline]
8142        unsafe fn encode(
8143            self,
8144            encoder: &mut fidl::encoding::Encoder<
8145                '_,
8146                fidl::encoding::DefaultFuchsiaResourceDialect,
8147            >,
8148            offset: usize,
8149            depth: fidl::encoding::Depth,
8150        ) -> fidl::Result<()> {
8151            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8152            // Zero out padding regions. There's no need to apply masks
8153            // because the unmasked parts will be overwritten by fields.
8154            // Write the fields.
8155            self.0.encode(encoder, offset + 0, depth)?;
8156            Ok(())
8157        }
8158    }
8159
8160    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8161        for StructOfSimpleResourceTable
8162    {
8163        #[inline(always)]
8164        fn new_empty() -> Self {
8165            Self {
8166                table: fidl::new_empty!(
8167                    SimpleResourceTable,
8168                    fidl::encoding::DefaultFuchsiaResourceDialect
8169                ),
8170            }
8171        }
8172
8173        #[inline]
8174        unsafe fn decode(
8175            &mut self,
8176            decoder: &mut fidl::encoding::Decoder<
8177                '_,
8178                fidl::encoding::DefaultFuchsiaResourceDialect,
8179            >,
8180            offset: usize,
8181            _depth: fidl::encoding::Depth,
8182        ) -> fidl::Result<()> {
8183            decoder.debug_check_bounds::<Self>(offset);
8184            // Verify that padding bytes are zero.
8185            fidl::decode!(
8186                SimpleResourceTable,
8187                fidl::encoding::DefaultFuchsiaResourceDialect,
8188                &mut self.table,
8189                decoder,
8190                offset + 0,
8191                _depth
8192            )?;
8193            Ok(())
8194        }
8195    }
8196
8197    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8198        type Borrowed<'a> = &'a mut Self;
8199        fn take_or_borrow<'a>(
8200            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8201        ) -> Self::Borrowed<'a> {
8202            value
8203        }
8204    }
8205
8206    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8207        type Owned = Self;
8208
8209        #[inline(always)]
8210        fn inline_align(_context: fidl::encoding::Context) -> usize {
8211            8
8212        }
8213
8214        #[inline(always)]
8215        fn inline_size(_context: fidl::encoding::Context) -> usize {
8216            16
8217        }
8218    }
8219
8220    unsafe impl
8221        fidl::encoding::Encode<
8222            TableFieldInlinedHandleStruct,
8223            fidl::encoding::DefaultFuchsiaResourceDialect,
8224        > for &mut TableFieldInlinedHandleStruct
8225    {
8226        #[inline]
8227        unsafe fn encode(
8228            self,
8229            encoder: &mut fidl::encoding::Encoder<
8230                '_,
8231                fidl::encoding::DefaultFuchsiaResourceDialect,
8232            >,
8233            offset: usize,
8234            _depth: fidl::encoding::Depth,
8235        ) -> fidl::Result<()> {
8236            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8237            // Delegate to tuple encoding.
8238            fidl::encoding::Encode::<
8239                TableFieldInlinedHandleStruct,
8240                fidl::encoding::DefaultFuchsiaResourceDialect,
8241            >::encode(
8242                (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8243                    &mut self.t,
8244                ),),
8245                encoder,
8246                offset,
8247                _depth,
8248            )
8249        }
8250    }
8251    unsafe impl<
8252        T0: fidl::encoding::Encode<
8253                TableFieldInlinedHandle,
8254                fidl::encoding::DefaultFuchsiaResourceDialect,
8255            >,
8256    >
8257        fidl::encoding::Encode<
8258            TableFieldInlinedHandleStruct,
8259            fidl::encoding::DefaultFuchsiaResourceDialect,
8260        > for (T0,)
8261    {
8262        #[inline]
8263        unsafe fn encode(
8264            self,
8265            encoder: &mut fidl::encoding::Encoder<
8266                '_,
8267                fidl::encoding::DefaultFuchsiaResourceDialect,
8268            >,
8269            offset: usize,
8270            depth: fidl::encoding::Depth,
8271        ) -> fidl::Result<()> {
8272            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8273            // Zero out padding regions. There's no need to apply masks
8274            // because the unmasked parts will be overwritten by fields.
8275            // Write the fields.
8276            self.0.encode(encoder, offset + 0, depth)?;
8277            Ok(())
8278        }
8279    }
8280
8281    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8282        for TableFieldInlinedHandleStruct
8283    {
8284        #[inline(always)]
8285        fn new_empty() -> Self {
8286            Self {
8287                t: fidl::new_empty!(
8288                    TableFieldInlinedHandle,
8289                    fidl::encoding::DefaultFuchsiaResourceDialect
8290                ),
8291            }
8292        }
8293
8294        #[inline]
8295        unsafe fn decode(
8296            &mut self,
8297            decoder: &mut fidl::encoding::Decoder<
8298                '_,
8299                fidl::encoding::DefaultFuchsiaResourceDialect,
8300            >,
8301            offset: usize,
8302            _depth: fidl::encoding::Depth,
8303        ) -> fidl::Result<()> {
8304            decoder.debug_check_bounds::<Self>(offset);
8305            // Verify that padding bytes are zero.
8306            fidl::decode!(
8307                TableFieldInlinedHandle,
8308                fidl::encoding::DefaultFuchsiaResourceDialect,
8309                &mut self.t,
8310                decoder,
8311                offset + 0,
8312                _depth
8313            )?;
8314            Ok(())
8315        }
8316    }
8317
8318    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8319        type Borrowed<'a> = &'a mut Self;
8320        fn take_or_borrow<'a>(
8321            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8322        ) -> Self::Borrowed<'a> {
8323            value
8324        }
8325    }
8326
8327    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8328        type Owned = Self;
8329
8330        #[inline(always)]
8331        fn inline_align(_context: fidl::encoding::Context) -> usize {
8332            8
8333        }
8334
8335        #[inline(always)]
8336        fn inline_size(_context: fidl::encoding::Context) -> usize {
8337            16
8338        }
8339    }
8340
8341    unsafe impl
8342        fidl::encoding::Encode<
8343            TableFieldUnknownResourceStruct,
8344            fidl::encoding::DefaultFuchsiaResourceDialect,
8345        > for &mut TableFieldUnknownResourceStruct
8346    {
8347        #[inline]
8348        unsafe fn encode(
8349            self,
8350            encoder: &mut fidl::encoding::Encoder<
8351                '_,
8352                fidl::encoding::DefaultFuchsiaResourceDialect,
8353            >,
8354            offset: usize,
8355            _depth: fidl::encoding::Depth,
8356        ) -> fidl::Result<()> {
8357            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8358            // Delegate to tuple encoding.
8359            fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8360                (
8361                    <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8362                ),
8363                encoder, offset, _depth
8364            )
8365        }
8366    }
8367    unsafe impl<
8368        T0: fidl::encoding::Encode<
8369                TableFieldUnknownResource,
8370                fidl::encoding::DefaultFuchsiaResourceDialect,
8371            >,
8372    >
8373        fidl::encoding::Encode<
8374            TableFieldUnknownResourceStruct,
8375            fidl::encoding::DefaultFuchsiaResourceDialect,
8376        > for (T0,)
8377    {
8378        #[inline]
8379        unsafe fn encode(
8380            self,
8381            encoder: &mut fidl::encoding::Encoder<
8382                '_,
8383                fidl::encoding::DefaultFuchsiaResourceDialect,
8384            >,
8385            offset: usize,
8386            depth: fidl::encoding::Depth,
8387        ) -> fidl::Result<()> {
8388            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8389            // Zero out padding regions. There's no need to apply masks
8390            // because the unmasked parts will be overwritten by fields.
8391            // Write the fields.
8392            self.0.encode(encoder, offset + 0, depth)?;
8393            Ok(())
8394        }
8395    }
8396
8397    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8398        for TableFieldUnknownResourceStruct
8399    {
8400        #[inline(always)]
8401        fn new_empty() -> Self {
8402            Self {
8403                t: fidl::new_empty!(
8404                    TableFieldUnknownResource,
8405                    fidl::encoding::DefaultFuchsiaResourceDialect
8406                ),
8407            }
8408        }
8409
8410        #[inline]
8411        unsafe fn decode(
8412            &mut self,
8413            decoder: &mut fidl::encoding::Decoder<
8414                '_,
8415                fidl::encoding::DefaultFuchsiaResourceDialect,
8416            >,
8417            offset: usize,
8418            _depth: fidl::encoding::Depth,
8419        ) -> fidl::Result<()> {
8420            decoder.debug_check_bounds::<Self>(offset);
8421            // Verify that padding bytes are zero.
8422            fidl::decode!(
8423                TableFieldUnknownResource,
8424                fidl::encoding::DefaultFuchsiaResourceDialect,
8425                &mut self.t,
8426                decoder,
8427                offset + 0,
8428                _depth
8429            )?;
8430            Ok(())
8431        }
8432    }
8433
8434    impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8435        type Borrowed<'a> = &'a mut Self;
8436        fn take_or_borrow<'a>(
8437            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8438        ) -> Self::Borrowed<'a> {
8439            value
8440        }
8441    }
8442
8443    unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8444        type Owned = Self;
8445
8446        #[inline(always)]
8447        fn inline_align(_context: fidl::encoding::Context) -> usize {
8448            8
8449        }
8450
8451        #[inline(always)]
8452        fn inline_size(_context: fidl::encoding::Context) -> usize {
8453            16
8454        }
8455    }
8456
8457    unsafe impl
8458        fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8459        for &mut TableOfEndpoints
8460    {
8461        #[inline]
8462        unsafe fn encode(
8463            self,
8464            encoder: &mut fidl::encoding::Encoder<
8465                '_,
8466                fidl::encoding::DefaultFuchsiaResourceDialect,
8467            >,
8468            offset: usize,
8469            _depth: fidl::encoding::Depth,
8470        ) -> fidl::Result<()> {
8471            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8472            // Delegate to tuple encoding.
8473            fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8474                (
8475                    <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8476                ),
8477                encoder, offset, _depth
8478            )
8479        }
8480    }
8481    unsafe impl<
8482        T0: fidl::encoding::Encode<
8483                TableOfEndpointsTable,
8484                fidl::encoding::DefaultFuchsiaResourceDialect,
8485            >,
8486    > fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8487        for (T0,)
8488    {
8489        #[inline]
8490        unsafe fn encode(
8491            self,
8492            encoder: &mut fidl::encoding::Encoder<
8493                '_,
8494                fidl::encoding::DefaultFuchsiaResourceDialect,
8495            >,
8496            offset: usize,
8497            depth: fidl::encoding::Depth,
8498        ) -> fidl::Result<()> {
8499            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8500            // Zero out padding regions. There's no need to apply masks
8501            // because the unmasked parts will be overwritten by fields.
8502            // Write the fields.
8503            self.0.encode(encoder, offset + 0, depth)?;
8504            Ok(())
8505        }
8506    }
8507
8508    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8509        for TableOfEndpoints
8510    {
8511        #[inline(always)]
8512        fn new_empty() -> Self {
8513            Self {
8514                t: fidl::new_empty!(
8515                    TableOfEndpointsTable,
8516                    fidl::encoding::DefaultFuchsiaResourceDialect
8517                ),
8518            }
8519        }
8520
8521        #[inline]
8522        unsafe fn decode(
8523            &mut self,
8524            decoder: &mut fidl::encoding::Decoder<
8525                '_,
8526                fidl::encoding::DefaultFuchsiaResourceDialect,
8527            >,
8528            offset: usize,
8529            _depth: fidl::encoding::Depth,
8530        ) -> fidl::Result<()> {
8531            decoder.debug_check_bounds::<Self>(offset);
8532            // Verify that padding bytes are zero.
8533            fidl::decode!(
8534                TableOfEndpointsTable,
8535                fidl::encoding::DefaultFuchsiaResourceDialect,
8536                &mut self.t,
8537                decoder,
8538                offset + 0,
8539                _depth
8540            )?;
8541            Ok(())
8542        }
8543    }
8544
8545    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8546        type Borrowed<'a> = &'a mut Self;
8547        fn take_or_borrow<'a>(
8548            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8549        ) -> Self::Borrowed<'a> {
8550            value
8551        }
8552    }
8553
8554    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8555        type Owned = Self;
8556
8557        #[inline(always)]
8558        fn inline_align(_context: fidl::encoding::Context) -> usize {
8559            8
8560        }
8561
8562        #[inline(always)]
8563        fn inline_size(_context: fidl::encoding::Context) -> usize {
8564            16
8565        }
8566    }
8567
8568    unsafe impl
8569        fidl::encoding::Encode<
8570            TableUnionWithVectorReservedSandwichStruct,
8571            fidl::encoding::DefaultFuchsiaResourceDialect,
8572        > for &mut TableUnionWithVectorReservedSandwichStruct
8573    {
8574        #[inline]
8575        unsafe fn encode(
8576            self,
8577            encoder: &mut fidl::encoding::Encoder<
8578                '_,
8579                fidl::encoding::DefaultFuchsiaResourceDialect,
8580            >,
8581            offset: usize,
8582            _depth: fidl::encoding::Depth,
8583        ) -> fidl::Result<()> {
8584            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8585            // Delegate to tuple encoding.
8586            fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8587                (
8588                    <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8589                ),
8590                encoder, offset, _depth
8591            )
8592        }
8593    }
8594    unsafe impl<
8595        T0: fidl::encoding::Encode<
8596                TableUnionWithVectorReservedSandwich,
8597                fidl::encoding::DefaultFuchsiaResourceDialect,
8598            >,
8599    >
8600        fidl::encoding::Encode<
8601            TableUnionWithVectorReservedSandwichStruct,
8602            fidl::encoding::DefaultFuchsiaResourceDialect,
8603        > for (T0,)
8604    {
8605        #[inline]
8606        unsafe fn encode(
8607            self,
8608            encoder: &mut fidl::encoding::Encoder<
8609                '_,
8610                fidl::encoding::DefaultFuchsiaResourceDialect,
8611            >,
8612            offset: usize,
8613            depth: fidl::encoding::Depth,
8614        ) -> fidl::Result<()> {
8615            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8616            // Zero out padding regions. There's no need to apply masks
8617            // because the unmasked parts will be overwritten by fields.
8618            // Write the fields.
8619            self.0.encode(encoder, offset + 0, depth)?;
8620            Ok(())
8621        }
8622    }
8623
8624    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8625        for TableUnionWithVectorReservedSandwichStruct
8626    {
8627        #[inline(always)]
8628        fn new_empty() -> Self {
8629            Self {
8630                table: fidl::new_empty!(
8631                    TableUnionWithVectorReservedSandwich,
8632                    fidl::encoding::DefaultFuchsiaResourceDialect
8633                ),
8634            }
8635        }
8636
8637        #[inline]
8638        unsafe fn decode(
8639            &mut self,
8640            decoder: &mut fidl::encoding::Decoder<
8641                '_,
8642                fidl::encoding::DefaultFuchsiaResourceDialect,
8643            >,
8644            offset: usize,
8645            _depth: fidl::encoding::Depth,
8646        ) -> fidl::Result<()> {
8647            decoder.debug_check_bounds::<Self>(offset);
8648            // Verify that padding bytes are zero.
8649            fidl::decode!(
8650                TableUnionWithVectorReservedSandwich,
8651                fidl::encoding::DefaultFuchsiaResourceDialect,
8652                &mut self.table,
8653                decoder,
8654                offset + 0,
8655                _depth
8656            )?;
8657            Ok(())
8658        }
8659    }
8660
8661    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8662        type Borrowed<'a> = &'a mut Self;
8663        fn take_or_borrow<'a>(
8664            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8665        ) -> Self::Borrowed<'a> {
8666            value
8667        }
8668    }
8669
8670    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8671        type Owned = Self;
8672
8673        #[inline(always)]
8674        fn inline_align(_context: fidl::encoding::Context) -> usize {
8675            8
8676        }
8677
8678        #[inline(always)]
8679        fn inline_size(_context: fidl::encoding::Context) -> usize {
8680            16
8681        }
8682    }
8683
8684    unsafe impl
8685        fidl::encoding::Encode<
8686            TableUnionWithVectorStructSandwichStruct,
8687            fidl::encoding::DefaultFuchsiaResourceDialect,
8688        > for &mut TableUnionWithVectorStructSandwichStruct
8689    {
8690        #[inline]
8691        unsafe fn encode(
8692            self,
8693            encoder: &mut fidl::encoding::Encoder<
8694                '_,
8695                fidl::encoding::DefaultFuchsiaResourceDialect,
8696            >,
8697            offset: usize,
8698            _depth: fidl::encoding::Depth,
8699        ) -> fidl::Result<()> {
8700            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8701            // Delegate to tuple encoding.
8702            fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8703                (
8704                    <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8705                ),
8706                encoder, offset, _depth
8707            )
8708        }
8709    }
8710    unsafe impl<
8711        T0: fidl::encoding::Encode<
8712                TableUnionWithVectorStructSandwich,
8713                fidl::encoding::DefaultFuchsiaResourceDialect,
8714            >,
8715    >
8716        fidl::encoding::Encode<
8717            TableUnionWithVectorStructSandwichStruct,
8718            fidl::encoding::DefaultFuchsiaResourceDialect,
8719        > for (T0,)
8720    {
8721        #[inline]
8722        unsafe fn encode(
8723            self,
8724            encoder: &mut fidl::encoding::Encoder<
8725                '_,
8726                fidl::encoding::DefaultFuchsiaResourceDialect,
8727            >,
8728            offset: usize,
8729            depth: fidl::encoding::Depth,
8730        ) -> fidl::Result<()> {
8731            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8732            // Zero out padding regions. There's no need to apply masks
8733            // because the unmasked parts will be overwritten by fields.
8734            // Write the fields.
8735            self.0.encode(encoder, offset + 0, depth)?;
8736            Ok(())
8737        }
8738    }
8739
8740    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8741        for TableUnionWithVectorStructSandwichStruct
8742    {
8743        #[inline(always)]
8744        fn new_empty() -> Self {
8745            Self {
8746                table: fidl::new_empty!(
8747                    TableUnionWithVectorStructSandwich,
8748                    fidl::encoding::DefaultFuchsiaResourceDialect
8749                ),
8750            }
8751        }
8752
8753        #[inline]
8754        unsafe fn decode(
8755            &mut self,
8756            decoder: &mut fidl::encoding::Decoder<
8757                '_,
8758                fidl::encoding::DefaultFuchsiaResourceDialect,
8759            >,
8760            offset: usize,
8761            _depth: fidl::encoding::Depth,
8762        ) -> fidl::Result<()> {
8763            decoder.debug_check_bounds::<Self>(offset);
8764            // Verify that padding bytes are zero.
8765            fidl::decode!(
8766                TableUnionWithVectorStructSandwich,
8767                fidl::encoding::DefaultFuchsiaResourceDialect,
8768                &mut self.table,
8769                decoder,
8770                offset + 0,
8771                _depth
8772            )?;
8773            Ok(())
8774        }
8775    }
8776
8777    impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
8778        type Borrowed<'a> = &'a mut Self;
8779        fn take_or_borrow<'a>(
8780            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8781        ) -> Self::Borrowed<'a> {
8782            value
8783        }
8784    }
8785
8786    unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
8787        type Owned = Self;
8788
8789        #[inline(always)]
8790        fn inline_align(_context: fidl::encoding::Context) -> usize {
8791            8
8792        }
8793
8794        #[inline(always)]
8795        fn inline_size(_context: fidl::encoding::Context) -> usize {
8796            16
8797        }
8798    }
8799
8800    unsafe impl
8801        fidl::encoding::Encode<
8802            TestFlexibleResourceXUnionInStruct,
8803            fidl::encoding::DefaultFuchsiaResourceDialect,
8804        > for &mut TestFlexibleResourceXUnionInStruct
8805    {
8806        #[inline]
8807        unsafe fn encode(
8808            self,
8809            encoder: &mut fidl::encoding::Encoder<
8810                '_,
8811                fidl::encoding::DefaultFuchsiaResourceDialect,
8812            >,
8813            offset: usize,
8814            _depth: fidl::encoding::Depth,
8815        ) -> fidl::Result<()> {
8816            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8817            // Delegate to tuple encoding.
8818            fidl::encoding::Encode::<
8819                TestFlexibleResourceXUnionInStruct,
8820                fidl::encoding::DefaultFuchsiaResourceDialect,
8821            >::encode(
8822                (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8823                    &mut self.xu,
8824                ),),
8825                encoder,
8826                offset,
8827                _depth,
8828            )
8829        }
8830    }
8831    unsafe impl<
8832        T0: fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
8833    >
8834        fidl::encoding::Encode<
8835            TestFlexibleResourceXUnionInStruct,
8836            fidl::encoding::DefaultFuchsiaResourceDialect,
8837        > for (T0,)
8838    {
8839        #[inline]
8840        unsafe fn encode(
8841            self,
8842            encoder: &mut fidl::encoding::Encoder<
8843                '_,
8844                fidl::encoding::DefaultFuchsiaResourceDialect,
8845            >,
8846            offset: usize,
8847            depth: fidl::encoding::Depth,
8848        ) -> fidl::Result<()> {
8849            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8850            // Zero out padding regions. There's no need to apply masks
8851            // because the unmasked parts will be overwritten by fields.
8852            // Write the fields.
8853            self.0.encode(encoder, offset + 0, depth)?;
8854            Ok(())
8855        }
8856    }
8857
8858    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8859        for TestFlexibleResourceXUnionInStruct
8860    {
8861        #[inline(always)]
8862        fn new_empty() -> Self {
8863            Self {
8864                xu: fidl::new_empty!(
8865                    SampleResourceXUnion,
8866                    fidl::encoding::DefaultFuchsiaResourceDialect
8867                ),
8868            }
8869        }
8870
8871        #[inline]
8872        unsafe fn decode(
8873            &mut self,
8874            decoder: &mut fidl::encoding::Decoder<
8875                '_,
8876                fidl::encoding::DefaultFuchsiaResourceDialect,
8877            >,
8878            offset: usize,
8879            _depth: fidl::encoding::Depth,
8880        ) -> fidl::Result<()> {
8881            decoder.debug_check_bounds::<Self>(offset);
8882            // Verify that padding bytes are zero.
8883            fidl::decode!(
8884                SampleResourceXUnion,
8885                fidl::encoding::DefaultFuchsiaResourceDialect,
8886                &mut self.xu,
8887                decoder,
8888                offset + 0,
8889                _depth
8890            )?;
8891            Ok(())
8892        }
8893    }
8894
8895    impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8896        type Borrowed<'a> = &'a mut Self;
8897        fn take_or_borrow<'a>(
8898            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8899        ) -> Self::Borrowed<'a> {
8900            value
8901        }
8902    }
8903
8904    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8905        type Owned = Self;
8906
8907        #[inline(always)]
8908        fn inline_align(_context: fidl::encoding::Context) -> usize {
8909            8
8910        }
8911
8912        #[inline(always)]
8913        fn inline_size(_context: fidl::encoding::Context) -> usize {
8914            16
8915        }
8916    }
8917
8918    unsafe impl
8919        fidl::encoding::Encode<
8920            TestOptionalFlexibleResourceXUnionInStruct,
8921            fidl::encoding::DefaultFuchsiaResourceDialect,
8922        > for &mut TestOptionalFlexibleResourceXUnionInStruct
8923    {
8924        #[inline]
8925        unsafe fn encode(
8926            self,
8927            encoder: &mut fidl::encoding::Encoder<
8928                '_,
8929                fidl::encoding::DefaultFuchsiaResourceDialect,
8930            >,
8931            offset: usize,
8932            _depth: fidl::encoding::Depth,
8933        ) -> fidl::Result<()> {
8934            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8935            // Delegate to tuple encoding.
8936            fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8937                (
8938                    <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
8939                ),
8940                encoder, offset, _depth
8941            )
8942        }
8943    }
8944    unsafe impl<
8945        T0: fidl::encoding::Encode<
8946                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8947                fidl::encoding::DefaultFuchsiaResourceDialect,
8948            >,
8949    >
8950        fidl::encoding::Encode<
8951            TestOptionalFlexibleResourceXUnionInStruct,
8952            fidl::encoding::DefaultFuchsiaResourceDialect,
8953        > for (T0,)
8954    {
8955        #[inline]
8956        unsafe fn encode(
8957            self,
8958            encoder: &mut fidl::encoding::Encoder<
8959                '_,
8960                fidl::encoding::DefaultFuchsiaResourceDialect,
8961            >,
8962            offset: usize,
8963            depth: fidl::encoding::Depth,
8964        ) -> fidl::Result<()> {
8965            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8966            // Zero out padding regions. There's no need to apply masks
8967            // because the unmasked parts will be overwritten by fields.
8968            // Write the fields.
8969            self.0.encode(encoder, offset + 0, depth)?;
8970            Ok(())
8971        }
8972    }
8973
8974    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8975        for TestOptionalFlexibleResourceXUnionInStruct
8976    {
8977        #[inline(always)]
8978        fn new_empty() -> Self {
8979            Self {
8980                xu: fidl::new_empty!(
8981                    fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8982                    fidl::encoding::DefaultFuchsiaResourceDialect
8983                ),
8984            }
8985        }
8986
8987        #[inline]
8988        unsafe fn decode(
8989            &mut self,
8990            decoder: &mut fidl::encoding::Decoder<
8991                '_,
8992                fidl::encoding::DefaultFuchsiaResourceDialect,
8993            >,
8994            offset: usize,
8995            _depth: fidl::encoding::Depth,
8996        ) -> fidl::Result<()> {
8997            decoder.debug_check_bounds::<Self>(offset);
8998            // Verify that padding bytes are zero.
8999            fidl::decode!(
9000                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9001                fidl::encoding::DefaultFuchsiaResourceDialect,
9002                &mut self.xu,
9003                decoder,
9004                offset + 0,
9005                _depth
9006            )?;
9007            Ok(())
9008        }
9009    }
9010
9011    impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9012        type Borrowed<'a> = &'a mut Self;
9013        fn take_or_borrow<'a>(
9014            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9015        ) -> Self::Borrowed<'a> {
9016            value
9017        }
9018    }
9019
9020    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9021        type Owned = Self;
9022
9023        #[inline(always)]
9024        fn inline_align(_context: fidl::encoding::Context) -> usize {
9025            8
9026        }
9027
9028        #[inline(always)]
9029        fn inline_size(_context: fidl::encoding::Context) -> usize {
9030            16
9031        }
9032    }
9033
9034    unsafe impl
9035        fidl::encoding::Encode<
9036            TestOptionalStrictResourceXUnionInStruct,
9037            fidl::encoding::DefaultFuchsiaResourceDialect,
9038        > for &mut TestOptionalStrictResourceXUnionInStruct
9039    {
9040        #[inline]
9041        unsafe fn encode(
9042            self,
9043            encoder: &mut fidl::encoding::Encoder<
9044                '_,
9045                fidl::encoding::DefaultFuchsiaResourceDialect,
9046            >,
9047            offset: usize,
9048            _depth: fidl::encoding::Depth,
9049        ) -> fidl::Result<()> {
9050            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9051            // Delegate to tuple encoding.
9052            fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9053                (
9054                    <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9055                ),
9056                encoder, offset, _depth
9057            )
9058        }
9059    }
9060    unsafe impl<
9061        T0: fidl::encoding::Encode<
9062                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9063                fidl::encoding::DefaultFuchsiaResourceDialect,
9064            >,
9065    >
9066        fidl::encoding::Encode<
9067            TestOptionalStrictResourceXUnionInStruct,
9068            fidl::encoding::DefaultFuchsiaResourceDialect,
9069        > for (T0,)
9070    {
9071        #[inline]
9072        unsafe fn encode(
9073            self,
9074            encoder: &mut fidl::encoding::Encoder<
9075                '_,
9076                fidl::encoding::DefaultFuchsiaResourceDialect,
9077            >,
9078            offset: usize,
9079            depth: fidl::encoding::Depth,
9080        ) -> fidl::Result<()> {
9081            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9082            // Zero out padding regions. There's no need to apply masks
9083            // because the unmasked parts will be overwritten by fields.
9084            // Write the fields.
9085            self.0.encode(encoder, offset + 0, depth)?;
9086            Ok(())
9087        }
9088    }
9089
9090    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9091        for TestOptionalStrictResourceXUnionInStruct
9092    {
9093        #[inline(always)]
9094        fn new_empty() -> Self {
9095            Self {
9096                xu: fidl::new_empty!(
9097                    fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9098                    fidl::encoding::DefaultFuchsiaResourceDialect
9099                ),
9100            }
9101        }
9102
9103        #[inline]
9104        unsafe fn decode(
9105            &mut self,
9106            decoder: &mut fidl::encoding::Decoder<
9107                '_,
9108                fidl::encoding::DefaultFuchsiaResourceDialect,
9109            >,
9110            offset: usize,
9111            _depth: fidl::encoding::Depth,
9112        ) -> fidl::Result<()> {
9113            decoder.debug_check_bounds::<Self>(offset);
9114            // Verify that padding bytes are zero.
9115            fidl::decode!(
9116                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9117                fidl::encoding::DefaultFuchsiaResourceDialect,
9118                &mut self.xu,
9119                decoder,
9120                offset + 0,
9121                _depth
9122            )?;
9123            Ok(())
9124        }
9125    }
9126
9127    impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9128        type Borrowed<'a> = &'a mut Self;
9129        fn take_or_borrow<'a>(
9130            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9131        ) -> Self::Borrowed<'a> {
9132            value
9133        }
9134    }
9135
9136    unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9137        type Owned = Self;
9138
9139        #[inline(always)]
9140        fn inline_align(_context: fidl::encoding::Context) -> usize {
9141            8
9142        }
9143
9144        #[inline(always)]
9145        fn inline_size(_context: fidl::encoding::Context) -> usize {
9146            40
9147        }
9148    }
9149
9150    unsafe impl
9151        fidl::encoding::Encode<
9152            TestPackageResolverResolveRequest,
9153            fidl::encoding::DefaultFuchsiaResourceDialect,
9154        > for &mut TestPackageResolverResolveRequest
9155    {
9156        #[inline]
9157        unsafe fn encode(
9158            self,
9159            encoder: &mut fidl::encoding::Encoder<
9160                '_,
9161                fidl::encoding::DefaultFuchsiaResourceDialect,
9162            >,
9163            offset: usize,
9164            _depth: fidl::encoding::Depth,
9165        ) -> fidl::Result<()> {
9166            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9167            // Delegate to tuple encoding.
9168            fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9169                (
9170                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9171                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9172                    <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9173                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9174                ),
9175                encoder, offset, _depth
9176            )
9177        }
9178    }
9179    unsafe impl<
9180        T0: fidl::encoding::Encode<
9181                fidl::encoding::UnboundedString,
9182                fidl::encoding::DefaultFuchsiaResourceDialect,
9183            >,
9184        T1: fidl::encoding::Encode<
9185                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9186                fidl::encoding::DefaultFuchsiaResourceDialect,
9187            >,
9188        T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9189        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9190    >
9191        fidl::encoding::Encode<
9192            TestPackageResolverResolveRequest,
9193            fidl::encoding::DefaultFuchsiaResourceDialect,
9194        > for (T0, T1, T2, T3)
9195    {
9196        #[inline]
9197        unsafe fn encode(
9198            self,
9199            encoder: &mut fidl::encoding::Encoder<
9200                '_,
9201                fidl::encoding::DefaultFuchsiaResourceDialect,
9202            >,
9203            offset: usize,
9204            depth: fidl::encoding::Depth,
9205        ) -> fidl::Result<()> {
9206            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9207            // Zero out padding regions. There's no need to apply masks
9208            // because the unmasked parts will be overwritten by fields.
9209            unsafe {
9210                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9211                (ptr as *mut u64).write_unaligned(0);
9212            }
9213            // Write the fields.
9214            self.0.encode(encoder, offset + 0, depth)?;
9215            self.1.encode(encoder, offset + 16, depth)?;
9216            self.2.encode(encoder, offset + 32, depth)?;
9217            self.3.encode(encoder, offset + 36, depth)?;
9218            Ok(())
9219        }
9220    }
9221
9222    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9223        for TestPackageResolverResolveRequest
9224    {
9225        #[inline(always)]
9226        fn new_empty() -> Self {
9227            Self {
9228                package_url: fidl::new_empty!(
9229                    fidl::encoding::UnboundedString,
9230                    fidl::encoding::DefaultFuchsiaResourceDialect
9231                ),
9232                selectors: fidl::new_empty!(
9233                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9234                    fidl::encoding::DefaultFuchsiaResourceDialect
9235                ),
9236                update_policy: fidl::new_empty!(
9237                    UpdatePolicy,
9238                    fidl::encoding::DefaultFuchsiaResourceDialect
9239                ),
9240                this_should_be_a_handle: fidl::new_empty!(
9241                    u32,
9242                    fidl::encoding::DefaultFuchsiaResourceDialect
9243                ),
9244            }
9245        }
9246
9247        #[inline]
9248        unsafe fn decode(
9249            &mut self,
9250            decoder: &mut fidl::encoding::Decoder<
9251                '_,
9252                fidl::encoding::DefaultFuchsiaResourceDialect,
9253            >,
9254            offset: usize,
9255            _depth: fidl::encoding::Depth,
9256        ) -> fidl::Result<()> {
9257            decoder.debug_check_bounds::<Self>(offset);
9258            // Verify that padding bytes are zero.
9259            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9260            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9261            let mask = 0xffff0000u64;
9262            let maskedval = padval & mask;
9263            if maskedval != 0 {
9264                return Err(fidl::Error::NonZeroPadding {
9265                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9266                });
9267            }
9268            fidl::decode!(
9269                fidl::encoding::UnboundedString,
9270                fidl::encoding::DefaultFuchsiaResourceDialect,
9271                &mut self.package_url,
9272                decoder,
9273                offset + 0,
9274                _depth
9275            )?;
9276            fidl::decode!(
9277                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9278                fidl::encoding::DefaultFuchsiaResourceDialect,
9279                &mut self.selectors,
9280                decoder,
9281                offset + 16,
9282                _depth
9283            )?;
9284            fidl::decode!(
9285                UpdatePolicy,
9286                fidl::encoding::DefaultFuchsiaResourceDialect,
9287                &mut self.update_policy,
9288                decoder,
9289                offset + 32,
9290                _depth
9291            )?;
9292            fidl::decode!(
9293                u32,
9294                fidl::encoding::DefaultFuchsiaResourceDialect,
9295                &mut self.this_should_be_a_handle,
9296                decoder,
9297                offset + 36,
9298                _depth
9299            )?;
9300            Ok(())
9301        }
9302    }
9303
9304    impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
9305        type Borrowed<'a> = &'a mut Self;
9306        fn take_or_borrow<'a>(
9307            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9308        ) -> Self::Borrowed<'a> {
9309            value
9310        }
9311    }
9312
9313    unsafe impl fidl::encoding::TypeMarker for TestStrictResourceXUnionInStruct {
9314        type Owned = Self;
9315
9316        #[inline(always)]
9317        fn inline_align(_context: fidl::encoding::Context) -> usize {
9318            8
9319        }
9320
9321        #[inline(always)]
9322        fn inline_size(_context: fidl::encoding::Context) -> usize {
9323            16
9324        }
9325    }
9326
9327    unsafe impl
9328        fidl::encoding::Encode<
9329            TestStrictResourceXUnionInStruct,
9330            fidl::encoding::DefaultFuchsiaResourceDialect,
9331        > for &mut TestStrictResourceXUnionInStruct
9332    {
9333        #[inline]
9334        unsafe fn encode(
9335            self,
9336            encoder: &mut fidl::encoding::Encoder<
9337                '_,
9338                fidl::encoding::DefaultFuchsiaResourceDialect,
9339            >,
9340            offset: usize,
9341            _depth: fidl::encoding::Depth,
9342        ) -> fidl::Result<()> {
9343            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9344            // Delegate to tuple encoding.
9345            fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9346                (
9347                    <SampleStrictResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9348                ),
9349                encoder, offset, _depth
9350            )
9351        }
9352    }
9353    unsafe impl<
9354        T0: fidl::encoding::Encode<
9355                SampleStrictResourceXUnion,
9356                fidl::encoding::DefaultFuchsiaResourceDialect,
9357            >,
9358    >
9359        fidl::encoding::Encode<
9360            TestStrictResourceXUnionInStruct,
9361            fidl::encoding::DefaultFuchsiaResourceDialect,
9362        > for (T0,)
9363    {
9364        #[inline]
9365        unsafe fn encode(
9366            self,
9367            encoder: &mut fidl::encoding::Encoder<
9368                '_,
9369                fidl::encoding::DefaultFuchsiaResourceDialect,
9370            >,
9371            offset: usize,
9372            depth: fidl::encoding::Depth,
9373        ) -> fidl::Result<()> {
9374            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9375            // Zero out padding regions. There's no need to apply masks
9376            // because the unmasked parts will be overwritten by fields.
9377            // Write the fields.
9378            self.0.encode(encoder, offset + 0, depth)?;
9379            Ok(())
9380        }
9381    }
9382
9383    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9384        for TestStrictResourceXUnionInStruct
9385    {
9386        #[inline(always)]
9387        fn new_empty() -> Self {
9388            Self {
9389                xu: fidl::new_empty!(
9390                    SampleStrictResourceXUnion,
9391                    fidl::encoding::DefaultFuchsiaResourceDialect
9392                ),
9393            }
9394        }
9395
9396        #[inline]
9397        unsafe fn decode(
9398            &mut self,
9399            decoder: &mut fidl::encoding::Decoder<
9400                '_,
9401                fidl::encoding::DefaultFuchsiaResourceDialect,
9402            >,
9403            offset: usize,
9404            _depth: fidl::encoding::Depth,
9405        ) -> fidl::Result<()> {
9406            decoder.debug_check_bounds::<Self>(offset);
9407            // Verify that padding bytes are zero.
9408            fidl::decode!(
9409                SampleStrictResourceXUnion,
9410                fidl::encoding::DefaultFuchsiaResourceDialect,
9411                &mut self.xu,
9412                decoder,
9413                offset + 0,
9414                _depth
9415            )?;
9416            Ok(())
9417        }
9418    }
9419
9420    impl fidl::encoding::ResourceTypeMarker for UnboundedNonnullableVectorOfHandles {
9421        type Borrowed<'a> = &'a mut Self;
9422        fn take_or_borrow<'a>(
9423            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9424        ) -> Self::Borrowed<'a> {
9425            value
9426        }
9427    }
9428
9429    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfHandles {
9430        type Owned = Self;
9431
9432        #[inline(always)]
9433        fn inline_align(_context: fidl::encoding::Context) -> usize {
9434            8
9435        }
9436
9437        #[inline(always)]
9438        fn inline_size(_context: fidl::encoding::Context) -> usize {
9439            16
9440        }
9441    }
9442
9443    unsafe impl
9444        fidl::encoding::Encode<
9445            UnboundedNonnullableVectorOfHandles,
9446            fidl::encoding::DefaultFuchsiaResourceDialect,
9447        > for &mut UnboundedNonnullableVectorOfHandles
9448    {
9449        #[inline]
9450        unsafe fn encode(
9451            self,
9452            encoder: &mut fidl::encoding::Encoder<
9453                '_,
9454                fidl::encoding::DefaultFuchsiaResourceDialect,
9455            >,
9456            offset: usize,
9457            _depth: fidl::encoding::Depth,
9458        ) -> fidl::Result<()> {
9459            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9460            // Delegate to tuple encoding.
9461            fidl::encoding::Encode::<
9462                UnboundedNonnullableVectorOfHandles,
9463                fidl::encoding::DefaultFuchsiaResourceDialect,
9464            >::encode(
9465                (<fidl::encoding::UnboundedVector<
9466                    fidl::encoding::HandleType<
9467                        fidl::NullableHandle,
9468                        { fidl::ObjectType::NONE.into_raw() },
9469                        2147483648,
9470                    >,
9471                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9472                    &mut self.vh0
9473                ),),
9474                encoder,
9475                offset,
9476                _depth,
9477            )
9478        }
9479    }
9480    unsafe impl<
9481        T0: fidl::encoding::Encode<
9482                fidl::encoding::UnboundedVector<
9483                    fidl::encoding::HandleType<
9484                        fidl::NullableHandle,
9485                        { fidl::ObjectType::NONE.into_raw() },
9486                        2147483648,
9487                    >,
9488                >,
9489                fidl::encoding::DefaultFuchsiaResourceDialect,
9490            >,
9491    >
9492        fidl::encoding::Encode<
9493            UnboundedNonnullableVectorOfHandles,
9494            fidl::encoding::DefaultFuchsiaResourceDialect,
9495        > for (T0,)
9496    {
9497        #[inline]
9498        unsafe fn encode(
9499            self,
9500            encoder: &mut fidl::encoding::Encoder<
9501                '_,
9502                fidl::encoding::DefaultFuchsiaResourceDialect,
9503            >,
9504            offset: usize,
9505            depth: fidl::encoding::Depth,
9506        ) -> fidl::Result<()> {
9507            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9508            // Zero out padding regions. There's no need to apply masks
9509            // because the unmasked parts will be overwritten by fields.
9510            // Write the fields.
9511            self.0.encode(encoder, offset + 0, depth)?;
9512            Ok(())
9513        }
9514    }
9515
9516    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9517        for UnboundedNonnullableVectorOfHandles
9518    {
9519        #[inline(always)]
9520        fn new_empty() -> Self {
9521            Self {
9522                vh0: fidl::new_empty!(
9523                    fidl::encoding::UnboundedVector<
9524                        fidl::encoding::HandleType<
9525                            fidl::NullableHandle,
9526                            { fidl::ObjectType::NONE.into_raw() },
9527                            2147483648,
9528                        >,
9529                    >,
9530                    fidl::encoding::DefaultFuchsiaResourceDialect
9531                ),
9532            }
9533        }
9534
9535        #[inline]
9536        unsafe fn decode(
9537            &mut self,
9538            decoder: &mut fidl::encoding::Decoder<
9539                '_,
9540                fidl::encoding::DefaultFuchsiaResourceDialect,
9541            >,
9542            offset: usize,
9543            _depth: fidl::encoding::Depth,
9544        ) -> fidl::Result<()> {
9545            decoder.debug_check_bounds::<Self>(offset);
9546            // Verify that padding bytes are zero.
9547            fidl::decode!(
9548                fidl::encoding::UnboundedVector<
9549                    fidl::encoding::HandleType<
9550                        fidl::NullableHandle,
9551                        { fidl::ObjectType::NONE.into_raw() },
9552                        2147483648,
9553                    >,
9554                >,
9555                fidl::encoding::DefaultFuchsiaResourceDialect,
9556                &mut self.vh0,
9557                decoder,
9558                offset + 0,
9559                _depth
9560            )?;
9561            Ok(())
9562        }
9563    }
9564
9565    impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9566        type Borrowed<'a> = &'a mut Self;
9567        fn take_or_borrow<'a>(
9568            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9569        ) -> Self::Borrowed<'a> {
9570            value
9571        }
9572    }
9573
9574    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9575        type Owned = Self;
9576
9577        #[inline(always)]
9578        fn inline_align(_context: fidl::encoding::Context) -> usize {
9579            8
9580        }
9581
9582        #[inline(always)]
9583        fn inline_size(_context: fidl::encoding::Context) -> usize {
9584            16
9585        }
9586    }
9587
9588    unsafe impl
9589        fidl::encoding::Encode<
9590            UnboundedNullableVectorOfHandles,
9591            fidl::encoding::DefaultFuchsiaResourceDialect,
9592        > for &mut UnboundedNullableVectorOfHandles
9593    {
9594        #[inline]
9595        unsafe fn encode(
9596            self,
9597            encoder: &mut fidl::encoding::Encoder<
9598                '_,
9599                fidl::encoding::DefaultFuchsiaResourceDialect,
9600            >,
9601            offset: usize,
9602            _depth: fidl::encoding::Depth,
9603        ) -> fidl::Result<()> {
9604            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9605            // Delegate to tuple encoding.
9606            fidl::encoding::Encode::<
9607                UnboundedNullableVectorOfHandles,
9608                fidl::encoding::DefaultFuchsiaResourceDialect,
9609            >::encode(
9610                (<fidl::encoding::Optional<
9611                    fidl::encoding::UnboundedVector<
9612                        fidl::encoding::HandleType<
9613                            fidl::NullableHandle,
9614                            { fidl::ObjectType::NONE.into_raw() },
9615                            2147483648,
9616                        >,
9617                    >,
9618                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9619                    &mut self.vh0
9620                ),),
9621                encoder,
9622                offset,
9623                _depth,
9624            )
9625        }
9626    }
9627    unsafe impl<
9628        T0: fidl::encoding::Encode<
9629                fidl::encoding::Optional<
9630                    fidl::encoding::UnboundedVector<
9631                        fidl::encoding::HandleType<
9632                            fidl::NullableHandle,
9633                            { fidl::ObjectType::NONE.into_raw() },
9634                            2147483648,
9635                        >,
9636                    >,
9637                >,
9638                fidl::encoding::DefaultFuchsiaResourceDialect,
9639            >,
9640    >
9641        fidl::encoding::Encode<
9642            UnboundedNullableVectorOfHandles,
9643            fidl::encoding::DefaultFuchsiaResourceDialect,
9644        > for (T0,)
9645    {
9646        #[inline]
9647        unsafe fn encode(
9648            self,
9649            encoder: &mut fidl::encoding::Encoder<
9650                '_,
9651                fidl::encoding::DefaultFuchsiaResourceDialect,
9652            >,
9653            offset: usize,
9654            depth: fidl::encoding::Depth,
9655        ) -> fidl::Result<()> {
9656            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9657            // Zero out padding regions. There's no need to apply masks
9658            // because the unmasked parts will be overwritten by fields.
9659            // Write the fields.
9660            self.0.encode(encoder, offset + 0, depth)?;
9661            Ok(())
9662        }
9663    }
9664
9665    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9666        for UnboundedNullableVectorOfHandles
9667    {
9668        #[inline(always)]
9669        fn new_empty() -> Self {
9670            Self {
9671                vh0: fidl::new_empty!(
9672                    fidl::encoding::Optional<
9673                        fidl::encoding::UnboundedVector<
9674                            fidl::encoding::HandleType<
9675                                fidl::NullableHandle,
9676                                { fidl::ObjectType::NONE.into_raw() },
9677                                2147483648,
9678                            >,
9679                        >,
9680                    >,
9681                    fidl::encoding::DefaultFuchsiaResourceDialect
9682                ),
9683            }
9684        }
9685
9686        #[inline]
9687        unsafe fn decode(
9688            &mut self,
9689            decoder: &mut fidl::encoding::Decoder<
9690                '_,
9691                fidl::encoding::DefaultFuchsiaResourceDialect,
9692            >,
9693            offset: usize,
9694            _depth: fidl::encoding::Depth,
9695        ) -> fidl::Result<()> {
9696            decoder.debug_check_bounds::<Self>(offset);
9697            // Verify that padding bytes are zero.
9698            fidl::decode!(
9699                fidl::encoding::Optional<
9700                    fidl::encoding::UnboundedVector<
9701                        fidl::encoding::HandleType<
9702                            fidl::NullableHandle,
9703                            { fidl::ObjectType::NONE.into_raw() },
9704                            2147483648,
9705                        >,
9706                    >,
9707                >,
9708                fidl::encoding::DefaultFuchsiaResourceDialect,
9709                &mut self.vh0,
9710                decoder,
9711                offset + 0,
9712                _depth
9713            )?;
9714            Ok(())
9715        }
9716    }
9717
9718    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
9719        type Borrowed<'a> = &'a mut Self;
9720        fn take_or_borrow<'a>(
9721            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9722        ) -> Self::Borrowed<'a> {
9723            value
9724        }
9725    }
9726
9727    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
9728        type Owned = Self;
9729
9730        #[inline(always)]
9731        fn inline_align(_context: fidl::encoding::Context) -> usize {
9732            8
9733        }
9734
9735        #[inline(always)]
9736        fn inline_size(_context: fidl::encoding::Context) -> usize {
9737            16
9738        }
9739    }
9740
9741    unsafe impl
9742        fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9743        for &mut UnionOfEndpoints
9744    {
9745        #[inline]
9746        unsafe fn encode(
9747            self,
9748            encoder: &mut fidl::encoding::Encoder<
9749                '_,
9750                fidl::encoding::DefaultFuchsiaResourceDialect,
9751            >,
9752            offset: usize,
9753            _depth: fidl::encoding::Depth,
9754        ) -> fidl::Result<()> {
9755            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9756            // Delegate to tuple encoding.
9757            fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9758                (
9759                    <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
9760                ),
9761                encoder, offset, _depth
9762            )
9763        }
9764    }
9765    unsafe impl<
9766        T0: fidl::encoding::Encode<
9767                UnionOfEndpointsUnion,
9768                fidl::encoding::DefaultFuchsiaResourceDialect,
9769            >,
9770    > fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9771        for (T0,)
9772    {
9773        #[inline]
9774        unsafe fn encode(
9775            self,
9776            encoder: &mut fidl::encoding::Encoder<
9777                '_,
9778                fidl::encoding::DefaultFuchsiaResourceDialect,
9779            >,
9780            offset: usize,
9781            depth: fidl::encoding::Depth,
9782        ) -> fidl::Result<()> {
9783            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9784            // Zero out padding regions. There's no need to apply masks
9785            // because the unmasked parts will be overwritten by fields.
9786            // Write the fields.
9787            self.0.encode(encoder, offset + 0, depth)?;
9788            Ok(())
9789        }
9790    }
9791
9792    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9793        for UnionOfEndpoints
9794    {
9795        #[inline(always)]
9796        fn new_empty() -> Self {
9797            Self {
9798                u: fidl::new_empty!(
9799                    UnionOfEndpointsUnion,
9800                    fidl::encoding::DefaultFuchsiaResourceDialect
9801                ),
9802            }
9803        }
9804
9805        #[inline]
9806        unsafe fn decode(
9807            &mut self,
9808            decoder: &mut fidl::encoding::Decoder<
9809                '_,
9810                fidl::encoding::DefaultFuchsiaResourceDialect,
9811            >,
9812            offset: usize,
9813            _depth: fidl::encoding::Depth,
9814        ) -> fidl::Result<()> {
9815            decoder.debug_check_bounds::<Self>(offset);
9816            // Verify that padding bytes are zero.
9817            fidl::decode!(
9818                UnionOfEndpointsUnion,
9819                fidl::encoding::DefaultFuchsiaResourceDialect,
9820                &mut self.u,
9821                decoder,
9822                offset + 0,
9823                _depth
9824            )?;
9825            Ok(())
9826        }
9827    }
9828
9829    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9830        type Borrowed<'a> = &'a mut Self;
9831        fn take_or_borrow<'a>(
9832            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9833        ) -> Self::Borrowed<'a> {
9834            value
9835        }
9836    }
9837
9838    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9839        type Owned = Self;
9840
9841        #[inline(always)]
9842        fn inline_align(_context: fidl::encoding::Context) -> usize {
9843            8
9844        }
9845
9846        #[inline(always)]
9847        fn inline_size(_context: fidl::encoding::Context) -> usize {
9848            16
9849        }
9850    }
9851
9852    unsafe impl
9853        fidl::encoding::Encode<
9854            VectorOfArrayOfEventInStructWithDefaultRights,
9855            fidl::encoding::DefaultFuchsiaResourceDialect,
9856        > for &mut VectorOfArrayOfEventInStructWithDefaultRights
9857    {
9858        #[inline]
9859        unsafe fn encode(
9860            self,
9861            encoder: &mut fidl::encoding::Encoder<
9862                '_,
9863                fidl::encoding::DefaultFuchsiaResourceDialect,
9864            >,
9865            offset: usize,
9866            _depth: fidl::encoding::Depth,
9867        ) -> fidl::Result<()> {
9868            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9869            // Delegate to tuple encoding.
9870            fidl::encoding::Encode::<
9871                VectorOfArrayOfEventInStructWithDefaultRights,
9872                fidl::encoding::DefaultFuchsiaResourceDialect,
9873            >::encode(
9874                (<fidl::encoding::Vector<
9875                    fidl::encoding::Array<
9876                        fidl::encoding::HandleType<
9877                            fidl::Event,
9878                            { fidl::ObjectType::EVENT.into_raw() },
9879                            53251,
9880                        >,
9881                        1,
9882                    >,
9883                    1,
9884                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9885                    &mut self.h
9886                ),),
9887                encoder,
9888                offset,
9889                _depth,
9890            )
9891        }
9892    }
9893    unsafe impl<
9894        T0: fidl::encoding::Encode<
9895                fidl::encoding::Vector<
9896                    fidl::encoding::Array<
9897                        fidl::encoding::HandleType<
9898                            fidl::Event,
9899                            { fidl::ObjectType::EVENT.into_raw() },
9900                            53251,
9901                        >,
9902                        1,
9903                    >,
9904                    1,
9905                >,
9906                fidl::encoding::DefaultFuchsiaResourceDialect,
9907            >,
9908    >
9909        fidl::encoding::Encode<
9910            VectorOfArrayOfEventInStructWithDefaultRights,
9911            fidl::encoding::DefaultFuchsiaResourceDialect,
9912        > for (T0,)
9913    {
9914        #[inline]
9915        unsafe fn encode(
9916            self,
9917            encoder: &mut fidl::encoding::Encoder<
9918                '_,
9919                fidl::encoding::DefaultFuchsiaResourceDialect,
9920            >,
9921            offset: usize,
9922            depth: fidl::encoding::Depth,
9923        ) -> fidl::Result<()> {
9924            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9925            // Zero out padding regions. There's no need to apply masks
9926            // because the unmasked parts will be overwritten by fields.
9927            // Write the fields.
9928            self.0.encode(encoder, offset + 0, depth)?;
9929            Ok(())
9930        }
9931    }
9932
9933    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9934        for VectorOfArrayOfEventInStructWithDefaultRights
9935    {
9936        #[inline(always)]
9937        fn new_empty() -> Self {
9938            Self {
9939                h: fidl::new_empty!(
9940                    fidl::encoding::Vector<
9941                        fidl::encoding::Array<
9942                            fidl::encoding::HandleType<
9943                                fidl::Event,
9944                                { fidl::ObjectType::EVENT.into_raw() },
9945                                53251,
9946                            >,
9947                            1,
9948                        >,
9949                        1,
9950                    >,
9951                    fidl::encoding::DefaultFuchsiaResourceDialect
9952                ),
9953            }
9954        }
9955
9956        #[inline]
9957        unsafe fn decode(
9958            &mut self,
9959            decoder: &mut fidl::encoding::Decoder<
9960                '_,
9961                fidl::encoding::DefaultFuchsiaResourceDialect,
9962            >,
9963            offset: usize,
9964            _depth: fidl::encoding::Depth,
9965        ) -> fidl::Result<()> {
9966            decoder.debug_check_bounds::<Self>(offset);
9967            // Verify that padding bytes are zero.
9968            fidl::decode!(
9969                fidl::encoding::Vector<
9970                    fidl::encoding::Array<
9971                        fidl::encoding::HandleType<
9972                            fidl::Event,
9973                            { fidl::ObjectType::EVENT.into_raw() },
9974                            53251,
9975                        >,
9976                        1,
9977                    >,
9978                    1,
9979                >,
9980                fidl::encoding::DefaultFuchsiaResourceDialect,
9981                &mut self.h,
9982                decoder,
9983                offset + 0,
9984                _depth
9985            )?;
9986            Ok(())
9987        }
9988    }
9989
9990    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
9991        type Borrowed<'a> = &'a mut Self;
9992        fn take_or_borrow<'a>(
9993            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9994        ) -> Self::Borrowed<'a> {
9995            value
9996        }
9997    }
9998
9999    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10000        type Owned = Self;
10001
10002        #[inline(always)]
10003        fn inline_align(_context: fidl::encoding::Context) -> usize {
10004            8
10005        }
10006
10007        #[inline(always)]
10008        fn inline_size(_context: fidl::encoding::Context) -> usize {
10009            16
10010        }
10011    }
10012
10013    unsafe impl
10014        fidl::encoding::Encode<
10015            VectorOfArrayOfEventInStructWithReducedRights,
10016            fidl::encoding::DefaultFuchsiaResourceDialect,
10017        > for &mut VectorOfArrayOfEventInStructWithReducedRights
10018    {
10019        #[inline]
10020        unsafe fn encode(
10021            self,
10022            encoder: &mut fidl::encoding::Encoder<
10023                '_,
10024                fidl::encoding::DefaultFuchsiaResourceDialect,
10025            >,
10026            offset: usize,
10027            _depth: fidl::encoding::Depth,
10028        ) -> fidl::Result<()> {
10029            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10030            // Delegate to tuple encoding.
10031            fidl::encoding::Encode::<
10032                VectorOfArrayOfEventInStructWithReducedRights,
10033                fidl::encoding::DefaultFuchsiaResourceDialect,
10034            >::encode(
10035                (<fidl::encoding::Vector<
10036                    fidl::encoding::Array<
10037                        fidl::encoding::HandleType<
10038                            fidl::Event,
10039                            { fidl::ObjectType::EVENT.into_raw() },
10040                            49155,
10041                        >,
10042                        1,
10043                    >,
10044                    1,
10045                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10046                    &mut self.h
10047                ),),
10048                encoder,
10049                offset,
10050                _depth,
10051            )
10052        }
10053    }
10054    unsafe impl<
10055        T0: fidl::encoding::Encode<
10056                fidl::encoding::Vector<
10057                    fidl::encoding::Array<
10058                        fidl::encoding::HandleType<
10059                            fidl::Event,
10060                            { fidl::ObjectType::EVENT.into_raw() },
10061                            49155,
10062                        >,
10063                        1,
10064                    >,
10065                    1,
10066                >,
10067                fidl::encoding::DefaultFuchsiaResourceDialect,
10068            >,
10069    >
10070        fidl::encoding::Encode<
10071            VectorOfArrayOfEventInStructWithReducedRights,
10072            fidl::encoding::DefaultFuchsiaResourceDialect,
10073        > for (T0,)
10074    {
10075        #[inline]
10076        unsafe fn encode(
10077            self,
10078            encoder: &mut fidl::encoding::Encoder<
10079                '_,
10080                fidl::encoding::DefaultFuchsiaResourceDialect,
10081            >,
10082            offset: usize,
10083            depth: fidl::encoding::Depth,
10084        ) -> fidl::Result<()> {
10085            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10086            // Zero out padding regions. There's no need to apply masks
10087            // because the unmasked parts will be overwritten by fields.
10088            // Write the fields.
10089            self.0.encode(encoder, offset + 0, depth)?;
10090            Ok(())
10091        }
10092    }
10093
10094    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10095        for VectorOfArrayOfEventInStructWithReducedRights
10096    {
10097        #[inline(always)]
10098        fn new_empty() -> Self {
10099            Self {
10100                h: fidl::new_empty!(
10101                    fidl::encoding::Vector<
10102                        fidl::encoding::Array<
10103                            fidl::encoding::HandleType<
10104                                fidl::Event,
10105                                { fidl::ObjectType::EVENT.into_raw() },
10106                                49155,
10107                            >,
10108                            1,
10109                        >,
10110                        1,
10111                    >,
10112                    fidl::encoding::DefaultFuchsiaResourceDialect
10113                ),
10114            }
10115        }
10116
10117        #[inline]
10118        unsafe fn decode(
10119            &mut self,
10120            decoder: &mut fidl::encoding::Decoder<
10121                '_,
10122                fidl::encoding::DefaultFuchsiaResourceDialect,
10123            >,
10124            offset: usize,
10125            _depth: fidl::encoding::Depth,
10126        ) -> fidl::Result<()> {
10127            decoder.debug_check_bounds::<Self>(offset);
10128            // Verify that padding bytes are zero.
10129            fidl::decode!(
10130                fidl::encoding::Vector<
10131                    fidl::encoding::Array<
10132                        fidl::encoding::HandleType<
10133                            fidl::Event,
10134                            { fidl::ObjectType::EVENT.into_raw() },
10135                            49155,
10136                        >,
10137                        1,
10138                    >,
10139                    1,
10140                >,
10141                fidl::encoding::DefaultFuchsiaResourceDialect,
10142                &mut self.h,
10143                decoder,
10144                offset + 0,
10145                _depth
10146            )?;
10147            Ok(())
10148        }
10149    }
10150
10151    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10152        type Borrowed<'a> = &'a mut Self;
10153        fn take_or_borrow<'a>(
10154            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10155        ) -> Self::Borrowed<'a> {
10156            value
10157        }
10158    }
10159
10160    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10161        type Owned = Self;
10162
10163        #[inline(always)]
10164        fn inline_align(_context: fidl::encoding::Context) -> usize {
10165            8
10166        }
10167
10168        #[inline(always)]
10169        fn inline_size(_context: fidl::encoding::Context) -> usize {
10170            16
10171        }
10172    }
10173
10174    unsafe impl
10175        fidl::encoding::Encode<
10176            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10177            fidl::encoding::DefaultFuchsiaResourceDialect,
10178        > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10179    {
10180        #[inline]
10181        unsafe fn encode(
10182            self,
10183            encoder: &mut fidl::encoding::Encoder<
10184                '_,
10185                fidl::encoding::DefaultFuchsiaResourceDialect,
10186            >,
10187            offset: usize,
10188            _depth: fidl::encoding::Depth,
10189        ) -> fidl::Result<()> {
10190            encoder
10191                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10192            // Delegate to tuple encoding.
10193            fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10194                (
10195                    <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10196                ),
10197                encoder, offset, _depth
10198            )
10199        }
10200    }
10201    unsafe impl<
10202        T0: fidl::encoding::Encode<
10203                VectorOfArrayOfEventInTableWithReducedRights,
10204                fidl::encoding::DefaultFuchsiaResourceDialect,
10205            >,
10206    >
10207        fidl::encoding::Encode<
10208            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10209            fidl::encoding::DefaultFuchsiaResourceDialect,
10210        > for (T0,)
10211    {
10212        #[inline]
10213        unsafe fn encode(
10214            self,
10215            encoder: &mut fidl::encoding::Encoder<
10216                '_,
10217                fidl::encoding::DefaultFuchsiaResourceDialect,
10218            >,
10219            offset: usize,
10220            depth: fidl::encoding::Depth,
10221        ) -> fidl::Result<()> {
10222            encoder
10223                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10224            // Zero out padding regions. There's no need to apply masks
10225            // because the unmasked parts will be overwritten by fields.
10226            // Write the fields.
10227            self.0.encode(encoder, offset + 0, depth)?;
10228            Ok(())
10229        }
10230    }
10231
10232    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10233        for VectorOfArrayOfEventInTableWithReducedRightsStruct
10234    {
10235        #[inline(always)]
10236        fn new_empty() -> Self {
10237            Self {
10238                t: fidl::new_empty!(
10239                    VectorOfArrayOfEventInTableWithReducedRights,
10240                    fidl::encoding::DefaultFuchsiaResourceDialect
10241                ),
10242            }
10243        }
10244
10245        #[inline]
10246        unsafe fn decode(
10247            &mut self,
10248            decoder: &mut fidl::encoding::Decoder<
10249                '_,
10250                fidl::encoding::DefaultFuchsiaResourceDialect,
10251            >,
10252            offset: usize,
10253            _depth: fidl::encoding::Depth,
10254        ) -> fidl::Result<()> {
10255            decoder.debug_check_bounds::<Self>(offset);
10256            // Verify that padding bytes are zero.
10257            fidl::decode!(
10258                VectorOfArrayOfEventInTableWithReducedRights,
10259                fidl::encoding::DefaultFuchsiaResourceDialect,
10260                &mut self.t,
10261                decoder,
10262                offset + 0,
10263                _depth
10264            )?;
10265            Ok(())
10266        }
10267    }
10268
10269    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10270        type Borrowed<'a> = &'a mut Self;
10271        fn take_or_borrow<'a>(
10272            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10273        ) -> Self::Borrowed<'a> {
10274            value
10275        }
10276    }
10277
10278    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10279        type Owned = Self;
10280
10281        #[inline(always)]
10282        fn inline_align(_context: fidl::encoding::Context) -> usize {
10283            8
10284        }
10285
10286        #[inline(always)]
10287        fn inline_size(_context: fidl::encoding::Context) -> usize {
10288            16
10289        }
10290    }
10291
10292    unsafe impl
10293        fidl::encoding::Encode<
10294            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10295            fidl::encoding::DefaultFuchsiaResourceDialect,
10296        > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10297    {
10298        #[inline]
10299        unsafe fn encode(
10300            self,
10301            encoder: &mut fidl::encoding::Encoder<
10302                '_,
10303                fidl::encoding::DefaultFuchsiaResourceDialect,
10304            >,
10305            offset: usize,
10306            _depth: fidl::encoding::Depth,
10307        ) -> fidl::Result<()> {
10308            encoder
10309                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10310            // Delegate to tuple encoding.
10311            fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10312                (
10313                    <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10314                ),
10315                encoder, offset, _depth
10316            )
10317        }
10318    }
10319    unsafe impl<
10320        T0: fidl::encoding::Encode<
10321                VectorOfArrayOfEventInUnionWithReducedRights,
10322                fidl::encoding::DefaultFuchsiaResourceDialect,
10323            >,
10324    >
10325        fidl::encoding::Encode<
10326            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10327            fidl::encoding::DefaultFuchsiaResourceDialect,
10328        > for (T0,)
10329    {
10330        #[inline]
10331        unsafe fn encode(
10332            self,
10333            encoder: &mut fidl::encoding::Encoder<
10334                '_,
10335                fidl::encoding::DefaultFuchsiaResourceDialect,
10336            >,
10337            offset: usize,
10338            depth: fidl::encoding::Depth,
10339        ) -> fidl::Result<()> {
10340            encoder
10341                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10342            // Zero out padding regions. There's no need to apply masks
10343            // because the unmasked parts will be overwritten by fields.
10344            // Write the fields.
10345            self.0.encode(encoder, offset + 0, depth)?;
10346            Ok(())
10347        }
10348    }
10349
10350    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10351        for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10352    {
10353        #[inline(always)]
10354        fn new_empty() -> Self {
10355            Self {
10356                u: fidl::new_empty!(
10357                    VectorOfArrayOfEventInUnionWithReducedRights,
10358                    fidl::encoding::DefaultFuchsiaResourceDialect
10359                ),
10360            }
10361        }
10362
10363        #[inline]
10364        unsafe fn decode(
10365            &mut self,
10366            decoder: &mut fidl::encoding::Decoder<
10367                '_,
10368                fidl::encoding::DefaultFuchsiaResourceDialect,
10369            >,
10370            offset: usize,
10371            _depth: fidl::encoding::Depth,
10372        ) -> fidl::Result<()> {
10373            decoder.debug_check_bounds::<Self>(offset);
10374            // Verify that padding bytes are zero.
10375            fidl::decode!(
10376                VectorOfArrayOfEventInUnionWithReducedRights,
10377                fidl::encoding::DefaultFuchsiaResourceDialect,
10378                &mut self.u,
10379                decoder,
10380                offset + 0,
10381                _depth
10382            )?;
10383            Ok(())
10384        }
10385    }
10386
10387    impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10388        type Borrowed<'a> = &'a mut Self;
10389        fn take_or_borrow<'a>(
10390            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10391        ) -> Self::Borrowed<'a> {
10392            value
10393        }
10394    }
10395
10396    unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10397        type Owned = Self;
10398
10399        #[inline(always)]
10400        fn inline_align(_context: fidl::encoding::Context) -> usize {
10401            8
10402        }
10403
10404        #[inline(always)]
10405        fn inline_size(_context: fidl::encoding::Context) -> usize {
10406            16
10407        }
10408    }
10409
10410    unsafe impl
10411        fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10412        for &mut VectorOfHandles
10413    {
10414        #[inline]
10415        unsafe fn encode(
10416            self,
10417            encoder: &mut fidl::encoding::Encoder<
10418                '_,
10419                fidl::encoding::DefaultFuchsiaResourceDialect,
10420            >,
10421            offset: usize,
10422            _depth: fidl::encoding::Depth,
10423        ) -> fidl::Result<()> {
10424            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10425            // Delegate to tuple encoding.
10426            fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10427                (
10428                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10429                ),
10430                encoder, offset, _depth
10431            )
10432        }
10433    }
10434    unsafe impl<
10435        T0: fidl::encoding::Encode<
10436                fidl::encoding::UnboundedVector<
10437                    fidl::encoding::HandleType<
10438                        fidl::NullableHandle,
10439                        { fidl::ObjectType::NONE.into_raw() },
10440                        2147483648,
10441                    >,
10442                >,
10443                fidl::encoding::DefaultFuchsiaResourceDialect,
10444            >,
10445    > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10446        for (T0,)
10447    {
10448        #[inline]
10449        unsafe fn encode(
10450            self,
10451            encoder: &mut fidl::encoding::Encoder<
10452                '_,
10453                fidl::encoding::DefaultFuchsiaResourceDialect,
10454            >,
10455            offset: usize,
10456            depth: fidl::encoding::Depth,
10457        ) -> fidl::Result<()> {
10458            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10459            // Zero out padding regions. There's no need to apply masks
10460            // because the unmasked parts will be overwritten by fields.
10461            // Write the fields.
10462            self.0.encode(encoder, offset + 0, depth)?;
10463            Ok(())
10464        }
10465    }
10466
10467    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10468        for VectorOfHandles
10469    {
10470        #[inline(always)]
10471        fn new_empty() -> Self {
10472            Self {
10473                v: fidl::new_empty!(
10474                    fidl::encoding::UnboundedVector<
10475                        fidl::encoding::HandleType<
10476                            fidl::NullableHandle,
10477                            { fidl::ObjectType::NONE.into_raw() },
10478                            2147483648,
10479                        >,
10480                    >,
10481                    fidl::encoding::DefaultFuchsiaResourceDialect
10482                ),
10483            }
10484        }
10485
10486        #[inline]
10487        unsafe fn decode(
10488            &mut self,
10489            decoder: &mut fidl::encoding::Decoder<
10490                '_,
10491                fidl::encoding::DefaultFuchsiaResourceDialect,
10492            >,
10493            offset: usize,
10494            _depth: fidl::encoding::Depth,
10495        ) -> fidl::Result<()> {
10496            decoder.debug_check_bounds::<Self>(offset);
10497            // Verify that padding bytes are zero.
10498            fidl::decode!(
10499                fidl::encoding::UnboundedVector<
10500                    fidl::encoding::HandleType<
10501                        fidl::NullableHandle,
10502                        { fidl::ObjectType::NONE.into_raw() },
10503                        2147483648,
10504                    >,
10505                >,
10506                fidl::encoding::DefaultFuchsiaResourceDialect,
10507                &mut self.v,
10508                decoder,
10509                offset + 0,
10510                _depth
10511            )?;
10512            Ok(())
10513        }
10514    }
10515
10516    impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10517        type Borrowed<'a> = &'a mut Self;
10518        fn take_or_borrow<'a>(
10519            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10520        ) -> Self::Borrowed<'a> {
10521            value
10522        }
10523    }
10524
10525    unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10526        type Owned = Self;
10527
10528        #[inline(always)]
10529        fn inline_align(_context: fidl::encoding::Context) -> usize {
10530            8
10531        }
10532
10533        #[inline(always)]
10534        fn inline_size(_context: fidl::encoding::Context) -> usize {
10535            16
10536        }
10537    }
10538
10539    unsafe impl
10540        fidl::encoding::Encode<
10541            VectorOfOptionalHandles,
10542            fidl::encoding::DefaultFuchsiaResourceDialect,
10543        > for &mut VectorOfOptionalHandles
10544    {
10545        #[inline]
10546        unsafe fn encode(
10547            self,
10548            encoder: &mut fidl::encoding::Encoder<
10549                '_,
10550                fidl::encoding::DefaultFuchsiaResourceDialect,
10551            >,
10552            offset: usize,
10553            _depth: fidl::encoding::Depth,
10554        ) -> fidl::Result<()> {
10555            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10556            // Delegate to tuple encoding.
10557            fidl::encoding::Encode::<
10558                VectorOfOptionalHandles,
10559                fidl::encoding::DefaultFuchsiaResourceDialect,
10560            >::encode(
10561                (<fidl::encoding::UnboundedVector<
10562                    fidl::encoding::Optional<
10563                        fidl::encoding::HandleType<
10564                            fidl::NullableHandle,
10565                            { fidl::ObjectType::NONE.into_raw() },
10566                            2147483648,
10567                        >,
10568                    >,
10569                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10570                    &mut self.v
10571                ),),
10572                encoder,
10573                offset,
10574                _depth,
10575            )
10576        }
10577    }
10578    unsafe impl<
10579        T0: fidl::encoding::Encode<
10580                fidl::encoding::UnboundedVector<
10581                    fidl::encoding::Optional<
10582                        fidl::encoding::HandleType<
10583                            fidl::NullableHandle,
10584                            { fidl::ObjectType::NONE.into_raw() },
10585                            2147483648,
10586                        >,
10587                    >,
10588                >,
10589                fidl::encoding::DefaultFuchsiaResourceDialect,
10590            >,
10591    >
10592        fidl::encoding::Encode<
10593            VectorOfOptionalHandles,
10594            fidl::encoding::DefaultFuchsiaResourceDialect,
10595        > for (T0,)
10596    {
10597        #[inline]
10598        unsafe fn encode(
10599            self,
10600            encoder: &mut fidl::encoding::Encoder<
10601                '_,
10602                fidl::encoding::DefaultFuchsiaResourceDialect,
10603            >,
10604            offset: usize,
10605            depth: fidl::encoding::Depth,
10606        ) -> fidl::Result<()> {
10607            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10608            // Zero out padding regions. There's no need to apply masks
10609            // because the unmasked parts will be overwritten by fields.
10610            // Write the fields.
10611            self.0.encode(encoder, offset + 0, depth)?;
10612            Ok(())
10613        }
10614    }
10615
10616    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10617        for VectorOfOptionalHandles
10618    {
10619        #[inline(always)]
10620        fn new_empty() -> Self {
10621            Self {
10622                v: fidl::new_empty!(
10623                    fidl::encoding::UnboundedVector<
10624                        fidl::encoding::Optional<
10625                            fidl::encoding::HandleType<
10626                                fidl::NullableHandle,
10627                                { fidl::ObjectType::NONE.into_raw() },
10628                                2147483648,
10629                            >,
10630                        >,
10631                    >,
10632                    fidl::encoding::DefaultFuchsiaResourceDialect
10633                ),
10634            }
10635        }
10636
10637        #[inline]
10638        unsafe fn decode(
10639            &mut self,
10640            decoder: &mut fidl::encoding::Decoder<
10641                '_,
10642                fidl::encoding::DefaultFuchsiaResourceDialect,
10643            >,
10644            offset: usize,
10645            _depth: fidl::encoding::Depth,
10646        ) -> fidl::Result<()> {
10647            decoder.debug_check_bounds::<Self>(offset);
10648            // Verify that padding bytes are zero.
10649            fidl::decode!(
10650                fidl::encoding::UnboundedVector<
10651                    fidl::encoding::Optional<
10652                        fidl::encoding::HandleType<
10653                            fidl::NullableHandle,
10654                            { fidl::ObjectType::NONE.into_raw() },
10655                            2147483648,
10656                        >,
10657                    >,
10658                >,
10659                fidl::encoding::DefaultFuchsiaResourceDialect,
10660                &mut self.v,
10661                decoder,
10662                offset + 0,
10663                _depth
10664            )?;
10665            Ok(())
10666        }
10667    }
10668
10669    impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10670        type Borrowed<'a> = &'a mut Self;
10671        fn take_or_borrow<'a>(
10672            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10673        ) -> Self::Borrowed<'a> {
10674            value
10675        }
10676    }
10677
10678    unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10679        type Owned = Self;
10680
10681        #[inline(always)]
10682        fn inline_align(_context: fidl::encoding::Context) -> usize {
10683            8
10684        }
10685
10686        #[inline(always)]
10687        fn inline_size(_context: fidl::encoding::Context) -> usize {
10688            16
10689        }
10690    }
10691
10692    unsafe impl
10693        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10694        for &mut VectorOfUpTo2Handles
10695    {
10696        #[inline]
10697        unsafe fn encode(
10698            self,
10699            encoder: &mut fidl::encoding::Encoder<
10700                '_,
10701                fidl::encoding::DefaultFuchsiaResourceDialect,
10702            >,
10703            offset: usize,
10704            _depth: fidl::encoding::Depth,
10705        ) -> fidl::Result<()> {
10706            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10707            // Delegate to tuple encoding.
10708            fidl::encoding::Encode::<
10709                VectorOfUpTo2Handles,
10710                fidl::encoding::DefaultFuchsiaResourceDialect,
10711            >::encode(
10712                (<fidl::encoding::Vector<
10713                    fidl::encoding::HandleType<
10714                        fidl::NullableHandle,
10715                        { fidl::ObjectType::NONE.into_raw() },
10716                        2147483648,
10717                    >,
10718                    2,
10719                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10720                    &mut self.v
10721                ),),
10722                encoder,
10723                offset,
10724                _depth,
10725            )
10726        }
10727    }
10728    unsafe impl<
10729        T0: fidl::encoding::Encode<
10730                fidl::encoding::Vector<
10731                    fidl::encoding::HandleType<
10732                        fidl::NullableHandle,
10733                        { fidl::ObjectType::NONE.into_raw() },
10734                        2147483648,
10735                    >,
10736                    2,
10737                >,
10738                fidl::encoding::DefaultFuchsiaResourceDialect,
10739            >,
10740    >
10741        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10742        for (T0,)
10743    {
10744        #[inline]
10745        unsafe fn encode(
10746            self,
10747            encoder: &mut fidl::encoding::Encoder<
10748                '_,
10749                fidl::encoding::DefaultFuchsiaResourceDialect,
10750            >,
10751            offset: usize,
10752            depth: fidl::encoding::Depth,
10753        ) -> fidl::Result<()> {
10754            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10755            // Zero out padding regions. There's no need to apply masks
10756            // because the unmasked parts will be overwritten by fields.
10757            // Write the fields.
10758            self.0.encode(encoder, offset + 0, depth)?;
10759            Ok(())
10760        }
10761    }
10762
10763    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10764        for VectorOfUpTo2Handles
10765    {
10766        #[inline(always)]
10767        fn new_empty() -> Self {
10768            Self {
10769                v: fidl::new_empty!(
10770                    fidl::encoding::Vector<
10771                        fidl::encoding::HandleType<
10772                            fidl::NullableHandle,
10773                            { fidl::ObjectType::NONE.into_raw() },
10774                            2147483648,
10775                        >,
10776                        2,
10777                    >,
10778                    fidl::encoding::DefaultFuchsiaResourceDialect
10779                ),
10780            }
10781        }
10782
10783        #[inline]
10784        unsafe fn decode(
10785            &mut self,
10786            decoder: &mut fidl::encoding::Decoder<
10787                '_,
10788                fidl::encoding::DefaultFuchsiaResourceDialect,
10789            >,
10790            offset: usize,
10791            _depth: fidl::encoding::Depth,
10792        ) -> fidl::Result<()> {
10793            decoder.debug_check_bounds::<Self>(offset);
10794            // Verify that padding bytes are zero.
10795            fidl::decode!(
10796                fidl::encoding::Vector<
10797                    fidl::encoding::HandleType<
10798                        fidl::NullableHandle,
10799                        { fidl::ObjectType::NONE.into_raw() },
10800                        2147483648,
10801                    >,
10802                    2,
10803                >,
10804                fidl::encoding::DefaultFuchsiaResourceDialect,
10805                &mut self.v,
10806                decoder,
10807                offset + 0,
10808                _depth
10809            )?;
10810            Ok(())
10811        }
10812    }
10813
10814    impl ArrayOfVectorOfEventInTableWithDefaultRights {
10815        #[inline(always)]
10816        fn max_ordinal_present(&self) -> u64 {
10817            if let Some(_) = self.h {
10818                return 1;
10819            }
10820            0
10821        }
10822    }
10823
10824    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10825        type Borrowed<'a> = &'a mut Self;
10826        fn take_or_borrow<'a>(
10827            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10828        ) -> Self::Borrowed<'a> {
10829            value
10830        }
10831    }
10832
10833    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10834        type Owned = Self;
10835
10836        #[inline(always)]
10837        fn inline_align(_context: fidl::encoding::Context) -> usize {
10838            8
10839        }
10840
10841        #[inline(always)]
10842        fn inline_size(_context: fidl::encoding::Context) -> usize {
10843            16
10844        }
10845    }
10846
10847    unsafe impl
10848        fidl::encoding::Encode<
10849            ArrayOfVectorOfEventInTableWithDefaultRights,
10850            fidl::encoding::DefaultFuchsiaResourceDialect,
10851        > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
10852    {
10853        unsafe fn encode(
10854            self,
10855            encoder: &mut fidl::encoding::Encoder<
10856                '_,
10857                fidl::encoding::DefaultFuchsiaResourceDialect,
10858            >,
10859            offset: usize,
10860            mut depth: fidl::encoding::Depth,
10861        ) -> fidl::Result<()> {
10862            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
10863            // Vector header
10864            let max_ordinal: u64 = self.max_ordinal_present();
10865            encoder.write_num(max_ordinal, offset);
10866            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10867            // Calling encoder.out_of_line_offset(0) is not allowed.
10868            if max_ordinal == 0 {
10869                return Ok(());
10870            }
10871            depth.increment()?;
10872            let envelope_size = 8;
10873            let bytes_len = max_ordinal as usize * envelope_size;
10874            #[allow(unused_variables)]
10875            let offset = encoder.out_of_line_offset(bytes_len);
10876            let mut _prev_end_offset: usize = 0;
10877            if 1 > max_ordinal {
10878                return Ok(());
10879            }
10880
10881            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10882            // are envelope_size bytes.
10883            let cur_offset: usize = (1 - 1) * envelope_size;
10884
10885            // Zero reserved fields.
10886            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10887
10888            // Safety:
10889            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10890            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10891            //   envelope_size bytes, there is always sufficient room.
10892            fidl::encoding::encode_in_envelope_optional::<
10893                fidl::encoding::Array<
10894                    fidl::encoding::Vector<
10895                        fidl::encoding::HandleType<
10896                            fidl::Event,
10897                            { fidl::ObjectType::EVENT.into_raw() },
10898                            53251,
10899                        >,
10900                        1,
10901                    >,
10902                    1,
10903                >,
10904                fidl::encoding::DefaultFuchsiaResourceDialect,
10905            >(
10906                self.h.as_mut().map(
10907                    <fidl::encoding::Array<
10908                        fidl::encoding::Vector<
10909                            fidl::encoding::HandleType<
10910                                fidl::Event,
10911                                { fidl::ObjectType::EVENT.into_raw() },
10912                                53251,
10913                            >,
10914                            1,
10915                        >,
10916                        1,
10917                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10918                ),
10919                encoder,
10920                offset + cur_offset,
10921                depth,
10922            )?;
10923
10924            _prev_end_offset = cur_offset + envelope_size;
10925
10926            Ok(())
10927        }
10928    }
10929
10930    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10931        for ArrayOfVectorOfEventInTableWithDefaultRights
10932    {
10933        #[inline(always)]
10934        fn new_empty() -> Self {
10935            Self::default()
10936        }
10937
10938        unsafe fn decode(
10939            &mut self,
10940            decoder: &mut fidl::encoding::Decoder<
10941                '_,
10942                fidl::encoding::DefaultFuchsiaResourceDialect,
10943            >,
10944            offset: usize,
10945            mut depth: fidl::encoding::Depth,
10946        ) -> fidl::Result<()> {
10947            decoder.debug_check_bounds::<Self>(offset);
10948            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10949                None => return Err(fidl::Error::NotNullable),
10950                Some(len) => len,
10951            };
10952            // Calling decoder.out_of_line_offset(0) is not allowed.
10953            if len == 0 {
10954                return Ok(());
10955            };
10956            depth.increment()?;
10957            let envelope_size = 8;
10958            let bytes_len = len * envelope_size;
10959            let offset = decoder.out_of_line_offset(bytes_len)?;
10960            // Decode the envelope for each type.
10961            let mut _next_ordinal_to_read = 0;
10962            let mut next_offset = offset;
10963            let end_offset = offset + bytes_len;
10964            _next_ordinal_to_read += 1;
10965            if next_offset >= end_offset {
10966                return Ok(());
10967            }
10968
10969            // Decode unknown envelopes for gaps in ordinals.
10970            while _next_ordinal_to_read < 1 {
10971                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10972                _next_ordinal_to_read += 1;
10973                next_offset += envelope_size;
10974            }
10975
10976            let next_out_of_line = decoder.next_out_of_line();
10977            let handles_before = decoder.remaining_handles();
10978            if let Some((inlined, num_bytes, num_handles)) =
10979                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10980            {
10981                let member_inline_size = <fidl::encoding::Array<
10982                    fidl::encoding::Vector<
10983                        fidl::encoding::HandleType<
10984                            fidl::Event,
10985                            { fidl::ObjectType::EVENT.into_raw() },
10986                            53251,
10987                        >,
10988                        1,
10989                    >,
10990                    1,
10991                > as fidl::encoding::TypeMarker>::inline_size(
10992                    decoder.context
10993                );
10994                if inlined != (member_inline_size <= 4) {
10995                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10996                }
10997                let inner_offset;
10998                let mut inner_depth = depth.clone();
10999                if inlined {
11000                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11001                    inner_offset = next_offset;
11002                } else {
11003                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11004                    inner_depth.increment()?;
11005                }
11006                let val_ref = self.h.get_or_insert_with(|| {
11007                    fidl::new_empty!(
11008                        fidl::encoding::Array<
11009                            fidl::encoding::Vector<
11010                                fidl::encoding::HandleType<
11011                                    fidl::Event,
11012                                    { fidl::ObjectType::EVENT.into_raw() },
11013                                    53251,
11014                                >,
11015                                1,
11016                            >,
11017                            1,
11018                        >,
11019                        fidl::encoding::DefaultFuchsiaResourceDialect
11020                    )
11021                });
11022                fidl::decode!(
11023                    fidl::encoding::Array<
11024                        fidl::encoding::Vector<
11025                            fidl::encoding::HandleType<
11026                                fidl::Event,
11027                                { fidl::ObjectType::EVENT.into_raw() },
11028                                53251,
11029                            >,
11030                            1,
11031                        >,
11032                        1,
11033                    >,
11034                    fidl::encoding::DefaultFuchsiaResourceDialect,
11035                    val_ref,
11036                    decoder,
11037                    inner_offset,
11038                    inner_depth
11039                )?;
11040                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11041                {
11042                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11043                }
11044                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11045                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11046                }
11047            }
11048
11049            next_offset += envelope_size;
11050
11051            // Decode the remaining unknown envelopes.
11052            while next_offset < end_offset {
11053                _next_ordinal_to_read += 1;
11054                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11055                next_offset += envelope_size;
11056            }
11057
11058            Ok(())
11059        }
11060    }
11061
11062    impl ArrayOfVectorOfEventInTableWithReducedRights {
11063        #[inline(always)]
11064        fn max_ordinal_present(&self) -> u64 {
11065            if let Some(_) = self.h {
11066                return 1;
11067            }
11068            0
11069        }
11070    }
11071
11072    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11073        type Borrowed<'a> = &'a mut Self;
11074        fn take_or_borrow<'a>(
11075            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11076        ) -> Self::Borrowed<'a> {
11077            value
11078        }
11079    }
11080
11081    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11082        type Owned = Self;
11083
11084        #[inline(always)]
11085        fn inline_align(_context: fidl::encoding::Context) -> usize {
11086            8
11087        }
11088
11089        #[inline(always)]
11090        fn inline_size(_context: fidl::encoding::Context) -> usize {
11091            16
11092        }
11093    }
11094
11095    unsafe impl
11096        fidl::encoding::Encode<
11097            ArrayOfVectorOfEventInTableWithReducedRights,
11098            fidl::encoding::DefaultFuchsiaResourceDialect,
11099        > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11100    {
11101        unsafe fn encode(
11102            self,
11103            encoder: &mut fidl::encoding::Encoder<
11104                '_,
11105                fidl::encoding::DefaultFuchsiaResourceDialect,
11106            >,
11107            offset: usize,
11108            mut depth: fidl::encoding::Depth,
11109        ) -> fidl::Result<()> {
11110            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11111            // Vector header
11112            let max_ordinal: u64 = self.max_ordinal_present();
11113            encoder.write_num(max_ordinal, offset);
11114            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11115            // Calling encoder.out_of_line_offset(0) is not allowed.
11116            if max_ordinal == 0 {
11117                return Ok(());
11118            }
11119            depth.increment()?;
11120            let envelope_size = 8;
11121            let bytes_len = max_ordinal as usize * envelope_size;
11122            #[allow(unused_variables)]
11123            let offset = encoder.out_of_line_offset(bytes_len);
11124            let mut _prev_end_offset: usize = 0;
11125            if 1 > max_ordinal {
11126                return Ok(());
11127            }
11128
11129            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11130            // are envelope_size bytes.
11131            let cur_offset: usize = (1 - 1) * envelope_size;
11132
11133            // Zero reserved fields.
11134            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11135
11136            // Safety:
11137            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11138            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11139            //   envelope_size bytes, there is always sufficient room.
11140            fidl::encoding::encode_in_envelope_optional::<
11141                fidl::encoding::Array<
11142                    fidl::encoding::Vector<
11143                        fidl::encoding::HandleType<
11144                            fidl::Event,
11145                            { fidl::ObjectType::EVENT.into_raw() },
11146                            49155,
11147                        >,
11148                        1,
11149                    >,
11150                    1,
11151                >,
11152                fidl::encoding::DefaultFuchsiaResourceDialect,
11153            >(
11154                self.h.as_mut().map(
11155                    <fidl::encoding::Array<
11156                        fidl::encoding::Vector<
11157                            fidl::encoding::HandleType<
11158                                fidl::Event,
11159                                { fidl::ObjectType::EVENT.into_raw() },
11160                                49155,
11161                            >,
11162                            1,
11163                        >,
11164                        1,
11165                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11166                ),
11167                encoder,
11168                offset + cur_offset,
11169                depth,
11170            )?;
11171
11172            _prev_end_offset = cur_offset + envelope_size;
11173
11174            Ok(())
11175        }
11176    }
11177
11178    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11179        for ArrayOfVectorOfEventInTableWithReducedRights
11180    {
11181        #[inline(always)]
11182        fn new_empty() -> Self {
11183            Self::default()
11184        }
11185
11186        unsafe fn decode(
11187            &mut self,
11188            decoder: &mut fidl::encoding::Decoder<
11189                '_,
11190                fidl::encoding::DefaultFuchsiaResourceDialect,
11191            >,
11192            offset: usize,
11193            mut depth: fidl::encoding::Depth,
11194        ) -> fidl::Result<()> {
11195            decoder.debug_check_bounds::<Self>(offset);
11196            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11197                None => return Err(fidl::Error::NotNullable),
11198                Some(len) => len,
11199            };
11200            // Calling decoder.out_of_line_offset(0) is not allowed.
11201            if len == 0 {
11202                return Ok(());
11203            };
11204            depth.increment()?;
11205            let envelope_size = 8;
11206            let bytes_len = len * envelope_size;
11207            let offset = decoder.out_of_line_offset(bytes_len)?;
11208            // Decode the envelope for each type.
11209            let mut _next_ordinal_to_read = 0;
11210            let mut next_offset = offset;
11211            let end_offset = offset + bytes_len;
11212            _next_ordinal_to_read += 1;
11213            if next_offset >= end_offset {
11214                return Ok(());
11215            }
11216
11217            // Decode unknown envelopes for gaps in ordinals.
11218            while _next_ordinal_to_read < 1 {
11219                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11220                _next_ordinal_to_read += 1;
11221                next_offset += envelope_size;
11222            }
11223
11224            let next_out_of_line = decoder.next_out_of_line();
11225            let handles_before = decoder.remaining_handles();
11226            if let Some((inlined, num_bytes, num_handles)) =
11227                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11228            {
11229                let member_inline_size = <fidl::encoding::Array<
11230                    fidl::encoding::Vector<
11231                        fidl::encoding::HandleType<
11232                            fidl::Event,
11233                            { fidl::ObjectType::EVENT.into_raw() },
11234                            49155,
11235                        >,
11236                        1,
11237                    >,
11238                    1,
11239                > as fidl::encoding::TypeMarker>::inline_size(
11240                    decoder.context
11241                );
11242                if inlined != (member_inline_size <= 4) {
11243                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11244                }
11245                let inner_offset;
11246                let mut inner_depth = depth.clone();
11247                if inlined {
11248                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11249                    inner_offset = next_offset;
11250                } else {
11251                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11252                    inner_depth.increment()?;
11253                }
11254                let val_ref = self.h.get_or_insert_with(|| {
11255                    fidl::new_empty!(
11256                        fidl::encoding::Array<
11257                            fidl::encoding::Vector<
11258                                fidl::encoding::HandleType<
11259                                    fidl::Event,
11260                                    { fidl::ObjectType::EVENT.into_raw() },
11261                                    49155,
11262                                >,
11263                                1,
11264                            >,
11265                            1,
11266                        >,
11267                        fidl::encoding::DefaultFuchsiaResourceDialect
11268                    )
11269                });
11270                fidl::decode!(
11271                    fidl::encoding::Array<
11272                        fidl::encoding::Vector<
11273                            fidl::encoding::HandleType<
11274                                fidl::Event,
11275                                { fidl::ObjectType::EVENT.into_raw() },
11276                                49155,
11277                            >,
11278                            1,
11279                        >,
11280                        1,
11281                    >,
11282                    fidl::encoding::DefaultFuchsiaResourceDialect,
11283                    val_ref,
11284                    decoder,
11285                    inner_offset,
11286                    inner_depth
11287                )?;
11288                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11289                {
11290                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11291                }
11292                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11293                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11294                }
11295            }
11296
11297            next_offset += envelope_size;
11298
11299            // Decode the remaining unknown envelopes.
11300            while next_offset < end_offset {
11301                _next_ordinal_to_read += 1;
11302                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11303                next_offset += envelope_size;
11304            }
11305
11306            Ok(())
11307        }
11308    }
11309
11310    impl EmptyResourceTable {
11311        #[inline(always)]
11312        fn max_ordinal_present(&self) -> u64 {
11313            0
11314        }
11315    }
11316
11317    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11318        type Borrowed<'a> = &'a mut Self;
11319        fn take_or_borrow<'a>(
11320            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11321        ) -> Self::Borrowed<'a> {
11322            value
11323        }
11324    }
11325
11326    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11327        type Owned = Self;
11328
11329        #[inline(always)]
11330        fn inline_align(_context: fidl::encoding::Context) -> usize {
11331            8
11332        }
11333
11334        #[inline(always)]
11335        fn inline_size(_context: fidl::encoding::Context) -> usize {
11336            16
11337        }
11338    }
11339
11340    unsafe impl
11341        fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11342        for &mut EmptyResourceTable
11343    {
11344        unsafe fn encode(
11345            self,
11346            encoder: &mut fidl::encoding::Encoder<
11347                '_,
11348                fidl::encoding::DefaultFuchsiaResourceDialect,
11349            >,
11350            offset: usize,
11351            mut depth: fidl::encoding::Depth,
11352        ) -> fidl::Result<()> {
11353            encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11354            // Vector header
11355            let max_ordinal: u64 = self.max_ordinal_present();
11356            encoder.write_num(max_ordinal, offset);
11357            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11358            // Calling encoder.out_of_line_offset(0) is not allowed.
11359            if max_ordinal == 0 {
11360                return Ok(());
11361            }
11362            depth.increment()?;
11363            let envelope_size = 8;
11364            let bytes_len = max_ordinal as usize * envelope_size;
11365            #[allow(unused_variables)]
11366            let offset = encoder.out_of_line_offset(bytes_len);
11367            let mut _prev_end_offset: usize = 0;
11368
11369            Ok(())
11370        }
11371    }
11372
11373    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11374        for EmptyResourceTable
11375    {
11376        #[inline(always)]
11377        fn new_empty() -> Self {
11378            Self::default()
11379        }
11380
11381        unsafe fn decode(
11382            &mut self,
11383            decoder: &mut fidl::encoding::Decoder<
11384                '_,
11385                fidl::encoding::DefaultFuchsiaResourceDialect,
11386            >,
11387            offset: usize,
11388            mut depth: fidl::encoding::Depth,
11389        ) -> fidl::Result<()> {
11390            decoder.debug_check_bounds::<Self>(offset);
11391            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11392                None => return Err(fidl::Error::NotNullable),
11393                Some(len) => len,
11394            };
11395            // Calling decoder.out_of_line_offset(0) is not allowed.
11396            if len == 0 {
11397                return Ok(());
11398            };
11399            depth.increment()?;
11400            let envelope_size = 8;
11401            let bytes_len = len * envelope_size;
11402            let offset = decoder.out_of_line_offset(bytes_len)?;
11403            // Decode the envelope for each type.
11404            let mut _next_ordinal_to_read = 0;
11405            let mut next_offset = offset;
11406            let end_offset = offset + bytes_len;
11407
11408            // Decode the remaining unknown envelopes.
11409            while next_offset < end_offset {
11410                _next_ordinal_to_read += 1;
11411                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11412                next_offset += envelope_size;
11413            }
11414
11415            Ok(())
11416        }
11417    }
11418
11419    impl SimpleResourceTable {
11420        #[inline(always)]
11421        fn max_ordinal_present(&self) -> u64 {
11422            if let Some(_) = self.y {
11423                return 5;
11424            }
11425            if let Some(_) = self.x {
11426                return 1;
11427            }
11428            0
11429        }
11430    }
11431
11432    impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11433        type Borrowed<'a> = &'a mut Self;
11434        fn take_or_borrow<'a>(
11435            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11436        ) -> Self::Borrowed<'a> {
11437            value
11438        }
11439    }
11440
11441    unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11442        type Owned = Self;
11443
11444        #[inline(always)]
11445        fn inline_align(_context: fidl::encoding::Context) -> usize {
11446            8
11447        }
11448
11449        #[inline(always)]
11450        fn inline_size(_context: fidl::encoding::Context) -> usize {
11451            16
11452        }
11453    }
11454
11455    unsafe impl
11456        fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11457        for &mut SimpleResourceTable
11458    {
11459        unsafe fn encode(
11460            self,
11461            encoder: &mut fidl::encoding::Encoder<
11462                '_,
11463                fidl::encoding::DefaultFuchsiaResourceDialect,
11464            >,
11465            offset: usize,
11466            mut depth: fidl::encoding::Depth,
11467        ) -> fidl::Result<()> {
11468            encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11469            // Vector header
11470            let max_ordinal: u64 = self.max_ordinal_present();
11471            encoder.write_num(max_ordinal, offset);
11472            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11473            // Calling encoder.out_of_line_offset(0) is not allowed.
11474            if max_ordinal == 0 {
11475                return Ok(());
11476            }
11477            depth.increment()?;
11478            let envelope_size = 8;
11479            let bytes_len = max_ordinal as usize * envelope_size;
11480            #[allow(unused_variables)]
11481            let offset = encoder.out_of_line_offset(bytes_len);
11482            let mut _prev_end_offset: usize = 0;
11483            if 1 > max_ordinal {
11484                return Ok(());
11485            }
11486
11487            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11488            // are envelope_size bytes.
11489            let cur_offset: usize = (1 - 1) * envelope_size;
11490
11491            // Zero reserved fields.
11492            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11493
11494            // Safety:
11495            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11496            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11497            //   envelope_size bytes, there is always sufficient room.
11498            fidl::encoding::encode_in_envelope_optional::<
11499                i64,
11500                fidl::encoding::DefaultFuchsiaResourceDialect,
11501            >(
11502                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11503                encoder,
11504                offset + cur_offset,
11505                depth,
11506            )?;
11507
11508            _prev_end_offset = cur_offset + envelope_size;
11509            if 5 > max_ordinal {
11510                return Ok(());
11511            }
11512
11513            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11514            // are envelope_size bytes.
11515            let cur_offset: usize = (5 - 1) * envelope_size;
11516
11517            // Zero reserved fields.
11518            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11519
11520            // Safety:
11521            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11522            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11523            //   envelope_size bytes, there is always sufficient room.
11524            fidl::encoding::encode_in_envelope_optional::<
11525                i64,
11526                fidl::encoding::DefaultFuchsiaResourceDialect,
11527            >(
11528                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11529                encoder,
11530                offset + cur_offset,
11531                depth,
11532            )?;
11533
11534            _prev_end_offset = cur_offset + envelope_size;
11535
11536            Ok(())
11537        }
11538    }
11539
11540    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11541        for SimpleResourceTable
11542    {
11543        #[inline(always)]
11544        fn new_empty() -> Self {
11545            Self::default()
11546        }
11547
11548        unsafe fn decode(
11549            &mut self,
11550            decoder: &mut fidl::encoding::Decoder<
11551                '_,
11552                fidl::encoding::DefaultFuchsiaResourceDialect,
11553            >,
11554            offset: usize,
11555            mut depth: fidl::encoding::Depth,
11556        ) -> fidl::Result<()> {
11557            decoder.debug_check_bounds::<Self>(offset);
11558            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11559                None => return Err(fidl::Error::NotNullable),
11560                Some(len) => len,
11561            };
11562            // Calling decoder.out_of_line_offset(0) is not allowed.
11563            if len == 0 {
11564                return Ok(());
11565            };
11566            depth.increment()?;
11567            let envelope_size = 8;
11568            let bytes_len = len * envelope_size;
11569            let offset = decoder.out_of_line_offset(bytes_len)?;
11570            // Decode the envelope for each type.
11571            let mut _next_ordinal_to_read = 0;
11572            let mut next_offset = offset;
11573            let end_offset = offset + bytes_len;
11574            _next_ordinal_to_read += 1;
11575            if next_offset >= end_offset {
11576                return Ok(());
11577            }
11578
11579            // Decode unknown envelopes for gaps in ordinals.
11580            while _next_ordinal_to_read < 1 {
11581                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11582                _next_ordinal_to_read += 1;
11583                next_offset += envelope_size;
11584            }
11585
11586            let next_out_of_line = decoder.next_out_of_line();
11587            let handles_before = decoder.remaining_handles();
11588            if let Some((inlined, num_bytes, num_handles)) =
11589                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11590            {
11591                let member_inline_size =
11592                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11593                if inlined != (member_inline_size <= 4) {
11594                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11595                }
11596                let inner_offset;
11597                let mut inner_depth = depth.clone();
11598                if inlined {
11599                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11600                    inner_offset = next_offset;
11601                } else {
11602                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11603                    inner_depth.increment()?;
11604                }
11605                let val_ref = self.x.get_or_insert_with(|| {
11606                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11607                });
11608                fidl::decode!(
11609                    i64,
11610                    fidl::encoding::DefaultFuchsiaResourceDialect,
11611                    val_ref,
11612                    decoder,
11613                    inner_offset,
11614                    inner_depth
11615                )?;
11616                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11617                {
11618                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11619                }
11620                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11621                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11622                }
11623            }
11624
11625            next_offset += envelope_size;
11626            _next_ordinal_to_read += 1;
11627            if next_offset >= end_offset {
11628                return Ok(());
11629            }
11630
11631            // Decode unknown envelopes for gaps in ordinals.
11632            while _next_ordinal_to_read < 5 {
11633                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11634                _next_ordinal_to_read += 1;
11635                next_offset += envelope_size;
11636            }
11637
11638            let next_out_of_line = decoder.next_out_of_line();
11639            let handles_before = decoder.remaining_handles();
11640            if let Some((inlined, num_bytes, num_handles)) =
11641                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11642            {
11643                let member_inline_size =
11644                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11645                if inlined != (member_inline_size <= 4) {
11646                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11647                }
11648                let inner_offset;
11649                let mut inner_depth = depth.clone();
11650                if inlined {
11651                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11652                    inner_offset = next_offset;
11653                } else {
11654                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11655                    inner_depth.increment()?;
11656                }
11657                let val_ref = self.y.get_or_insert_with(|| {
11658                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11659                });
11660                fidl::decode!(
11661                    i64,
11662                    fidl::encoding::DefaultFuchsiaResourceDialect,
11663                    val_ref,
11664                    decoder,
11665                    inner_offset,
11666                    inner_depth
11667                )?;
11668                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11669                {
11670                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11671                }
11672                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11673                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11674                }
11675            }
11676
11677            next_offset += envelope_size;
11678
11679            // Decode the remaining unknown envelopes.
11680            while next_offset < end_offset {
11681                _next_ordinal_to_read += 1;
11682                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11683                next_offset += envelope_size;
11684            }
11685
11686            Ok(())
11687        }
11688    }
11689
11690    impl TableFieldInlinedHandle {
11691        #[inline(always)]
11692        fn max_ordinal_present(&self) -> u64 {
11693            if let Some(_) = self.f {
11694                return 1;
11695            }
11696            0
11697        }
11698    }
11699
11700    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11701        type Borrowed<'a> = &'a mut Self;
11702        fn take_or_borrow<'a>(
11703            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11704        ) -> Self::Borrowed<'a> {
11705            value
11706        }
11707    }
11708
11709    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
11710        type Owned = Self;
11711
11712        #[inline(always)]
11713        fn inline_align(_context: fidl::encoding::Context) -> usize {
11714            8
11715        }
11716
11717        #[inline(always)]
11718        fn inline_size(_context: fidl::encoding::Context) -> usize {
11719            16
11720        }
11721    }
11722
11723    unsafe impl
11724        fidl::encoding::Encode<
11725            TableFieldInlinedHandle,
11726            fidl::encoding::DefaultFuchsiaResourceDialect,
11727        > for &mut TableFieldInlinedHandle
11728    {
11729        unsafe fn encode(
11730            self,
11731            encoder: &mut fidl::encoding::Encoder<
11732                '_,
11733                fidl::encoding::DefaultFuchsiaResourceDialect,
11734            >,
11735            offset: usize,
11736            mut depth: fidl::encoding::Depth,
11737        ) -> fidl::Result<()> {
11738            encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
11739            // Vector header
11740            let max_ordinal: u64 = self.max_ordinal_present();
11741            encoder.write_num(max_ordinal, offset);
11742            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11743            // Calling encoder.out_of_line_offset(0) is not allowed.
11744            if max_ordinal == 0 {
11745                return Ok(());
11746            }
11747            depth.increment()?;
11748            let envelope_size = 8;
11749            let bytes_len = max_ordinal as usize * envelope_size;
11750            #[allow(unused_variables)]
11751            let offset = encoder.out_of_line_offset(bytes_len);
11752            let mut _prev_end_offset: usize = 0;
11753            if 1 > max_ordinal {
11754                return Ok(());
11755            }
11756
11757            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11758            // are envelope_size bytes.
11759            let cur_offset: usize = (1 - 1) * envelope_size;
11760
11761            // Zero reserved fields.
11762            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11763
11764            // Safety:
11765            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11766            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11767            //   envelope_size bytes, there is always sufficient room.
11768            fidl::encoding::encode_in_envelope_optional::<
11769                fidl::encoding::HandleType<
11770                    fidl::Channel,
11771                    { fidl::ObjectType::CHANNEL.into_raw() },
11772                    2147483648,
11773                >,
11774                fidl::encoding::DefaultFuchsiaResourceDialect,
11775            >(
11776                self.f.as_mut().map(
11777                    <fidl::encoding::HandleType<
11778                        fidl::Channel,
11779                        { fidl::ObjectType::CHANNEL.into_raw() },
11780                        2147483648,
11781                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11782                ),
11783                encoder,
11784                offset + cur_offset,
11785                depth,
11786            )?;
11787
11788            _prev_end_offset = cur_offset + envelope_size;
11789
11790            Ok(())
11791        }
11792    }
11793
11794    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11795        for TableFieldInlinedHandle
11796    {
11797        #[inline(always)]
11798        fn new_empty() -> Self {
11799            Self::default()
11800        }
11801
11802        unsafe fn decode(
11803            &mut self,
11804            decoder: &mut fidl::encoding::Decoder<
11805                '_,
11806                fidl::encoding::DefaultFuchsiaResourceDialect,
11807            >,
11808            offset: usize,
11809            mut depth: fidl::encoding::Depth,
11810        ) -> fidl::Result<()> {
11811            decoder.debug_check_bounds::<Self>(offset);
11812            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11813                None => return Err(fidl::Error::NotNullable),
11814                Some(len) => len,
11815            };
11816            // Calling decoder.out_of_line_offset(0) is not allowed.
11817            if len == 0 {
11818                return Ok(());
11819            };
11820            depth.increment()?;
11821            let envelope_size = 8;
11822            let bytes_len = len * envelope_size;
11823            let offset = decoder.out_of_line_offset(bytes_len)?;
11824            // Decode the envelope for each type.
11825            let mut _next_ordinal_to_read = 0;
11826            let mut next_offset = offset;
11827            let end_offset = offset + bytes_len;
11828            _next_ordinal_to_read += 1;
11829            if next_offset >= end_offset {
11830                return Ok(());
11831            }
11832
11833            // Decode unknown envelopes for gaps in ordinals.
11834            while _next_ordinal_to_read < 1 {
11835                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11836                _next_ordinal_to_read += 1;
11837                next_offset += envelope_size;
11838            }
11839
11840            let next_out_of_line = decoder.next_out_of_line();
11841            let handles_before = decoder.remaining_handles();
11842            if let Some((inlined, num_bytes, num_handles)) =
11843                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11844            {
11845                let member_inline_size = <fidl::encoding::HandleType<
11846                    fidl::Channel,
11847                    { fidl::ObjectType::CHANNEL.into_raw() },
11848                    2147483648,
11849                > as fidl::encoding::TypeMarker>::inline_size(
11850                    decoder.context
11851                );
11852                if inlined != (member_inline_size <= 4) {
11853                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11854                }
11855                let inner_offset;
11856                let mut inner_depth = depth.clone();
11857                if inlined {
11858                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11859                    inner_offset = next_offset;
11860                } else {
11861                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11862                    inner_depth.increment()?;
11863                }
11864                let val_ref =
11865                self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
11866                fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11867                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11868                {
11869                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11870                }
11871                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11872                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11873                }
11874            }
11875
11876            next_offset += envelope_size;
11877
11878            // Decode the remaining unknown envelopes.
11879            while next_offset < end_offset {
11880                _next_ordinal_to_read += 1;
11881                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11882                next_offset += envelope_size;
11883            }
11884
11885            Ok(())
11886        }
11887    }
11888
11889    impl TableFieldUnknownResource {
11890        #[inline(always)]
11891        fn max_ordinal_present(&self) -> u64 {
11892            0
11893        }
11894    }
11895
11896    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
11897        type Borrowed<'a> = &'a mut Self;
11898        fn take_or_borrow<'a>(
11899            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11900        ) -> Self::Borrowed<'a> {
11901            value
11902        }
11903    }
11904
11905    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
11906        type Owned = Self;
11907
11908        #[inline(always)]
11909        fn inline_align(_context: fidl::encoding::Context) -> usize {
11910            8
11911        }
11912
11913        #[inline(always)]
11914        fn inline_size(_context: fidl::encoding::Context) -> usize {
11915            16
11916        }
11917    }
11918
11919    unsafe impl
11920        fidl::encoding::Encode<
11921            TableFieldUnknownResource,
11922            fidl::encoding::DefaultFuchsiaResourceDialect,
11923        > for &mut TableFieldUnknownResource
11924    {
11925        unsafe fn encode(
11926            self,
11927            encoder: &mut fidl::encoding::Encoder<
11928                '_,
11929                fidl::encoding::DefaultFuchsiaResourceDialect,
11930            >,
11931            offset: usize,
11932            mut depth: fidl::encoding::Depth,
11933        ) -> fidl::Result<()> {
11934            encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
11935            // Vector header
11936            let max_ordinal: u64 = self.max_ordinal_present();
11937            encoder.write_num(max_ordinal, offset);
11938            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11939            // Calling encoder.out_of_line_offset(0) is not allowed.
11940            if max_ordinal == 0 {
11941                return Ok(());
11942            }
11943            depth.increment()?;
11944            let envelope_size = 8;
11945            let bytes_len = max_ordinal as usize * envelope_size;
11946            #[allow(unused_variables)]
11947            let offset = encoder.out_of_line_offset(bytes_len);
11948            let mut _prev_end_offset: usize = 0;
11949
11950            Ok(())
11951        }
11952    }
11953
11954    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11955        for TableFieldUnknownResource
11956    {
11957        #[inline(always)]
11958        fn new_empty() -> Self {
11959            Self::default()
11960        }
11961
11962        unsafe fn decode(
11963            &mut self,
11964            decoder: &mut fidl::encoding::Decoder<
11965                '_,
11966                fidl::encoding::DefaultFuchsiaResourceDialect,
11967            >,
11968            offset: usize,
11969            mut depth: fidl::encoding::Depth,
11970        ) -> fidl::Result<()> {
11971            decoder.debug_check_bounds::<Self>(offset);
11972            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11973                None => return Err(fidl::Error::NotNullable),
11974                Some(len) => len,
11975            };
11976            // Calling decoder.out_of_line_offset(0) is not allowed.
11977            if len == 0 {
11978                return Ok(());
11979            };
11980            depth.increment()?;
11981            let envelope_size = 8;
11982            let bytes_len = len * envelope_size;
11983            let offset = decoder.out_of_line_offset(bytes_len)?;
11984            // Decode the envelope for each type.
11985            let mut _next_ordinal_to_read = 0;
11986            let mut next_offset = offset;
11987            let end_offset = offset + bytes_len;
11988
11989            // Decode the remaining unknown envelopes.
11990            while next_offset < end_offset {
11991                _next_ordinal_to_read += 1;
11992                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11993                next_offset += envelope_size;
11994            }
11995
11996            Ok(())
11997        }
11998    }
11999
12000    impl TableOfEndpointsTable {
12001        #[inline(always)]
12002        fn max_ordinal_present(&self) -> u64 {
12003            if let Some(_) = self.server_end {
12004                return 2;
12005            }
12006            if let Some(_) = self.client_end {
12007                return 1;
12008            }
12009            0
12010        }
12011    }
12012
12013    impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12014        type Borrowed<'a> = &'a mut Self;
12015        fn take_or_borrow<'a>(
12016            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12017        ) -> Self::Borrowed<'a> {
12018            value
12019        }
12020    }
12021
12022    unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12023        type Owned = Self;
12024
12025        #[inline(always)]
12026        fn inline_align(_context: fidl::encoding::Context) -> usize {
12027            8
12028        }
12029
12030        #[inline(always)]
12031        fn inline_size(_context: fidl::encoding::Context) -> usize {
12032            16
12033        }
12034    }
12035
12036    unsafe impl
12037        fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12038        for &mut TableOfEndpointsTable
12039    {
12040        unsafe fn encode(
12041            self,
12042            encoder: &mut fidl::encoding::Encoder<
12043                '_,
12044                fidl::encoding::DefaultFuchsiaResourceDialect,
12045            >,
12046            offset: usize,
12047            mut depth: fidl::encoding::Depth,
12048        ) -> fidl::Result<()> {
12049            encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12050            // Vector header
12051            let max_ordinal: u64 = self.max_ordinal_present();
12052            encoder.write_num(max_ordinal, offset);
12053            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12054            // Calling encoder.out_of_line_offset(0) is not allowed.
12055            if max_ordinal == 0 {
12056                return Ok(());
12057            }
12058            depth.increment()?;
12059            let envelope_size = 8;
12060            let bytes_len = max_ordinal as usize * envelope_size;
12061            #[allow(unused_variables)]
12062            let offset = encoder.out_of_line_offset(bytes_len);
12063            let mut _prev_end_offset: usize = 0;
12064            if 1 > max_ordinal {
12065                return Ok(());
12066            }
12067
12068            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12069            // are envelope_size bytes.
12070            let cur_offset: usize = (1 - 1) * envelope_size;
12071
12072            // Zero reserved fields.
12073            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12074
12075            // Safety:
12076            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12077            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12078            //   envelope_size bytes, there is always sufficient room.
12079            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12080            self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12081            encoder, offset + cur_offset, depth
12082        )?;
12083
12084            _prev_end_offset = cur_offset + envelope_size;
12085            if 2 > max_ordinal {
12086                return Ok(());
12087            }
12088
12089            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12090            // are envelope_size bytes.
12091            let cur_offset: usize = (2 - 1) * envelope_size;
12092
12093            // Zero reserved fields.
12094            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12095
12096            // Safety:
12097            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12098            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12099            //   envelope_size bytes, there is always sufficient room.
12100            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12101            self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12102            encoder, offset + cur_offset, depth
12103        )?;
12104
12105            _prev_end_offset = cur_offset + envelope_size;
12106
12107            Ok(())
12108        }
12109    }
12110
12111    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12112        for TableOfEndpointsTable
12113    {
12114        #[inline(always)]
12115        fn new_empty() -> Self {
12116            Self::default()
12117        }
12118
12119        unsafe fn decode(
12120            &mut self,
12121            decoder: &mut fidl::encoding::Decoder<
12122                '_,
12123                fidl::encoding::DefaultFuchsiaResourceDialect,
12124            >,
12125            offset: usize,
12126            mut depth: fidl::encoding::Depth,
12127        ) -> fidl::Result<()> {
12128            decoder.debug_check_bounds::<Self>(offset);
12129            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12130                None => return Err(fidl::Error::NotNullable),
12131                Some(len) => len,
12132            };
12133            // Calling decoder.out_of_line_offset(0) is not allowed.
12134            if len == 0 {
12135                return Ok(());
12136            };
12137            depth.increment()?;
12138            let envelope_size = 8;
12139            let bytes_len = len * envelope_size;
12140            let offset = decoder.out_of_line_offset(bytes_len)?;
12141            // Decode the envelope for each type.
12142            let mut _next_ordinal_to_read = 0;
12143            let mut next_offset = offset;
12144            let end_offset = offset + bytes_len;
12145            _next_ordinal_to_read += 1;
12146            if next_offset >= end_offset {
12147                return Ok(());
12148            }
12149
12150            // Decode unknown envelopes for gaps in ordinals.
12151            while _next_ordinal_to_read < 1 {
12152                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12153                _next_ordinal_to_read += 1;
12154                next_offset += envelope_size;
12155            }
12156
12157            let next_out_of_line = decoder.next_out_of_line();
12158            let handles_before = decoder.remaining_handles();
12159            if let Some((inlined, num_bytes, num_handles)) =
12160                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12161            {
12162                let member_inline_size = <fidl::encoding::Endpoint<
12163                    fidl::endpoints::ClientEnd<ProtocolMarker>,
12164                > as fidl::encoding::TypeMarker>::inline_size(
12165                    decoder.context
12166                );
12167                if inlined != (member_inline_size <= 4) {
12168                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12169                }
12170                let inner_offset;
12171                let mut inner_depth = depth.clone();
12172                if inlined {
12173                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12174                    inner_offset = next_offset;
12175                } else {
12176                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12177                    inner_depth.increment()?;
12178                }
12179                let val_ref = self.client_end.get_or_insert_with(|| {
12180                    fidl::new_empty!(
12181                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12182                        fidl::encoding::DefaultFuchsiaResourceDialect
12183                    )
12184                });
12185                fidl::decode!(
12186                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12187                    fidl::encoding::DefaultFuchsiaResourceDialect,
12188                    val_ref,
12189                    decoder,
12190                    inner_offset,
12191                    inner_depth
12192                )?;
12193                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12194                {
12195                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12196                }
12197                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12198                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12199                }
12200            }
12201
12202            next_offset += envelope_size;
12203            _next_ordinal_to_read += 1;
12204            if next_offset >= end_offset {
12205                return Ok(());
12206            }
12207
12208            // Decode unknown envelopes for gaps in ordinals.
12209            while _next_ordinal_to_read < 2 {
12210                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12211                _next_ordinal_to_read += 1;
12212                next_offset += envelope_size;
12213            }
12214
12215            let next_out_of_line = decoder.next_out_of_line();
12216            let handles_before = decoder.remaining_handles();
12217            if let Some((inlined, num_bytes, num_handles)) =
12218                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12219            {
12220                let member_inline_size = <fidl::encoding::Endpoint<
12221                    fidl::endpoints::ServerEnd<ProtocolMarker>,
12222                > as fidl::encoding::TypeMarker>::inline_size(
12223                    decoder.context
12224                );
12225                if inlined != (member_inline_size <= 4) {
12226                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12227                }
12228                let inner_offset;
12229                let mut inner_depth = depth.clone();
12230                if inlined {
12231                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12232                    inner_offset = next_offset;
12233                } else {
12234                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12235                    inner_depth.increment()?;
12236                }
12237                let val_ref = self.server_end.get_or_insert_with(|| {
12238                    fidl::new_empty!(
12239                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12240                        fidl::encoding::DefaultFuchsiaResourceDialect
12241                    )
12242                });
12243                fidl::decode!(
12244                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12245                    fidl::encoding::DefaultFuchsiaResourceDialect,
12246                    val_ref,
12247                    decoder,
12248                    inner_offset,
12249                    inner_depth
12250                )?;
12251                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12252                {
12253                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12254                }
12255                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12256                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12257                }
12258            }
12259
12260            next_offset += envelope_size;
12261
12262            // Decode the remaining unknown envelopes.
12263            while next_offset < end_offset {
12264                _next_ordinal_to_read += 1;
12265                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12266                next_offset += envelope_size;
12267            }
12268
12269            Ok(())
12270        }
12271    }
12272
12273    impl TableUnionWithVectorReservedSandwich {
12274        #[inline(always)]
12275        fn max_ordinal_present(&self) -> u64 {
12276            if let Some(_) = self.uv {
12277                return 2;
12278            }
12279            0
12280        }
12281    }
12282
12283    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12284        type Borrowed<'a> = &'a mut Self;
12285        fn take_or_borrow<'a>(
12286            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12287        ) -> Self::Borrowed<'a> {
12288            value
12289        }
12290    }
12291
12292    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12293        type Owned = Self;
12294
12295        #[inline(always)]
12296        fn inline_align(_context: fidl::encoding::Context) -> usize {
12297            8
12298        }
12299
12300        #[inline(always)]
12301        fn inline_size(_context: fidl::encoding::Context) -> usize {
12302            16
12303        }
12304    }
12305
12306    unsafe impl
12307        fidl::encoding::Encode<
12308            TableUnionWithVectorReservedSandwich,
12309            fidl::encoding::DefaultFuchsiaResourceDialect,
12310        > for &mut TableUnionWithVectorReservedSandwich
12311    {
12312        unsafe fn encode(
12313            self,
12314            encoder: &mut fidl::encoding::Encoder<
12315                '_,
12316                fidl::encoding::DefaultFuchsiaResourceDialect,
12317            >,
12318            offset: usize,
12319            mut depth: fidl::encoding::Depth,
12320        ) -> fidl::Result<()> {
12321            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12322            // Vector header
12323            let max_ordinal: u64 = self.max_ordinal_present();
12324            encoder.write_num(max_ordinal, offset);
12325            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12326            // Calling encoder.out_of_line_offset(0) is not allowed.
12327            if max_ordinal == 0 {
12328                return Ok(());
12329            }
12330            depth.increment()?;
12331            let envelope_size = 8;
12332            let bytes_len = max_ordinal as usize * envelope_size;
12333            #[allow(unused_variables)]
12334            let offset = encoder.out_of_line_offset(bytes_len);
12335            let mut _prev_end_offset: usize = 0;
12336            if 2 > max_ordinal {
12337                return Ok(());
12338            }
12339
12340            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12341            // are envelope_size bytes.
12342            let cur_offset: usize = (2 - 1) * envelope_size;
12343
12344            // Zero reserved fields.
12345            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12346
12347            // Safety:
12348            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12349            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12350            //   envelope_size bytes, there is always sufficient room.
12351            fidl::encoding::encode_in_envelope_optional::<
12352                UnionWithVector,
12353                fidl::encoding::DefaultFuchsiaResourceDialect,
12354            >(
12355                self.uv
12356                    .as_mut()
12357                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12358                encoder,
12359                offset + cur_offset,
12360                depth,
12361            )?;
12362
12363            _prev_end_offset = cur_offset + envelope_size;
12364
12365            Ok(())
12366        }
12367    }
12368
12369    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12370        for TableUnionWithVectorReservedSandwich
12371    {
12372        #[inline(always)]
12373        fn new_empty() -> Self {
12374            Self::default()
12375        }
12376
12377        unsafe fn decode(
12378            &mut self,
12379            decoder: &mut fidl::encoding::Decoder<
12380                '_,
12381                fidl::encoding::DefaultFuchsiaResourceDialect,
12382            >,
12383            offset: usize,
12384            mut depth: fidl::encoding::Depth,
12385        ) -> fidl::Result<()> {
12386            decoder.debug_check_bounds::<Self>(offset);
12387            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12388                None => return Err(fidl::Error::NotNullable),
12389                Some(len) => len,
12390            };
12391            // Calling decoder.out_of_line_offset(0) is not allowed.
12392            if len == 0 {
12393                return Ok(());
12394            };
12395            depth.increment()?;
12396            let envelope_size = 8;
12397            let bytes_len = len * envelope_size;
12398            let offset = decoder.out_of_line_offset(bytes_len)?;
12399            // Decode the envelope for each type.
12400            let mut _next_ordinal_to_read = 0;
12401            let mut next_offset = offset;
12402            let end_offset = offset + bytes_len;
12403            _next_ordinal_to_read += 1;
12404            if next_offset >= end_offset {
12405                return Ok(());
12406            }
12407
12408            // Decode unknown envelopes for gaps in ordinals.
12409            while _next_ordinal_to_read < 2 {
12410                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12411                _next_ordinal_to_read += 1;
12412                next_offset += envelope_size;
12413            }
12414
12415            let next_out_of_line = decoder.next_out_of_line();
12416            let handles_before = decoder.remaining_handles();
12417            if let Some((inlined, num_bytes, num_handles)) =
12418                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12419            {
12420                let member_inline_size =
12421                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12422                if inlined != (member_inline_size <= 4) {
12423                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12424                }
12425                let inner_offset;
12426                let mut inner_depth = depth.clone();
12427                if inlined {
12428                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12429                    inner_offset = next_offset;
12430                } else {
12431                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12432                    inner_depth.increment()?;
12433                }
12434                let val_ref = self.uv.get_or_insert_with(|| {
12435                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12436                });
12437                fidl::decode!(
12438                    UnionWithVector,
12439                    fidl::encoding::DefaultFuchsiaResourceDialect,
12440                    val_ref,
12441                    decoder,
12442                    inner_offset,
12443                    inner_depth
12444                )?;
12445                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12446                {
12447                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12448                }
12449                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12450                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12451                }
12452            }
12453
12454            next_offset += envelope_size;
12455
12456            // Decode the remaining unknown envelopes.
12457            while next_offset < end_offset {
12458                _next_ordinal_to_read += 1;
12459                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12460                next_offset += envelope_size;
12461            }
12462
12463            Ok(())
12464        }
12465    }
12466
12467    impl TableUnionWithVectorStructSandwich {
12468        #[inline(always)]
12469        fn max_ordinal_present(&self) -> u64 {
12470            if let Some(_) = self.s2 {
12471                return 3;
12472            }
12473            if let Some(_) = self.uv {
12474                return 2;
12475            }
12476            if let Some(_) = self.s1 {
12477                return 1;
12478            }
12479            0
12480        }
12481    }
12482
12483    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12484        type Borrowed<'a> = &'a mut Self;
12485        fn take_or_borrow<'a>(
12486            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12487        ) -> Self::Borrowed<'a> {
12488            value
12489        }
12490    }
12491
12492    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12493        type Owned = Self;
12494
12495        #[inline(always)]
12496        fn inline_align(_context: fidl::encoding::Context) -> usize {
12497            8
12498        }
12499
12500        #[inline(always)]
12501        fn inline_size(_context: fidl::encoding::Context) -> usize {
12502            16
12503        }
12504    }
12505
12506    unsafe impl
12507        fidl::encoding::Encode<
12508            TableUnionWithVectorStructSandwich,
12509            fidl::encoding::DefaultFuchsiaResourceDialect,
12510        > for &mut TableUnionWithVectorStructSandwich
12511    {
12512        unsafe fn encode(
12513            self,
12514            encoder: &mut fidl::encoding::Encoder<
12515                '_,
12516                fidl::encoding::DefaultFuchsiaResourceDialect,
12517            >,
12518            offset: usize,
12519            mut depth: fidl::encoding::Depth,
12520        ) -> fidl::Result<()> {
12521            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12522            // Vector header
12523            let max_ordinal: u64 = self.max_ordinal_present();
12524            encoder.write_num(max_ordinal, offset);
12525            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12526            // Calling encoder.out_of_line_offset(0) is not allowed.
12527            if max_ordinal == 0 {
12528                return Ok(());
12529            }
12530            depth.increment()?;
12531            let envelope_size = 8;
12532            let bytes_len = max_ordinal as usize * envelope_size;
12533            #[allow(unused_variables)]
12534            let offset = encoder.out_of_line_offset(bytes_len);
12535            let mut _prev_end_offset: usize = 0;
12536            if 1 > max_ordinal {
12537                return Ok(());
12538            }
12539
12540            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12541            // are envelope_size bytes.
12542            let cur_offset: usize = (1 - 1) * envelope_size;
12543
12544            // Zero reserved fields.
12545            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12546
12547            // Safety:
12548            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12549            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12550            //   envelope_size bytes, there is always sufficient room.
12551            fidl::encoding::encode_in_envelope_optional::<
12552                StructSize3Align1,
12553                fidl::encoding::DefaultFuchsiaResourceDialect,
12554            >(
12555                self.s1
12556                    .as_ref()
12557                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12558                encoder,
12559                offset + cur_offset,
12560                depth,
12561            )?;
12562
12563            _prev_end_offset = cur_offset + envelope_size;
12564            if 2 > max_ordinal {
12565                return Ok(());
12566            }
12567
12568            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12569            // are envelope_size bytes.
12570            let cur_offset: usize = (2 - 1) * envelope_size;
12571
12572            // Zero reserved fields.
12573            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12574
12575            // Safety:
12576            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12577            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12578            //   envelope_size bytes, there is always sufficient room.
12579            fidl::encoding::encode_in_envelope_optional::<
12580                UnionWithVector,
12581                fidl::encoding::DefaultFuchsiaResourceDialect,
12582            >(
12583                self.uv
12584                    .as_mut()
12585                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12586                encoder,
12587                offset + cur_offset,
12588                depth,
12589            )?;
12590
12591            _prev_end_offset = cur_offset + envelope_size;
12592            if 3 > max_ordinal {
12593                return Ok(());
12594            }
12595
12596            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12597            // are envelope_size bytes.
12598            let cur_offset: usize = (3 - 1) * envelope_size;
12599
12600            // Zero reserved fields.
12601            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12602
12603            // Safety:
12604            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12605            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12606            //   envelope_size bytes, there is always sufficient room.
12607            fidl::encoding::encode_in_envelope_optional::<
12608                StructSize3Align1,
12609                fidl::encoding::DefaultFuchsiaResourceDialect,
12610            >(
12611                self.s2
12612                    .as_ref()
12613                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12614                encoder,
12615                offset + cur_offset,
12616                depth,
12617            )?;
12618
12619            _prev_end_offset = cur_offset + envelope_size;
12620
12621            Ok(())
12622        }
12623    }
12624
12625    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12626        for TableUnionWithVectorStructSandwich
12627    {
12628        #[inline(always)]
12629        fn new_empty() -> Self {
12630            Self::default()
12631        }
12632
12633        unsafe fn decode(
12634            &mut self,
12635            decoder: &mut fidl::encoding::Decoder<
12636                '_,
12637                fidl::encoding::DefaultFuchsiaResourceDialect,
12638            >,
12639            offset: usize,
12640            mut depth: fidl::encoding::Depth,
12641        ) -> fidl::Result<()> {
12642            decoder.debug_check_bounds::<Self>(offset);
12643            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12644                None => return Err(fidl::Error::NotNullable),
12645                Some(len) => len,
12646            };
12647            // Calling decoder.out_of_line_offset(0) is not allowed.
12648            if len == 0 {
12649                return Ok(());
12650            };
12651            depth.increment()?;
12652            let envelope_size = 8;
12653            let bytes_len = len * envelope_size;
12654            let offset = decoder.out_of_line_offset(bytes_len)?;
12655            // Decode the envelope for each type.
12656            let mut _next_ordinal_to_read = 0;
12657            let mut next_offset = offset;
12658            let end_offset = offset + bytes_len;
12659            _next_ordinal_to_read += 1;
12660            if next_offset >= end_offset {
12661                return Ok(());
12662            }
12663
12664            // Decode unknown envelopes for gaps in ordinals.
12665            while _next_ordinal_to_read < 1 {
12666                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12667                _next_ordinal_to_read += 1;
12668                next_offset += envelope_size;
12669            }
12670
12671            let next_out_of_line = decoder.next_out_of_line();
12672            let handles_before = decoder.remaining_handles();
12673            if let Some((inlined, num_bytes, num_handles)) =
12674                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12675            {
12676                let member_inline_size =
12677                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12678                if inlined != (member_inline_size <= 4) {
12679                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12680                }
12681                let inner_offset;
12682                let mut inner_depth = depth.clone();
12683                if inlined {
12684                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12685                    inner_offset = next_offset;
12686                } else {
12687                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12688                    inner_depth.increment()?;
12689                }
12690                let val_ref = self.s1.get_or_insert_with(|| {
12691                    fidl::new_empty!(
12692                        StructSize3Align1,
12693                        fidl::encoding::DefaultFuchsiaResourceDialect
12694                    )
12695                });
12696                fidl::decode!(
12697                    StructSize3Align1,
12698                    fidl::encoding::DefaultFuchsiaResourceDialect,
12699                    val_ref,
12700                    decoder,
12701                    inner_offset,
12702                    inner_depth
12703                )?;
12704                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12705                {
12706                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12707                }
12708                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12709                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12710                }
12711            }
12712
12713            next_offset += envelope_size;
12714            _next_ordinal_to_read += 1;
12715            if next_offset >= end_offset {
12716                return Ok(());
12717            }
12718
12719            // Decode unknown envelopes for gaps in ordinals.
12720            while _next_ordinal_to_read < 2 {
12721                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12722                _next_ordinal_to_read += 1;
12723                next_offset += envelope_size;
12724            }
12725
12726            let next_out_of_line = decoder.next_out_of_line();
12727            let handles_before = decoder.remaining_handles();
12728            if let Some((inlined, num_bytes, num_handles)) =
12729                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12730            {
12731                let member_inline_size =
12732                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12733                if inlined != (member_inline_size <= 4) {
12734                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12735                }
12736                let inner_offset;
12737                let mut inner_depth = depth.clone();
12738                if inlined {
12739                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12740                    inner_offset = next_offset;
12741                } else {
12742                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12743                    inner_depth.increment()?;
12744                }
12745                let val_ref = self.uv.get_or_insert_with(|| {
12746                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12747                });
12748                fidl::decode!(
12749                    UnionWithVector,
12750                    fidl::encoding::DefaultFuchsiaResourceDialect,
12751                    val_ref,
12752                    decoder,
12753                    inner_offset,
12754                    inner_depth
12755                )?;
12756                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12757                {
12758                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12759                }
12760                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12761                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12762                }
12763            }
12764
12765            next_offset += envelope_size;
12766            _next_ordinal_to_read += 1;
12767            if next_offset >= end_offset {
12768                return Ok(());
12769            }
12770
12771            // Decode unknown envelopes for gaps in ordinals.
12772            while _next_ordinal_to_read < 3 {
12773                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12774                _next_ordinal_to_read += 1;
12775                next_offset += envelope_size;
12776            }
12777
12778            let next_out_of_line = decoder.next_out_of_line();
12779            let handles_before = decoder.remaining_handles();
12780            if let Some((inlined, num_bytes, num_handles)) =
12781                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12782            {
12783                let member_inline_size =
12784                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12785                if inlined != (member_inline_size <= 4) {
12786                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12787                }
12788                let inner_offset;
12789                let mut inner_depth = depth.clone();
12790                if inlined {
12791                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12792                    inner_offset = next_offset;
12793                } else {
12794                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12795                    inner_depth.increment()?;
12796                }
12797                let val_ref = self.s2.get_or_insert_with(|| {
12798                    fidl::new_empty!(
12799                        StructSize3Align1,
12800                        fidl::encoding::DefaultFuchsiaResourceDialect
12801                    )
12802                });
12803                fidl::decode!(
12804                    StructSize3Align1,
12805                    fidl::encoding::DefaultFuchsiaResourceDialect,
12806                    val_ref,
12807                    decoder,
12808                    inner_offset,
12809                    inner_depth
12810                )?;
12811                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12812                {
12813                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12814                }
12815                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12816                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12817                }
12818            }
12819
12820            next_offset += envelope_size;
12821
12822            // Decode the remaining unknown envelopes.
12823            while next_offset < end_offset {
12824                _next_ordinal_to_read += 1;
12825                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12826                next_offset += envelope_size;
12827            }
12828
12829            Ok(())
12830        }
12831    }
12832
12833    impl VectorOfArrayOfEventInTableWithReducedRights {
12834        #[inline(always)]
12835        fn max_ordinal_present(&self) -> u64 {
12836            if let Some(_) = self.h {
12837                return 1;
12838            }
12839            0
12840        }
12841    }
12842
12843    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12844        type Borrowed<'a> = &'a mut Self;
12845        fn take_or_borrow<'a>(
12846            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12847        ) -> Self::Borrowed<'a> {
12848            value
12849        }
12850    }
12851
12852    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12853        type Owned = Self;
12854
12855        #[inline(always)]
12856        fn inline_align(_context: fidl::encoding::Context) -> usize {
12857            8
12858        }
12859
12860        #[inline(always)]
12861        fn inline_size(_context: fidl::encoding::Context) -> usize {
12862            16
12863        }
12864    }
12865
12866    unsafe impl
12867        fidl::encoding::Encode<
12868            VectorOfArrayOfEventInTableWithReducedRights,
12869            fidl::encoding::DefaultFuchsiaResourceDialect,
12870        > for &mut VectorOfArrayOfEventInTableWithReducedRights
12871    {
12872        unsafe fn encode(
12873            self,
12874            encoder: &mut fidl::encoding::Encoder<
12875                '_,
12876                fidl::encoding::DefaultFuchsiaResourceDialect,
12877            >,
12878            offset: usize,
12879            mut depth: fidl::encoding::Depth,
12880        ) -> fidl::Result<()> {
12881            encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
12882            // Vector header
12883            let max_ordinal: u64 = self.max_ordinal_present();
12884            encoder.write_num(max_ordinal, offset);
12885            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12886            // Calling encoder.out_of_line_offset(0) is not allowed.
12887            if max_ordinal == 0 {
12888                return Ok(());
12889            }
12890            depth.increment()?;
12891            let envelope_size = 8;
12892            let bytes_len = max_ordinal as usize * envelope_size;
12893            #[allow(unused_variables)]
12894            let offset = encoder.out_of_line_offset(bytes_len);
12895            let mut _prev_end_offset: usize = 0;
12896            if 1 > max_ordinal {
12897                return Ok(());
12898            }
12899
12900            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12901            // are envelope_size bytes.
12902            let cur_offset: usize = (1 - 1) * envelope_size;
12903
12904            // Zero reserved fields.
12905            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12906
12907            // Safety:
12908            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12909            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12910            //   envelope_size bytes, there is always sufficient room.
12911            fidl::encoding::encode_in_envelope_optional::<
12912                fidl::encoding::Vector<
12913                    fidl::encoding::Array<
12914                        fidl::encoding::HandleType<
12915                            fidl::Event,
12916                            { fidl::ObjectType::EVENT.into_raw() },
12917                            49155,
12918                        >,
12919                        1,
12920                    >,
12921                    1,
12922                >,
12923                fidl::encoding::DefaultFuchsiaResourceDialect,
12924            >(
12925                self.h.as_mut().map(
12926                    <fidl::encoding::Vector<
12927                        fidl::encoding::Array<
12928                            fidl::encoding::HandleType<
12929                                fidl::Event,
12930                                { fidl::ObjectType::EVENT.into_raw() },
12931                                49155,
12932                            >,
12933                            1,
12934                        >,
12935                        1,
12936                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12937                ),
12938                encoder,
12939                offset + cur_offset,
12940                depth,
12941            )?;
12942
12943            _prev_end_offset = cur_offset + envelope_size;
12944
12945            Ok(())
12946        }
12947    }
12948
12949    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12950        for VectorOfArrayOfEventInTableWithReducedRights
12951    {
12952        #[inline(always)]
12953        fn new_empty() -> Self {
12954            Self::default()
12955        }
12956
12957        unsafe fn decode(
12958            &mut self,
12959            decoder: &mut fidl::encoding::Decoder<
12960                '_,
12961                fidl::encoding::DefaultFuchsiaResourceDialect,
12962            >,
12963            offset: usize,
12964            mut depth: fidl::encoding::Depth,
12965        ) -> fidl::Result<()> {
12966            decoder.debug_check_bounds::<Self>(offset);
12967            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12968                None => return Err(fidl::Error::NotNullable),
12969                Some(len) => len,
12970            };
12971            // Calling decoder.out_of_line_offset(0) is not allowed.
12972            if len == 0 {
12973                return Ok(());
12974            };
12975            depth.increment()?;
12976            let envelope_size = 8;
12977            let bytes_len = len * envelope_size;
12978            let offset = decoder.out_of_line_offset(bytes_len)?;
12979            // Decode the envelope for each type.
12980            let mut _next_ordinal_to_read = 0;
12981            let mut next_offset = offset;
12982            let end_offset = offset + bytes_len;
12983            _next_ordinal_to_read += 1;
12984            if next_offset >= end_offset {
12985                return Ok(());
12986            }
12987
12988            // Decode unknown envelopes for gaps in ordinals.
12989            while _next_ordinal_to_read < 1 {
12990                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12991                _next_ordinal_to_read += 1;
12992                next_offset += envelope_size;
12993            }
12994
12995            let next_out_of_line = decoder.next_out_of_line();
12996            let handles_before = decoder.remaining_handles();
12997            if let Some((inlined, num_bytes, num_handles)) =
12998                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12999            {
13000                let member_inline_size = <fidl::encoding::Vector<
13001                    fidl::encoding::Array<
13002                        fidl::encoding::HandleType<
13003                            fidl::Event,
13004                            { fidl::ObjectType::EVENT.into_raw() },
13005                            49155,
13006                        >,
13007                        1,
13008                    >,
13009                    1,
13010                > as fidl::encoding::TypeMarker>::inline_size(
13011                    decoder.context
13012                );
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.h.get_or_insert_with(|| {
13026                    fidl::new_empty!(
13027                        fidl::encoding::Vector<
13028                            fidl::encoding::Array<
13029                                fidl::encoding::HandleType<
13030                                    fidl::Event,
13031                                    { fidl::ObjectType::EVENT.into_raw() },
13032                                    49155,
13033                                >,
13034                                1,
13035                            >,
13036                            1,
13037                        >,
13038                        fidl::encoding::DefaultFuchsiaResourceDialect
13039                    )
13040                });
13041                fidl::decode!(
13042                    fidl::encoding::Vector<
13043                        fidl::encoding::Array<
13044                            fidl::encoding::HandleType<
13045                                fidl::Event,
13046                                { fidl::ObjectType::EVENT.into_raw() },
13047                                49155,
13048                            >,
13049                            1,
13050                        >,
13051                        1,
13052                    >,
13053                    fidl::encoding::DefaultFuchsiaResourceDialect,
13054                    val_ref,
13055                    decoder,
13056                    inner_offset,
13057                    inner_depth
13058                )?;
13059                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13060                {
13061                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13062                }
13063                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13064                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13065                }
13066            }
13067
13068            next_offset += envelope_size;
13069
13070            // Decode the remaining unknown envelopes.
13071            while next_offset < end_offset {
13072                _next_ordinal_to_read += 1;
13073                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13074                next_offset += envelope_size;
13075            }
13076
13077            Ok(())
13078        }
13079    }
13080
13081    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13082        type Borrowed<'a> = &'a mut Self;
13083        fn take_or_borrow<'a>(
13084            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13085        ) -> Self::Borrowed<'a> {
13086            value
13087        }
13088    }
13089
13090    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13091        type Owned = Self;
13092
13093        #[inline(always)]
13094        fn inline_align(_context: fidl::encoding::Context) -> usize {
13095            8
13096        }
13097
13098        #[inline(always)]
13099        fn inline_size(_context: fidl::encoding::Context) -> usize {
13100            16
13101        }
13102    }
13103
13104    unsafe impl
13105        fidl::encoding::Encode<
13106            ArrayOfVectorOfEventInUnionWithDefaultRights,
13107            fidl::encoding::DefaultFuchsiaResourceDialect,
13108        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13109    {
13110        #[inline]
13111        unsafe fn encode(
13112            self,
13113            encoder: &mut fidl::encoding::Encoder<
13114                '_,
13115                fidl::encoding::DefaultFuchsiaResourceDialect,
13116            >,
13117            offset: usize,
13118            _depth: fidl::encoding::Depth,
13119        ) -> fidl::Result<()> {
13120            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13121            encoder.write_num::<u64>(self.ordinal(), offset);
13122            match self {
13123                ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13124                    fidl::encoding::encode_in_envelope::<
13125                        fidl::encoding::Array<
13126                            fidl::encoding::Vector<
13127                                fidl::encoding::HandleType<
13128                                    fidl::Event,
13129                                    { fidl::ObjectType::EVENT.into_raw() },
13130                                    53251,
13131                                >,
13132                                1,
13133                            >,
13134                            1,
13135                        >,
13136                        fidl::encoding::DefaultFuchsiaResourceDialect,
13137                    >(
13138                        <fidl::encoding::Array<
13139                            fidl::encoding::Vector<
13140                                fidl::encoding::HandleType<
13141                                    fidl::Event,
13142                                    { fidl::ObjectType::EVENT.into_raw() },
13143                                    53251,
13144                                >,
13145                                1,
13146                            >,
13147                            1,
13148                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13149                            val
13150                        ),
13151                        encoder,
13152                        offset + 8,
13153                        _depth,
13154                    )
13155                }
13156            }
13157        }
13158    }
13159
13160    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13161        for ArrayOfVectorOfEventInUnionWithDefaultRights
13162    {
13163        #[inline(always)]
13164        fn new_empty() -> Self {
13165            Self::H(fidl::new_empty!(
13166                fidl::encoding::Array<
13167                    fidl::encoding::Vector<
13168                        fidl::encoding::HandleType<
13169                            fidl::Event,
13170                            { fidl::ObjectType::EVENT.into_raw() },
13171                            53251,
13172                        >,
13173                        1,
13174                    >,
13175                    1,
13176                >,
13177                fidl::encoding::DefaultFuchsiaResourceDialect
13178            ))
13179        }
13180
13181        #[inline]
13182        unsafe fn decode(
13183            &mut self,
13184            decoder: &mut fidl::encoding::Decoder<
13185                '_,
13186                fidl::encoding::DefaultFuchsiaResourceDialect,
13187            >,
13188            offset: usize,
13189            mut depth: fidl::encoding::Depth,
13190        ) -> fidl::Result<()> {
13191            decoder.debug_check_bounds::<Self>(offset);
13192            #[allow(unused_variables)]
13193            let next_out_of_line = decoder.next_out_of_line();
13194            let handles_before = decoder.remaining_handles();
13195            let (ordinal, inlined, num_bytes, num_handles) =
13196                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13197
13198            let member_inline_size = match ordinal {
13199                1 => <fidl::encoding::Array<
13200                    fidl::encoding::Vector<
13201                        fidl::encoding::HandleType<
13202                            fidl::Event,
13203                            { fidl::ObjectType::EVENT.into_raw() },
13204                            53251,
13205                        >,
13206                        1,
13207                    >,
13208                    1,
13209                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13210                _ => return Err(fidl::Error::UnknownUnionTag),
13211            };
13212
13213            if inlined != (member_inline_size <= 4) {
13214                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13215            }
13216            let _inner_offset;
13217            if inlined {
13218                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13219                _inner_offset = offset + 8;
13220            } else {
13221                depth.increment()?;
13222                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13223            }
13224            match ordinal {
13225                1 => {
13226                    #[allow(irrefutable_let_patterns)]
13227                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13228                        // Do nothing, read the value into the object
13229                    } else {
13230                        // Initialize `self` to the right variant
13231                        *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13232                            fidl::encoding::Array<
13233                                fidl::encoding::Vector<
13234                                    fidl::encoding::HandleType<
13235                                        fidl::Event,
13236                                        { fidl::ObjectType::EVENT.into_raw() },
13237                                        53251,
13238                                    >,
13239                                    1,
13240                                >,
13241                                1,
13242                            >,
13243                            fidl::encoding::DefaultFuchsiaResourceDialect
13244                        ));
13245                    }
13246                    #[allow(irrefutable_let_patterns)]
13247                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13248                        fidl::decode!(
13249                            fidl::encoding::Array<
13250                                fidl::encoding::Vector<
13251                                    fidl::encoding::HandleType<
13252                                        fidl::Event,
13253                                        { fidl::ObjectType::EVENT.into_raw() },
13254                                        53251,
13255                                    >,
13256                                    1,
13257                                >,
13258                                1,
13259                            >,
13260                            fidl::encoding::DefaultFuchsiaResourceDialect,
13261                            val,
13262                            decoder,
13263                            _inner_offset,
13264                            depth
13265                        )?;
13266                    } else {
13267                        unreachable!()
13268                    }
13269                }
13270                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13271            }
13272            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13273                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13274            }
13275            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13276                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13277            }
13278            Ok(())
13279        }
13280    }
13281
13282    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13283        type Borrowed<'a> = &'a mut Self;
13284        fn take_or_borrow<'a>(
13285            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13286        ) -> Self::Borrowed<'a> {
13287            value
13288        }
13289    }
13290
13291    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13292        type Owned = Self;
13293
13294        #[inline(always)]
13295        fn inline_align(_context: fidl::encoding::Context) -> usize {
13296            8
13297        }
13298
13299        #[inline(always)]
13300        fn inline_size(_context: fidl::encoding::Context) -> usize {
13301            16
13302        }
13303    }
13304
13305    unsafe impl
13306        fidl::encoding::Encode<
13307            ArrayOfVectorOfEventInUnionWithReducedRights,
13308            fidl::encoding::DefaultFuchsiaResourceDialect,
13309        > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
13310    {
13311        #[inline]
13312        unsafe fn encode(
13313            self,
13314            encoder: &mut fidl::encoding::Encoder<
13315                '_,
13316                fidl::encoding::DefaultFuchsiaResourceDialect,
13317            >,
13318            offset: usize,
13319            _depth: fidl::encoding::Depth,
13320        ) -> fidl::Result<()> {
13321            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
13322            encoder.write_num::<u64>(self.ordinal(), offset);
13323            match self {
13324                ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
13325                    fidl::encoding::encode_in_envelope::<
13326                        fidl::encoding::Array<
13327                            fidl::encoding::Vector<
13328                                fidl::encoding::HandleType<
13329                                    fidl::Event,
13330                                    { fidl::ObjectType::EVENT.into_raw() },
13331                                    49155,
13332                                >,
13333                                1,
13334                            >,
13335                            1,
13336                        >,
13337                        fidl::encoding::DefaultFuchsiaResourceDialect,
13338                    >(
13339                        <fidl::encoding::Array<
13340                            fidl::encoding::Vector<
13341                                fidl::encoding::HandleType<
13342                                    fidl::Event,
13343                                    { fidl::ObjectType::EVENT.into_raw() },
13344                                    49155,
13345                                >,
13346                                1,
13347                            >,
13348                            1,
13349                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13350                            val
13351                        ),
13352                        encoder,
13353                        offset + 8,
13354                        _depth,
13355                    )
13356                }
13357            }
13358        }
13359    }
13360
13361    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13362        for ArrayOfVectorOfEventInUnionWithReducedRights
13363    {
13364        #[inline(always)]
13365        fn new_empty() -> Self {
13366            Self::H(fidl::new_empty!(
13367                fidl::encoding::Array<
13368                    fidl::encoding::Vector<
13369                        fidl::encoding::HandleType<
13370                            fidl::Event,
13371                            { fidl::ObjectType::EVENT.into_raw() },
13372                            49155,
13373                        >,
13374                        1,
13375                    >,
13376                    1,
13377                >,
13378                fidl::encoding::DefaultFuchsiaResourceDialect
13379            ))
13380        }
13381
13382        #[inline]
13383        unsafe fn decode(
13384            &mut self,
13385            decoder: &mut fidl::encoding::Decoder<
13386                '_,
13387                fidl::encoding::DefaultFuchsiaResourceDialect,
13388            >,
13389            offset: usize,
13390            mut depth: fidl::encoding::Depth,
13391        ) -> fidl::Result<()> {
13392            decoder.debug_check_bounds::<Self>(offset);
13393            #[allow(unused_variables)]
13394            let next_out_of_line = decoder.next_out_of_line();
13395            let handles_before = decoder.remaining_handles();
13396            let (ordinal, inlined, num_bytes, num_handles) =
13397                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13398
13399            let member_inline_size = match ordinal {
13400                1 => <fidl::encoding::Array<
13401                    fidl::encoding::Vector<
13402                        fidl::encoding::HandleType<
13403                            fidl::Event,
13404                            { fidl::ObjectType::EVENT.into_raw() },
13405                            49155,
13406                        >,
13407                        1,
13408                    >,
13409                    1,
13410                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13411                _ => return Err(fidl::Error::UnknownUnionTag),
13412            };
13413
13414            if inlined != (member_inline_size <= 4) {
13415                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13416            }
13417            let _inner_offset;
13418            if inlined {
13419                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13420                _inner_offset = offset + 8;
13421            } else {
13422                depth.increment()?;
13423                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13424            }
13425            match ordinal {
13426                1 => {
13427                    #[allow(irrefutable_let_patterns)]
13428                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
13429                        // Do nothing, read the value into the object
13430                    } else {
13431                        // Initialize `self` to the right variant
13432                        *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
13433                            fidl::encoding::Array<
13434                                fidl::encoding::Vector<
13435                                    fidl::encoding::HandleType<
13436                                        fidl::Event,
13437                                        { fidl::ObjectType::EVENT.into_raw() },
13438                                        49155,
13439                                    >,
13440                                    1,
13441                                >,
13442                                1,
13443                            >,
13444                            fidl::encoding::DefaultFuchsiaResourceDialect
13445                        ));
13446                    }
13447                    #[allow(irrefutable_let_patterns)]
13448                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
13449                        fidl::decode!(
13450                            fidl::encoding::Array<
13451                                fidl::encoding::Vector<
13452                                    fidl::encoding::HandleType<
13453                                        fidl::Event,
13454                                        { fidl::ObjectType::EVENT.into_raw() },
13455                                        49155,
13456                                    >,
13457                                    1,
13458                                >,
13459                                1,
13460                            >,
13461                            fidl::encoding::DefaultFuchsiaResourceDialect,
13462                            val,
13463                            decoder,
13464                            _inner_offset,
13465                            depth
13466                        )?;
13467                    } else {
13468                        unreachable!()
13469                    }
13470                }
13471                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13472            }
13473            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13474                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13475            }
13476            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13477                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13478            }
13479            Ok(())
13480        }
13481    }
13482
13483    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
13484        type Borrowed<'a> = &'a mut Self;
13485        fn take_or_borrow<'a>(
13486            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13487        ) -> Self::Borrowed<'a> {
13488            value
13489        }
13490    }
13491
13492    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
13493        type Owned = Self;
13494
13495        #[inline(always)]
13496        fn inline_align(_context: fidl::encoding::Context) -> usize {
13497            8
13498        }
13499
13500        #[inline(always)]
13501        fn inline_size(_context: fidl::encoding::Context) -> usize {
13502            16
13503        }
13504    }
13505
13506    unsafe impl
13507        fidl::encoding::Encode<
13508            EnvelopeInliningTestUnion,
13509            fidl::encoding::DefaultFuchsiaResourceDialect,
13510        > for &mut EnvelopeInliningTestUnion
13511    {
13512        #[inline]
13513        unsafe fn encode(
13514            self,
13515            encoder: &mut fidl::encoding::Encoder<
13516                '_,
13517                fidl::encoding::DefaultFuchsiaResourceDialect,
13518            >,
13519            offset: usize,
13520            _depth: fidl::encoding::Depth,
13521        ) -> fidl::Result<()> {
13522            encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
13523            encoder.write_num::<u64>(self.ordinal(), offset);
13524            match self {
13525                EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
13526                    u32,
13527                    fidl::encoding::DefaultFuchsiaResourceDialect,
13528                >(
13529                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13530                    encoder,
13531                    offset + 8,
13532                    _depth,
13533                ),
13534                EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
13535                    u64,
13536                    fidl::encoding::DefaultFuchsiaResourceDialect,
13537                >(
13538                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
13539                    encoder,
13540                    offset + 8,
13541                    _depth,
13542                ),
13543                EnvelopeInliningTestUnion::Handle(ref mut val) => {
13544                    fidl::encoding::encode_in_envelope::<
13545                        fidl::encoding::HandleType<
13546                            fidl::NullableHandle,
13547                            { fidl::ObjectType::NONE.into_raw() },
13548                            2147483648,
13549                        >,
13550                        fidl::encoding::DefaultFuchsiaResourceDialect,
13551                    >(
13552                        <fidl::encoding::HandleType<
13553                            fidl::NullableHandle,
13554                            { fidl::ObjectType::NONE.into_raw() },
13555                            2147483648,
13556                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13557                            val
13558                        ),
13559                        encoder,
13560                        offset + 8,
13561                        _depth,
13562                    )
13563                }
13564                EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
13565                    Err(fidl::Error::UnknownUnionTag)
13566                }
13567            }
13568        }
13569    }
13570
13571    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13572        for EnvelopeInliningTestUnion
13573    {
13574        #[inline(always)]
13575        fn new_empty() -> Self {
13576            Self::__SourceBreaking { unknown_ordinal: 0 }
13577        }
13578
13579        #[inline]
13580        unsafe fn decode(
13581            &mut self,
13582            decoder: &mut fidl::encoding::Decoder<
13583                '_,
13584                fidl::encoding::DefaultFuchsiaResourceDialect,
13585            >,
13586            offset: usize,
13587            mut depth: fidl::encoding::Depth,
13588        ) -> fidl::Result<()> {
13589            decoder.debug_check_bounds::<Self>(offset);
13590            #[allow(unused_variables)]
13591            let next_out_of_line = decoder.next_out_of_line();
13592            let handles_before = decoder.remaining_handles();
13593            let (ordinal, inlined, num_bytes, num_handles) =
13594                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13595
13596            let member_inline_size = match ordinal {
13597                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13598                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13599                3 => <fidl::encoding::HandleType<
13600                    fidl::NullableHandle,
13601                    { fidl::ObjectType::NONE.into_raw() },
13602                    2147483648,
13603                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13604                0 => return Err(fidl::Error::UnknownUnionTag),
13605                _ => num_bytes as usize,
13606            };
13607
13608            if inlined != (member_inline_size <= 4) {
13609                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13610            }
13611            let _inner_offset;
13612            if inlined {
13613                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13614                _inner_offset = offset + 8;
13615            } else {
13616                depth.increment()?;
13617                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13618            }
13619            match ordinal {
13620                1 => {
13621                    #[allow(irrefutable_let_patterns)]
13622                    if let EnvelopeInliningTestUnion::Small(_) = self {
13623                        // Do nothing, read the value into the object
13624                    } else {
13625                        // Initialize `self` to the right variant
13626                        *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
13627                            u32,
13628                            fidl::encoding::DefaultFuchsiaResourceDialect
13629                        ));
13630                    }
13631                    #[allow(irrefutable_let_patterns)]
13632                    if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
13633                        fidl::decode!(
13634                            u32,
13635                            fidl::encoding::DefaultFuchsiaResourceDialect,
13636                            val,
13637                            decoder,
13638                            _inner_offset,
13639                            depth
13640                        )?;
13641                    } else {
13642                        unreachable!()
13643                    }
13644                }
13645                2 => {
13646                    #[allow(irrefutable_let_patterns)]
13647                    if let EnvelopeInliningTestUnion::Large(_) = self {
13648                        // Do nothing, read the value into the object
13649                    } else {
13650                        // Initialize `self` to the right variant
13651                        *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
13652                            u64,
13653                            fidl::encoding::DefaultFuchsiaResourceDialect
13654                        ));
13655                    }
13656                    #[allow(irrefutable_let_patterns)]
13657                    if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
13658                        fidl::decode!(
13659                            u64,
13660                            fidl::encoding::DefaultFuchsiaResourceDialect,
13661                            val,
13662                            decoder,
13663                            _inner_offset,
13664                            depth
13665                        )?;
13666                    } else {
13667                        unreachable!()
13668                    }
13669                }
13670                3 => {
13671                    #[allow(irrefutable_let_patterns)]
13672                    if let EnvelopeInliningTestUnion::Handle(_) = self {
13673                        // Do nothing, read the value into the object
13674                    } else {
13675                        // Initialize `self` to the right variant
13676                        *self = EnvelopeInliningTestUnion::Handle(
13677                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13678                        );
13679                    }
13680                    #[allow(irrefutable_let_patterns)]
13681                    if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
13682                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
13683                    } else {
13684                        unreachable!()
13685                    }
13686                }
13687                #[allow(deprecated)]
13688                ordinal => {
13689                    for _ in 0..num_handles {
13690                        decoder.drop_next_handle()?;
13691                    }
13692                    *self =
13693                        EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
13694                }
13695            }
13696            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13697                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13698            }
13699            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13700                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13701            }
13702            Ok(())
13703        }
13704    }
13705
13706    impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
13707        type Borrowed<'a> = &'a mut Self;
13708        fn take_or_borrow<'a>(
13709            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13710        ) -> Self::Borrowed<'a> {
13711            value
13712        }
13713    }
13714
13715    unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
13716        type Owned = Self;
13717
13718        #[inline(always)]
13719        fn inline_align(_context: fidl::encoding::Context) -> usize {
13720            8
13721        }
13722
13723        #[inline(always)]
13724        fn inline_size(_context: fidl::encoding::Context) -> usize {
13725            16
13726        }
13727    }
13728
13729    unsafe impl
13730        fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
13731        for &mut SampleResourceXUnion
13732    {
13733        #[inline]
13734        unsafe fn encode(
13735            self,
13736            encoder: &mut fidl::encoding::Encoder<
13737                '_,
13738                fidl::encoding::DefaultFuchsiaResourceDialect,
13739            >,
13740            offset: usize,
13741            _depth: fidl::encoding::Depth,
13742        ) -> fidl::Result<()> {
13743            encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
13744            encoder.write_num::<u64>(self.ordinal(), offset);
13745            match self {
13746                SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13747                    u32,
13748                    fidl::encoding::DefaultFuchsiaResourceDialect,
13749                >(
13750                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13751                    encoder,
13752                    offset + 8,
13753                    _depth,
13754                ),
13755                SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13756                    SimpleUnion,
13757                    fidl::encoding::DefaultFuchsiaResourceDialect,
13758                >(
13759                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13760                    encoder,
13761                    offset + 8,
13762                    _depth,
13763                ),
13764                SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13765                    SimpleTable,
13766                    fidl::encoding::DefaultFuchsiaResourceDialect,
13767                >(
13768                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13769                    encoder,
13770                    offset + 8,
13771                    _depth,
13772                ),
13773                SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13774            }
13775        }
13776    }
13777
13778    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13779        for SampleResourceXUnion
13780    {
13781        #[inline(always)]
13782        fn new_empty() -> Self {
13783            Self::__SourceBreaking { unknown_ordinal: 0 }
13784        }
13785
13786        #[inline]
13787        unsafe fn decode(
13788            &mut self,
13789            decoder: &mut fidl::encoding::Decoder<
13790                '_,
13791                fidl::encoding::DefaultFuchsiaResourceDialect,
13792            >,
13793            offset: usize,
13794            mut depth: fidl::encoding::Depth,
13795        ) -> fidl::Result<()> {
13796            decoder.debug_check_bounds::<Self>(offset);
13797            #[allow(unused_variables)]
13798            let next_out_of_line = decoder.next_out_of_line();
13799            let handles_before = decoder.remaining_handles();
13800            let (ordinal, inlined, num_bytes, num_handles) =
13801                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13802
13803            let member_inline_size = match ordinal {
13804                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13805                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13806                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13807                0 => return Err(fidl::Error::UnknownUnionTag),
13808                _ => num_bytes as usize,
13809            };
13810
13811            if inlined != (member_inline_size <= 4) {
13812                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13813            }
13814            let _inner_offset;
13815            if inlined {
13816                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13817                _inner_offset = offset + 8;
13818            } else {
13819                depth.increment()?;
13820                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13821            }
13822            match ordinal {
13823                1 => {
13824                    #[allow(irrefutable_let_patterns)]
13825                    if let SampleResourceXUnion::U(_) = self {
13826                        // Do nothing, read the value into the object
13827                    } else {
13828                        // Initialize `self` to the right variant
13829                        *self = SampleResourceXUnion::U(fidl::new_empty!(
13830                            u32,
13831                            fidl::encoding::DefaultFuchsiaResourceDialect
13832                        ));
13833                    }
13834                    #[allow(irrefutable_let_patterns)]
13835                    if let SampleResourceXUnion::U(ref mut val) = self {
13836                        fidl::decode!(
13837                            u32,
13838                            fidl::encoding::DefaultFuchsiaResourceDialect,
13839                            val,
13840                            decoder,
13841                            _inner_offset,
13842                            depth
13843                        )?;
13844                    } else {
13845                        unreachable!()
13846                    }
13847                }
13848                2 => {
13849                    #[allow(irrefutable_let_patterns)]
13850                    if let SampleResourceXUnion::Su(_) = self {
13851                        // Do nothing, read the value into the object
13852                    } else {
13853                        // Initialize `self` to the right variant
13854                        *self = SampleResourceXUnion::Su(fidl::new_empty!(
13855                            SimpleUnion,
13856                            fidl::encoding::DefaultFuchsiaResourceDialect
13857                        ));
13858                    }
13859                    #[allow(irrefutable_let_patterns)]
13860                    if let SampleResourceXUnion::Su(ref mut val) = self {
13861                        fidl::decode!(
13862                            SimpleUnion,
13863                            fidl::encoding::DefaultFuchsiaResourceDialect,
13864                            val,
13865                            decoder,
13866                            _inner_offset,
13867                            depth
13868                        )?;
13869                    } else {
13870                        unreachable!()
13871                    }
13872                }
13873                3 => {
13874                    #[allow(irrefutable_let_patterns)]
13875                    if let SampleResourceXUnion::St(_) = self {
13876                        // Do nothing, read the value into the object
13877                    } else {
13878                        // Initialize `self` to the right variant
13879                        *self = SampleResourceXUnion::St(fidl::new_empty!(
13880                            SimpleTable,
13881                            fidl::encoding::DefaultFuchsiaResourceDialect
13882                        ));
13883                    }
13884                    #[allow(irrefutable_let_patterns)]
13885                    if let SampleResourceXUnion::St(ref mut val) = self {
13886                        fidl::decode!(
13887                            SimpleTable,
13888                            fidl::encoding::DefaultFuchsiaResourceDialect,
13889                            val,
13890                            decoder,
13891                            _inner_offset,
13892                            depth
13893                        )?;
13894                    } else {
13895                        unreachable!()
13896                    }
13897                }
13898                #[allow(deprecated)]
13899                ordinal => {
13900                    for _ in 0..num_handles {
13901                        decoder.drop_next_handle()?;
13902                    }
13903                    *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
13904                }
13905            }
13906            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13907                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13908            }
13909            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13910                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13911            }
13912            Ok(())
13913        }
13914    }
13915
13916    impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
13917        type Borrowed<'a> = &'a mut Self;
13918        fn take_or_borrow<'a>(
13919            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13920        ) -> Self::Borrowed<'a> {
13921            value
13922        }
13923    }
13924
13925    unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
13926        type Owned = Self;
13927
13928        #[inline(always)]
13929        fn inline_align(_context: fidl::encoding::Context) -> usize {
13930            8
13931        }
13932
13933        #[inline(always)]
13934        fn inline_size(_context: fidl::encoding::Context) -> usize {
13935            16
13936        }
13937    }
13938
13939    unsafe impl
13940        fidl::encoding::Encode<
13941            SampleStrictResourceXUnion,
13942            fidl::encoding::DefaultFuchsiaResourceDialect,
13943        > for &mut SampleStrictResourceXUnion
13944    {
13945        #[inline]
13946        unsafe fn encode(
13947            self,
13948            encoder: &mut fidl::encoding::Encoder<
13949                '_,
13950                fidl::encoding::DefaultFuchsiaResourceDialect,
13951            >,
13952            offset: usize,
13953            _depth: fidl::encoding::Depth,
13954        ) -> fidl::Result<()> {
13955            encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
13956            encoder.write_num::<u64>(self.ordinal(), offset);
13957            match self {
13958                SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13959                    u32,
13960                    fidl::encoding::DefaultFuchsiaResourceDialect,
13961                >(
13962                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13963                    encoder,
13964                    offset + 8,
13965                    _depth,
13966                ),
13967                SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13968                    SimpleUnion,
13969                    fidl::encoding::DefaultFuchsiaResourceDialect,
13970                >(
13971                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13972                    encoder,
13973                    offset + 8,
13974                    _depth,
13975                ),
13976                SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13977                    SimpleTable,
13978                    fidl::encoding::DefaultFuchsiaResourceDialect,
13979                >(
13980                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13981                    encoder,
13982                    offset + 8,
13983                    _depth,
13984                ),
13985            }
13986        }
13987    }
13988
13989    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13990        for SampleStrictResourceXUnion
13991    {
13992        #[inline(always)]
13993        fn new_empty() -> Self {
13994            Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
13995        }
13996
13997        #[inline]
13998        unsafe fn decode(
13999            &mut self,
14000            decoder: &mut fidl::encoding::Decoder<
14001                '_,
14002                fidl::encoding::DefaultFuchsiaResourceDialect,
14003            >,
14004            offset: usize,
14005            mut depth: fidl::encoding::Depth,
14006        ) -> fidl::Result<()> {
14007            decoder.debug_check_bounds::<Self>(offset);
14008            #[allow(unused_variables)]
14009            let next_out_of_line = decoder.next_out_of_line();
14010            let handles_before = decoder.remaining_handles();
14011            let (ordinal, inlined, num_bytes, num_handles) =
14012                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14013
14014            let member_inline_size = match ordinal {
14015                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14016                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14017                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14018                _ => return Err(fidl::Error::UnknownUnionTag),
14019            };
14020
14021            if inlined != (member_inline_size <= 4) {
14022                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14023            }
14024            let _inner_offset;
14025            if inlined {
14026                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14027                _inner_offset = offset + 8;
14028            } else {
14029                depth.increment()?;
14030                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14031            }
14032            match ordinal {
14033                1 => {
14034                    #[allow(irrefutable_let_patterns)]
14035                    if let SampleStrictResourceXUnion::U(_) = self {
14036                        // Do nothing, read the value into the object
14037                    } else {
14038                        // Initialize `self` to the right variant
14039                        *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14040                            u32,
14041                            fidl::encoding::DefaultFuchsiaResourceDialect
14042                        ));
14043                    }
14044                    #[allow(irrefutable_let_patterns)]
14045                    if let SampleStrictResourceXUnion::U(ref mut val) = self {
14046                        fidl::decode!(
14047                            u32,
14048                            fidl::encoding::DefaultFuchsiaResourceDialect,
14049                            val,
14050                            decoder,
14051                            _inner_offset,
14052                            depth
14053                        )?;
14054                    } else {
14055                        unreachable!()
14056                    }
14057                }
14058                2 => {
14059                    #[allow(irrefutable_let_patterns)]
14060                    if let SampleStrictResourceXUnion::Su(_) = self {
14061                        // Do nothing, read the value into the object
14062                    } else {
14063                        // Initialize `self` to the right variant
14064                        *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14065                            SimpleUnion,
14066                            fidl::encoding::DefaultFuchsiaResourceDialect
14067                        ));
14068                    }
14069                    #[allow(irrefutable_let_patterns)]
14070                    if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14071                        fidl::decode!(
14072                            SimpleUnion,
14073                            fidl::encoding::DefaultFuchsiaResourceDialect,
14074                            val,
14075                            decoder,
14076                            _inner_offset,
14077                            depth
14078                        )?;
14079                    } else {
14080                        unreachable!()
14081                    }
14082                }
14083                3 => {
14084                    #[allow(irrefutable_let_patterns)]
14085                    if let SampleStrictResourceXUnion::St(_) = self {
14086                        // Do nothing, read the value into the object
14087                    } else {
14088                        // Initialize `self` to the right variant
14089                        *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14090                            SimpleTable,
14091                            fidl::encoding::DefaultFuchsiaResourceDialect
14092                        ));
14093                    }
14094                    #[allow(irrefutable_let_patterns)]
14095                    if let SampleStrictResourceXUnion::St(ref mut val) = self {
14096                        fidl::decode!(
14097                            SimpleTable,
14098                            fidl::encoding::DefaultFuchsiaResourceDialect,
14099                            val,
14100                            decoder,
14101                            _inner_offset,
14102                            depth
14103                        )?;
14104                    } else {
14105                        unreachable!()
14106                    }
14107                }
14108                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14109            }
14110            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14111                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14112            }
14113            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14114                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14115            }
14116            Ok(())
14117        }
14118    }
14119
14120    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14121        type Borrowed<'a> = &'a mut Self;
14122        fn take_or_borrow<'a>(
14123            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14124        ) -> Self::Borrowed<'a> {
14125            value
14126        }
14127    }
14128
14129    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14130        type Owned = Self;
14131
14132        #[inline(always)]
14133        fn inline_align(_context: fidl::encoding::Context) -> usize {
14134            8
14135        }
14136
14137        #[inline(always)]
14138        fn inline_size(_context: fidl::encoding::Context) -> usize {
14139            16
14140        }
14141    }
14142
14143    unsafe impl
14144        fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14145        for &mut UnionOfEndpointsUnion
14146    {
14147        #[inline]
14148        unsafe fn encode(
14149            self,
14150            encoder: &mut fidl::encoding::Encoder<
14151                '_,
14152                fidl::encoding::DefaultFuchsiaResourceDialect,
14153            >,
14154            offset: usize,
14155            _depth: fidl::encoding::Depth,
14156        ) -> fidl::Result<()> {
14157            encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14158            encoder.write_num::<u64>(self.ordinal(), offset);
14159            match self {
14160            UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14161                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14162                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14163                    encoder, offset + 8, _depth
14164                )
14165            }
14166            UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14167                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14168                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14169                    encoder, offset + 8, _depth
14170                )
14171            }
14172            UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14173        }
14174        }
14175    }
14176
14177    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14178        for UnionOfEndpointsUnion
14179    {
14180        #[inline(always)]
14181        fn new_empty() -> Self {
14182            Self::__SourceBreaking { unknown_ordinal: 0 }
14183        }
14184
14185        #[inline]
14186        unsafe fn decode(
14187            &mut self,
14188            decoder: &mut fidl::encoding::Decoder<
14189                '_,
14190                fidl::encoding::DefaultFuchsiaResourceDialect,
14191            >,
14192            offset: usize,
14193            mut depth: fidl::encoding::Depth,
14194        ) -> fidl::Result<()> {
14195            decoder.debug_check_bounds::<Self>(offset);
14196            #[allow(unused_variables)]
14197            let next_out_of_line = decoder.next_out_of_line();
14198            let handles_before = decoder.remaining_handles();
14199            let (ordinal, inlined, num_bytes, num_handles) =
14200                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14201
14202            let member_inline_size = match ordinal {
14203            1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14204            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14205            0 => return Err(fidl::Error::UnknownUnionTag),
14206            _ => num_bytes as usize,
14207        };
14208
14209            if inlined != (member_inline_size <= 4) {
14210                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14211            }
14212            let _inner_offset;
14213            if inlined {
14214                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14215                _inner_offset = offset + 8;
14216            } else {
14217                depth.increment()?;
14218                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14219            }
14220            match ordinal {
14221                1 => {
14222                    #[allow(irrefutable_let_patterns)]
14223                    if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14224                        // Do nothing, read the value into the object
14225                    } else {
14226                        // Initialize `self` to the right variant
14227                        *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14228                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14229                            fidl::encoding::DefaultFuchsiaResourceDialect
14230                        ));
14231                    }
14232                    #[allow(irrefutable_let_patterns)]
14233                    if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14234                        fidl::decode!(
14235                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14236                            fidl::encoding::DefaultFuchsiaResourceDialect,
14237                            val,
14238                            decoder,
14239                            _inner_offset,
14240                            depth
14241                        )?;
14242                    } else {
14243                        unreachable!()
14244                    }
14245                }
14246                2 => {
14247                    #[allow(irrefutable_let_patterns)]
14248                    if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14249                        // Do nothing, read the value into the object
14250                    } else {
14251                        // Initialize `self` to the right variant
14252                        *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14253                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14254                            fidl::encoding::DefaultFuchsiaResourceDialect
14255                        ));
14256                    }
14257                    #[allow(irrefutable_let_patterns)]
14258                    if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14259                        fidl::decode!(
14260                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14261                            fidl::encoding::DefaultFuchsiaResourceDialect,
14262                            val,
14263                            decoder,
14264                            _inner_offset,
14265                            depth
14266                        )?;
14267                    } else {
14268                        unreachable!()
14269                    }
14270                }
14271                #[allow(deprecated)]
14272                ordinal => {
14273                    for _ in 0..num_handles {
14274                        decoder.drop_next_handle()?;
14275                    }
14276                    *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14277                }
14278            }
14279            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14280                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14281            }
14282            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14283                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14284            }
14285            Ok(())
14286        }
14287    }
14288
14289    impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14290        type Borrowed<'a> = &'a mut Self;
14291        fn take_or_borrow<'a>(
14292            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14293        ) -> Self::Borrowed<'a> {
14294            value
14295        }
14296    }
14297
14298    unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14299        type Owned = Self;
14300
14301        #[inline(always)]
14302        fn inline_align(_context: fidl::encoding::Context) -> usize {
14303            8
14304        }
14305
14306        #[inline(always)]
14307        fn inline_size(_context: fidl::encoding::Context) -> usize {
14308            16
14309        }
14310    }
14311
14312    unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
14313        for &mut UnionOfHandle
14314    {
14315        #[inline]
14316        unsafe fn encode(
14317            self,
14318            encoder: &mut fidl::encoding::Encoder<
14319                '_,
14320                fidl::encoding::DefaultFuchsiaResourceDialect,
14321            >,
14322            offset: usize,
14323            _depth: fidl::encoding::Depth,
14324        ) -> fidl::Result<()> {
14325            encoder.debug_check_bounds::<UnionOfHandle>(offset);
14326            encoder.write_num::<u64>(self.ordinal(), offset);
14327            match self {
14328                UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
14329                    fidl::encoding::HandleType<
14330                        fidl::NullableHandle,
14331                        { fidl::ObjectType::NONE.into_raw() },
14332                        2147483648,
14333                    >,
14334                    fidl::encoding::DefaultFuchsiaResourceDialect,
14335                >(
14336                    <fidl::encoding::HandleType<
14337                        fidl::NullableHandle,
14338                        { fidl::ObjectType::NONE.into_raw() },
14339                        2147483648,
14340                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14341                        val
14342                    ),
14343                    encoder,
14344                    offset + 8,
14345                    _depth,
14346                ),
14347            }
14348        }
14349    }
14350
14351    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
14352        #[inline(always)]
14353        fn new_empty() -> Self {
14354            Self::H(
14355                fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14356            )
14357        }
14358
14359        #[inline]
14360        unsafe fn decode(
14361            &mut self,
14362            decoder: &mut fidl::encoding::Decoder<
14363                '_,
14364                fidl::encoding::DefaultFuchsiaResourceDialect,
14365            >,
14366            offset: usize,
14367            mut depth: fidl::encoding::Depth,
14368        ) -> fidl::Result<()> {
14369            decoder.debug_check_bounds::<Self>(offset);
14370            #[allow(unused_variables)]
14371            let next_out_of_line = decoder.next_out_of_line();
14372            let handles_before = decoder.remaining_handles();
14373            let (ordinal, inlined, num_bytes, num_handles) =
14374                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14375
14376            let member_inline_size = match ordinal {
14377                1 => <fidl::encoding::HandleType<
14378                    fidl::NullableHandle,
14379                    { fidl::ObjectType::NONE.into_raw() },
14380                    2147483648,
14381                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14382                _ => return Err(fidl::Error::UnknownUnionTag),
14383            };
14384
14385            if inlined != (member_inline_size <= 4) {
14386                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14387            }
14388            let _inner_offset;
14389            if inlined {
14390                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14391                _inner_offset = offset + 8;
14392            } else {
14393                depth.increment()?;
14394                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14395            }
14396            match ordinal {
14397                1 => {
14398                    #[allow(irrefutable_let_patterns)]
14399                    if let UnionOfHandle::H(_) = self {
14400                        // Do nothing, read the value into the object
14401                    } else {
14402                        // Initialize `self` to the right variant
14403                        *self = UnionOfHandle::H(
14404                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14405                        );
14406                    }
14407                    #[allow(irrefutable_let_patterns)]
14408                    if let UnionOfHandle::H(ref mut val) = self {
14409                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14410                    } else {
14411                        unreachable!()
14412                    }
14413                }
14414                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14415            }
14416            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14417                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14418            }
14419            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14420                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14421            }
14422            Ok(())
14423        }
14424    }
14425
14426    impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
14427        type Borrowed<'a> = &'a mut Self;
14428        fn take_or_borrow<'a>(
14429            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14430        ) -> Self::Borrowed<'a> {
14431            value
14432        }
14433    }
14434
14435    unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
14436        type Owned = Self;
14437
14438        #[inline(always)]
14439        fn inline_align(_context: fidl::encoding::Context) -> usize {
14440            8
14441        }
14442
14443        #[inline(always)]
14444        fn inline_size(_context: fidl::encoding::Context) -> usize {
14445            16
14446        }
14447    }
14448
14449    unsafe impl
14450        fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
14451        for &mut UnionWithVector
14452    {
14453        #[inline]
14454        unsafe fn encode(
14455            self,
14456            encoder: &mut fidl::encoding::Encoder<
14457                '_,
14458                fidl::encoding::DefaultFuchsiaResourceDialect,
14459            >,
14460            offset: usize,
14461            _depth: fidl::encoding::Depth,
14462        ) -> fidl::Result<()> {
14463            encoder.debug_check_bounds::<UnionWithVector>(offset);
14464            encoder.write_num::<u64>(self.ordinal(), offset);
14465            match self {
14466            UnionWithVector::Unused(ref val) => {
14467                fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
14468                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
14469                    encoder, offset + 8, _depth
14470                )
14471            }
14472            UnionWithVector::VectorOfUint8(ref val) => {
14473                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14474                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
14475                    encoder, offset + 8, _depth
14476                )
14477            }
14478            UnionWithVector::S(ref val) => {
14479                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
14480                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
14481                    encoder, offset + 8, _depth
14482                )
14483            }
14484            UnionWithVector::VectorS3A1(ref val) => {
14485                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14486                    <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
14487                    encoder, offset + 8, _depth
14488                )
14489            }
14490            UnionWithVector::VectorS3A2(ref val) => {
14491                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14492                    <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14493                    encoder, offset + 8, _depth
14494                )
14495            }
14496            UnionWithVector::Handles(ref mut val) => {
14497                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14498                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14499                    encoder, offset + 8, _depth
14500                )
14501            }
14502            UnionWithVector::ArrayS3A1(ref val) => {
14503                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14504                    <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14505                    encoder, offset + 8, _depth
14506                )
14507            }
14508            UnionWithVector::ArrayS3A2(ref val) => {
14509                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14510                    <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14511                    encoder, offset + 8, _depth
14512                )
14513            }
14514            UnionWithVector::VectorUnion(ref val) => {
14515                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14516                    <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
14517                    encoder, offset + 8, _depth
14518                )
14519            }
14520        }
14521        }
14522    }
14523
14524    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14525        for UnionWithVector
14526    {
14527        #[inline(always)]
14528        fn new_empty() -> Self {
14529            Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
14530        }
14531
14532        #[inline]
14533        unsafe fn decode(
14534            &mut self,
14535            decoder: &mut fidl::encoding::Decoder<
14536                '_,
14537                fidl::encoding::DefaultFuchsiaResourceDialect,
14538            >,
14539            offset: usize,
14540            mut depth: fidl::encoding::Depth,
14541        ) -> fidl::Result<()> {
14542            decoder.debug_check_bounds::<Self>(offset);
14543            #[allow(unused_variables)]
14544            let next_out_of_line = decoder.next_out_of_line();
14545            let handles_before = decoder.remaining_handles();
14546            let (ordinal, inlined, num_bytes, num_handles) =
14547                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14548
14549            let member_inline_size = match ordinal {
14550            1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14551            2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14552            3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14553            4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14554            5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14555            6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14556            7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14557            8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14558            9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14559            _ => return Err(fidl::Error::UnknownUnionTag),
14560        };
14561
14562            if inlined != (member_inline_size <= 4) {
14563                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14564            }
14565            let _inner_offset;
14566            if inlined {
14567                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14568                _inner_offset = offset + 8;
14569            } else {
14570                depth.increment()?;
14571                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14572            }
14573            match ordinal {
14574                1 => {
14575                    #[allow(irrefutable_let_patterns)]
14576                    if let UnionWithVector::Unused(_) = self {
14577                        // Do nothing, read the value into the object
14578                    } else {
14579                        // Initialize `self` to the right variant
14580                        *self = UnionWithVector::Unused(fidl::new_empty!(
14581                            u8,
14582                            fidl::encoding::DefaultFuchsiaResourceDialect
14583                        ));
14584                    }
14585                    #[allow(irrefutable_let_patterns)]
14586                    if let UnionWithVector::Unused(ref mut val) = self {
14587                        fidl::decode!(
14588                            u8,
14589                            fidl::encoding::DefaultFuchsiaResourceDialect,
14590                            val,
14591                            decoder,
14592                            _inner_offset,
14593                            depth
14594                        )?;
14595                    } else {
14596                        unreachable!()
14597                    }
14598                }
14599                2 => {
14600                    #[allow(irrefutable_let_patterns)]
14601                    if let UnionWithVector::VectorOfUint8(_) = self {
14602                        // Do nothing, read the value into the object
14603                    } else {
14604                        // Initialize `self` to the right variant
14605                        *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
14606                            fidl::encoding::UnboundedVector<u8>,
14607                            fidl::encoding::DefaultFuchsiaResourceDialect
14608                        ));
14609                    }
14610                    #[allow(irrefutable_let_patterns)]
14611                    if let UnionWithVector::VectorOfUint8(ref mut val) = self {
14612                        fidl::decode!(
14613                            fidl::encoding::UnboundedVector<u8>,
14614                            fidl::encoding::DefaultFuchsiaResourceDialect,
14615                            val,
14616                            decoder,
14617                            _inner_offset,
14618                            depth
14619                        )?;
14620                    } else {
14621                        unreachable!()
14622                    }
14623                }
14624                3 => {
14625                    #[allow(irrefutable_let_patterns)]
14626                    if let UnionWithVector::S(_) = self {
14627                        // Do nothing, read the value into the object
14628                    } else {
14629                        // Initialize `self` to the right variant
14630                        *self = UnionWithVector::S(fidl::new_empty!(
14631                            fidl::encoding::UnboundedString,
14632                            fidl::encoding::DefaultFuchsiaResourceDialect
14633                        ));
14634                    }
14635                    #[allow(irrefutable_let_patterns)]
14636                    if let UnionWithVector::S(ref mut val) = self {
14637                        fidl::decode!(
14638                            fidl::encoding::UnboundedString,
14639                            fidl::encoding::DefaultFuchsiaResourceDialect,
14640                            val,
14641                            decoder,
14642                            _inner_offset,
14643                            depth
14644                        )?;
14645                    } else {
14646                        unreachable!()
14647                    }
14648                }
14649                4 => {
14650                    #[allow(irrefutable_let_patterns)]
14651                    if let UnionWithVector::VectorS3A1(_) = self {
14652                        // Do nothing, read the value into the object
14653                    } else {
14654                        // Initialize `self` to the right variant
14655                        *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
14656                            fidl::encoding::UnboundedVector<StructSize3Align1>,
14657                            fidl::encoding::DefaultFuchsiaResourceDialect
14658                        ));
14659                    }
14660                    #[allow(irrefutable_let_patterns)]
14661                    if let UnionWithVector::VectorS3A1(ref mut val) = self {
14662                        fidl::decode!(
14663                            fidl::encoding::UnboundedVector<StructSize3Align1>,
14664                            fidl::encoding::DefaultFuchsiaResourceDialect,
14665                            val,
14666                            decoder,
14667                            _inner_offset,
14668                            depth
14669                        )?;
14670                    } else {
14671                        unreachable!()
14672                    }
14673                }
14674                5 => {
14675                    #[allow(irrefutable_let_patterns)]
14676                    if let UnionWithVector::VectorS3A2(_) = self {
14677                        // Do nothing, read the value into the object
14678                    } else {
14679                        // Initialize `self` to the right variant
14680                        *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
14681                            fidl::encoding::UnboundedVector<StructSize3Align2>,
14682                            fidl::encoding::DefaultFuchsiaResourceDialect
14683                        ));
14684                    }
14685                    #[allow(irrefutable_let_patterns)]
14686                    if let UnionWithVector::VectorS3A2(ref mut val) = self {
14687                        fidl::decode!(
14688                            fidl::encoding::UnboundedVector<StructSize3Align2>,
14689                            fidl::encoding::DefaultFuchsiaResourceDialect,
14690                            val,
14691                            decoder,
14692                            _inner_offset,
14693                            depth
14694                        )?;
14695                    } else {
14696                        unreachable!()
14697                    }
14698                }
14699                6 => {
14700                    #[allow(irrefutable_let_patterns)]
14701                    if let UnionWithVector::Handles(_) = self {
14702                        // Do nothing, read the value into the object
14703                    } else {
14704                        // Initialize `self` to the right variant
14705                        *self = UnionWithVector::Handles(fidl::new_empty!(
14706                            fidl::encoding::UnboundedVector<
14707                                fidl::encoding::HandleType<
14708                                    fidl::NullableHandle,
14709                                    { fidl::ObjectType::NONE.into_raw() },
14710                                    2147483648,
14711                                >,
14712                            >,
14713                            fidl::encoding::DefaultFuchsiaResourceDialect
14714                        ));
14715                    }
14716                    #[allow(irrefutable_let_patterns)]
14717                    if let UnionWithVector::Handles(ref mut val) = self {
14718                        fidl::decode!(
14719                            fidl::encoding::UnboundedVector<
14720                                fidl::encoding::HandleType<
14721                                    fidl::NullableHandle,
14722                                    { fidl::ObjectType::NONE.into_raw() },
14723                                    2147483648,
14724                                >,
14725                            >,
14726                            fidl::encoding::DefaultFuchsiaResourceDialect,
14727                            val,
14728                            decoder,
14729                            _inner_offset,
14730                            depth
14731                        )?;
14732                    } else {
14733                        unreachable!()
14734                    }
14735                }
14736                7 => {
14737                    #[allow(irrefutable_let_patterns)]
14738                    if let UnionWithVector::ArrayS3A1(_) = self {
14739                        // Do nothing, read the value into the object
14740                    } else {
14741                        // Initialize `self` to the right variant
14742                        *self = UnionWithVector::ArrayS3A1(
14743                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14744                        );
14745                    }
14746                    #[allow(irrefutable_let_patterns)]
14747                    if let UnionWithVector::ArrayS3A1(ref mut val) = self {
14748                        fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14749                    } else {
14750                        unreachable!()
14751                    }
14752                }
14753                8 => {
14754                    #[allow(irrefutable_let_patterns)]
14755                    if let UnionWithVector::ArrayS3A2(_) = self {
14756                        // Do nothing, read the value into the object
14757                    } else {
14758                        // Initialize `self` to the right variant
14759                        *self = UnionWithVector::ArrayS3A2(
14760                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14761                        );
14762                    }
14763                    #[allow(irrefutable_let_patterns)]
14764                    if let UnionWithVector::ArrayS3A2(ref mut val) = self {
14765                        fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14766                    } else {
14767                        unreachable!()
14768                    }
14769                }
14770                9 => {
14771                    #[allow(irrefutable_let_patterns)]
14772                    if let UnionWithVector::VectorUnion(_) = self {
14773                        // Do nothing, read the value into the object
14774                    } else {
14775                        // Initialize `self` to the right variant
14776                        *self = UnionWithVector::VectorUnion(fidl::new_empty!(
14777                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
14778                            fidl::encoding::DefaultFuchsiaResourceDialect
14779                        ));
14780                    }
14781                    #[allow(irrefutable_let_patterns)]
14782                    if let UnionWithVector::VectorUnion(ref mut val) = self {
14783                        fidl::decode!(
14784                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
14785                            fidl::encoding::DefaultFuchsiaResourceDialect,
14786                            val,
14787                            decoder,
14788                            _inner_offset,
14789                            depth
14790                        )?;
14791                    } else {
14792                        unreachable!()
14793                    }
14794                }
14795                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14796            }
14797            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14798                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14799            }
14800            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14801                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14802            }
14803            Ok(())
14804        }
14805    }
14806
14807    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14808        type Borrowed<'a> = &'a mut Self;
14809        fn take_or_borrow<'a>(
14810            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14811        ) -> Self::Borrowed<'a> {
14812            value
14813        }
14814    }
14815
14816    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14817        type Owned = Self;
14818
14819        #[inline(always)]
14820        fn inline_align(_context: fidl::encoding::Context) -> usize {
14821            8
14822        }
14823
14824        #[inline(always)]
14825        fn inline_size(_context: fidl::encoding::Context) -> usize {
14826            16
14827        }
14828    }
14829
14830    unsafe impl
14831        fidl::encoding::Encode<
14832            VectorOfArrayOfEventInUnionWithReducedRights,
14833            fidl::encoding::DefaultFuchsiaResourceDialect,
14834        > for &mut VectorOfArrayOfEventInUnionWithReducedRights
14835    {
14836        #[inline]
14837        unsafe fn encode(
14838            self,
14839            encoder: &mut fidl::encoding::Encoder<
14840                '_,
14841                fidl::encoding::DefaultFuchsiaResourceDialect,
14842            >,
14843            offset: usize,
14844            _depth: fidl::encoding::Depth,
14845        ) -> fidl::Result<()> {
14846            encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
14847            encoder.write_num::<u64>(self.ordinal(), offset);
14848            match self {
14849                VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
14850                    fidl::encoding::encode_in_envelope::<
14851                        fidl::encoding::Vector<
14852                            fidl::encoding::Array<
14853                                fidl::encoding::HandleType<
14854                                    fidl::Event,
14855                                    { fidl::ObjectType::EVENT.into_raw() },
14856                                    49155,
14857                                >,
14858                                1,
14859                            >,
14860                            1,
14861                        >,
14862                        fidl::encoding::DefaultFuchsiaResourceDialect,
14863                    >(
14864                        <fidl::encoding::Vector<
14865                            fidl::encoding::Array<
14866                                fidl::encoding::HandleType<
14867                                    fidl::Event,
14868                                    { fidl::ObjectType::EVENT.into_raw() },
14869                                    49155,
14870                                >,
14871                                1,
14872                            >,
14873                            1,
14874                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14875                            val
14876                        ),
14877                        encoder,
14878                        offset + 8,
14879                        _depth,
14880                    )
14881                }
14882            }
14883        }
14884    }
14885
14886    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14887        for VectorOfArrayOfEventInUnionWithReducedRights
14888    {
14889        #[inline(always)]
14890        fn new_empty() -> Self {
14891            Self::H(fidl::new_empty!(
14892                fidl::encoding::Vector<
14893                    fidl::encoding::Array<
14894                        fidl::encoding::HandleType<
14895                            fidl::Event,
14896                            { fidl::ObjectType::EVENT.into_raw() },
14897                            49155,
14898                        >,
14899                        1,
14900                    >,
14901                    1,
14902                >,
14903                fidl::encoding::DefaultFuchsiaResourceDialect
14904            ))
14905        }
14906
14907        #[inline]
14908        unsafe fn decode(
14909            &mut self,
14910            decoder: &mut fidl::encoding::Decoder<
14911                '_,
14912                fidl::encoding::DefaultFuchsiaResourceDialect,
14913            >,
14914            offset: usize,
14915            mut depth: fidl::encoding::Depth,
14916        ) -> fidl::Result<()> {
14917            decoder.debug_check_bounds::<Self>(offset);
14918            #[allow(unused_variables)]
14919            let next_out_of_line = decoder.next_out_of_line();
14920            let handles_before = decoder.remaining_handles();
14921            let (ordinal, inlined, num_bytes, num_handles) =
14922                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14923
14924            let member_inline_size = match ordinal {
14925                1 => <fidl::encoding::Vector<
14926                    fidl::encoding::Array<
14927                        fidl::encoding::HandleType<
14928                            fidl::Event,
14929                            { fidl::ObjectType::EVENT.into_raw() },
14930                            49155,
14931                        >,
14932                        1,
14933                    >,
14934                    1,
14935                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14936                _ => return Err(fidl::Error::UnknownUnionTag),
14937            };
14938
14939            if inlined != (member_inline_size <= 4) {
14940                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14941            }
14942            let _inner_offset;
14943            if inlined {
14944                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14945                _inner_offset = offset + 8;
14946            } else {
14947                depth.increment()?;
14948                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14949            }
14950            match ordinal {
14951                1 => {
14952                    #[allow(irrefutable_let_patterns)]
14953                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
14954                        // Do nothing, read the value into the object
14955                    } else {
14956                        // Initialize `self` to the right variant
14957                        *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14958                            fidl::encoding::Vector<
14959                                fidl::encoding::Array<
14960                                    fidl::encoding::HandleType<
14961                                        fidl::Event,
14962                                        { fidl::ObjectType::EVENT.into_raw() },
14963                                        49155,
14964                                    >,
14965                                    1,
14966                                >,
14967                                1,
14968                            >,
14969                            fidl::encoding::DefaultFuchsiaResourceDialect
14970                        ));
14971                    }
14972                    #[allow(irrefutable_let_patterns)]
14973                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
14974                        fidl::decode!(
14975                            fidl::encoding::Vector<
14976                                fidl::encoding::Array<
14977                                    fidl::encoding::HandleType<
14978                                        fidl::Event,
14979                                        { fidl::ObjectType::EVENT.into_raw() },
14980                                        49155,
14981                                    >,
14982                                    1,
14983                                >,
14984                                1,
14985                            >,
14986                            fidl::encoding::DefaultFuchsiaResourceDialect,
14987                            val,
14988                            decoder,
14989                            _inner_offset,
14990                            depth
14991                        )?;
14992                    } else {
14993                        unreachable!()
14994                    }
14995                }
14996                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14997            }
14998            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14999                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15000            }
15001            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15002                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15003            }
15004            Ok(())
15005        }
15006    }
15007}